Part Number Hot Search : 
ED750 NTXV2N6 HD44700 COM0A0 10206 BA15T 0840SGP TDA9882
Product Description
Full Text Search
 

To Download DF70854AD80FPV Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  sh7080 group user's manual: hardware rev.5.00 mar 2011 sh7083 r5f7083 r5m7083 r5s7083 sh7084 r5f7084 r5m7084 r5s7084 sh7085 r5f7085 r5m7085 r5s7085 sh7086 r5f7086 renesas 32-bit risc microcompute r superh tm risc engine family 32
page ii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 1. this document is provided for reference purposes only so that renesas customers may select the appropriate renesas products for their use. renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of renesas or any third party with respect to the information in this document. 2. renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document, including, but not limited to, product data, diagrams, charts, programs, algorithms, and application circuit examples. 3. you should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use. when exporting the products or technology described herein, you should follow the applicable export control laws and regulations, and procedures required by such laws and regulations. 4. all information included in this document such as product data, diagrams, charts, programs, algorithms, and application circuit examples, is current as of the date this document is issued. such information, however, is subject to change without any prior notice. before purchasing or using any renesas products listed in this document, please confirm the latest product information with a renesas sales office. also, please pay regular and careful attention to additional and different information to be disclosed by renesas such as that disclosed through our website. (http://www.renesas.com ) 5. renesas has used reasonable care in compiling the information included in this document, but renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document. 6. when using or otherwise relying on the information in this document, you should evaluate the information in light of the total system before deciding about the applicability of such information to the intended application. renesas makes no representations, warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this document or renesas products. 7. with the exception of products specified by renesas as suitable for automobile applications, renesas products are not designed, manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems, or equipment or systems for transportation and traffic, healthcare, combustion control, aerospace and aeronautics, nuclear power, or undersea communication transmission. if you are considering the use of our products for such purposes, please contact a renesas sales office beforehand. renesas shall have no liability for damages arising out of the uses set forth above. 8. notwithstanding the preceding paragraph, you should not use renesas products for the purposes listed below: (1) artificial life support devices or systems (2) surgical implantations (3) healthcare intervention (e.g., excision, administration of medication, etc.) (4) any other purposes that pose a direct threat to human life renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to use renesas products in any of the foregoing applications shall indemnify and hold harmless renesas technology corp., its affiliated companies and their officers, directors, and employees against any and all damages arising out of such applications. 9. you should use the products described herein within the range specified by renesas, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. renesas shall have no liability for malfunctions or damages arising out of the use of renesas products beyond such specified ranges. 10. although renesas endeavors to improve the quality and reliability of its products, ic products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. please be sure to implement safety measures to guard against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a renesas product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other applicable measures. among others, since the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you. 11. in case renesas products listed in this document are detached from the products to which the renesas products are attached or affixed, the risk of accident such as swallowing by infants and small children is very high. you should implement safety measures so that renesas products may not be easily detached from your products. renesas shall have no liability for damages arising out of such detachment. 12. this document may not be reproduced or duplicated, in any form, in whole or in part, without prior written approval from renesas. 13. please contact a renesas sales office if you have any questions regarding the information contained in this document, renesas semiconductor products, or if you have any other inquiries. notes regarding these materials
r01uh0198ej0500 rev. 5.00 page iii of lviii mar 18, 2011 general precautions in the handling of mpu/mcu products the following usage notes are applicable to all mpu/mcu products from renesas. for detailed usage notes on the products covered by this manual, refer to the relevant sections of the manual. if the descriptions under general precautions in the handling of mpu/mcu products and in the body of the manual differ from each other, the description in the body of the manual takes precedence. 1. handling of unused pins handle unused pins in accord with the directions given under handling of unused pins in the manual. ? the input pins of cmos products are generally in the high-impedance state. in operation with an unused pin in the open-circuit state, extra electromagnetic noise is induced in the vicinity of lsi, an associated shoot-through current flows internally, and malfunctions may occur due to the false recognition of the pin state as an input signal. unused pins should be handled as described under handling of unused pins in the manual. 2. processing at power-on the state of the product is undefined at the moment when power is supplied. ? the states of internal circuits in the lsi are indeterminate and the states of register settings and pins are undefined at the moment when power is supplied. in a finished product where the reset signal is applied to the external reset pin, the states of pins are not guaranteed from the moment when power is supplied until the reset process is completed. in a similar way, the states of pins in a product that is reset by an on-chip power-on reset function are not guaranteed from the moment when power is supplied until the power reaches the level at which resetting has been specified. 3. prohibition of access to reserved addresses access to reserved addresses is prohibited. ? the reserved addresses are provided for the possible future expansion of functions. do not access these addresses; the correct operation of lsi is not guaranteed if they are accessed. 4. clock signals after applying a reset, only release the reset line after the operating clock signal has become stable. when switching the clock signal during program execution, wait until the target clock signal has stabilized. ? when the clock signal is generated with an external resonator (or from an external oscillator) during a reset, ensure that the reset line is only released after full stabilization of the clock signal. moreover, when switching to a clock signal produced with an external resonator (or by an external oscillator) while program execution is in progress, wait until the target clock signal is stable. 5. differences between products before changing from one product to another, i.e. to one with a different type number, confirm that the change will not lead to problems. ? the characteristics of mpu/mcu in the same group but having different type numbers may differ because of the differences in internal memory capacity and layout pattern. when changing to products of different type numbers, implement a system-evaluation test for each of the products.
page iv of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 configuration of this manual this manual comprises the following items: 1. general precautions in the handling of mpu/mcu products 2. configuration of this manual 3. preface 4. contents 5. overview 6. description of functional modules ? cpu and system-control modules ? on-chip peripheral modules the configuration of the functional descrip tion of each module differs according to the module. however, the generic style includes the following items: i) feature ii) input/output pin iii) register description iv) operation v) usage note when designing an application system that includes this lsi, take notes into account. each section includes notes in relation to the descriptions given, and usage notes are given, as required, as the final part of each section. 7. list of registers 8. electrical characteristics 9. appendix 10. main revisions for this edition (only for revised versions) the list of revisions is a summary of points that have been revised or added to earlier versions. this does not include all of the revised contents. for details, see the actual locations in this manual. 11. index
r01uh0198ej0500 rev. 5.00 page v of lviii mar 18, 2011 preface the sh7083, sh7084, sh7085, and sh7086 group risc (reduced instruction set computer) microcomputers include a renesas original risc cpu as its core, and the peripheral functions required to configure a system. target users: this manual was written for user s who will be using the sh7083, sh7084, sh7085, and sh7086 group in the design of application systems. target users are expected to understand the fundamentals of electrical circuits, logical circuits, and microcomputers. objective: this manual was written to explain the hardware functions and electrical characteristics of the sh7083, sh7084, sh7085, and sh7086 group to the target users. refer to the sh-1/sh-2/sh-dsp software manual for a detailed description of the instruction set. notes on reading this manual: ? in order to understand the overall functions of the chip read the manual according to the contents. this manual can be roughly categorized into parts on the cpu, system control functions, peripher al functions and elect rical characteristics. ? in order to understand the details of the cpu's functions read the sh-1/sh-2/sh-dsp software manual. ? in order to understand the details of a register when its name is known read the index that is the final part of the manual to find the page number of the entry on the register. the addresses, bits, and initial values of the registers are summarized in section 27, list of registers. examples: register name: the following notatio n is used for cases when the same or a similar function, e.g. serial communication interface, is implemented on more than one channel: xxx_n (xxx is the register name and n is the channel number) bit order: the msb is on the left and the lsb is on the right. number notation: binary is b'xxxx, hexadecimal is h'xxxx, decimal is xxxx. signal notation: an overbar is added to a low-active signal: xxxx
page vi of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 related manuals: the latest versions of all related manuals are available from our web site. please ensure you have the latest versions of all documents you require. http://www.renesas.com/ sh7083, sh7084, sh7085, and sh7086 group manuals: document title document no. sh7080 group hardware manual this manual sh-1/sh-2/sh-dsp software manual rej09b0171 user's manuals for development tools: document title document no. superh tm risc engine c/c++ compiler, assembler, optimizing linkage editor compiler package v.9.04 user's manual rej10j2202 high-performance embedded workshop user's manual rej10j2169 application note: document title document no. superh risc engine c/c++ compiler package application note rej05b0463 all trademarks and registered trademarks are the property of their respective owners.
r01uh0198ej0500 rev. 5.00 page vii of lviii mar 18, 2011 contents section 1 overview................................................................................................1 1.1 features of sh7083, sh708 4, sh7085, an d sh7086........................................................... 1 1.2 block diagram.................................................................................................................. .... 7 1.3 pin assignments ................................................................................................................ ... 8 1.4 pin functions .................................................................................................................. .... 13 section 2 cpu......................................................................................................23 2.1 features....................................................................................................................... ........ 23 2.2 register configuration........................................................................................................ 2 4 2.2.1 general registers (rn)........................................................................................ 25 2.2.2 control registers ................................................................................................ 25 2.2.3 system registers................................................................................................. 27 2.2.4 initial values of registers................................................................................... 27 2.3 data formats................................................................................................................... .... 28 2.3.1 register data format .......................................................................................... 28 2.3.2 memory data formats ........................................................................................ 28 2.3.3 immediate data formats..................................................................................... 29 2.4 features of instructions....................................................................................................... 29 2.4.1 risc type .......................................................................................................... 29 2.4.2 addressing modes .............................................................................................. 32 2.4.3 instruction formats ............................................................................................. 35 2.5 instruction set ................................................................................................................ ..... 39 2.5.1 instruction set by type....................................................................................... 39 2.5.2 data transfer instructions................................................................................... 43 2.5.3 arithmetic operation instructions ...................................................................... 45 2.5.4 logic operation instructions .............................................................................. 47 2.5.5 shift instructions................................................................................................. 48 2.5.6 branch instructions ............................................................................................. 49 2.5.7 system control instructions................................................................................ 50 2.6 processing states.............................................................................................................. ... 52 section 3 mcu operating modes........................................................................55 3.1 selection of operating modes............................................................................................. 55 3.2 input/output pins.............................................................................................................. .. 56 3.3 operating modes................................................................................................................ .57 3.3.1 mode 0 (mcu exte nsion mode 0) ..................................................................... 57 3.3.2 mode 1 (mcu exte nsion mode 1) ..................................................................... 57
page viii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 3.3.3 mode 2 (mcu exte nsion mode 2) ..................................................................... 57 3.3.4 mode 3 (single chip mode) ............................................................................... 57 3.4 address map.................................................................................................................... ... 58 3.5 initial state in this lsi...................................................................................................... .65 3.6 note on changing op erating mode.................................................................................... 65 section 4 clock pulse generator (cpg) ............................................................. 67 4.1 features....................................................................................................................... ........ 67 4.2 input/output pins.............................................................................................................. .. 71 4.3 clock operating mode........................................................................................................ 72 4.4 register descriptions.......................................................................................................... 77 4.4.1 frequency control register (frqcr) ............................................................... 77 4.4.2 oscillation stop det ection control register (osccr) ...................................... 80 4.5 changing frequency........................................................................................................... 81 4.6 oscilla tor ..................................................................................................................... ....... 82 4.6.1 connecting crystal resonator ............................................................................ 82 4.6.2 external clock input method.............................................................................. 83 4.7 function for detecti ng oscillator stop ............................................................................... 84 4.8 usage notes .................................................................................................................... .... 85 4.8.1 note on crystal resonator .................................................................................. 85 4.8.2 notes on board design ....................................................................................... 85 section 5 exception handling ............................................................................. 87 5.1 overview ....................................................................................................................... ..... 87 5.1.1 types of exception handling and priority ......................................................... 87 5.1.2 exception handling operations .......................................................................... 88 5.1.3 exception handling v ector table....................................................................... 89 5.2 resets......................................................................................................................... ......... 91 5.2.1 types of resets................................................................................................... 91 5.2.2 power-on reset .................................................................................................. 91 5.2.3 manual reset ...................................................................................................... 92 5.3 address errors ................................................................................................................. ... 93 5.3.1 address error sources ........................................................................................ 93 5.3.2 address error exception source......................................................................... 94 5.4 interrupts..................................................................................................................... ........ 95 5.4.1 interrupt sources................................................................................................. 95 5.4.2 interrupt priority ................................................................................................. 96 5.4.3 interrupt exception handling ............................................................................. 96 5.5 exceptions triggered by instructions ................................................................................. 97 5.5.1 types of exceptions tri ggered by inst ructions .................................................. 97
r01uh0198ej0500 rev. 5.00 page ix of lviii mar 18, 2011 5.5.2 trap instructions ................................................................................................. 97 5.5.3 illegal slot instructions ....................................................................................... 98 5.5.4 general illegal instructions................................................................................. 98 5.6 cases when exceptions are accepted................................................................................ 99 5.7 stack states after ex ception handli ng ends ..................................................................... 100 5.8 usage notes .................................................................................................................... .. 102 5.8.1 value of stack pointer (sp) .............................................................................. 102 5.8.2 value of vector base register (vbr) .............................................................. 102 5.8.3 address errors caused by stacking fo r address error exception handling .... 102 5.8.4 notes on slot illegal instru ction exception handling....................................... 103 section 6 interrupt controller (intc) ...............................................................105 6.1 features....................................................................................................................... ...... 105 6.2 input/output pins.............................................................................................................. 107 6.3 register descriptions ........................................................................................................ 10 8 6.3.1 interrupt control register 0 (icr0).................................................................. 109 6.3.2 irq control register (irqcr) ........................................................................ 110 6.3.3 irq status register (irqsr)............................................................................. 113 6.3.4 interrupt priority registers a to f and h to m (ipra to iprf and iprh to iprm).................................................................. 118 6.4 interrupt sources.............................................................................................................. . 121 6.4.1 external interrupts ............................................................................................ 121 6.4.2 on-chip peripheral mo dule interrupts ............................................................. 122 6.4.3 user break interrupt ......................................................................................... 122 6.5 interrupt exception handling vector table...................................................................... 123 6.6 interrupt operation ........................................................................................................... 1 27 6.6.1 interrupt sequence ............................................................................................ 127 6.6.2 stack after interrupt exception handling ......................................................... 130 6.7 interrupt res ponse time................................................................................................... 130 6.8 data transfer with interrupt request signals ................................................................... 132 6.8.1 handling interrupt request signals as sources for dtc activation and cpu interrupts, but not dmac activation...................................................... 133 6.8.2 handling interrupt request signals as sources for dmac activation, but not cpu interrupts and dtc activation.................................................... 134 6.8.3 handling interrupt request signals as sources for dtc activation, but not cpu interrupts and dmac activation................................................ 134 6.8.4 handling interrupt request signals as sources for cpu interrupts, but not dtc and dmac activation ................................................................ 134 6.9 usage note..................................................................................................................... ... 134
page x of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 section 7 user break controller (ubc)............................................................ 135 7.1 features....................................................................................................................... ...... 135 7.2 input/output pins.............................................................................................................. 138 7.3 register descriptions........................................................................................................ 13 9 7.3.1 break address register a (bara) .................................................................. 140 7.3.2 break address mask register a (bamra)..................................................... 140 7.3.3 break bus cycle register a (bbra)............................................................... 141 7.3.4 break data register a (bdra) (only in f-ztat version)............................ 143 7.3.5 break data mask register a (bdm ra) (only in f-ztat version) .............. 144 7.3.6 break address register b (barb) .................................................................. 145 7.3.7 break address mask register b (bamrb) ..................................................... 146 7.3.8 break data register b (bdrb) (only in f-ztat version) ............................ 147 7.3.9 break data mask register b (bdm rb) (only in f-ztat version)............... 148 7.3.10 break bus cycle register b (bbrb) ............................................................... 149 7.3.11 break control register (brcr) ....................................................................... 151 7.3.12 execution times break register (b etr) (only in f-ztat version)............. 156 7.3.13 branch source register (brsr) (only in f-ztat version)........................... 157 7.3.14 branch destination register (brd r) (only in f-ztat version)................... 158 7.4 operation ...................................................................................................................... .... 159 7.4.1 flow of the user break operation .................................................................... 159 7.4.2 user break on instruction fetch cycle ............................................................. 160 7.4.3 user break on data access cycle .................................................................... 161 7.4.4 sequential break ............................................................................................... 162 7.4.5 value of saved program counter ..................................................................... 162 7.4.6 pc trace ........................................................................................................... 163 7.4.7 usage examples................................................................................................ 164 7.5 usage notes .................................................................................................................... .. 169 section 8 data transfer controller (dtc)........................................................ 171 8.1 features....................................................................................................................... ...... 171 8.2 register descriptions........................................................................................................ 17 3 8.2.1 dtc mode register a (mra) ......................................................................... 174 8.2.2 dtc mode register b (mrb).......................................................................... 175 8.2.3 dtc source address register (sar)............................................................... 177 8.2.4 dtc destination address register (dar)....................................................... 177 8.2.5 dtc transfer count register a (cra) ........................................................... 178 8.2.6 dtc transfer count re gister b (crb)............................................................ 179 8.2.7 dtc enable registers a to e (dtcera to dtcere) ................................... 180 8.2.8 dtc control register (dtccr) ...................................................................... 181 8.2.9 dtc vector base register (dtcvbr)............................................................ 183
r01uh0198ej0500 rev. 5.00 page xi of lviii mar 18, 2011 8.2.10 bus function extending register (bscehr) .................................................. 183 8.3 activation sources............................................................................................................ 1 84 8.4 location of transfer informat ion and dtc vector table ................................................ 184 8.5 operation ...................................................................................................................... .... 189 8.5.1 transfer information read skip function ........................................................ 194 8.5.2 transfer information write back skip function ................................................ 195 8.5.3 normal transfer mode ..................................................................................... 195 8.5.4 repeat transfer mode....................................................................................... 196 8.5.5 block transfer mode ........................................................................................ 198 8.5.6 chain transfer .................................................................................................. 199 8.5.7 operation timing.............................................................................................. 201 8.5.8 number of dtc execution cycles ................................................................... 204 8.5.9 dtc bus release timing ................................................................................. 206 8.5.10 dtc activation priority order ......................................................................... 209 8.6 dtc activation by interrupt............................................................................................. 210 8.7 examples of use of the dtc ............................................................................................ 211 8.7.1 normal transfer mode ..................................................................................... 211 8.7.2 chain transfer when counter = 0..................................................................... 211 8.8 interrupt sources.............................................................................................................. . 213 8.9 usage notes .................................................................................................................... .. 213 8.9.1 module standby mode setting ......................................................................... 213 8.9.2 on-chip ram .................................................................................................. 213 8.9.3 dtce bit setting.............................................................................................. 213 8.9.4 chain transfer .................................................................................................. 213 8.9.5 transfer information start address, source address, and destination address ............................................................................................................. 214 8.9.6 access to dmac or dtc registers through dtc........................................... 214 8.9.7 notes on irq interrupt as dtc activation source .......................................... 214 8.9.8 notes on sci and scif as dtc activation sources ........................................ 214 8.9.9 clearing interrupt source flag.......................................................................... 214 8.9.10 conflict between nmi interrupt and dtc activation ...................................... 215 8.9.11 operation when a dtc activation request is cancelled while in progress ... 215 section 9 bus state controller (bsc)................................................................217 9.1 features....................................................................................................................... ...... 217 9.2 input/output pins.............................................................................................................. 220 9.3 area overview.................................................................................................................. 222 9.3.1 area division.................................................................................................... 222 9.3.2 address map ..................................................................................................... 222 9.4 register descriptions ........................................................................................................ 24 1
page xii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 9.4.1 common control register (cmncr) .............................................................. 242 9.4.2 csn space bus control register (csnbcr) (n = 0 to 8) ................................. 244 9.4.3 csn space wait control register (csnwcr) (n = 0 to 8) .............................. 249 9.4.4 sdram control register (sdcr)................................................................... 272 9.4.5 refresh timer control/status register (rtcsr)............................................. 275 9.4.6 refresh timer count er (rtcnt)..................................................................... 277 9.4.7 refresh time constant register (rtcor) ...................................................... 278 9.4.8 bus function extending register (bscehr) .................................................. 279 9.5 operation ...................................................................................................................... .... 285 9.5.1 endian/access size and data alignment.......................................................... 285 9.5.2 normal space interface..................................................................................... 288 9.5.3 access wait control ......................................................................................... 294 9.5.4 csn assert period extension ............................................................................ 296 9.5.5 mpx-i/o interface............................................................................................ 297 9.5.6 sdram interface ............................................................................................. 301 9.5.7 burst rom (clock async hronous) in terface ................................................... 337 9.5.8 sram interface with byte selection................................................................ 339 9.5.9 pcmcia interface............................................................................................ 344 9.5.10 burst mpx-i/o interface .................................................................................. 351 9.5.11 burst rom (clock synchronous) interface...................................................... 356 9.5.12 wait between access cycles ............................................................................ 357 9.5.13 bus arbitration ................................................................................................. 370 9.5.14 others................................................................................................................ 376 9.5.15 access to on-chip flash and on-chip ram by cpu ................................. 378 9.5.16 access to on-chip periphera l i/o registers by cpu ....................................... 378 9.5.17 access to external memory by cpu ................................................................ 380 section 10 direct memory access controller (dmac)................................... 383 10.1 features....................................................................................................................... ...... 383 10.2 input/output pins.............................................................................................................. 385 10.3 register descriptions........................................................................................................ 38 6 10.3.1 dma source address registers_0 to _3 (sar_0 to sar_3) .......................... 387 10.3.2 dma destination address registers_0 to _3 (dar_0 to dar_3) ................. 388 10.3.3 dma transfer count registers_0 to _3 (dmatcr_0 to dmatcr_3) ........ 388 10.3.4 dma channel control registers_0 to _3 (chcr_0 to chcr_3)................... 389 10.3.5 dma operation register (dmaor) ............................................................... 394 10.3.6 bus function extending register (bscehr) .................................................. 396 10.4 operation ...................................................................................................................... .... 397 10.4.1 dma transfer flow ......................................................................................... 397 10.4.2 dma transfer requests ................................................................................... 399
r01uh0198ej0500 rev. 5.00 page xiii of lviii mar 18, 2011 10.4.3 channel priority................................................................................................ 402 10.4.4 dma transfer types........................................................................................ 406 10.4.5 number of bus cycle states a nd dreq pin sampling timing ....................... 415 10.4.6 operation timing.............................................................................................. 419 10.5 usage notes .................................................................................................................... .. 421 10.5.1 notes on output from dack pin..................................................................... 421 10.5.2 dma transfer by peripheral modules ............................................................. 421 10.5.3 module standby mode setting ......................................................................... 421 10.5.4 access to dmac and dtc registers through dmac .................................... 422 10.5.5 note on sci as dmac activation source ....................................................... 422 10.5.6 chcr setting ................................................................................................... 422 10.5.7 note on multiple channel activation ............................................................... 422 10.5.8 note on transfer request input ........................................................................ 422 10.5.9 conflict between nmi interrupt and dmac activation .................................. 422 10.5.10 notes on using peripheral module request modes ......................................... 423 10.5.11 number of cycles per access to on-chip ram by dmac ............................ 426 10.5.12 note on dmac transfer in burst mode when activation source is mtu2 ... 426 10.5.13 bus function extending register (bscehr) .................................................. 426 section 11 multi-function timer pulse unit 2 (mtu2) ...................................427 11.1 features....................................................................................................................... ...... 427 11.2 input/output pins.............................................................................................................. 433 11.3 register descriptions ........................................................................................................ 43 4 11.3.1 timer control register (tcr).......................................................................... 438 11.3.2 timer mode register (tmdr) ......................................................................... 442 11.3.3 timer i/o control register (tior) .................................................................. 445 11.3.4 timer compare match clear register (tcntcmpclr) ................................ 464 11.3.5 timer interrupt enable register (tier) ........................................................... 465 11.3.6 timer status register (tsr)............................................................................. 470 11.3.7 timer buffer operation transfer mode register (tbtm)............................... 478 11.3.8 timer input capture control register (ticcr) ............................................... 479 11.3.9 timer synchronous clear register (tsycr)................................................... 481 11.3.10 timer a/d converter start request control register (tadcr) ..................... 483 11.3.11 timer a/d converter start request cycle set registers (tadcora_4 and tadcorb_4).................................................................. 486 11.3.12 timer a/d converter start request cycle set buffer registers (tadcobra_4 and tadcobrb_4)............................................................. 486 11.3.13 timer counter (tcnt)..................................................................................... 487 11.3.14 timer general register (tgr) ......................................................................... 487 11.3.15 timer start register (tstr)............................................................................. 488
page xiv of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 11.3.16 timer synchronous register (tsyr)............................................................... 490 11.3.17 timer counter synchronous st art register (tcsystr) ................................. 492 11.3.18 timer read/write enable register (trwer) ................................................. 495 11.3.19 timer output master enable register (toer) ................................................ 496 11.3.20 timer output control re gister 1 (tocr1) ...................................................... 497 11.3.21 timer output control re gister 2 (tocr2) ...................................................... 500 11.3.22 timer output level buffer register (tolbr) ................................................ 503 11.3.23 timer gate control register (tgcr) .............................................................. 504 11.3.24 timer subcounter (tcnts) ............................................................................. 506 11.3.25 timer dead time data register (tddr)......................................................... 507 11.3.26 timer cycle data register (tcdr) ................................................................. 507 11.3.27 timer cycle buffer register (tcbr)............................................................... 508 11.3.28 timer interrupt skipping set register (titcr) ............................................... 508 11.3.29 timer interrupt skipping counter (titcnt)................................................... 510 11.3.30 timer buffer transfer set register (tbter) .................................................. 511 11.3.31 timer dead time enable register (tder)...................................................... 513 11.3.32 timer waveform control register (twcr) .................................................... 514 11.3.33 bus master interface......................................................................................... 516 11.4 operation ...................................................................................................................... .... 517 11.4.1 basic functions................................................................................................. 517 11.4.2 synchronous op eration..................................................................................... 523 11.4.3 buffer operation............................................................................................... 525 11.4.4 cascaded operation .......................................................................................... 529 11.4.5 pwm modes ..................................................................................................... 534 11.4.6 phase counting mode....................................................................................... 539 11.4.7 reset-synchronized pwm mode...................................................................... 546 11.4.8 complementary pwm mode............................................................................ 549 11.4.9 a/d converter start reque st delaying function.............................................. 593 11.4.10 mtu2?mtu2s synchronous operation.......................................................... 597 11.4.11 external pulse width measurement.................................................................. 603 11.4.12 dead time compensation................................................................................. 604 11.4.13 tcnt capture at crest and/or trough in complementary pwm operation ... 606 11.5 interrupt sources.............................................................................................................. . 607 11.5.1 interrupt sources and priorities......................................................................... 607 11.5.2 dtc/dmac activation ................................................................................... 609 11.5.3 a/d converter activation................................................................................. 610 11.6 operation timing.............................................................................................................. 6 12 11.6.1 input/output timing ......................................................................................... 612 11.6.2 interrupt signal timing .................................................................................... 619 11.7 usage notes .................................................................................................................... .. 624
r01uh0198ej0500 rev. 5.00 page xv of lviii mar 18, 2011 11.7.1 module standby mode setting ......................................................................... 624 11.7.2 input clock re strictions ................................................................................... 624 11.7.3 caution on period setting ................................................................................. 625 11.7.4 contention between tcnt write and clear operations.................................. 625 11.7.5 contention between tcnt write and increment operations........................... 626 11.7.6 contention between tgr write and compare match ...................................... 627 11.7.7 contention between buffer regist er write and compare match ..................... 628 11.7.8 contention between buffer register write and tcnt clear ........................... 629 11.7.9 contention between tgr read and input capture........................................... 630 11.7.10 contention between tgr write and input capture.......................................... 631 11.7.11 contention between buffer regist er write and input capture ......................... 632 11.7.12 tcnt_2 write and overflow/underflow contention in cascade connection...................................................................................... 632 11.7.13 counter value during comple mentary pwm mode stop ................................ 634 11.7.14 buffer operation setting in complementary pwm mode ............................... 634 11.7.15 reset sync pwm mode buffer operation and compare match flag .............. 635 11.7.16 overflow flags in reset synchronous pwm mode ......................................... 636 11.7.17 contention between overflow/underflow and counter clearing..................... 637 11.7.18 contention between tcnt write and overflow/underflow............................ 638 11.7.19 cautions on transition from normal operation or pwm mode 1 to reset-synchronized pwm mode...................................................................... 638 11.7.20 output level in complementary pwm mode and reset-synchronized pwm mode....................................................................................................... 639 11.7.21 interrupts in m odule standby mode ................................................................. 639 11.7.22 simultaneous capture of tcnt_1 and tcnt_2 in cascade connection........ 639 11.7.23 notes on output waveform control during synchronous counter clearing in complementary pwm mode ......................................................... 640 11.8 mtu2 output pin initialization........................................................................................ 642 11.8.1 operating modes............................................................................................... 642 11.8.2 reset start operation ........................................................................................ 642 11.8.3 operation in case of re-setting due to error during operation, etc............... 643 11.8.4 overview of initialization procedures and mode transitions in case of error during operation, etc. .............................................................................. 644 section 12 multi-function t imer pulse unit 2s (mtu2s)...............................675 12.1 input/output pins.............................................................................................................. 679 12.2 register descriptions ........................................................................................................ 68 0 section 13 port output enable (poe) ...............................................................683 13.1 features....................................................................................................................... ...... 683
page xvi of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 13.2 input/output pins.............................................................................................................. 685 13.3 register descriptions........................................................................................................ 68 7 13.3.1 input level control/statu s register 1 (icsr1) ................................................ 688 13.3.2 output level control/statu s register 1 (ocsr1) ............................................ 692 13.3.3 input level control/statu s register 2 (icsr2) ................................................ 693 13.3.4 output level control/statu s register 2 (ocsr2) ............................................ 697 13.3.5 input level control/statu s register 3 (icsr3) ................................................ 698 13.3.6 software port output enab le register (spoer) .............................................. 700 13.3.7 port output enable contro l register 1 (poecr1)........................................... 701 13.3.8 port output enable contro l register 2 (poecr2)........................................... 703 13.4 operation ...................................................................................................................... .... 709 13.4.1 input level detec tion operation....................................................................... 711 13.4.2 output-level compare operation .................................................................... 712 13.4.3 release from high-impedance state................................................................. 713 13.5 interrupts..................................................................................................................... ...... 714 13.6 usage note..................................................................................................................... ... 715 13.6.1 pin state when a power-on reset is issued from the watchdog timer........... 715 section 14 watchdog timer (wdt) ................................................................. 717 14.1 features....................................................................................................................... ...... 717 14.2 input/output pin for wdt................................................................................................ 719 14.3 register descriptions........................................................................................................ 72 0 14.3.1 watchdog timer coun ter (wtcnt)................................................................ 720 14.3.2 watchdog timer control/statu s register (wtcsr)........................................ 721 14.3.3 notes on register access.................................................................................. 723 14.4 operation ...................................................................................................................... .... 724 14.4.1 revoking software standbys............................................................................ 724 14.4.2 using watchdog ti mer mode .......................................................................... 724 14.4.3 using interval timer mode .............................................................................. 725 14.5 interrupt source ............................................................................................................... . 726 14.6 usage note..................................................................................................................... ... 726 14.6.1 wtcnt setting value ..................................................................................... 726 section 15 serial communication interface (sci)............................................ 727 15.1 features....................................................................................................................... ...... 727 15.2 input/output pins.............................................................................................................. 729 15.3 register descriptions........................................................................................................ 73 0 15.3.1 receive shift register (scrsr)....................................................................... 731 15.3.2 receive data register (scrdr) ...................................................................... 731 15.3.3 transmit shift regi ster (sctsr) ..................................................................... 731
r01uh0198ej0500 rev. 5.00 page xvii of lviii mar 18, 2011 15.3.4 transmit data register (sctdr)..................................................................... 732 15.3.5 serial mode register (scsmr)........................................................................ 732 15.3.6 serial control regi ster (scscr)...................................................................... 735 15.3.7 serial status regi ster (scssr)......................................................................... 738 15.3.8 serial port regi ster (scsptr) ......................................................................... 744 15.3.9 serial direction contro l register (scsdcr)................................................... 746 15.3.10 bit rate register (scbrr)............................................................................... 747 15.4 operation ...................................................................................................................... .... 758 15.4.1 overview........................................................................................................... 758 15.4.2 operation in async hronous mode .................................................................... 760 15.4.3 clock synchro nous mo de................................................................................. 770 15.4.4 multiprocessor communication function......................................................... 779 15.4.5 multiprocessor serial da ta transmission ......................................................... 781 15.4.6 multiprocessor serial data reception .............................................................. 782 15.5 sci interrupt sources and dmac/dtc ........................................................................... 785 15.6 serial port register (s csptr) and sci pins ................................................................... 786 15.7 usage notes .................................................................................................................... .. 788 15.7.1 sctdr writing and tdre flag ...................................................................... 788 15.7.2 multiple receive error occurrence .................................................................. 788 15.7.3 break detection and processing ....................................................................... 789 15.7.4 sending a break signal..................................................................................... 789 15.7.5 receive data sampling timing and recei ve margin (asynchronous mode) .. 789 15.7.6 note on using dmac or dtc ......................................................................... 791 15.7.7 note on using external clock in clock synchr onous m ode............................ 791 15.7.8 module standby mode setting ......................................................................... 791 section 16 serial communication interface with fifo (scif) ........................793 16.1 features....................................................................................................................... ...... 793 16.2 input/output pins.............................................................................................................. 795 16.3 register descriptions ........................................................................................................ 79 6 16.3.1 receive shift register (scrsr)....................................................................... 796 16.3.2 receive fifo data register (scfrdr) .......................................................... 797 16.3.3 transmit shift regi ster (sctsr) ..................................................................... 797 16.3.4 transmit fifo data register (scftdr) ......................................................... 798 16.3.5 serial mode register (scsmr)........................................................................ 798 16.3.6 serial control regi ster (scscr)...................................................................... 801 16.3.7 serial status regi ster (scfsr)......................................................................... 806 16.3.8 bit rate register (scbrr)............................................................................... 814 16.3.9 fifo control register (scfcr) ...................................................................... 825 16.3.10 fifo data count register (scfdr) ................................................................ 828
page xviii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 16.3.11 serial port regi ster (scsptr) ......................................................................... 829 16.3.12 line status regi ster (sclsr) .......................................................................... 832 16.4 operation ...................................................................................................................... .... 833 16.4.1 overview........................................................................................................... 833 16.4.2 operation in async hronous mode .................................................................... 835 16.4.3 clock synchro nous mo de................................................................................. 846 16.5 scif interrupt sources and dtc...................................................................................... 854 16.6 serial port register (s csptr) and scif pins ................................................................. 855 16.7 usage notes .................................................................................................................... .. 858 16.7.1 scftdr writing and tdfe flag .................................................................... 858 16.7.2 scfrdr reading and rdf flag ..................................................................... 858 16.7.3 break detection and processing ....................................................................... 859 16.7.4 sending a break signal..................................................................................... 859 16.7.5 receive data sampling timing and recei ve margin (asynchronous mode) .. 859 16.7.6 module standby mode setting ......................................................................... 861 16.7.7 note on using dtc .......................................................................................... 861 16.7.8 fer flag and per flag of serial status register (scfsr)............................. 861 section 17 synchronous serial communication unit (ssu) ............................ 863 17.1 features....................................................................................................................... ...... 863 17.2 input/output pins.............................................................................................................. 865 17.3 register descriptions........................................................................................................ 86 6 17.3.1 ss control register h (sscrh) ...................................................................... 867 17.3.2 ss control register l (sscrl) ....................................................................... 869 17.3.3 ss mode register (ssmr) ............................................................................... 870 17.3.4 ss enable register (sser) .............................................................................. 871 17.3.5 ss status regist er (sssr) ................................................................................ 873 17.3.6 ss control register 2 (sscr2) ........................................................................ 876 17.3.7 ss transmit data registers 0 to 3 (sstdr0 to sstdr3)............................... 877 17.3.8 ss receive data registers 0 to 3 (ssrdr0 to ssrdr3)................................ 878 17.3.9 ss shift register (sstrsr)............................................................................. 879 17.4 operation ...................................................................................................................... .... 880 17.4.1 transfer clock .................................................................................................. 880 17.4.2 relationship of clock phase, polarity, and data .............................................. 880 17.4.3 relationship between data input/out put pins and shift register .................... 881 17.4.4 communication modes a nd pin functions ....................................................... 883 17.4.5 ssu mode......................................................................................................... 885 17.4.6 scs pin control and conflict error.................................................................. 894 17.4.7 clock synchronous co mmunication mode ...................................................... 896 17.5 ssu interrupt sources and dtc....................................................................................... 902
r01uh0198ej0500 rev. 5.00 page xix of lviii mar 18, 2011 17.6 usage notes .................................................................................................................... .. 903 17.6.1 module standby mode setting ......................................................................... 903 17.6.2 access to sstdr and ssrdr registers.......................................................... 903 17.6.3 continuous transmission/reception in ssu slave mode ................................ 903 17.6.4 note for reception operations in ssu slave mode ......................................... 903 17.6.5 note on master transmission and master reception operations in ssu mode..................................................................................................... 904 17.6.6 note on dtc transfers..................................................................................... 904 section 18 i 2 c bus interface 2 (i 2 c2) ................................................................905 18.1 features....................................................................................................................... ...... 905 18.2 input/output pins.............................................................................................................. 908 18.3 register descriptions ........................................................................................................ 90 9 18.3.1 i 2 c bus control regi ster 1 (i ccr1) ................................................................. 909 18.3.2 i 2 c bus control regi ster 2 (i ccr2) ................................................................. 912 18.3.3 i 2 c bus mode register (icmr)........................................................................ 914 18.3.4 i 2 c bus interrupt enable register (icier) ....................................................... 916 18.3.5 i 2 c bus status register (icsr)......................................................................... 918 18.3.6 i 2 c bus slave address register (sar)............................................................. 921 18.3.7 i 2 c bus transmit data register (icdrt)......................................................... 922 18.3.8 i 2 c bus receive data register (icdrr) .......................................................... 922 18.3.9 i 2 c bus shift register (icdrs)........................................................................ 922 18.3.10 nf2cyc register (nf2cyc) .......................................................................... 923 18.4 operation ...................................................................................................................... .... 924 18.4.1 i 2 c bus format.................................................................................................. 924 18.4.2 master transmit operation ............................................................................... 925 18.4.3 master receive operation................................................................................. 927 18.4.4 slave transmit operation ................................................................................. 930 18.4.5 slave receive operation................................................................................... 933 18.4.6 clock synchronous serial format .................................................................... 934 18.4.7 noise f ilter ....................................................................................................... 938 18.4.8 using the iicrst bit to reset i 2 c bus interface 2 .......................................... 939 18.4.9 example of use................................................................................................. 940 18.5 i 2 c2 interrupt sources....................................................................................................... 944 18.6 operation using the dtc ................................................................................................. 945 18.7 bit synchronous circuit.................................................................................................... 946 18.8 usage note..................................................................................................................... ... 947 18.8.1 module standby mode setting ......................................................................... 947 18.8.2 issuance of stop condition and repeated start condition ............................... 947 18.8.3 issuance of a start condition and stop condition in sequence ........................ 947
page xx of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 18.8.4 settings for multi-master operation................................................................. 947 18.8.5 reading icdrr in master receive mode........................................................ 947 18.8.6 access to ice and iicrst bits during i 2 c bus operations ............................. 948 18.8.7 using the iicrst bit to in itialize the re gisters............................................... 949 18.8.8 operation of i 2 c bus interface 2 while ice = 0 ............................................... 949 section 19 a/d converter (adc) ..................................................................... 951 19.1 features....................................................................................................................... ...... 951 19.2 input/output pins.............................................................................................................. 953 19.3 register descriptions........................................................................................................ 95 4 19.3.1 a/d data registers 0 to 15 (addr0 to addr15) .......................................... 955 19.3.2 a/d control/status registers_0 to _2 (adcsr_0 to adcsr_2).................... 956 19.3.3 a/d control registers_0 to _2 (adcr_0 to adcr_2)................................... 959 19.3.4 a/d trigger select registers_0 and _1 (adtsr_0 and adtsr_1) ............... 962 19.4 operation ...................................................................................................................... .... 968 19.4.1 single mode...................................................................................................... 968 19.4.2 continuous s can mode..................................................................................... 968 19.4.3 single-cycle scan mode................................................................................... 969 19.4.4 input sampling and a/ d conversi on time ...................................................... 969 19.4.5 a/d converter activation by mtu2 or mtu2s.............................................. 972 19.4.6 external trigger input ti ming.......................................................................... 972 19.4.7 2-channel scanning.......................................................................................... 973 19.5 interrupt sources and dmac and dtc transfer requests.............................................. 974 19.6 definitions of a/d c onversion accuracy......................................................................... 975 19.7 usage notes .................................................................................................................... .. 978 19.7.1 module standby mode setting ......................................................................... 978 19.7.2 permissible signal s ource impedance .............................................................. 978 19.7.3 influences on absolute accuracy ..................................................................... 978 19.7.4 range of analog power supp ly and other pin settings................................... 979 19.7.5 notes on board design ..................................................................................... 979 19.7.6 notes on noise c ountermeasures ..................................................................... 980 section 20 compare match timer (cmt) ........................................................ 981 20.1 features....................................................................................................................... ...... 981 20.2 register descriptions........................................................................................................ 98 2 20.2.1 compare match timer start register (cmstr) .............................................. 983 20.2.2 compare match timer control/status register (cmcsr) .............................. 983 20.2.3 compare match counter (cmcnt) ................................................................. 985 20.2.4 compare match constant register (cmcor) ................................................. 985 20.3 operation ...................................................................................................................... .... 986
r01uh0198ej0500 rev. 5.00 page xxi of lviii mar 18, 2011 20.3.1 interval count operation .................................................................................. 986 20.3.2 cmcnt count timing..................................................................................... 986 20.4 interrupts..................................................................................................................... ...... 987 20.4.1 cmt interrupt sources and dtc activation.................................................... 987 20.4.2 timing of setting compare match flag ........................................................... 988 20.4.3 timing of clearing compare match flag......................................................... 988 20.5 usage notes .................................................................................................................... .. 989 20.5.1 module standby mode setting ......................................................................... 989 20.5.2 conflict between write and compare-match processes of cmcnt ............... 989 20.5.3 conflict between word-write and count-up processes of cmcnt ............... 990 20.5.4 conflict between byte-write and count-up processes of cmcnt................. 991 20.5.5 compare match between cmcnt and cmcor ............................................. 991 section 21 pin function controller (pfc).........................................................993 21.1 register desc ripti ons ...................................................................................................... 1046 21.1.1 port a i/o register l, h (paiorl, paiorh) .............................................. 1048 21.1.2 port a control registers l1 to l4, h1 to h4 (pacrl1 to pacrl4, pacrh1 to pacrh4).............................................. 1049 21.1.3 port b i/o regist er l (pbiorl) .................................................................... 1087 21.1.4 port b control registers l1 to l3 (pbcrl1 to pbcrl3 ) ........................... 1087 21.1.5 port c i/o registers l, h (pciorl, pciorh) ............................................. 1097 21.1.6 port c control registers l1 to l4, h1 to h3 (pccrl1 to pccrl4, pc crh1 to pccrh3) .............................................. 1098 21.1.7 port d i/o registers l, h (pdiorl, pdiorh)............................................. 1112 21.1.8 port d control registers l1 to l4, h1 to h4 (pdcrl1 to pdcrl4, pdcrh1 to pdcrh4).............................................. 1113 21.1.9 port e i/o registers l, h (peiorl, peiorh) .............................................. 1133 21.1.10 port e control registers l1 to l4, h1, h2 (pecrl1 to pecrl4 , pecrh1, pecrh2) .................................................. 1134 21.1.11 high-current port contro l register (hcpcr) ............................................... 1165 21.1.12 irqout function control register (ifcr) .................................................. 1167 21.2 usage notes .................................................................................................................... 1168 section 22 i/o ports .........................................................................................1169 22.1 port a......................................................................................................................... ..... 1170 22.1.1 register desc ripti ons ...................................................................................... 1174 22.1.2 port a data registers h and l (padrh and padrl).................................. 1174 22.1.3 port a port registers h and l (paprh and paprl) .................................... 1180 22.2 port b ......................................................................................................................... ..... 1185 22.2.1 register desc ripti ons ...................................................................................... 1186
page xxii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 22.2.2 port b data regist er l (pbd rl) ................................................................... 1186 22.2.3 port b port regist er l (pbp rl)..................................................................... 1189 22.3 port c......................................................................................................................... ..... 1191 22.3.1 register desc ripti ons ...................................................................................... 1193 22.3.2 port c data registers h and l (pcdrh and pcdrl) .................................. 1193 22.3.3 port c port registers h a nd l (pcprh a nd pcprl)..................................... 1196 22.4 port d......................................................................................................................... ..... 1199 22.4.1 register desc ripti ons ...................................................................................... 1201 22.4.2 port d data registers h and l (pddrh and pddrl).................................. 1201 22.4.3 port d port registers h and l (pdprh and pdprl).................................... 1204 22.5 port e ......................................................................................................................... ..... 1207 22.5.1 register desc ripti ons ...................................................................................... 1211 22.5.2 port e data registers h and l (pedrh and pedrl) ................................... 1211 22.5.3 port e port registers h a nd l (peprh a nd peprl) ..................................... 1215 22.6 port f ......................................................................................................................... ..... 1219 22.6.1 register desc ripti ons ...................................................................................... 1220 22.6.2 port f data regist er l (pfdrl) .................................................................... 1220 section 23 flash memory................................................................................ 1223 23.1 features....................................................................................................................... .... 1223 23.2 overview ....................................................................................................................... . 1225 23.2.1 block diagram................................................................................................ 1225 23.2.2 operating mode .............................................................................................. 1226 23.2.3 mode comp arison........................................................................................... 1228 23.2.4 flash memory c onfigura tion.......................................................................... 1229 23.2.5 block divi sion ................................................................................................ 1230 23.2.6 programming/erasi ng interf ace ...................................................................... 1231 23.3 input/output pins............................................................................................................ 12 33 23.4 register desc ripti ons...................................................................................................... 1233 23.4.1 register s ......................................................................................................... 1233 23.4.2 programming/erasing inte rface registers ...................................................... 1236 23.4.3 programming/erasing inte rface parameters ................................................... 1243 23.4.4 ram emulation regi ster (ramer).............................................................. 1258 23.5 on-board progra mming mode ....................................................................................... 1260 23.5.1 boot m ode ...................................................................................................... 1260 23.5.2 user program mode........................................................................................ 1264 23.5.3 user boot mode.............................................................................................. 1274 23.6 protection..................................................................................................................... ... 1279 23.6.1 hardware protection ....................................................................................... 1279 23.6.2 software protection......................................................................................... 1280
r01uh0198ej0500 rev. 5.00 page xxiii of lviii mar 18, 2011 23.6.3 error protection............................................................................................... 1280 23.7 flash memory emul ation in ram ................................................................................. 1282 23.8 usage notes .................................................................................................................... 1285 23.8.1 switching between user mat and user boot mat...................................... 1285 23.8.2 interrupts during pr ogramming/e rasing ......................................................... 1286 23.8.3 other notes ..................................................................................................... 1289 23.9 supplementary in formation ............................................................................................ 1291 23.9.1 specifications of the standard serial communications interface in boot mode .................................................................................................. 1291 23.9.2 areas for storage of the procedural program and data for programming...... 1321 23.10 programmer mode .......................................................................................................... 1329 section 24 mask rom.....................................................................................1331 24.1 usage notes .................................................................................................................... 1332 24.1.1 module standby mode setting ....................................................................... 1332 section 25 ram ..............................................................................................1333 25.1 usage notes .................................................................................................................... 1334 25.1.1 module standby mode setting ....................................................................... 1334 25.1.2 address error.................................................................................................. 1334 25.1.3 initial values in ram..................................................................................... 1334 section 26 power-down modes ......................................................................1335 26.1 features....................................................................................................................... .... 1335 26.1.1 types of power-down modes ........................................................................ 1335 26.2 input/output pins............................................................................................................ 13 37 26.3 register desc ripti ons ...................................................................................................... 1338 26.3.1 standby control regist er 1 (stb cr1) ........................................................... 1338 26.3.2 standby control regist er 2 (stb cr2) ........................................................... 1339 26.3.3 standby control regist er 3 (stb cr3) ........................................................... 1340 26.3.4 standby control regist er 4 (stb cr4) ........................................................... 1341 26.3.5 standby control regist er 5 (stb cr5) ........................................................... 1343 26.3.6 standby control regist er 6 (stb cr6) ........................................................... 1344 26.3.7 ram control register (ramcr) .................................................................. 1345 26.4 sleep mode ..................................................................................................................... 1346 26.4.1 transition to sleep mode................................................................................ 1346 26.4.2 canceling sl eep mode .................................................................................... 1346 26.5 software st andby m ode.................................................................................................. 1347 26.5.1 transition to softwa re standby mode ............................................................ 1347 26.5.2 canceling software standby mode................................................................. 1348
page xxiv of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 26.6 deep software standby mode ........................................................................................ 1349 26.6.1 transition to deep so ftware sta ndby mode ................................................... 1349 26.6.2 canceling deep soft ware sta ndby mode ....................................................... 1349 26.7 module standb y mode.................................................................................................... 1350 26.7.1 transition to module standby mode .............................................................. 1350 26.7.2 canceling module st andby function.............................................................. 1350 26.8 usage note..................................................................................................................... . 1351 26.8.1 current consumption while waiting fo r oscillation to be stabilized............ 1351 26.8.2 executing the sleep instruction ................................................................... 1351 section 27 list of registers............................................................................. 1353 27.1 register address table (in the order from lower addresses) ...................................... 1354 27.2 register bit list .............................................................................................................. 1369 27.3 register states in e ach operati ng mode ........................................................................ 1397 section 28 electrical characteristics ............................................................... 1411 28.1 absolute maxi mum rati ngs ........................................................................................... 1411 28.2 dc character istics .......................................................................................................... 141 2 28.3 ac character istics .......................................................................................................... 141 9 28.3.1 clock ti ming .................................................................................................. 1420 28.3.2 control signa l timing .................................................................................... 1423 28.3.3 ac bus timing............................................................................................... 1426 28.3.4 direct memory access controller (dmac) timing...................................... 1463 28.3.5 multi function timer pulse unit 2 (mtu2) timing...................................... 1464 28.3.6 multi function timer pulse un it 2s (mtu2s) timing ................................. 1466 28.3.7 i/o port timing............................................................................................... 1467 28.3.8 watchdog timer (w dt) timi ng.................................................................... 1468 28.3.9 serial communication inte rface (sci) timing............................................... 1469 28.3.10 serial communication interface with fifo (scif) timing ........................... 1471 28.3.11 synchronous serial communi cation unit (ssu ) timing ............................... 1473 28.3.12 port output enable (poe) timing.................................................................. 1476 28.3.13 i 2 c bus interface 2 (i 2 c2) timi ng................................................................... 1477 28.3.14 ubc trigger timing ...................................................................................... 1479 28.3.15 a/d converter timing.................................................................................... 1480 28.3.16 ac characteristics measurement conditions ................................................. 1481 28.4 a/d converter characteristics........................................................................................ 1482 28.5 flash memory characteristics ........................................................................................ 1483 28.6 usage note..................................................................................................................... . 1484 28.6.1 notes on connecting v cl capacitor................................................................ 1484
r01uh0198ej0500 rev. 5.00 page xxv of lviii mar 18, 2011 appendix............................................................................................................1485 a. pin states ..................................................................................................................... ... 1485 b. processing of u nused pi ns.............................................................................................. 1515 c. pin states of bus related signals ................................................................................... 1516 d. product code lineup ...................................................................................................... 1540 e. package dime nsions ....................................................................................................... 1542 main revisions for this edition........................................................................1547 index .................................................................................................................1559
page xxvi of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011
r01uh0198ej0500 rev. 5.00 page xxvii of lviii mar 18, 2011 figures section 1 overview figure 1.1 block diagram ....................................................................................................... ..... 7 figure 1.2 pin assignments of sh7083 (tq fp1414-10 0) ........................................................... 8 figure 1.3 pin assignm ents of sh7084........................................................................................ 9 figure 1.4 pin assignm ents of sh7085...................................................................................... 10 figure 1.5 pin assignm ents of sh7086...................................................................................... 11 figure 1.6 pin assignments of sh7083 (p -lfbga-112) .......................................................... 12 section 2 cpu figure 2.1 cpu internal register configuration ........................................................................ 24 figure 2.2 register data format ................................................................................................ 28 figure 2.3 memory data format ................................................................................................ 28 figure 2.4 transitions between processing states...................................................................... 52 section 3 mcu operating modes figure 3.1 address map for each operating mode in sh7083 (256-kbyte flash me mory version)................................................................................... 58 figure 3.2 address map for each operating mode in sh7083 (512-kbyte flash me mory version)................................................................................... 59 figure 3.3 address map for each operating mode in sh7084 (256-kbyte flash me mory version)................................................................................... 60 figure 3.4 address map for each operating mode in sh7084 (512-kbyte flash me mory version)................................................................................... 61 figure 3.5 address map for each operating mode in sh7085 (256-kbyte flash me mory version)................................................................................... 62 figure 3.6 address map for each operating mode in sh7085 (512-kbyte flash me mory version)................................................................................... 63 figure 3.7 address map for each operating mode in sh7086.................................................. 64 figure 3.8 reset input timing wh en changing oper ating mode............................................... 65 section 4 clock pulse generator (cpg) figure 4.1 block diagram of clock pulse generator ................................................................. 68 figure 4.2 connection of crystal resonator (example)............................................................. 82 figure 4.3 crystal resonator equivalent circuit........................................................................ 82 figure 4.4 example of external clock connection .................................................................... 83 figure 4.5 cautions for oscilla tor circuit board design ........................................................... 85 figure 4.6 recommended external circuitry around pll ......................................................... 86
page xxviii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 section 6 interr upt controller (intc) figure 6.1 block diagram of intc.......................................................................................... 106 figure 6.2 block diagram of irq7 to irq0 interrupts control............................................... 122 figure 6.3 interrupt sequence flowchart ................................................................................. 129 figure 6.4 stack after interr upt exception handling................................................................ 130 figure 6.5 irq interrupt control block diagram .................................................................... 132 figure 6.6 on-chip module interr upt control bloc k diagram................................................ 133 section 7 user b reak controller (ubc) figure 7.1 block diagram of ubc........................................................................................... 137 section 8 data transfer controller (dtc) figure 8.1 block diagram of dtc........................................................................................... 172 figure 8.2 transfer information on data area ......................................................................... 185 figure 8.3 correspondence between dtc vector address and transfer information............. 185 figure 8.4 flowchart of dtc operation .................................................................................. 190 figure 8.5 transfer information read skip timing (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip peripheral module to on-chip ram; transfer information is written in 3 states)..................................................................... 194 figure 8.6 memory map in normal transfer mode................................................................. 196 figure 8.7 memory map in repeat transfer mode (when transfer source is specified as repeat area)....................................................... 197 figure 8.8 memory map in block transfer mode (when transfer destination is specified as block area) ................................................. 199 figure 8.9 operation of chain transfer ................................................................................... 200 figure 8.10 example of dtc operation timing: normal transfer mode or repeat transfer mode (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip peripheral module to on-chip ram; transfer information is written in 3 cycles).................................................................... 201 figure 8.11 example of dtc operation timing: block transfer mode with block size = 2 (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip peripheral module to on-chip ram; transfer information is written in 3 cycles).................................................................... 201 figure 8.12 example of dtc operation timing: chain transfer (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip peripheral module to on-chip ram; transfer information is written in 3 cycles).................................................................... 202
r01uh0198ej0500 rev. 5.00 page xxix of lviii mar 18, 2011 figure 8.13 example of dtc operation timing: normal or repeat transfer in short address mode (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip peripheral module to on-chip ram; transfer inform ation is written in 3 cycles)...................................... 202 figure 8.14 example of dtc operation timing: normal or repeat transfer with dtpr = 1 (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip peripheral module to on-chip ram; transfer information is written in 3 cycles).................................................................... 203 figure 8.15 example of dtc operation timing: normal or repeat transfer (activated by irq; i : b : p = 1: 1/2: 1/2; data transferred from on-chip peripheral module to on-chip ram; transf er information is written in 3 cycles) ....... 203 figure 8.16 example of dtc operation timing: conflict of two activation requests in normal transfer mode (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip peripheral module to on-chip ram; transfer info rmation is written in 3 cycles)..................................... 208 figure 8.17 example of dtc activati on in accordance with priority ...................................... 209 figure 8.18 activation of dtc by interrupt............................................................................... 210 figure 8.19 chain transfer when counter = 0 ........................................................................... 212 section 9 bus st ate controller (bsc) figure 9.1 block diagram of bsc ........................................................................................... 219 figure 9.2 normal space basic access timing (access wait 0)............................................. 288 figure 9.3 continuous access for normal space 1 bus width = 16 bits, longword access, wm bit in csnwcr = 0 (access wait = 0, cycle wait = 0)............................. 290 figure 9.4 continuous access for normal space 2 bus width = 16 bits, longword access, wm bit in csnwcr = 1 (access wait = 0, cycle wait = 0)............................. 291 figure 9.5 example of 32-bit data-width sram connection................................................ 292 figure 9.6 example of 16-bit data-width sram connection................................................ 293 figure 9.7 example of 8-bit da ta-width sram connection.................................................. 293 figure 9.8 wait timing for normal sp ace access (software wait only) ............................... 294 figure 9.9 wait state timing for normal sp ace access (wait state insertion using wait signal) ................................................................................................................... 295 figure 9.10 csn assert period extension .................................................................................. 296 figure 9.11 access timing for mp x space (address cycle no wait, data cycle no wait) ... 298 figure 9.12 access timing for mp x space (address cycle wait 1, data cycle no wait) ...... 299 figure 9.13 access timing for mpx space (address cycle access wait 1, data cycle wait 1, external wait 1) .............................. 300 figure 9.14 example of 32-bit data width sdram connection ( rasu and casu are not used).................................................................................... 302
page xxx of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 figure 9.15 example of 16-bit data width sdram connection ( rasu and casu are not used).................................................................................... 303 figure 9.16 example of 16-bit data width sdram connection ( rasu and casu are used)........................................................................................... 304 figure 9.17 burst read basic timing (auto-precharge)............................................................ 318 figure 9.18 burst read wait specifi cation timing (aut o-precharge)....................................... 319 figure 9.19 single read basic timing (auto-precharge) .......................................................... 320 figure 9.20 basic timing for sdram burst write (auto-precharge)...................................... 322 figure 9.21 single write basic timing (auto-precharge) ......................................................... 323 figure 9.22 burst read timing (no auto-precharge) ............................................................... 325 figure 9.23 burst read timing (bank active, same row address) ......................................... 326 figure 9.24 burst read timing (bank active, different row addresses) ................................ 327 figure 9.25 single write timi ng (no auto-precharge) ............................................................. 328 figure 9.26 single write timing (ba nk active, same row address)....................................... 329 figure 9.27 single write ti ming (bank active, different row addresses).............................. 330 figure 9.28 auto-refresh timing .............................................................................................. 33 2 figure 9.29 self-refresh timing................................................................................................ 333 figure 9.30 sdram mode register write timing (based on jedec) .................................... 336 figure 9.31 burst rom (clock asynchronous) access (bus width = 32 bits, 16 byte transfer (number of burst = 4), access wait for the 1st time = 2, access wait for 2nd time and after = 1)..................... 339 figure 9.32 basic access timing for sram with byte selection (bas = 0) ........................... 340 figure 9.33 basic access timing for sram with byte selection (bas = 1) ........................... 341 figure 9.34 byte selection sram wait timing (bas = 1, sw[1:0] = 01, wr[3:0] = 0001, hw[1:0] = 01)............................................. 342 figure 9.35 example of connection with 32 -bit data width byte-selection sram ............... 343 figure 9.36 example of connection with 16 -bit data width byte-selection sram ............... 343 figure 9.37 example of pcmcia interface connection............................................................ 345 figure 9.38 basic access timing for pcmcia memory card interface................................... 346 figure 9.39 wait timing for pcmcia memory card interface (ted[3:0] = b'0010, teh[3:0] = b'0001, hardware wait = 1) ....................................... 347 figure 9.40 example of pcmcia space assignment (cs5wcr.sa[1:0] = b'10, cs6wcr.sa[1:0] = b'10) ................................................... 348 figure 9.41 basic timing for pcmcia i/o card interface ....................................................... 349 figure 9.42 wait timing for pcmcia i/o card interface timing (ted[3:0] = b'0010, teh[3:0] = b'0001, hardware wait 1) .......................................... 350 figure 9.43 burst mpx devi ce connection example................................................................ 351 figure 9.44 burst mpx space acces s timing (single read, no wa it or software wait 1) ..... 352 figure 9.45 burst mpx space access timing (single write, software wa it 1, hardware wait 1) .......................................................... 353
r01uh0198ej0500 rev. 5.00 page xxxi of lviii mar 18, 2011 figure 9.46 burst mpx space access timing (bur st read, no wait or software wait 1)...... 354 figure 9.47 burst mpx space access timing (burst write, no wait) ..................................... 355 figure 9.48 burst rom (clock synchronous) access timing (burst length = 8, access wait for the 1st time = 2, access wait for 2nd time after = 1)...................................................................................................... 3 56 figure 9.49 bus arbitration when dtc an d dmac compete during external space access from cpu.............................................................................................................. 3 71 figure 9.50 bus arbitration when dtc or dmac activation request occurs during external space access from cpu ......................................................................... 373 figure 9.51 bus arbitration timing ........................................................................................... 37 5 figure 9.52 timing of write access to on-chip peripheral i/o registers when i :b :p = 4:2:2..................................................................................................... 379 figure 9.53 timing of read access to on-chip peripheral i/o registers when i :b :p = 4:2:1..................................................................................................... 379 figure 9.54 timing of write access to word data in external memory when i :b = 2:1 and external bus width is 8 bits........................................................ 381 figure 9.55 timing of read access with condition i :b = 4:1 and external bus width data width .................................................................................... 382 section 10 direct memory access controller (dmac) figure 10.1 block diagram of dmac ....................................................................................... 384 figure 10.2 dma transfer flowchart........................................................................................ 398 figure 10.3 round- robin m ode................................................................................................. 40 3 figure 10.4 changes in channel pr iority in round- robin mode............................................... 404 figure 10.5 example of activation priority operation of dmac (priority fixed mode (ch0 > ch1 > ch2 > ch3))......................................................... 405 figure 10.6 data flow of dual address mode........................................................................... 407 figure 10.7 example of dma transfer timing in dual mode (source: ordinary memory, des tination: ordinary memory) .......................................... 408 figure 10.8 data flow in single address mode......................................................................... 409 figure 10.9 example of dma transfer timing in single address mode ................................. 410 figure 10.10 dma transfer example in cycle-steal normal mode (dual address, dreq low level detection) .................................................................. 411 figure 10.11 example of dma transfer in cycle steal intermittent mode (dual address, dreq low level detection) .................................................................. 411 figure 10.12 dma transfer example in burst mode (dual address, dreq low level detection) .................................................................. 412 figure 10.13 bus state when multip le channels are operating................................................ 414 figure 10.14 example of dreq input detection in cycle steal mode edge detection............ 415 figure 10.15 example of dreq input detection in cycle steal mode level detection........... 416
page xxxii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 figure 10.16 example of dreq input detection in burst mode edge detection ..................... 416 figure 10.17 example of dreq input detection in burst mode level detection .................... 417 figure 10.18 dma transfer end timing (in cycle steal le vel detection)............................... 417 figure 10.19 bsc ordinary memory access (no wait, idle cycle 1, longword access to 16-bit device) .......................................... 418 figure 10.20 example of timing of dmac operation?activation by dreq (in the case of cycle stealing transfer, dual address mode, low-level detection, i :b :p = 1:1/2:1/2, data transfer from external memory to external memory, and idle/wait = 0).............................................. 419 figure 10.21 example of dmac operation timing? activation by an on-chip peripheral module (in the case of cycle stealing transfer, dual address mode, low-level detection, i :b :p = 1:1/2:1/2, and data transfer from on-chip peripheral module to on-chip ram) ............................................................... 420 figure 10.22 example dma transfer sequence in peripheral module request mode (rxi) .. 424 figure 10.23 example dummy transfer sequence (rxi) ......................................................... 425 section 11 multi-function timer pulse unit 2 (mtu2) figure 11.1 block diagram of mtu2 ........................................................................................ 432 figure 11.2 complementary pwm m ode output level example ............................................. 499 figure 11.3 pwm output level setting pr ocedure in buffer operation ................................... 504 figure 11.4 example of counter operation setting procedure .................................................. 517 figure 11.5 free-running co unter operation............................................................................ 518 figure 11.6 periodic c ounter operation..................................................................................... 519 figure 11.7 example of setting procedure fo r waveform output by compare match.............. 519 figure 11.8 example of 0 outp ut/1 output operation ............................................................... 520 figure 11.9 example of toggle output operation ..................................................................... 520 figure 11.10 example of input capt ure operation setting procedure ....................................... 521 figure 11.11 example of input capture operation .................................................................... 522 figure 11.12 example of synchronous operation setting procedure ........................................ 523 figure 11.13 example of synchronous op eration...................................................................... 524 figure 11.14 compare match buffer operation......................................................................... 525 figure 11.15 input capture buffer operation............................................................................. 526 figure 11.16 example of buffer operation setting procedure................................................... 526 figure 11.17 example of buffer operation (1) .......................................................................... 527 figure 11.18 example of buffer operation (2) .......................................................................... 528 figure 11.19 example of buffer operatio n when tcnt_0 clearing is selected for tgrc_0 to tgra_0 tr ansfer timing............................................................................. 529 figure 11.20 cascaded operation setting procedure ................................................................. 530 figure 11.21 cascaded operation example (a) .......................................................................... 531 figure 11.22 cascaded op eration example (b).......................................................................... 531
r01uh0198ej0500 rev. 5.00 page xxxiii of lviii mar 18, 2011 figure 11.23 cascaded operation example (c) .......................................................................... 532 figure 11.24 cascaded op eration example (d) .......................................................................... 533 figure 11.25 example of pwm mode setting procedure .......................................................... 536 figure 11.26 example of pwm mode operation (1) ................................................................. 536 figure 11.27 example of pwm mode operation (2) ................................................................. 537 figure 11.28 example of pwm mode operation (3) ................................................................. 538 figure 11.29 example of phase c ounting mode setting procedure........................................... 539 figure 11.30 example of phase counting mode 1 operation .................................................... 540 figure 11.31 example of phase counting mode 2 operation .................................................... 541 figure 11.32 example of phase counting mode 3 operation .................................................... 542 figure 11.33 example of phase counting mode 4 operation .................................................... 543 figure 11.34 phase counting mode application example......................................................... 545 figure 11.35 procedure for selec ting reset-synchronized pwm mode.................................... 547 figure 11.36 reset-synchronized pwm mode operation example (when tocr?s olsn = 1 and olsp = 1)....................................................................... 548 figure 11.37 block diagram of channels 3 and 4 in complementary pwm mode .................. 551 figure 11.38 example of complement ary pwm mode setting procedure................................ 552 figure 11.39 complementary pw m mode counter operation.................................................. 553 figure 11.40 example of complementary pwm mode operation ............................................ 555 figure 11.41 example of oper ation without dead time............................................................ 558 figure 11.42 example of pwm cycle updating........................................................................ 559 figure 11.43 example of data upda te in complementary pwm mode .................................... 561 figure 11.44 example of initial output in complementary pwm mode (1)............................. 562 figure 11.45 example of initial output in complementary pwm mode (2)............................. 563 figure 11.46 example of complementar y pwm mode waveform output (1).......................... 565 figure 11.47 example of complementar y pwm mode waveform output (2).......................... 565 figure 11.48 example of complementar y pwm mode waveform output (3).......................... 566 figure 11.49 example of complementary pwm mode 0% and 100% waveform output (1) .. 566 figure 11.50 example of complementary pwm mode 0% and 100% waveform output (2) .. 567 figure 11.51 example of complementary pwm mode 0% and 100% waveform output (3) .. 567 figure 11.52 example of complementary pwm mode 0% and 100% waveform output (4) .. 568 figure 11.53 example of complementary pwm mode 0% and 100% waveform output (5) .. 568 figure 11.54 example of to ggle output waveform synchr onized with pwm output............. 569 figure 11.55 counter clearing sync hronized with anot her channel ........................................ 570 figure 11.56 timing for sync hronous counter clearing ........................................................... 572 figure 11.57 example of procedure for setting output waveform control at synchronous counter clearing in co mplementary pwm mode ........................................................... 573 figure 11.58 example of synchronous clearing in dead time during up-counting (timing (3) in figure 11.56; bit wre of twcr in mtu2 is 1)..................................... 574
page xxxiv of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 figure 11.59 example of synchronous clearing in interval tb at crest (timing (6) in figure 11.56; bit wre of twcr in mtu2 is 1)..................................... 574 figure 11.60 example of synchronous clearing in dead time during down-counting (timing (8) in figure 11.56; bit wre of twcr is 1)..................................................... 575 figure 11.61 example of synchronous clearing in interval tb at trough (timing (11) in figure 11.56; bit wre of twcr is 1)................................................... 575 figure 11.62 mtu2?mtu2s synchronous clearing-suppressed interval specified by scc bit in twcr ....................................................................................................... 576 figure 11.63 example of procedure for suppressing mtu2?mtu2s synchronous counter clearing.............................................................................................................. . 577 figure 11.64 example of synchronous clearing in dead time during up-counting (timing (3) in figure 11.56; bit wre is 1 and bit scc is 1 in twcr of mtu2s)....... 578 figure 11.65 example of synchronous clearing in interval tb at crest (timing (6) in figure 11.56; bit wre is 1 and bit scc is 1 in twcr of mtu2s)....... 579 figure 11.66 example of synchronous clearing in dead time during down-counting (timing (8) in figure 11.56; bit wre is 1 and bit scc is 1 in twcr of mtu2s)....... 580 figure 11.67 example of synchronous clearing in interval tb at trough (timing (11) in figure 11.56; bit wre is 1 and bit scc is 1 in twcr of mtu2s)..... 581 figure 11.68 example of counter cleari ng operation by tgra_3 compare match................ 582 figure 11.69 example of output phas e switching by external input (1)................................... 583 figure 11.70 example of output phas e switching by external input (2)................................... 584 figure 11.71 example of output phase switching by means of uf, vf, wf bit settings (1).. 584 figure 11.72 example of output phase switching by means of uf, vf, wf bit settings (2).. 585 figure 11.73 example of interrupt sk ipping operation setting procedure................................ 586 figure 11.74 periods duri ng which interrupt skipping count can be changed........................ 587 figure 11.75 example of interrupt skipping operation ............................................................. 587 figure 11.76 example of operation when buffer transfer is suppressed (bte1 = 0 and bte0 = 1) ................................................................................................ 589 figure 11.77 example of operation when buffer transfer is linked with interrupt skipping (bte1 = 1 and bte0 = 0) ................................................................................................ 590 figure 11.78 relationship between bits t3aen and t4ven in timer interrupt skipping set register (titcr) and buffer transfer-enabled period.............................................. 591 figure 11.79 example of procedure for specifying a/d converter start request delaying function ...................................................................................... 593 figure 11.80 basic example of a/d converter start request signal (trg4an) operation .... 594 figure 11.81 example of a/d converter start request signal (trg4an) operation linked with interrupt skipping......................................................................................... 595 figure 11.82 example of a/d converter start request signal (trg4an) operation linked with interrupt skipping......................................................................................... 596 figure 11.83 example of synchronous counter start setting procedure ................................... 597
r01uh0198ej0500 rev. 5.00 page xxxv of lviii mar 18, 2011 figure 11.84 (1) example of synchronous counter start operation (mtu2-to-mtu2s clock frequency ratio = 1:1)........................................................... 598 figure 11.84 (2) example of synchronous counter start operation (mtu2-to-mtu2s clock frequency ratio = 1:2)........................................................... 599 figure 11.84 (3) example of synchronous counter start operation (mtu2-to-mtu2s clock frequency ratio = 1:3)........................................................... 599 figure 11.84 (4) example of synchronous counter start operation (mtu2-to-mtu2s clock frequency ratio = 1:4)........................................................... 600 figure 11.85 example of procedure for specifying mtu2s counter clearing by mtu2 flag setting source............................................................................ 601 figure 11.86 (1) example of mtu2s counter clearing caused by mtu2 flag setting source (1).......................................................................................... 602 figure 11.86 (2) example of mtu2s counter clearing caused by mtu2 flag setting source (2).......................................................................................... 602 figure 11.87 example of external puls e width measurement setting procedure ..................... 603 figure 11.88 example of external pulse width measurement (measuring high pulse width) ......................................................................................... 603 figure 11.89 delay in dead time in complementary pwm operation..................................... 604 figure 11.90 example of dead time compensation setting procedure .................................... 605 figure 11.91 example of motor c ontrol circuit configuration ................................................. 605 figure 11.92 tcnt capturing at crest and/or trough in complementary pwm operation..... 606 figure 11.93 count timing in internal clock operation (c hannels 0 to 4) ............................... 612 figure 11.94 count timing in inte rnal clock operation (channel 5)........................................ 612 figure 11.95 count timing in external clock operation (c hannels 0 to 4) .............................. 612 figure 11.96 count timing in external clock operation (phase counting mode).................... 613 figure 11.97 output comp are output timing (nor mal mode/pwm mode)............................. 613 figure 11.98 output compare output timing (complementary pwm mode/ reset synchronous pwm mode)...................................................................................... 614 figure 11.99 input captur e input signa l timing........................................................................ 614 figure 11.100 counter clear timing (c ompare match) (channels 0 to 4) ................................ 615 figure 11.101 counter clear timi ng (compare match) (channel 5)......................................... 615 figure 11.102 counter clear timing (i nput capture) (cha nnels 0 to 5).................................... 615 figure 11.103 buffer operati on timing (compare match)........................................................ 616 figure 11.104 buffer operati on timing (input capture) ........................................................... 616 figure 11.105 buffer transfer timing (when tcnt cleared) .................................................. 617 figure 11.106 transfer timing from buffer register to temporary register (tcnts stop) ... 617 figure 11.107 transfer timing from buffer register to temporary register (tcnts operating) .......................................................................................................... 618 figure 11.108 transfer timing from temporary register to compare register ....................... 618 figure 11.109 tgi interrupt timing (c ompare match) (channels 0 to 4)................................. 619
page xxxvi of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 figure 11.110 tgi interrupt timi ng (compare match) (channel 5) ......................................... 619 figure 11.111 tgi interrupt timing (i nput capture) (cha nnels 0 to 4)..................................... 620 figure 11.112 tgi interrupt timi ng (input capture) (channel 5) ............................................. 620 figure 11.113 tciv in terrupt setting timing............................................................................ 621 figure 11.114 tciu in terrupt setting timing............................................................................ 621 figure 11.115 timing fo r status flag clearing by cpu (channels 0 to 4)................................ 622 figure 11.116 timing for status flag clearing by cpu (channel 5) ........................................ 622 figure 11.117 timing for st atus flag clearing by dtc activ ation (channels 0 to 4).............. 623 figure 11.118 timing for status flag clearing by dt c activation (channel 5)....................... 623 figure 11.119 timing for status flag clearing by dmac activation ...................................... 623 figure 11.120 phase difference, overlap, and pulse width in phase counting mode .............. 624 figure 11.121 contention between tcnt write and clear operations..................................... 625 figure 11.122 contention between tcnt write and increment operations ............................. 626 figure 11.123 contention between tgr write and compare match......................................... 627 figure 11.124 contention between buffer register write and compare match........................ 628 figure 11.125 contention between buffer register write and tcnt clear.............................. 629 figure 11.126 contention between tgr read and input capture (channels 0 to 4)................. 630 figure 11.127 contention between tgr r ead and input capture (channel 5) ......................... 630 figure 11.128 contention between tgr write and input capture (channels 0 to 4)................ 631 figure 11.129 contention between tgr wr ite and input captur e (channel 5) ........................ 631 figure 11.130 contention between buffer register write and input capture............................ 632 figure 11.131 tcnt_2 write and overflow/underflow contention with cascade connection.......................................................................................................... 63 3 figure 11.132 counter value durin g complementary pw m mode stop................................... 634 figure 11.133 buffer operation and compare-match flags in reset synchronous pwm mode ...................................................................................................................... 635 figure 11.134 reset synchronous pwm mode overflow flag ................................................. 636 figure 11.135 contention between overflow and counter clearing.......................................... 637 figure 11.136 contention between tcnt write and overflow................................................. 638 figure 11.137 condition (1) s ynchronous cleari ng exampl e.................................................... 640 figure 10.138 condition (2) s ynchronous cleari ng exampl e.................................................... 641 figure 11.139 error occurrence in normal mode, recovery in normal mode ......................... 645 figure 11.140 error occurrence in normal mode, recovery in pwm mode 1......................... 646 figure 11.141 error occurrence in normal mode, recovery in pwm mode 2......................... 647 figure 11.142 error occurrence in normal mode, recovery in phase counting mode ............ 648 figure 11.143 error occurrence in normal mode, recovery in complementary pwm mode ...................................................................................................................... 649 figure 11.144 error occurrence in normal mode, recovery in reset-synchronized pwm mode ...................................................................................................................... 650 figure 11.145 error occurrence in pwm mode 1, recovery in normal mode......................... 651
r01uh0198ej0500 rev. 5.00 page xxxvii of lviii mar 18, 2011 figure 11.146 error occurrence in pwm mode 1, recovery in pwm mode 1 ........................ 652 figure 11.147 error occurrence in pwm mode 1, recovery in pwm mode 2 ........................ 653 figure 11.148 error occurrence in pwm mode 1, recovery in phase counting mode............ 654 figure 11.149 error occurrence in pwm mode 1, recovery in complementary pwm mode. 655 figure 11.150 error occurrence in pwm mode 1, recovery in reset-synchronized pwm mode...................................................................................................................... . 656 figure 11.151 error occurrence in pwm mode 2, recovery in normal mode......................... 657 figure 11.152 error occurrence in pwm mode 2, recovery in pwm mode 1 ........................ 658 figure 11.153 error occurrence in pwm mode 2, recovery in pwm mode 2 ........................ 659 figure 11.154 error occurrence in pwm mode 2, recovery in phase counting mode............ 660 figure 11.155 error occurrence in phase c ounting mode, recovery in normal mode ............ 661 figure 11.156 error occurrence in phase counting mode, recovery in pwm mode 1............ 662 figure 11.157 error occurrence in phase counting mode, recovery in pwm mode 2............ 663 figure 11.158 error occurrence in phase counting mode, recovery in phase counting mode................................................................................................... 664 figure 11.159 error occurrence in complementary pwm mode, recovery in normal mode................................................................................................................ 665 figure 11.160 error occurrence in complementary pwm mode, recovery in pwm mode 1 ............................................................................................................... 66 6 figure 11.161 error occurrence in complementary pwm mode, recovery in complementary pwm mode........................................................................................ 667 figure 11.162 error occurrence in complementary pwm mode, recovery in complementary pwm mode........................................................................................ 668 figure 11.163 error occurrence in complementary pwm mode, recovery in reset-synchronized pwm mode ................................................................................. 669 figure 11.164 error occurrence in reset-synchronized pwm mode, recovery in normal mode................................................................................................................ 670 figure 11.165 error occurrence in reset-synchronized pwm mode, recovery in pwm mode 1 ............................................................................................................... 67 1 figure 11.166 error occurrence in reset-synchronized pwm mode, recovery in complementary pwm mode........................................................................................ 672 figure 11.167 error occurrence in reset-synchronized pwm mode, recovery in reset-synchronized pwm mode ................................................................................. 673 section 13 port output enable (poe) figure 13.1 block diagram of poe............................................................................................ 6 84 figure 13.2 falling edge detection ........................................................................................... . 711 figure 13.3 low-level detection operation.............................................................................. 712 figure 13.4 output-level compare operation ........................................................................... 712 figure 13.5 pin state when a power-on reset is issued from the watchdog timer.................. 715
page xxxviii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 section 14 watchdog timer (wdt) figure 14.1 block diagram of wdt .......................................................................................... 718 figure 14.2 writing to wtcnt and wtcsr............................................................................ 723 figure 14.3 operation in watchdog timer mode (when wtcnt count clock is specified to p /32 by cks2 to cks0) ......................... 725 section 15 serial comm unication interface (sci) figure 15.1 block diagram of sci............................................................................................. 728 figure 15.2 example of data format in asynchronous communication (8-bit data with parity and two stop bits)...................................................................... 760 figure 15.3 sample flowchart for sci initialization.................................................................. 763 figure 15.4 sample flowchart for transmitting serial data...................................................... 764 figure 15.5 example of transmission in asynchronous mode (8-bit data, parity, one stop bit)..................................................................................... 766 figure 15.6 sample flowchart fo r receiving serial data (1)..................................................... 767 figure 15.6 sample flowchart fo r receiving serial data (2)..................................................... 768 figure 15.7 example of sci receive oper ation (8-bit data, parity, one stop bit) .................. 770 figure 15.8 data format in cl ock synchronous communication.............................................. 770 figure 15.9 sample flowchart for sci initialization.................................................................. 772 figure 15.10 sample flowchart for transmitting serial data.................................................... 773 figure 15.11 example of sci transmit operation..................................................................... 774 figure 15.12 sample flowchart fo r receiving serial data (1)................................................... 775 figure 15.12 sample flowchart fo r receiving serial data (2)................................................... 776 figure 15.13 example of sci receive operation ...................................................................... 777 figure 15.14 sample flowchart for transmitting/receiving serial data................................... 778 figure 15.15 example of communication using multiprocessor format (transmission of data h'aa to receiving station a)...................................................... 780 figure 15.16 sample multiprocessor serial transmissi on flowchart ........................................ 781 figure 15.17 example of sci operation in reception (example with 8-bit data, mu ltiprocessor bit, one stop bit) ......................................... 782 figure 15.18 sample multiprocessor serial reception flowchart (1)........................................ 783 figure 15.18 sample multiprocessor serial reception flowchart (2)........................................ 784 figure 15.19 sckio bit, sckdt bit, and sck pin .................................................................. 786 figure 15.20 spbio bit, spbdt bit, and txd pin................................................................... 787 figure 15.21 receive data sampli ng timing in asynchronous mode ...................................... 790 figure 15.22 example of clock synchronous transfer using dmac or dtc ......................... 791 section 16 serial communicati on interface with fifo (scif) figure 16.1 block diagram of scif........................................................................................... 7 94
r01uh0198ej0500 rev. 5.00 page xxxix of lviii mar 18, 2011 figure 16.2 example of data format in asynchronous communication (8-bit data with parity and two stop bits)...................................................................... 835 figure 16.3 sample flowchar t for scif initialization ............................................................... 838 figure 16.4 sample flowchart for transmitting serial data...................................................... 839 figure 16.5 example of transmit opera tion (8-bit data, parity, one stop bit)........................ 841 figure 16.6 example of operation using modem control ( cts ).............................................. 841 figure 16.7 sample flowchar t for receiving serial data .......................................................... 842 figure 16.8 sample flowchart fo r receiving serial data (cont)................................................ 843 figure 16.9 example of scif receive oper ation (8-bit data, parity, one stop bit)................ 845 figure 16.10 example of operation using modem control ( rts )............................................ 845 figure 16.11 data format in cl ock synchronous communication ............................................ 846 figure 16.12 sample flowchar t for scif initialization.............................................................. 848 figure 16.13 sample flowchart for transmitting serial data .................................................... 849 figure 16.14 example of scif transmit operation................................................................... 850 figure 16.15 sample flowchart fo r receiving serial data (1)................................................... 851 figure 16.16 sample flowchart fo r receiving serial data (2)................................................... 851 figure 16.17 example of scif receive operation .................................................................... 852 figure 16.18 sample flowchart for transmitting/receiving serial data................................... 853 figure 16.19 rtsio bit, rtsdt bit, and rts pin................................................................... 855 figure 16.20 ctsio bit, ctsdt bit, and cts pin ................................................................... 856 figure 16.21 sckio bit, sckdt bit, and sck pin .................................................................. 856 figure 16.22 spbio bit, spbdt bit, and txd pin ................................................................... 857 figure 16.23 receive data sampli ng timing in asynchronous mode ...................................... 860 section 17 synchronous serial communication unit (ssu) figure 17.1 block diagram of ssu............................................................................................ 8 64 figure 17.2 relationship of clock phase, polarity, and data ..................................................... 880 figure 17.3 relationship between data i nput/output pins and the shift register ..................... 882 figure 17.4 example of initial settings in ssu mode................................................................ 886 figure 17.5 example of transm ission operation (ssu mode) .................................................. 888 figure 17.6 flowchart example of data transmission (ssu mode) ......................................... 889 figure 17.7 example of reception operation (ssu mode) ....................................................... 891 figure 17.8 flowchart example of data reception (ssu mode)............................................... 892 figure 17.9 flowchart example of simulta neous transmission/reception (ssu mode).......... 893 figure 17.10 conflict error detec tion timing (before transfer) .............................................. 894 figure 17.11 conflict error detecti on timing (after transfer end) ......................................... 895 figure 17.12 example of initial settings in clock synchronous communication mode ........... 896 figure 17.13 example of transmission operation (clock synchronous communication mode).................................................................... 897
page xl of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 figure 17.14 flowchart example of transmission operation (clock synchronous communication mode) ................................................................... 898 figure 17.15 example of reception operation (clock synchronous communication mode)... 899 figure 17.16 flowchart example of data reception (clock synchronous communication mode) ................................................................... 900 figure 17.17 flowchart example of simultaneous transmission/reception (clock synchronous communication mode) ................................................................... 901 section 18 i 2 c bus interface 2 (i 2 c2) figure 18.1 block diagram of i 2 c bus interface 2..................................................................... 906 figure 18.2 external circu it connections of i/o pins ................................................................ 907 figure 18.3 i 2 c bus formats....................................................................................................... 924 figure 18.4 i 2 c bus timing........................................................................................................ 924 figure 18.5 master transmit mode operation timing (1)......................................................... 926 figure 18.6 master transmit mode operation timing (2)......................................................... 926 figure 18.7 master receive mode operation timing (1) .......................................................... 928 figure 18.8 master receive mode operation timing (2) .......................................................... 929 figure 18.9 slave transmit mode operation timing (1) ........................................................... 931 figure 18.10 slave transmit mode operation timing (2) ......................................................... 932 figure 18.11 slave receive m ode operation timing (1)........................................................... 933 figure 18.12 slave receive m ode operation timing (2)........................................................... 934 figure 18.13 clock synchronous serial transfer format .......................................................... 934 figure 18.14 transmit mode operation timing......................................................................... 935 figure 18.15 receive m ode operation timing .......................................................................... 937 figure 18.16 operation timi ng for receiving one byte .......................................................... 937 figure 18.17 block diag ram of noise filter .............................................................................. 938 figure 18.18 sequence for using the iicrst bit to reset i 2 c bus interface 2 ......................... 939 figure 18.19 sample flowchart for master transmit mode....................................................... 940 figure 18.20 sample flowchart for master receive mode ........................................................ 941 figure 18.21 sample flowchart for slave transmit mode......................................................... 942 figure 18.22 sample flowchar t for slave receive mode .......................................................... 943 figure 18.23 the timing of th e bit synchronous circuit .......................................................... 946 section 19 a/d converter (adc) figure 19.1 block diagram of a/ d converter (for one module) .............................................. 952 figure 19.2 a/d c onversion ti ming.......................................................................................... 97 0 figure 19.3 external trigger input timing ................................................................................ 972 figure 19.4 example of 2-channel scanning............................................................................. 973 figure 19.5 definitions of a/d conversion accuracy ............................................................... 976 figure 19.6 definitions of a/d conversion accuracy ............................................................... 977
r01uh0198ej0500 rev. 5.00 page xli of lviii mar 18, 2011 figure 19.7 example of analog input circuit ............................................................................ 978 figure 19.8 example of anal og input protection circuit ........................................................... 980 section 20 compare match timer (cmt) figure 20.1 block diagram of cmt........................................................................................... 98 1 figure 20.2 counter operation ................................................................................................ ... 986 figure 20.3 count timing ..................................................................................................... ..... 986 figure 20.4 timing of cmf setting ........................................................................................... 9 88 figure 20.5 conflict between write and compare-match processes of cmcnt ...................... 989 figure 20.6 conflict between word-write and count-up proce sses of cmcnt...................... 990 figure 20.7 conflict between byte-write and count-up proce sses of cmcnt ....................... 991 section 22 i/o ports figure 22.1 port a (sh7083).................................................................................................. .. 1170 figure 22.2 port a (sh7084).................................................................................................. .. 1171 figure 22.3 port a (sh7085).................................................................................................. .. 1172 figure 22.4 port a (sh7086).................................................................................................. .. 1173 figure 22.5 port b (sh7083).................................................................................................. .. 1185 figure 22.6 port b (s h7084, sh7085, sh70 86)...................................................................... 1185 figure 22.7 port c (s h7083, sh7084, sh70 85)...................................................................... 1191 figure 22.8 port c (sh7086).................................................................................................. .. 1192 figure 22.9 port d (sh7083, sh7084) ..................................................................................... 1199 figure 22.10 port d (sh7085, sh7086)................................................................................... 1200 figure 22.11 port e (sh7083) ................................................................................................. . 1207 figure 22.12 port e (sh7084) ................................................................................................. . 1208 figure 22.13 port e (sh7085) ................................................................................................. . 1209 figure 22.14 port e (sh7086) ................................................................................................. . 1210 figure 22.15 port f (sh 7083, sh7084, sh7085 ) .................................................................... 1219 figure 22.16 port f (sh7086) ................................................................................................. . 1219 section 23 flash memory figure 23.1 block diag ram of flas h memo ry.......................................................................... 1225 figure 23.2 mode trans ition of flas h memo ry........................................................................ 1226 figure 23.3 flash memo ry configuration ................................................................................ 1229 figure 23.4 block divi sion of user mat ................................................................................ 1230 figure 23.5 overview of user procedure program................................................................... 1231 figure 23.6 system config uration in b oot m ode..................................................................... 1260 figure 23.7 automatic adjustment operation of sci bit rate ................................................ 1261 figure 23.8 state trans itions in b oot m ode............................................................................. 1263 figure 23.9 programming/er asing overview flow.................................................................. 1264
page xlii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 figure 23.10 ram ma p after download.................................................................................. 1265 figure 23.11 progra mming proce dure...................................................................................... 1266 figure 23.12 erasing procedure............................................................................................... . 1271 figure 23.13 sample procedure of repeating ram emulation, erasing, and programming (overview).................................................................................................................... .. 1273 figure 23.14 procedure for programmi ng user mat in user boot mode .............................. 1275 figure 23.15 procedure for erasing user mat in user boot mode ........................................ 1277 figure 23.16 transitions to and from error prot ection state.................................................... 1281 figure 23.17 emulation of flash memory in ram.................................................................. 1282 figure 23.18 example of overlapped ram operation (sh7083: 256-kbyte flas h memory version)................................................................. 1283 figure 23.19 programming of tuned data (sh7083: 256-kbyte flash memory version) ...... 1284 figure 23.20 switching between us er mat and user boot mat .......................................... 1286 figure 23.21 timing of contention between sco download request and interrupt request 1287 figure 23.22 flow of pro cessing by the b oot progr am............................................................ 1292 figure 23.23 sequence of bit-rate matchi ng........................................................................... 1293 figure 23.24 formats in th e communications protoc ol ........................................................... 1294 figure 23.25 sequence of ne w bit rate selection................................................................... 1306 figure 23.26 sequen ce of progr amming .................................................................................. 1310 figure 23.27 sequence of erasure ............................................................................................ 1 314 section 24 mask rom figure 24.1 mask ro m block diagram .................................................................................. 1331 section 25 ram figure 25.1 on-chi p ram addresses ..................................................................................... 1333 section 28 electrical characteristics figure 28.1 extal cl ock input timing ................................................................................. 1420 figure 28.2 ck cloc k output timing ...................................................................................... 1421 figure 28.3 power-on os cillation settling timing.................................................................. 1421 figure 28.4 oscillation settli ng timing on return from st andby (return by reset)............... 1421 figure 28.5 oscillation settling timing on retu rn from standby (return by nmi or irq).... 1422 figure 28.6 rese t input timing............................................................................................... . 1424 figure 28.7 interrupt signal input timing................................................................................ 1424 figure 28.8 interrupt signal output timi ng............................................................................. 1425 figure 28.9 bus release timing .............................................................................................. 1 425 figure 28.10 pin driving timing in stan dby mode ................................................................. 1425 figure 28.11 basic bus timing for normal space (no wait).................................................. 1429 figure 28.12 basic bus timing for normal space (one software wait cycle) ...................... 1430
r01uh0198ej0500 rev. 5.00 page xliii of lviii mar 18, 2011 figure 28.13 basic bus timing for normal space (one external wait cycle) ....................... 1431 figure 28.14 basic bus timing for normal space (one software wait cycle, external wait cycle valid (wm bit = 0), no idle cycle) ............................................. 1432 figure 28.15 cs extended bus cycle for normal space (sw = 1 cycle, hw = 1 cycle, one external wait cycle)...................................................................... 1433 figure 28.16 bus cycle of sram with byte selection (sw = 1 cycle, hw = 1 cycle, one external wait cycle, bas = 0 ( ub / lb in write cycle controlled)) .................... 1434 figure 28.17 bus cycle of sram with byte selection (sw = 1 cycle, hw = 1 cycle, one external wait cycle, bas = 1 ( we in write cycle controlled)).......................... 1435 figure 28.18 mpx-i/o interface bu s cycle (three address cycles, one software wait cycle, one external wait cycle) .................................................... 1436 figure 28.19 burst mpx-i/o interf ace bus cycle single read write (one address cycle, one software wait cycle)............................................................ 1437 figure 28.20 burst mpx-i/o interf ace bus cycle single read write (one address cycle, one software wait cycle, one external wait cycle).................. 1438 figure 28.21 burst mpx-i/o interface bus cycle burst read write (one address cycle, one software wait cycle)............................................................ 1439 figure 28.22 burst mpx-i/o interface bus cycle burst read write (one address cycle, one software wait cycle, external wait cycle) ......................... 1440 figure 28.23 burst rom read cycle (one software wait cycle, one external wait cycle, one burst wait cycle, two bursts) ..................................... 1441 figure 28.24 synchronous dram single read bus cycle (auto precharge, cas latency 2, wtrcd = 0 cycle, wtrp = 0 cycle) .................... 1442 figure 28.25 synchronous dram single read bus cycle (auto precharge, cas latency 2, wtrcd = 1 cycle, wtrp = 1 cycle) .................... 1443 figure 28.26 synchronous dram burst read bus cycle (four read cycles) (auto precharge, cas latency 2, wtrcd = 0 cycle, wtrp = 1 cycle) .................... 1444 figure 28.27 synchronous dram burst read bus cycle (four read cycles) (auto precharge, cas latency 2, wtrcd = 1 cycle, wtrp = 0 cycle) .................... 1445 figure 28.28 synchronous dram single write bus cycle (auto precharge, trwl = 1 cycle) ............................................................................... 1446 figure 28.29 synchronous dram single write bus cycle (auto precharge, wtrcd = 2 cycles, trwl = 1 cycle)............................................. 1447 figure 28.30 synchronous dram burst write bus cycle (four write cycles) (auto precharge, wtrcd = 0 cycle, trwl = 1 cycle) .............................................. 1448 figure 28.31 synchronous dram burst write bus cycle (four write cycles) (auto precharge, wtrcd = 1 cycle, trwl = 1 cycle) .............................................. 1449 figure 28.32 synchronous dram burst read bus cycle (four read cycles) (bank active mode: act + read commands, cas latency 2, wtrcd = 0 cycle) ........................................................................................................ 1450
page xliv of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 figure 28.33 synchronous dram burst read bus cycle (four read cycles) (bank active mode: read command, same row address, cas latency 2, wtrcd = 0 cycle) ........................................................................................................ 1451 figure 28.34 synchronous dram burst read bus cycle (four read cycles) (bank active mode: pre + act + read commands, different row addresses, cas latency 2, wtrcd = 0 cycle).............................................................................. 1452 figure 28.35 synchronous dram burst write bus cycle (four write cycles) (bank active mode: act + write commands, wtrcd = 0 cycle, trwl = 0 cycle) .......................................................................... 1453 figure 28.36 synchronous dram burst write bus cycle (four write cycles) (bank active mode: write command, same row address, wtrcd = 0 cycle, trwl = 0 cycle) ......................................................................... 1454 figure 28.37 synchronous dram burst write bus cycle (four write cycles) (bank active mode: pre + act + write commands, different row addresses, wtrcd = 0 cycle, trwl = 0 cycle) ............................... 1455 figure 28.38 synchronous dram auto-refreshing timing (wtrp = 1 cycle, wtrc = 3 cycles)........................................................................... 1456 figure 28.39 synchronous dram self-refreshing timing (wtrp = 1 cycle, wtrc = 3 cycles)........................................................................... 1457 figure 28.40 synchronous dram mode register write timing (wtrp = 1 cycle)............. 1458 figure 28.41 pcmcia memory card interface bus timing ................................................... 1459 figure 28.42 pcmcia memory card interface bus timing (ted = 2.5 cycles, teh = 1.5 cycles, one external wait cycle) ................................ 1460 figure 28.43 pcmcia i/o card interface bus timing............................................................ 1461 figure 28.44 pcmcia i/o card interface bus timing (ted = 2.5 cycles, teh = 1.5 cycles, one external wait cycle) ................................ 1462 figure 28.45 dreq input ti ming............................................................................................ 146 3 figure 28.46 mtu2 in put/output timing ................................................................................ 1464 figure 28.47 mtu2 cl ock input timing ................................................................................. 1465 figure 28.48 mtu2s in put/output timing ............................................................................. 1466 figure 28.49 i/o port input/output timing .............................................................................. 1467 figure 28.50 wdt timing ...................................................................................................... . 1468 figure 28.51 input clock timing ............................................................................................. 1 469 figure 28.52 sci i nput/output timing .................................................................................... 1470 figure 28.53 input clock timing ............................................................................................. 1 471 figure 28.54 scif i nput/output timing .................................................................................. 1472 figure 28.55 ssu timing (master, cphs = 1) ........................................................................ 1474 figure 28.56 ssu timing (master, cphs = 0) ........................................................................ 1474 figure 28.57 ssu timing (slave, cphs = 1) .......................................................................... 1475 figure 28.58 ssu timing (slave, cphs = 0) .......................................................................... 1475
r01uh0198ej0500 rev. 5.00 page xlv of lviii mar 18, 2011 figure 28.59 poe input timing ............................................................................................... 1476 figure 28.60 i 2 c2 input/outpu t timing.................................................................................... 1478 figure 28.61 ubc trigger timing ........................................................................................... 147 9 figure 28.62 external trigger inpu t timi ng ............................................................................ 1480 figure 28.63 output load circuit............................................................................................. 1481 figure 28.64 connection of v cl capacitor ............................................................................... 1484 appendix figure e.1 tfp-100bv......................................................................................................... .... 1542 figure e.2 fp-112ev .......................................................................................................... ..... 1543 figure e.3 fp-144lv .......................................................................................................... ..... 1544 figure e.4 fp-176ev .......................................................................................................... ..... 1545 figure e.5 bp-112v ........................................................................................................... ...... 1546
page xlvi of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011
r01uh0198ej0500 rev. 5.00 page xlvii of lviii mar 18, 2011 tables section 1 overview table 1.1 features ....................................................................................................................... 2 table 1.2 pin functions............................................................................................................. 13 section 2 cpu table 2.1 initial values of registers ......................................................................................... 27 table 2.2 word data sign extension........................................................................................ 29 table 2.3 delayed branch instructions ..................................................................................... 30 table 2.4 t bit .......................................................................................................................... 30 table 2.5 access to immediate data......................................................................................... 31 table 2.6 access to absolute address ...................................................................................... 31 table 2.7 access with displacement......................................................................................... 32 table 2.8 addressing modes and effective addresses ............................................................. 32 table 2.9 instruction formats ................................................................................................... 36 table 2.10 instruction types....................................................................................................... 39 table 2.11 data transfer instructions ......................................................................................... 43 table 2.12 arithmetic operation instructions............................................................................. 45 table 2.13 logic operation instructions..................................................................................... 47 table 2.14 shift instructions ....................................................................................................... 48 table 2.15 branch instructions ................................................................................................... 49 table 2.16 system control instructions ...................................................................................... 50 section 3 mcu operating modes table 3.1 selection of operating modes................................................................................... 55 table 3.2 pin configuration ...................................................................................................... 56 section 4 clock pulse generator (cpg) table 4.1 operating clock for each module ............................................................................ 70 table 4.2 pin configuration ...................................................................................................... 71 table 4.3 clock operating mode .............................................................................................. 72 table 4.4 frequency division ratios specifiable with frqcr ............................................... 73 table 4.5 register configuration .............................................................................................. 77 table 4.6 damping resistance values (reference values) ...................................................... 82 table 4.7 crystal resonator characteristics ............................................................................. 82 section 5 exception handling table 5.1 types of exceptions and priority .............................................................................. 87
page xlviii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 table 5.2 timing for exception detection and start of exception handling ........................... 88 table 5.3 vector numbers and vector table address offsets ................................................. 89 table 5.4 calculating exception handling vector table addresses ........................................ 90 table 5.5 reset status ............................................................................................................... 91 table 5.6 bus cycles and address errors ................................................................................. 93 table 5.7 interrupt sources ....................................................................................................... 95 table 5.8 interrupt priority........................................................................................................ 96 table 5.9 types of exceptions tri ggered by inst ructions......................................................... 97 table 5.10 delay slot instructions, interrupt di sabled instructions, and exceptions................. 99 table 5.11 stack status after ex ception handling ends ........................................................... 100 section 6 interr upt controller (intc) table 6.1 pin configuration.................................................................................................... 107 table 6.2 register configuration ............................................................................................ 108 table 6.3 interrupt exception handling vectors and priorities .............................................. 124 table 6.4 interrupt res ponse time ......................................................................................... 131 section 7 user b reak controller (ubc) table 7.1 pin configuration.................................................................................................... 138 table 7.2 register configuration ............................................................................................ 139 table 7.3 data access cycle addresses and op erand size comparison conditions ............. 161 section 8 data transfer controller (dtc) table 8.1 register configuration ............................................................................................ 173 table 8.2 interrupt sources, dtc vector addresses, and corresponding dtces................. 186 table 8.3 dtc transfer modes .............................................................................................. 189 table 8.4 dtc transfer conditions (chain tr ansfer conditions included)........................... 191 table 8.5 transfer information writeback skip condition and writeback skipped registers ............................................................................................................. 195 table 8.6 register function in normal transfer mode .......................................................... 195 table 8.7 register function in repeat transfer mode ........................................................... 197 table 8.8 register function in block transfer mode............................................................. 198 table 8.9 dtc execution status............................................................................................. 204 table 8.10 number of cycles required for each execution state ........................................... 205 table 8.11 dtc bus release timing ....................................................................................... 207 section 9 bus st ate controller (bsc) table 9.1 pin configuration.................................................................................................... 220 table 9.2 address map: sh7083 (256-kbyte flash memory version) in on-chip rom- enabled mode...................................................................................... 222
r01uh0198ej0500 rev. 5.00 page xlix of lviii mar 18, 2011 table 9.3 address map: sh7083 (256-kbyte flash memory version) in on-chip rom-disabled mode..................................................................................... 223 table 9.4 address map: sh7083 (512-kbyte flash memory version) in on-chip rom- enabled mode...................................................................................... 224 table 9.5 address map: sh7083 (512-kbyte flash memory version) in on-chip rom-disabled mode..................................................................................... 225 table 9.6 address map: sh7084 (256-kbyte flash memory version) in on-chip rom- enabled mode...................................................................................... 226 table 9.7 address map: sh7084 (256-kbyte flash memory version) in on-chip rom-disabled mode..................................................................................... 228 table 9.8 address map: sh7084 (512-kbyte flash memory version) in on-chip rom- enabled mode...................................................................................... 229 table 9.9 address map: sh7084 (512-kbyte flash memory version) in on-chip rom-disabled mode..................................................................................... 230 table 9.10 address map: sh7085 (256-kbyte flash memory version) in on-chip rom- enabled mode...................................................................................... 232 table 9.11 address map: sh7085 (256-kbyte flash memory version) in on-chip rom-disabled mode..................................................................................... 233 table 9.12 address map: sh7085 (512-kbyte flash memory version) in on-chip rom- enabled mode...................................................................................... 234 table 9.13 address map: sh7085 (512-kbyte flash memory version) in on-chip rom-disabled mode..................................................................................... 236 table 9.14 address map: sh7086 in on-c hip rom-enab led mode....................................... 237 table 9.15 address map: sh7086 in on-c hip rom-disabl ed mode...................................... 239 table 9.16 register configuration ............................................................................................ 241 table 9.17 32-bit external device acces s and data alignment .............................................. 285 table 9.18 16-bit external device acces s and data alignment .............................................. 286 table 9.19 8-bit external device acce ss and data alignment ................................................ 287 table 9.20 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (1)-1..................................... 306 table 9.20 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (1)-2..................................... 307 table 9.21 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (2)-1..................................... 308 table 9.21 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (2)-2..................................... 309 table 9.22 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (3) ........................................ 310 table 9.23 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (4)-1..................................... 311
page l of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 table 9.23 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (4)-2..................................... 312 table 9.24 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (5)-1..................................... 313 table 9.24 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (5)-2..................................... 314 table 9.25 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (6)-1..................................... 315 table 9.25 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and a ddress multiplex output (6)-2..................................... 316 table 9.26 relationship between access si ze and number of bursts ...................................... 317 table 9.27 access address in sdram mode register write.................................................. 335 table 9.28 relationship between bus width, acce ss size, and number of bursts .................. 338 table 9.29 minimum number of idle cycles between cpu access cycles in normal space interface ................................................................................................ 359 table 9.30 minimum number of idle cycles between access cycles during dmac dual address mode and dtc transfer for the normal space interface.......................... 360 table 9.31 minimum number of idle cycles during dmac single address mode transfer to the normal space interface from the exte rnal device with dack............... 361 table 9.32 minimum number of idle cycles between access cycles of cpu, the dmac dual address mode, and dtc for the sdram interface ............................. 363 table 9.33 minimum number of idle cycles be tween access cycles of the dmac single address mode for the sdram interface (1) ........................................................ 366 table 9.34 minimum number of idle cycles be tween access cycles of the dmac single address mode for the sdram interface (2) ........................................................ 369 table 9.35 number of cycles for access to on -chip peripheral i/o registers ....................... 378 table 9.36 number of external access cycles......................................................................... 380 section 10 direct memory access controller (dmac) table 10.1 pin configuration.................................................................................................... 385 table 10.2 register configuration ............................................................................................ 386 table 10.3 selecting external request modes with rs bits .................................................... 399 table 10.4 selecting external request de tection with dl, ds bits ........................................ 400 table 10.5 selecting external request detection with do bit ................................................ 400 table 10.6 selecting on-chip peripheral module request modes with rs3 to rs0 bits ....... 401 table 10.7 supported dma transfers ...................................................................................... 406 table 10.8 relationship between request modes and bus modes by dma transfer category. 413 table 10.9 number of cycles per access to on-chip ram by dmac .................................. 426
r01uh0198ej0500 rev. 5.00 page li of lviii mar 18, 2011 section 11 multi-function timer pulse unit 2 (mtu2) table 11.1 mtu2 functions ..................................................................................................... 428 table 11.2 pin configuration .................................................................................................... 433 table 11.3 register configuration ............................................................................................ 434 table 11.4 cclr0 to cclr2 (channels 0, 3, and 4)............................................................... 439 table 11.5 cclr0 to cclr2 (cha nnels 1 a nd 2) .................................................................... 439 table 11.6 tpsc0 to tpsc2 (channel 0)................................................................................. 440 table 11.7 tpsc0 to tpsc2 (channel 1)................................................................................. 440 table 11.8 tpsc0 to tpsc2 (channel 2)................................................................................. 441 table 11.9 tpsc0 to tpsc2 (channels 3 and 4)...................................................................... 441 table 11.10 tpsc1 and tpsc0 (channel 5) .............................................................................. 442 table 11.11 setting of operation mode by bits md0 to md3................................................... 444 table 11.12 tiorh_0 (channel 0)............................................................................................. 447 table 11.13 tiorl_0 (channel 0) ............................................................................................. 448 table 11.14 tior_1 (channel 1)................................................................................................ 449 table 11.15 tior_2 (channel 2)................................................................................................ 450 table 11.16 tiorh_3 (channel 3)............................................................................................. 451 table 11.17 tiorl_3 (channel 3) ............................................................................................. 452 table 11.18 tiorh_4 (channel 4)............................................................................................. 453 table 11.19 tiorl_4 (channel 4) ............................................................................................. 454 table 11.20 tiorh_0 (channel 0)............................................................................................. 455 table 11.21 tiorl_0 (channel 0) ............................................................................................. 456 table 11.22 tior_1 (channel 1)................................................................................................ 457 table 11.23 tior_2 (channel 2)................................................................................................ 458 table 11.24 tiorh_3 (channel 3)............................................................................................. 459 table 11.25 tiorl_3 (channel 3) ............................................................................................. 460 table 11.26 tiorh_4 (channel 4)............................................................................................. 461 table 11.27 tiorl_4 (channel 4) ............................................................................................. 462 table 11.28 tioru_5, tiorv_5, and tiorw_5 (channel 5)................................................. 463 table 11.29 setting of transfer timing by bf1 and bf0 bits ................................................... 485 table 11.30 output level sel ect function.................................................................................. 498 table 11.31 output level sel ect function.................................................................................. 499 table 11.32 setting of bits bf1 and bf0 ................................................................................... 501 table 11.33 tioc4d output level select function................................................................... 501 table 11.34 tioc4b output level select function................................................................... 502 table 11.35 tioc4c output level select function................................................................... 502 table 11.36 tioc4a output level select function................................................................... 502 table 11.37 tioc3d output level select function................................................................... 502 table 11.38 tioc4b output level select function................................................................... 503
page lii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 table 11.39 output level sel ect function ................................................................................... 506 table 11.40 setting of interrupt skipping count by bits 3acor2 to 3acor0........................ 509 table 11.41 setting of interrupt skipping count by bits 4vcor2 to 4vcor0........................ 509 table 11.42 setting of bits bte1 and bte0.............................................................................. 512 table 11.43 register combinations in buffer operation............................................................ 525 table 11.44 cascaded combinations .......................................................................................... 529 table 11.45 ticcr setting and input capture input pins.......................................................... 530 table 11.46 pwm output registers and output pins................................................................. 535 table 11.47 phase counting mode clock input pins.................................................................. 539 table 11.48 up/down-count conditions in phase counting mode 1 ........................................ 540 table 11.49 up/down-count conditions in phase counting mode 2 ........................................ 541 table 11.50 up/down-count conditions in phase counting mode 3 ........................................ 542 table 11.51 up/down-count conditions in phase counting mode 4 ........................................ 543 table 11.52 output pins for reset- synchronized pwm mode .................................................. 546 table 11.53 register settings for reset-synchronized pwm mode .......................................... 546 table 11.54 output pins for complementary pwm mode......................................................... 549 table 11.55 register settings for complementary pwm mode................................................. 550 table 11.56 registers and counters re quiring initialization...................................................... 556 table 11.57 mtu2 interrupts ..................................................................................................... 608 table 11.58 interrupt sources and a/d converter start request signals................................... 611 table 11.59 mode transition combinations............................................................................... 643 section 12 multi-function timer pulse unit 2s (mtu2s) table 12.1 mtu2s functions................................................................................................... 676 table 12.2 pin configuration.................................................................................................... 679 table 12.3 register configuration ............................................................................................ 680 section 13 port output enable (poe) table 13.1 pin configuration.................................................................................................... 685 table 13.2 pin combinations .................................................................................................... 686 table 13.3 register configuration ............................................................................................ 687 table 13.4 target pins and c onditions for high-impedance control....................................... 709 table 13.5 interrupt sources and conditions ............................................................................ 714 section 14 watchdog timer (wdt) table 14.1 wdt pin configuration.......................................................................................... 719 table 14.2 register configuration ............................................................................................ 720 table 14.3 interrupt source....................................................................................................... 726
r01uh0198ej0500 rev. 5.00 page liii of lviii mar 18, 2011 section 15 serial comm unication interface (sci) table 15.1 pin configuration .................................................................................................... 729 table 15.2 register configuration ............................................................................................ 730 table 15.3 scsmr sett ings...................................................................................................... 748 table 15.4 bit rates and scbrr settings in asynchronous mode (1).................................... 749 table 15.5 bit rates and scbrr settings in asynchronous mode (2).................................... 750 table 15.6 bit rates and scbrr settings in asynchronous mode (3).................................... 751 table 15.7 bit rates and scbrr settings in clock synchronous mode (1)............................ 752 table 15.8 bit rates and scbrr settings in clock synchronous mode (2)............................ 753 table 15.9 bit rates and scbrr settings in clock synchronous mode (3)............................ 754 table 15.10 maximum bit rates for various frequencies with baud rate generator (asynchronous mode) ...................................................................................................... 755 table 15.11 maximum bit rates with external cl ock input (asynchronous mode) ................. 756 table 15.12 maximum bit rates with external cloc k input (clock synchronous mode) ......... 757 table 15.13 scsmr settings and sci communication formats ............................................... 759 table 15.14 scsmr and scscr settings and sci clock source selection ............................. 759 table 15.15 serial transfer formats (asynchronous mode) ...................................................... 761 table 15.16 receive errors and error conditions ...................................................................... 769 table 15.17 sci interrupt sources .............................................................................................. 786 table 15.18 scssr status flag values and transfer of received data .................................... 788 section 16 serial communicati on interface with fifo (scif) table 16.1 pin configuration .................................................................................................... 795 table 16.2 register configuration ............................................................................................ 796 table 16.3 scsmr sett ings...................................................................................................... 815 table 16.4 bit rates and scbrr settings in asynchronous mode ......................................... 816 table 16.5 bit rates and scbrr settings in asynchronous mode ......................................... 817 table 16.6 bit rates and scbrr settings in asynchronous mode ......................................... 818 table 16.7 bit rates and scbrr settings in clock synchronous mode ................................. 819 table 16.8 bit rates and scbrr settings in clock synchronous mode ................................. 820 table 16.9 bit rates and scbrr settings in clock synchronous mode ................................. 821 table 16.10 maximum bit rates for various frequencies with baud rate generator (asynchronous mode) ...................................................................................................... 822 table 16.11 maximum bit rates with external cl ock input (asynchronous mode) ................. 823 table 16.12 maximum bit rates with external cloc k input (clock synchronous mode) ......... 824 table 16.13 scsmr settings and scif communication formats ............................................. 834 table 16.14 scsmr and scscr settings and scif clock source selection ........................... 834 table 16.15 serial communication format s (asynchronous mode) .......................................... 836 table 16.16 scif interrupt sources............................................................................................ 854
page liv of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 section 17 synchronous serial communication unit (ssu) table 17.1 pin configuration.................................................................................................... 865 table 17.2 register configuration ............................................................................................ 866 table 17.3 setting of dats bits in sscrl and corresponding sstdr ................................ 877 table 17.4 setting of dats bit in sscrl and corresponding ssrdr.................................. 878 table 17.5 communication modes and pin stat es of ssi and sso pins.................................. 883 table 17.6 communication modes and pin states of ssck pin .............................................. 884 table 17.7 communication modes and pin states of scs pin ................................................. 884 table 17.8 ssu interrupt sources............................................................................................. 902 section 18 i 2 c bus interface 2 (i 2 c2) table 18.1 i 2 c bus interface pin configuration........................................................................ 908 table 18.2 register configuration ............................................................................................ 909 table 18.3 transfer rate........................................................................................................... 911 table 18.4 interrupt requests ................................................................................................... 944 table 18.5 example of proce ssing using dtc......................................................................... 945 table 18.6 time for monitoring scl ....................................................................................... 946 section 19 a/d converter (adc) table 19.1 pin configuration.................................................................................................... 953 table 19.2 register configuration ............................................................................................ 954 table 19.3 channel select list ................................................................................................. 960 table 19.4 a/d conversion time (single m ode) ..................................................................... 971 table 19.5 a/d conversion time (scan mode) ....................................................................... 971 table 19.6 a/d converter interrupt source .............................................................................. 974 table 19.7 analog pin speci fications ....................................................................................... 980 section 20 compare match timer (cmt) table 20.1 register configuration ............................................................................................ 982 table 20.2 interrupt source....................................................................................................... 987 section 21 pin function controller (pfc) table 21.1 sh7083 multiplexed pins (port a) ......................................................................... 993 table 21.2 sh7084 multiplexed pins (port a) ......................................................................... 993 table 21.3 sh7085 multiplexed pins (port a) ......................................................................... 994 table 21.4 sh7086 multiplexed pins (port a) ......................................................................... 995 table 21.5 sh7083 multiplexed pins (port b) ......................................................................... 997 table 21.6 sh7084/sh7085/sh7086 multiplexe d pins (port b) ............................................. 997 table 21.7 sh7083/sh7084/sh7085 multiplexe d pins (port c) ............................................. 998 table 21.8 sh7086 multiplexed pins (port c) ......................................................................... 998
r01uh0198ej0500 rev. 5.00 page lv of lviii mar 18, 2011 table 21.9 sh7083/sh7084 multiplexed pins (port d) ........................................................... 999 table 21.10 sh7085/sh7086 multiplexed pins (port d) ......................................................... 1000 table 21.11 sh7083 multiplexed pins (port e)........................................................................ 1002 table 21.12 sh7084 multiplexed pins (port e)........................................................................ 1003 table 21.13 sh7085 multiplexed pins (port e)........................................................................ 1004 table 21.14 sh7086 multiplexed pins (port e)........................................................................ 1005 table 21.15 sh7083/sh7084/sh7085 multiplexe d pins (port f)............................................ 1006 table 21.16 sh7086 multiplexed pins (port f) ........................................................................ 1007 table 21.17 sh7083 pin functions in each operating mode (1)............................................. 1008 table 21.17 sh7083 pin functions in each operating mode (2)............................................. 1012 table 21.18 sh7084 pin functions in each operating mode (1)............................................. 1016 table 21.18 sh7084 pin functions in each operating mode (2)............................................. 1020 table 21.19 sh7085 pin functions in each operating mode (1)............................................. 1024 table 21.19 sh7085 pin functions in each operating mode (2)............................................. 1029 table 21.20 sh7086 pin functions in each operating mode (1)............................................. 1034 table 21.20 sh7086 pin functions in each operating mode (2)............................................. 1040 table 21.21 register conf iguration .......................................................................................... 1046 table 21.22 transmit forms of input functions allocated to multiple pins............................ 1168 section 22 i/o ports table 22.1 register conf iguration .......................................................................................... 1174 table 22.2 port a data register (padr) read/write operations.......................................... 1180 table 22.3 register conf iguration .......................................................................................... 1186 table 22.4 port b data register l (pbd rl) read/write operations .................................... 1188 table 22.5 register conf iguration .......................................................................................... 1193 table 22.6 port c data register (pcdr) read/write operations .......................................... 1196 table 22.7 register conf iguration .......................................................................................... 1201 table 22.8 port d data register (pddr) read/write operations.......................................... 1204 table 22.9 register conf iguration .......................................................................................... 1211 table 22.10 port e data register (pedr) read/write operations .......................................... 1215 table 22.11 register conf iguration .......................................................................................... 1220 table 22.12 port f data register l (pfdrl) read/write operations ..................................... 1222 section 23 flash memory table 23.1 (1) relationship between fwe and md pins and operating modes (sh7083 and sh7084).................................................................................................... 1227 table 23.1 (2) relationship between fwe and md pins and operating modes (sh7085 and sh7086).................................................................................................... 1227 table 23.2 comparison of progr amming m odes .................................................................... 1228 table 23.3 pin configur ation .................................................................................................. 1233
page lvi of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011 table 23.4 (1) register conf iguration.................................................................................... 1234 table 23.4 (2) parameter conf iguration................................................................................. 1234 table 23.5 register/parameter and target mode .................................................................... 1235 table 23.6 usable parameters a nd target modes ................................................................... 1244 table 23.7 overlapping of ram area and user mat area.................................................. 1259 table 23.8 peripheral clock (p ) frequency that can automatically adjust bit rate of this lsi.............................................................................................................. 1261 table 23.9 hardware protection.............................................................................................. 1279 table 23.10 software protection............................................................................................... 1280 table 23.11 initiation intervals of user branch processing...................................................... 1289 table 23.12 initial user branch processing time..................................................................... 1289 table 23.13 inquiry and sel ection co mmands ......................................................................... 1295 table 23.14 programming and er asure commands.................................................................. 1309 table 23.15 status c odes .......................................................................................................... 1320 table 23.16 error c odes ........................................................................................................... 1321 table 23.17 executable mat ................................................................................................... 1322 table 23.18 (1) usable area for programming in user program mode............................... 1323 table 23.18 (2) usable area for erasure in user program mode ........................................ 1324 table 23.18 (3) usable area for programming in user boot mode..................................... 1325 table 23.18 (3) usable area for programming in user boot mode (cont) .......................... 1326 table 23.18 (4) usable area for erasure in user boot mode .............................................. 1327 table 23.18 (4) usable area for erasure in user boot mode (cont).................................... 1328 section 26 power-down modes table 26.1 states of power-down modes............................................................................... 1336 table 26.2 pin configur ation.................................................................................................. 1337 table 26.3 register conf iguration .......................................................................................... 1338 section 28 electrical characteristics table 28.1 absolute maxi mum rati ngs.................................................................................. 1411 table 28.2 dc characteristics ................................................................................................ 1412 table 28.3 dc characteristics ................................................................................................ 1415 table 28.4 permitted output current values .......................................................................... 1418 table 28.5 maximum operatin g freque ncy ........................................................................... 1419 table 28.6 clock ti ming ........................................................................................................ 1420 table 28.7 control signa l timing........................................................................................... 1423 table 28.8 bus timi ng............................................................................................................ 1426 table 28.9 direct memory access controller (dmac) timing ............................................ 1463 table 28.10 multi function timer pulse unit 2 (mtu2) timing ............................................ 1464 table 28.11 multi function timer pulse un it 2s (mtu2s) timing........................................ 1466
r01uh0198ej0500 rev. 5.00 page lvii of lviii mar 18, 2011 table 28.12 i/o port timing ..................................................................................................... 1467 table 28.13 watchdog timer (w dt) timi ng .......................................................................... 1468 table 28.14 serial communication inte rface (sci) timing ..................................................... 1469 table 28.15 serial communication interface with fifo (scif) timing ................................. 1471 table 28.16 synchronous serial communi cation unit (ssu ) timing ..................................... 1473 table 28.17 port output enable (poe) ti ming ........................................................................ 1476 table 28.18 i 2 c bus interface 2 (i 2 c2) timi ng ......................................................................... 1477 table 28.19 ubc trigger timing............................................................................................. 1479 table 28.20 a/d converter timing .......................................................................................... 1480 table 28.21 a/d converter characteristics .............................................................................. 1482 table 28.22 flash memory characteristics............................................................................... 1483 appendix table a.1 pin states (sh7083) .............................................................................................. 1485 table a.2 pin states (sh7084) .............................................................................................. 1491 table a.3 pin states (sh7085) .............................................................................................. 1497 table a.4 pin states (sh7086) .............................................................................................. 1506 table b.1 processing of u nused pi ns .................................................................................... 1515 table c.1 pin states of bus re lated signals (1) .................................................................... 1516 table c.1 pin states of bus re lated signals (2) .................................................................... 1517 table c.1 pin states of bus re lated signals (3) .................................................................... 1519 table c.1 pin states of bus re lated signals (4) .................................................................... 1520 table c.1 pin states of bus re lated signals (5) .................................................................... 1522 table c.1 pin states of bus re lated signals (6) .................................................................... 1523 table c.1 pin states of bus re lated signals (7) .................................................................... 1525 table c.1 pin states of bus re lated signals (8) .................................................................... 1526 table c.1 pin states of bus re lated signals (9) .................................................................... 1528 table c.1 pin states of bus re lated signals (10) .................................................................. 1529 table c.1 pin states of bus re lated signals (11) .................................................................. 1531 table c.1 pin states of bus re lated signals (12) .................................................................. 1533 table c.1 pin states of bus re lated signals (13) .................................................................. 1534 table c.1 pin states of bus re lated signals (14) .................................................................. 1536 table c.1 pin states of bus re lated signals (15) .................................................................. 1538 table d.1 product code lineup............................................................................................. 1540
page lviii of lviii r01uh0198ej0500 rev. 5.00 mar 18, 2011
section 1 overview r01uh0198ej0500 rev. 5.00 page 1 of 1560 mar 18, 2011 sh7080 group section 1 overview 1.1 features of sh7083, sh7084, sh7085, and sh7086 this lsi is a single-chip risc (reduced instruction set computer) microcomputer that integrates a renesas original risc cpu core with peripheral functions required for system configuration. the cpu in this lsi has a risc-type instruction set. most instructions can be executed in one state (one system clock cycle), which greatly im proves instruction execu tion speed. in addition, the 32-bit internal-bus architecture enhances data processing power. with this cpu, it has become possible to assemble low-cost, high-performance, and high-functioning systems, even for applications that were previously impossible w ith microcomputers, such as real-time control, which demands high speeds. in addition, this lsi includes on-chip peripheral functions necessary for system configuration, such as large-capacity rom and ram, a dir ect memory access controller (dmac), a data transfer controller (dtc), timers, a serial co mmunication interface (sci), a serial communication interface with fifo (scif), a synchronous serial communication unit (ssu), an a/d converter, an interrupt controller (intc), i/o ports, and an i 2 c bus interface 2 (i 2 c2). this lsi also provides an external memory access support function to enable direct connection to various memory devices or peripheral lsis. these on-chip functions significantly reduces costs of designing and manufacturing application systems. in terms of on-chip rom, f-ztat tm (flexible zero turn around time)* version incorporating flash memory and mask rom version are available. the flash memory can be programmed with a programmer that supports programming of this lsi, and can also be programmed and erased by software. this enables lsi chip to be re-programmed at a user-site while mounted on a board. the features of this lsi are listed in table 1.1. note: * f-ztat tm is a trademark of renesas electronics corp.
section 1 overview page 2 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 1.1 features items specification cpu ? central processing unit with an internal 32-bit risc (reduced instruction set computer) architecture ? instruction length: 16-bit fixed length for improved code efficiency ? load-store architecture (basic operations are executed between registers) ? sixteen 32-bit general registers ? five-stage pipeline ? on-chip multiplier: multiplication operations (32 bits 32 bits 64 bits) executed in two to five cycles ? c language-oriented 62 basic instructions note: some specifications on slot illegal instruction exception handling in this lsi differ from those of the conventional sh-2. for details, see section 5.8.4, notes on slot illegal instruction exception handling. operating modes ? operating modes ? single chip mode ? extended rom enabled mode ? extended rom disabled mode ? operating states ? program execution state ? exception handling state ? bus release state ? power-down modes ? sleep mode ? software standby mode ? deep software standby mode ? module standby mode user break controller (ubc) ? addresses, data values, type of access, and data size can all be set as break conditions ? supports a sequential break function ? two break channels on-chip rom ? 256 kbytes or 512 kbytes
section 1 overview r01uh0198ej0500 rev. 5.00 page 3 of 1560 mar 18, 2011 sh7080 group items specification on-chip ram ? 16 kbytes or 32 kbytes bus state controller (bsc) ? address space divided into nine areas: eight areas (cs0 to cs7), each a maximum of 64 mbytes, and one area (cs8) of a maximum of 1 gbytes (a total of three areas in sh7083, eight areas in sh7084/sh7085, and nine areas in sh7086) ? 8-bit external bus ? 16-bit external bus ? 32-bit external bus (only in sh7085/sh7086) ? the following features settable for each area independently ? bus size (8, 16, or 32 bits) ? number of access wait cycles ? idle wait cycle insertion ? specifying the memory to be connected to each area enables direct connection to sram, sram with byte selection, burst rom (clock synchronous or asynchronous), mpx-i/o, burst mpx-i/o, sdram, and pcmcia ? outputs a chip select signal according to the target area direct memory access controller (dmac) ? four channels ? external request available ? burst mode and cycle steal mode data transfer controller (dtc) ? data transfer activated by an on-chip peripheral module interrupt can be done independently of the cpu transfer. ? transfer mode selectable for each interrupt source (transfer mode is specified in memory) ? multiple data transfer enabled for one activation source ? various transfer modes normal mode, repeat mode, or block transfer mode can be selected. ? data transfer size can be specified as byte, word, or longword ? the interrupt that activated the dtc can be issued to the cpu. a cpu interrupt can be requested after one data transfer completion. ? a cpu interrupt can be requested after all specified data transfer completion.
section 1 overview page 4 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group items specification interrupt controller (intc) ? nine external interrupt pins (nmi and irq7 to irq0) ? on-chip peripheral interrupts: priority level set for each module ? vector addresses: a vector address for each interrupt source user debugging interface (h-udi) (only in f-ztat version) ? e10a emulator support advanced user debugger (aud) (only in f-ztat version supporting full functions of e10a) ? e10a emulator support clock pulse generator (cpg) ? clock mode: input clock can be selected from external input or crystal resonator ? five types of clocks generated: ? cpu clock: maximum 80 mhz ? bus clock: maximum 40 mhz ? peripheral clock: maximum 40 mhz ? mtu2 clock: maximum 40 mhz ? mtu2s clock: maximum 80 mhz watchdog timer (wdt) ? on-chip one-channel watchdog timer ? interrupt generation is supported.
section 1 overview r01uh0198ej0500 rev. 5.00 page 5 of 1560 mar 18, 2011 sh7080 group items specification multi-function timer pulse unit 2 (mtu2) ? maximum 16 lines (maximum 13 lines in sh7083) of pulse input/output and three lines of pulse input based on six channels of 16-bit timers ? 21 output compare and input capture registers ? a total of 21 independent comparators ? selection of eight counter input clocks ? input capture function ? pulse output modes toggle, pwm, complementary pwm, and reset-synchronized pwm modes ? synchronization of multiple counters ? complementary pwm output mode ? six-phase (four-phase in sh7083) non-overlapping waveforms output for inverter control ? automatic dead time setting ? 0% to 100% pwm duty cycle specifiable ? output suppression ? a/d conversion delaying function ? dead time compensation ? interrupt skipping at crest or trough ? reset-synchronized pwm mode three-phase pwm waveforms in positive and negative phases can be output with a required duty cycle ? phase counting mode two-phase encoder pulse counting available multi-function timer pulse unit 2s (mtu2s) ? subset of mtu2, including channels 3 to 5 ? operating at 80 mhz max. port output enable (poe) ? high-impedance control of waveform output pins in mtu2 and mtu2s compare match timer (cmt) ? 16-bit counters ? compare match interrupts can be generated ? two channels serial communication interface (sci) ? clock synchronous or asynchronous mode ? three channels
section 1 overview page 6 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group items specification serial communication interface with fifo (scif) ? clock synchronous or asynchronous mode ? separate 16-byte fifo registers for transmission and reception ? one channel synchronous serial communication unit (ssu) ? master mode or slave mode selectable ? standard mode or bidirectional mode selectable ? transmit/receive data length can be selected from 8, 16, and 32 bits. ? full-duplex communication (transmission and reception executed simultaneously) ? consecutive serial communication ? one channel i 2 c bus interface 2 (i 2 c2) (sh7084, sh7085, and sh7086 only) ? conforming to philips i 2 c bus interface ? master mode and slave mode supported ? continuous transfer ? i 2 c bus format or clock synchronous serial format selectable ? one channel a/d converter (adc) ? 10 bits 8 channels (in sh7083/sh7084/sh7085) ? 10 bits 16 channels (in sh7086) ? conversion request by external triggers, mtu2, or mtu2s ? two sample-and-hold function units (two channels can be sampled simultaneously) (in sh7083/sh7084/sh7085) ? three sample-and-hold function units (three channels can be sampled simultaneously) (in sh7086) i/o ports ? 65 general input/output pins and eight general input pins (sh7083) ? 76 general input/output pins and eight general input pins (sh7084) ? 100 general input/output pins and eight general input pins (sh7085) ? 118 general input/output pins and 16 general input pins (sh7086) ? input or output can be selected for each bit packages ? tqfp1414-100 (0.5 pitch) (sh7083) ? lqfp2020-112 (0.65 pitch) (sh7084) ? lqfp2020-144 (0.5 pitch) (sh7085) ? lqfp2424-176 (0.5 pitch) (sh7086) power supply voltage ? vcc: 3.0 to 3.6 v or 4.0 to 5.5 v ? avcc: 4.0 to 5.5 v
section 1 overview r01uh0198ej0500 rev. 5.00 page 7 of 1560 mar 18, 2011 sh7080 group 1.2 block diagram the block diagram of this lsi is shown in figure 1.1. sh2 cpu ubc aud * 2 bsc dmac i/o port (pfc) [legend] rom: on-chip rom ram: on-chip ram ubc: user break controller aud: advanced user debugger h-udi: user debugging interface intc: interrupt controller cpg: clock pulse generator wdt: watchdog timer cpu: central processing unit bsc: bus state controller dmac: direct memory access controller dtc: data transfer controller pfc: pin function controller mtu2: multi-function timer pulse unit 2 mtu2s: multi-function timer pulse unit 2 (subset) poe: port output enable sci: serial communication interface scif: serial communication interface with fifo ssu: synchronous serial communication unit i 2 c2: i 2 c bus interface 2 cmt: compare match timer adc: a/d converter intc wdt cpg dtc h-udi * 1 internal bus controller ram rom peripheral bus (p ) i bus (b ) l bus (i ) mtu2 mtu2s poe sci scif ssu i 2 c2 * 3 cmt adc power- down mode control external bus peripheral bus controller notes: 1. only in f-ztat version 2. only in f-ztat version supporting full functions of e10a 3. sh7084, sh7085, and sh7086 only figure 1.1 block diagram
section 1 overview page 8 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 1.3 pin assignments tqfp-100 (top view) pe0/dreq0/tioc0a/tms * 3 pe1/tend0/tioc0b/ trst * 3 pe2/dreq1/tioc0c/tdi * 3 pe3/tend1/tioc0d/tdo * 3 pe4/tioc1a/rxd3/tck * 3 v ss pf0/an0 pf1/an1 pf2/an2 pf3/an3 pf4/an4 pf5/an5 av ss pf6/an6 pf7/an7 avref av cc v ss v cc pe6/ cs7 /tioc2a/sck3 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe8/tioc3a/sck2/ssck pe10/tioc3c/txd2/sso pe12/tioc4a/txd3/ scs pe13/tioc4b/ mres / asebrkak * 3 / asebrk * 3 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 res pa15/ck pllv ss v cl v cc pb4/ rasl /irq2/ poe2 pb5/ casl /irq3/ poe3 v ss (fwe * 1 ) nmi md0 extal md1 xtal v ss pd0/d0 pd1/d1 pd2/d2/tic5u pd3/d3/tic5v pd4/d4/tic5w pd5/d5/tic5us v cc pd6/d6/tic5vs pd7/d7/tic5ws v ss pd8/d8/tioc3as/audata0 * 4 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 pd9/d9/tioc3bs/audata1 * 4 pd10/d10/tioc3cs/audata2 * 4 pd11/d11/tioc3ds/audata3 * 4 pd12/d12/tioc4as pd13/d13/tioc4bs pd14/d14/tioc4cs/audck * 4 pd15/d15/tioc4ds/ audsync * 4 pb6/a18/ back /irq4/rxd0 pb7/a19/ breq /irq5/txd0 pb8/a20/ wait /irq6/sck0 pa3/a24/rxd1 pa4/a23/txd1 pa5/a22/dreq1/irq1/sck1 pa7/ cs3 /tclkb pa8/rdwr/irq2/tclkc pa9/cke/irq3/tclkd pa10/ cs0 / poe4 v ss v cc pa12/ wrl /dqmll/ poe6 pa13/ wrh /dqmlu/ poe7 wdtovf pa14/ rd v cc ( asemd0 * 2 ) pb9/a21/irq7/ adtrg / poe8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 pe14/dack0/tioc4c pe15/cke/dack1/tioc4d/ irqout v ss pc0/a0 pc1/a1 pc2/a2 pc3/a3 pc4/a4 pc5/a5 pc6/a6 pc7/a7 pc8/a8 pc9/a9 pc10/a10 pc11/a11 pc12/a12 pc13/a13 pc14/a14 v cc v cl pc15/a15 pb0/a16/tic5ws pb1/a17/tic5w v ss pb2/irq0/ poe0 notes: 1. this pin is fixed to v ss in the mask rom and rom-less versions and is used as the fwe input pin in the f-ztat version. 2. this pin is for the e10a emulator. it is fixed to v cc in the mask rom and rom-less versions and is used as the asemd0 input pin in the f-ztat version. 3. these pin functions are only available in the f-ztat version (i.e., they are not available in the mask rom and rom-less ve rsions). 4. these pin functions are only available in the f-ztat version supporting full functions of e10a (not available in normal f- ztat version). figure 1.2 pin assignments of sh7083 (tqfp1414-100)
section 1 overview r01uh0198ej0500 rev. 5.00 page 9 of 1560 mar 18, 2011 sh7080 group lqfp-112 (top view) 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 1 2 3 4 5 6 7 8 9 1011 1213 1415 16 17 1819 2021 2223 24 25 2627 28 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 pd12/d12/tioc4as vss pd13/d13/tioc4bs pd14/d14/tioc4cs/audck * 4 pd15/d15/tioc4ds/ audsync * 4 pa0/ cs4 /rxd0 pa1/ cs5 /txd0 pa2/a25/dreq0/irq0/sck0 pa3/a24/rxd1 pa4/a23/txd1 pa5/a22/dreq1/irq1/sck1 pa6/ cs2 /tclka pa7/ cs3 /tclkb pa8/rdwr/irq2/tclkc pa9/cke/irq3/tclkd pa10/ cs0 / poe4 pa11/ cs1 / poe5 vss pa12/ wrl /dqmll/ poe6 vcc pa13/ wrh /dqmlu/ poe7 wdtovf pa14/ rd vcc ( asemd0 * 2 ) pb9/a21/irq7/ adtrg / poe8 pb8/a20/ wait /irq6/sck0 pb7/a19/ breq /irq5/txd0 pb6/a18/ back /irq4/rxd0 pe14/ ah /dack0/tioc4c pe15/cke/dack1/tioc4d/ irqout vss pc0/a0 pc1/a1 pc2/a2 pc3/a3 pc4/a4 pc5/a5 pc6/a6 pc7/a7 pc8/a8 pc9/a9 pc10/a10 pc11/a11 pc12/a12 pc13/a13 pc14/a14 pc15/a15 pb0/a16/tic5ws vcc pb1/a17/tic5w v c l pb2/irq0/ poe0 /scl pb3/irq1/ poe1 /sda pb4/ rasl /irq2/ poe2 vss pb5/ casl /irq3/ poe3 res pa15/ck pllvss vc l vcc pa17/ wait pa16/ ah /cke vss (fwe * 1 ) nmi md0 extal md1 xtal vss pd0/d0 pd1/d1 pd2/d2/tic5u pd3/d3/tic5v pd4/d4/tic5w vcc pd5/d5/tic5us pd6/d6/tic5vs pd7/d7/tic5ws vss pd8/d8/tioc3as/audata0 * 4 pd9/d9/tioc3bs/audata1 * 4 pd10/d10/tioc3cs/audata2 * 4 pd11/d11/tioc3ds/audata3 * 4 pe0/dreq0/tioc0a/tms * 3 pe1/tend0/tioc0b/ trst * 3 pe2/dreq1/tioc0c/tdi * 3 pe3/tend1/tioc0d/tdo * 3 pe4/tioc1a/rxd3/tck * 3 vss pf0/an0 pf1/an1 pf2/an2 pf3/an3 pf4/an4 pf5/an5 avss pf6/an6 pf7/an7 avcc vss pe5/ cs6 /tioc1b/txd3/ asebrkak * 3 / asebrk * 3 vcc pe6/ cs7 /tioc2a/sck3 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe8/tioc3a/sck2/ssck pe9/tioc3b/sck3/ rts3 pe10/tioc3c/txd2/sso vc l pe11/tioc3d/rxd3/ cts3 pe12/tioc4a/txd3/ scs pe13/tioc4b/ mres notes: 1. this pin is fixed to v ss in the mask rom and rom-less versions and is used as the fwe input pin in the f-ztat version. 2. this pin is for the e10a emulator. it is fixed to v cc in the mask rom and rom-less versions and is used as the asemd0 input pin in the f-ztat version. 3. these pin functions are only available in the f-ztat version (i.e., they are not available in the mask rom and rom-less ve rsions). 4. these pin functions are only available in the f-ztat version supporting full functions of e10a (not available in normal f- ztat version). figure 1.3 pin assignments of sh7084
section 1 overview page 10 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group lqfp-144 (top view) pa23/ wrhh / iciowr / ah /dqmuu/tic5w pe14/ wrhh / iciowr / ah /dqmuu/dack0/tioc4c pa22/ wrhl / iciord /dqmul/tic5v pa21/ cs5 / ce1a / casu /tic5u pe15/cke/dack1/tioc4d/ irqout vss pc0/a0 pc1/a1 pc2/a2 pc3/a3 pc4/a4 vcc pc5/a5 vss pc6/a6 pc7/a7 pc8/a8 pc9/a9 pc10/a10 pc11/a11 pc12/a12 pc13/a13 pc14/a14 pc15/a15 pb0/a16/tic5ws vcc pb1/a17/tic5w vss pa20/ cs4 / rasu pa19/ back /tend1 pb2/irq0/ poe0 /scl pb3/irq1/ poe1 /sda pa18/ breq /tend0 pb4/ rasl /irq2/ poe2 vss pb5/ casl /irq3/ poe3 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 res pa15/ck pllvss vc l vcc pa25/ ce2b /dack3/ poe8 pa24/ ce2a /dreq3 pa17/ wait /dack2 pa16/ wrhh / iciowr / ah /dqmuu/cke/dreq2/ audsync * 4 vss (fwe * 1 ) nmi md0 extal md1 xtal vss pd0/d0 pd1/d1 pd2/d2/tic5u pd3/d3/tic5v pd4/d4/tic5w vss pd5/d5/tic5us vcc pd6/d6/tic5vs pd7/d7/tic5ws pd8/d8/tioc3as pd9/d9/tioc3bs pd10/d10/tioc3cs vss pd11/d11/tioc3ds vcc pd12/d12/tioc4as pd13/d13/tioc4bs pd14/d14/tioc4cs pd15/d15/tioc4ds pe0/dreq0/tioc0a/audck * 4 pe1/tend0/tioc0b pe2/dreq1/tioc0c vcc pe3/tend1/tioc0d/audata3 * 4 pe4/ iois16 /tioc1a/rxd3/audata2 * 4 pe5/ cs6 / ce1b /tioc1b/txd3/audata1 * 4 pe6/ cs7 /tioc2a/sck3/audata0 * 4 vss pf0/an0 pf1/an1 pf2/an2 pf3/an3 pf4/an4 pf5/an5 avss pf6/an6 pf7/an7 avref avcc vss pa0/ cs4 /rxd0 pa1/ cs5 / ce1a /txd0 pa2/a25/dreq0/irq0/sck0 pa3/a24/rxd1 pa4/a23/txd1 vcc pa5/a22/dreq1/irq1/sck1 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe8/tioc3a/sck2/ssck/tms * 3 pe9/tioc3b/sck3/ rts3 / trst * 3 pe10/tioc3c/txd2/sso/tdi * 3 vc l pe11/tioc3d/rxd3/ cts3/ tdo * 3 pe12/tioc4a/txd3/ scs /tck * 3 pe13/tioc4b/ mres / asebrkak * 3 / asebrk * 3 pd16/d16/irq0/ poe4 /audata0 * 4 vss pd17/d17/irq1/ poe5 /audata1 * 4 pd18/d18/irq2/ poe6 /audata2 * 4 pd19/d19/irq3/ poe7 /audata3 * 4 pd20/d20/irq4/tic5ws pd21/d21/irq5/tic5vs pd22/d22/irq6/tic5us/audck * 4 pd23/d23/irq7/ audsync * 4 vcc pd24/d24/dreq0/tioc4ds vc l pd25/d25/dreq1/tioc4cs pd26/d26/dack0/tioc4bs pd27/d27/dack1/tioc4as pd28/d28/ cs2 /tioc3ds pd29/d29/ cs3 /tioc3bs vss pa6/ cs2 /tclka pa7/ cs3 /tclkb pa8/rdwr/irq2/tclkc pa9/ frame /cke/irq3/tclkd pa10/ cs0 / poe4 pa11/ cs1 / poe5 pa12/ wrl /dqmll/ poe6 pa13/ wrh / we /dqmlu/ poe7 pd30/d30/tioc3cs/ irqout pd31/d31/tioc3as/ adtrg wdtovf pa14/ rd vcc ( asemd0 * 2 ) pb9/a21/irq7/ adtrg / poe8 vcc pb8/a20/ wait /irq6/sck0 pb7/a19/ breq /irq5/txd0 pb6/a18/ back /irq4/rxd0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930313233343536 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 4 5 44 43 42 41 4 0 39 38 37 notes: 1. this pin is fixed to v ss in the mask rom and rom-less versions and is used as the fwe input pin in the f-ztat version. 2. this pin is for the e10a emulator. it is fixed to v cc in the mask rom and rom-less versions and is used as the asemd0 input pin in the f-ztat version. 3. these pin functions are only available in the f-ztat version (i.e., they are not available in the mask rom and rom-less ve rsions). 4. these pin functions are only available in the f-ztat version supporting full functions of e10a (not available in normal f- ztat version). figure 1.4 pin assignments of sh7085
section 1 overview r01uh0198ej0500 rev. 5.00 page 11 of 1560 mar 18, 2011 sh7080 group lqfp-176 (top view) pe12/tioc4a/txd3/ scs /tck * 3 pe13/tioc4b/ mres / asebrkak * 3 / asebrk * 3 pa23/ wrhh / iciowr / ah /dqmuu/tic5w pe14/ wrhh / iciowr / ah /dqmuu/dack0/tioc4c pa22/ wrhl / iciord /dqmul/tic5v pa21/ cs5 / ce1a / casu /tic5u pe15/cke/dack1/tioc4d/ irqout vss pe16/ cs8 /tioc3bs pe17/tioc3ds vcc pe18/tioc4as pe19/tioc4bs pe20/tioc4cs pe21/tioc4ds pc0/a0 pc1/a1 pc2/a2 pc3/a3 pc4/a4 vcc pc5/a5 vss pc6/a6 pc7/a7 pc8/a8 pc9/a9 pc10/a10 pc11/a11 pc12/a12 pc13/a13 pc14/a14 pc15/a15 pb0/a16/tic5ws vcc pb1/a17/tic5w vc l pa20/ cs4 / rasu pa19/ back /tend1 pb2/irq0/ poe0 /scl pb3/irq1/ poe1 /sda pa18/ breq /tend0 pb4/ rasl /irq2/ poe2 vss 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 res pa15/ck pllvss vc l vcc pa25/ ce2b /dack3/ poe8 pa24/ ce2a /dreq3 pa17/ wait /dack2 pa16/ wrhh / iciowr / ah /dqmuu/cke/dreq2/ audsync * 4 vss (fwe * 1 ) nmi md0 extal md1 xtal vss pd0/d0 pd1/d1 pd2/d2/tic5u pd3/d3/tic5v pd4/d4/tic5w pd5/d5/tic5us pd6/d6/tic5vs vcc pd7/d7/tic5ws pd8/d8/tioc3as pd9/d9/tioc3bs pd10/d10/tioc3cs vss pd11/d11/tioc3ds vcc pd12/d12/tioc4as pd13/d13/tioc4bs pd14/d14/tioc4cs pd15/d15/tioc4ds pd16/d16/irq0/ poe4 /audata0 * 4 vss pd17/d17/irq1/ poe5 /audata1 * 4 vcc pd18/d18/irq2/ poe6 /audata2 * 4 pd19/d19/irq3/ poe7 /audata3 * 4 pd20/d20/irq4/tic5ws pd21/d21/irq5/tic5vs pd22/d22/irq6/tic5us/audck * 4 pe0/dreq0/tioc0a/audck * 4 pe1/tend0/tioc0b pe2/dreq1/tioc0c vcc pe3/tend1/tioc0d/audata3 * 4 pe4/ iois16 /tioc1a/rxd3/audata2 * 4 pe5/ cs6 / ce1b /tioc1b/txd3/audata1 * 4 pe6/ cs7 /tioc2a/sck3/audata0 * 4 vss avss pf0/an0 pf1/an1 pf8/an8 pf9/an9 pf2/an2 pf3/an3 pf10/an10 pf11/an11 avcc pf4/an4 pf5/an5 pf12/an12 pf13/an13 avss pf6/an6 pf7/an7 pf14/an14 pf15/an15 avref avcc vss pa0/ cs4 /rxd0 pa1/ cs5 / ce1a /txd0 pa2/a25/dreq0/irq0/sck0 pa3/a24/rxd1 vcc pa4/a23/txd1 pa5/a22/dreq1/irq1/sck1 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe8/tioc3a/sck2/ssck/tms * 3 vc l pe9/tioc3b/sck3/ rts3 / trst * 3 pe10/tioc3c/txd2/sso/tdi * 3 pe11/tioc3d/rxd3/ cts3/ tdo * 3 pd23/d23/irq7/ audsync * 4 pd24/d24/dreq0/tioc4ds vss pd25/d25/dreq1/tioc4cs pd26/d26/dack0/tioc4bs pd27/d27/dack1/tioc4as pd28/d28/ cs2 /tioc3ds pd29/d29/ cs3 /tioc3bs pa6/ cs2 /tclka pa7/ cs3 /tclkb pa8/rdwr/irq2/tclkc pa9/ frame /cke/irq3/tclkd pa10/ cs0 / poe4 pa11/ cs1 / poe5 vcc pa12/ wrl /dqmll/ poe6 pa13/ wrh /dqmlu/ we / poe7 vc l pd30/d30/tioc3cs/ irqout pd31/d31/tioc3as/ adtrg pa29/a29/irq3 pa28/a28/irq2 vcc pa27/a27/irq1 vss pa26/a26/irq0 pc25/a25 pc24/a24 pc23/a23 pc22/a22 pc21/a21 vss pc20/a20 pc19/a19 pc18/a18 wdtovf pa14/ rd vcc ( asemd0 * 2 ) pb9/a21/irq7/ adtrg / poe8 pb8/a20/ wait /irq6/sck0 vcc pb7/a19/ breq /irq5/txd0 pb6/a18/ back /irq4/rxd0 pb5/ casl /irq3/ poe3 1234567891011121314151617181920212223242526272829303132333435363738394041424344 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 8 7 8 6 8 5 8 4 8 3 8 2 8 1 8 0 7 9 7 8 7 7 7 6 7 5 7 4 7 3 7 2 7 1 7 0 6 9 6 8 6 7 66 6 5 6 4 6 3 6 2 6 1 6 0 5 9 5 8 5 7 5 6 5 5 5 4 5 3 5 2 5 1 5 0 4 9 4 8 4 7 4 6 4 5 notes: 1. this pin is fixed to v ss in the mask rom and rom-less versions and is used as the fwe input pin in the f-ztat version. 2. this pin is for the e10a emulator. it is fixed to v cc in the mask rom and rom-less versions and is used as the asemd0 input pin in the f-ztat version. 3. these pin functions are only available in the f-ztat version (i.e., they are not available in the mask rom and rom-less ve rsions). 4. these pin functions are only available in the f-ztat version supporting full functions of e10a (not available in normal f- ztat version). figure 1.5 pin assignments of sh7086
section 1 overview page 12 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group nc pe1 pe4 pf1 pf4 pf6 nc vcc pe8 pe13 nc 11 10 9 8 7 6 5 4 3 2 1 pa15 pe0 pe3 pf0 pf5 pf7 avcc pe7 pe12 pe14 pe15 vcc pllvss res vss pf3 avss vss pe10 nc pc0 pc1 vss (fwe * 1 ) pb4 v cl pe2 pf2 avref pe6 vss nc pc2 pc3 extal md0 nmi pb5 pc4 pc5 pc7 pc6 xtal md1 nc nc pc11 pc8 pc10 pc9 pd0 vss pd1 pd2 v cl pc14 pc13 pc12 pd3 pd4 pd5 pd7 pd14 pb8 pa10 pa14 pb1 pc15 vcc vcc pd6 nc pd11 pb6 pa5 pa9 pa12 pb2 nc pb0 vss pd8 pd10 pd13 nc pa3 pa7 vcc wdtovf pb9 vss nc pd9 pd12 pd15 pb7 pa4 pa8 vss pa13 vss ( asemd0 * 2 ) nc abcdefghjkl p-lfbga-112 * 3 (top view) index notes: 1. this pin is fixed to vss in the mask rom version and is used as the fwe input pin in the f-ztat version. 2. this pin is for the e10a emulator. it is fixed to v cc in the mask rom version and is used as the asemd0 input pin in the f-ztat version. 3. the multiplexing of pin functions is the same as for the tqfp1414-100. for details on the pin-multiplexed functions, see the manual for the tqfp1414-100. figure 1.6 pin assignments of sh7083 (p-lfbga-112)
section 1 overview r01uh0198ej0500 rev. 5.00 page 13 of 1560 mar 18, 2011 sh7080 group 1.4 pin functions table 1.2 summarizes the pin functions. table 1.2 pin functions classification symbol i/o name function vcc i power supply power supply pins. connect all vcc pins to the system. there will be no operation if any pins are open. vss i ground ground pin. connect all vss pins to the system power supply (0v). there will be no operation if any pins are open. power supply v cl o power supply for internal power- down external capacitance pins for internal power-down power supply. connect these pins to vss via a 0.47 f capacitor (placed close to the pins). pllvss i pll ground ground pin for the on-chip pll oscillator extal i external clock connected to a crystal resonator. an external clock signal may also be input to the extal pin. clock xtal o crystal connected to a crystal resonator. ck o system clock supplies the system clock to external devices. operating mode control md1, md0 i mode set sets the operating mode. do not change values on these pins during operation. fwe i flash memory write enable pin for flash memory. flash memory can be protected against programming or erasure through this pin.
section 1 overview page 14 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group classification symbol i/o name function res i power-on reset when low, this lsi enters the power- on reset state. mres i manual reset when low, this lsi enters the manual reset state. wdtovf o watchdog timer overflow output signal for the watchdog timer overflow. if this pin need to be pulled down, use the resistor larger than 1 m to pull this pin down. breq i bus-mastership request low when an external device requests the release of the bus mastership. system control back o bus-mastership request acknowledge indicates that the bus mastership has been released to an external device. reception of the back signal informs the device which has output the breq signal that it has acquired the bus. nmi i non-maskable interrupt non-maskable interrupt request pin. fix to high or low level when not in use. interrupts irq7 to irq0 i interrupt requests 7 to 0 maskable interrupt request pin. selectable as level input or edge input. the rising edge, falling edge, and both edges are selectable as edges. irqout o interrupt request output shows that an interrupt cause has occurred. the interrupt cause can be recognized even in the bus release state. address bus a29 to a0 o a ddress bus outputs addresses. a24 to a0 are available in the sh7083. a25 to a0 are available in the sh7084/sh7085. data bus d31 to d0 i/o data bus 32-bit bidirectional bus. d15 to d0 are available in the sh7083/sh7084.
section 1 overview r01uh0198ej0500 rev. 5.00 page 15 of 1560 mar 18, 2011 sh7080 group classification symbol i/o name function cs8 to cs0 o chip select 8 to 0 chip-select signal for external memory or devices. cs7 , cs3 , and cs0 are available in the sh7083. cs7 to cs0 are available in the sh7084/sh7085. bus control rd o read indicates reading of data from external devices. rdwr o read/write read/write signal bs o bus start bus-cycle start ah o address hold address hold timing signal for the device that uses the address/data- multiplexed bus. available only in the sh7084/sh7085/sh7086. frame o frame signal in burst mpx-i/o interface mode, negated before the last bus cycle to indicate that the next bus cycle is the last access. available only in the sh7085/sh7086. wrhh o write to hh byte indicates a write access to bits 31 to 24 of the external data. available only in the sh7085/sh7086. wrhl o write to hl byte indicates a write access to bits 23 to 16 of the external data. available only in the sh7085/sh7086. wrh o write to upper byte indicates a write access to bits 15 to 8 of the external data. wrl o write to lower byte indicates a write access to bits 7 to 0 of the external data. wait i wait input signal for inserting a wait cycle into the bus cycles during access to the external space.
section 1 overview page 16 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group classification symbol i/o name function bus control rasl o ras connected to the ras pin of the sdram. rasu o ras connected to the ras pin of the sdram. available only in the sh7085/sh7086. casl o cas connected to the cas pin of the sdram. casu o cas connected to the cas pin of the sdram. available only in the sh7085/sh7086. cke o clock enable connected to the cke pin of the sdram. dqmuu o hh byte selection selects bits 31 to 24 of the sdram data bus. available only in the sh7085/sh7086. dqmul o hl byte selection selects bits 23 to 16 of the sdram data bus. available only in the sh7085/sh7086. dqmlu o upper byte selection selects bits 15 to 8 of the sdram data bus. dqmll o lower byte selection selects bits 7 to 0 of the sdram data bus. ce1a o lower byte selection for pcmcia card chip enable for pcmcia connected to area 5 available only in the sh7085/sh7086. ce1b o lower byte selection for pcmcia card chip enable for pcmcia connected to area 6 available only in the sh7085/sh7086.
section 1 overview r01uh0198ej0500 rev. 5.00 page 17 of 1560 mar 18, 2011 sh7080 group classification symbol i/o name function bus control ce2a o upper byte selection for pcmcia card chip enable for pcmcia connected to area 5 available only in the sh7085/sh7086. ce2b o upper byte selection for pcmcia card chip enable for pcmcia connected to area 6 available only in the sh7085/sh7086. iciowr o write strobe for pcmcia i/o connected to the pcmcia i/o write strobe signal available only in the sh7085/sh7086. iciord o read strobe for pcmcia i/o connected to the pcmcia i/o read strobe signal available only in the sh7085/sh7086. we o write strobe for pcmcia memory connected to the pcmcia memory write strobe signal available only in the sh7085/sh7086. iois16 i pcmcia dynamic bus sizing indicates 16-bit i/o for pcmcia in little endian mode. this lsi does not support little endian and this pin must be held low. available only in the sh7085/sh7086. direct memory access controller (dmac) dreq3 to dreq0 i dma-transfer request input pins to receive external requests for dma transfer. only dreq1 and dreq0 are available in the sh7083/sh7084. dack3 to dack0 o dma-transfer strobe strobe signal output pins for the external device that has requested dma transfer. only dack1 and dack0 are available in the sh7083/sh7084. tend1, tend0 o dma-transfer end output pins for dma transfer end signals
section 1 overview page 18 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group classification symbol i/o name function tclka, tclkb, tclkc, tclkd i mtu2 timer clock input external clock input pins for the timer. only tclkb, tclkc, and tclkd are available in the sh7083. tioc0a, tioc0b, tioc0c, tioc0d i/o mtu2 input capture/output compare (channel 0) the tgra_0 to tgrd_0 input capture input/output compare output/pwm output pins. tioc1a, tioc1b i/o mtu2 input capture/output compare (channel 1) the tgra_1 to tgrb_1 input capture input/output compare output/pwm output pins. only tioc1a is available in the sh7083. tioc2a, tioc2b i/o mtu2 input capture/output compare (channel 2) the tgra_2 to tgrb_2 input capture input/output compare output/pwm output pins. tioc3a, tioc3b, tioc3c, tioc3d i/o mtu2 input capture/output compare (channel 3) the tgra_3 to tgrd_3 input capture input/output compare output/pwm output pins. only tioc3a and tioc3c are available in the sh7083. tioc4a, tioc4b, tioc4c, tioc4d i/o mtu2 input capture/output compare (channel 4) the tgra_4 to tgrd_4 input capture input/output compare output/pwm output pins. multi function timer- pulse unit 2 (mtu2) tic5u, tic5v, tic5w i mtu2 input capture (channel 5) the tgru_5, tgrv_5, and tgrw_5 input capture input pins. multi function timer- pulse unit 2s (mtu2s) tioc3as, tioc3bs, tioc3cs, tioc3ds i/o mtu2s input capture/output compare (channel 3) the tgra_3s to tgrd_3s input capture input/output compare output/pwm output pins. tioc4as, tioc4bs, tioc4cs, tioc4ds i/o mtu2s input capture/output compare (channel 4) the tgra_4s to tgrd_4s input capture input/output compare output/pwm output pins.
section 1 overview r01uh0198ej0500 rev. 5.00 page 19 of 1560 mar 18, 2011 sh7080 group classification symbol i/o name function multi function timer- pulse unit 2s (mtu2s) tic5us, tic5vs, tic5ws i mtu2s input capture (channel 5) the tgru_5s, tgrv_5s, and tgrw_5s input capture input pins. port output enable (poe) poe8 to poe0 i port output enable request signal input to place the mtu2 and mtu2s waveform output pins in high impedance state. poe8 to poe6 , poe4 to poe2 , and poe0 are available in the sh7083. txd2 to txd0 o transmit data transmit data output pins rxd2 to rxd0 i receive data receive data input pins serial communication interface (sci) sck2 to sck0 i/o serial clock clock input/output pins txd3 o transmit data transmit data output pin rxd3 i receive data receive data input pin sck3 i/o serial clock clock input/output pin rts3 o request to send modem control pin. this pin is not available in the sh7083. serial communication interface with fifo (scif) cts3 i clear to send modem control pin. this pin is not available in the sh7083. sso i/o data data input/output pin. ssi i/o data data input/output pin. ssck i/o clock clock input/output pin. synchronous serial communication unit (ssu) scs i/o chip select chip select input/output pin. i 2 c bus interface 2 (i 2 c2) scl i/o i 2 c clock input/output clock input/output pin for i 2 c bus. available only in the sh7084/sh7085/sh7086. sda i/o i 2 c data input/output data input/output pin for i 2 c bus. available only in the sh7084/sh7085/sh7086.
section 1 overview page 20 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group classification symbol i/o name function an15 to an0 i analog input pins analog input pins. an7 to an0 are available in the sh7083/sh7084/sh7085. adtrg i a/d conversion trigger input external trigger input pin for starting a/d conversion. avref i analog reference power supply reference voltage pin for the a/d converter. available only in the sh7083/sh7085/sh7086. (in the sh7084, this pin is connected to avcc inside this lsi.) avcc i analog power supply power supply pin for the a/d converter. connect all avcc pins to the system power supply (vcc) when the a/d converter is not used. the a/d converter does not work if any pin is open. a/d converter (adc) avss i analog ground ground pin for the a/d converter. connect it to the system ground (0 v). connect all avss pins to the system ground (0 v) correctly. the a/d converter does not work if any pin is open. i/o ports pa29 to pa0 i/o general port 30-bit general input/output port pins. pa15 to pa12, pa10 to pa7, and pa5 to pa3 are available in the sh7083. pa17 to pa0 are available in the sh7084. pa25 to pa0 are available in the sh7085. pb9 to pb0 i/o general port 10-bit general input/output port pins. pb9 to pb4 and pb2 to pb0 are available in the sh7083. pc25 to pc18, pc15 to pc0 i/o general port 24-bit general input/output port pins. pc15 to pc0 are available in the sh7083/sh7084/sh7085.
section 1 overview r01uh0198ej0500 rev. 5.00 page 21 of 1560 mar 18, 2011 sh7080 group classification symbol i/o name function pd31 to pd0 i/o general port 32-bit general input/output port pins. pd15 to pd0 are available in the sh7083/sh7084. pe21 to pe0 i/o general port 22-bit general input/output port pins. pe15 to pe12, pe10, pe8 to pe6, and pe4 to pe0 are available in the sh7083. pe15 to pe0 are available in the sh7084/sh7085. i/o ports pf15 to pf0 i general port 16-bit general input port pins. pf7 to pf0 are available in the sh7083/sh7084/sh7085. user break controller (ubc) ubctrg o user break trigger output trigger output pin for ubc condition match. tck i test clock test-clock input pin. tms i test mode select inputs the test-mode select signal. tdi i test data input serial input pin for instructions and data. tdo o test data output serial output pin for instructions and data. user debugging interface (h-udi) (only in the f-ztat version) trst i test reset initialization-signal input pin. audata3 to audata0 o aud data branch destination address output pins. audck o aud clock sync-clock output pin. advanced user debugger (aud) (only in f-ztat version supporting full functions of e10a) audsync o aud sync signal data start-position acknowledge- signal output pin.
section 1 overview page 22 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group classification symbol i/o name function e10a interface (only in the f-ztat version) asemd0 i ase mode sets the ase mode. when a low level is input, this lsi enters ase mode. when a high level is input, this lsi enters the normal mode. the emulator functions are available in ase mode. when no signal is input, this pin is pulled up inside this lsi. asebrk i break request e10a emulator break input pin. asebrkak o break mode acknowledge indicates that the e10a emulator has entered its break mode. note: the wdtovf pin should not be pulled down. when absolutely necessary, pull it down through a resistor of 1 m or larger.
section 2 cpu r01uh0198ej0500 rev. 5.00 page 23 of 1560 mar 18, 2011 sh7080 group section 2 cpu 2.1 features ? general registers: 32-bit register 16 ? basic instructions: 62 ? addressing modes: 11 register direct (rn) register indirect (@rn) post-increment register indirect (@rn + ) pre-decrement register indirect (@-rn) register indirect with displacement (@disp:4, rn) index register indirect (@r0, rn) gbr indirect with displacement (@disp:8, gbr) index gbr indirect (@r0, gbr) pc relative with disp lacement (@disp:8, pc) pc relative (disp:8/disp:12/rn) immediate (#imm:8)
section 2 cpu page 24 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2.2 register configuration there are three types of registers: general registers (32-bit 16), control registers (32-bit 3), and system registers (32-bit 4). 31 0 r0 * 1 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15, sp (hardware stack pointer)0 * 2 31 9 8 7 6 5 4 3 2 1 0 0 0 31 m gbr 31 vbr qi3i2i1i0 s t 31 0 mach 31 0 pr 31 0 pc macl notes: 1. r0 can be used as an index register in index register indirect or index gbr indirect addressing mode. for some instructions, only r0 is used as the source or destination register. 2. r15 is used as a hardware stack pointer during exception handling. general register (rn) status register (sr) global base register (gbr) vector base register (vbr) multiply and accumulate register (mac) procedure register (pr) program counter (pc) figure 2.1 cpu internal register configuration
section 2 cpu r01uh0198ej0500 rev. 5.00 page 25 of 1560 mar 18, 2011 sh7080 group 2.2.1 general registers (rn) there are sixteen 32-bit general registers (rn), designated r0 to r15. the general registers are used for data processing and address calculation. r0 is also used as an index register. with a number of instructions, r0 is the only register that can be used. r15 is used as a hardware stack pointer (sp). in exception handling, r15 is used for accessing the stack to save or restore the status register (sr) and program counter (pc) values. 2.2.2 control registers there are three 32-bit control registers, designated status register (sr), global base register (gbr), and vector base register (vbr). sr indi cates a processing state. gbr is used as a base address in gbr indirect addressing mode for data transfer of on-chip peripheral module registers. vbr is used as a base address of the exception handling (including interrupts) vector table. ? status register (sr) 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 bit: initial value: r/w: 1514131211109876543210 bit: initial value: r/w: 0000000000000000 rrrrrrrrrrrrrrrr 000000 - - 111100 - - rrrrrrr/wr/wr/wr/wr/wr/wrrr/wr/w ---------------- - - - - - - m q i[3:0] - - s t bit bit name default read/ write description 31 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 m undefined r/w used by the div0u, div0s, and div1 instructions. 8 q undefined r/w used by the div0u, div0s, and div1 instructions. 7 to 4 i[3:0] 1111 r/w interrupt mask 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 2 cpu page 26 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name default read/ write description 1 s undefined r/w s bit used by the multiply and accumulate instruction. 0 t undefined r/w t bit indicates true (1) or false (0) in the following instructions: movt, cmp/cond, tas, tst, bt (bt/s), bf (bf/s), sett, clrt indicates carry, borrow, overflow, or underflow in the following instructions: addv, addc, subv, subc, negc, div0u, div0s, di v1, shar, shal, shlr, shll, rotr, rotl , rotcr, rotcl ? global-base register (gbr) this register indicates a base address in gbr indirect addressing mode. the gbr indirect addressing mode is used for data transfer of the on-chip peripheral module registers and logic operations. ? vector-base register (vbr) this register indicates the base addre ss of the exception handling vector table.
section 2 cpu r01uh0198ej0500 rev. 5.00 page 27 of 1560 mar 18, 2011 sh7080 group 2.2.3 system registers there are four 32-bit system registers, designated two multiply and accumulate registers (mach and macl), a procedure register (pr), and program counter (pc). ? multiply and accumulate registers (mach and macl) this register stores the results of multip lication and multiply-and-accumulate operation. ? procedure register (pr) this register stores the return-destination address from subroutine procedures. ? program counter (pc) the pc indicates the point which is four bytes (two instructions) af ter the current execution instruction. 2.2.4 initial values of registers table 2.1 lists the initial values of registers after a reset. table 2.1 initial values of registers type of register register default general register r0 to r14 undefined r15 (sp) sp value set in the exception handling vector table control register sr i3 to i0: 1111 (h'f) reserved bits: 0 other bits: undefined gbr undefined vbr h'00000000 system register mach, macl, pr undefined pc pc value set in the exception handling vector table
section 2 cpu page 28 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2.3 data formats 2.3.1 register data format the size of register operands is always longwords (32 bits). when loading byte (8 bits) or word (16 bits) data in memory into a register, the data is sign-extended to longword and stored in the register. longword 31 0 figure 2.2 register data format 2.3.2 memory data formats memory data formats are classified into bytes, words, and longwords. byte data can be accessed from any address. locate, however, word data at an address 2n, longword data at 4n. otherwise, an address error will occur if an attempt is made to access word data starting from an address other than 2n or longword data starting from an address other than 4n. in such cases, the data accessed cannot be guaranteed. the hardware stack area, pointed by the hardware stack pointer (sp, r15), uses only longword data starting from address 4n because this area holds the program counter and status register. byte byte byte byte word word longword 31 23 15 7 address m + 1 address 2n address 4n address m address m + 3 address m + 2 0 figure 2.3 memory data format
section 2 cpu r01uh0198ej0500 rev. 5.00 page 29 of 1560 mar 18, 2011 sh7080 group 2.3.3 immediate data formats immediate data of eight bits is placed in the instruction code. for the mov, add, and cmp/eq instructions, the immediate data is sign-extended to longword and then calculated. for the tst, and, or, and xor instructions, the immediate data is zero- extended to longword and then calculated. thus , if the immediate data is used for the and instruction, the upper 24 bits in the destination register are always cleared. the immediate data of word or longword is not placed in the inst ruction code. it is placed in a table in memory. the table in memory is accesse d by the mov immediate data instruction in pc relative addressing mode with displacement. 2.4 features of instructions 2.4.1 risc type the instructions are risc-type instructions with the following features: fixed 16-bit length: all instructions have a fixed length of 16 bits. this improves program code efficiency. one instruction per cycle: since pipelining is used, basic instructions can be executed in one cycle. data size: the basic data size for operations is longword. byte, word, or longword can be selected as the memory access size. byte or word data in memory is sign-extended to longword and then calculated. immediate data is sign-extended to longword for arithmetic operations or zero-extended to longword size for logical operations. table 2.2 word data sign extension cpu in this lsi description example of other cpus mov.w @(disp,pc),r1 add r1,r0 ........ .data.w h'1234 sign-extended to 32 bits, r1 becomes h'00001234, and is then operated on by the add instruction. add.w #h'1234,r0 note: immediate data is accessed by @(disp,pc).
section 2 cpu page 30 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group load/store architecture: basic operations are executed betw een registers. in operations involving memory, data is first loaded into a register (load/store architecture). however, bit manipulation instructions such as and are executed directly in memory. delayed branching: unconditional branch instructions means the delayed branch instructions. with a delayed branch instruction, the branch is made after execution of the instruction immediately following the delayed branch instruction. this minimizes disruption of the pipeline when a branch is made. the conditional branch instructions have two types of instructions: conditional branch instructions and delayed branch instructions. table 2.3 delayed branch instructions cpu in this lsi description example of other cpus bra trget add r1,r0 add is executed before branch to trget. add.w r1,r0 bra trget multiply/multiply-and-accumulate operations: a 16 16 32 multiply operation is executed in one to two cycles, and a 16 16 + 64 64 multiply-and-accumulate operation in two to three cycles. a 32 32 64 multiply operation and a 32 32 + 64 64 multiply-and- accumulate operation are each execu ted in two to four cycles. t bit: the result of a comparison is indicated by th e t bit in sr, and a conditional branch is performed according to whether th e result is true or false. processing speed has been improved by keeping the number of instructions that modify the t bit to a minimum. table 2.4 t bit cpu in this lsi description example of other cpus cmp/ge r1,r0 when r0 r1, the t bit is set. cmp.w r1,r0 bt trget0 when r0 r1, a branch is made to trget0. bge trget0 bf trget1 when r0 < r1, a branch is made to trget1. blt trget1 add # ? 1,r0 the t bit is not changed by add. sub.w #1,r0 cmp/eq #0,r0 when r0 = 0, the t bit is set. beq trget bt trget a branch is made when r0 = 0. immediate data: 8-bit immediate data is placed in th e instruction code. word and longword immediate data is not placed in th e instruction code. it is placed in a table in memory. the table in memory is accessed with the mov immediate data instruction using pc relative addressing mode with displacement.
section 2 cpu r01uh0198ej0500 rev. 5.00 page 31 of 1560 mar 18, 2011 sh7080 group table 2.5 access to immediate data type this lsi's cpu example of other cpu 8-bit immediate mov #h'12,r0 mov.b #h'12,r0 16-bit immediate mov.w @(disp,pc),r0 ........ .data.w h'1234 mov.w #h'1234,r0 32-bit immediate mov.l @(disp,pc),r0 ........ .data.l h'12345678 mov.l #h'12345678,r0 note: immediate data is accessed by @(disp,pc). absolute addresses: when data is accessed by absolute addr ess, place the absolute address value in a table in memory beforehand. the absolute address value is transferred to a register using the method whereby immediate data is loaded when an instruction is executed, and the data is accessed using the register indirect addressing mode. table 2.6 access to absolute address type cpu in this lsi example of other cpus absolute address mov.l @(disp,pc),r1 mov.b @r1,r0 ........ .data.l h'12345678 mov.b @h'12345678,r0 note: immediate data is referenced by @(disp,pc). 16-bit/32-bit displacement: when data is accessed using the 16- or 32-bit displacement addressing mode, the displacement value is placed in a table in memory beforehand. using the method whereby immediate data is loaded when an instruction is executed, this value is transferred to a register and the data is accesse d using index register i ndirect addressing mode.
section 2 cpu page 32 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 2.7 access with displacement type cpu in this lsi example of other cpus 16-bit displacement mov.w @(disp,pc),r0 mov.w @(r0,r1),r2 ........ .data.w h'1234 mov.w @(h'1234,r1),r2 note: immediate data is referenced by @(disp,pc). 2.4.2 addressing modes table 2.8 lists addressing modes and effective address calculation methods. table 2.8 addressing modes and effective addresses addressing mode instruction format effective address calculation method calculation formula register direct rn effective address is register rn. (operand is register rn contents.) ? register indirect @rn effective address is register rn contents. rn rn rn register indirect with post-increment @rn+ effective address is register rn contents. a constant is added to rn after instruction execution: 1 for a byte operand, 2 for a word operand, 4 for a longword operand. rn rn 1/2/4 + rn + 1/2/4 rn after instruction execution byte: rn + 1 rn word: rn + 2 rn longword: rn + 4 rn register indirect with pre-decrement @?rn effective address is register rn contents, decremented by a constant beforehand: 1 for a byte operand, 2 for a word operand, 4 for a longword operand. rn rn - 1/2/4 1/2/4 - rn - 1/2/4 byte: rn ? 1 rn word: rn ? 2 rn longword: rn ? 4 rn (instruction executed with rn after calculation)
section 2 cpu r01uh0198ej0500 rev. 5.00 page 33 of 1560 mar 18, 2011 sh7080 group addressing mode instruction format effective address calculation method calculation formula register indirect with displacement @(disp:4, rn) effective address is register rn contents with 4-bit displacement disp added. after disp is zero-extended, it is multiplied by 1 (byte), 2 (word), or 4 (longword), according to the operand size. 1/2/4 disp (zero-extended) rn + disp 1/2/4 + rn byte: rn + disp word: rn + disp 2 longword: rn + disp 4 index register indirect @(r0, rn) effective address is sum of register rn and r0 contents. + rn r0 rn + r0 rn + r0 gbr indirect with displacement @(disp:8, gbr) effective address is register gbr contents with 8-bit displacement disp added. after disp is zero-extended, it is multiplied by 1 (byte), 2 (word), or 4 (longword), according to the operand size. gbr 1/2/4 disp (zero-extended) gbr + disp 1/2/4 + byte: gbr + disp word: gbr + disp 2 longword: gbr + disp 4 index gbr indirect @(r0, gbr) effective address is sum of register gbr and r0 contents. gbr gbr + r0 r0 + gbr + r0
section 2 cpu page 34 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group addressing mode instruction format effective address calculation method calculation formula pc relative with displacement @(disp:8, pc) effective address is pc with 8-bit displacement disp added. after disp is zero-extended, it is multiplied by 2 (word) or 4 (longword), according to the operand size. with a longword operand, the lower 2 bits of pc are masked. pc pc + disp 2 or pc& h'fffffffc + disp 4 h'fffffffc + & 2/4 disp (zero-extended) * * with longword operand word: pc + disp 2 longword: pc&h'fffffffc + disp 4 pc relative disp:8 effective address is pc with 8-bit displacement disp added after being sign-extended and multiplied by 2. pc 2 disp (sign-extended) pc + disp 2 + pc + disp 2 disp:12 effective address is pc with 12-bit displacement disp added after being sign-extended and multiplied by 2. pc 2 disp (sign-extended) pc + disp 2 + pc + disp 2
section 2 cpu r01uh0198ej0500 rev. 5.00 page 35 of 1560 mar 18, 2011 sh7080 group addressing mode instruction format effective address calculation method calculation formula pc relative rn effective address is sum of pc and rn. pc pc + rn rn + pc + rn immediate #imm:8 8-bit immediate data imm of tst, and, or, or xor instruction is zero-extended. ? #imm:8 8-bit immediate data imm of mov, add, or cmp/eq instruction is sign-extended. ? #imm:8 8-bit immediate data imm of trapa instruction is zero-extended and multiplied by 4. ? 2.4.3 instruction formats this section describes the instruction formats, and the meaning of the source and destination operands. the meaning of the operands depends on the instruction code. the following symbols are used in the table. xxxx: instruction code mmmm: source register nnnn: destination register iiii: immediate data dddd: displacement
section 2 cpu page 36 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 2.9 instruction formats instruction format source operand destination operand sample instruction 0 type xxxx xxxx xxxx xxxx 15 0 ? ? nop ? nnnn : register direct movt rn control register or system register nnnn : register direct sts mach,rn n type xxxx nnnn xxxx xxxx 15 0 control register or system register nnnn : pre- decrement register indirect stc.l sr,@-rn mmmm : register direct control register or system register ldc rm,sr m type xxxx mmmm xxxx xxxx 15 0 mmmm : post- increment register indirect control register or system register ldc.l @rm+,sr mmmm : register indirect ? jmp @rm pc relative using rm ? braf rm
section 2 cpu r01uh0198ej0500 rev. 5.00 page 37 of 1560 mar 18, 2011 sh7080 group instruction format source operand destination operand sample instruction mmmm : register direct nnnn : register direct add rm,rn mmmm : register direct nnnn : register indirect mov.l rm,@rn mmmm : post- increment register indirect (multiply- and-accumulate operation) nnnn : * post- increment register indirect (multiply- and-accumulate operation) mach, macl mac.w @rm+,@rn+ mmmm : post- increment register indirect nnnn : register direct mov.l @rm+,rn mmmm : register direct nnnn : pre- decrement register indirect mov.l rm,@-rn nm type xxxx nnnn mmmm xxxx 15 0 mmmm : register direct nnnn : index register indirect mov.l rm,@(r0,rn) md type xxxx xxxx mmmm dddd 15 0 mmmmdddd : register indirect with displacement r0 (register direct) mov.b @(disp,rm),r0 nd4 type xxxx xxxx nnnn dddd 15 0 r0 (register direct) nnnndddd : register indirect with displacement mov.b r0,@(disp,rn) nmd type xxxx nnnn mmmm dddd 15 0 mmmm : register direct nnnndddd : register indirect with displacement mov.l rm,@(disp,rn) mmmmdddd : register indirect with displacement nnnn : register direct mov.l @(disp,rm),rn
section 2 cpu page 38 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group instruction format source operand destination operand sample instruction dddddddd : gbr indirect with displacement r0 (register direct) mov.l @(disp,gbr),r0 r0 (register direct) dddddddd : gbr indirect with displacement mov.l r0,@(disp,gbr) dddddddd : pc relative with displacement r0 (register direct) mova @(disp,pc),r0 d type xxxx xxxx dddd dddd 15 0 ? dddddddd : pc relative bf label d12 type xxxx dddd dddd dddd 15 0 ? dddddddddddd : pc relative bra label (label=disp+pc) nd8 type xxxx nnnn dddd dddd 15 0 dddddddd : pc relative with displacement nnnn : register direct mov.l @(disp,pc),rn iiiiiiii : immediate index gbr indirect and.b #imm,@(r0,gbr) iiiiiiii : immediate r0 (register direct) and #imm,r0 i type xxxx xxxx iiii iiii 15 0 iiiiiiii : immediate ? trapa #imm ni type xxxx nnnn iiii iiii 15 0 iiiiiiii : immediate nnnn : register direct add #imm,rn note: * in multiply and accumulate instructions, nnnn is the source register.
section 2 cpu r01uh0198ej0500 rev. 5.00 page 39 of 1560 mar 18, 2011 sh7080 group 2.5 instruction set 2.5.1 instruction set by type table 2.10 lists the instructions classified by type. table 2.10 instruction types type kinds of instruction op code function number of instructions mov data transfer immediate data transfer peripheral module data transfer structure data transfer mova effective address transfer movt t bit transfer swap upper/lower swap data transfer instructions 5 xtrct extraction of middle of linked registers 39 add binary addition addc binary addition with carry addv binary addition with overflow cmp/cond comparison div1 division div0s signed division initialization div0u unsigned division initialization dmuls signed double-precision multiplication dmulu unsigned double-precision multiplication dt decrement and test exts sign extension extu zero extension arithmetic operation instructions 21 mac multiply-and-accumulate, double- precision multiply-and-accumulate 33 mul double-precision multiplication
section 2 cpu page 40 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group type kinds of instruction op code function number of instructions muls signed multiplication mulu unsigned multiplication neg sign inversion negc sign inversion with borrow sub binary subtraction subc binary subtraction with carry arithmetic operation instructions 21 subv binary subtraction with underflow 33 and logical and not bit inversion or logical or tas memory test and bit setting tst t bit setting for logical and logic operation instructions 6 xor exclusive logical or 14 rotl 1-bit left shift rotr 1-bit right shift rotcl 1-bit left shift with t bit rotcr 1-bit right shift with t bit shal arithmetic 1-bit left shift shar arithmetic 1-bit right shift shll logical 1-bit left shift shlln logical n-bit left shift shift instructions 10 shlr logical 1-bit right shift 14 shlrn logical n-bit right shift
section 2 cpu r01uh0198ej0500 rev. 5.00 page 41 of 1560 mar 18, 2011 sh7080 group type kinds of instruction op code function number of instructions bf conditional branch, delayed conditional branch (t = 0) bt conditional branch, delayed conditional branch (t = 1) bra unconditional branch braf unconditional branch bsr branch to subroutine procedure bsrf branch to subroutine procedure jmp unconditional branch jsr branch to subroutine procedure branch instructions 9 rts return from subroutine procedure 11 clrt t bit clear clrmac mac register clear ldc load into control register lds load into system register nop no operation rte return from exception handling sett t bit setting sleep transition to power-down mode stc store from control register sts store from system register system control instructions 11 trapa trap exception handling 31 total: 62 142
section 2 cpu page 42 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group the instruction code, operation, and execution cycles of the instructions are listed in the following tables, classified by type. instruction instruction code summary of operation execution cycles t bit indicated by mnemonic. explanation of symbols op.sz src, dest op: operation code sz: size src: source dest: destination rm: source register rn: destination register imm: immediate data disp: displacement * 2 indicated in msb ? lsb order. explanation of symbols mmmm: source register nnnn: destination register 0000: r0 0001: r1 ......... 1111: r15 iiii: immediate data dddd: displacement indicates summary of operation. explanation of symbols , : transfer direction (xx): memory operand m/q/t: flag bits in sr &: logical and of each bit |: logical or of each bit ^: exclusive logical or of each bit : logical not of each bit <>n: n-bit right shift value when no wait cycles are inserted * 1 value of t bit after instruction is executed explanation of symbols ? : no change notes: 1. the table shows the minimum number of execution states. in practice, the number of instruction execution states will be increased in cases such as the following: ? when there is contention between an instruction fetch and a data access ? when the destination register of a load instruction (memory register) is also used by the following instruction 2. scaled ( 1, 2, or 4) according to the instruction operand size, etc. for details, see sh-1/sh-2/sh-dsp software manual.
section 2 cpu r01uh0198ej0500 rev. 5.00 page 43 of 1560 mar 18, 2011 sh7080 group 2.5.2 data transfer instructions table 2.11 data transfer instructions instruction operation code execution cycles t bit mov #imm,rn imm sign extension rn 1110nnnniiiiiiii 1 ? mov.w @(disp,pc),rn (disp 2 + pc) sign extension rn 1001nnnndddddddd 1 ? mov.l @(disp,pc),rn (disp 4 + pc) rn 1101nnnndddddddd 1 ? mov rm,rn rm rn 0110nnnnmmmm0011 1 ? mov.b rm,@rn rm (rn) 0010nnnnmmmm0000 1 ? mov.w rm,@rn rm (rn) 0010nnnnmmmm0001 1 ? mov.l rm,@rn rm (rn) 0010nnnnmmmm0010 1 ? mov.b @rm,rn (rm) sign extension rn 0110nnnnmmmm0000 1 ? mov.w @rm,rn (rm) sign extension rn 0110nnnnmmmm0001 1 ? mov.l @rm,rn (rm) rn 0110nnnnmmmm0010 1 ? mov.b rm,@ ? rn rn?1 rn, rm (rn) 0010nnnnmmmm0100 1 ? mov.w rm,@ ? rn rn?2 rn, rm (rn) 0010nnnnmmmm0101 1 ? mov.l rm,@ ? rn rn?4 rn, rm (rn) 0010nnnnmmmm0110 1 ? mov.b @rm+,rn (rm) sign extension rn, rm + 1 rm 0110nnnnmmmm0100 1 ? mov.w @rm+,rn (rm) sign extension rn, rm + 2 rm 0110nnnnmmmm0101 1 ? mov.l @rm+,rn (rm) rn,rm + 4 rm 0110nnnnmmmm0110 1 ? mov.b r0,@(disp,rn) r0 (disp + rn) 10000000nnnndddd 1 ? mov.w r0,@(disp,rn) r0 (disp 2 + rn) 10000001nnnndddd 1 ? mov.l rm,@(disp,rn) rm (disp 4 + rn) 0001nnnnmmmmdddd 1 ? mov.b @(disp,rm),r0 (disp + rm) sign extension r0 10000100mmmmdddd 1 ? mov.w @(disp,rm),r0 (disp 2 + rm) sign extension r0 10000101mmmmdddd 1 ? mov.l @(disp,rm),rn (disp 4 + rm) rn 0101nnnnmmmmdddd 1 ?
section 2 cpu page 44 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group instruction operation code execution cycles t bit mov.b rm,@(r0,rn) rm (r0 + rn) 0000nnnnmmmm0100 1 ? mov.w rm,@(r0,rn) rm (r0 + rn) 0000nnnnmmmm0101 1 ? mov.l rm,@(r0,rn) rm (r0 + rn) 0000nnnnmmmm0110 1 ? mov.b @(r0,rm),rn (r0 + rm) sign extension rn 0000nnnnmmmm1100 1 ? mov.w @(r0,rm),rn (r0 + rm) sign extension rn 0000nnnnmmmm1101 1 ? mov.l @(r0,rm),rn (r0 + rm) rn 0000nnnnmmmm1110 1 ? mov.b r0,@(disp,gbr) r0 (disp + gbr) 11000000dddddddd 1 ? mov.w r0,@(disp,gbr) r0 (disp 2 + gbr) 11000001dddddddd 1 ? mov.l r0,@(disp,gbr) r0 (disp 4 + gbr) 11000010dddddddd 1 ? mov.b @(disp,gbr),r0 (disp + gbr) sign extension r0 11000100dddddddd 1 ? mov.w @(disp,gbr),r0 (disp 2 + gbr) sign extension r0 11000101dddddddd 1 ? mov.l @(disp,gbr),r0 (disp 4 + gbr) r0 11000110dddddddd 1 ? mova @(disp,pc),r0 disp 4 + pc r0 11000111dddddddd 1 ? movt rn t rn 0000nnnn00101001 1 ? swap.b rm,rn rm swap lowest two bytes rn 0110nnnnmmmm1000 1 ? swap.w rm,rn rm swap two consecutive words rn 0110nnnnmmmm1001 1 ? xtrct rm,rn rm: middle 32 bits of rn rn 0010nnnnmmmm1101 1 ?
section 2 cpu r01uh0198ej0500 rev. 5.00 page 45 of 1560 mar 18, 2011 sh7080 group 2.5.3 arithmetic operation instructions table 2.12 arithmetic operation instructions instruction operation code execution cycles t bit add rm,rn rn + rm rn 0011nnnnmmmm1100 1 ? add #imm,rn rn + imm rn 0111nnnniiiiiiii 1 ? addc rm,rn rn + rm + t rn, carry t 0011nnnnmmmm1110 1 carry addv rm,rn rn + rm rn, overflow t 0011nnnnmmmm1111 1 overflow cmp/eq #imm,r0 if r0 = imm, 1 t 10001000iiiiiiii 1 comparison result cmp/eq rm,rn if rn = rm, 1 t 0011nnnnmmmm0000 1 comparison result cmp/hs rm,rn if rn rm with unsigned data, 1 t 0011nnnnmmmm0010 1 comparison result cmp/ge rm,rn if rn rm with signed data, 1 t 0011nnnnmmmm0011 1 comparison result cmp/hi rm,rn if rn > rm with unsigned data, 1 t 0011nnnnmmmm0110 1 comparison result cmp/gt rm,rn if rn > rm with signed data, 1 t 0011nnnnmmmm0111 1 comparison result cmp/pz rn if rn 0, 1 t 0100nnnn00010001 1 comparison result cmp/pl rn if rn > 0, 1 t 0100nnnn00010101 1 comparison result cmp/str rm,rn if rn and rm have an equivalent byte, 1 t 0010nnnnmmmm1100 1 comparison result div1 rm,rn single-step division (rn/rm) 0011nnnnmmmm0100 1 calculation result div0s rm,rn msb of rn q, msb of rm m, m^ q t 0010nnnnmmmm0111 1 calculation result div0u 0 m/q/t 0000000000011001 1 0 dmuls.l rm,rn signed operation of rn rm mach, macl 32 32 64 bits 0011nnnnmmmm1101 2 to 5 * ?
section 2 cpu page 46 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group instruction operation code execution cycles t bit dmulu.l rm,rn unsigned operation of rn rm mach, macl 32 32 64 bits 0011nnnnmmmm0101 2 to 5 * ? dt rn rn - 1 rn, if rn = 0, 1 t, else 0 t 0100nnnn00010000 1 comparison result exts.b rm,rn a byte in rm is sign- extended rn 0110nnnnmmmm1110 1 ? exts.w rm,rn a word in rm is sign- extended rn 0110nnnnmmmm1111 1 ? extu.b rm,rn a byte in rm is zero- extended rn 0110nnnnmmmm1100 1 ? extu.w rm,rn a word in rm is zero- extended rn 0110nnnnmmmm1101 1 ? mac.l @rm+,@rn+ signed operation of (rn) (rm) + mac mac, 32 32 + 64 64 bits 0000nnnnmmmm1111 2 to 5 * ? mac.w @rm+,@rn+ signed operation of (rn) (rm) + mac mac, 16 16 + 64 64 bits 0100nnnnmmmm1111 2 to 4 * ? mul.l rm,rn rn rm macl 32 32 32 bits 0000nnnnmmmm0111 2 to 5 * ? muls.w rm,rn signed operation of rn rm mac 16 16 32 bits 0010nnnnmmmm1111 1 to 3 * ? mulu.w rm,rn unsigned operation of rn rm mac 16 16 32 bits 0010nnnnmmmm1110 1 to 3 * ? neg rm,rn 0-rm rn 0110nnnnmmmm1011 1 ? negc rm,rn 0-rm-t rn, borrow t 0110nnnnmmmm1010 1 borrow sub rm,rn rn-rm rn 0011nnnnmmmm1000 1 ? subc rm,rn rn-rm?t rn, borrow t 0011nnnnmmmm1010 1 borrow subv rm,rn rn-rm rn, underflow t 0011nnnnmmmm1011 1 overflow note: * indicates the number of execution cycles for normal operation.
section 2 cpu r01uh0198ej0500 rev. 5.00 page 47 of 1560 mar 18, 2011 sh7080 group 2.5.4 logic operation instructions table 2.13 logic opera tion instructions instruction operation code execution cycles t bit and rm,rn rn & rm rn 0010nnnnmmmm1001 1 ? and #imm,r0 r0 & imm r0 11001001iiiiiiii 1 ? and.b #imm,@(r0,gbr) (r0 + gbr) & imm (r0 + gbr) 11001101iiiiiiii 3 ? not rm,rn ~rm rn 0110nnnnmmmm0111 1 ? or rm,rn rn | rm rn 0010nnnnmmmm1011 1 ? or #imm,r0 r0 | imm r0 11001011iiiiiiii 1 ? or.b #imm,@(r0,gbr) (r0 + gbr) | imm (r0 + gbr) 11001111iiiiiiii 3 ? tas.b @rn if (rn) is 0, 1 t; 1 msb of (rn) 0100nnnn00011011 4 test result tst rm,rn rn & rm; if the result is 0, 1 t 0010nnnnmmmm1000 1 test result tst #imm,r0 r0 & imm; if the result is 0, 1 t 11001000iiiiiiii 1 test result tst.b #imm,@(r0,gbr) (r0 + gbr) & imm; if the result is 0, 1 t 11001100iiiiiiii 3 test result xor rm,rn rn ^ rm rn 0010nnnnmmmm1010 1 ? xor #imm,r0 r0 ^ imm r0 11001010iiiiiiii 1 ? xor.b #imm,@(r0,gbr) (r0 + gbr) ^ imm (r0 + gbr) 11001110iiiiiiii 3 ?
section 2 cpu page 48 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2.5.5 shift instructions table 2.14 shift instructions instruction operation code execution cycles t bit rotl rn t rn msb 0100nnnn00000100 1 msb rotr rn lsb rn t 0100nnnn00000101 1 lsb rotcl rn t rn t 0100nnnn00100100 1 msb rotcr rn t rn t 0100nnnn00100101 1 lsb shal rn t rn 0 0100nnnn00100000 1 msb shar rn msb rn t 0100nnnn00100001 1 lsb shll rn t rn 0 0100nnnn00000000 1 msb shlr rn 0 rn t 0100nnnn00000001 1 lsb shll2 rn rn << 2 rn 0100nnnn00001000 1 ? shlr2 rn rn >> 2 rn 0100nnnn00001001 1 ? shll8 rn rn << 8 rn 0100nnnn00011000 1 ? shlr8 rn rn >> 8 rn 0100nnnn00011001 1 ? shll16 rn rn << 16 rn 0100nnnn00101000 1 ? shlr16 rn rn >> 16 rn 0100nnnn00101001 1 ?
section 2 cpu r01uh0198ej0500 rev. 5.00 page 49 of 1560 mar 18, 2011 sh7080 group 2.5.6 branch instructions table 2.15 branch instructions instruction operation code execution cycles t bit bf label if t = 0, disp 2 + pc pc; if t = 1, nop 10001011dddddddd 3/1 * ? bf/s label delayed branch, if t = 0, disp 2 + pc pc; if t = 1, nop 10001111dddddddd 2/1 * ? bt label if t = 1, disp 2 + pc pc; if t = 0, nop 10001001dddddddd 3/1 * ? bt/s label delayed branch, if t = 1, disp 2 + pc pc; if t = 0, nop 10001101dddddddd 2/1 * ? bra label delayed branch, disp 2 + pc pc 1010dddddddddddd 2 ? braf rm delayed branch, rm + pc pc 0000mmmm00100011 2 ? bsr label delayed branch, pc pr, disp 2 + pc pc 1011dddddddddddd 2 ? bsrf rm delayed branch, pc pr, rm + pc pc 0000mmmm00000011 2 ? jmp @rm delayed branch, rm pc 0100mmmm00101011 2 ? jsr @rm delayed branch, pc pr, rm pc 0100mmmm00001011 2 ? rts delayed branch, pr pc 0000000000001011 2 ? note: * one cycle when the branch is not executed.
section 2 cpu page 50 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2.5.7 system control instructions table 2.16 system co ntrol instructions instruction operation code execution cycles t bit clrt 0 t 0000000000001000 1 0 clrmac 0 mach, macl 0000000000101000 1 ? ldc rm,sr rm sr 0100mmmm00001110 6 lsb ldc rm,gbr rm gbr 0100mmmm00011110 4 ? ldc rm,vbr rm vbr 0100mmmm00101110 4 ? ldc.l @rm+,sr (rm) sr, rm + 4 rm 0100mmmm00000111 8 lsb ldc.l @rm+,gbr (rm) gbr, rm + 4 rm 0100mmmm00010111 4 ? ldc.l @rm+,vbr (rm) vbr, rm + 4 rm 0100mmmm00100111 4 ? lds rm,mach rm mach 0100mmmm00001010 1 ? lds rm,macl rm macl 0100mmmm00011010 1 ? lds rm,pr rm pr 0100mmmm00101010 1 ? lds.l @rm+,mach (rm) mach, rm + 4 rm 0100mmmm00000110 1 ? lds.l @rm+,macl (rm) macl, rm + 4 rm 0100mmmm00010110 1 ? lds.l @rm+,pr (rm) pr, rm + 4 rm 0100mmmm00100110 1 ? nop no operation 0000000000001001 1 ? rte delayed branch, stack area pc/sr 0000000000101011 5 ? sett 1 t 0000000000011000 1 1 sleep sleep 0000000000011011 4 * ? stc sr,rn sr rn 0000nnnn00000010 1 ? stc gbr,rn gbr rn 0000nnnn00010010 1 ? stc vbr,rn vbr rn 0000nnnn00100010 1 ? stc.l sr,@ ? rn rn?4 rn, sr (rn) 0100nnnn00000011 1 ? stc.l gbr,@ ? rn rn?4 rn, gbr (rn) 0100nnnn00010011 1 ? stc.l vbr,@ ? rn rn?4 rn, vbr (rn) 0100nnnn00100011 1 ?
section 2 cpu r01uh0198ej0500 rev. 5.00 page 51 of 1560 mar 18, 2011 sh7080 group instruction operation code execution cycles t bit sts mach,rn mach rn 0000nnnn00001010 1 ? sts macl,rn macl rn 0000nnnn00011010 1 ? sts pr,rn pr rn 0000nnnn00101010 1 ? sts.l mach,@ ? rn rn?4 rn, mach (rn) 0100nnnn00000010 1 ? sts.l macl,@ ? rn rn?4 rn, macl (rn) 0100nnnn00010010 1 ? sts.l pr,@ ? rn rn?4 rn, pr (rn) 0100nnnn00100010 1 ? trapa #imm pc / sr stack area, (imm 4 + vbr) pc 11000011iiiiiiii 8 ? note: * number of execution cycles until this lsi enters sleep mode. about the number of execution cycles: the table lists the minimum number of execution cycles. in practice, the number of execution cycles will be increased depending on the conditions such as: ? when there is a conflict between instruction fetch and data access ? when the destination register of a load instruction (memory register) is also used by the instruction immediately after the load instruction.
section 2 cpu page 52 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2.6 processing states the cpu has the five processing states: reset, ex ception handling, bus release, program execution, and power-down. figure 2.4 shows the cpu state transition. from any state when res = 0 res = 0 from any state except deep software standby mode when res = 1 and mres = 0 power-on reset state manual reset state res = 0 reset state res = 1 res = 1, mres = 1 exception handling state exception processing source occurs exception processing ends program execution state nmi interrupt or irq interrupt occurs bus release state bus request generated bus request cleared bus request generated bus request cleared bus request generated bus request cleared sleep mode ssby bit = 1 and stbymd bit = 1 for sleep instruction ssby bit = 1 and stbymd bit = 0 for sleep instruction ssby bit = 0 for sleep instruction software standby mode power-down mode deep software standby mode internal power-on reset by wdt or internal manual reset by wdt occurs. figure 2.4 transitions between processing states
section 2 cpu r01uh0198ej0500 rev. 5.00 page 53 of 1560 mar 18, 2011 sh7080 group ? reset state the cpu is reset. when the res pin is low, the cpu enters th e power-on reset state. when the res pin is high and mres pin is low, the cpu enters the manual reset state. ? exception handling state this state is a transitional state in which the cp u processing state changes due to a request for exception handling such as a reset or an interrupt. when a reset occurs, the execution start address as the initial value of the program counter (pc) and the initial value of the stack pointer (sp) are fetched from the exception handling vector table. then, a branch is made fo r the start address to execute a program. when an interrupt occurs, the pc and status regist er (sr) are saved in the stack area pointed to by sp. the start address of an exception hand ling routine is fetched from the exception handling vector table and a branch to the address is made to execute a program. then the processing state enters the program execution state. ? program execution state the cpu executes programs sequentially. ? power-down state the cpu stops to reduce power consumption. the sleep instruction makes the cpu enter sleep mode, software standby mode, or deep software standby mode. ? bus release state in the bus release state, the cpu releases access rights to the bus to the device that has requested them.
section 2 cpu page 54 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 3 mcu operating modes r01uh0198ej0500 rev. 5.00 page 55 of 1560 mar 18, 2011 sh7080 group section 3 mcu operating modes 3.1 selection of operating modes this lsi has four mcu operating modes and three on-chip flash memory programming modes. the operating mode is determined by the setting of fwe, md1, and md0 pins. table 3.1 shows the allowable combinations of these pin settings; do not set these pins in the other way than the shown combinations. when power is applied to the system, be sure to conduct power-on reset. the mcu operating mode can be selected from mcu extension modes 0 to 2 and single chip mode. for the on-chip flash memory programming mode, boot mode, user boot mode, and user program mode which are on-chip programming modes are available. table 3.1 selection of operating modes pin setting bus width of cs0 space mode no. fwe md1 md0 mode name on-chip rom sh7083 sh7084 sh7085 sh7086 mode 0 0 0 0 mcu extension mode 0 not active 8 8 16 16 mode 1 0 0 1 mcu extension mode 1 not active 16 16 32 32 mode 2 0 1 0 mcu extension mode 2 active set by cs0bcr in bsc mode 3 0 1 1 single chip mode active ? mode 4 * 1 0 0 boot mode active ? mode 5 * 1 0 1 user boot mode active set by cs0bcr in bsc mode 6 * 1 1 0 set by cs0bcr in bsc mode 7 * 1 1 1 user programming mode active ? note: * flash memory programming mode.
section 3 mcu operating modes page 56 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 3.2 input/output pins table 3.2 describes the configurati on of operating mode related pin. table 3.2 pin configuration pin name input/output function md0 input designates operating mode through the level applied to this pin md1 input designates operating mode through the level applied to this pin fwe input enables, by hardware, progr amming/erasing of the on-chip flash memory
section 3 mcu operating modes r01uh0198ej0500 rev. 5.00 page 57 of 1560 mar 18, 2011 sh7080 group 3.3 operating modes 3.3.1 mode 0 (mcu extension mode 0) cs0 space becomes external memory spaces with 8-bit bus width in sh7083/sh7084 or 16-bit bus width in sh7085/sh7086. 3.3.2 mode 1 (mcu extension mode 1) cs0 space becomes external memory spaces with 16-bit bus width in sh7083/sh7084 or 32-bit bus width in sh7085/sh7086. 3.3.3 mode 2 (mcu extension mode 2) the on-chip rom is active and cs0 space can be used in this mode. 3.3.4 mode 3 (single chip mode) all ports can be used in this mode, however the external address cannot be used.
section 3 mcu operating modes page 58 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 3.4 address map the address map for the operating modes is shown in figures 3.1 to 3.7. h'00000000 h'0003ffff h'00040000 h'ffff7fff h'ffff8000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'02000000 h'01ffffff h'03ffffff h'0003ffff h'04000000 h'00040000 h'0bffffff h'0c000000 h'0dffffff h'0e000000 h'1bffffff h'1c000000 h'1dffffff h'1e000000 h'02000000 h'01ffffff h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff7fff h'ffff8000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'0bffffff h'0c000000 h'0dffffff h'0e000000 h'1bffffff h'1c000000 h'1dffffff h'1e000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff7fff h'ffff8000 h'ffffbfff h'ffffc000 h'ffffffff cs7 space on-chip rom (256 kbytes) modes 0 and 1 on-chip rom disabled mode mode 2 on-chip rom enabled mode mode 3 single chip mode on-chip ram (16 kbytes) reserved area reserved area reserved area reserved area cs0 space cs3 space reserved area on-chip peripheral i/o registers sdram mode setting space on-chip ram (16 kbytes) on-chip peripheral i/o registers cs7 space on-chip ram (16 kbytes) reserved area reserved area reserved area cs0 space cs3 space reserved area on-chip peripheral i/o registers sdram mode setting space on-chip rom (256 kbytes) reserved area figure 3.1 address map for each operating mode in sh7083 (256-kbyte flash memory version)
section 3 mcu operating modes r01uh0198ej0500 rev. 5.00 page 59 of 1560 mar 18, 2011 sh7080 group h'00000000 h'0007ffff h'00080000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'02000000 h'01ffffff h'03ffffff h'0007ffff h'04000000 h'00080000 h'0bffffff h'0c000000 h'0dffffff h'0e000000 h'1bffffff h'1c000000 h'1dffffff h'1e000000 h'02000000 h'01ffffff h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'0bffffff h'0c000000 h'0dffffff h'0e000000 h'1bffffff h'1c000000 h'1dffffff h'1e000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff cs7 space on-chip rom (512 kbytes) modes 0 and 1 on-chip rom disabled mode mode 2 on-chip rom enabled mode mode 3 single chip mode on-chip ram (32 kbytes) reserved area reserved area reserved area reserved area cs0 space cs3 space reserved area on-chip peripheral i/o registers sdram mode setting space on-chip ram (32 kbytes) on-chip peripheral i/o registers cs7 space on-chip ram (32 kbytes) reserved area reserved area reserved area cs0 space cs3 space reserved area on-chip peripheral i/o registers sdram mode setting space on-chip rom (512 kbytes) reserved area figure 3.2 address map for each operating mode in sh7083 (512-kbyte flash memory version)
section 3 mcu operating modes page 60 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group h'00000000 h'0003ffff h'00040000 h'ffff7fff h'ffff8000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'02000000 h'01ffffff h'03ffffff h'0003ffff h'07ffffff h'04000000 h'00040000 h'08000000 h'0bffffff h'0c000000 h'0fffffff h'10000000 h'13ffffff h'14000000 h'17ffffff h'18000000 h'1bffffff h'1c000000 h'1fffffff h'20000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff7fff h'ffff8000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'03ffffff h'07ffffff h'04000000 h'08000000 h'0bffffff h'0c000000 h'0fffffff h'10000000 h'13ffffff h'14000000 h'17ffffff h'18000000 h'1bffffff h'1c000000 h'1fffffff h'20000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff7fff h'ffff8000 h'ffffbfff h'ffffc000 h'ffffffff cs4 space cs5 space cs6 space cs7 space on-chip rom (256 kbytes) modes 0 and 1 on-chip rom disabled mode mode 2 on-chip rom enabled mode mode 3 single chip mode on-chip ram (16 kbytes) reserved area reserved area cs0 space cs1 space cs2 space cs3 space reserved area on-chip peripheral i/o registers sdram mode setting space on-chip rom (256 kbytes) on-chip ram (16 kbytes) reserved area on-chip peripheral i/o registers cs4 space cs5 space cs6 space cs7 space on-chip ram (16 kbytes) cs0 space cs1 space cs2 space cs3 space reserved area reserved area on-chip peripheral i/o registers sdram mode setting space figure 3.3 address map for each operating mode in sh7084 (256-kbyte flash memory version)
section 3 mcu operating modes r01uh0198ej0500 rev. 5.00 page 61 of 1560 mar 18, 2011 sh7080 group h'00000000 h'0007ffff h'00080000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'02000000 h'01ffffff h'03ffffff h'0007ffff h'07ffffff h'04000000 h'00080000 h'08000000 h'0bffffff h'0c000000 h'0fffffff h'10000000 h'13ffffff h'14000000 h'17ffffff h'18000000 h'1bffffff h'1c000000 h'1fffffff h'20000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'03ffffff h'07ffffff h'04000000 h'08000000 h'0bffffff h'0c000000 h'0fffffff h'10000000 h'13ffffff h'14000000 h'17ffffff h'18000000 h'1bffffff h'1c000000 h'1fffffff h'20000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff cs4 space cs5 space cs6 space cs7 space on-chip rom (512 kbytes) modes 0 and 1 on-chip rom disabled mode mode 2 on-chip rom enabled mode mode 3 single chip mode on-chip ram (32 kbytes) reserved area reserved area cs0 space cs1 space cs2 space cs3 space reserved area on-chip peripheral i/o registers sdram mode setting space on-chip rom (512 kbytes) on-chip ram (32 kbytes) reserved area on-chip peripheral i/o registers cs4 space cs5 space cs6 space cs7 space on-chip ram (32 kbytes) cs0 space cs1 space cs2 space cs3 space reserved area reserved area on-chip peripheral i/o registers sdram mode setting space figure 3.4 address map for each operating mode in sh7084 (512-kbyte flash memory version)
section 3 mcu operating modes page 62 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group h'00000000 h'0003ffff h'00040000 h'ffff7fff h'ffff8000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'02000000 h'01ffffff h'03ffffff h'0003ffff h'07ffffff h'04000000 h'00040000 h'08000000 h'0bffffff h'0c000000 h'0fffffff h'10000000 h'13ffffff h'14000000 h'17ffffff h'18000000 h'1bffffff h'1c000000 h1fffffff h'20000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff7fff h'ffff8000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'03ffffff h'07ffffff h'04000000 h'08000000 h'0bffffff h'0c000000 h'0fffffff h'10000000 h'13ffffff h'14000000 h'17ffffff h'18000000 h'1bffffff h'1c000000 h1fffffff h'20000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff7fff h'ffff8000 h'ffffbfff h'ffffc000 h'ffffffff cs4 space cs5 space cs6 space cs7 space on-chip rom (256 kbytes) modes 0 and 1 on-chip rom disabled mode mode 2 on-chip rom enabled mode mode 3 single chip mode on-chip ram (16 kbytes) reserved area cs0 space cs1 space cs2 space cs3 space reserved area reserved area on-chip peripheral i/o registers sdram mode setting space on-chip rom (256 kbytes) on-chip ram (16 kbytes) reserved area on-chip peripheral i/o registers cs4 space cs5 space cs6 space cs7 space on-chip ram (16 kbytes) cs0 space cs1 space cs2 space cs3 space reserved area reserved area on-chip peripheral i/o registers sdram mode setting space figure 3.5 address map for each operating mode in sh7085 (256-kbyte flash memory version)
section 3 mcu operating modes r01uh0198ej0500 rev. 5.00 page 63 of 1560 mar 18, 2011 sh7080 group h'00000000 h'0007ffff h'00080000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'02000000 h'01ffffff h'03ffffff h'0007ffff h'07ffffff h'04000000 h'00080000 h'08000000 h'0bffffff h'0c000000 h'0fffffff h'10000000 h'13ffffff h'14000000 h'17ffffff h'18000000 h'1bffffff h'1c000000 h'1fffffff h'20000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'03ffffff h'07ffffff h'04000000 h'08000000 h'0bffffff h'0c000000 h'0fffffff h'10000000 h'13ffffff h'14000000 h'17ffffff h'18000000 h'1bffffff h'1c000000 h'1fffffff h'20000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff cs4 space cs5 space cs6 space cs7 space on-chip rom (512 kbytes) modes 0 and 1 on-chip rom disabled mode mode 2 on-chip rom enabled mode mode 3 single chip mode on-chip ram (32 kbytes) reserved area cs0 space cs1 space cs2 space cs3 space reserved area reserved area on-chip peripheral i/o registers sdram mode setting space on-chip rom (512 kbytes) on-chip ram (32 kbytes) reserved area on-chip peripheral i/o registers cs4 space cs5 space cs6 space cs7 space on-chip ram (32 kbytes) cs0 space cs1 space cs2 space cs3 space reserved area reserved area on-chip peripheral i/o registers sdram mode setting space figure 3.6 address map for each operating mode in sh7085 (512-kbyte flash memory version)
section 3 mcu operating modes page 64 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group h'00000000 h'0007ffff h'00080000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff h'00000000 h'02000000 h'01ffffff h'03ffffff h'0007ffff h'07ffffff h'04000000 h'00080000 h'08000000 h'0bffffff h'0c000000 h'0fffffff h'10000000 h'13ffffff h'14000000 h'17ffffff h'18000000 h'1bffffff h'1c000000 h'1fffffff h'20000000 h'3fffffff h'40000000 h'7fffffff h'80000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff h'3fffffff h'40000000 h'7fffffff h'80000000 h'00000000 h'03ffffff h'07ffffff h'04000000 h'08000000 h'0bffffff h'0c000000 h'0fffffff h'10000000 h'13ffffff h'14000000 h'17ffffff h'18000000 h'1bffffff h'1c000000 h'1fffffff h'20000000 h'fff7ffff h'fff80000 h'fff9ffff h'fffa0000 h'ffff3fff h'ffff4000 h'ffffbfff h'ffffc000 h'ffffffff cs4 space cs5 space cs6 space cs7 space on-chip rom (512 kbytes) modes 0 and 1 on-chip rom disabled mode mode 2 on-chip rom enabled mode mode 3 single chip mode on-chip ram (32 kbytes) reserved area reserved area cs0 space cs1 space cs2 space cs3 space cs8 space reserved area reserved area on-chip peripheral i/o registers sdram mode setting space on-chip rom (512 kbytes) on-chip ram (32 kbytes) reserved area on-chip peripheral i/o registers cs4 space cs5 space cs6 space cs7 space on-chip ram (32 kbytes) cs0 space cs1 space cs2 space cs3 space cs8 space reserved area reserved area reserved area on-chip peripheral i/o registers sdram mode setting space figure 3.7 address map for each operating mode in sh7086
section 3 mcu operating modes r01uh0198ej0500 rev. 5.00 page 65 of 1560 mar 18, 2011 sh7080 group 3.5 initial state in this lsi in the initial state of this lsi, some of on-chi p modules are set in module standby state for saving power. when operating these modules, clear module standby state according to the procedure in section 26, power-down modes. 3.6 note on changing operating mode when changing operating mode while power is applied to this lsi, make sure to do it in the power-on reset state (that is, the low level is applied to the res pin). note: * see section 28.3.2, control signal timing. t mds * ck md1, md0 res figure 3.8 reset input timing when changing operating mode
section 3 mcu operating modes page 66 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 4 clock pulse generator (cpg) r01uh0198ej0500 rev. 5.00 page 67 of 1560 mar 18, 2011 sh7080 group section 4 clock pulse generator (cpg) this lsi has a clock pulse generator (cpg) that generates an internal clock (i ), a bus clock (b ), a peripheral clock (p ), and clocks (mi and mp ) for the mtu2s and mtu2 modules. the cpg also controls power-down modes. 4.1 features ? five clocks generated independently an internal clock (i ) for the cpu; a peripheral clock (p ) for the on-chip peripheral modules; a bus clock (b = ck) for the external bus interface; a mtu2s clock (mi ) for the on-chip mtu2s module; and a mtu2 clock (mp ) for the on-chip mtu2 module. ? frequency change function frequencies of the internal clock (i ), bus clock (b ), peripheral clock (p ), mtu2s clock (mi ), and mtu2 clock (mp ) can be changed independently using the divider circuit within the cpg. frequencies are changed by software using the frequency control register (frqcr) setting. ? power-down mode control the clock can be stopped in sleep mode and standby mode and specific modules can be stopped using the module standby function. ? oscillation stop detection if the clock supplied through the clock input pin stops for any reason, the timer pins can be automatically placed in th e high-impedance state.
section 4 clock pulse generator (cpg) page 68 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 4.1 shows a block diagram of the clock pulse generator. ck pll circuit ( 8) oscillator unit internal clock (i ) internal bus bus interface frqcr: osccr: stbcr1: stbcr2: stbcr3: stbcr4: stbcr5: stbcr6: frequency control register oscillation stop detection control register standby control register 1 standby control register 2 standby control register 3 standby control register 4 standby control register 5 standby control register 6 peripheral clock (p ) bus clock (b = ck) extal xtal frqcr osccr stbcr2 stbcr1 stbcr3 stbcr4 stbcr5 stbcr6 cpg control unit mtu2 clock (mp ) mtu2s clock (mi ) clock frequency control circuit standby control circuit [legend] 1 1/2 1/3 1/4 1/8 divider oscillation stop detection oscillation stop detection circuit crystal oscillator figure 4.1 block diagram of clock pulse generator
section 4 clock pulse generator (cpg) r01uh0198ej0500 rev. 5.00 page 69 of 1560 mar 18, 2011 sh7080 group the clock pulse generator blocks function as follows: pll circuit: the pll circuit multiples the clock freque ncy input from the crystal oscillator or the extal pin by 8. the multiplication ratio is fixed at 8. crystal oscillator: the crystal oscillator is an oscillator circuit when a crystal resonator is connected to the xtal and extal pins. divider: the divider generates clocks with the frequencies to be used by the internal clock (i ), bus clock (b ), peripheral clock (p ), mtu2s clock (mi ), and mtu2 clock (mp ). the frequencies can be selected from 1, 1/2, 1/3, 1/4, and 1/8 times the frequency output from the pll circuit. the division ratio should be specified in the frequency control register (frqcr). oscillation stop detection circuit: this circuit detects an a bnormal condition in the crystal oscillator. clock frequency control circuit: the clock frequency control circuit controls the clock frequency according to the setting in the frequency control register (frqcr). standby control circuit: the standby control circuit controls the state of the on-chip oscillator circuit and other modules in sleep or standby mode. frequency control register (frqcr): the frequency control register (frqcr) has control bits for the frequency division ratios of the internal clock (i ), bus clock (b ), peripheral clock (p ), mtu2s clock (mi ), and mtu2 clock (mp ). oscillation stop detectio n control register (osccr): the oscillation stop detection control register (osccr) has an oscillation stop detection flag and a bit for selecting flag status output through an external pin. standby control registers 1 to 6 (stbcr1 to stbcr6): the standby control register (stbcr) has bits for controlling the power-down modes. for details, see section 26, power-down modes.
section 4 clock pulse generator (cpg) page 70 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 4.1 shows the operatin g clock for each module. table 4.1 operating clock for each module operating clock operating module operating clock operating module internal clock (i ) cpu peripheral clock (p ) poe ubc sci rom scif ram ssu i 2 c2 a/d cmt wdt bus clock (b ) bsc mtu2 clock (mp ) mtu2 dmac mtu2s clock (mi ) mtu2s dtc
section 4 clock pulse generator (cpg) r01uh0198ej0500 rev. 5.00 page 71 of 1560 mar 18, 2011 sh7080 group 4.2 input/output pins table 4.2 shows the cpg pin configuration. table 4.2 pin configuration pin name abbr. i/o description xtal output connects a crystal resonator. crystal input/output pins (clock input pins) extal input connects a crystal resonator or an external clock. clock output pin ck output outputs an external clock. note: to use the clock output (ck) pin, appropriate settings may be needed for the pin in the pin function controller (pfc) in some cases. for details, refer to section 21, pin function controller (pfc).
section 4 clock pulse generator (cpg) page 72 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 4.3 clock operating mode table 4.3 shows the clock operating mode of this lsi. table 4.3 clock operating mode clock i/o clock operating mode source output pll circuit input to divider 1 extal input or crystal resonator ck * on ( 8) 8 note: * to output the clock through the clock output (ck) pin, appropriate settings should be made in the pin function controller (pfc). for details, refer to section 21, pin function controller (pfc). mode 1: the frequency of the external clock input from the extal pin is multiplied by 8 in the pll circuit before being supplied to the on-chip modules in this lsi, which eliminates the need to generate a high-frequency clock outside the lsi. since the input clock frequency ranging from 5 mhz to 12.5 mhz can be used, the internal clock (i ) frequency ranges from 10 mhz to 80 mhz. maximum operating frequencies: i = 80 mhz, b = 40 mhz, p = 40 mhz, mi = 80 mhz, and mp = 40 mhz table 4.4 shows the frequency division ratios that can be specified with frqcr.
section 4 clock pulse generator (cpg) r01uh0198ej0500 rev. 5.00 page 73 of 1560 mar 18, 2011 sh7080 group table 4.4 frequency division ratios specifiable with frqcr frqcr division ratio setting clock ratio clock frequency (mhz) * pll multipli- cation ratio i b p mi mp i b p mi mp input clock i b p mi mp 8 1/8 1/8 1/8 1/8 1/8 1 1 1 1 1 10 10 10 10 10 10 1/4 1/8 1/8 1/8 1/8 2 1 1 1 1 20 10 10 10 10 1/4 1/8 1/8 1/4 1/8 2 1 1 2 1 20 10 10 20 10 1/4 1/4 1/8 1/8 1/8 2 2 1 1 1 20 20 10 10 10 1/4 1/4 1/8 1/4 1/8 2 2 1 2 1 20 20 10 20 10 1/4 1/4 1/8 1/4 1/4 2 2 1 2 2 20 20 10 20 20 1/4 1/4 1/4 1/4 1/4 2 2 2 2 2 20 20 20 20 20 1/3 1/3 1/3 1/3 1/3 8/3 8/3 8/3 8/3 8/3 26 26 26 26 26 1/2 1/8 1/8 1/8 1/8 4 1 1 1 1 40 10 10 10 10 1/2 1/8 1/8 1/4 1/8 4 1 1 2 1 40 10 10 20 10 1/2 1/8 1/8 1/2 1/8 4 1 1 4 1 40 10 10 40 10 1/2 1/4 1/8 1/8 1/8 4 2 1 1 1 40 20 10 10 10 1/2 1/4 1/8 1/4 1/8 4 2 1 2 1 40 20 10 20 10 1/2 1/4 1/8 1/4 1/4 4 2 1 2 2 40 20 10 20 20 1/2 1/4 1/8 1/2 1/8 4 2 1 4 1 40 20 10 40 10 1/2 1/4 1/8 1/2 1/4 4 2 1 4 2 40 20 10 40 20 1/2 1/4 1/4 1/4 1/4 4 2 2 2 2 40 20 20 20 20 1/2 1/4 1/4 1/2 1/4 4 2 2 4 2 40 20 20 40 20 1/2 1/2 1/8 1/8 1/8 4 4 1 1 1 40 40 10 10 10 1/2 1/2 1/8 1/4 1/8 4 4 1 2 1 40 40 10 20 10 1/2 1/2 1/8 1/4 1/4 4 4 1 2 2 40 40 10 20 20 1/2 1/2 1/8 1/2 1/8 4 4 1 4 1 40 40 10 40 10 1/2 1/2 1/8 1/2 1/4 4 4 1 4 2 40 40 10 40 20 1/2 1/2 1/8 1/2 1/2 4 4 1 4 4 40 40 10 40 40 1/2 1/2 1/4 1/4 1/4 4 4 2 2 2 40 40 20 20 20 1/2 1/2 1/4 1/2 1/4 4 4 2 4 2 40 40 20 40 20 1/2 1/2 1/4 1/2 1/2 4 4 2 4 4 40 40 20 40 40
section 4 clock pulse generator (cpg) page 74 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group frqcr division ratio setting clock ratio clock frequency (mhz) * pll multipli- cation ratio i b p mi mp i b p mi mp input clock i b p mi mp 8 1/2 1/2 1/2 1/2 1/2 4 4 4 4 4 10 40 40 40 40 40 1/1 1/8 1/8 1/8 1/8 8 1 1 1 1 80 10 10 10 10 1/1 1/8 1/8 1/4 1/8 8 1 1 2 1 80 10 10 20 10 1/1 1/8 1/8 1/2 1/8 8 1 1 4 1 80 10 10 40 10 1/1 1/8 1/8 1/1 1/8 8 1 1 8 1 80 10 10 80 10 1/1 1/4 1/8 1/8 1/8 8 2 1 1 1 80 20 10 10 10 1/1 1/4 1/8 1/4 1/8 8 2 1 2 1 80 20 10 20 10 1/1 1/4 1/8 1/4 1/4 8 2 1 2 2 80 20 10 20 20 1/1 1/4 1/8 1/2 1/8 8 2 1 4 1 80 20 10 40 10 1/1 1/4 1/8 1/2 1/4 8 2 1 4 2 80 20 10 40 20 1/1 1/4 1/8 1/1 1/8 8 2 1 8 1 80 20 10 80 10 1/1 1/4 1/8 1/1 1/4 8 2 1 8 2 80 20 10 80 20 1/1 1/4 1/4 1/4 1/4 8 2 2 2 2 80 20 20 20 20 1/1 1/4 1/4 1/2 1/4 8 2 2 4 2 80 20 20 40 20 1/1 1/4 1/4 1/1 1/4 8 2 2 8 2 80 20 20 80 20 1/1 1/3 1/3 1/3 1/3 8 8/3 8/3 8/3 8/3 80 26 26 26 26 1/1 1/3 1/3 1/1 1/3 8 8/3 8/3 8 8/3 80 26 26 80 26 1/1 1/2 1/8 1/8 1/8 8 4 1 1 1 80 40 10 10 10 1/1 1/2 1/8 1/4 1/8 8 4 1 2 1 80 40 10 20 10 1/1 1/2 1/8 1/4 1/4 8 4 1 2 2 80 40 10 20 20 1/1 1/2 1/8 1/2 1/8 8 4 1 4 1 80 40 10 40 10 1/1 1/2 1/8 1/2 1/4 8 4 1 4 2 80 40 10 40 20 1/1 1/2 1/8 1/2 1/2 8 4 1 4 4 80 40 10 40 40 1/1 1/2 1/8 1/1 1/8 8 4 1 8 1 80 40 10 80 10 1/1 1/2 1/8 1/1 1/4 8 4 1 8 2 80 40 10 80 20 1/1 1/2 1/8 1/1 1/2 8 4 1 8 4 80 40 10 80 40 1/1 1/2 1/4 1/4 1/4 8 4 2 2 2 80 40 20 20 20 1/1 1/2 1/4 1/2 1/4 8 4 2 4 2 80 40 20 40 20
section 4 clock pulse generator (cpg) r01uh0198ej0500 rev. 5.00 page 75 of 1560 mar 18, 2011 sh7080 group frqcr division ratio setting clock ratio clock frequency (mhz) * pll multipli- cation ratio i b p mi mp i b p mi mp input clock i b p mi mp 8 1/1 1/2 1/4 1/2 1/2 8 4 2 4 4 10 80 40 20 40 40 1/1 1/2 1/4 1/1 1/4 8 4 2 8 2 80 40 20 80 20 1/1 1/2 1/4 1/1 1/2 8 4 2 8 4 80 40 20 80 40 1/1 1/2 1/2 1/2 1/2 8 4 4 4 4 80 40 40 40 40 1/1 1/2 1/2 1/1 1/2 8 4 4 8 4 80 40 40 80 40 1/1 1/1 1/4 1/4 1/4 8 8 2 2 2 5 40 40 10 10 10 1/1 1/1 1/4 1/2 1/4 8 8 2 4 2 40 40 10 20 10 1/1 1/1 1/4 1/2 1/2 8 8 2 4 4 40 40 10 20 20 1/1 1/1 1/4 1/1 1/4 8 8 2 8 2 40 40 10 40 10 1/1 1/1 1/4 1/1 1/2 8 8 2 8 4 40 40 10 40 20 1/1 1/1 1/4 1/1 1/1 8 8 2 8 8 40 40 10 40 40 1/1 1/1 1/3 1/3 1/3 8 8 8/3 8/3 8/3 40 40 13 13 13 1/1 1/1 1/3 1/1 1/3 8 8 8/3 8 8/3 40 40 13 40 13 1/1 1/1 1/3 1/1 1/1 8 8 8/3 8 8 40 40 13 40 40 1/1 1/1 1/2 1/2 1/2 8 8 4 4 4 40 40 20 20 20 1/1 1/1 1/2 1/1 1/2 8 8 4 8 4 40 40 20 40 20 1/1 1/1 1/2 1/1 1/1 8 8 4 8 8 40 40 20 40 40 1/1 1/1 1/1 1/1 1/1 8 8 8 8 8 40 40 40 40 40
section 4 clock pulse generator (cpg) page 76 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group notes: * clock frequencies when the input clock frequency is assumed to be the shown value. 1. the pll multiplication ratio is fixed at 8. the division ratio can be selected from 1, 1/2, 1/3, 1/4, and 1/8 for each clock by the setting in the frequency control register. 2. the output frequency of the pll circuit is the product of the frequency of the input from the crystal resonator or extal pin and the multiplication ratio ( 8) of the pll circuit. 3. the input to the divider is always the output from the pll circuit. 4. the internal clock (i ) frequency is the product of the frequency of the input from the crystal resonator or extal pin, the multiplication ratio ( 8) of the pll circuit, and the division ratio of the divider. the resultant frequency must be a maximum of 80 mhz (maximum operating frequency). 5. the bus clock (b ) frequency is the product of the frequency of the input from the crystal resonator or extal pin, the multiplication ratio ( 8) of the pll circuit, and the division ratio of the divider. the resultant frequency must be a maximum of 40 mhz and equal to or lower than the internal clock (i ) frequency. 6. the peripheral clock (p ) frequency is the product of the frequency of the input from the crystal resonator or extal pin, the multiplication ratio ( 8) of the pll circuit, and the division ratio of the divider. the resultant frequency must be a maximum of 40 mhz and equal to or lower than the bus clock (b ) frequency. 7. when using the mtu2s and mtu2, the mtu2s clock (mi ) frequency must be equal to or lower than the internal clock (i ) frequency and equal to or higher than the mtu2 clock (mp ) frequency. the mtu2 clock (mp ) frequency must be equal to or lower than the mtu2s clock (mi ) frequency and the bus clock (b ) frequency and equal to or higher than the peripheral clock frequency (p ). the mtu2s clock (mi ) frequency and mtu2 clock (mp ) frequency are the product of the frequency of the input from the crystal resonator or extal pin, the multiplication ratio ( 8) of the pll circuit, and the division ratio of the divider. 8. the frequency of the ck pin is always be equal to the bus clock (b ) frequency.
section 4 clock pulse generator (cpg) r01uh0198ej0500 rev. 5.00 page 77 of 1560 mar 18, 2011 sh7080 group 4.4 register descriptions the cpg has the following registers. for details on the addresses of these registers and the states of these registers in each processing state, see section 27, list of registers. table 4.5 register configuration register name abbrevia- tion r/w initial value address access size frequency control register frqcr r/w h'36db h'ffffe800 16 oscillation stop detection control register osccr r/w h'00 h'ffffe814 8 4.4.1 frequency control register (frqcr) frqcr is a 16-bit readable/writable register that specifies the frequency division ratios for the internal clock (i ), bus clock (b ), peripheral clock (p ), mtu2s clock (mi ), and mtu2 clock (mp ). frqcr can be accessed only in words. frqcr is initialized to h'36db only by a power-on reset (except a power-on reset due to a wdt overflow). 1514131211109876543210 bit: initial value: r/w: 0011011011011011 r r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w - ifc[2:0] bfc[2:0] pfc[2:0] mifc[2:0] mpfc[2:0]
section 4 clock pulse generator (cpg) page 78 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 to 12 ifc[2:0] 011 r/w internal clock (i ) frequency division ratio specify the division ratio of the internal clock (i ) frequency with respect to the output frequency of pll circuit. if a prohibited value is specified, subsequent operation is not guaranteed. 000: 1 001: 1/2 010: 1/3 011: 1/4 100: 1/8 other than above: setting prohibited 11 to 9 bfc[2:0] 011 r/w bus clock (b ) frequency division ratio specify the division ratio of the bus clock (b ) frequency with respect to the output frequency of pll circuit. if a prohibited value is specified, subsequent operation is not guaranteed. 000: 1 001: 1/2 010: 1/3 011: 1/4 100: 1/8 other than above: setting prohibited
section 4 clock pulse generator (cpg) r01uh0198ej0500 rev. 5.00 page 79 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 8 to 6 pfc[2:0] 011 r/w peripheral clock (p ) frequency division ratio specify the division ratio of the peripheral clock (p ) frequency with respect to the output frequency of pll circuit. if a prohibited value is specified, subsequent operation is not guaranteed. 000: 1 001: 1/2 010: 1/3 011: 1/4 100: 1/8 other than above: setting prohibited 5 to 3 mifc[2:0] 011 r/w mtu2s clock (mi ) frequency division ratio specify the division ratio of the mtu2s clock (mi ) frequency with respect to the output frequency of pll circuit. if a prohibited value is specified, subsequent operation is not guaranteed. 000: 1 001: 1/2 010: 1/3 011: 1/4 100: 1/8 other than above: setting prohibited 2 to 0 mpfc[2:0] 011 r/w mtu2 clock (mp ) frequency division ratio specify the division ratio of the mtu2 clock (mp ) frequency with respect to the output frequency of pll circuit. if a prohibited value is specified, subsequent operation is not guaranteed. 000: 1 001: 1/2 010: 1/3 011: 1/4 100: 1/8 other than above: setting prohibited
section 4 clock pulse generator (cpg) page 80 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 4.4.2 oscillation stop detectio n control register (osccr) osccr is an 8-bit readable/writable register that has an oscillation stop detection flag and selects flag status output to an external pin. osccr can be accessed only in bytes. 76543210 bit: initial value: r/w: 00000000 rrrrrrrr/w ----- osc stop - osc ers bit bit name initial value r/w description 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 oscstop 0 r oscillation stop detection flag [setting conditions] ? when a stop in the clock input is detected during normal operation ? when software standby mode is entered [clearing conditions] ? by a power-on reset input through the res pin ? when software standby mode is canceled 1 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 0 oscers 0 r/w oscillation stop detection flag output select selects whether to output the oscillation stop detection flag signal through the wdtovf pin. 0: outputs only the wdt overflow signal through the wdtovf pin 1: outputs the wdt overflow signal and the oscillation stop detection flag signal through the wdtovf pin
section 4 clock pulse generator (cpg) r01uh0198ej0500 rev. 5.00 page 81 of 1560 mar 18, 2011 sh7080 group 4.5 changing frequency selecting division ratios for the frequency divider can change the frequencies of the internal clock (i ), bus clock (b ), peripheral clock (p ), mtu2s clock (mi ), and mtu2 clock (mp ). this is controlled by software through the frequency control register (frqcr). the following describes how to specify the frequencies. 1. in the initial state, ifc2 to ifc0 = h'011 ( 1/4), bfc2 to bfc0 = h'011 ( 1/4), pfc2 to pfc0 = h'011 ( 1/4), mifc2 to mifc0 = h'011 ( 1/4), and mpfc2 to mpfc0 = h'011 ( 1/4). 2. stop all modules except the cpu, on-chip rom, and on-chip ram. 3. set the desired values in bits ifc2 to ifc0, bfc2 to bfc0, pfc2 to pfc0, mifc2 to mifc0, and mpfc2 to mpfc0 bits. since the frequency mu ltiplication ratio in the pll circuit is fixed at 8, the frequencies are determined only be selecting division ratios. when specifying the frequencies, satisfy the following condition: internal clock (i ) bus clock (b ) peripheral clock (p ). when using the mtu2s clock and mtu2 clock, specify the frequencies to satisfy the following condition: internal clock (i ) mtu2s clock (mi ) mtu2 clock (mp ) peripheral clock (p ) and bus clock (b ) mtu2 clock (mp ). code to rewrite values of frqcr should be executed in the on-chip rom or on-chip ram. 4. after an instruction to rewrite frqcr has been issued, the actual clock frequencies will change after (1 to 24n) cyc + 11b + 7p . n: division ratio specified by the bfc bit in frqcr (1, 1/2, 1/3, 1/4, or 1/8) cyc: clock obtained by dividing extal by 8 with the pll. note: (1 to 24n) depends on the internal state.
section 4 clock pulse generator (cpg) page 82 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 4.6 oscillator clock pulses can be supplied from a connected crystal resonator or an external clock. 4.6.1 connecting crystal resonator a crystal resonator can be connected as shown in figure 4.2. use the damping resistance (rd) listed in table 4.6. use a crystal resonator that has a resonance frequency of 5 to 12.5 mhz. it is recommended to consult the crystal resonator manufacturer concerning the compatibility of the crystal resonator and the lsi. extal xtal r d c l2 c l1 c l1 = c l2 = 18 to 22 pf (reference values) figure 4.2 connection of crystal resonator (example) table 4.6 damping resistan ce values (reference values) frequency (mhz) 5 8 10 12.5 rd ( )(reference values) 500 200 0 0 figure 4.3 shows an equivalent circuit of the crystal resonator. use a crystal resonator with the characteristics listed in table 4.7. xtal c l extal c 0 l r s figure 4.3 crystal resonator equivalent circuit table 4.7 crystal resonator characteristics frequency (mhz) 5 8 10 12.5 rs max. ( ) (reference values) 120 80 60 50 c 0 max. (pf) (reference values) 7 7 7 7
section 4 clock pulse generator (cpg) r01uh0198ej0500 rev. 5.00 page 83 of 1560 mar 18, 2011 sh7080 group 4.6.2 external clock input method figure 4.4 shows an example of an external clock input connection. in this case, make the external clock high level to stop it when in software st andby mode. during operation, make the external input clock frequency 5 to 12.5 mhz. when leaving the xtal pin open, make sure the parasitic capacitance is less than 10 pf. even when inputting an external clock, be sure to wait at least the oscillation stabilization time in power-on sequence or in releasing software standby mode, in order to ensure the pll stabilization time. extal xtal external clock input open state figure 4.4 example of external clock connection
section 4 clock pulse generator (cpg) page 84 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 4.7 function for detecting oscillator stop this cpg detects a stop in the clock input if any system abnormality halts the clock supply. when no change has been detected in the extal input for a certain period, the oscstop bit in osccr is set to 1 and this state is retain ed until a power-on reset is input through the res pin or software standby mode is canceled. if the oscers b it is set to 1 at this time, an oscillation stop detection flag signal is output through the wdtovf pin. in addition, the high-current ports (pins to which the tioc3b, tioc3d, and tioc4a to tioc4d signals in the mtu2 and the tioc3bs, tioc3ds, and tioc4as to tioc4ds signals in th e mtu2s are assigned) can be placed in high- impedance state regardless of the pfc setting. for details, refer to section 21.1.11, high-current port control register (hcpcr), and appendix a, pin states. even in software standby mode, these pins can be placed in high-impedance state. for details, refer to section 21.1.11, high-current port cont rol register (hcpcr), and appendix a, pin states. these pins enter the normal state afte r software standby mode is canceled. under an abnormal condition where oscillation stops while th e lsi is not in softwa re standby mode, lsi operations other than the oscillation stop detection function become unpredictable. in this case, even after oscillation is restarted, lsi operations including the above high -current pins become unpredictable. even while no change is detected in the extal input, the pll circuit in this lsi continues oscillating at a frequency range from 100 khz to 10 mhz (depending on the temperature and operating voltage).
section 4 clock pulse generator (cpg) r01uh0198ej0500 rev. 5.00 page 85 of 1560 mar 18, 2011 sh7080 group 4.8 usage notes 4.8.1 note on crystal resonator a sufficient evaluation at the user?s site is nece ssary to use the lsi, by referring the resonator connection examples shown in this section, becau se various characteristics related to the crystal resonator are closely linked to the user?s board design. as the oscillator circuit's circuit constant will depend on the resonator and the floating capacita nce of the mounting circuit, the value of each external circuit?s component should be determined in consultation with the resonator manufacturer. the design must ensure that a volta ge exceeding the maximum rating is not applied to the oscillator pin. 4.8.2 notes on board design measures against radiation noise are taken in this lsi. if further reduction in radiation noise is needed, it is recommended to use a multiple layer board and provide a layer exclusive to the system ground. when using a crystal resonator, place the crystal resonator and its load capacitors as close as possible to the xtal and extal pins. do not route any signal lines near the oscillator circuitry as shown in figure 4.5. otherwise, correct oscillation can be interfered by induction. c l2 signal a signal b this lsi c l1 xtal extal avoid figure 4.5 cautions for oscillator circuit board design
section 4 clock pulse generator (cpg) page 86 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group a circuitry shown in figure 4.6 is recommended as an external circuitry around the pll. separate the pll power lines (pllvss) and the system power lines (vcc, vss) at the board power supply source, and be sure to insert bypass capacitors cb and cpb close to the pins. pllv ss v cl v cc v ss cpb = 0.47 f * cb = 0.1 f * (recommended values are shown.) note: * cb and cpb are laminated ceramic type. figure 4.6 recommended external circuitry around pll
section 5 exception handling r01uh0198ej0500 rev. 5.00 page 87 of 1560 mar 18, 2011 sh7080 group section 5 exception handling 5.1 overview 5.1.1 types of exception handling and priority exception handling is started by four sources: resets, address errors, interrupts and instructions and have the priority, as shown in table 5.1. when several exceptions are detected at once, they are processed according to the priority. table 5.1 types of exceptions and priority exception exception source priority reset power-on reset high manual reset interrupt user break (break before instruction execution) address error cpu address error (instruction fetch) instruction general illegal instructions (undefined code) illegal slot instruction (undefined code placed immediately after a delayed branch instruction * 1 or instruction that changes the pc value * 2 ) trap instruction (trapa instruction) address error cpu address error (data access) interrupt user break (break after instruction execution or operand break) address error dmac/dtc address error (data access) interrupt nmi irq on-chip peripheral modules low notes: 1. delayed branch instructions: jmp, jsr, bra, bsr, rts, rte, bf/s, bt/s, bsrf, and braf. 2. instructions that change the pc value: jmp, jsr, bra, bsr, rts, rte, bt, bf, trapa, bf/s, bt/s, bsrf, braf, ldc rm,sr, ldc.l @rm+,sr.
section 5 exception handling page 88 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 5.1.2 exception hand ling operations the exceptions are detected and the exception handling starts acco rding to the timing shown in table 5.2. table 5.2 timing for exception detection and start of exception handling exception timing of source detection and start of exception handling reset power-on reset started when the res pin changes from low to high or when the wdt overflows. manual reset started when the mres pin changes from low to high or when the wdt overflows. address error interrupt detected during the instruction decode stage and started after the execution of the current instruction is completed. instruction trap instruction started by the execution of the trapa instruction. general illegal instructions started when an undefined code placed at other than a delay slot (immediately after a delayed branch instruction) is decoded. illegal slot instructions started when an undefined code placed at a delay slot (immediately after a delayed branch instruction) or an instruction that changes the pc value is detected. when exception handling starts, the cpu operates exception handling triggered by reset: the initial values of the program counter (pc) and stack pointer (sp) are fetched from the exceptio n handling vector table (pc from the address h'00000000 and sp from the address h'00000004 when a power-on reset. pc from the address h'00000008 and sp from the address h'0000000c when a manual reset.). for details, see section 5.1.3, exception handling vector table. h'00000000 is then written to the vector base register (vbr), and h'f (b'1111) is written to the interrupt mask bits (i3 to i0) in the status register (sr). the program starts from the pc address fetched from the exception handling vector table. exception handling triggered by addres s error, interrupt , and instruction: sr and pc are saved to the stack indicated by r15. for interrupt exception handling, the interrupt priority level is written to the interrupt mask bits (i3 to i0) in sr. for address error and instruction exception handling, bits i3 to i0 are not affected. the start address is then fetched from the exception handling vector table and the program starts from that address.
section 5 exception handling r01uh0198ej0500 rev. 5.00 page 89 of 1560 mar 18, 2011 sh7080 group 5.1.3 exception handling vector table before exception handling starts, the exception handling vector table must be set in memory. the exception handling vector table stores the start addresses of exception handling routines. (the reset exception handling table holds the initial values of pc and sp.) all exception sources are given different vector numbers and vector table address offsets. the vector table addresses are calculated from these v ector numbers and vector table address offsets. during exception handling, the start addresses of the exception handling routines are fetched from the exception handling vector ta ble that is indicated by th is vector table address. table 5.3 shows the vector numbers and vector table address offsets. table 5.4 shows how vector table addresses are calculated. table 5.3 vector numbers and vector table address offsets exception handling source vector number vector table address offset power-on reset pc 0 h'00000000 to h'00000003 sp 1 h'00000004 to h'00000007 manual reset pc 2 h'00000008 to h'0000000b sp 3 h'0000000c to h'0000000f general illegal instruction 4 h'00000010 to h'00000013 (reserved for system use) 5 h'00000014 to h'00000017 illegal slot instruction 6 h'00000018 to h'0000001b (reserved for system use) 7 h'0000001c to h'0000001f 8 h'00000020 to h'00000023 cpu address error 9 h'00000024 to h'00000027 dmac/dtc address error 10 h'00000028 to h'0000002b interrupt nmi 11 h'0000002c to h'0000002f user break 12 h'00000030 to h'00000033 (reserved for system use) 13 h'00000034 to h'00000037 : : 31 h'0000007c to h'0000007f trap instruction (user vector) 32 h'00000080 to h'00000083 : : 63 h'000000fc to h'000000ff
section 5 exception handling page 90 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group exception handling source vector number vector table address offset interrupt irq0 64 h'00000100 to h'00000103 irq1 65 h'00000104 to h'00000107 irq2 66 h'00000108 to h'0000010b irq3 67 h'0000010c to h'0000010f irq4 68 h'00000110 to h'00000113 irq5 69 h'00000114 to h'00000117 irq6 70 h'00000118 to h'0000011b irq7 71 h'0000011c to h'0000011f on-chip peripheral module * 72 h'00000120 to h'00000123 : : 255 h'000003fc to h'000003ff note: * for details on the vector numbers and vector table address offsets of on-chip peripheral module interrupts, see table 6.3 in section 6, interrupt controller (intc). table 5.4 calculating exception handling vector table addresses exception source vector table address calculation resets vector table address = (vector table address offset) = (vector number) 4 address errors, interrupts, instructions vector table address = vbr + (vector table address offset) = vbr + (vector number) 4 notes: 1. vbr: vector base register 2. vector table address offset: see table 5.3. 3. vector number: see table 5.3.
section 5 exception handling r01uh0198ej0500 rev. 5.00 page 91 of 1560 mar 18, 2011 sh7080 group 5.2 resets 5.2.1 types of resets resets have priority over any exception source. th ere are two types of resets: power-on resets and manual resets. as table 5.5 shows, both types of resets initialize the internal status of the cpu. in power-on resets, all registers of the on-chip peripheral modules are initialized; in manual resets, they are not. table 5.5 reset status conditions for transition to reset state internal state type res wdt overflow mres cpu, intc on-chip peripheral module poe, pfc, i/o port low ? ? initialized initialized initialized power-on reset high overflow high initialized initialized initialized manual reset high not overflowed low initialized not initialized not initialized 5.2.2 power-on reset power-on reset by res pin: when the res pin is driven low, this lsi enters the power-on reset state. to reliably reset this lsi, the res pin should be kept low fo r at least the oscillation settling time when applying the power or when in standby mode (when the clock is halted) or at least 20 tcyc when the clock is operating. during the power-on reset state, cpu internal states and all registers of on-chip peripheral modules are initialized. see appendix a, pin states, for the status of individual pins during power-on reset mode. in the power-on reset state, power-on reset exception handling starts when driving the res pin high after driving the pin low for the given time. the cpu operates as follows: 1. the initial value (execution start address) of the program counter (pc) is fetched from the exception handling vector table. 2. the initial value of the stack pointer (sp) is fetched from the exception handling vector table. 3. the vector base register (vbr) is cleared to h'00000000 and the interrupt mask bits (i3 to i0) of the status register (sr) are set to h'f (b'1111). 4. the values fetched from the exception handling vector table are set in pc and sp, then the program starts.
section 5 exception handling page 92 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group be certain to always perform power-on reset exception handling when turning the system power on. power-on reset by wdt: when wtcnt of the wdt overflows while a setting is made so that a power-on reset can be generated in watchdog timer mode of the wdt, this lsi enters the power-on reset state. the frequency control register (frqcr) in the clock pulse generator (cpg) and the watchdog timer (wdt) registers are not initialized by the reset signal generated by the wdt (these registers are only initialized by a power-on reset from the res pin). if a reset caused by the signal input on the res pin and a reset caused by a wdt overflow occur simultaneously, the res pin reset has priority, and the wovf bit in wtcsr is cleared to 0. when the power-on reset exception handling caused by the wdt is started, the cpu operates as follows: 1. the initial value (execution start address) of the program counter (pc) is fetched from the exception handling vector table. 2. the initial value of the stack pointer (sp) is fetched from the exception handling vector table. 3. the vector base register (vbr) is cleared to h'00000000 and the interrupt mask bits (i3 to i0) of the status register (sr) are set to h'f (b'1111). 4. the values fetched from the exception handling vector table are set in the pc and sp, then the program starts. 5.2.3 manual reset when the res pin is high and the mres pin is driven low, the lsi becomes to be a manual reset state. to reliably reset the lsi, the mres pin should be kept at low for at least the duration of the oscillation settling time that is set in wdt when in software standby mode (when the clock is halted) or at least 20 t cyc when the clock is operating. during manual reset, the cpu internal status is initialized. registers of on-chip peripheral modules are not initialized. when the lsi enters manual reset status in the middle of a bus cycl e, manual reset exception processing does not start until the bus cycle has ended. thus, manual resets do not abort bus cycles. however, once mres is driven low, hold the low level until the cpu becomes to be a manual reset mode after the bus cycle ends. (keep at low level for at least the lo ngest bus cycle). see appendix a, pin states, for the status of individual pins during manual reset mode. in the manual reset status, manual reset exception processing starts when the mres pin is first kept low for a set period of time and then returned to high. the cpu will then operate in the same procedures as described for power-on resets.
section 5 exception handling r01uh0198ej0500 rev. 5.00 page 93 of 1560 mar 18, 2011 sh7080 group 5.3 address errors 5.3.1 address error sources address errors occur when instructions are fetched or data is read from or written to, as shown in table 5.6. table 5.6 bus cycles and address errors bus cycle type bus master bus cycle description address errors cpu instruction fetched from even address none (normal) instruction fetch instruction fetched from odd address address error occurs instruction fetched from a space other than on-chip peripheral module space none (normal) instruction fetched from on-chip peripheral module space address error occurs instruction fetched from external memory space in single chip mode address error occurs word data accessed from even address none (normal) data read/write cpu, dmac, or dtc word data accessed from odd address address error occurs longword data accessed from a longword boundary none (normal) longword data accessed from other than a long-word boundary address error occurs byte or word data accessed in on-chip peripheral module space none (normal) longword data accessed in 16-bit on-chip peripheral module space none (normal) longword data accessed in 8-bit on-chip peripheral module space none (normal) external memory space accessed when in single chip mode address error occurs
section 5 exception handling page 94 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 5.3.2 address error exception source when an address error exception is generated, the bus cycle which caused the address error ends, the current instruction finishes, and then the address error exception handling starts. the cpu operates as follows: 1. the status register (sr) is saved to the stack. 2. the program counter (pc) is saved to the stack. the pc value to be saved is the start address of the instruction which caused an address error exception. when the instruction that caused the exception is placed in the delay slot, the address of the delayed branch instruction which is placed immediat ely before the delay slot. 3. the start address of the exception handling routine is fetched from the exception handling vector table that corresponds to the generated address error, and the program starts executing from that address. this branch is not a delayed branch.
section 5 exception handling r01uh0198ej0500 rev. 5.00 page 95 of 1560 mar 18, 2011 sh7080 group 5.4 interrupts 5.4.1 interrupt sources table 5.7 shows the sources that start the interrupt exception handling. they are nmi, user break, irq, and on-chip peripheral modules. table 5.7 interrupt sources type request source number of sources nmi nmi pin (external input) 1 user break user break controller (ubc) 1 irq irq0 to irq7 pins (external input) 8 on-chip peripheral module direct memory access controller (dmac) 8 multi-function timer pulse unit 2 (mtu2) 28 multi-function timer pulse unit 2s (mtu2s) 13 data transfer controller (dtc) 1 bus state controller (bsc) 1 watchdog timer (wdt) 1 a/d converter (a/d_0, a/d_1, and a/d_2) 3 compare match timer (cmt_0 and cmt_1) 2 serial communication interface (sci_0, sci_1, and sci_2) 12 serial communication interface with fifo (scif_3) 4 synchronous serial communication unit (ssu) 3 port output enable (poe) 3 i 2 c bus interface 2 (i 2 c2) 5 all interrupt sources are given different vector numbers and vector table address offsets. for details on vector numbers and vector table address offsets, see table 6.3 in section 6, interrupt controller (intc).
section 5 exception handling page 96 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 5.4.2 interrupt priority the interrupt priority is predetermined. when multiple interrupts occur simultaneously (overlapped interruptions), the interrupt controller (intc) determines their relative priorities and starts the exception handling according to the results. the priority of interrupts is expressed as priority levels 0 to 16, with priority 0 the lowest and priority 16 the highest. the nmi interrupt has priority 16 and cannot be masked, so it is always accepted. the priority level of th e user break interrupt is 15. ir q interrupt and on-chip peripheral module interrupt priority levels can be set freely using the interrupt priority registers a to f and h to m (ipra to iprf and iprh to iprm) of the intc as shown in table 5.8. the priority levels that can be set are 0 to 15. level 16 cannot be set. for details on ipra to iprf, see section 6.3.4, interrupt priority registers a to f and h to m (ipr a to iprf and iprh to iprm). table 5.8 interrupt priority type priority level comment nmi 16 fixed priority level. cannot be masked. user break 15 fixed priority level. can be masked. irq 0 to 15 on-chip peripheral module set with interrupt priority registers a to f and h to m (ipra to iprf and iprh to iprm). 5.4.3 interrupt exception handling when an interrupt occurs, the interrupt controller (intc) ascertains its priority level. nmi is always accepted, but other interrupts are only accepted if they have a priority level higher than the priority level set in the interrupt mask bits (i3 to i0) of the status register (sr). when an interrupt is accepted, exception handling begins. in interrupt exception handling, the cpu saves sr and the program counter (pc) to the stack. the priority level of the accepted interrupt is written to bits i3 to i0 in sr. although the priority leve l of the nmi is 16, the value set in bits i3 to i0 is h'f (level 15). next, the start address of the exception handling routine is fetched from the exception handling vector table for the accepted interrupt, and program execution branches to that address and the program starts. for details on the interrupt exception handling, see section 6.6, interrupt operation.
section 5 exception handling r01uh0198ej0500 rev. 5.00 page 97 of 1560 mar 18, 2011 sh7080 group 5.5 exceptions triggered by instructions 5.5.1 types of exceptions tri ggered by instructions exception handling can be triggered by the trap instruction, illegal slot instructions, and general illegal instructions, as shown in table 5.9. table 5.9 types of exceptions triggered by instructions type source instruction comment trap instruction trapa ? illegal slot instructions * undefined code placed immediately after a delayed branch instruction (delay slot) or instructions that changes the pc value delayed branch instructions: jmp, jsr, bra, bsr, rts, rte, bf/s, bt/s, bsrf, braf instructions that changes the pc value: jmp, jsr, bra, bsr, rts, rte, bt, bf, trapa, bf/s, bt/s, bsrf, braf, ldc rm,sr, ldc.l @rm+,sr general illegal instructions * undefined code anywhere besides in a delay slot ? note: * the operation is not guaranteed when und efined instructions other than h'f000 to h'ffff are decoded. 5.5.2 trap instructions when a trapa instruction is executed, the trap instruction exception handling starts. the cpu operates as follows: 1. the status register (sr) is saved to the stack. 2. the program counter (pc) is saved to the stack. the pc value saved is the start address of the instruction to be executed after the trapa instruction. 3. the cpu reads the start addr ess of the exception handling routine from the exception handling vector table that corresponds to the vector number specified in the trapa instruction, program execution branches to that address, and then the program starts. this branch is not a delayed branch.
section 5 exception handling page 98 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 5.5.3 illegal slot instructions an instruction placed imme diately after a delayed branch inst ruction is called "instruction placed in a delay slot". when the instruction placed in the delay slot is an undefined code, illegal slot exception handling starts after the undefined code is decoded. illegal slot exception handling also starts when an instruc tion that changes the program counter (p c) value is placed in a delay slot and the instruction is decoded. the cpu handles an illegal slot instruction as follows: 1. the status register (sr) is saved to the stack. 2. the program counter (pc) is saved to the stack. the pc value saved is the target address of the delayed branch instruction immediately before the undefined code or the instruction that rewrites the pc. 3. the start address of the exception handling routine is fetched from the exception handling vector table that corresponds to the exception that occurred. program execution branches to that address and the program starts. this branch is not a delayed branch. 5.5.4 general illegal instructions when an undefined code placed anywhere other than immediately after a delayed branch instruction (i.e., in a delay slot) is decoded, general illegal instruction exception handling starts. the cpu handles the general illegal instructions in the same procedures as in the illegal slot instructions. unlike processing of illegal slot instru ctions, however, the program counter value that is stacked is the start address of the undefined code.
section 5 exception handling r01uh0198ej0500 rev. 5.00 page 99 of 1560 mar 18, 2011 sh7080 group 5.6 cases when exceptions are accepted when an exception other than rese ts occurs during decoding the inst ruction placed in a delay slot or immediately after an interrupt disabled instruction, it may not be accepted and be held shown in table 5.10. in this case, when an instruction wh ich accepts an interrupt request is decoded, the exception is accepted. table 5.10 delay slot instructions, interrupt disabled instructions, and exceptions exception occurrence timing address error general illegal instruction slot illegal instruction trap instruction interrupt instruction in delay slot * 2 ? * 2 ? * 3 immediately after interrupt disabled instruction * 1 * 4 [legend] : accepted : not accepted ? : does not occur notes: 1. interrupt disabled instructions: ldc, ldc.l, stc, stc.l, lds, lds.l, sts, and sts.l 2. an exception is accepted before the execution of a delayed branch instruction. however, when an address error or a slot illegal instruction exception occurs in the delay slot of the rte instruction, correct operation is not guaranteed. 3. an exception is accepted after a delayed branch (between instructions in the delay slot and the branch destination). 4. an exception is accepted after the execution of the next instruction of an interrupt disabled instruction (before the execution two instructions after an interrupt disabled instruction).
section 5 exception handling page 100 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 5.7 stack states after exception handling ends the stack states after exception handling ends are shown in table 5.11. table 5.11 stack status after exception handling ends types stack state address error (when the instruction that caused an exception is placed in the delay slot) sp address of delayed branch instruction sr 32 bits 32 bits address error (other than above) sp sr 32 bits 32 bits address of instruction that caused exception interrupt sp sr 32 bits 32 bits address of instruction after executed instruction trap instruction sp sr 32 bits 32 bits address of instruction after trapa instruction
section 5 exception handling r01uh0198ej0500 rev. 5.00 page 101 of 1560 mar 18, 2011 sh7080 group types stack state illegal slot instruction sp address of delayed branch instruction sr 32 bits 32 bits general illegal instruction sp sr 32 bits 32 bits start address of general illegal instruction
section 5 exception handling page 102 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 5.8 usage notes 5.8.1 value of stack pointer (sp) the sp value must always be a multiple of 4. if it is not, an address error will occur when the stack is accessed during exception handling. 5.8.2 value of vector base register (vbr) the vbr value must always be a multiple of 4. if it is not, an address error will occur when the stack is accessed during exception handling. 5.8.3 address errors caused by stacking for address error exception handling when the sp value is not a multiple of 4, an address error will occur when stacking for exception handling (interrupts, etc.) and address error exception handling will start after the first exception handling is ended. address errors will also occur in the stacking for this address error exception handling. to ensure that address error exception handling does not go into an endless loop, no address errors are accepted at that point. this allows program cont rol to be passed to the handling routine for address error exception and enables error processing. when an address error occurs during exception hand ling stacking, the stacking bus cycle (write) is executed. when stacking the sr and pc values, the sp values for both are subtracted by 4, therefore, the sp value is still not a multiple of 4 after the stacking. the address value output during stacking is the sp value whose lower two bits are cleared to 0. so the write data stacked is undefined.
section 5 exception handling r01uh0198ej0500 rev. 5.00 page 103 of 1560 mar 18, 2011 sh7080 group 5.8.4 notes on slot illegal instruction exception handling some specifications on slot illegal instruction exception handling in this lsi differ from those of the conventional sh-2. ? conventional sh-2: instructions ldc rm,sr and ldc.l @rm+,sr are not subject to the slot illegal instructions. ? this lsi: instructions ldc rm,sr and ldc.l @rm+,sr are subject to the slot illegal instructions. the supporting status on our software products regarding this note is as follows: compiler this instruction is not allocated in the delay slot in the compiler v.4 and its subsequent versions. real-time os for itron specifications 1. hi7000/4, hi-sh7 this instruction does not exist in the delay slot within the os. 2. hi7000 this instruction is in part allocated to the delay slot within the os, which may cause the slot illegal instruction exception handling in this lsi. 3. others the slot illegal instruction exception handling may be generated in this lsi in a case where the instruction is described in assembler or when the middleware of the object is introduced. note that a check-up program (checker) to pick up this instruction is available on our website. download and utilize this checker as needed.
section 5 exception handling page 104 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 105 of 1560 mar 18, 2011 sh7080 group section 6 interrupt controller (intc) the interrupt controller (intc) ascertains the priority of interrupt sources and controls interrupt requests to the cpu. 6.1 features ? 16 levels of interrupt priority ? nmi noise canceller function ? occurrence of interrupt can be reported externally ( irqout pin)
section 6 interrupt controller (intc) page 106 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 6.1 shows a block diagram of the intc. irqout nmi irq0 irq1 irq2 irq3 irq4 irq5 irq6 irq7 ubc wdt dmac cmt mtu2 a/d scif sci mtu2s i 2 c2 poe ssu bsc (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) input control priority determination com- parator interrupt request sr cpu i3 i2 i1 i0 internal bus bus interface ipra to iprf, iprh to iprm dtcera to dtcere icr0 chcr[11:8] irqsr irqcr module bus intc ubc: user break controller wdt: watchdog timer cmt: compare match timer scif: serial communication interface with fifo sci: serial communication interface dmac: direct memory access controller mtu2: multi-function timer pulse unit 2 mtu2s: multi-function timer pulse unit 2s a/d: a/d converter i 2 c2: i 2 c bus interface 2 poe: port output enable ssu: synchronous serial communication unit dtc: data transfer controller bsc: bus state controller icr0: interrupt control register 0 irqcr: irq control register irqsr: irq status register ipra to iprf, iprh to iprm: interrupt priority registers a to f and h to m sr: status register chcr: dma channel control register dtcera to dtcere: dtc enable registers a to e ipr [legend] dmac dtc cpu/dtc/dmac request determination cpu/dtc request determination figure 6.1 block diagram of intc
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 107 of 1560 mar 18, 2011 sh7080 group 6.2 input/output pins table 6.1 shows the intc pin configuration. table 6.1 pin configuration pin name symbol i/o function non-maskable interrupt input pin nmi input input of non-maskable interrupt request signal interrupt request input pins irq0 to irq7 input input of maskable interrupt request signals interrupt request output pin irqout output output of notification signal when an interrupt has occurred
section 6 interrupt controller (intc) page 108 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 6.3 register descriptions the interrupt controller has the following registers. for details on the addresses of these registers and the states of these registers in each proce ssing state, see section 27, list of registers. table 6.2 register configuration register name abbrevia- tion r/w initial value address access size interrupt control register 0 icr0 r/w h'x000 h'ffffe900 8, 16 irq control register irqcr r/w h'0000 h'ffffe902 8, 16 irq status register irqsr r/w h'xx00 h'ffffe904 8, 16 interrupt priority register a ipra r/w h'0000 h'ffffe906 8, 16 interrupt priority register b iprb r/w h'0000 h'ffffe908 8, 16 interrupt priority register c iprc r/w h'0000 h'ffffe980 16 interrupt priority register d iprd r/w h'0000 h'ffffe982 16 interrupt priority register e ipre r/w h'0000 h'ffffe984 16 interrupt priority register f iprf r/w h'0000 h'ffffe986 16 interrupt priority register h iprh r/w h'0000 h'ffffe98a 16 interrupt priority register i ipri r/w h'0000 h'ffffe98c 16 interrupt priority register j iprj r/w h'0000 h'ffffe98e 16 interrupt priority register k iprk r/w h'0000 h'ffffe990 16 interrupt priority register l iprl r/w h'0000 h'ffffe992 16 interrupt priority register m iprm r/w h'0000 h'ffffe994 16
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 109 of 1560 mar 18, 2011 sh7080 group 6.3.1 interrupt control register 0 (icr0) icr0 is a 16-bit register that sets the input signal detection mode of the external interrupt input pin nmi and indicates the input signal level on the nmi pin. bit: initial value: r/w: 15 14 13 12 11 10 9 87654321 0 note: the initial value is 1 when the level on the nmi pin is high, and 0 when the level on the pin is low. * * 000000000000000 rrrrrrrr/wrrrrrrrr nmil ------nmie-------- bit bit name initial value r/w description 15 nmil * r nmi input level indicates the state of the signal input to the nmi pin. this bit can be read to determine the nmi pin level. this bit cannot be modified. 0: state of the nmi input is low 1: state of the nmi input is high 14 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 nmie 0 r/w nmi edge select 0: interrupt request is detected on the falling edge of the nmi input 1: interrupt request is detected on the rising edge of the nmi input 7 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 6 interrupt controller (intc) page 110 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 6.3.2 irq control register (irqcr) irqcr is a 16-bit register that sets the input signal detection mode of the external interrupt input pins irq0 to irq7. bit: initial value: r/w: 15 14 13 12 11 10 9 87654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w irq71s irq70s irq61s irq60s irq51s irq50s irq41s irq40s irq31s irq30s irq21s irq20s irq11s irq10s irq01s irq00s bit bit name initial value r/w description 15 14 irq71s irq70s 0 0 r/w r/w irq7 sense select set the interrupt request detection mode for pin irq7. 00: interrupt request is detected at the low level of pin irq7 01: interrupt request is detected at the falling edge of pin irq7 10: interrupt request is detected at the rising edge of pin irq7 11: interrupt request is detected at both the falling and rising edges of pin irq7 13 12 irq61s irq60s 0 0 r/w r/w irq6 sense select set the interrupt request detection mode for pin irq6. 00: interrupt request is detected at the low level of pin irq6 01: interrupt request is detected at the falling edge of pin irq6 10: interrupt request is detected at the rising edge of pin irq6 11: interrupt request is detected at both the falling and rising edges of pin irq6
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 111 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 11 10 irq51s irq50s 0 0 r/w r/w irq5 sense select set the interrupt request detection mode for pin irq5. 00: interrupt request is detected at the low level of pin irq5 01: interrupt request is detected at the falling edge of pin irq5 10: interrupt request is detected at the rising edge of pin irq5 11: interrupt request is detected at both the falling and rising edges of pin irq5 9 8 irq41s irq40s 0 0 r/w r/w irq4 sense select set the interrupt request detection mode for pin irq4. 00: interrupt request is detected at the low level of pin irq4 01: interrupt request is detected at the falling edge of pin irq4 10: interrupt request is detected at the rising edge of pin irq4 11: interrupt request is detected at both the falling and rising edges of pin irq4 7 6 irq31s irq30s 0 0 r/w r/w irq3 sense select set the interrupt request detection mode for pin irq3. 00: interrupt request is detected at the low level of pin irq3 01: interrupt request is detected at the falling edge of pin irq3 10: interrupt request is detected at the rising edge of pin irq3 11: interrupt request is detected at both the falling and rising edges of pin irq3
section 6 interrupt controller (intc) page 112 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 4 irq21s irq20s 0 0 r/w r/w irq2 sense select set the interrupt request detection mode for pin irq2. 00: interrupt request is detected at the low level of pin irq2 01: interrupt request is detected at the falling edge of pin irq2 10: interrupt request is detected at the rising edge of pin irq2 11: interrupt request is detected at both the falling and rising edges of pin irq2 3 2 irq11s irq10s 0 0 r/w r/w irq1 sense select set the interrupt request detection mode for pin irq1. 00: interrupt request is detected at the low level of pin irq1 01: interrupt request is detected at the falling edge of pin irq1 10: interrupt request is detected at the rising edge of pin irq1 11: interrupt request is detected at both the falling and rising edges of pin irq1 1 0 irq01s irq00s 0 0 r/w r/w irq0 sense select set the interrupt request detection mode for pin irq0. 00: interrupt request is detected at the low level of pin irq0 01: interrupt request is detected at the falling edge of pin irq0 10: interrupt request is detected at the rising edge of pin irq0 11: interrupt request is detected at both the falling and rising edges of pin irq0
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 113 of 1560 mar 18, 2011 sh7080 group 6.3.3 irq status register (irqsr) irqsr is a 16-bit register that indicates the states of the external interrupt input pins irq0 to irq7 and the status of interrupt request. bit: initial value: r/w: 15 14 13 12 11 10 9 87654321 0 ******** 00000000 rrrrrrrrr/wr/wr/wr/wr/wr/wr/wr/w note: the initial value is 1 when the level on the corresponding irq pin is high, and 0 when the level on the pin is low. * irq7l irq6l irq5l irq4l irq3l irq2l irq1l irq0l irq7f irq6f irq5f irq4f irq3f irq2f irq1f irq0f bit bit name initial value r/w description 15 irq7l * r indicates the state of pin irq7. 0: state of pin irq7 is low 1: state of pin irq7 is high 14 irq6l * r indicates the state of pin irq6. 0: state of pin irq6 is low 1: state of pin irq6 is high 13 irq5l * r indicates the state of pin irq5. 0: state of pin irq5 is low 1: state of pin irq5 is high 12 irq4l * r indicates the state of pin irq4. 0: state of pin irq4 is low 1: state of pin irq4 is high 11 irq3l * r indicates the state of pin irq3. 0: state of pin irq3 is low 1: state of pin irq3 is high 10 irq2l * r indicates the state of pin irq2. 0: state of pin irq2 is low 1: state of pin irq2 is high 9 irq1l * r indicates the state of pin irq1. 0: state of pin irq1 is low 1: state of pin irq1 is high
section 6 interrupt controller (intc) page 114 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 8 irq0l * r indicates the state of pin irq0. 0: state of pin irq0 is low 1: state of pin irq0 is high 7 irq7f 0 r/w indicates the status of an irq7 interrupt request. ? when level detection mode is selected 0: an irq7 interrupt has not been detected [clearing condition] driving pin irq7 high 1: an irq7 interrupt has been detected [setting condition] driving pin irq7 low ? when edge detection mode is selected 0: an irq7 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq7f = 1 ? accepting an irq7 interrupt 1: an irq7 interrupt request has been detected [setting condition] detecting the specified edge of pin irq7
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 115 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 irq6f 0 r/w indicates the status of an irq6 interrupt request. ? when level detection mode is selected 0: an irq6 interrupt has not been detected [clearing condition] driving pin irq6 high 1: an irq6 interrupt has been detected [setting condition] driving pin irq6 low ? when edge detection mode is selected 0: an irq6 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq6f = 1 ? accepting an irq6 interrupt 1: an irq6 interrupt request has been detected [setting condition] detecting the specified edge of pin irq6 5 irq5f 0 r/w indicates the status of an irq5 interrupt request. ? when level detection mode is selected 0: an irq5 interrupt has not been detected [clearing condition] driving pin irq5 high 1: an irq5 interrupt has been detected [setting condition] driving pin irq5 low ? when edge detection mode is selected 0: an irq5 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq5f = 1 ? accepting an irq5 interrupt 1: an irq5 interrupt request has been detected [setting condition] detecting the specified edge of pin irq5
section 6 interrupt controller (intc) page 116 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 irq4f 0 r/w indicates the status of an irq4 interrupt request. ? when level detection mode is selected 0: an irq4 interrupt has not been detected [clearing condition] driving pin irq4 high 1: an irq4 interrupt has been detected [setting condition] driving pin irq4 low ? when edge detection mode is selected 0: an irq4 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq4f = 1 ? accepting an irq4 interrupt 1: an irq4 interrupt request has been detected [setting condition] detecting the specified edge of pin irq4 3 irq3f 0 r/w indicates the status of an irq3 interrupt request. ? when level detection mode is selected 0: an irq3 interrupt has not been detected [clearing condition] driving pin irq3 high 1: an irq3 interrupt has been detected [setting condition] driving pin irq3 low ? when edge detection mode is selected 0: an irq3 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq3f = 1 ? accepting an irq3 interrupt 1: an irq3 interrupt request has been detected [setting condition] detecting the specified edge of pin irq3
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 117 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 irq2f 0 r/w indicates the status of an irq2 interrupt request. ? when level detection mode is selected 0: an irq2 interrupt has not been detected [clearing condition] driving pin irq2 high 1: an irq2 interrupt has been detected [setting condition] driving pin irq2 low ? when edge detection mode is selected 0: an irq2 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq2f = 1 ? accepting an irq2 interrupt 1: an irq2 interrupt request has been detected [setting condition] detecting the specified edge of pin irq2 1 irq1f 0 r/w indicates the status of an irq1 interrupt request. ? when level detection mode is selected 0: an irq1 interrupt has not been detected [clearing condition] driving pin irq1 high 1: an irq1 interrupt has been detected [setting condition] driving pin irq1 low ? when edge detection mode is selected 0: an irq1 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq1f = 1 ? accepting an irq1 interrupt 1: an irq1 interrupt request has been detected [setting condition] detecting the specified edge of pin irq1
section 6 interrupt controller (intc) page 118 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 irq0f 0 r/w indicates the status of an irq0 interrupt request. ? when level detection mode is selected 0: an irq0 interrupt has not been detected [clearing condition] driving pin irq0 high 1: an irq0 interrupt has been detected [setting condition] driving pin irq0 low ? when edge detection mode is selected 0: an irq0 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq0f = 1 ? accepting an irq0 interrupt 1: an irq0 interrupt request has been detected [setting condition] detecting the specified edge of pin irq0 note: * the initial value is 1 when the level on the corresponding irq pin is high, and 0 when the level on the pin is low. 6.3.4 interrupt priority registers a to f a nd h to m (ipra to iprf and iprh to iprm) interrupt priority registers are thirteen 16-bit readable/writable registers that set priority levels from 0 to 15 for interrupts except nmi. for the correspondence between interrupt request sources and ipr, refer to table 6.3. each of the corresponding interrupt priority ranks are established by setting a value from h'0 to h'f in each of the four-b it groups 15 to 12, 11 to 8, 7 to 4 and 3 to 0. reserved bits that are not assigned should be set h'0 (b'0000). bit: initial value: r/w: 15 14 13 12 11 10 9 87654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ipr[15:12] ipr[11:8] ipr[7:4] ipr[3:0]
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 119 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 15 to 12 ipr[15:12] 0000 r/w set priority levels for the corresponding interrupt source. 0000: priority level 0 (lowest) 0001: priority level 1 0010: priority level 2 0011: priority level 3 0100: priority level 4 0101: priority level 5 0110: priority level 6 0111: priority level 7 1000: priority level 8 1001: priority level 9 1010: priority level 10 1011: priority level 11 1100: priority level 12 1101: priority level 13 1110: priority level 14 1111: priority level 15 (highest) 11 to 8 ipr[11:8] 0000 r/w set priority levels for the corresponding interrupt source. 0000: priority level 0 (lowest) 0001: priority level 1 0010: priority level 2 0011: priority level 3 0100: priority level 4 0101: priority level 5 0110: priority level 6 0111: priority level 7 1000: priority level 8 1001: priority level 9 1010: priority level 10 1011: priority level 11 1100: priority level 12 1101: priority level 13 1110: priority level 14 1111: priority level 15 (highest)
section 6 interrupt controller (intc) page 120 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7 to 4 ipr[7:4] 0000 r/w set priority levels for the corresponding interrupt source. 0000: priority level 0 (lowest) 0001: priority level 1 0010: priority level 2 0011: priority level 3 0100: priority level 4 0101: priority level 5 0110: priority level 6 0111: priority level 7 1000: priority level 8 1001: priority level 9 1010: priority level 10 1011: priority level 11 1100: priority level 12 1101: priority level 13 1110: priority level 14 1111: priority level 15 (highest) 3 to 0 ipr[3:0] 0000 r/w set priority levels for the corresponding interrupt source. 0000: priority level 0 (lowest) 0001: priority level 1 0010: priority level 2 0011: priority level 3 0100: priority level 4 0101: priority level 5 0110: priority level 6 0111: priority level 7 1000: priority level 8 1001: priority level 9 1010: priority level 10 1011: priority level 11 1100: priority level 12 1101: priority level 13 1110: priority level 14 1111: priority level 15 (highest) note: name in the tables above is represented by a general name. name in the list of register is, on the other hand, represented by a module name.
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 121 of 1560 mar 18, 2011 sh7080 group 6.4 interrupt sources 6.4.1 external interrupts there are four types of interrupt sources: user break, nmi, irq, and on-chip peripheral modules. individual interrupts are given priority levels (0 to 16, with 0 the lowest and 16 the highest). giving an interrupt a priority level of 0 masks it. nmi interrupt: the nmi interrupt is given a priority leve l of 16 and is always accepted. an nmi interrupt is detected at the edge of the pins. use the nmi edge select bit (nmie) in interrupt control register 0 (icr0) to select either the rising or falling edge. in the nmi interrupt exception handler, the interrupt mask level bits (i3 to i0) in the status register (sr) are set to level 15. irq7 to irq0 interrupts: irq interrupts are requested by input from pins irq0 to irq7. use the irq sense select bits (irq71s to irq 01s and irq70s to irq00s) in the irq control register (irqcr) to select the detection mode from low level detection, falling edge detection, rising edge detection, and both edge de tection for each pin. the priority level can be set from 0 to 15 for each pin using the interrupt priority registers a and b (ipra and iprb). in the case that the low level detection is selected , an interrupt request signal is sent to the intc while the irq pin is driven low. the interrupt request signal stops to be sent to the intc when the irq pin becomes high. it is possible to confirm that an interrupt is requested by reading the irq flags (irq7f to irq0f) in the irq status register (irqsr). in the case that the edge detection is selected, an interrupt request signal is sent to the intc when the following change on the irq pin is detected: from high to low in falling edge detection mode, from low to high in rising edge detection mode, and from low to high or from high to low in both edge detection mode. the irq interrupt request by detecting the change on the pin is held until the interrupt request is accepted. it is possible to confirm that an irq interrupt request has been detected by reading the irq flags (irq7f to irq0f) in the irq status register (irqsr). an irq interrupt request by detecting the change on the pin can be withdrawn by writing 0 to an irq flag after reading 1. in the irq interrupt exception handling, the interrupt mask bits (i3 to i0) in the status register (sr) are set to the prio rity level value of the accepted irq interrupt. figure 6.2 shows the block diagram of the irq7 to irq0 interrupts.
section 6 interrupt controller (intc) page 122 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group irqcr.irqn1s irqcr.irqn0s irqsr.irqnf irqsr.irqnl irqn pins resirqn level detection edge detection sq r selection dtc activation request cpu interrupt request (acceptance of irqn interrupt/ writing 0 after reading irqnf = 1) n = 7 to 0 distribution figure 6.2 block diagram of irq7 to irq0 interrupts control 6.4.2 on-chip peripheral module interrupts on-chip peripheral module interrupts are interrupt s generated by the following on-chip peripheral modules. since a different interrupt vector is allocated to each interrupt source, the exception handling routine does not have to decide which interrupt has occurred. priority levels between 0 and 15 can be allocated to individual on-chip peripheral modules in interrupt priority registers c to f and h to m (iprc to iprf and iprh to iprm). on-chip peripheral module interrupt exception handling sets the interrupt mask level bits (i3 to i0) in the status register (sr) to the priority level value of the on-chip peripheral module interrupt that was accepted. 6.4.3 user break interrupt a user break interrupt has a priority level of 15, and occurs when the break condition set in the user break controller (ubc) is satisfied. user break interrupt requests are detected by edge and are held until accepted. user break interrupt exception ha ndling sets the interrupt mask level bits (i3 to i0) in the status register (sr) to level 15. for more details on the user break interrupt, see section 7, user break controller (ubc).
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 123 of 1560 mar 18, 2011 sh7080 group 6.5 interrupt exception handling vector table table 6.3 lists interrupt sources, their vector numbers, vector table address offsets, and interrupt priorities. individual interrupt sources are allocated to di fferent vector numbers and vector table address offsets. vector table addresses are calculated fr om the vector numbers and vector table address offsets. for interrupt exception handling, the start address of the exception handling routine is fetched from the vector table address in the vector table. for the details on calculation of vector table addresses, see table 5.4 in section 5, exception handling. irq interrupts and on-chip peripheral module interrupt priorities can be set freely between 0 and 15 for each pin or module by setting interrupt priority registers a to f and h to m (ipra to iprf and iprh to iprm). however, when interrupt sources whose priority levels are allocated with the same ipr are requested, the interrupt of the smaller vector number has priority. this priority cannot be changed. priority levels of irq interrupts and on-chip peripheral module interrupts are initialized to level 0 at a power-on reset. if the same priority level is allocated to two or more interrupt sources and interrupts from those sources occur simultaneously, they are processed by the default priority order shown in table 6.3.
section 6 interrupt controller (intc) page 124 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 6.3 interrupt exception ha ndling vectors and priorities interrupt source name vector no. vector table starting address ipr default priority user break 12 h'00000030 ? high external pin nmi 11 h'0000002c ? irq0 64 h'00000100 ipra15 to ipra12 irq1 65 h'00000104 ipra11 to ipra8 irq2 66 h'00000108 ipra7 to ipra4 irq3 67 h'0000010c ipra3 to ipra0 irq4 68 h'00000110 iprb15 to iprb12 irq5 69 h'00000114 iprb11 to iprb8 irq6 70 h'00000118 iprb7 to iprb4 irq7 71 h'0000011c iprb3 to iprb0 dmac_0 dei0 72 h'00000120 iprc15 to iprc12 dmac_1 dei1 76 h'00000130 iprc11 to iprc8 dmac_2 dei2 80 h'00000140 iprc7 to iprc4 dmac_3 dei3 84 h'00000150 iprc3 to iprc0 tgia_0 88 h'00000160 iprd15 to iprd12 tgib_0 89 h'00000164 tgic_0 90 h'00000168 tgid_0 91 h'0000016c tciv_0 92 h'00000170 iprd11 to iprd8 tgie_0 93 h'00000174 mtu2_0 tgif_0 94 h'00000178 tgia_1 96 h'00000180 iprd7 to iprd4 tgib_1 97 h'00000184 tciv_1 100 h'00000190 iprd3 to iprd0 mtu2_1 tciu_1 101 h'00000194 mtu2_2 tgia_2 104 h'000001a0 ipre15 to ipre12 tgib_2 105 h'000001a4 tciv_2 108 h'000001b0 ipre11 to ipre8 tciu_2 109 h'000001b4 low
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 125 of 1560 mar 18, 2011 sh7080 group interrupt source name vector no. vector table starting address ipr default priority mtu2_3 tgia_3 112 h'000001c0 ipre7 to ipre4 high tgib_3 113 h'000001c4 tgic_3 114 h'000001c8 tgid_3 115 h'000001cc tciv_3 116 h'000001d0 ipre3 to ipre0 mtu2_4 tgia_4 120 h'000001e0 iprf15 to iprf12 tgib_4 121 h'000001e4 tgic_4 122 h'000001e8 tgid_4 123 h'000001ec tciv_4 124 h'000001f0 iprf11 to iprf8 mtu2_5 tgiu_5 128 h'00000200 iprf7 to iprf4 tgiv_5 129 h'00000204 tgiw_5 130 h'00000208 poe (mtu2) oei1 132 h'00000210 iprf3 to iprf0 oei3 133 h'00000214 i 2 c2 * iinaki 156 h'00000270 iprh11 to iprh8 tgia_3s 160 h'00000280 iprh7 to iprh4 tgib_3s 161 h'00000284 tgic_3s 162 h'00000288 tgid_3s 163 h'0000028c mtu2s_3 tciv_3s 164 h'00000290 iprh3 to iprh0 tgia_4s 168 h'000002a0 ipri15 to ipri12 tgib_4s 169 h'000002a4 tgic_4s 170 h'000002a8 tgid_4s 171 h'000002ac mtu2s_4 tciv_4s 172 h'000002b0 ipri11 to ipri8 mtu2s_5 tgiu_5s 176 h'000002c0 ipri7 to ipri4 tgiv_5s 177 h'000002c4 tgiw_5s 178 h'000002c8 poe (mtu2s) oei2 180 h'000002d0 ipri3 to ipri0 cmt_0 cmi_0 184 h'000002e0 iprj15 to iprj12 low
section 6 interrupt controller (intc) page 126 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group interrupt source name vector no. vector table starting address ipr default priority cmt_1 cmi_1 188 h'000002f0 iprj11 to iprj8 high bsc cmi 192 h'00000300 iprj7 to iprj4 wdt iti 196 h'00000310 iprj3 to iprj0 adi_0 200 h'00000320 iprk15 to iprk12 a/d_0 and a/d_1 adi_1 201 h'00000324 a/d_2 adi_2 204 h'00000330 iprk11 to iprk8 sci_0 eri_0 216 h'00000360 iprl15 to iprl12 rxi_0 217 h'00000364 txi_0 218 h'00000368 tei_0 219 h'0000036c sci_1 eri_1 220 h'00000370 iprl11 to iprl8 rxi_1 221 h'00000374 txi_1 222 h'00000378 tei_1 223 h'0000037c sci_2 eri_2 224 h'00000380 iprl7 to iprl4 rxi_2 225 h'00000384 txi_2 226 h'00000388 tei_2 227 h'0000038c erif 228 h'00000390 iprl3 to iprl0 rxif 229 h'00000394 brif 230 h'00000398 scif txif 231 h'0000039c sseri 232 h'000003a0 iprm15 to iprm12 ssrxi 233 h'000003a4 ssu sstxi 234 h'000003a8 i 2 c2 * iitei 236 h'000003b0 iprm11 to iprm8 iistpi 237 h'000003b4 iitxi 238 h'000003b8 iirxi 239 h'000003bc low note: * the i 2 c2 has an interrupt whose vector address is separated from those for the other i 2 c2 interrupt sources.
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 127 of 1560 mar 18, 2011 sh7080 group 6.6 interrupt operation 6.6.1 interrupt sequence the sequence of interrupt operations is explained below. figure 6.3 is a flowchart of the operations. 1. the interrupt request sources send interrupt request signals to the interrupt controller. 2. the interrupt controller selects the highest priority interrupt from interrupt requests sent, according to the prior ity levels set in interrupt priority registers a to f and h to m (ipra to iprf and iprh to iprm). interrupts that have lower-priority than that of the selected interrupt are ignored*. if interrupts that have the same priority level or interrupts within a same module occur simultaneously, the interrupt with the highest priority is selected according to the default priority shown in table 6.3. 3. the interrupt controller compares the priority level of the selected interrupt request with the interrupt mask bits (i3 to i0) in the status register (sr) of the cpu. if the priority level of the selected request is equal to or less than the level set in bits i3 to i0, the request is ignored. if the priority level of the selected request is higher than the level in bits i3 to i0, the interrupt controller accepts the request and sends an interrupt request signal to the cpu. 4. when the interrupt controller accepts an interrupt, a low level is output from the irqout pin. 5. the cpu detects the interrupt request sent from the interrupt controller in the decode stage of an instruction to be executed . instead of executing the decode d instruction, the cpu starts interrupt exception handling. 6. sr and pc are saved onto the stack. 7. the priority level of the accepted interrupt is copied to bits (i3 to i0) in sr. 8. when the accepted interrupt is sensed by level or is from an on-chip peripheral module, a high level is output from the irqout pin. when the accepted interrupt is sensed by edge, a high level is output from the irqout pin at the moment when the cpu starts interrupt exception processing instead of instruction execution as noted in 5. above. however, if the interrupt controller accepts an interrupt with a higher priority th an the interrupt just to be accepted, the irqout pin holds low level. 9. the cpu reads the start addr ess of the exception handling rou tine from the exception vector table for the accepted interrupt, branches to that address, a nd starts executing the program. this branch is not a delayed branch.
section 6 interrupt controller (intc) page 128 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group notes: the interrupt source flag should be cleared in the interrupt handler. to ensure that an interrupt source that should have been cleared is not inadvertently accepted again, read the interrupt source flag after it has been cleared , confirm that it has been cleared, and then execute an rte instruction. * interrupt requests that are designated as edge-detect type are held pending until the interrupt requests are accepted. irq interrupts, however, can be cancelled by accessing the irq status register (irqsr). interrupts held pending due to edge detection are cleared by a power-on reset or a manual reset.
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 129 of 1560 mar 18, 2011 sh7080 group program execution state interrupt? user break? i3 to i0 level 14? level 14 interrupt? level 1 interrupt? i3 to i0 level 13? i3 to i0 = level 0? no yes no no no no no no no yes yes yes yes yes yes yes save sr to stack irqout = low save pc to stack copy interrupt level to i3 to i0 read exception vector table branch to exception handling routine no yes level 15 interrupt? notes: i3 to i0 are interrupt mask bits in the status register (sr) of the cpu 1. irqout is the same signal as the interrupt request signal to the cpu (see figure 6.1). therefore, irqout is output when the request priority level is higher than the level in bits i3?i0 of sr. 2. when the accepted interrupt is sensed by edge, a high level is output from the irqout pin at the moment when the cpu starts interrupt exception processing instead of instruction execution (namely, before saving sr to stack). however, if the interrupt controller accepts an interrupt with a higher priority than the interrupt just to be accepted and has output an interrupt request to the cpu, the irqout pin holds low level. 3. the irqout pin change timing depends on a frequency dividing ratio between the internal (i ) and bus (b ) clocks. this flowchart shows that the frequency dividing ratios of the internal (i ) and bus (b ) clocks are the same. nmi? i3 to i0 level 14? no yes irqout = high * 1 * 3 * 2 * 3 figure 6.3 interrupt sequence flowchart
section 6 interrupt controller (intc) page 130 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 6.6.2 stack after interrupt exception handling figure 6.4 shows the stack after interrupt exception handling. 32 bits 32 bits pc * 1 sr address 4n ? 8 4n ? 4 4n sp * 2 notes: 1. pc is the start address of the next instruction (instruction at the return address) after the executed instruction. 2. always make sure that sp is a multiple of 4 figure 6.4 stack after interrupt exception handling 6.7 interrupt resp onse time table 6.4 lists the interrupt response time, which is the time from the occurrence of an interrupt request until the interrupt exception handling starts and fetching of the first instruction of the interrupt handling routine begins.
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 131 of 1560 mar 18, 2011 sh7080 group table 6.4 interrupt response time number of cycles item nmi irq peripheral modules remarks dmac/dtc active judgement ? 2 bcyc 1 pcyc interrupt priority decision and comparison with mask bits in sr 1 icyc + 2 pcyc 1 icyc + 1 pcyc 1 icyc + 2 pcyc wait for completion of sequence currently being executed by cpu x ( 0) x ( 0) x ( 0) the longest sequence is for interrupt or address- error exception handling (x = 7 icyc + m1 + m2 + m3 + m4). if an interrupt-masking instruction follows, however, the time may be even longer. time from start of interrupt exception handling until fetch of first instruction of exception handling routine starts 8 icyc + m1 + m2 + m3 8 icyc + m1 + m2 + m3 8 icyc + m1 + m2 + m3 performs the saving pc and sr, and vector address fetch. interrupt response time total: 9 icyc + 2 pcyc + m1 + m2 + m3 + x 9 icyc + 1 pcyc + 2 bcyc + m1 + m2 + m3 + x 9 icyc + 3 pcyc + m1 + m2 + m3 + x minimum * : 12 icyc + 2 pcyc 12 icyc + 1 pcyc + 2 bcyc 12 icyc + 3 pcyc sr, pc, and vector table are all in on-chip ram. maximum: 16 icyc + 2 pcyc + 2 (m1 + m2 + m3) + m4 16 icyc + 1 pcyc + 2 bcyc + 2 (m1 + m2 + m3) + m4 16 icyc + 3 pcyc + 2 (m1 + m2 + m3) + m4 notes: * in the case that m1 = m2 = m3 = m4 = 1 icyc. m1 to m4 are the number of cycles needed for the following memory accesses. m1: sr save (longword write) m2: pc save (longword write) m3: vector address read (longword read) m4: fetch first instruction of interrupt service routine
section 6 interrupt controller (intc) page 132 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 6.8 data transfer with int errupt request signals the following data transfers can be done using interrupt request signals: ? activate dmac only; cpu interrupts do not occur ? activate dtc only; cpu interrupts depend on dtc settings interrupt sources that are assigned for dmac activation sources are masked without being input to the intc. the mask condition is as follows: mask condition = interrupt source select (ch0) + interrupt source select (ch1) + interrupt source select (ch2) + interrupt source select (ch3) the intc masks a cpu interrupt when the corr esponding dtce bit is 1. the conditions for clearing dtce and interrupt source flag are shown below. dtce clear condition = dtc transfer end ? dtceclr interrupt source flag clear condition = dtc transfer end ? dtceclr + dmac transfer end where dtceclr = disel + counter 0 figures 6.5 and 6.6 show control block diagrams. irq flag clear by dtc interrupt request to cpu dtc activation request dtceclr transfer end dtcer dtce clear interrupt priority determination interrupt controller irq detection irq edge detector (in standby mode) irq pin dtc standby cancel determination standby control figure 6.5 irq interrupt control block diagram
section 6 interrupt controller (intc) r01uh0198ej0500 rev. 5.00 page 133 of 1560 mar 18, 2011 sh7080 group interrupt source flag clear interrupt source flag clear by dmac interrupt source interrupt source flag clear by dtc interrupt request to cpu dtc activation request dmac activation request dtceclr transfer end dtcer dtce clear interrupt priority determination interrupt controller dtc decode dmac chcr rs bits 3 to 0 figure 6.6 on-chip module interrupt control block diagram 6.8.1 handling interrupt request signals as sources for dtc activation and cpu interrupts, but not dmac activation 1. do not select dmac activation sources. 2. for dtc, set the corresponding dtce bits and disel bits to 1. 3. when an interrupt occurs, an activation request is sent to the dtc. 4. when completing a data transfer, the dtc cl ears the dtce bit to 0 and sends an interrupt request to the cpu. the activation source is not cleared. 5. the cpu clears the interrupt s ource in the interrupt handling routine then checks the transfer counter value. when the transfer counter value is not 0, the cpu sets the dtce bit to 1 and allows the next data transfer. if the transfer counter value = 0, the cpu performs the necessary end processing in the interrupt processing routine.
section 6 interrupt controller (intc) page 134 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 6.8.2 handling interrupt request signals as sources for dmac activation, but not cpu interrupts and dtc activation 1. select dmac activation sources. then, cp u interrupts and dtc activation sources are masked regardless of the settings in the interrupt priority registers and the dtc registers. 2. when an interrupt occurs, an activation request is sent to the dmac. 3. the dmac clears the interrup t source when starting transfer. 6.8.3 handling interrupt request signals as so urces for dtc activation, but not cpu interrupts and dmac activation 1. do not select dmac activation sources. 2. for dtc, set the corresponding dtce bits to 1 and clear the disel bits to 0. 3. when an interrupt occurs, an activation request is sent to the dtc. 4. when completing a data transf er, the dtc clears the activation s ource. no interrupt request is sent to the cpu because the dtce bit is held at 1. 5. however, when the transfer counter value = 0, the dtce bit is cleared to 0 and an interrupt request is sent to the cpu. 6. the cpu performs the necessary end processing in the interrupt handling routine. 6.8.4 handling interrupt request signals as so urces for cpu interrupts, but not dtc and dmac activation 1 do not select dmac activation sources. 2. for dtc, clear the corresponding dtce bits to 0. 3. when an interrupt occurs, an interrupt request is sent to the cpu. 4. the cpu clears the interrupt source and performs the necessary processing in the interrupt handling routine. 6.9 usage note the interrupt source flag should be cleared in the interrupt handler. to ensure that an interrupt source that should have been cleared is not inadvertently accepted again, read the interrupt source flag after it has been cleared, confirm that it has been cleared, and then execute an rte instruction.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 135 of 1560 mar 18, 2011 sh7080 group section 7 user br eak controller (ubc) the user break controller (ubc) provides functions that simplify program debugging. these functions make it easy to design an effective self-monitoring debugger, enabling the chip to debug programs without using an in-circuit emulator. break conditions that can be set in the ubc are instruction fetch or data read/write access, data si ze, data contents, address value, and stop timing in the case of instruction fetch. for the mask rom version, only the l-bus instruction-fetch address break (2 channels) is available. 7.1 features the ubc has the following features: 1. the following break comparison conditions can be set. number of break channels: two channels (channels a and b) user break can be requested as either the independent or sequential condition on channels a and b (sequential break setting: channel a and then channel b match with break conditions, but not in the same bus cycle). ? address comparison bits are maskable in 1-bit units. one of the two address buses (l-bus address (lab) and i-bus address (iab)) can be selected. ? data 32-bit maskable. one of the two data buses (l-bus data (ldb) and i-bus data (idb)) can be selected. ? bus cycle instruction fetch or data access ? read/write ? operand size byte, word, and longword 2. a user-designed user-break interrupt exception processing routine can be run. 3. in an instruction fetch cycle, it can be select ed that a user break is set before or after an instruction is executed. 4. maximum repeat times for the break condition (only for channel b): 2 12 ? 1 times.
section 7 user break controller (ubc) page 136 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 5. four pairs of branch source/destination buffers (eight pairs for f-ztat version supporting full functions of e10a). figure 7.1 shows a block diagram of the ubc.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 137 of 1560 mar 18, 2011 sh7080 group bbra bara bamra cpu state signals ldb iab idb lab internal bus access comparator address comparator channel a access comparator address comparator data comparator pc trace control channel b bbrb betr bdra bdmra barb bamrb bdrb bdmrb brsr brdr brcr user break interrupt request [legend] bbra: break bus cycle register a bara: break address register a bamra: break address mask register a bdra: break data register a bdmra: break data mask register a bbrb: break bus cycle register b barb: break address register b bamrb: break address mask register b bdrb: break data register b bdmrb: break data mask register b betr: execution times break register brsr: branch source register brdr: branch destination register brcr: break control register access control data comparator figure 7.1 block diagram of ubc
section 7 user break controller (ubc) page 138 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7.2 input/output pins table 7.1 shows the ubc pin configuration. table 7.1 pin configuration pin name symbol i/o function user break trigger output ubctrg output ubc condition match trigger output pin.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 139 of 1560 mar 18, 2011 sh7080 group 7.3 register descriptions the user break controller has the following registers. for details on register addresses and register states during each processing, refer to section 27, list of registers. table 7.2 register configuration register name abbrevia- tion r/w initial value address access size break address register a bara r/w h'00000000 h'fffff300 32 break address mask register a bamra r/w h'00000000 h'fffff304 32 break bus cycle register a bbra r/w h'0000 h'fffff308 16 break data register a bdra * r/w h'00000000 h'fffff310 32 break data mask register a bdmra * r/w h'00000000 h'fffff314 32 break address register b barb r/w h'00000000 h'fffff320 32 break address mask register b bamrb r/w h'00000000 h'fffff324 32 break bus cycle register b bbrb r/w h'0000 h'fffff328 16 break data register b bdrb * r/w h'00000000 h'fffff330 32 break data mask register b bdmrb * r/w h'00000000 h'fffff334 32 break control register brcr r/w h'00000000 h'fffff3c0 32 branch source register brsr * r h'0xxxxxxx h'fffff3d0 32 branch destination register brdr * r h'0xxxxxxx h'fffff3d4 32 execution times break register betr * r/w h'0000 h'fffff3dc 16 note: * only in f-ztat version
section 7 user break controller (ubc) page 140 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7.3.1 break address register a (bara) bara is a 32-bit readable/writable register. bara specifies the address used as a break condition in channel a. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w baa31 baa30 baa29 baa28 baa27 baa26 baa25 baa24 baa23 baa22 baa21 baa20 baa19 baa18 baa17 baa16 baa15 baa14 baa13 baa12 baa11 baa10 baa9 baa8 baa7 baa6 baa5 baa4 baa3 baa2 baa1 baa0 bit bit name initial value r/w description 31 to 0 baa31 to baa 0 all 0 r/w break address a store the address on the lab or iab specifying break conditions of channel a. 7.3.2 break address mask register a (bamra) bamra is a 32-bit readable/writable register. bamra specifies bits masked in the break address specified by bara. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bama31 bama30 bama29 bama28 bama27 bama26 bama25 bama24 bama23 bama22 bama21 bama20 bama19 bama18 bama17 bama16 bama15 bama14 bama13 bama12 bama11 bama10 bama9 bama8 bama7 bama6 bama5 bama4 bama3 bama2 bama1 bama0
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 141 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 31 to 0 bama31 to bama 0 all 0 r/w break address mask a specify bits masked in the channel a break address bits specified by bara (baa31 to baa0). 0: break address bit baan of channel a is included in the break condition 1: break address bit baan of channel a is masked and is not included in the break condition note: n = 31 to 0 7.3.3 break bus cycle register a (bbra) bbra is a 16-bit readable/writable register, which specifies (1) bus master for i bus cycle, (2) l bus cycle or i bus cycle, (3) instruction fetch or data access, (4) read or write, and (5) operand size in the break conditions of channel a. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/w note: these bits are reserved in the mask rom and rom-less versions. these bits are always read as 0. the write value should always be 0. * -----cpa2 * cpa1 * cpa0 * cda1 * cda0 ida1 * ida0 rwa1 * rwa0 sza1 * sza0 * bit bit name initial value r/w description 15 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 9 8 cpa2 * cpa1 * cpa0 * 0 0 0 r/w r/w r/w bus master select a for i bus select the bus master when the i bus is selected as the bus cycle of the channel a break condition. however, when the l bus is selected as the bus cycle, the setting of the cpa2 to cpa0 bits is disabled. 000: condition comparison is not performed xx1: the cpu cycle is included in the break condition x1x: the dmac cycle is included in the break condition 1xx: the dtc cycle is included in the break condition
section 7 user break controller (ubc) page 142 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7 6 cda1 * cda0 0 0 r/w r/w l bus cycle/i bus cycle select a select the l bus cycle or i bus cycle as the bus cycle of the channel a break condition. 00: condition comparison is not performed 01: the break condition is the l bus cycle 10: the break condition is the i bus cycle 11: the break condition is the l bus cycle 5 4 ida1 * ida0 0 0 r/w r/w instruction fetch/data access select a select the instruction fetch cycle or data access cycle as the bus cycle of the channel a break condition. 00: condition comparison is not performed 01: the break condition is the instruction fetch cycle 10: the break condition is the data access cycle 11: the break condition is the instruction fetch cycle or data access cycle 3 2 rwa1 * rwa0 0 0 r/w r/w read/write select a select the read cycle or write cycle as the bus cycle of the channel a break condition. 00: condition comparison is not performed 01: the break condition is the read cycle 10: the break condition is the write cycle 11: the break condition is the read cycle or write cycle 1 0 sza1 * sza0 * 0 0 r/w r/w operand size select a select the operand size of the bus cycle for the channel a break condition. 00: the break condition does not include operand size 01: the break condition is byte access 10: the break condition is word access 11: the break condition is longword access note: when specifying the operand size, specify the size which matches the address boundary. [legend] x: don't care. note: * these bits are reserved in the mask rom and rom-less versions. these bits are always read as 0. the write value should always be 0.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 143 of 1560 mar 18, 2011 sh7080 group 7.3.4 break data register a (bdra) (only in f-ztat version) bdra is a 32-bit readable/writabl e register. the control bits c da1 and cda0 in bbra select one of two data buses for break condition a. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bda31 bda30 bda29 bda28 bda27 bda26 bda25 bda24 bda23 bda22 bda21 bda20 bda19 bda18 bda17 bda16 bda15 bda14 bda13 bda12 bda11 bda10 bda9 bda8 bda7 bda6 bda5 bda4 bda3 bda2 bda1 bda0 bit bit name initial value r/w description 31 to 0 bda31 to bda0 all 0 r/w break data bit a stores data which specifies a break condition in channel a. if the i bus is selected in bbra, the break data on idb is set in bda31 to bda0. if the l bus is selected in bbra, the break data on ldb is set in bda31 to bda0. notes: 1. specify an operand size when including the value of the data bus in the break condition. 2. when the byte size is selected as a break condition, the same byte data must be set in bits 15 to 8 and 7 to 0 in bdra as the break data.
section 7 user break controller (ubc) page 144 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7.3.5 break data mask register a (bdmra) (only in f-ztat version) bdmra is a 32-bit readable/writable register. bdmra specifies bits masked in the break data specified by bdra. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bdma31 bdma30 bdma29 bdma28 bdma27 bdma26 bdma25 bdma24 bdma23 bdma22 bdma21 bdma20 bdma19 bdma18 bdma17 bdma16 bdma15 bdma14 bdma13 bdma12 bdma11 bdma10 bdma9 bdma8 bdma7 bdma6 bdma5 bdma4 bdma3 bdma2 bdma1 bdma0 bit bit name initial value r/w description 31 to 0 bdma31 to bdma 0 all 0 r/w break data mask a specifies bits masked in the break data of channel a specified by bdra (bda31 to bda0). 0: break data bdan of channel a is included in the break condition 1: break data bdan of channel a is masked and is not included in the break condition note: n = 31 to 0 notes: 1. specify an operand size when including the value of the data bus in the break condition. 2. when the byte size is selected as a break condition, the same byte data must be set in bits 15 to 8 and 7 to 0 in bdmra as the break mask data in bdra.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 145 of 1560 mar 18, 2011 sh7080 group 7.3.6 break address register b (barb) barb is a 32-bit readable/writable register. barb specifies the address used as a break condition in channel b. control bits cdb1 and cdb0 in bbrb select one of the two address buses for break condition b. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bab31 bab30 bab29 bab28 bab27 bab26 bab25 bab24 bab23 bab22 bab21 bab20 bab19 bab18 bab17 bab16 bab15 bab14 bab13 bab12 bab11 bab10 bab9 bab8 bab7 bab6 bab5 bab4 bab3 bab2 bab1 bab0 bit bit name initial value r/w description 31 to 0 bab31 to bab 0 all 0 r/w break address b stores an address which specifies a break condition in channel b. if the i bus or l bus is selected in bbrb, an iab or lab address is set in bab31 to bab0.
section 7 user break controller (ubc) page 146 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7.3.7 break address mask register b (bamrb) bamrb is a 32-bit readable/writable register. bamr b specifies bits masked in the break address specified by barb. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bamb31 bamb30 bamb29 bamb28 bamb27 bamb26 bamb25 bamb24 bamb23 bamb22 bamb21 bamb20 bamb19 bamb18 bamb17 bamb16 bamb15 bamb14 bamb13 bamb12 bamb11 bamb10 bamb9 bamb8 bamb7 bamb6 bamb5 bamb4 bamb3 bamb2 bamb1 bamb0 bit bit name initial value r/w description 31 to 0 bamb31 to bamb 0 all 0 r/w break address mask b specifies bits masked in the break address of channel b specified by barb (bab31 to bab0). 0: break address babn of channel b is included in the break condition 1: break address babn of channel b is masked and is not included in the break condition note: n = 31 to 0
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 147 of 1560 mar 18, 2011 sh7080 group 7.3.8 break data register b (bdrb) (only in f-ztat version) bdrb is a 32-bit readable/writable register. the control bits cdb1 and cdb0 in bbrb select one of the two data buses for break condition b. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bdb31 bdb30 bdb29 bdb28 bdb27 bdb26 bdb25 bdb24 bdb23 bdb22 bdb21 bdb20 bdb19 bdb18 bdb17 bdb16 bdb15 bdb14 bdb13 bdb12 bdb11 bdb10 bdb9 bdb8 bdb7 bdb6 bdb5 bdb4 bdb3 bdb2 bdb1 bdb0 bit bit name initial value r/w description 31 to 0 bdb31 to bdb0 all 0 r/w break data bit b stores data which specifies a break condition in channel b. if the i bus is selected in bbrb, the break data on idb is set in bdb31 to bdb0. if the l bus is selected in bbrb, the break data on ldb is set in bdb31 to bdb0. notes: 1. specify an operand size when including the value of the data bus in the break condition. 2. when the byte size is selected as a break condition, the same byte data must be set in bits 15 to 8 and 7 to 0 in bdrb as the break data.
section 7 user break controller (ubc) page 148 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7.3.9 break data mask register b (bdm rb) (only in f-ztat version) bdmrb is a 32-bit readable/writable register. bd mrb specifies bits masked in the break data specified by bdrb. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w bdmb31 bdmb30 bdmb29 bdmb28 bdmb27 bdmb26 bdmb25 bdmb24 bdmb23 bdmb22 bdmb21 bdmb20 bdmb19 bdmb18 bdmb17 bdmb16 bdmb15 bdmb14 bdmb13 bdmb12 bdmb11 bdmb10 bdmb9 bdmb8 bdmb7 bdmb6 bdmb5 bdmb4 bdmb3 bdmb2 bdmb1 bdmb0 bit bit name initial value r/w description 31 to 0 bdmb31 to bdmb 0 all 0 r/w break data mask b specifies bits masked in the break data of channel b specified by bdrb (bdb31 to bdb0). 0: break data bdbn of channel b is included in the break condition 1: break data bdbn of channel b is masked and is not included in the break condition note: n = 31 to 0 notes: 1. specify an operand size when including the value of the data bus in the break condition. 2. when the byte size is selected as a break condition, the same byte data must be set in bits 15 to 8 and 7 to 0 in bdmrb as the break mask data in bdrb.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 149 of 1560 mar 18, 2011 sh7080 group 7.3.10 break bus cycle register b (bbrb) bbrb is a 16-bit readable/writable register, which specifies (1) bus master for i bus cycle, (2) l bus cycle or i bus cycle, (3) instruction fetch or data access, (4) read or write, and (5) operand size in the break conditions of channel b. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/w note: these bits are reserved in the mask rom and rom-less versions. these bits are always read as 0. the write value should always be 0. * - - - - - cpb2 * cpb1 * cpb0 * cdb1 * cdb0 idb1 * idb0 rwb1 * rwb0 szb1 * szb0 * bit bit name initial value r/w description 15 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 9 8 cpb2 * cpb1 * cpb0 * 0 0 0 r/w r/w r/w bus master select b for i bus select the bus master when the i bus is selected as the bus cycle of the channel b break condition. however, when the l bus is selected as the bus cycle, the setting of the cpb2 to cpb0 bits is disabled. 000: condition comparison is not performed xx1: the cpu cycle is included in the break condition x1x: the dmac cycle is included in the break condition 1xx: the dtc cycle is included in the break condition 7 6 cdb1 * cdb0 0 0 r/w r/w l bus cycle/i bus cycle select b select the l bus cycle or i bus cycle as the bus cycle of the channel b break condition. 00: condition comparison is not performed 01: the break condition is the l bus cycle 10: the break condition is the i bus cycle 11: the break condition is the l bus cycle
section 7 user break controller (ubc) page 150 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 4 idb1 * idb0 0 0 r/w r/w instruction fetch/data access select b select the instruction fetch cycle or data access cycle as the bus cycle of the channel b break condition. 00: condition comparison is not performed 01: the break condition is the instruction fetch cycle 10: the break condition is the data access cycle 11: the break condition is the instruction fetch cycle or data access cycle 3 2 rwb1 * rwb0 0 0 r/w r/w read/write select b select the read cycle or write cycle as the bus cycle of the channel b break condition. 00: condition comparison is not performed 01: the break condition is the read cycle 10: the break condition is the write cycle 11: the break condition is the read cycle or write cycle 1 0 szb1 * szb0 * 0 0 r/w r/w operand size select b select the operand size of the bus cycle for the channel b break condition. 00: the break condition does not include operand size 01: the break condition is byte access 10: the break condition is word access 11: the break condition is longword access note: when specifying the operand size, specify the size which matches the address boundary. [legend] x: don't care. note: * these bits are reserved in the mask rom and rom-less versions. these bits are always read as 0. the write value should always be 0.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 151 of 1560 mar 18, 2011 sh7080 group 7.3.11 break control register (brcr) brcr sets the following conditions: 1. channels a and b are used in two independent channel conditions or under the sequential condition. 2. a user break is set before or after instruction execution. 3. specify whether to include the number of execution times on channel b in comparison conditions. 4. determine whether to include data bus on channels a and b in comparison conditions. 5. enable pc trace. 6. select the ubctrg output pulse width. 7. specify whether to request the user break interrupt when channels a and b match with comparison conditions. brcr is a 32-bit readable/writable register that has break conditions match flags and bits for setting a variety of break conditions. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrr/wr/wr/wrr/wr 0000000000000000 r/w r/w r/w r/w r/w r/w r r r/w r/w r/w r r/w r r r/w ----------ut rgw[1:0] ubidb - ubida - scm fca scm fcb scm fda scm fdb pcte pcba - - dbea pcbb dbeb - seq - - etbe
section 7 user break controller (ubc) page 152 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 31 to 22 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 21, 20 utrgw[1:0] 00 r/w ubctrg output pulse width select select the ubctrg output pulse width when the break condition matches. 00: setting prohibited. 01: ubctrg output pulse width is 3 to 4 t bcyc 10: ubctrg output pulse width is 7 to 8 t bcyc 11: ubctrg output pulse width is 15 to 16 t bcyc note: t bcyc indicates the period of one cycle of the external bus clock (b = ck). 19 ubidb 0 r/w user break disable b enables or disables the user break interrupt request when the channel b break conditions are satisfied. 0: user break interrupt request is enabled when break conditions are satisfied 1: user break interrupt request is disabled when break conditions are satisfied 18 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 17 ubida 0 r/w user break disable a enables or disables the user break interrupt request when the channel a break conditions are satisfied. 0: user break interrupt request is enabled when break conditions are satisfied 1: user break interrupt request is disabled when break conditions are satisfied 16 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 153 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 15 scmfca 0 r/w l bus cycle condition match flag a when the l bus cycle condition in the break conditions set for channel a is satisfied, this flag is set to 1. in order to clear this flag, write 0 into this bit. 0: the l bus cycle condition for channel a does not match 1: the l bus cycle condition for channel a matches 14 scmfcb 0 r/w l bus cycle condition match flag b when the l bus cycle condition in the break conditions set for channel b is satisfied, this flag is set to 1. in order to clear this flag, write 0 into this bit. 0: the l bus cycle condition for channel b does not match 1: the l bus cycle condition for channel b matches 13 scmfda 0 r/w i bus cycle condition match flag a when the i bus cycle condition in the break conditions set for channel a is satisfied, this flag is set to 1. in order to clear this flag, write 0 into this bit. 0: the i bus cycle condition for channel a does not match 1: the i bus cycle condition for channel a matches 12 scmfdb 0 r/w i bus cycle condition match flag b when the i bus cycle condition in the break conditions set for channel b is satisfied, this flag is set to 1. in order to clear this flag, write 0 into this bit. 0: the i bus cycle condition for channel b does not match 1: the i bus cycle condition for channel b matches 11 pcte 0 r/w pc trace enable 0: disables pc trace 1: enables pc trace
section 7 user break controller (ubc) page 154 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 pcba 0 r/w pc break select a selects the break timing of the instruction fetch cycle for channel a as before or after instruction execution. 0: pc break of channel a is set before instruction execution 1: pc break of channel a is set after instruction execution 9, 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 dbea 0 r/w data break enable a selects whether or not the data bus condition is included in the break condition of channel a. 0: no data bus condition is included in the condition of channel a 1: the data bus condition is included in the condition of channel a 6 pcbb 0 r/w pc break select b selects the break timing of the instruction fetch cycle for channel b as before or after instruction execution. 0: pc break of channel b is set before instruction execution 1: pc break of channel b is set after instruction execution 5 dbeb 0 r/w data break enable b selects whether or not the data bus condition is included in the break condition of channel b. 0: no data bus condition is included in the condition of channel b 1: the data bus condition is included in the condition of channel b 4 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 155 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 seq 0 r/w sequence condition select selects two conditions of channels a and b as independent or sequential conditions. 0: channels a and b are compared under independent conditions 1: channels a and b are compared under sequential conditions (channel a, then channel b) 2, 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 etbe 0 r/w number of execution times break enable enables the execution-times break condition only on channel b. if this bit is 1 (break enable), a user break interrupt is requested when the number of break conditions matches with the number of execution times that is specified by betr. 0: the execution-times break condition is disabled on channel b 1: the execution-times break condition is enabled on channel b
section 7 user break controller (ubc) page 156 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7.3.12 execution times break register (betr) (only in f-ztat version) betr is a 16-bit readable/writable register. when the execution-times break condition of channel b is enabled, this register specifies the num ber of execution times to make the break. the maximum number is 2 12 ? 1 times. when a break condition is satisfied, it decreas es betr. a user break interrupt is requested wh en the break condition is satisf ied after betr becomes h'0001. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/w - - - - bet[11:0] bit bit name initial value r/w description 15 to 12 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 11 to 0 bet[11:0] all 0 r/w number of execution times
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 157 of 1560 mar 18, 2011 sh7080 group 7.3.13 branch source register (brsr) (only in f-ztat version) brsr is a 32-bit read-only register. brsr stores bits 27 to 0 in the address of the branch source instruction. brsr has the flag bit that is set to 1 wh en a branch occurs. this flag bit is cleared to 0 when brsr is read, the setting to enable pc tr ace is made, or brsr is initialized by a power-on reset or a manual reset. other bits are not initialized by a power-on reset. the four brsr registers (eight pairs for the f-ztat version supporting full functions of e10a) have a queue structure and a stored register is shifted at every branch. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000 - - - - - - - - - - - - rrrrrrrrrrrrrrrr ---------------- rrrrrrrrrrrrrrrr svf - - - bsa27 bsa26 bsa25 bsa24 bsa23 bsa22 bsa21 bsa20 bsa19 bsa18 bsa17 bsa16 bsa15 bsa14 bsa13 bsa12 bsa11 bsa10 bsa9 bsa8 bsa7 bsa6 bsa5 bsa4 bsa3 bsa2 bsa1 bsa0 bit bit name initial value r/w description 31 svf 0 r brsr valid flag indicates whether the branch source address is stored. this flag bit is set to 1 when a branch occurs. this flag is cleared to 0 when brsr is read, the setting to enable pc trace is made, or brsr is initialized by a power-on reset. 0: the value of brsr register is invalid 1: the value of brsr register is valid 30 to 28 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 27 to 0 bsa27 to bsa0 undefined r branch source address store bits 27 to 0 of the branch source address.
section 7 user break controller (ubc) page 158 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7.3.14 branch destination register (b rdr) (only in f-ztat version) brdr is a 32-bit read-only register. brdr stores bits 27 to 0 in the address of the branch destination instruction. brdr has the flag bit that is set to 1 when a branch occurs. this flag bit is cleared to 0 when brdr is read, the setting to enable pc trace is made, or brdr is initialized by a power-on reset or a manual reset. other bits are not initialized by a power-on reset. the four brsr registers (eight pairs for the f-ztat version supporting full functions of e10a) have a queue structure and a stored register is shifted at every branch. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000 - - - - - - - - - - - - rrrrrrrrrrrrrrrr ---------------- rrrrrrrrrrrrrrrr dvf - - - bda27 bda26 bda25 bda24 bda23 bda22 bda21 bda20 bda19 bda18 bda17 bda16 bda15 bda14 bda13 bda12 bda11 bda10 bda9 bda8 bda7 bda6 bda5 bda4 bda3 bda2 bda1 bda0 bit bit name initial value r/w description 31 dvf 0 r brdr valid flag indicates whether a branch destination address is stored. this flag bit is set to 1 when a branch occurs. this flag is cleared to 0 when brdr is read, the setting to enable pc trace is made, or brdr is initialized by a power-on reset. 0: the value of brdr register is invalid 1: the value of brdr register is valid 30 to 28 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 27 to 0 bda27 to bda0 undefined r branch destination address store bits 27 to 0 of the branch destination address.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 159 of 1560 mar 18, 2011 sh7080 group 7.4 operation 7.4.1 flow of the user break operation the flow from setting of break conditions to user break exception processing is described below: 1. the break addresses are set in the break a ddress registers (bara or barb). the masked addresses are set in the break address mask re gisters (bamra or bamrb). the break data is set in the break data register (bdra or bdrb). the masked data is set in the break data mask register (bdmra or bdmrb). the bus break conditions are set in the break bus cycle registers (bbra or bbrb). three groups of bbra or bbrb (l bus cycle/i bus cycle select, instruction fetch/data access select, and read/write select) are each set. no user break will be generated if even one of these groups is set with b'00. the respective conditions are set in the bits of the break control register (brcr). make sure to set all registers related to breaks before setting bbra or bbrb. 2. when the break conditions are satisfied, the ubc sends a user break interrupt request to the cpu and sets the l bus condition match flag (scmfca or scmfcb) and the i bus condition match flag (scmfda or scmfdb) for the appropriate channel. 3. the appropriate condition match flags (s cmfca, scmfda, scmfcb, and scmfdb) can be used to check if the set conditions match or not. the matching of the conditions sets flags, but they are not reset. before using them again, 0 must first be written to them and then reset flags. 4. there is a chance that matches of the break conditions set in channels a and b occur almost at the same time. in this case, there will be only one user break request to the cpu, but these two conditions match flags could be both set. 5. when selecting the i bus as the break condition, note the following: ? the cpu, dmac, and dtc are connected to the i bus. the ubc monitors bus cycles generated by all bus masters that are selected by the cpa2 to cpa0 bits in bbra or the cpb2 to cpb0 bits in bbrb, and compares the conditions for a match. ? i bus cycles (including read fill cycles) resulting from instruction fetches on the l bus by the cpu are defined as instruction fetch cycl es on the i bus, while other bus cycles are defined as data access cycles. ? the dmac and dtc only issue data access cycles for i bus cycles. ? if a break condition is specified for the i bus, even when the condition matches in an i bus cycle resulting from an instruction executed by the cpu, at which instruction the user break is to be accepted cannot be clearly defined.
section 7 user break controller (ubc) page 160 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7.4.2 user break on instruction fetch cycle 1. when l bus/instruction fetch/read/word, longword, or not including the operand size is set in the break bus cycle register (bbra or bb rb), the break condition becomes the l bus instruction fetch cycle. whether it breaks before or after the execution of the instruction can then be selected with the pcba or pcbb bit in the break control register (brcr) for the appropriate channel. if an instruction fetch cycl e is set as a break cond ition, clear lsb in the break address register (bara or barb) to 0. a user break cannot be generated as long as this bit is set to 1. 2. if the break condition matches when a user break on instruction fetch is specified so that the a break is generated before the execution of the instruction, the user break is generated at the point when it has become deterministic that the instruction will be executed after it is fetched. this means this feature cannot be used on instructions fetched by overrun (instructions fetched at a branch or during an interrupt transition, but not to be executed). when this kind of break condition is set for the delay slot of a delayed branch instruction, the user break is generated prior to execution of the delayed branch instruction. note: if a branch does not occur at a delay condition branch instruction, the subsequent instruction is not recognized as a delay slot. 3. when the break condition is specified so that a user break is generated after execution of the instruction, the instruction that has met the break condition is executed and then the user break is generated before the next instruction is executed. as with pre-execution user breaks, this cannot be used with overrun fetch instructions. when this kind of break condition is set for a delayed branch instruction and its delay slot, a user break is not generated until the first instruction at the branch destination. 4. when an instruction fetch cycle is set, the break data register (bdra or bdrb) is ignored. therefore, break data cannot be set for the user break of the instruction fetch cycle. 5. if the i bus is set for a user break of an instruction fetch cycle, the condition is determined for the instruction fetch cycles on the i bus. for details, see 5 in section 7.4.1, flow of the user break operation.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 161 of 1560 mar 18, 2011 sh7080 group 7.4.3 user break on data access cycle 1. if the l bus is specified as a break cond ition for data access break, condition comparison is performed for the address (and data) accessed by the executed instructions, and a user break occurs if the condition is satisfied. if the i bus is speci fied as a break condition, condition comparison is performed for the addresses (and da ta) of the data access cycles that are issued on the i bus by all bus masters including the cpu, and a user break occurs if the condition is satisfied. for details on the cpu bus cycles issued on the i bus, see 5 in section 7.4.1, flow of the user break operation. 2. the relationship between the data access cycle address and the comparison condition for each operand size is listed in table 7.3. table 7.3 data access cycle addresses and operand size comparison conditions access size address compared longword compares break address register bits 31 to 2 to address bus bits 31 to 2 word compares break address register bits 31 to 1 to address bus bits 31 to 1 byte compares break address register bits 31 to 0 to address bus bits 31 to 0 this means that when address h'00001003 is set in the break address register (bara or barb), for example, the bus cy cle in which the break condition is satisfied is as follows (where other conditions are met). longword access at h'00001000 word access at h'00001002 byte access at h'00001003 3. when the data value is included in the break conditions: when the data value is included in the break conditions, either longword, word, or byte is specified as the operand size of the break bus cycle register (bbra or bbrb). when data values are included in break conditions, a user break is generated when the address conditions and data conditions both match. to specify byte data for this case, set the same data in two bytes at bits 15 to 8 and bits 7 to 0 of the break data register (bdra or bdrb) and break data mask register (bdmra or bdmrb). when word or byte is set, bits 31 to 16 of bdra or bdrb and bdmra or bdmrb are ignored. 4. if the l bus is selected, a user break occurs on ending execution of the instruction that matches the break condition, and immediately before the next instruction is executed. however, when data is also specified as the break condition, the break may occur on ending execution of the instruction following the instruction that matches the break condition. if the i bus is selected, the instruction at which the user break will occur cannot be determined. when this kind of user
section 7 user break controller (ubc) page 162 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group break occurs at a delayed branch instruction or its delay slot, the user break may not actually take place until the first instruction at the branch destination. 7.4.4 sequential break 1. by setting the seq bit in brcr to 1, the sequential break is issued when a channel b break condition matches after a channel a break condition matches. a user break is not generated even if a channel b break condition matches before a channel a break condition matches. when channels a and b conditions match at the same time, the sequential break is not issued. to clear the channel a condition match when a channel a condition match has occurred but a channel b condition match has not yet occurred in a sequential break specification, clear the seq bit in brcr to 0 and clear the condition match flag to 0 in channel a. 2. in sequential break specification, the l or i bus can be selected and the execution times break condition can be also specified. for example, when the execution times break condition is specified, the break condition is satisfied when a channel b condition matches with betr = h'0001 after a channel a condition has matched. 7.4.5 value of saved program counter when a user break occurs, the address of the instru ction from where execution is to be resumed is saved in the stack, and the exception handling state is entered. if the l bus is specified as a break condition, the instruction at which the user break should occur can be clearly determined (except for when data is included in the break condition). if the i bus is specified as a break condition, the instruction at which the user break should occur cannot be clearly determined. 1. when instruction fetch (before instruction execution) is specified as a break condition: the address of the instruction that matched the break condition is saved in the stack. the instruction that matched the condition is not executed, and the user break occurs before it. however when a delay slot instruction matches the condition, the address of the delayed branch instruction is saved in the stack. 2. when instruction fetch (after instruction execution) is specified as a break condition: the address of the instruction following the instruction that matched the break condition is saved in the stack. the instruction that matches the condition is executed, and the user break occurs before the next instruction is executed. however when a delayed branch instruction or delay slot matches the condition, these instruc tions are executed, and the branch destination address is saved in the stack.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 163 of 1560 mar 18, 2011 sh7080 group 3. when data access (address only) is specified as a break condition: the address of the instruction immediately af ter the instruction that matched the break condition is saved in the stack. the instruction that matches the condition is executed, and the user break occurs before the next instruc tion is executed. however when a delay slot instruction matches the condition, the branch destination address is saved in the stack. 4. when data access (address + data) is specified as a break condition: when a data value is added to the break conditions, the address of an instruction that is within two instructions of the instruction that matched the break condition is saved in the stack. at which instruction the user break occu rs cannot be determined accurately. when a delay slot instruction matches the condition, the branch destination address is saved in the stack. if the instruction following the instruction that matches the break condition is a branch instruction, the user break may occur after the branch instruction or delay slot has finished. in this case, the branch des tination address is saved in the stack. 7.4.6 pc trace 1. setting pcte in brcr to 1 enables pc traces. wh en branch (branch instruction, and interrupt exception) is generated, the branch source address and branch destination address are stored in brsr and brdr, respectively. 2. the values stored in brsr and brdr are as given below due to the kind of branch. ? if a branch occurs due to a branch instruction, the address of the branch instruction is saved in brsr and the address of the branch destination instruction is saved in brdr. ? if a branch occurs due to an interrupt or exception, the value saved in stack due to exception occurrence is saved in brsr and the start address of the exception handling routine is saved in brdr. 3. brsr and brdr have four pairs of queue structures (eight pairs for the f-ztat version supporting full functions of e10a). the top of queues is read first when the address stored in the pc trace register is read. brsr and brdr share the read pointer. read brsr and brdr in order, the queue only shifts after brdr is read. after switching the pcte bit (in brcr) off and on, the values in the queues are invalid. 4. since four pairs (eight pairs for the f-ztat version supporting full functions of e10a) of queue are shared with the aud, set the pcte bit in brcr to 1 after setting the mstp25 bit in stbcr5 to 0 and the audsrst bit in stbcr6 to 1. although the aud is only available in the f-ztat version supporting full functions of th e e10a, this setting should also be made in the normal f-ztat version.
section 7 user break controller (ubc) page 164 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7.4.7 usage examples break condition specified for l bus instruction fetch cycle: (example 1-1) ? register specifications bara = h'00000404, bamra = h'00000000, bbra = h'0054, bdra = h'00000000, bdmra = h'00000000, barb = h'00008010, bamrb = h'00000006, bbrb = h'0054, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00000400 specified conditions: channel a/channel b independent mode address: h'00000404, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (after in struction execution)/read (operand size is not included in the condition) address: h'00008010, address mask: h'00000006 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (before in struction execution)/read (operand size is not included in the condition) a user break occurs after an instruction of address h'00000404 is executed or before instructions of addresses h'00008010 to h'00008016 are executed. (example 1-2) ? register specifications bara = h'00037226, bamra = h'00000000, bbra = h'0056, bdra = h'00000000, bdmra = h'00000000, barb = h'0003722e, bamrb = h'00000000, bbrb = h'0056, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00000008 specified conditions: channel a/channel b sequential mode address: h'00037226, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (b efore instruction execution)/read/word
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 165 of 1560 mar 18, 2011 sh7080 group address: h'0003722e, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (b efore instruction execution)/read/word after an instruction with address h'00037226 is executed, a user break occurs before an instruction with address h'0003722e is executed. (example 1-3) ? register specifications bara = h'00027128, bamra = h'00000000, bbra = h' 005a, bdra = h'00000000, bdmra = h'00000000, barb = h'00031415, bamrb = h'00000000, bbrb = h'0054, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00000000 specified conditions: channel a/channel b independent mode address: h'00027128, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (before instruction execution)/write/word address: h'00031415, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (before in struction execution)/read (operand size is not included in the condition) on channel a, no user break occurs since instruc tion fetch is not a write cycle. on channel b, no user break occurs since instruction fe tch is performed for an even address. (example 1-4) ? register specifications bara = h'00037226, bamra = h'00000000, bbra = h' 005a, bdra = h'00000000, bdmra = h'00000000, barb = h'0003722e, bamrb = h'00000000, bbrb = h'0056, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00000008 specified conditions: channel a/channel b sequential mode address: h'00037226, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (before instruction execution)/write/word
section 7 user break controller (ubc) page 166 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group address: h'0003722e, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (b efore instruction execution)/read/word since instruction fetch is not a write cycle on channel a, a sequential condition does not match. therefore, no user break occurs. (example 1-5) ? register specifications bara = h'00000500, bamra = h'00000000, bbra = h'0057, bdra = h'00000000, bdmra = h'00000000, barb = h'00001000, bamrb = h'00000000, bbrb = h'0057, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00000001, betr = h'0005 specified conditions: channel a/channel b independent mode address: h'00000500, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (before instruction execution)/read/longword the number of execution-times break enable (5 times) address: h'00001000, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (before instruction execution)/read/longword on channel a, a user break occurs after the instruction of address h'00000500 is executed four times and before the fifth time. on channel b, a user break occurs before an instruction of address h'00001000 is executed. (example 1-6) ? register specifications bara = h'00008404, bamra = h'00000fff, bbra = h'0054, bdra = h'00000000, bdmra = h'00000000, barb = h'00008010, bamrb = h'00000006, bbrb = h'0054, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00000400 specified conditions: channel a/channel b independent mode address: h'00008404, address mask: h'00000fff data: h'00000000, data mask: h'00000000
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 167 of 1560 mar 18, 2011 sh7080 group bus cycle: l bus/instruction fetch (after in struction execution)/read (operand size is not included in the condition) address: h'00008010, address mask: h'00000006 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (before in struction execution)/read (operand size is not included in the condition) a user break occurs after an instruction with addresses h'00008000 to h'00008ffe is executed or before an instruction with addresses h'00008010 to h'00008016 are executed. break condition specified fo r l bus data access cycle: (example 2-1) ? register specifications bara = h'00123456, bamra = h'00000000, bbra = h' 0064, bdra = h'12345678, bdmra = h'ffffffff, barb = h'000abcde, bamrb = h'000000ff, bbrb = h'006a, bdrb = h'0000a512, bdmrb = h'00000000, brcr = h'00000080 specified conditions: channel a/channel b independent mode address: h'00123456, address mask: h'00000000 data: h'12345678, da ta mask: h'ffffffff bus cycle: l bus/data access/read (operand size is not included in the condition) address: h'000abcde, address mask: h'000000ff data: h'0000a512, data mask: h'00000000 bus cycle: l bus/data access/write/word on channel a, a user break occurs with longword read from address h'00123454, word read from address h'00123456, or byte read from address h'00123456. on channel b, a user break occurs when word h'a512 is written in addresses h'000abc00 to h'000abcfe.
section 7 user break controller (ubc) page 168 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group break condition specified fo r i bus data access cycle: (example 3-1) ? register specifications bara = h'00314154, bamra = h'00000000, bbra = h'0194, bdra = h'12345678, bdmra = h'ffffffff, barb = h'00055555, bamrb = h'00000000, b brb = h'01a9, bdrb = h'00007878, bdmrb = h'00000f0f, brcr = h'00000080 specified conditions: channel a/channel b independent mode address: h'00314154, address mask: h'00000000 data: h'12345678, da ta mask: h'ffffffff bus cycle: i bus (cpu cycle)/instruction fetc h/read (operand size is not included in the condition) address: h'00055555, address mask: h'00000000 data: h'00000078, data mask: h'0000000f bus cycle: i bus (cpu cycle)/data access/write/byte on channel a, a user break occurs when instruction fetch is performed for address h'00314156 in the external memory space. on channel b, a user break occurs when byte data h'7x is written in address h'00055555 in the external memory space by the cpu.
section 7 user break controller (ubc) r01uh0198ej0500 rev. 5.00 page 169 of 1560 mar 18, 2011 sh7080 group 7.5 usage notes 1. the cpu can read from or write to the ubc registers via the i bus. accordingly, during the period from executing an instruction to rewrite the ubc register till the new value is actually rewritten, the desired user break may not occu r. in order to know the timing when the ubc register is changed, read from the last written register. instructions after then are valid for the newly written register value. 2. ubc cannot monitor access to the l bus and i bus in the same channel. 3. note on specification of sequential break: a condition match occurs when a b-channel matc h occurs in a bus cycle after an a-channel match occurs in another bus cycle in sequential break setting. therefore, no user break occurs even if a bus cycle, in which an a-channel ma tch and a channel b match occur simultaneously, is set. 4. when a user break and another exception occur at the same instruction, which has higher priority is determined according to the priority levels defined in table 5.1 in section 5, exception handling. if an exception with higher priority occurs, the user break is not generated. ? pre-execution break has the highest priority. ? when a post-execution break or data access break occurs simultaneously with a re- execution-type exception (including pre-execution break) that has higher priority, the re- execution-type exception is ac cepted, and the condition matc h flag is not set (see the exception in the following note). the user break will occur and the condition match flag will be set only after the exception source of the re-execution-type exception has been cleared by the exception handling routine and re-execution of the same instruction has ended. ? when a post-execution break or data acce ss break occurs simultaneously with a completion-type exception (trapa) that has higher priority, though a user break does not occur, the condition match flag is set. 5. note the following ex ception for the above note. if a post-execution break or data access break is satisfied by an instruction that generates a cpu address error by data access, the cpu address error is given priority to the user break interrupt. note that the ubc condition match flag is set in this case. 6. note the following when a user break occurs in a delay slot. if a pre-execution break is set at the delay slot instruction of the rte instruction, the user break does not occur until the branch destination of the rte instruction.
section 7 user break controller (ubc) page 170 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7. user breaks are disabled during ubc module standby mode. do not read from or write to the ubc registers during ubc module standby mode; the values are not guaranteed. 8. do not set a post-execution break at a sleep instruction or a branch instruction for which a sleep instruction is placed in th e delay slot. in addition, do not set a data access break at a sleep instruction or one or two instru ctions before a sleep instruction. 9. when the dtc or dmac is in operation, the ubc cannot correctly determine access to the external space by the cpu via the i bus. to de termine access to the exte rnal space via the i bus in the above situation, select all bus masters. this makes it impossible to determine conditions of access with specified bus masters. however, when a bus master can be inferred from data values, the relevant data values can be included as a condition that indicates a particular bus master.
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 171 of 1560 mar 18, 2011 sh7080 group section 8 data transfer controller (dtc) this lsi includes a data transfer controller (dtc). the dtc can be activated to transfer data by an interrupt request. 8.1 features ? transfer possible over any number of channels: ? chain transfer multiple rounds of data transfer is execu ted in response to a single activation source chain transfer is only possible after data transf er has been done for the specified number of times (i.e. when the transfer counter is 0) ? three transfer modes normal/repeat/blo ck transfer modes selectable transfer source and destination addresses can be selected from in crement/decrem ent/fixed ? the transfer source and destination addresses can be specified by 32 bits to select a 4-gbyte address space directly ? size of data for data transfer can be specified as byte, word, or longword ? a cpu interrupt can be requested for the interrupt that activated the dtc a cpu interrupt can be requested after one data transfer completion a cpu interrupt can be requested after the specified data transfer completion ? read skip of the transfer information specifiable ? writeback skip executed for the fixed tr ansfer source and destination addresses ? module stop mode specifiable ? short address mode specifiable ? bus release timing select able from five types ? priority of the dtc activation selectable from two types figure 8.1 shows a block diagram of the dtc. the dtc transfer information can be allocated to the data area*. note: * when the transfer information is stored in the on-chip ram, the rame bit in ramcr must be set to 1.
section 8 data transfer controller (dtc) page 172 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bus interface interrupt source clear request dtc dtc internal bus peripheral bus internal bus (32 bits) external bus cpu interrupt request register control cpu/dtc /dmac request determination interrupt control interrupt request on-chip memory mra chcr[11:8] mrb sar dar cra crb on-chip peripheral module external memory external device (memory mapped) bus state controller mra, mrb: sar: dar: cra, crb: dtcera to dtcere: dtccr: dtcvbr: chcr: dtc mode registers a, b dtc source address register dtc destination address register dtc transfer count registers a, b dtc enable registers a to e dtc control register dtc vector base register dma channel control register [legend] dtcera to dtcere dtccr dtcvbr activation control intc dmac dmac activation source clear signal figure 8.1 block diagram of dtc
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 173 of 1560 mar 18, 2011 sh7080 group 8.2 register descriptions dtc has the following registers. for details on the addresses of these registers and the states of these registers in each processing state, see section 27, list of registers. these six registers mra, mrb, sar, dar, cr a, and crb cannot be directly accessed by the cpu. the contents of these registers are stored in the data area as transfer information. when a dtc activation request occurs, the dt c reads a start address of transf er information that is stored in the data area according to the vector address, reads the transfer information, and transfers data. after the data transfer, it writes a set of updated transfer information back to the data area. on the other hand, dtcera to dtcere, dtccr, and dtcvbr can be directly accessed by the cpu. table 8.1 register configuration register name abbrevia- tion r/w initial value address access size dtc enable register a dtcera r/w h'0000 h'ffffcc80 8, 16 dtc enable register b dtcerb r/w h'0000 h'ffffcc82 8, 16 dtc enable register c dtcerc r/w h'0000 h'ffffcc84 8, 16 dtc enable register d dtcerd r/w h'0000 h'ffffcc86 8, 16 dtc enable register e dtcere r/w h'0000 h'ffffcc88 8, 16 dtc control register dtccr r/w h'00 h'ffffcc90 8 dtc vector base register dtcvbr r/w h'00000000 h'ffffcc94 8, 16, 32 bus function extending register bscehr r/w h'0000 h'ffffe89a 8, 16
section 8 data transfer controller (dtc) page 174 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 8.2.1 dtc mode register a (mra) mra selects dtc operating mode. mra cannot be accessed directly by the cpu. bit: initial value: r/w: 7654321 0 -------- -------- md[1:0] sz[1:0] sm[1:0] - - bit bit name initial value r/w description 7, 6 md[1:0] undefined ? dtc mode 1 and 0 specify dtc transfer mode. 00: normal transfer mode 01: repeat transfer mode 10: block transfer mode 11: setting prohibited 5, 4 sz[1:0] undefined ? dtc data transfer size 1 and 0 specify the size of data to be transferred. 00: byte-size transfer 01: word-size transfer 10: longword-size transfer 11: setting prohibited 3, 2 sm[1:0] undefined ? source address mode 1 and 0 specify an sar operation after a data transfer. 0x: sar is fixed (sar writeback is skipped) 10: sar is incremented after a transfer (by 1 when sz1 and sz0 = b'00; by 2 when sz1 and sz0 = b'01; by 4 when sz1 and sz0 = b'10) 11: sar is decremented after a transfer (by 1 when sz1 and sz0 = b'00; by 2 when sz1 and sz0 = b'01; by 4 when sz1 and sz0 = b'10)
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 175 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1, 0 ? undefined ? reserved the write value should always be 0. [legend] x: don't care 8.2.2 dtc mode register b (mrb) mrb selects dtc operating mode. mrb cannot be accessed directly by the cpu. bit: initial value: r/w: 7654321 0 -------- -------- chne chns disel dts dm[1:0] - - bit bit name initial value r/w description 7 chne undefined ? dtc chain transfer enable specifies the chain transfer. for details, see section 8.5.6, chain transfer. the chain transfer condition is selected by the chns bit. 0: disables the chain transfer 1: enables the chain transfer 6 chns undefined ? dtc chain transfer select specifies the chain transfer condition. if the following transfer is a chain transfer, the completion check of the specified transfer count is not performed and activation source flag or dtcer is not cleared. 0: chain transfer every time 1: chain transfer only when transfer counter = 0
section 8 data transfer controller (dtc) page 176 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 disel undefined ? dtc interrupt select when this bit is set to 1, an interrupt request is generated to the cpu every time a data transfer or a block transfer ends. when this bit is set to 0, a cpu interrupt request is only generated when the specified number of data transfers end. note: this bit should be cleared to 0 when the i 2 c2 is selected as an activation source. 4 dts undefined ? dtc transfer mode select specifies either the source or destination as repeat or block area during repeat or block transfer mode. 0: specifies the destination as repeat or block area 1: specifies the source as repeat or block area 3, 2 dm[1:0] undefined ? destination address mode 1 and 0 specify a dar operation after a data transfer. 0x: dar is fixed (dar writeback is skipped) 10: dar is incremented after a transfer (by 1 when sz1 and sz0 = b'00; by 2 when sz1 and sz0 = b'01; by 4 when sz1 and sz0 = b'10) 11: sar is decremented after a transfer (by 1 when sz1 and sz0 = b'00; by 2 when sz1 and sz0 = b'01; by 4 when sz1 and sz0 = b'10) 1, 0 ? undefined ? reserved the write value should always be 0. [legend] x: don't care
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 177 of 1560 mar 18, 2011 sh7080 group 8.2.3 dtc source address register (sar) sar is a 32-bit register that designates the source address of data to be transferred by the dtc. sar cannot be accessed directly from the cpu. bit: initial value: r/w: bit: initial value: r/w: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 : undefined * **************** ---------------- **************** ---------------- 8.2.4 dtc destination address register (dar) dar is a 32-bit register that designates the destination address of data to be transferred by the dtc. dar cannot be accessed directly from the cpu. bit: initial value: r/w: bit: initial value: r/w: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 : undefined * **************** ---------------- **************** ----------------
section 8 data transfer controller (dtc) page 178 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 8.2.5 dtc transfer count register a (cra) cra is a 16-bit register that designates the number of times data is to be transferred by the dtc. in normal transfer mode, cra functions as a 16-bit transfer counter (1 to 65,536). it is decremented by 1 every time data is transferred, and bit dtcen (n = 15 to 0) corresponding to the activation source is cleared and th en an interrupt is requested to the cpu when the count reaches h'0000. the transfer count is 1 when cra = h'0001, 65,535 when cra = h'ffff, and 65,536 when cra = h'0000. in repeat transfer mode, cra is divided into two parts: the upper eight bits (crah) and the lower eight bits (cral). crah holds the number of transfers while cral functions as an 8-bit transfer counter (1 to 256). cral is decremen ted by 1 every time data is transferred, and the contents of crah are sent to cral when the count reaches h'00. the transfer count is 1 when crah = cral = h'01, 255 when crah = cral = h'ff, and 256 when crah = cral = h'00. in block transfer mode, cra is divided into two parts: the upper eight bits (crah) and the lower eight bits (cral). crah holds the block size while cral functions as an 8-bit block-size counter (1 to 256 for byte, word, or longword). cral is decremented by 1 every time a byte (word or longword) data is transferred, and the contents of crah are sent to cral when the count reaches h'00. the block size is 1 byte (word or longword) when crah = cral =h'01, 255 bytes (words or longwords) when crah = cral = h'ff, and 256 bytes (words or longwords) when crah = cral =h'00. cra cannot be accessed directly from the cpu. bit: initial value: r/w: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 : undefined * **************** ----------------
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 179 of 1560 mar 18, 2011 sh7080 group 8.2.6 dtc transfer count register b (crb) crb is a 16-bit register that designates the number of times data is to be transferred by the dtc in block transfer mode. it functions as a 16-bit transfer counter (1 to 65,536) that is decremented by 1 every time a block of data is transferred, and bit dtcen (n = 15 to 0) corresponding to the activation source is cleared and th en an interrupt is requested to the cpu when the count reaches h'0000. the transfer count is 1 when crb = h' 0001, 65,535 when crb = h'ffff, and 65,536 when crb = h'0000. crb is not available in normal and repeat mode s and cannot be accessed directly by the cpu. bit: initial value: r/w: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 : undefined * **************** ----------------
section 8 data transfer controller (dtc) page 180 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 8.2.7 dtc enable registers a to e (dtcera to dtcere) dtcer which is comprised of eight registers, dt cera to dtcere, is a register that specifies dtc activation interrupt sources. the correspondence between interrupt sources and dtce bits is shown in table 8.2. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w dtce15 dtce14 dtce13 dtce12 dtce11 dtce10 dtce9 dtce8 dtce7 dtce6 dtce5 dtce4 dtce3 dtce2 dtce1 dtce0 bit bit name initial value r/w description 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dtce15 dtce14 dtce13 dtce12 dtce11 dtce10 dtce9 dtce8 dtce7 dtce6 dtce5 dtce4 dtce3 dtce2 dtce1 dtce0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w dtc activation enable 15 to 0 if set to 1, the corresponding interrupt source is specified as a dtc activation source. [clearing conditions] ? writing 0 to the bit after reading 1 from it ? when the disel bit is 1 and the data transfer has ended ? when the specified number of transfers have ended these bits are not cleared when the disel bit is 0 and the specified number of transfers have not ended [setting condition] ? writing 1 to the bit after reading 0 from it
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 181 of 1560 mar 18, 2011 sh7080 group 8.2.8 dtc control register (dtccr) dtccr specifies transfer information read skip. bit: initial value: r/w: 7654321 0 00000000 r r r r/w r/w r r r/(w) * note: writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. * - - - rrs rchne - - err bit bit name initial value r/w description 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 rrs 0 r/w dtc transfer information read skip enable controls the vector address read and transfer information read. a dtc vector number is always compared with the vector number for the previous activation. if the vector numbers match and this bit is set to 1, the dtc data transfer is started without reading a vector address and transfer information. if the previous dtc activation is a chain transfer, the vector address read and transfer information read are always performed. however, when the dtpr bit in the bus function extending register (bscehr) is set to 1, transfer information read skip is not performed regardless of the setting of this bit. 0: transfer read skip is not performed. 1: transfer read skip is performed when the vector numbers match. 3 rchne 0 r/w chain transfer enable after dtc repeat transfer enables/disables the chain transfer while transfer counter (cral) is 0 in repeat transfer mode. in repeat transfer mode, the crah value is written to cral when cral is 0. accordingly, chain transfer may not occur when cral is 0. if this bit is set to 1, the chain transfer is enabled when crah is written to cral. 0: disables the chain transfer after repeat transfer 1: enables the chain transfer after repeat transfer
section 8 data transfer controller (dtc) page 182 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2, 1 ? all 0 r reserved these are read-only bits and cannot be modified. 0 err 0 r/(w) * transfer stop flag indicates that the dtc address error or nmi interrupt request has occurred. if a dtc address error or nmi interrupt occurs while the dtc is active, address error handling or nmi interrupt handling processing is executed after the dtc has released the bus mastership. the dtc stops in the transfer information writing state after transferring data. 0: no interrupt occurs 1: an interrupt occurs [clearing condition] ? when writing 0 after reading 1 note: * writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way.
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 183 of 1560 mar 18, 2011 sh7080 group 8.2.9 dtc vector base register (dtcvbr) dtcvbr is a 32-bit register that specifies the ba se address for vector table address calculation. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r r r r r r r r r r r r ------------ bit bit name initial value r/w description 31 to 12 all 0 r/w 11 to 0 ? all 0 r bits 11 to 0 are always read as 0. the write value should always be 0. 8.2.10 bus function extending register (bscehr) bscehr is a 16-bit register that specifies the timing of bus release by the dtc and other functions. this register can be used to give higher priority to the transfer by the dtc and configure the functions that can reduce the number of cycles over which the dtc is active. for more details, see section 9.4.8, bus function extending register (bscehr).
section 8 data transfer controller (dtc) page 184 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 8.3 activation sources the dtc is activated by an interrupt request. th e interrupt source is selected by dtcer. a dtc activation source can be selected by setting the corresponding bit in dtcer; the cpu interrupt source can be selected by clearing the corresponding bit in dtcer. at the end of a data transfer (or the last consecutive transfer in the case of chain transfer), the ac tivation source interrupt flag or corresponding dtcer bit is cleared. 8.4 location of transfer inform ation and dtc vector table locate the transfer information in the data area. the start address of transfer information should be located at the address that is a multiple of four (4n). otherwise, the lower two bits are ignored during access ([1:0] = b'00.) transfer information located in the data area is shown in figure 8.2. only in the case where a ll transfer sources/transfer destinations are in on-chip ram and on-chip peripheral modules, short address mode can be selected by setting the dtsa bit in the bus function extending register (bscehr) to 1 (see section 9.4.8, bus function extending register (bscehr)). normally, four longwords of transfer information has to be read. but if short address mode is selected, the size of transfer information is reduced to three longwords, which can shorten the period over which the dtc is active. the dtc reads the start address of the transfer information fr om the vector table for every activation source and reads the transfer information from this start address. figure 8.3 shows correspondences between the dtc vector table and transfer information.
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 185 of 1560 mar 18, 2011 sh7080 group mra mrb mra sar dar mrb sar dar cra crb cra crb lower addresses configuration of transfer information in short address mode transfer information for one round of transfer (3 longwords) transfer information for the 2nd round of transfer in chain transfer (3 longwords) start address 4 bytes 1 03 2 chain transfer mra mrb reserved (0 write) mra mrb reserved (write 0) sar dar cra crb cra crb sar dar lower addresses configuration of transfer information in normal address mode transfer information for one round of transfer (4 longwords) transfer information for the 2nd round of transfer in chain transfer (4 longwords) start address note: since the upper 8 bits of sar and dar are regarded as all 1, short address mode can be set only for transfer between on-chip peripheral modules and on-chip ram. 4 bytes 1 03 2 chain transfer figure 8.2 transfer information on data area transfer information (1) start address transfer information (2) start address transfer information (n) start address vector table upper: dtcvbr lower: h'400 + vector number 4 dtc vector address +4 +4n transfer information (1) 4 bytes transfer information (2) transfer information (n) : : : : : : figure 8.3 correspondence between dtc v ector address and transfer information
section 8 data transfer controller (dtc) page 186 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 8.2 shows correspondence between the dtc activation source and vector address. table 8.2 interrupt sources, dtc vect or addresses, and corresponding dtces origin of activation source activation source vector number dtc vector address offset dtce * 1 transfer source transfer destination priority external pin irq0 64 h'500 dtcera15 arbitrary * 2 arbitrary * 2 high irq1 65 h'504 dtcera14 arbitrary * 2 arbitrary * 2 irq2 66 h'508 dtcera13 arbitrary * 2 arbitrary * 2 irq3 67 h'50c dtcera12 arbitrary * 2 arbitrary * 2 irq4 68 h'510 dtcera11 arbitrary * 2 arbitrary * 2 irq5 69 h'514 dtcera10 arbitrary * 2 arbitrary * 2 irq6 70 h'518 dtcera9 arbitrary * 2 arbitrary * 2 irq7 71 h'51c dtcera8 arbitrary * 2 arbitrary * 2 mtu2_0 tgia_0 88 h'560 dtcerb15 arbitrary * 2 arbitrary * 2 tgib_0 89 h'564 dtcerb14 arbitrary * 2 arbitrary * 2 tgic_0 90 h'568 dtcerb13 arbitrary * 2 arbitrary * 2 tgid_0 91 h'56c dtcerb12 arbitrary * 2 arbitrary * 2 mtu2_1 tgia_1 96 h'580 dtcerb11 arbitrary * 2 arbitrary * 2 tgib_1 97 h'584 dtcerb10 arbitrary * 2 arbitrary * 2 mtu2_2 tgia_2 104 h'5a0 dtcerb9 arbitrary * 2 arbitrary * 2 tgib_2 105 h'5a4 dtcerb8 arbitrary * 2 arbitrary * 2 mtu2_3 tgia_3 112 h'5c0 dtcerb7 arbitrary * 2 arbitrary * 2 tgib_3 113 h'5c4 dtcerb6 arbitrary * 2 arbitrary * 2 tgic_3 114 h'5c8 dtcerb5 arbitrary * 2 arbitrary * 2 tgid_3 115 h'5cc dtcerb4 arbitrary * 2 arbitrary * 2 mtu2_4 tgia_4 120 h'5e0 dtcerb3 arbitrary * 2 arbitrary * 2 tgib_4 121 h'5e4 dtcerb2 arbitrary * 2 arbitrary * 2 tgic_4 122 h'5e8 dtcerb1 arbitrary * 2 arbitrary * 2 tgid_4 123 h'5ec dtcerb0 arbitrary * 2 arbitrary * 2 tciv_4 124 h'5f0 dtcerc15 arbitrary * 2 arbitrary * 2 low
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 187 of 1560 mar 18, 2011 sh7080 group origin of activation source activation source vector number dtc vector address offset dtce * 1 transfer source transfer destination priority mtu2_5 tgiu_5 128 h'600 dtcerc14 arbitrary * 2 arbitrary * 2 high tgiv_5 129 h'604 dtcerc13 arbitrary * 2 arbitrary * 2 tgiw_5 130 h'608 dtcerc12 arbitrary * 2 arbitrary * 2 mtu2s_3 tgia_3s 160 h'680 dtcerc3 arbitrary * 2 arbitrary * 2 tgib_3s 161 h'684 dtcerc2 arbitrary * 2 arbitrary * 2 tgic_3s 162 h'688 dtcerc1 arbitrary * 2 arbitrary * 2 tgid_3s 163 h'68c dtcerc0 arbitrary * 2 arbitrary * 2 mtu2s_4 tgia_4s 168 h'6a0 dtcerd15 arbitrary * 2 arbitrary * 2 tgib_4s 169 h'6a4 dtcerd14 arbitrary * 2 arbitrary * 2 tgic_4s 170 h'6a8 dtcerd13 arbitrary * 2 arbitrary * 2 tgid_4s 171 h'6ac dtcerd12 arbitrary * 2 arbitrary * 2 tciv_4s 172 h'6b0 dtcerd11 arbitrary * 2 arbitrary * 2 mtu2s_5 tgiu_5s 176 h'6c0 dtcerd10 arbitrary * 2 arbitrary * 2 tgiv_5s 177 h'6c4 dtcerd9 arbitrary * 2 arbitrary * 2 tgiw_5s 178 h'6c8 dtcerd8 arbitrary * 2 arbitrary * 2 cmt_0 cmi_0 184 h'6e0 dtcerd7 arbitrary * 2 arbitrary * 2 cmt_1 cmi_1 188 h'6f0 dtcerd6 arbitrary * 2 arbitrary * 2 a/d_0, a/d_1 adi_0 200 h'720 dtcerd5 addr0 to addr3 arbitrary * 2 adi_1 201 h'724 dtcerd4 addr4 to addr7 arbitrary * 2 a/d_2 adi_2 204 h'730 dtcerd3 addr8 to addr15 arbitrary * 2 sci_0 rxi_0 217 h'764 dtcere15 scrdr_0 arbitrary * 2 txi_0 218 h'768 dtcere14 arbitrary * 2 sctdr_0 sci_1 rxi_1 221 h'774 dtcere13 scrdr_1 arbitrary * 2 txi_1 222 h'778 dtcere12 arbitrary * 2 sctdr_1 sci_2 rxi_2 225 h'784 dtcere11 scrdr_2 arbitrary * 2 txi_2 226 h'788 dtcere10 arbitrary * 2 sctdr_2 scif rxif 229 h'794 dtcere9 scfrdr_3 arbitrary * 2 txif 231 h'79c dtcere8 arbitrary * 2 scftdr_3 low
section 8 data transfer controller (dtc) page 188 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group origin of activation source activation source vector number dtc vector address offset dtce * 1 transfer source transfer destination priority ssu ssrxi 233 h'7a4 dtcere7 ssrdr0 to ssrdr3 arbitrary * 2 high sstxi 234 h'7a8 dtcere6 arbitrary * 2 sstdr0 to sstdr3 i 2 c2 iitxi 238 h'7b8 dtcere5 arbitrary * 2 icdrt iirxi 239 h'7bc dtcere4 icdrr arbitrary * 2 low notes: 1. the dtce bits with no corresponding interrupt are reserved, and the write value should always be 0. to leave software standby mode with an interrupt, write 0 to the corresponding dtce bit. 2. an external memory, a memory-mapped external device, an on-chip memory, or an on- chip peripheral module (except dmac, dtc, bsc, ubc, and flash) can be selected as the source or destination. note that at least either the source or destination must be an on-chip peripheral module; transfer cannot be done among an external memory, a memory-mapped external device, and an on-chip memory.
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 189 of 1560 mar 18, 2011 sh7080 group 8.5 operation there are three transfer modes: normal, repeat , and block transfer modes. since transfer information is in the data area, it is possible to transfer data over any required number of channels. when activated, the dtc reads tran sfer information stored in the data are and transfers data according to the transfer information. after the data transfer is complete, it writes updated transfer information back to the data area. the dtc specifies the source address and destin ation address in sar and dar, respectively. after a transfer, sar and dar are incremented, decremented, or fixed independently. table 8.3 shows the dtc transfer modes. table 8.3 dtc transfer modes transfer mode size of data transferred at one transfer request memory address increment or decrement transfer count normal 1 byte/word/longword incremented/decremented by 1, 2, or 4, or fixed 1 to 65536 repeat * 1 1 byte/word/longword incremented/decremented by 1, 2, or 4, or fixed 1 to 256 * 3 block * 2 block size specified by crah (1 to 256 bytes/words/longwords) incremented/decremented by 1, 2, or 4, or fixed 1 to 65536 * 4 notes: 1. either source or desti nation is specified to repeat area. 2. either source or destination is specified to block area. 3. after transfer of the specified transfer c ount, initial state is recovered to continue the operation. 4. number of transfers of the specified block size of data. setting the chne bit in mrb to 1 makes it possible to perform a number of transfers with a single activation (chain transfer). setting the chns bit in mrb to 1 can also be made to have chain transfer performed only when th e transfer counter value is 0. figure 8.4 shows a flowchart of dtc operation, and table 8.4 summarizes the conditions for dtc transfers including chain transfer (combinations for performing the second and third transfers are omitted).
section 8 data transfer controller (dtc) page 190 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group start match & rrs = 1 not match | rrs = 0 next transfer read transfer information transfer data update transfer information update the start address of transfer information write transfer information chne = 1 transfer counter = 0 or disel = 1 clear activation source flag end chns = 0 transfer counter = 0 disel = 1 clear dtcer/request an interrupt to the cpu no no no no no yes yes yes yes yes vector number comparison read dtc vector figure 8.4 flowchart of dtc operation
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 191 of 1560 mar 18, 2011 sh7080 group table 8.4 dtc transfer conditions (chain transfer conditions included) 1st transfer 2nd transfer transfer mode chne chns rchne disel transfer counter * 1 chne chns rchne disel transfer counter * 1 dtc transfer 0 ? ? 0 not 0 ? ? ? ? ? ends at 1st transfer 0 ? ? 0 0 ? ? ? ? ? 0 ? ? 1 ? ? ? ? ? ? ends at 1st transfer interrupt request to cpu 1 0 ? ? ? 0 ? ? 0 not 0 ends at 2nd transfer 0 ? ? 0 0 0 ? ? 1 ? ends at 2nd transfer interrupt request to cpu 1 1 ? 0 not 0 ? ? ? ? ? ends at 1st transfer 1 1 ? 1 not 0 ? ? ? ? ? ends at 1st transfer interrupt request to cpu 1 1 ? ? 0 0 ? ? 0 not 0 ends at 2nd transfer normal 0 ? ? 0 0 0 ? ? 1 ? ends at 2nd transfer interrupt request to cpu
section 8 data transfer controller (dtc) page 192 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 1st transfer 2nd transfer transfer mode chne chns rchne disel transfer counter * 1 chne chns rchne disel transfer counter * 1 dtc transfer 0 ? ? 0 ? ? ? ? ? ? ends at 1st transfer 0 ? ? 1 ? ? ? ? ? ? ends at 1st transfer interrupt request to cpu 1 0 ? ? ? 0 ? ? 0 ? ends at 2nd transfer 0 ? ? 1 ? ends at 2nd transfer interrupt request to cpu 1 1 ? 0 not 0 ? ? ? ? ? ends at 1st transfer 1 1 ? 1 not 0 ? ? ? ? ? ends at 1st transfer interrupt request to cpu 1 1 0 0 0 * 2 ? ? ? ? ? ends at 1st transfer 1 1 0 1 0 * 2 ? ? ? ? ? ends at 1st transfer interrupt request to cpu repeat 1 1 1 ? 0 * 2 0 ? ? 0 ? ends at 2nd transfer 0 ? ? 1 ? ends at 2nd transfer interrupt request to cpu
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 193 of 1560 mar 18, 2011 sh7080 group 1st transfer 2nd transfer transfer mode chne chns rchne disel transfer counter * 1 chne chns rchne disel transfer counter * 1 dtc transfer 0 ? ? 0 not 0 ? ? ? ? ? ends at 1st transfer 0 ? ? 0 0 ? ? ? ? ? 0 ? ? 1 ? ? ? ? ? ? ends at 1st transfer interrupt request to cpu 1 0 ? ? ? 0 ? ? 0 not 0 ends at 2nd transfer 0 ? ? 0 0 0 ? ? 1 ? ends at 2nd transfer interrupt request to cpu 1 1 ? 0 ? ? ? ? ? ? ends at 1st transfer 1 1 ? 1 not 0 ? ? ? ? ? ends at 1st transfer interrupt request to cpu 1 1 ? 1 0 0 ? ? 0 not 0 ends at 2nd transfer block 0 ? ? 0 0 0 ? ? 1 ? ends at 2nd transfer interrupt request to cpu notes: 1. cra in normal mode transfer, cral in re peat transfer mode, or crb in block transfer mode 2. when the contents of the crah is written to the cral in repeat transfer mode
section 8 data transfer controller (dtc) page 194 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 8.5.1 transfer information read skip function by setting the rrs bit of dtccr, the vector addr ess read and transfer information read can be skipped. the current dtc vector number is always compared with the vector number of previous activation. if the vector numbers match when rrs = 1, a dtc data transfer is performed without reading the vector address and tran sfer information. if the previous activation is a chain transfer, the vector address read and transfer information read are always performed. figure 8.5 shows the transfer information read skip timing. to modify the vector table and transfer information, temporarily clear the rrs bit to 0, modify the vector table and transfer informa tion, and then set the rrs bit to 1 again. when the rrs bit is cleared to 0, the stored vector number is deleted, and the updated vector table and transfer information are read at the next activation. if the dtpr bit in the bus function extending register (bscehr) is set to 1, this function is always disabled. vector read transfer information read data transfer transfer information write data transfer transfer information write note: the dtc request signal indicates the state of internal bus request after the dtc activation source has been determined. internal address dtc activation request dtc request skip transfer information read clock (b ) rw rw figure 8.5 transfer information read skip timing (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip p eripheral module to on-chip ram; transfer information is written in 3 states)
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 195 of 1560 mar 18, 2011 sh7080 group 8.5.2 transfer information writeback skip function by specifying bit sm1 in mra and bit dm1 in mrb to the fixed address mode, a part of transfer information will not be written back. table 8.5 shows the transfer information writeback skip condition and writeback skipped registers. note that the cra and crb are always written back. the writeback of the mra and mrb are always skipped. table 8.5 transfer information writeback skip condition and writeback skipped registers sm1 dm1 sar dar 0 0 skipped skipped 0 1 skipped written back 1 0 written back skipped 1 1 written back written back 8.5.3 normal transfer mode in normal transfer mode, data are transferred in one byte, one word, or one longword units in response to a single activation request. from 1 to 65,536 transfers can be specified. the transfer source and destination addresses can be specified as incremented, decremented, or fixed. when the specified number of transfers ends, an interrupt can be requested to the cpu. table 8.6 lists the register function in normal transfer mode. figure 8.6 shows the memory map in normal transfer mode. table 8.6 register function in normal transfer mode register function written back value sar source address incremented/decremented/fixed * dar destination address incremented/decremented/fixed * cra transfer count a cra ? 1 crb transfer count b not updated note: * transfer information writeback is skipped.
section 8 data transfer controller (dtc) page 196 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group sar transfer source data area dar transfer transfer destination data area figure 8.6 memory map in normal transfer mode 8.5.4 repeat transfer mode in repeat transfer mode, data are transferred in one byte, one word, or one longword units in response to a single activation request. by the dts bit in mrb, either the source or destination can be specified as a repeat area. from 1 to 25 6 transfers can be specified. when the specified number of transfers ends, the transfer counter and address register specified as the repeat area is restored to the initial state, and transfer is repeated. the other address register is then incremented, decremented, or left fixed. in repeat transfer mode, the transfer counter (cral) is updated to the value specified in crah when cr al becomes h'00. thus the transfer counter value does not reach h'00, and therefore a cpu interrupt cannot be requested when disel = 0. table 8.7 lists the register function in repeat transfer mode. figure 8.7 shows the memory map in repeat transfer mode.
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 197 of 1560 mar 18, 2011 sh7080 group table 8.7 register function in repeat transfer mode written back value register function cral is not 1 cral is 1 sar source address incremented/decremented/fixed * dts = 0: incremented/ decremented/fixed * dts = 1: sar initial value dar destination address incremented/decremented/fixed * dts = 0: dar initial value dts = 1: incremented/ decremented/fixed * crah transfer count storage crah crah cral transfer count a cral ? 1 crah crb transfer count b not updated not updated note: * transfer information writeback is skipped. sar transfer source data area (specified as repeat area) dar transfer transfer destination data area figure 8.7 memory map in repeat transfer mode (when transfer source is specified as repeat area)
section 8 data transfer controller (dtc) page 198 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 8.5.5 block transfer mode in block transfer mode, data are transferred in block units in response to a single activation request. either the transfer source or the transfer destination is designated as a block area by the dts bit in mrb. the block size is 1 to 256 bytes (1 to 256 words, or 1 to 256 longwords). when the block data transfer of one block ends, the block size counter (cral) and address register (sar when dts = 1 or dar when dts = 0) specified as the block area is restored to the initial state. the other address register is then incremented, decremented, or left fixed. from 1 to 65,536 transfers can be specified. when the specified number of transfers ends, an interrupt is requested to the cpu. table 8.8 lists the register function in block transfer mode. figure 8.8 shows the memory map in block transfer mode. table 8.8 register function in block transfer mode register function written back value sar source address dts = 0: incremented/decremented/fixed * dts = 1: sar initial value dar destination address dts = 0: dar initial value dts = 1: incremented/decremented/fixed * crah block size storage crah cral block size counter crah crb block transfer counter crb ? 1 note: * transfer information writeback is skipped.
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 199 of 1560 mar 18, 2011 sh7080 group transfer source data area transfer destination data area (specified as block area) block area dar sar : : : transfer 1st block nth block figure 8.8 memory map in block transfer mode (when transfer destination is specified as block area) 8.5.6 chain transfer setting the chne bit in mrb to 1 enables a number of data transfers to be performed consecutively in response to a single transfer re quest. setting the chne and chns bits in mrb set to 1 enables a chain transfer only when the transfer counter reaches 0. sar, dar, cra, crb, mra, and mrb, which define data transfers, can be set independently. figure 8.9 shows the chain transfer operation. in the case of transfer with chne set to 1, an interrupt request to the cpu is not generated at the end of the specified number of transfers or by setting the disel bit to 1, and the interrupt source flag for the activation source and dtcer are not affected. in repeat transfer mode, setting the rchne bit in dtccr and the chne and chns bits in mrb to 1 enables a chain transfer af ter transfer with transfer counter = 1 has been completed.
section 8 data transfer controller (dtc) page 200 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group transfer information chne = 1 transfer information chne = 0 transfer information stored in user area data area transfer source data (1) transfer destination data (1) transfer source data (2) transfer destination data (2) transfer information start address vector table dtc vector address figure 8.9 operation of chain transfer
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 201 of 1560 mar 18, 2011 sh7080 group 8.5.7 operation timing figures 8.10 to 8.15 show the dtc operation timings. internal address vector read transfer information read data transfer transfer information write note: the dtc request signal indicates the state of internal bus request after the dtc activation source has been determined. dtc activation request dtc request clock (b ) rw figure 8.10 example of dtc operation timing: normal transfer mode or repeat transfer mode (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip p eripheral module to on-chip ram; transfer information is written in 3 cycles) internal address vector read transfer information read data transfer transfer information write note: the dtc request signal indicates the state of internal bus request after the dtc activation source has been determined. dtc activation request dtc request clock (b ) rw rw figure 8.11 example of dtc operation timing: block transfer mode with block size = 2 (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip p eripheral module to on-chip ram; transfer information is written in 3 cycles)
section 8 data transfer controller (dtc) page 202 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group internal address vector read transfer information read transfer information read data transfer transfer information write data transfer transfer information write note: the dtc request signal indicates the state of internal bus request after the dtc activation source has been determined. dtc activation request dtc request clock (b ) rw r w figure 8.12 example of dtc operation timing: chain transfer (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip p eripheral module to on-chip ram; transfer information is written in 3 cycles) data transfer transfer information write internal address vector read transfer information read note: the dtc request signal indicates the state of internal bus request after the dtc activation source has been determined. dtc activation request dtc request clock (b ) rw figure 8.13 example of dtc operation timing: normal or repeat transfer in short address mode (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip p eripheral module to on-chip ram; transfer information is written in 3 cycles)
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 203 of 1560 mar 18, 2011 sh7080 group internal address vector read transfer information read data transfer transfer information write note: the dtc request signal indicates the state of internal bus request after the dtc activation source has been determined. dtc activation request dtc request clock (b ) r w figure 8.14 example of dtc operation timing: normal or repeat transfer with dtpr = 1 (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip p eripheral module to on-chip ram; transfer information is written in 3 cycles) data transfer internal address vector read transfer information read transfer information write note: the dtc request signal indicates the state of internal bus request after the dtc activation source has been determined. dtc activation request by irq pin dtc request clock (b ) rw figure 8.15 example of dtc operation timing: normal or repeat transfer (activated by irq; i : b : p = 1: 1/2: 1/2; data transferred from on-chip p eripheral module to on-chip ram; transfer information is written in 3 cycles)
section 8 data transfer controller (dtc) page 204 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 8.5.8 number of dtc execution cycles table 8.9 shows the execution status for a single dtc data transfer, and table 8.10 shows the number of cycles required for each execution. table 8.9 dtc execution status mode vector read i transfer information read j transfer information write k data read l data write m internal operation n normal 1 0 * 1 4 3 * 4 0 * 1 3 2 * 2 1 * 3 1 1 1 0 * 1 repeat 1 0 * 1 4 3 * 4 0 * 1 3 2 * 2 1 * 3 1 1 1 0 * 1 block transfer 1 0 * 1 4 3 * 4 0 * 1 3 2 * 2 1 * 3 1?p 1?p 1 0 * 1 [legend] p: block size (initial setting of crah and cral) notes: 1. when transfer information read is skipped 2. when the sar or dar is in fixed mode 3. when the sar and dar are in fixed mode 4. when short address mode
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 205 of 1560 mar 18, 2011 sh7080 group table 8.10 number of cycles requ ired for each execution state object to be accessed on-chip ram * 1 /rom * 2 on-chip i/o registers external devices * 5 bus width 32 bits 8 bits * 4 16 bits 8 bits 16 bits 32 bits access cycles 1b to 3b * 1 * 2 2p 2p 2b 2b 2b vector read s i 1b to 3b * 1 * 2 ? ? 9b 5b 3b transfer information read s j 1b to 3b * 1 ? ? 9b 5b 3b execu- tion status transfer information write s k 1b to 3b * 1 ? ? 2b * 6 2b * 6 2b * 6 byte data read s l 1b to 3b * 1 1b + 2p * 3 1b + 2p * 3 3b 3b 3b word data read s l 1b to 3b * 1 ? 1b + 2p * 3 5b 3b 3b longword data read s l 1b to 3b * 1 ? 1b + 4p * 3 9b 5b 3b byte data write s m 1b to 3b * 1 1b + 2p * 3 1b + 2p * 3 2b * 6 2b * 6 2b * 6 word data write s m 1b to 3b * 1 ? 1b + 2p * 3 2b * 6 2b * 6 2b * 6 longword data write s m 1b to 3b * 1 ? 1b + 4p * 3 2b * 6 2b * 6 2b * 6 internal operation s n 1 notes: 1. values for on-chip ram. number of cycles varies depending on the ratio of i :b . read write i :b = 1:1 3b 3b i :b = 1:1/2 2b 1b i :b = 1:1/3 2b 1b i :b = 1:1/4 or less 1b 1b 2. values for on-chip rom. number of cycles varies depending on the ratio of i :b .and are the same as on-chip ram. only vector read is possible. 3. the values in the table are those for the fastest case. depending on the state of the internal bus, replace 1b by 1p in a slow case. 4. this applies to the i 2 c2. 5. values are different depending on the bsc register setting. the values in the table are the sample for the case with no wait cycles and the wm bit in csnwcr = 1. 6. values are different depending on the bus state. the number of cycles increases when many external wait cycles are inserted in the case where writing is frequently executed, such as block transfer, and when the external bus is in use because the write buffer cannot be used efficiently in such cases. for details on the write buffer, see section 9.5.14 (2), access in view of lsi internal bus master.
section 8 data transfer controller (dtc) page 206 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group the number of execution cycles is calcula ted from the formula below. note that means the sum of cycles for all transfers initiated by one activation event (the number of 1-valued chne bits in transfer information plus 1). number of execution cycles = i ? s i + (j ? s j + k ? s k + l ? s l + m ? s m ) + n ? s n 8.5.9 dtc bus release timing the dtc requests the bus mastership to the bus arbiter when an activation request occurs. the dtc releases the bus after a vector read, nop cycle generation after a vector read, transfer information read, a single data transfer, or transfer informa tion writeback. the dtc does not release the bus mastership during transfer inform ation read, single data transfer, or transfer information writeback. the bus release timing can be specified through the bus function extending register (bscehr). for details see section 9.4.8, bus function extending register (bscehr). the difference in bus release timing according to the register setting is summarized in table 8.11. settings other than settings 1 to 5 are not allowed. the setting must not be changed while the dtc is active. figure 8.16 is a timing chart showing an example of bus release timing.
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 207 of 1560 mar 18, 2011 sh7080 group table 8.11 dtc bus release timing bus function extending register (bscehr) setting bus release timing (o: bus is released; x: bus is not released) after write-back of transfer information setting dtlock csstp1 csstp2 csstp3 dtbst after vector read nop cycle generation * 1 after transfer information read after a single data transfer normal transfer continuous transfer setting 1 1 0 * 3 1 0 o o o o o o setting 2 0 0 0 * 3 0 x o x x o o setting 3 0 1 * 3 * 3 0 x x x x o o setting 4 * 2 0 1 * 3 * 3 1 x x x x o x setting 5 1 1 * 3 1 0 o x o o o o notes: 1. the bus mastership is only released for the external space access request from the cpu after a vector read. 2. there are following restrictions in setting 4. ? clock setting by the frequency control register (frqcr) must be i :b :p :mi :mp = 8:4:4:4:4, 4:2:2:2:2, or 2:1:1:1:1. ? locate vector information in on-chip rom or on-chip ram. ? locate transfer information in on-chip ram. ? transfer is allowed between on-chip ram and on-chip peripheral module or between external memory and on-chip peripheral module. 3. don't care.
section 8 data transfer controller (dtc) page 208 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group vector read transfer information read data transfer transfer information write vector read transfer information read data transfer transfer information write note: dtc request signal indicates the state of internal bus request after the dtc activation source is determined. [legend] clock (b ) internal address : indicates bus release timing. : bus mastership is only released for the external access request from the cpu. dtc activation request 2 dtc request bus release timing [setting 1] bus release timing [setting 2] bus release timing [setting 3] bus release timing [setting 5] bus release timing [setting 4] dtc activation request 1 r w r w figure 8.16 example of dtc operation timing: conflict of two activation requests in normal transfer mode (activated by on-chip peripheral module; i : b : p = 1: 1/2: 1/2; data transferred from on-chip peri pheral module to on-chip ram; transfer information is written in 3 cycles)
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 209 of 1560 mar 18, 2011 sh7080 group 8.5.10 dtc activation priority order in the case where multiple dtc activation requests are generated while the dtc is inactive, it is selectable whether the dtc starts transfer in the order of activation request generation or in the order of priority for dtc activation. this selection is made by the setting of the dtpr bit in the bus function extending register (bscehr). on the other hand, if multiple activation requests are generated while the dtc is active, transfer is performed according to the priority order for dtc activation. figure 8.17 shows an example of dtc activation accordin g to the priority. transfer is started for the request that is generated first transfer is performed according to the priority internal bus priority determination priority determination priority determination other than dtc dtc is inactive dtc is active dtc (request 3) dtc (request 1) dtc (request 2) other than dtc dtc (request 1) dtc (request 2) dtc (request 3) dtc activation request 1 (high priority) dtc activation request 1 (high priority) (1) dtpr = 0 dtc activation request 2 (medium priority) dtc activation request 2 (medium priority) dtc activation request 3 (low priority) dtc activation request 3 (low priority) transfer is performed according to the priority transfer is performed according to the priority internal bus dtc is inactive dtc is active (2) dtpr =1 figure 8.17 example of dtc activation in accordance with priority
section 8 data transfer controller (dtc) page 210 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 8.6 dtc activation by interrupt the procedure for using the dtc with interrupt activation is shown in figure 8.18. clearing the rrs bit in dtccr to 0 clears the read skip flag of transfer information. read skip is not performed when the dtc is activated after clearing the rrs bit. when updating transfer information, the rrs bit must be cleared. set the mra, mrb, sar, dar, cra, and crb transfer information in the data area. for details on setting transfer information, see section 8.2, register descriptions. for details on location of transfer information, see section 8.4, location of transfer information and dtc vector table. set the start address of the transfer information in the dtc vector table. for details on setting dtc vector table, see section 8.4, location of transfer information and dtc vector table. setting the rrs bit to 1 performs a read skip of second time or later transfer information when the dtc is activated consecu- tively by the same interrupt source. setting the rrs bit to 1 is always allowed. however, the value set during transfer will be valid from the next transfer. set the bit in dtcer corresponding to the dtc activation interrupt source to 1. for the correspondence of interrupts and dtcer, refer to table 8.2. the bit in dtcer may be set to 1 on the second or later transfer. in this case, setting the bit is not needed. set the enable bits for the interrupt sources to be used as the activation sources to 1. the dtc is activated when an interrupt used as an activation source is generated. for details on the settings of the interrupt enable bits, see the corresponding descriptions of the corresponding module. after the end of one data transfer, the dtc clears the activation source flag or clears the corresponding bit in dtcer and requests an interrupt to the cpu. the operation after transfer depends on the transfer information. for details, see section 8.2, register descriptions and figure 8.4. dtc activation by interrupt clear rrs bit in dtccr to 0 set transfer information (mra, mrb, sar, dar, cra, crb) set starts address of transfer information in dtc vector table set rrs bit in dtccr to 1 set corresponding bit in dtcer to 1 set enable bit of interrupt request for activation source to 1 interrupt request generated dtc activated corresponding bit in dtcer cleared or cpu interrupt requested transfer end [1] [2] [3] [4] [5] [6] [7] [1] [2] [3] [4] [5] [6] [7] determine clearing method of activation source clear activation source clear corresponding bit in dtcer figure 8.18 activation of dtc by interrupt
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 211 of 1560 mar 18, 2011 sh7080 group 8.7 examples of use of the dtc 8.7.1 normal transfer mode an example is shown in which the dtc is used to receive 128 bytes of data via the sci. 1. set mra to fixed source address (sm1 = sm0 = 0), incrementing destination address (dm1 = 1, dm0 = 0), normal transfer mode (md1 = md0 = 0), and byte size (sz1 = sz0 = 0). the dts bit can have any value. set mrb for one data transfer by one interrupt (chne = 0, disel = 0). set the rdr address of the sci in sar, the start address of the ram area where the data will be received in dar, and 128 (h'0080) in cra. crb can be set to any value. 2. set the start address of the transfer information for an rxi interrupt at the dtc vector address. 3. set the corresponding bit in dtcer to 1. 4. set the sci to the appropriate receive mode. se t the rie bit in scr to 1 to enable the receive end (rxi) interrupt. since the generation of a receive er ror during the sci reception operation will disable subsequent reception, the cpu should be enabled to accept receive error interrupts. 5. each time reception of one byte of data ends on the sci, the rdrf flag in ssr is set to 1, an rxi interrupt is generated, and the dtc is activated. the receive data is transferred from rdr to ram by the dtc. dar is incremented and cra is decremented. the rdrf flag is automatically cl eared to 0. 6. when cra becomes 0 after the 128 data transfers have ended, the rdrf flag is held at 1, the dtce bit is cleared to 0, and an rxi interrupt request is sent to the cpu. termination processing should be performed in the interrupt handling routine. 8.7.2 chain transfer when counter = 0 by executing a second data transfer and performing re-setting of the first data transfer only when the counter value is 0, it is possible to perform 256 or more repeat transfers. an example is shown in which a 128-kbyte input buffer is configured. the input buffer is assumed to have been set to start at lower address h'0000. figure 8.19 shows the chain transfer when the counter value is 0. 1. for the first transfer, set the normal transfer mode for input data. set the fixed transfer source address, cra = h'0000 (65,536 times), chne = 1, chns = 1, and disel = 0. 2. prepare the upper 8-bit addresses of the start addresses for 65,536-transfer units for the first data transfer in a separate area (in rom, etc.). for example, if the input buffer is configured at addresses h'200000 to h'21ffff, prepare h'21 and h'20.
section 8 data transfer controller (dtc) page 212 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 3. for the second transfer, set repeat transfer mode (with the source side as the repeat area) for re- setting the transfer destination address for the first data transfer. use the upper eight bits of dar in the first transfer information area as the transfer destination. set chne = disel = 0. if the above input buffer is specified as h'2000 00 to h'21ffff, set the tr ansfer counter to 2. 4. execute the first data transfer 65536 times by means of interrupts. when the transfer counter for the first data transfer reaches 0, the second data transfer is started. set the upper eight bits of the transfer destination address for the first data transfer to h'21. the lower 16 bits of the transfer destination address of the first data transfer and the transfer counter are h'0000. 5. next, execute the first data transfer the 6553 6 times specified for the first data transfer by means of interrupts. when the tr ansfer counter for the first data transfer reaches 0, the second data transfer is started. set the upper eight bits of the transfer destination address for the first data transfer to h'20. the lower 16 bits of the transfer destination address of the first data transfer and the transfer counter are h'0000. 6. steps 4 and 5 are repeated endlessly. as repeat mode is specified for the second data transfer, no interrupt request is sent to the cpu. 1st data transfer information 2nd data transfer information transfer information located on the on-chip memory chain transfer (counter = 0) input circuit input buffer upper 8 bits of dar figure 8.19 chain transfer when counter = 0
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 213 of 1560 mar 18, 2011 sh7080 group 8.8 interrupt sources an interrupt request is issued to the cpu when the dtc finishes the specified number of data transfers, or on completion of a single data transf er or a single block data transfer with the disel bit set to 1. in the case of interrupt activation, the interrupt set as the activation source is generated. these interrupts to the cpu are subject to cpu mask level and priority level control in the interrupt controller. for details, refer to section 6.8, data transfer with interrupt request signals. 8.9 usage notes 8.9.1 module standby mode setting operation of the dtc can be disabled or enab led using the standby control register. the initial setting is for operation of the dtc to be disabled. dtc operation is disabled in module standby mode but register access is available. module standby mode cannot be set while the dtc is activated. before entering software standby m ode or module standby mode, all dtcer registers must be cleared. for details, refer to section 26, power-down modes. 8.9.2 on-chip ram transfer information can be locat ed in on-chip ram. in this case, the rame bit in ramcr must not be cleared to 0. 8.9.3 dtce bit setting to set a dtce bit, disable the corresponding interrupt, read 0 from the bit, and then write 1 to it. while dtc transfer is in progress, do not modify the dtce bits. 8.9.4 chain transfer when chain transfer is used, clearing of the ac tivation source or dtcer is performed when the last of the chain of data transfer s is executed. sci, scif, ssu, i 2 c2, and a/d converter interrupt/activation sources, on the other hand, ar e cleared when the dtc reads or writes to the relevant register.
section 8 data transfer controller (dtc) page 214 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 8.9.5 transfer information start address, so urce address, and destination address the transfer information start addr ess to be specified in the vector table should be address 4n. transfer information should be placed in on-chip ram or external memory space. 8.9.6 access to dmac or dtc registers through dtc do not access the dmac or dtc registers by using dtc operation. do not access the dtc registers by using dmac operation. 8.9.7 notes on irq interrupt as dtc activation source ? the irq interrupt specified as a dtc activation source must not be used to cancel software standby mode. ? the irq edge input in software standby mode must not be specified as a dtc activation source. ? when a low level on the irq pin is to be detected, if the end of dtc transfer is used to request an interrupt to the cpu (transfer counter = 0 or disel = 1), the irq signal must be kept low until the cpu accepts the interrupt. 8.9.8 notes on sci and scif as dtc activation sources ? when the txi interrupt from the sci is specifi ed as a dtc activation source, the tend flag in the sci must not be used as the transfer end flag. ? when the txif interrupt from the scif is specified as a dtc activation source, the tend flag in the scif must not be used as the transfer end flag. 8.9.9 clearing interrupt source flag the interrupt source flag set when the dtc transfer is completed should be cleared in the interrupt handler in the same way as for general interrupt source flags. for details, refer to section 6.9, usage note.
section 8 data transfer controller (dtc) r01uh0198ej0500 rev. 5.00 page 215 of 1560 mar 18, 2011 sh7080 group 8.9.10 conflict between nmi interrupt and dtc activation when a conflict occurs between the generation of the nmi interrupt and the dtc activation, the nmi interrupt has priority. thus the err bit is set to 1 and the dtc is not activated. it takes 1 bcyc + 3 pcyc for determining dtc stop by nmi, 2 bcyc for determining dtc activation by irq, and 1 pcyc for determining dtc activation by peripheral modules. 8.9.11 operation when a dtc activation request is cancelled while in progress once the dtc has accepted an activation request , the dtc does not accept the next activation request until the sequence of dtc processing that ends with writeback has been completed.
section 8 data transfer controller (dtc) page 216 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 217 of 1560 mar 18, 2011 sh7080 group section 9 bus state controller (bsc) the bus state controller (bsc) outputs control signals for various types of memory that is connected to the external address space and extern al devices. bsc functions enable this lsi to connect directly with sram, sdram, and other memory storage devices, and external devices. 9.1 features 1. external address space ? a maximum 64 mbytes for each of eight areas, cs0 to cs7, and a maximum 1 gbyte for the cs8 area ? can specify the normal space interface, sram interface with byte selection, burst rom (clock synchronous or asynchronous), mpx-i/o, burst mpx-i/o, sdram, or pcmcia for each address space ? can select the data bus width (8, 16, or 32 bits) for each address space ? controls the insertion of the wait state for each address space. ? controls the insertion of the wait st ate for each read access and write access ? can set the independent idling cycle in the co ntinuous access for five cases: read-write (in same space/different space), read-read (in same space/different space), the first cycle is a write access. 2. normal space interface ? supports the interface that can di rectly connect to the sram 3. burst rom interface (clock asynchronous) ? high-speed access to the rom that has the page mode function 4. mpx-i/o interface ? directly connects peripheral lsis with address/data multiplexing 5. sdram interface ? can set the sdram up to 2 areas ? multiplex output for row address/column address ? efficient access by single read/single write ? high-speed access by bank-active mode ? supports an auto-refresh and self-refresh 6. sram interface with byte selection ? supports interfaces that can be connected directly to sram with byte selection
section 9 bus state controller (bsc) page 218 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 7. pcmcia direct interface ? supports the ic memory card and i/o card in terface defined in jeida specifications ver. 4.2 (pcmcia2.1 rev. 2.1) ? wait-cycle insertion controllable by program 8. burst mpx-i/o interface ? directly connects peripheral lsis with address/data multiplexing ? supports burst transfer 9. burst rom (clock synchronous) interface ? directly connects clock-synchronous burst rom 10. refresh function ? supports the auto-refresh and self-refresh functions ? specifies the refresh interval using the refresh counter and clock selection ? can execute concentrated refresh by specifying the refresh counts (1, 2, 4, 6, or 8) 11. usage as interval timer for refresh counter ? generates an interrupt request at compare match
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 219 of 1560 mar 18, 2011 sh7080 group figure 9.1 shows a block diagram of the bsc. cmncr cs0wcr cs8wcr cs0bcr cs8bcr sdcr rtcsr rtcnt rtcor comparator bus mastership controller wait controller area controller internal master module internal slave module inte rna l b us memory controller refresh controller interrupt controller [legend] mo dule bus bsc cs0 , cs1 , cs2 , cs3 , cs4 , cs5 , cs6 , cs7 , cs8 wait iois16 a29 to a0, d31 to d0 back breq bs , rdwr, rd , wrhh , wrhl , wrh , wrl , rasu , rasl , casu , casl , cke, dqmxx, ah , frame , ce1a , ce1b , ce2a , ce2b , iciord , iciowr , we cmncr: csnwcr: csnbcr: sdcr: rtcsr: rtcnt: rtcor: common control register csn space wait control register (n = 0 to 8) csn space bus control register (n = 0 to 8) sdram control register refresh timer control/status register refresh timer counter refresh time constant register . . . . . . . . . . . . . . . figure 9.1 block diagram of bsc
section 9 bus state controller (bsc) page 220 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.2 input/output pins the pin configuration of the bsc is listed in table 9.1. table 9.1 pin configuration name i/o function a29 to a0 output address bus d31 to d0 i/o data bus bs output bus cycle start asserted when a normal space, burst rom (clock synchronous or asynchronous), mpx-i/o, burst mpx-i/o, or pcmcia is accessed. when sdram is accessed, this signal is asserted at the same timing as cas . cs0 to cs8 output chip select ce1a output chip enable for pcmcia connected to area 5 ce2a output chip enable for pcmcia connected to area 5 ce1b output chip enable for pcmcia connected to area 6 ce2b output chip enable for pcmcia connected to area 6 rdwr output read/write connected to we pin when sdram or sram with byte selection is used. rd output read pulse signal (read data output enable signal) strobe signal for indicating memory read cycles when pcmcia is used. wrhh output indicates byte write through d31 to d24. connected to the byte select pin when sram with byte selection is used. wrhl output indicates byte write through d23 to d16. connected to the byte select pin when sram with byte selection is used. wrh output indicates byte write through d15 to d8. connected to the byte select pin when sram with byte selection is used. wrl output indicates byte write through d7 to d0. connected to the byte select pin when sram with byte selection is used.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 221 of 1560 mar 18, 2011 sh7080 group name i/o function rasu , rasl output connected to ras pin when sdram is used. casu , casl output connected to cas pin when sdram is used. cke output connected to cke pin when sdram is used. iois16 input indicates 16-bit i/o for pcmcia. this lsi does not support little endian and this pin must be held low. dqmuu dqmul dqmlu dqmll output connected to the dqmxx pins when sdram is used. dqmuu: d31 to d24 select signal dqmul: d23 to d16 select signal dqmlu: d15 to d8 select signal dqmll: d7 to d0 select signal ah output address hold signal when mpx-i/o is used frame output frame signal when burst mpx-i/o is used wait input external wait input breq input bus request input back output bus acknowledge output iciowr output i/o write strobe signal when pcmcia is used iciord output i/o read strobe signal when pcmcia is used we output strobe signal for indicating memory write cycles when pcmcia is used
section 9 bus state controller (bsc) page 222 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.3 area overview 9.3.1 area division in the architecture, this lsi has 32-bit address spaces. as listed in tables 9.2 to 9.15, this lsi can c onnect nine areas to each type of memory, and it outputs chip select signals ( cs0 to cs8 ) for each of them. cs0 is asserted during area 0 access. in access to sdram connected to areas 2 and 3, signals such as rasx , casx , rd/ wr , and dqmxx will be asserted. furthermore, when the pc mcia interface is selected in areas 5 and 6, ce1a , ce1b , ce2a , and ce2b as well as cs5 and cs6 are asserted, according to the bytes to be accessed. 9.3.2 address map the external address space has a capacity of 1.5 gb ytes and is used by dividing into 9 spaces. the memory to be connected and the data bus width are specified in each space. the address map for the entire address space is liste d in tables 9.2 to 9.15. table 9.2 address map: sh7083 (256-kbyte flash memory version) in on-chip rom- enabled mode address area memory type capacity bus width h'00000000 to h'0003ffff on-chip rom 256 kbytes 32 bits h'00040000 to h'01ffffff reserved h'02000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 32 mbytes 8 or 16 bits * h'04000000 to h'0bffffff reserved h'0c000000 to h'0dffffff cs3 space normal space sram with byte selection sdram 32 mbytes 8 or 16 bits *
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 223 of 1560 mar 18, 2011 sh7080 group address area memory type capacity bus width h'0e000000 to h'1bffffff reserved h'1c000000 to h'1dffffff cs7 space normal space sram with byte selection 32 mbytes 8 or 16 bits * h'1e000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff7fff reserved h'ffff8000 to h'ffffbfff on-chip ram 16 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. in single-chip mode, only the on-chip rom, on-chip ram, and on- chip peripheral modules can be accessed; the other areas cannot be accessed. * the bus width is selected by the register setting. table 9.3 address map: sh7083 (256-kbyte flash memory version) in on-chip rom- disabled mode address area memory type capacity bus width h'00000000 to h'01ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 32 mbytes 8 or 16 bits * 1 h'02000000 to h'0bffffff reserved h'0c000000 to h'0dffffff cs3 space normal space sram with byte selection sdram 32 mbytes 8 or 16 bits * 2 h'0e000000 to h'1bffffff reserved
section 9 bus state controller (bsc) page 224 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group address area memory type capacity bus width h'1c000000 to h'1dffffff cs7 space normal space sram with byte selection 32 mbytes 8 or 16 bits * 2 h'1e000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff7fff reserved h'ffff8000 to h'ffffbfff on-chip ram 16 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. 1. the bus width is selected by the mode pins. 2. the bus width is selected by the register setting. table 9.4 address map: sh7083 (512-kbyte flash memory version) in on-chip rom- enabled mode address area memory type capacity bus width h'00000000 to h'0007ffff on-chip rom 512 kbytes 32 bits h'00080000 to h'01ffffff reserved h'02000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 32 mbytes 8 or 16 bits * h'04000000 to h'0bffffff reserved h'0c000000 to h'0dffffff cs3 space normal space sram with byte selection sdram 32 mbytes 8 or 16 bits *
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 225 of 1560 mar 18, 2011 sh7080 group address area memory type capacity bus width h'0e000000 to h'1bffffff reserved h'1c000000 to h'1dffffff cs7 space normal space sram with byte selection 32 mbytes 8 or 16 bits * h'1e000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff3fff reserved h'ffff4000 to h'ffffbfff on-chip ram 32 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. in single-chip mode, only the on-chip rom, on-chip ram, and on- chip peripheral modules can be accessed; the other areas cannot be accessed. * the bus width is selected by the register setting. table 9.5 address map: sh7083 (512-kbyte flash memory version) in on-chip rom- disabled mode address area memory type capacity bus width h'00000000 to h'01ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 32 mbytes 8 or 16 bits * 1 h'02000000 to h'0bffffff reserved h'0c000000 to h'0dffffff cs3 space normal space sram with byte selection sdram 32 mbytes 8 or 16 bits * 2 h'0e000000 to h'1bffffff reserved
section 9 bus state controller (bsc) page 226 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group address area memory type capacity bus width h'1c000000 to h'1dffffff cs7 space normal space sram with byte selection 32 mbytes 8 or 16 bits * 2 h'1e000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff3fff reserved h'ffff4000 to h'ffffbfff on-chip ram 32 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. 1. the bus width is selected by the mode pins. 2. the bus width is selected by the register setting. table 9.6 address map: sh7084 (256-kbyte flash memory version) in on-chip rom- enabled mode address area memory type capacity bus width h'00000000 to h'0003ffff on-chip rom 256 kbytes 32 bits h'00040000 to h'01ffffff reserved h'02000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 32 mbytes 8 or 16 bits * h'04000000 to h'07ffffff cs1 space normal space sram with byte selection 64 mbytes 8 or 16 bits * h'08000000 to h'0bffffff cs2 space normal space sram with byte selection sdram 64 mbytes 8 or 16 bits *
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 227 of 1560 mar 18, 2011 sh7080 group address area memory type capacity bus width h'0c000000 to h'0fffffff cs3 space normal space sram with byte selection sdram 64 mbytes 8 or 16 bits * h'10000000 to h'13ffffff cs4 space normal space sram with byte selection burst rom (asynchronous) 64 mbytes 8 or 16 bits * h'14000000 to h'17ffffff cs5 space normal space sram with byte selection mpx-i/o 64 mbytes 8 or 16 bits * h'18000000 to h'1bffffff cs6 space normal space sram with byte selection 64 mbytes 8 or 16 bits * h'1c000000 to h'1fffffff cs7 space normal space sram with byte selection 64 mbytes 8 or 16 bits * h'20000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff7fff reserved h'ffff8000 to h'ffffbfff on-chip ram 16 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. in single-chip mode, only the on-chip rom, on-chip ram, and on- chip peripheral modules can be accessed; the other areas cannot be accessed. * the bus width is selected by the register setting.
section 9 bus state controller (bsc) page 228 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.7 address map: sh7084 (256-kbyte flash memory version) in on-chip rom- disabled mode address area memory type capacity bus width h'00000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 64 mbytes 8 or 16 bits * 1 h'04000000 to h'07ffffff cs1 space normal space sram with byte selection 64 mbytes 8 or 16 bits * 2 h'08000000 to h'0bffffff cs2 space normal space sram with byte selection sdram 64 mbytes 8 or 16 bits * 2 h'0c000000 to h'0fffffff cs3 space normal space sram with byte selection sdram 64 mbytes 8 or 16 bits * 2 h'10000000 to h'13ffffff cs4 space normal space sram with byte selection burst rom (asynchronous) 64 mbytes 8 or 16 bits * 2 h'14000000 to h'17ffffff cs5 space normal space sram with byte selection mpx-i/o 64 mbytes 8 or 16 bits * 2 h'18000000 to h'1bffffff cs6 space normal space sram with byte selection 64 mbytes 8 or 16 bits * 2 h'1c000000 to h'1fffffff cs7 space normal space sram with byte selection 64 mbytes 8 or 16 bits * 2 h'20000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff7fff reserved
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 229 of 1560 mar 18, 2011 sh7080 group address area memory type capacity bus width h'ffff8000 to h'ffffbfff on-chip ram 16 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. 1. the bus width is selected by the mode pins. 2. the bus width is selected by the register setting. table 9.8 address map: sh7084 (512-kbyte flash memory version) in on-chip rom- enabled mode address area memory type capacity bus width h'00000000 to h'0007ffff on-chip rom 512 kbytes 32 bits h'00080000 to h'01ffffff reserved h'02000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 32 mbytes 8 or 16 bits * h'04000000 to h'07ffffff cs1 space normal space sram with byte selection 64 mbytes 8 or 16 bits * h'08000000 to h'0bffffff cs2 space normal space sram with byte selection sdram 64 mbytes 8 or 16 bits * h'0c000000 to h'0fffffff cs3 space normal space sram with byte selection sdram 64 mbytes 8 or 16 bits * h'10000000 to h'13ffffff cs4 space normal space sram with byte selection burst rom (asynchronous) 64 mbytes 8 or 16 bits *
section 9 bus state controller (bsc) page 230 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group address area memory type capacity bus width h'14000000 to h'17ffffff cs5 space normal space sram with byte selection mpx-i/o 64 mbytes 8 or 16 bits * h'18000000 to h'1bffffff cs6 space normal space sram with byte selection 64 mbytes 8 or 16 bits * h'1c000000 to h'1fffffff cs7 space normal space sram with byte selection 64 mbytes 8 or 16 bits * h'20000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff3fff reserved h'ffff4000 to h'ffffbfff on-chip ram 32 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. in single-chip mode, only the on-chip rom, on-chip ram, and on- chip peripheral modules can be accessed; the other areas cannot be accessed. * the bus width is selected by the register setting. table 9.9 address map: sh7084 (512-kbyte flash memory version) in on-chip rom- disabled mode address area memory type capacity bus width h'00000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 64 mbytes 8 or 16 bits * 1 h'04000000 to h'07ffffff cs1 space normal space sram with byte selection 64 mbytes 8 or 16 bits * 2
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 231 of 1560 mar 18, 2011 sh7080 group address area memory type capacity bus width h'08000000 to h'0bffffff cs2 space normal space sram with byte selection sdram 64 mbytes 8 or 16 bits * 2 h'0c000000 to h'0fffffff cs3 space normal space sram with byte selection sdram 64 mbytes 8 or 16 bits * 2 h'10000000 to h'13ffffff cs4 space normal space sram with byte selection burst rom (asynchronous) 64 mbytes 8 or 16 bits * 2 h'14000000 to h'17ffffff cs5 space normal space sram with byte selection mpx-i/o 64 mbytes 8 or 16 bits * 2 h'18000000 to h'1bffffff cs6 space normal space sram with byte selection 64 mbytes 8 or 16 bits * 2 h'1c000000 to h'1fffffff cs7 space normal space sram with byte selection 64 mbytes 8 or 16 bits * 2 h'20000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff3fff reserved h'ffff4000 to h'ffffbfff on-chip ram 32 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. 1. the bus width is selected by the mode pins. 2. the bus width is selected by the register setting.
section 9 bus state controller (bsc) page 232 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.10 address map: sh7085 (256-kbyte flash memory version) in on-chip rom- enabled mode address area memory type capacity bus width h'00000000 to h'0003ffff on-chip rom 256 kbytes 32 bits h'00040000 to h'01ffffff reserved h'02000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 32 mbytes 8, 16, or 32 bits * h'04000000 to h'07ffffff cs1 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * h'08000000 to h'0bffffff cs2 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * h'0c000000 to h'0fffffff cs3 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * h'10000000 to h'13ffffff cs4 space normal space sram with byte selection burst rom (asynchronous) 64 mbytes 8, 16, or 32 bits * h'14000000 to h'17ffffff cs5 space normal space sram with byte selection pcmcia mpx-i/o 64 mbytes 8, 16, or 32 bits * h'18000000 to h'1bffffff cs6 space normal space sram with byte selection pcmcia burst mpx-i/o 64 mbytes 8, 16, or 32 bits * h'1c000000 to h'1fffffff cs7 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * h'20000000 to h'fff7ffff reserved
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 233 of 1560 mar 18, 2011 sh7080 group address area memory type capacity bus width h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff7fff reserved h'ffff8000 to h'ffffbfff on-chip ram 16 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. in single-chip mode, only the on-chip rom, on-chip ram, and on- chip peripheral modules can be accessed; the other areas cannot be accessed. * the bus width is selected by the register setting. table 9.11 address map: sh7085 (256-kbyte flash memory version) in on-chip rom- disabled mode address area memory type capacity bus width h'00000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 64 mbytes 16 or 32 bits * 1 h'04000000 to h'07ffffff cs1 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * 2 h'08000000 to h'0bffffff cs2 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * 2 h'0c000000 to h'0fffffff cs3 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * 2 h'10000000 to h'13ffffff cs4 space normal space sram with byte selection burst rom (asynchronous) 64 mbytes 8, 16, or 32 bits * 2
section 9 bus state controller (bsc) page 234 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group address area memory type capacity bus width h'14000000 to h'17ffffff cs5 space normal space sram with byte selection pcmcia mpx-i/o 64 mbytes 8, 16, or 32 bits * 2 h'18000000 to h'1bffffff cs6 space normal space sram with byte selection pcmcia burst mpx-i/o 64 mbytes 8, 16, or 32 bits * 2 h'1c000000 to h'1fffffff cs7 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * 2 h'20000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff7fff reserved h'ffff8000 to h'ffffbfff on-chip ram 16 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. 1. the bus width is selected by the mode pins. 2. the bus width is selected by the register setting. table 9.12 address map: sh7085 (512-kbyte flash memory version) in on-chip rom- enabled mode address area memory type capacity bus width h'00000000 to h'0007ffff on-chip rom 512 kbytes 32 bits h'00080000 to h'01ffffff reserved
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 235 of 1560 mar 18, 2011 sh7080 group address area memory type capacity bus width h'02000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 32 mbytes 8, 16, or 32 bits * h'04000000 to h'07ffffff cs1 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * h'08000000 to h'0bffffff cs2 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * h'0c000000 to h'0fffffff cs3 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * h'10000000 to h'13ffffff cs4 space normal space sram with byte selection burst rom (asynchronous) 64 mbytes 8, 16, or 32 bits * h'14000000 to h'17ffffff cs5 space normal space sram with byte selection pcmcia mpx-i/o 64 mbytes 8, 16, or 32 bits * h'18000000 to h'1bffffff cs6 space normal space sram with byte selection pcmcia burst mpx-i/o 64 mbytes 8, 16, or 32 bits * h'1c000000 to h'1fffffff cs7 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * h'20000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff3fff reserved
section 9 bus state controller (bsc) page 236 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group address area memory type capacity bus width h'ffff4000 to h'ffffbfff on-chip ram 32 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. in single-chip mode, only the on-chip rom, on-chip ram, and on- chip peripheral modules can be accessed; the other areas cannot be accessed. * the bus width is selected by the register setting. table 9.13 address map: sh7085 (512-kbyte flash memory version) in on-chip rom- disabled mode address area memory type capacity bus width h'00000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 64 mbytes 16 or 32 bits * 1 h'04000000 to h'07ffffff cs1 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * 2 h'08000000 to h'0bffffff cs2 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * 2 h'0c000000 to h'0fffffff cs3 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * 2 h'10000000 to h'13ffffff cs4 space normal space sram with byte selection burst rom (asynchronous) 64 mbytes 8, 16, or 32 bits * 2 h'14000000 to h'17ffffff cs5 space normal space sram with byte selection pcmcia mpx-i/o 64 mbytes 8, 16, or 32 bits * 2
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 237 of 1560 mar 18, 2011 sh7080 group address area memory type capacity bus width h'18000000 to h'1bffffff cs6 space normal space sram with byte selection pcmcia burst mpx-i/o 64 mbytes 8, 16, or 32 bits * 2 h'1c000000 to h'1fffffff cs7 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * 2 h'20000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff3fff reserved h'ffff4000 to h'ffffbfff on-chip ram 32 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. 1. the bus width is selected by the mode pins. 2. the bus width is selected by the register setting. table 9.14 address map: sh7086 in on-chip rom-enabled mode address area memory type capacity bus width h'00000000 to h'0007ffff on-chip rom 512 kbytes 32 bits h'00080000 to h'01ffffff reserved h'02000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 32 mbytes 8, 16, or 32 bits * h'04000000 to h'07ffffff cs1 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits *
section 9 bus state controller (bsc) page 238 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group address area memory type capacity bus width h'08000000 to h'0bffffff cs2 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * h'0c000000 to h'0fffffff cs3 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * h'10000000 to h'13ffffff cs4 space normal space sram with byte selection burst rom (asynchronous) 64 mbytes 8, 16, or 32 bits * h'14000000 to h'17ffffff cs5 space normal space sram with byte selection pcmcia mpx-i/o 64 mbytes 8, 16, or 32 bits * h'18000000 to h'1bffffff cs6 space normal space sram with byte selection pcmcia burst mpx-i/o 64 mbytes 8, 16, or 32 bits * h'1c000000 to h'1fffffff cs7 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * h'20000000 to h'3fffffff reserved h'40000000 to h'7fffffff cs8 space normal space sram with byte selection 1 gbyte 8, 16, or 32 bits * h'80000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff3fff reserved
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 239 of 1560 mar 18, 2011 sh7080 group address area memory type capacity bus width h'ffff4000 to h'ffffbfff on-chip ram 32 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. in single-chip mode, only the on-chip rom, on-chip ram, and on- chip peripheral modules can be accessed; the other areas cannot be accessed. * the bus width is selected by the register setting. table 9.15 address map: sh7086 in on-chip rom-disabled mode address area memory type capacity bus width h'00000000 to h'03ffffff cs0 space normal space sram with byte selection burst rom (asynchronous) burst rom (synchronous) 64 mbytes 16 or 32 bits * 1 h'04000000 to h'07ffffff cs1 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * 2 h'08000000 to h'0bffffff cs2 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * 2 h'0c000000 to h'0fffffff cs3 space normal space sram with byte selection sdram 64 mbytes 8, 16, or 32 bits * 2 h'10000000 to h'13ffffff cs4 space normal space sram with byte selection burst rom (asynchronous) 64 mbytes 8, 16, or 32 bits * 2 h'14000000 to h'17ffffff cs5 space normal space sram with byte selection pcmcia mpx-i/o 64 mbytes 8, 16, or 32 bits * 2
section 9 bus state controller (bsc) page 240 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group address area memory type capacity bus width h'18000000 to h'1bffffff cs6 space normal space sram with byte selection pcmcia burst mpx-i/o 64 mbytes 8, 16, or 32 bits * 2 h'1c000000 to h'1fffffff cs7 space normal space sram with byte selection 64 mbytes 8, 16, or 32 bits * 2 h'20000000 to h'3fffffff reserved h'40000000 to h'7fffffff cs8 space normal space sram with byte selection 1 gbyte 8, 16, or 32 bits * 2 h'80000000 to h'fff7ffff reserved h'fff80000 to h'fff9ffff sdram mode setting space h'fffa0000 to h'ffff3fff reserved h'ffff4000 to h'ffffbfff on-chip ram 32 kbytes 32 bits h'ffffc000 to h'ffffffff on-chip peripheral modules 16 kbytes 8 or 16 bits notes: do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. 1. the bus width is selected by the mode pins. 2. the bus width is selected by the register setting.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 241 of 1560 mar 18, 2011 sh7080 group 9.4 register descriptions the bsc has the following registers. refer to section 27, list of registers, for details on the register addresses and register states in each operating mode. do not access spaces other than cs0 until the termination of the memory interface setting. table 9.16 register configuration register name abbrevia- tion r/w initial value address access size common control register cmncr r/w h'00001010 h'fffff000 32 cs0 space bus control register cs0bcr r/w h'36db0600 h'fffff004 32 cs1 space bus control register cs1bcr r/w h'36db0600 h'fffff008 32 cs2 space bus control register cs2bcr r/w h'36db0600 h'fffff00c 32 cs3 space bus control register cs3bcr r/w h'36db0600 h'fffff010 32 cs4 space bus control register cs4bcr r/w h'36db0600 h'fffff014 32 cs5 space bus control register cs5bcr r/w h'36db0600 h'fffff018 32 cs6 space bus control register cs6bcr r/w h'36db0600 h'fffff01c 32 cs7 space bus control register cs7bcr r/w h'36db0600 h'fffff020 32 cs8 space bus control register cs8bcr r/w h'36db0600 h'fffff024 32 cs0 space wait control register cs0wcr r/w h'00000500 h'fffff028 32 cs1 space wait control register cs1wcr r/w h'00000500 h'fffff02c 32 cs2 space wait control register cs2wcr r/w h'00000500 h'fffff030 32 cs3 space wait control register cs3wcr r/w h'00000500 h'fffff034 32 cs4 space wait control register cs4wcr r/w h'00000500 h'fffff038 32 cs5 space wait control register cs5wcr r/w h'00000500 h'fffff03c 32 cs6 space wait control register cs6wcr r/w h'00000500 h'fffff040 32 cs7 space wait control register cs7wcr r/w h'00000500 h'fffff044 32 cs8 space wait control register cs8wcr r/w h'00000500 h'fffff048 32 sdram control register sdcr r/w h'00000000 h'fffff04c 32 refresh timer control/status register rtcsr r/w h'00000000 h'fffff050 32 refresh timer counter rtcnt r/w h'00000000 h'fffff054 32 refresh time constant register rtcor r/w h'00000000 h'fffff058 32 bus function extending register bscehr r/w h'0000 h'ffffe89a 8,16
section 9 bus state controller (bsc) page 242 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.4.1 common control register (cmncr) cmncr is a 32-bit register that cont rols the common items for each area. do not access external memory other than area 0 until the register initialization is complete. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr 0001000000010000 rrrrrrrrr/wr/wr/wrrrr/wr/w ---------------- - - - - - - - - dmaiw[1:0] dmaiwa --- hizmem hizcnt bit bit name initial value r/w description 31 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 ? 1 r reserved this bit is always read as 1. the write value should always be 1. 11 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7, 6 dmaiw[1:0] 00 r/w wait specification between access cycles during dma single address transfer specify the number of idle cycles to be inserted after data is output from an external device with dack when dma single address transfer is performed. the method of inserting idle cycles depends on the setting in the dmaiwa bit described later. 00: no idle cycle inserted 01: 1 idle cycle inserted 10: 2 idle cycles inserted 11: 4 idle cycled inserted
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 243 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 dmaiwa 0 r/w specification for method of inserting wait states between access cycles during dma single address transfer specifies the method of inserting the idle cycles specified by the dmaiw1 and dmaiw0 bits. clearing this bit will make this lsi insert the idle cycles when another device, which includes this lsi, drives the data bus after an external device with dack drove it. when the external device with dack drives the data bus continuously, idle cycles are not inserted. setting this bit will make this lsi insert the idle cycles after one access is completed even when the continuous accesses to an external device with dack are performed. 0: idle cycles are inserted when another device drives data bus after external device with dack drives data bus 1: idle cycles are always inserted after external device with dack is accessed. 4 ? 1 r reserved this bit is always read as 1. the write value should always be 1. 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 hizmem 0 r/w hi-z memory control specifies the pin state in software standby mode for a29 to a0, bs , csn , rdwr, wrxx , rd , ah , frame , iciord , iciowr , we , ce1a , ce1b , ce2a , and ce2b . while the bus is released, these pins are in high- impedance state regardless of this bit setting. 0: high impedance in software standby mode 1: driven in software standby mode
section 9 bus state controller (bsc) page 244 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 hizcnt 0 r/w hi-z control specifies the state in software standby mode and when bus mastership is released for cke, rasu , rasl , casu , and casl . 0: high impedance in software standby mode and when bus mastership is released for cke, rasu , rasl , casu , and casl . 1: driven in software standby mode and when bus mastership is released for cke, rasu , rasl , casu , and casl . 9.4.2 csn space bus control register (csnbcr) (n = 0 to 8) csnbcr is a 32-bit readable/writable register that specifies the type of memory connected to the respective space, the data bus width of the space, and the number of wait cycles between access cycles. do not access external memory other than area 0 until the register initialization is complete. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 000 r/w r/w r/w 0011011011011011 r r r/w r/w r r/w r/w r r/w r/w r r/w r/w r r/w r/w 001 * 1 * 000000000 r rr/wr/wrrrrrrrrr note: when the on-chip rom is disabled, cs0bcr samples the value input through the md0 and md1 external pins that specify the bus width when a power-on reset is performed. * type[2:0] - - iww[1:0] - iwrwd[1:0] - iwrws[1:0] - iwrrd[1:0] - iwrrs[1:0] - - bsz[1:0] - - - - - - - - - bit bit name initial value r/w description 31, 30 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 245 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 29, 28 iww[1:0] 11 r/w specification for idle cycles between write-read/write- write cycles specify the number of idle cycles to be inserted after access to memory that is connected to the space. the target cycles are write-read cycles and write-write cycles. 00: no idle cycle inserted 01: 1 idle cycle inserted 10: 2 idle cycles inserted 11: 4 idle cycles inserted 27 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 26, 25 iwrwd[1:0] 11 r/w specification for idle cycles between read-write cycles in different spaces specify the number of idle cycles to be inserted after access to memory that is connected to the space. the target cycles are continuous read-write cycles in different spaces. 00: no idle cycle inserted 01: 1 idle cycle inserted 10: 2 idle cycles inserted 11: 4 idle cycles inserted 24 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 23, 22 iwrws[1:0] 11 r/w specification for idle cycles between read-write cycles in the same space specify the number of idle cycles to be inserted after access to memory that is connected to the space. the target cycles are continuous read-write cycles in the same space. 00: no idle cycle inserted 01: 1 idle cycle inserted 10: 2 idle cycles inserted 11: 4 idle cycles inserted
section 9 bus state controller (bsc) page 246 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 21 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 20, 19 iwrrd[1:0] 11 r/w specification for idle cycles between read-read cycles in different spaces specify the number of idle cycles to be inserted after access to memory that is connected to the space. the target cycles are continuous read-read cycles in different spaces. 00: no idle cycle inserted 01: 1 idle cycle inserted 10: 2 idle cycles inserted 11: 4 idle cycles inserted 18 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 17, 16 iwrrs[1:0] 11 r/w specification for idle cycles between read-read cycles in the same space specify the number of idle cycles to be inserted after access to memory that is connected to the space. the target cycles are continuous read-read cycles in the same space. 00: no idle cycle inserted 01: 1 idle cycle inserted 10: 2 idle cycles inserted 11: 4 idle cycles inserted 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 247 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 to 12 type[2:0] 000 r/w memory type specification specify the type of memory connected to the space. 000: normal space 001: burst rom (clock asynchronous) 010: mpx-i/o 011: sram with byte selection 100: sdram 101: pcmcia 110: burst mpx-i/o 111: burst rom (clock synchronous) for the memory type for each area, see tables 9.2 to 9.15. notes: 1. when burst mpx-i/o is selected for area 6, do not set areas 2 and 3 for sdram space. 2. sdram can be selected only for areas 2 and 3. if the sdram is only to be connected in one area, select area 3 as the sdram space. in this case, specify area 2 as normal space or sram with byte selection. 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) page 248 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10, 9 bsz[1:0] 11 * r/w data bus size specification specify the data bus sizes of spaces. 00: setting prohibited 01: 8-bit size 10: 16-bit size 11: 32-bit size bus width determined by the address when mpx-i/o is used notes: 1. when mpx-i/o is selected for area 5, setting these bits to 11 enables the bus width (8 bits or 16 bits) to be determined by the address according to the szsel bit setting in cs5wcr. 2. when the on-chip rom is disabled, the data bus width in area 0 is specified through external input pins. the bsz1 and bsz0 bit setting in cs0bcr is ignored. 3. when burst mpx-i/o is selected for area 6, only 32-bit size can be selected for the bus width. 4. when pcmcia is selected for area 5 or 6, 8- bit or 16-bit size can be selected for the bus width. 5. when sdram is selected for area 2 or 3, 16-bit or 32-bit size can be selected for the bus width. 8 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. note: * when the on-chip rom is disabled, cs0bcr samples the value input through the md0 and md1 external pins that specify the bus width when a power-on reset is performed.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 249 of 1560 mar 18, 2011 sh7080 group 9.4.3 csn space wait control register (csnwcr) (n = 0 to 8) csnwcr specifies various wait cycles for memory accesses. the bit configuration of this register varies as shown below according to the memory t ype (type 2, type 1, or type 0) specified by the csn space bus control register (csnbcr). sp ecify csnwcr before accessing the target area. csnwcr should be modified only after csnbcr setting is completed. (1) normal space, sram with byte selection ? cs0wcr, cs1wcr, cs2wcr, cs3wcr, cs4wcr, cs5wcr, cs6wcr, cs7wcr, cs8wcr bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrrr/wrr/wr/wr/w 0000010100000000 r r r r/w r/w r/w r/w r/w r/w r/w r r r r r/w r/w -----------bas- ww [2:0] - - - sw[1:0] wr[3:0] wm - - - - hw[1:0] bit bit name initial value r/w description 31 to 21 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 20 bas 0 r/w byte access selection when sram with byte selection is used specifies the wrxx and rdwr signal timing when sram interface with byte selection is used. 0: asserts the wrxx signal at the read/write timing and asserts the rdwr signal during the write access cycle. 1: asserts the wrxx signal during the read/write access cycle and asserts the rdwr signal at the write timing. 19 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) page 250 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 18 to 16 ww[2:0] 000 r/w number of wait cycles in write access specify the number of cycles required for write access. 000: the same cycles as wr3 to wr0 settings (read access wait) 001: 0 cycles 010: 1 cycle 011: 2 cycles 100: 3 cycles 101: 4 cycles 110: 5 cycles 111: 6 cycles 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12, 11 sw[1:0] 00 r/w number of delay cycles from address and csn assertion to rd and wrxx assertion specify the number of delay cycles from address and csn assertion to rd and wrxx assertion. 00: 0.5 cycle 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 251 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 to 7 wr[3:0] 1010 r/w number of read access wait cycles specify the number of wait cycles required for read access. 0000: 0 cycles 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited) 6 wm 0 r/w external wait mask specification specifies whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycles is 0. 0: external wait input is valid 1: external wait input is ignored 5 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) page 252 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1, 0 hw[1:0] 00 r/w delay cycles from rd and wrxx negation to address and csn negation specify the number of delay cycles from rd and wrxx negation to address and csn negation. 00: 0.5 cycle 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles (2) mpx-i/o ? cs5wcr bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrr/wr/wrr/wr/wr/w 0000010100000000 r r r r/w r/w r/w r/w r/w r/w r/w r r r r r/w r/w ---------- szsel mpxw - ww[2:0] - - - sw[1:0] wr[3:0] wm - - - - hw[1:0] bit bit name initial value r/w description 31 to 22 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 253 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description mpx-i/o interface bus width specification specifies the address bit to select the bus width when the bsz1 and bsz0 bits in cs5bcr are set to 11. this setting is valid only when mpx-i/o is selected for area 5. 0: address a14 selects the bus width 1: address a21 selects the bus width the following shows bus width selection through the szsel bit and a14 or a21. szsel a14 a21 bus width 0 0 no effect 8 bits 0 1 no effect 16 bits 1 no effect 0 8 bits 1 no effect 1 16 bits 21 szsel 0 r/w 20 mpxw 0 r/w mpx-i/o interface address wait this setting is valid only when mpx-i/o is selected for area 5. this bit specifies insertion of a wait cycle into the address cycle in mpx-i/o interface. 0: no wait 1: inserts one wait cycle 19 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) page 254 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 18 to 16 ww[2:0] 000 r/w number of wait cycles in write access specify the number of cycles required for write access. 000: the same cycles as wr3 to wr0 settings (read access wait) 001: 0 cycles 010: 1 cycle 011: 2 cycles 100: 3 cycles 101: 4 cycles 110: 5 cycles 111: 6 cycles 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12, 11 sw[1:0] 00 r/w number of delay cycles from address and csn assertion to rd and wrxx assertion specify the number of delay cycles from address and csn assertion to rd and wrxx assertion. 00: 0.5 cycle 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 255 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 to 7 wr[3:0] 1010 r/w number of wait cycles in read access specify the number of wait cycles required for read access. 0000: 0 cycles 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited) 6 wm 0 r/w external wait mask specification specifies whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycles is 0. 0: external wait is valid 1: external wait is ignored 5 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) page 256 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1, 0 hw[1:0] 00 r/w delay cycles from rd and wrxx negation to address and csn negation specify the number of delay cycles from rd and wrxx negation to address and csn negation. 00: 0.5 cycle 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles (3) burst rom (asynchronous) ? cs0wcr, cs4wcr bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrrr/wrrr/wr/w 0000010100000000 r r r r/w r/w r/w r/w r/w r/w r/w r r r r r/w r/w -----------ben-- bw[1:0] - - - sw[1:0] w[3:0] wm - - - - hw[1:0] bit bit name initial value r/w description 31 to 21 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 257 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 20 ben 0 r/w burst enable specification enables or disables 8-burst access to the 16-bit bus and 16-burst access to the 8-bit bus when 16-byte access is required. when this bit is cleared to 0, 2-burst access is performed four times for the 16-bit bus or 4- burst access is performed four times for the 8-bit bus. when using a device that does not support 8-burst and 16-burst access, set this bit to 1. 0: enables 8-burst access to the 16-bit bus and 16- burst access to the 8-bit bus 1: disables 8-burst access to the 16-bit bus and 16- burst access to the 8-bit bus 19, 18 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 17, 16 bw[1:0] 00 r/w number of burst wait cycles specify the number of wait cycles to be inserted between the second or subsequent access cycles in burst access. 00: 0 cycles 01: 1 cycle 10: 2 cycles 11: 3 cycles 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12, 11 sw[1:0] 00 r/w number of delay cycles from address and csn assertion to rd and wrxx assertion specify the number of delay cycles from address and csn assertion to rd and wrxx assertion. 00: 0.5 cycle 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 9 bus state controller (bsc) page 258 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 to 7 w[3:0] 1010 r/w number of access wait cycles specify the number of wait cycles to be inserted in the first access cycles. 0000: 0 cycles 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited) 6 wm 0 r/w external wait mask specification specifies whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycles is 0. 0: external wait input is valid 1: external wait input is ignored 5 to 2 ? all 0 r reserved these bit are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 259 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1, 0 hw[1:0] 00 r/w delay cycles from rd and wrxx negation to address and csn negation specify the number of delay cycles from rd and wrxx negation to address and csn negation. 00: 0.5 cycle 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles (4) sdram when sdram is selected in areas 2 and 3, the wtrp1/0, wtrcd0/1, trwl1/0, and wtrc1/0 bit settings are effective in both areas in common. when sdram should be connected to only one area, select area 3 for sdram connection. in this case, the normal space or sram with byte selection must be selected for area 2. ? cs2wcr bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr 0000010100000000 rrrrrrrr/wr/wrrrrrrr ---------------- - - - - - - - a2cl[1:0] - - - - - - - bit bit name initial value r/w description 31 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 ? 1 r reserved this bit is always read as 1. the write value should always be 1.
section 9 bus state controller (bsc) page 260 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 8, 7 a2cl[1:0] 10 r/w cas latency for area 2 specify the cas latency for area 2. 00: 1 cycle 01: 2 cycles 10: 3 cycles 11: 4 cycles 6 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? cs3wcr bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr 0000010100000000 r r/w r/w r r/w r/w r r/w r/w r r r/w r/w r r/w r/w ---------------- - wtrp[1:0] - wtrcd[1:0] - a3cl[1:0] - - trwl[1:0] - wtrc[1:0] bit bit name initial value r/w description 31 to 15 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 261 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14, 13 wtrp[1:0] 00 r/w number of wait cycles for precharge completion specify the number of minimum wait cycles to be inserted for completion of precharge. ? from activation of auto precharge to actv command issuance for the same bank. ? from issuance of pre/pall command to actv command issuance for the same bank. ? from pall command issuance to ref command issuance in auto refresh. ? from pall command issuance to self command issuance in self-refresh. the setting for areas 2 and 3 is common. 00: 0 cycle (no wait cycles) 01: 1 cycle 10: 2 cycles 11: 3 cycles 12 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 11, 10 wtrcd [1:0] 01 r/w number of wait cycles from actv command to read(a)/writ(a) command specify the number of minimum wait cycles from issuing actv command to issuing read(a)/writ(a) command. the setting for areas 2 and 3 is common. 00: 0 cycle (no wait cycles) 01: 1 cycle 10: 2 cycles 11: 3 cycles 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) page 262 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 8, 7 a3cl[1:0] 10 r/w cas latency for area 3 specify the cas latency for area 3. 00: 1 cycle 01: 2 cycles 10: 3 cycles 11: 4 cycles 6, 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4, 3 trwl[1:0] 00 r/w number of wait cycles for precharge activation specify the minimum number of wait cycles to be inserted for activation of precharge. ? from issuance of writa command by this lsi until auto precharge is activated in sdram: actv command is issued for the same bank in non- bank active mode. see the datasheet of the sdram to find the number of cycles taken from the acceptance of writa command by sdram until auto-precharge is activated. these bits should be set so that the above number of cycles will not exceed the number of cycles specified by these bits. ? from issuance of writ command by this lsi until issuance of pre command: different row addresses in the same bank are accessed in bank active mode. the setting for areas 2 and 3 is common. 00: 0 cycle (no wait cycles) 01: 1 cycle 10: 2 cycles 11: 3 cycles 2 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 263 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1, 0 wtrc[1:0] 00 r/w number of idle cycles from ref command issuance/exit from self-refresh mode until actv/ref/mrs command issuance specify the minimum number of idle cycles between commands in the following cases. ? from issuance of ref command to issuance of actv/ref/mrs command. ? from exit from self-refresh mode to issuance of actv/ref/mrs command. the setting for areas 2 and 3 is common. 00: 2 cycles 01: 3 cycles 10: 5 cycles 11: 8 cycles (5) pcmcia ? cs5wcr, cs6wcr bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrr/wr/wrrrr 0000010100000000 r r/w r/w r/w r/w r/w r/w r/w r/w r/w r r r/w r/w r/w r/w ---------- sa[1:0] ---- - ted[3:0] pcw[3:0] wm - - teh[3:0] bit bit name initial value r/w description 31 to 22 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) page 264 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 21, 20 sa[1:0] 00 r/w space attribute specification selects memory card interface or i/o card interface when pcmcia interface is selected. sa1: 0: selects memory card interface for the space for a25 = 1. 1: selects i/o card interface for the space for a25 = 1. sa0: 0: selects memory card interface for the space for a25 = 0. 1: selects i/o card interface for the space for a25 = 0. 19 to 15 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 14 to 11 ted[3:0] 0000 r/w number of de lay cycles from address output to rd and we assertion specify the number of delay cycles from address output to rd and we assertion in pcmcia interface. 0000: 0.5 cycle 0001: 1.5 cycles 0010: 2.5 cycles 0011: 3.5 cycles 0100: 4.5 cycles 0101: 5.5 cycles 0110: 6.5 cycles 0111: 7.5 cycles 1000: 8.5 cycles 1001: 9.5 cycles 1010: 10.5 cycles 1011: 11.5 cycles 1100: 12.5 cycles 1101: 13.5 cycles 1110: 14.5 cycles 1111: 15.5 cycles
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 265 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 to 7 pcw[3:0] 1010 r/w number of access wait cycles specify the number of wait cycles to be inserted. 0000: 3 cycles 0001: 6 cycles 0010: 9 cycles 0011: 12 cycles 0100: 15 cycles 0101: 18 cycles 0110: 22 cycles 0111: 26 cycles 1000: 30 cycles 1001: 33 cycles 1010: 36 cycles 1011: 38 cycles 1100: 52 cycles 1101: 60 cycles 1110: 64 cycles 1111: 80 cycles 6 wm 0 r/w external wait mask specification specifies whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycles is 0. 0: external wait input is valid 1: external wait input is ignored 5, 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) page 266 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 to 0 teh[3:0] 0000 r/w delay cycles from rd and we negation to address specify the number of address hold cycles from rd and wen negation in pcmcia interface. 0000: 0.5 cycle 0001: 1.5 cycles 0010: 2.5 cycles 0011: 3.5 cycles 0100: 4.5 cycles 0101: 5.5 cycles 0110: 6.5 cycles 0111: 7.5 cycles 1000: 8.5 cycles 1001: 9.5 cycles 1010: 10.5 cycles 1011: 11.5 cycles 1100: 12.5 cycles 1101: 13.5 cycles 1110: 14.5 cycles 1111: 15.5 cycles
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 267 of 1560 mar 18, 2011 sh7080 group (6) burst mpx-i/o ? cs6wcr bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrr/wr/wr/wrr/wr/w 0000010100000000 rrrrrr/wr/wr/wr/wr/wrrrrrr ----------mpxaw [1:0] mpxmd - bw[1:0] - - - - - w[3:0] wm - - - - - - bit bit name initial value r/w description 31 to 22 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 21, 20 mpxaw[1:0] 00 r/w number of wait cycles in address cycle specifies the number of wait cycles to be inserted into the address cycle. 00: 0 cycles 01: 1 cycle 10: 2 cycles 11: 3 cycles
section 9 bus state controller (bsc) page 268 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description burst mpx-i/o interface mode specification this bit specifies the number of bursts per access. this setting has effect only when the dmac is set to the 16- byte transfer unit size. when other transfer unit size is selected, the setting of the mpxmd bit is ignored and there is always one burst per access. 0: four bursts per access four consecutive data cycles occur after the address cycle. 1: two bursts per access two consecutive data cycles occur after the address cycle. the correspondence between the data (d31 to d29) output in the address cycle and the transfer size is shown below. d31 d30 d29 transfer size 0 0 0 byte (one byte) 0 0 1 word (two bytes) 0 1 0 longword (four bytes) 0 1 1 quadword (eight bytes) (only when mpxmd = 1) 1 0 0 16 bytes (only when mpxmd = 0) 1 0 1 reserved 1 1 0 reserved 1 1 1 reserved 19 mpxmd 0 r/w 18 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 269 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 17, 16 bw[1:0] 00 r/w number of burst wait cycles specifies the number of wait cycles to be inserted into the second or subsequent access cycles in burst access. 00: 0 cycles 01: 1 cycle 10: 2 cycles 11: 3 cycles 15 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 to 7 w[3:0] 1010 r/w number of access wait cycles specify the number of wait cycles to be inserted into the first burst access cycle or single access cycle. 0000: 0 cycles 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited)
section 9 bus state controller (bsc) page 270 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 wm 0 r/w external wait mask specification specifies whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycles is 0. 0: external wait is valid 1: external wait is ignored 5 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. (7) burst rom (clock synchronous) ? cs0wcr bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrr/wr/w 0000010100000000 rrrrrr/wr/wr/wr/wr/wrrrrrr - - - - - - - - - - - - - - bw[1:0] - - - - - w[3:0] wm - - - - - - bit bit name initial value r/w description 31 to 18 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 17, 16 bw[1:0] 00 r/w number of burst wait cycles specify the number of wait cycles to be inserted in the second or subsequent access cycles in burst access. 00: 0 cycles 01: 1 cycle 10: 2 cycles 11: 3 cycles
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 271 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 15 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 to 7 w[3:0] 1010 r/w number of access wait cycles specify the number of wait cycles to be inserted in the first access cycle. 0000: 0 cycles 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited) 6 wm 0 r/w external wait mask specification specifies whether or nor the external wait input is valid. the specification by this bit is valid even when the number of access wait cycles is 0. 0: external wait input is valid. 1: external wait input is ignored. 5 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) page 272 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.4.4 sdram control register (sdcr) sdcr specifies the method to refresh and access sdram, and the types of sdrams to be connected. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrrrrr/wr/wrr/wr/w 0000000000000000 rrrrr/wr/wrr/wrrrr/wr/wrr/wr/w -----------a2ro w[1:0] - a2col[1:0] - - - - rfsh rmode - bactv - - - a3row[1:0] - a3col[1:0] bit bit name initial value r/w description 31 to 21 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 20, 19 a2row[1:0] 00 r/w number of bits of row address for area 2 specify the number of bits of row address for area 2. 00: 11 bits 01: 12 bits 10: 13 bits 11: reserved (setting prohibited) 18 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 17, 16 a2col[1:0] 00 r/w number of bits of column address for area 2 specify the number of bits of column address for area 2. 00: 8 bits 01: 9 bits 10: 10 bits 11: reserved (setting prohibited)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 273 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 15 to 12 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 11 rfsh 0 r/w refresh control specifies whether or not the refresh operation of sdram is performed. 0: no refresh 1: refresh 10 rmode 0 r/w refresh control specifies whether to perform auto-refresh or self- refresh when the rfsh bit is 1. when the rfsh bit is 1 and this bit is 1, self-refresh starts immediately. when the rfsh bit is 1 and this bit is 0, auto-refresh starts according to the contents that are set in rtcsr, rtcnt, and rtcor. 0: auto-refresh is performed 1: self-refresh is performed 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 8 bactv 0 r/w bank active mode specifies to access whether in auto-precharge mode (using reada and writa commands) or in bank active mode (using read and writ commands). 0: auto-precharge mode (using reada and writa commands) 1: bank active mode (using read and writ commands) note: bank active mode can be used only for the area 3. the bus width can be set as 16 or 32 bits. when both the area 2 and area 3 are set to sdram, specify auto-precharge mode. 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) page 274 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4, 3 a3row[1:0] 00 r/w number of bits of row address for area 3 specify the number of bits of the row address for area 3. 00: 11 bits 01: 12 bits 10: 13 bits 11: reserved (setting prohibited) 2 ? 0 r/w reserved this bit is always read as 0. the write value should always be 0. 1, 0 a3col[1:0] 00 r/w number of bits of column address for area 3 specify the number of bits of the column address for area 3. 00: 8 bits 01: 9 bits 10: 10 bits 11: reserved (setting prohibited)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 275 of 1560 mar 18, 2011 sh7080 group 9.4.5 refresh timer control/status register (rtcsr) rtcsr specifies various items about refresh for sdram. when writing to rtcsr, write data with setting the upper 16 bits to h'a55a to cancel write protection. phase matching of the clock input to the refresh timer counter (rtcnt) is only performed on power-on reset. accordingly, if the timer is started with cks[2:0] set to other than b'000, there will be an error contained in the period until the first setting of the compare match flag. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 rrrrrrrrr/wr/wr/wr/wr/wr/wr/wr/w ---------------- - - - - - - - - cmf cmie cks[2:0] rrc[2:0] bit bit name initial value r/w description 31 to 16 ? all 0 r/w write protect cancellation when writing to rtcsr, write h'a55a to these bits to cancel write protection. these bits are always read as 0. 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 cmf 0 r/w compare match flag this is a status flag which indicates that a compare match occurs between the refresh timer counter (rtcnt) and refresh time constant register (rtcor). this bit is set or cleared in the following conditions. 0: clearing condition: when 0 is written in cmf after reading out rtcsr during cmf = 1. 1: setting condition: when the condition rtcnt = rtcor is satisfied.
section 9 bus state controller (bsc) page 276 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 cmie 0 r/w compare match interrupt enable enables or disables cmf interrupt requests when the cmf bit in rtcsr is set to 1. 0: disables cmf interrupt requests. 1: enables cmf interrupt requests. 5 to 3 cks[2:0] 000 r/w clock select select the clock input to count-up the refresh timer counter (rtcnt). 000: stop the counting-up 001: b /4 010: b /16 011: b /64 100: b /256 101: b /1024 110: b /2048 111: b /4096 2 to 0 rrc[2:0] 000 r/w refresh count specify the number of continuous refresh cycles, when the refresh request occurs after the coincidence of the values of the refresh timer counter (rtcnt) and the refresh time constant register (rtcor). these bits can make the period of occurrence of refresh long. 000: once 001: twice 010: 4 times 011: 6 times 100: 8 times 101: reserved (setting prohibited) 110: reserved (setting prohibited) 111: reserved (setting prohibited)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 277 of 1560 mar 18, 2011 sh7080 group 9.4.6 refresh timer counter (rtcnt) rtcnt is an 8-bit counter that increments using the clock selected by bits cks2 to cks0 in rtcsr. when rtcnt matches rtcor, rtcnt is cleared to 0. the value in rtcnt returns to 0 after counting up to 255. when writing to rtcnt, write data with setting the upper 16 bits to h'a55a to cancel write protection. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 rrrrrrrrr/wr/wr/wr/wr/wr/wr/wr/w ---------------- -------- bit bit name initial value r/w description 31 to 16 ? all 0 r/w write protect cancellation when writing to rtcnt, write h'a55a to these bits to cancel write protection. these bits are always read as 0. 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 to 0 all 0 r/w 8-bit counter
section 9 bus state controller (bsc) page 278 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.4.7 refresh time constant register (rtcor) rtcor is an 8-bit register. when rtcor matches rtcnt, the cmf bit in rtcsr is set to 1 and rtcnt is cleared to 0. when the rfsh bit in sdcr is set to 1, a memory refresh request is issued by this matching signal. this request is maintained until the refres h operation is performed. if the request is not processed when the next matching occurs, the previous request is ignored. when the cmie bit in rtcsr is set to 1, an interrupt request is issued by this matching signal. the request is output continuously until the cmf bit in rtcsr is cleared. clearing the cmf bit only affects the interrupt request and does not clear the refresh request. therefore, a combination of refresh request and interval timer interrupt ca n be specified so that the number of refresh requests are counted by using timer interrupts while refresh is performed periodically. when writing to rtcor, write data with setting the upper 16 bits to h'a55a to cancel write protection. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 rrrrrrrrr/wr/wr/wr/wr/wr/wr/wr/w ---------------- -------- bit bit name initial value r/w description 31 to 16 ? all 0 r/w write protect cancellation when writing to rtcor, write h'a55a to these bits to cancel write protection. these bits are always read as 0. 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 to 0 all 0 r/w 8-bit counter
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 279 of 1560 mar 18, 2011 sh7080 group 9.4.8 bus function extending register (bscehr) bscehr is a 16-bit register that specifies th e timing of bus release by the dtc and dmac. it also specifies the application of priority in transf er operations and enables or disables the functions that have the effect of decreasing numbers of cy cles over which the dtc is active. the differences in dtc operation made by the combinations of the dtlock, csstp1, and dtbst bits settings are described in section 8.5.9, dtc bus releasing timing. setting the csstp2 bit can improve the transfer performance of the dmac in burst-mode transfer and of the dtc when the dtlock bit is 0. furthermore, setting the csstp3 bit selects whether or not acce ss to the external space by the cpu takes priority over dtc or dmac transfer in cycle-steal mode. the dtc short address mode is implemented by setting the dtsa bit. for details of the short address mode, see section 8.4, location of transfer information and dtc vector table. a dtc activation priority order can be set up for the dtc activation sources. the dtpr bit selects whether or not this priority order is valid or invalid when multiple sources issue activation requests before dtc activation. the corresponding bit from among dmmtu4 to dmmtu0 must be set for mtu2-triggered transfer by the dmac in the burst mode. do not modify this register while the dmac or dtc is active. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r r/w r/w r/w r/w r/w r r r r/w r/w r/w r/w r/w dtlock csstp1 - csstp2 dtbst dtsa csstp3 dtpr - - - dmmtu4 dmmtu3 dmmtu2 dmmtu1 dmmtu0 bit bit name initial value r/w description 15 dtlock 0 r/w dtc lock enable specifies the timing of bus release by the dtc. 0: the dtc releases the bus on generation of the nop cycle that follows vector read or write-back of transfer information. 1: the dtc releases the bus after vector read, on generation of the nop cycle that follows vector read, after transfer information read, after a round of data transfer, or after write-back of transfer information.
section 9 bus state controller (bsc) page 280 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 csstp1 0 r/w select bus release on nop cycle generation by dtc specifies whether or not the bus is released in response to requests from the cpu for external space access on generation of the nop cycle that follows reading of the vector address. if, however, the csstp2 bit is 1, bus mastership is retained until all transfer is complete, regardless of the setting of this bit. 0: the bus is released on generation of the nop cycle by the dtc. 1: the bus is not released on generation of the nop cycle by the dtc. 13 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 12 csstp2 0 r/w select bus release during burst-mode-dmac/dtc transfer this setting applies to dtc transfer when the dtlock bit is 0 and burst-mode dmac transfer when the dmac is in channel-fixed mode, and the activating request was an external request or was from mtu2. the value specifies whether the bus mastership is or is not to be released after each round of transfer in response to a request from the cpu for access to the external space. ? dmac transfer 0: release the bus after each round of data transfer. 1: only release the bus after all data transfer is complete. note: in round-robin mode, the bus is only released after all data transfer is complete, regardless of the setting of this bit. ? dtc transfer 0: when the dtlock and csstp1 bits are 0, the bus is released on generation of the nop cycle after reading of the vector address. when the dtlock bit is 0 and the csstp1 bit is 1, the bus is released after each round of data transfer. 1: only release the bus mastership after all data transfer is complete.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 281 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 11 dtbst 0 r/w dtc burst enable selects whether or not the dtc retains the bus mastership and remains continuously active until all transfer operations are complete when multiple dtc activation requests have been generated. 0: release the bus on the completion of transfer for each individual dtc activation source. 1: keep the dtc continuously active, i.e. only release the bus on completion of processing for all dtc activation sources. notes: when this bit is set to 1, the following restrictions apply. 1. clock setting with the frequency control register (frqcr) must be i : b : p : mi : mp : = 8: 4: 4: 4: 4, 4: 2: 2: 2: 2, or 2: 1: 1: 1: 1 2. the vector information must be in on-chip rom or on-chip ram. 3. the transfer information must be in on-chip ram. 4. transfer must be between the on-chip ram and an on-chip peripheral module or between external memory and an on-chip peripheral module. 10 dtsa 0 r/w dtc short address mode in this mode, the information that specifies a dtc transfer takes up only 3 longwords. 0: each transfer information is read out as 4 longwords. the transfer information are arranged as shown in figure 8.2 (normal address mode). 1: each transfer information is read out as 3 longwords. the transfer information are arranged as shown in figure 8.2 (short-address mode). note: transfer in short-address mode is only available between on-chip peripheral modules and on-chip ram, because the higher-order 8 bits of the sar and dar are considered to be all 1.
section 9 bus state controller (bsc) page 282 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 9 csstp3 0 r/w select priority fo r external memory access by cpu specifies whether or not access to the external space by the cpu takes priority over dtc or dmac transfer in cycle-steal mode. 0: dmac transfer and dtc transfer have priority. 1: external space access from the cpu has priority. note: when this bit is 0, and access to internal i/o from the cpu is immediately followed by access to external space from the cpu, a nop 1b in duration is inserted between the two access cycles. 8 dtpr 0 r/w application of priority in dtc activation when multiple dtc activation requests are generated before the dtc is activated, specify whether transfer starts from the first request to have been generated or is in accord with the priority order for dtc activation requests. however, when multiple dtc activation requests have been issued while the dtc is active, the next transfer to be triggered will be that with the highest dtc activation priority. 0: start transfer in response to the first request to have been generated. 1: start transfer in accord with dtc activation request priority. notes: when this bit is set to 1, the following restrictions apply. 1. the vector information must be in on-chip rom or on-chip ram. 2. the transfer information must be in on-chip ram. 3. skipping of transfer information reading is always disabled. 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 283 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 dmmtu4 0 r/w enable burst-mode dmac transfer with tgia_4 activation source setting this bit to 1 enables burst-mode dma transfer triggered by the tgia_4 interrupt from mtu2. 0: dma transfer in burst mode is disabled when tgia_4 is the activation source. 1: dma transfer in burst mode is enabled when tgia_4 is the activation source. note: clear this bit during dma transfer in cycle-steal mode. 3 dmmtu3 0 r/w enable burst-mode dmac transfer with tgia_3 activation source setting this bit to 1 enables burst-mode dma transfer triggered by the tgia_3 interrupt from mtu2. 0: dma transfer in burst mode is disabled when tgia_3 is the activation source. 1: dma transfer in burst mode is enabled when tgia_3 is the activation source. note: clear this bit during dma transfer in cycle-steal mode. 2 dmmtu2 0 r/w enable burst-mode dmac transfer with tgia_2 activation source setting this bit to 1 enables burst-mode dma transfer triggered by the tgia_2 interrupt from mtu2. 0: dma transfer in burst mode is disabled when tgia_2 is the activation source. 1: dma transfer in burst mode is enabled when tgia_2 is the activation source. note: clear this bit during dma transfer in cycle-steal mode.
section 9 bus state controller (bsc) page 284 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 dmmtu1 0 r/w enable burst-mode dmac transfer with tgia_1 activation source setting this bit to 1 enables burst-mode dma transfer triggered by the tgia_1 interrupt from mtu2. 0: dma transfer in burst mode is disabled when tgia_1 is the activation source. 1: dma transfer in burst mode is enabled when tgia_1 is the activation source. note: clear this bit during dma transfer in cycle-steal mode. 0 dmmtu0 0 r/w enable burst-mode dmac transfer with tgia_0 activation source setting this bit to 1 enables burst-mode dma transfer triggered by the tgia_0 interrupt from mtu2. 0: dma transfer in burst mode is disabled when tgia_0 is the activation source. 1: dma transfer in burst mode is enabled when tgia_0 is the activation source. note: clear this bit during dma transfer in cycle-steal mode.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 285 of 1560 mar 18, 2011 sh7080 group 9.5 operation 9.5.1 endian/access size and data alignment this lsi supports big endian, in which the 0 address is the most significant byte (msb) in the byte data. three data bus widths (8 bits, 16 bits, and 32 bits) are available for normal memory and sram with byte selection, and two data bus widths (16 bits and 32 bits) are available for sdram. for pcmcia interface, two data bus widths (8 bits a nd 16 bits) are available. for mpx-i/o, the data bus width is fixed at 8 bits or 16 bits, or 8 bits or 16 bits can be selected by the access address. for burst mpx-i/o, the data bus width is fixed at 32 bits. data alignment is performed in accordance with the data bus width of the respective device. th is also means that when longword data is read from a byte-width device, the read operation must be done four times. in this lsi, data alignment and conversion of data length are performed au tomatically between the respective interfaces. tables 9.17 to 9.19 show the relationshi p between device data width and access unit. table 9.17 32-bit external de vice access and data alignment data bus strobe signals operation d31 to d24 d23 to d16 d15 to d8 d7 to d0 wrhh , dqmuu wrhl , dqmul wrh , dqmlu wrl , dqmll byte access at 0 data 7 to data 0 ? ? ? assert ? ? ? byte access at 1 ? data 7 to data 0 ? ? ? assert ? ? byte access at 2 ? ? data 7 to data 0 ? ? ? assert ? byte access at 3 ? ? ? data 7 to data 0 ? ? ? assert word access at 0 data 15 to data 8 data 7 to data 0 ? ? assert assert ? ? word access at 2 ? ? data 15 to data 8 data 7 to data 0 ? ? assert assert longword access at 0 data 31 to data 24 data 23 to data 16 data 15 to data 8 data 7 to data 0 assert assert assert assert
section 9 bus state controller (bsc) page 286 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.18 16-bit external de vice access and data alignment data bus strobe signals operation d31 to d24 d23 to d16 d15 to d8 d7 to d0 wrhh , dqmuu wrhl , dqmul wrh , dqmlu wrl , dqmll byte access at 0 ? ? data 7 to data 0 ? ? ? assert ? byte access at 1 ? ? ? data 7 to data 0 ? ? ? assert byte access at 2 ? ? data 7 to data 0 ? ? ? assert ? byte access at 3 ? ? ? data 7 to data 0 ? ? ? assert word access at 0 ? ? data 15 to data 8 data 7 to data 0 ? ? assert assert word access at 2 ? ? data 15 to data 8 data 7 to data 0 ? ? assert assert 1st time at 0 ? ? data 31 to data 24 data 23 to data 16 ? ? assert assert longword access at 0 2nd time at 2 ? ? data 15 to data 8 data 7 to data 0 ? ? assert assert
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 287 of 1560 mar 18, 2011 sh7080 group table 9.19 8-bit external de vice access and data alignment data bus strobe signals operation d31 to d24 d23 to d16 d15 to d8 d7 to d0 wrhh , dqmuu wrhl , dqmul wrh , dqmlu wrl , dqmll byte access at 0 ? ? ? data 7 to data 0 ? ? ? assert byte access at 1 ? ? ? data 7 to data 0 ? ? ? assert byte access at 2 ? ? ? data 7 to data 0 ? ? ? assert byte access at 3 ? ? ? data 7 to data 0 ? ? ? assert 1st time at 0 ? ? ? data 15 to data 8 ? ? ? assert word access at 0 2nd time at 1 ? ? ? data 7 to data 0 ? ? ? assert 1st time at 2 ? ? ? data 15 to data 8 ? ? ? assert word access at 2 2nd time at 3 ? ? ? data 7 to data 0 ? ? ? assert 1st time at 0 ? ? ? data 31 to data 24 ? ? ? assert 2nd time at 1 ? ? ? data 23 to data 16 ? ? ? assert longword access at 0 3rd time at 2 ? ? ? data 15 to data 8 ? ? ? assert 4th time at 3 ? ? ? data 7 to data 0 ? ? ? assert
section 9 bus state controller (bsc) page 288 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.5.2 normal space interface basic timing: for access to a normal space, this lsi uses st robe signal output in consideration of the fact that mainly sram without a byte se lection will be directly connected. when using sram with a byte-selection pin, see section 9.5. 8, sram interface with byte selection. figure 9.2 shows the basic timings of normal space access. a no-wait normal access is completed in two cycles. the bs signal is asserted for one cycle to indicate the start of a bus cycle. ck note: * the waveform for dackn is when active low is specified. a29 to a0 rdwr rdwr d31 to d0 dackn csn t1 t2 rd wrxx bs d31 to d0 read write * figure 9.2 normal space basic access timing (access wait 0)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 289 of 1560 mar 18, 2011 sh7080 group there is no access size specification when reading. the correct access start address is output in the least significant bit of the addre ss, but since there is no access size specification, 32 bits are always read in a 32-bit device or 16 bits are always read in a 16-bit device. when writing, only the wrxx signal for the byte to be written is asserted. it is necessary to control of outputing the data that has been read using rd when a buffer is established in the data bus. the rdwr signal is in a read state (high output) when no access has been carried out. therefore, care must be taken when controlling the external data buffer using rdwr, to avoid collision. figures 9.3 and 9.4 show the basic timings of c ontinuous accesses to normal space. if the wm bit in csnwcr is cleared to 0, a tnop cycle is inserted to evaluate the external wait (figure 9.3). if the wm bit in csnwcr is set to 1, external waits are ignored and no tnop cycle is inserted (figure 9.4).
section 9 bus state controller (bsc) page 290 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group note: * the waveform for dackn is when active low is specified. ck a29 to a0 rd rdwr d15 to d0 wrxx d15 to d0 wait csn t1 t2 tnop t1 t2 dackn * bs read write figure 9.3 continuous access for normal space 1 bus width = 16 bits, longword access, wm bit in csnwcr = 0 (access wait = 0, cycle wait = 0)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 291 of 1560 mar 18, 2011 sh7080 group ck a29 to a0 rdwr d15 to d0 csn t1 t2 t1 t2 rd dackn * wrxx wait d15 to d0 bs read write note: * the waveform for dackn is when active low is specified. figure 9.4 continuous access for normal space 2 bus width = 16 bits, longword access, wm bit in csnwcr = 1 (access wait = 0, cycle wait = 0)
section 9 bus state controller (bsc) page 292 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group a16 a0 cs oe i/o7 i/o0 we . . . . . . . . a18 a2 csn rd d31 d24 wrhh d23 d16 wrhl d15 d8 wrh d7 d0 wrl this lsi 128 k 8-bit sram . . . . a16 a0 cs oe i/o7 i/o0 we . . . . . . . . a16 a0 cs oe i/o7 i/o0 we . . . . . . . . a16 a0 cs oe i/o7 i/o0 we . . . . . . . . . . . . . . . . . . . . . . . . figure 9.5 example of 32-bit data-width sram connection
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 293 of 1560 mar 18, 2011 sh7080 group a16 a0 cs oe i/o7 i/o0 we ???? ???? ???? ???? a17 a1 csn rd d15 d8 wrh d7 d0 wrl this lsi 128k 8-bit sram ???? a16 a0 cs oe i/o7 i/o0 we ???? ???? ???? ???? ???? ???? ???? ???? figure 9.6 example of 16-bit data-width sram connection this lsi 128 k 8 bits sram a16 a0 cs oe i/o7 i/o0 we . . . a16 a0 csn rd d7 d0 wrl . . . . . . . . . figure 9.7 example of 8-bit data-width sram connection
section 9 bus state controller (bsc) page 294 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.5.3 access wait control wait cycle insertion on a normal space access can be controlled by the settings of bits wr3 to wr0 in csnwcr. it is possible to insert wait cy cles independently in read access and in write access. the specified number of tw cycles is in serted as wait cycles in a normal space access shown in figure 9.8. t1 ck a29 to a0 csn rdwr bs dackn * rd d31 to d0 wrxx d31 to d0 tw read write t2 note: * the waveform for dackn is when active low is specified. figure 9.8 wait timing for norm al space access (software wait only)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 295 of 1560 mar 18, 2011 sh7080 group when the wm bit in csnwcr is cleared to 0, the external wait input wait signal is also sampled. wait pin sampling is shown in figure 9.9. a 2-cycle wait is specified as a software wait. the wait signal is sampled at the falling edge of ck at the transition from the t1 or tw cycle to the t2 cycle. t1 ck a29 to a0 csn bs rdwr rd d31 to d0 wrxx d31 to d0 wait tw tw twx t2 read write wait states inserted by wait signal dackn * note: * the waveform for dackn is when active low is specified. figure 9.9 wait state ti ming for normal space access (wait state insertion using wait signal)
section 9 bus state controller (bsc) page 296 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.5.4 csn assert period extension the number of cycles from csn assertion to rd , wrxx assertion can be specified by setting bits sw1 and sw0 in csnwcr. the number of cycles from rd , wrxx negation to csn negation can be specified by setting bits hw1 and hw0. theref ore, a flexible interface to an external device can be obtained. figure 9.10 shows an example. a th cycle and a tf cycle are added before and after an ordinary cycle, re spectively. in these cycles, rd and wrxx are not asserted, while other signals are asserted. the data output is prolonged to the tf cycle, and this prolongation is useful for devices with slow writing operations. note: * the waveform for dackn is when active low is specified. t1 ck a29 to a0 csn rdwr rd d31 to d0 wrxx d31 to d0 th read write t2 tf bs dackn * figure 9.10 csn assert period extension
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 297 of 1560 mar 18, 2011 sh7080 group 9.5.5 mpx-i/o interface access timing for the mpx space is shown below. in the mpx space, csn , ah , rd , and wrxx signals control the accessing. the basic access for th e mpx space consists of 2 cycles of address output followed by an access to a normal space. th e bus width for the address output cycle or the data input/output cycle is fixed to 8 bits or 16 bits. alternatively, it can be 8 bits or 16 bits depending on the address to be accessed. output of the addresses d15 to d0 or d7 to d0 is performed from cycle ta2 to cycle ta3. because cycle ta1 has a high-impedance state, collisions of addresses and data can be avoided without inserting idle cycles, even in continuous accesses. address output is increased to 3 cycles by setting the mpxw bit in the cs5wcr register to 1. the rdwr signal is output at the same time as the csn signal; it is high in the read cycle and low in the write cycle. the data cycle is the same as that in a normal space access. timing charts are shown in figures 9.11 to 9.13. note that the operation timing of the mpx-i/o interface differs between the sh7080 group and the sh7040. for example, the ah signal is negated (high-level) in the sh7080 group and asserted (low-level) in the sh7040 group duri ng access to other than mpx-i/o space.
section 9 bus state controller (bsc) page 298 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group t1 ck a25 to a16 csn rdwr rd d15 to d0 wrxx d15 to d0 bs read write t2 dackn * ta1 ta2 ta3 ah address address data data note: * the waveform for dackn is when active low is specified. figure 9.11 access timing for mpx space (add ress cycle no wait, da ta cycle no wait)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 299 of 1560 mar 18, 2011 sh7080 group t1 ck a25 to a16 csn rdwr rd d15 to d0 wrxx d15 to d0 bs read write t2 dackn * ta1 ta2 ta3 ah address address data data tadw note: * the waveform for dackn is when active low is specified. figure 9.12 access timing for mpx space (add ress cycle wait 1, data cycle no wait)
section 9 bus state controller (bsc) page 300 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group t1 ck a25 to a16 csn rdwr rd d15 to d0 wrxx d15 to d0 bs read write t2 dackn * ta1 ta2 ta3 ah address address data data tadw tw twx wait note: * the waveform for dackn is when active low is specified. figure 9.13 access timing for mpx space (address cycle access wait 1, data cycle wait 1, external wait 1)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 301 of 1560 mar 18, 2011 sh7080 group 9.5.6 sdram interface sdram direct connection: the sdram that can be connected to this lsi is a product that has 11/12/13 bits of row address, 8/9/10 bits of column address, 4 or less banks, and uses the a10 pin for setting precharge mode in r ead and write command cycles. the control signals for direct connection of sdram are rasu , rasl , casu , casl , rdwr, dqmuu, dqmlu, dqmll, cke, cs2 , and cs3 . all the signals other than cs2 and cs3 are common to all areas, and signals other than cke are valid when cs2 or cs3 is asserted. sdram can be connected to up to 2 spaces. the data bus width of the area that is connected to sdram can be set to 32 or 16 bits. burst read/single write (burst length 1) and burst read/burst write (burst length 1) are supported as sdram operating mode. commands for sdram can be specified by rasu , rasl , casu , casl , rdwr, and specific address signals. these commands are shown below. ? nop ? auto-refresh (ref) ? self-refresh (self) ? all banks precharge (pall) ? specified bank precharge (pre) ? bank active (actv) ? read (read) ? read with precharge (reada) ? write (writ) ? write with precharge (writa) ? write mode register (mrs) the byte to be accessed is specified by dqm uu, dqmul, dqmlu and dqmll. reading or writing is performed for a byte whose corresponding dqmxx low. for details on the relationship between dqmxx and the byte to be accessed, refer to section 9.5.1, endian/access size and data alignment. figures 9.14 to 9.16 show shows an example of the connection of sdram with the lsi.
section 9 bus state controller (bsc) page 302 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group as shown in figure 9.16, two sets of sdrams of 32 mbytes or smaller can be connected to the same cs space by using rasu , rasl , casu , and casl . in this case, a total of 8 banks are assigned to the same cs space: 4 banks specified by rasl and casl , and 4 banks specified by rasu and casu . when accessing the address with a25 = 0, rasl and casl are asserted. when accessing the address with a25 = 1, rasu and casu are asserted. a15 a2 cke ck csn rasu casu rasl casl rdwr d31 d16 dqmuu dqmul d15 d0 dqmlu dqmll 64m sdram (1m 16 bits 4 banks) . . . . a13 a0 cke clk cs ras cas we i/o15 i/o0 dqmu dqml . . . . . . . . . . . . . . . . a13 a0 cke clk cs ras cas we i/o15 i/o0 dqmu dqml . . . . . . . . this lsi unused unused figure 9.14 example of 32-bit data width sdram connection ( rasu and casu are not used)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 303 of 1560 mar 18, 2011 sh7080 group a14 a1 cke ck csn rasu casu rasl casl rdwr d15 d0 dqmlu dqmll 64m sdram (1m 16 bits 4 banks) . . . . a13 a0 cke clk cs ras cas we i/o15 i/o0 dqmu dqml . . . . . . . . . . . . this lsi unused unused figure 9.15 example of 16-bit data width sdram connection ( rasu and casu are not used)
section 9 bus state controller (bsc) page 304 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group a14 a1 cke ck csn rasu casu rasl casl rdwr d15 d0 dqmlu dqmll 64m sdram (1m 16 bits 4 banks) a13 a0 cke clk cs ras cas we i/o15 i/o0 dqmu dqml . . . . . . . . . . . . . . . . a13 a0 cke clk cs ras cas we i/o15 i/o0 dqmu dqml . . . . . . . . this lsi figure 9.16 example of 16-bit data width sdram connection ( rasu and casu are used)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 305 of 1560 mar 18, 2011 sh7080 group address multiplexing: an address multiplexing is specified so that sdram can be connected without external address multiple xing circuitry according to the setting of bits bsz[1:0] in csnbcr, and axrow[1:0] and axcol[1:0] in sdcr. tables 9.20 to 9.25 show the relationship between the settings of bits bsz[1:0], axrow[1:0], and axcol[1:0] and the bits output at the address pins. do not specify those bits in the manner other than this table, otherwise the operation of this lsi is not guaranteed. a25 to a18 are not multiplexed and the original values of address are always output at these pins. when the data bus width is 16 bits (bsz[1:0] = b'10), the a0 pin of sdram specifies a word address. therefore, connect this a0 pin of sdram to the a1 pin of this lsi, then a1 pin to the a2 pin, and so on. when the data bus width is 32 bits (bsz[1:0] = b'11), the a0 pin of sdram specifies a longword address. therefore, connect this a0 pin of sdram to the a2 pin of this lsi, then a1 pin to the a3 pin, and so on.
section 9 bus state controller (bsc) page 306 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.20 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (1)-1 setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 11 (32 bits) 00 (11 bits) 00 (8 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a25 a17 a16 a24 a16 a15 a23 a15 unused a14 a22 * 2 a22 * 2 a12 (ba1) specifies bank a13 a21 * 2 a21 * 2 a11 (ba0) a12 a20 l/h * 1 a10/ap specifies address/precharge a11 a19 a11 a9 a10 a18 a10 a8 a9 a17 a9 a7 a8 a16 a8 a6 a7 a15 a7 a5 a6 a14 a6 a4 a5 a13 a5 a3 a4 a12 a4 a2 a3 a11 a3 a1 a2 a10 a2 a0 address a1 a9 a1 unused a0 a8 a0 example of connected memory 64-mbit product (512 kwords 32 bits 4 banks, column 8 bits product): 1 16-mbit product (512 kwords 16 bits 2 banks, column 8 bits product): 2 notes: 1. l/h is a bit used in the command specification; it is fixed at low or high according to access mode. 2. bank address specification
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 307 of 1560 mar 18, 2011 sh7080 group table 9.20 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (1)-2 setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 11 (32 bits) 01 (12 bits) 00 (8 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a24 a17 a16 a23 a16 unused a15 a23 * 2 a23 * 2 a13 (ba1) specifies bank a14 a22 * 2 a22 * 2 a12 (ba0) a13 a21 a13 a11 address a12 a20 l/h * 1 a10/ap specifies address/precharge a11 a19 a11 a9 a10 a18 a10 a8 a9 a17 a9 a7 a8 a16 a8 a6 a7 a15 a7 a5 a6 a14 a6 a4 a5 a13 a5 a3 a4 a12 a4 a2 a3 a11 a3 a1 a2 a10 a2 a0 address a1 a9 a1 unused a0 a8 a0 example of connected memory 128-mbit product (1 mword 32 bits 4 banks, column 8 bits product): 1 64-mbit product (1 mword 16 bits 4 banks, column 8 bits product): 2 notes: 1. l/h is a bit used in the command specification; it is fixed at low or high according to access mode. 2. bank address specification
section 9 bus state controller (bsc) page 308 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.21 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (2)-1 setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 11 (32 bits) 01 (12 bits) 01 (9 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a26 a17 a16 a25 a16 unused a15 a24 * 2 a24 * 2 a13 (ba1) specifies bank a14 a23 * 2 a23 * 2 a12 (ba0) a13 a22 a13 a11 address a12 a21 l/h * 1 a10/ap specifies address/precharge a11 a20 a11 a9 a10 a19 a10 a8 a9 a18 a9 a7 a8 a17 a8 a6 a7 a16 a7 a5 a6 a15 a6 a4 a5 a14 a5 a3 a4 a13 a4 a2 a3 a12 a3 a1 a2 a11 a2 a0 address a1 a10 a1 unused a0 a9 a0 example of connected memory 256-mbit product (2 mwords 32 bits 4 banks, column 9 bits product): 1 128-mbit product (2 mwords 16 bits 4 banks, column 9 bits product): 2 notes: 1. l/h is a bit used in the command specification; it is fixed at low or high according to access mode. 2. bank address specification
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 309 of 1560 mar 18, 2011 sh7080 group table 9.21 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (2)-2 setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 11 (32 bits) 01 (12 bits) 10 (10 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a27 a17 a16 a26 a16 unused a15 a25 * 2 * 3 a25 * 2 * 3 a13 (ba1) specifies bank a14 a24 * 2 a24 * 2 a12 (ba0) a13 a23 a13 a11 address a12 a22 l/h * 1 a10/ap specifies address/precharge a11 a21 a11 a9 a10 a20 a10 a8 a9 a19 a9 a7 a8 a18 a8 a6 a7 a17 a7 a5 a6 a16 a6 a4 a5 a15 a5 a3 a4 a14 a4 a2 a3 a13 a3 a1 a2 a12 a2 a0 address a1 a11 a1 unused a0 a10 a0 example of connected memory 512-mbit product (4 mwords 32 bits 4 banks, column 10 bits product): 1 256-mbit product (4 mwords 16 bits 4 banks, column 10 bits product): 2 notes: 1. l/h is a bit used in the command specification; it is fixed at low or high according to access mode. 2. bank address specification 3. only the rasl pin is asserted because the a25 pin specifies the bank address. rasu is not asserted.
section 9 bus state controller (bsc) page 310 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.22 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (3) setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 11 (32 bits) 10 (13 bits) 01 (9 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a26 a17 unused a16 a25 * 2 * 3 a25 * 2 * 3 a14 (ba1) a15 a24 * 2 a24 * 2 a13 (ba0) specifies bank a14 a23 a14 a12 a13 a22 a13 a11 address a12 a21 l/h * 1 a10/ap specifies address/precharge a11 a20 a11 a9 a10 a19 a10 a8 a9 a18 a9 a7 a8 a17 a8 a6 a7 a16 a7 a5 a6 a15 a6 a4 a5 a14 a5 a3 a4 a13 a4 a2 a3 a12 a3 a1 a2 a11 a2 a0 address a1 a10 a1 a0 a9 a0 unused example of connected memory 512-mbit product (4 mwords 32 bits 4 banks, column 9 bits product): 1 256-mbit product (4 mwords 16 bits 4 banks, column 9 bits product): 2 notes: 1. l/h is a bit used in the command specification; it is fixed at l or h according to the access mode. 2. bank address specification 3. only the rasl pin is asserted because the a 25 pin specifies the bank address. rasu is not asserted.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 311 of 1560 mar 18, 2011 sh7080 group table 9.23 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (4)-1 setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 10 (16 bits) 00 (11 bits) 00 (8 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a25 a17 a16 a24 a16 a15 a23 a15 a14 a22 a14 unused a13 a21 * 2 a21 * 2 a12 (ba1) a12 a20 * 2 a20 * 2 a11 (ba0) specifies bank a11 a19 l/h * 1 a10/ap specifies address/precharge a10 a18 a10 a9 a9 a17 a9 a8 a8 a16 a8 a7 a7 a15 a7 a6 a6 a14 a6 a5 a5 a13 a5 a4 a4 a12 a4 a3 a3 a11 a3 a2 a2 a10 a2 a1 a1 a9 a1 a0 address a0 a8 a0 unused example of connected memory 16-mbit product (512 kwords 16 bits 2 banks, column 8 bits product): 1 notes: 1. l/h is a bit used in the command specification; it is fixed at l or h according to the access mode. 2. bank address specification
section 9 bus state controller (bsc) page 312 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.23 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (4)-2 setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 10 (16 bits) 01 (12 bits) 00 (8 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a25 a17 a16 a24 a16 a15 a23 a15 unused a14 a22 * 2 a22 * 2 a13 (ba1) a13 a21 * 2 a21 * 2 a12 (ba0) specifies bank a12 a20 a12 a11 address a11 a19 l/h * 1 a10/ap specifies address/precharge a10 a18 a10 a9 a9 a17 a9 a8 a8 a16 a8 a7 a7 a15 a7 a6 a6 a14 a6 a5 a5 a13 a5 a4 a4 a12 a4 a3 a3 a11 a3 a2 a2 a10 a2 a1 a1 a9 a1 a0 address a0 a8 a0 unused example of connected memory 64-mbit product (1 mword 16 bits 4 banks, column 8 bits product): 1 notes: 1. l/h is a bit used in the command specification; it is fixed at l or h according to the access mode. 2. bank address specification
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 313 of 1560 mar 18, 2011 sh7080 group table 9.24 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (5)-1 setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 10 (16 bits) 01 (12 bits) 01 (9 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a26 a17 a16 a25 a16 a15 a24 a15 unused a14 a23 * 2 a23 * 2 a13 (ba1) a13 a22 * 2 a22 * 2 a12 (ba0) specifies bank a12 a21 a12 a11 address a11 a20 l/h * 1 a10/ap specifies address/precharge a10 a19 a10 a9 a9 a18 a9 a8 a8 a17 a8 a7 a7 a16 a7 a6 a6 a15 a6 a5 a5 a14 a5 a4 a4 a13 a4 a3 a3 a12 a3 a2 a2 a11 a2 a1 a1 a10 a1 a0 address a0 a9 a0 unused example of connected memory 128-mbit product (2 mwords 16 bits 4 banks, column 9 bits product): 1 notes: 1. l/h is a bit used in the command specification; it is fixed at l or h according to the access mode. 2. bank address specification
section 9 bus state controller (bsc) page 314 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.24 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (5)-2 setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 10 (16 bits) 01 (12 bits) 10 (10 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a27 a17 a16 a26 a16 a15 a25 a15 unused a14 a24 * 2 a24 * 2 a13 (ba1) a13 a23 * 2 a23 * 2 a12 (ba0) specifies bank a12 a22 a12 a11 address a11 a21 l/h * 1 a10/ap specifies address/precharge a10 a20 a10 a9 a9 a19 a9 a8 a8 a18 a8 a7 a7 a17 a7 a6 a6 a16 a6 a5 a5 a15 a5 a4 a4 a14 a4 a3 a3 a13 a3 a2 a2 a12 a2 a1 a1 a11 a1 a0 address a0 a10 a0 unused example of connected memory 256-mbit product (4 mwords 16 bits 4 banks, column 10 bits product): 1 notes: 1. l/h is a bit used in the command specification; it is fixed at l or h according to the access mode. 2. bank address specification
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 315 of 1560 mar 18, 2011 sh7080 group table 9.25 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (6)-1 setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 10 (16 bits) 10 (13 bits) 01 (9 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a26 a17 a16 a25 a16 unused a15 a24 * 2 a24 * 2 a14 (ba1) a14 a23 * 2 a23 * 2 a13 (ba0) specifies bank a13 a22 a13 a12 a12 a21 a12 a11 address a11 a20 l/h * 1 a10/ap specifies address/precharge a10 a19 a10 a9 a9 a18 a9 a8 a8 a17 a8 a7 a7 a16 a7 a6 a6 a15 a6 a5 a5 a14 a5 a4 a4 a13 a4 a3 a3 a12 a3 a2 a2 a11 a2 a1 a1 a10 a1 a0 address a0 a9 a0 unused example of connected memory 256-mbit product (4 mwords 16 bits 4 banks, column 9 bits product): 1 notes: 1. l/h is a bit used in the command specification; it is fixed at l or h according to the access mode. 2. bank address specification
section 9 bus state controller (bsc) page 316 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.25 relationship between bsz[1:0], a2row[1:0]/a3row[1:0], a2col[1:0]/a3col[1:0], and address multiplex output (6)-2 setting bsz[1:0] a2row[1:0]/ a3row[1:0] a2col[1:0]/ a3col[1:0] 10 (16 bits) 10 (13 bits) 10 (10 bits) output pin of this lsi row address output cycle column address output cycle sdram pin function a17 a27 a17 a16 a26 a16 unused a15 a25 * 2 * 3 a25 * 2 * 3 a14 (ba1) a14 a24 * 2 a24 * 2 a13 (ba0) specifies bank a13 a23 a13 a12 a12 a22 a12 a11 address a11 a21 l/h * 1 a10/ap specifies address/precharge a10 a20 a10 a9 a9 a19 a9 a8 a8 a18 a8 a7 a7 a17 a7 a6 a6 a16 a6 a5 a5 a15 a5 a4 a4 a14 a4 a3 a3 a13 a3 a2 a2 a12 a2 a1 a1 a11 a1 a0 address a0 a10 a0 unused example of connected memory 512-mbit product (8 mwords 16 bits 4 banks, column 10 bits product): 1 notes: 1. l/h is a bit used in the command specification; it is fixed at l or h according to the access mode. 2. bank address specification 3. only the rasl pin is asserted because the a25 pin specifies the bank address. rasu is not asserted.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 317 of 1560 mar 18, 2011 sh7080 group burst read: a burst read occurs in the following cases with this lsi. ? access size in reading is larger than data bus width ? 16-byte transfer in dmac this lsi always accesses sdram with burst length 1. for example, read access of burst length 1 is performed consecutively 4 times to read 16-byte continuous data from sdram that is connected to a 32-bit data bus. this access is called number of bursts 4. table 9.26 shows the relationship between the access size and the number of bursts. table 9.26 relationship between access size and number of bursts bus width access size number of bursts 8 bits 1 16 bits 1 32 bits 2 16 bits 16 bytes 8 8 bits 1 16 bits 1 32 bits 32 bits 1 16 bytes 4 figures 9.17 and 9.18 show a timing chart in burst read. in burst read, an actv command is output in the tr cycle, the read command is issued in the tc1 to tc3 cycles, the reada command is issued in the tc4 cycle, and the read data is received at the rising edge of the external clock (ck) in the td1 to td4 cycles. the tap cycl e is used to wait for the completion of an auto- precharge induced by the read command in the sd ram. in the tap cycle, a new command will not be issued to the same bank. however, access to another cs space or another bank in the same sdram space is enabled. the number of tap cycl es is specified by the wtrp1 and wtrp0 bits in cs3wcr. in this lsi, wait cycles can be inserted by specifying each bit in csnwcr to connect the sdram in variable frequencies. figure 9.18 shows an example in which wait cy cles are inserted. the number of cycles from the tr cycle where the actv command is output to the tc1 cycle where the reada command is output can be specified using the wtrcd1 and wtrcd0 bits in cs3wcr. if the wtrcd1 and wtrcd0 bits specify one cycle or more, a trw cycle where the nop command is issued is inserted between the tr cycle and tc1 cycle. the number of cycles from the tc1 cycle where the reada command is output to the td1 cycle where the read data is
section 9 bus state controller (bsc) page 318 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group latched can be specified for the cs2 and cs3 spaces independently, using the a2cl1 and a2cl0 bits in cs2wcr or the a3cl1 and a3cl0 bits in cs3wcr. the number of cycles from tc1 to td1 corresponds to the synchronous dram cas latency. the cas latency for the synchronous dram is normally defined as up to three cycles. however, the cas latency in this lsi can be specified as 1 to 4 cycles. this cas latency can be achieved by connecting a latch circuit between this lsi and the sdram. a tde cycle is an idle cycle requi red to transfer the read data into this lsi and occurs once for every burst read or every single read. tc4 ck a25 to a0 csn rdwr rasl , rasu dqmxx d31 to d0 bs tap dackn * 2 tr tc2 tc3 tc1 td4 tde td2 td3 td1 a12/a11 * 1 casl , casu notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.17 burst read ba sic timing (auto-precharge)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 319 of 1560 mar 18, 2011 sh7080 group tc4 ck a25 to a0 csn rdwr rasl , rasu dqmxx d31 to d0 bs tap dackn * 2 tr tc2 tc3 tc1 td4 tde td2 td3 td1 a12/a11 * 1 casl , casu trw tw notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.18 burst read wait speci fication timing (auto-precharge)
section 9 bus state controller (bsc) page 320 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group single read: a read access ends in one cycle when the data bus width is larger than or equal to access size. this is called single read. as the burs t length is set to 1 in sdram burst read/single write mode, only the required data is output. consequently, no unnecessary bus cycles are generated. figure 9.19 shows the single read basic timing. ck a25 to a0 csn rdwr rasl , rasu dqmxx d31 to d0 bs tap dackn * 2 tr tc1 tde td1 a12/a11 * 1 casl , casu notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.19 single read ba sic timing (auto-precharge)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 321 of 1560 mar 18, 2011 sh7080 group burst write: a burst write occurs in the following cases in this lsi. ? access size in writing is larger than data bus width ? 16-byte transfer in dmac this lsi always accesses sdram with burst length 1. for example, write access of burst length 1 is performed continuously 4 times to write 16-byte continuous data to the sdram that is connected to a 32-bit data bus. the relationshi p between the access size and the number of bursts is shown in table 9.26. figure 9.20 shows a timing chart for burst writes. in burst write, an actv command is output in the tr cycle, the writ command is issued in the tc1 to tc3 cycles, and the writa command is issued to execute an auto-precharge in the tc4 cycle. in the write cycle, the write data is output simultaneously with the write command. after the write command with the auto-precharge is output, the trw1 cycle that waits for the auto-precharge initiation is followed by the tap cycle that waits for completion of the auto-precharge induced by the writa command in the sdram. between the trwl and tap cycles, a new command will not be issued to the same bank. however, access to another cs space or another bank in the same sdram space is enabled. the number of cycles in a trw1 cycle is specified by the tr wl1 and trwl0 bits in cs3wcr. the number of cycles in a tap cycle is specified by the wtrp1 and wtrp0 bits in cs3wcr.
section 9 bus state controller (bsc) page 322 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tc4 ck a25 to a0 csn rdwr rasl , rasu dqmxx d31 to d0 bs tap dackn * 2 tr tc2 tc3 tc1 trwl a12/a11 * 1 casl , casu notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.20 basic timing for s dram burst write (auto-precharge)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 323 of 1560 mar 18, 2011 sh7080 group single write: a write access ends in one cycle when the data bus width is larger than or equal to access size. this is called single write. figure 9.21 shows the single write basic timing. ck a25 to a0 csn rdwr rasl , rasu dqmxx d31 to d0 bs tap dackn * 2 tr tc1 trwl a12/a11 * 1 casl , casu notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.21 single write basic timing (auto-precharge) bank active: the sdram bank function is used to support high-speed accesses to the same row address. when the bactv bit in sdcr is 1, accesses are performed using commands without auto-precharge (read or writ). this function is called bank-active function. this function is valid only for area 3. when area 3 is set to bank- active mode, area 2 should be set to normal space or sram with byte selection. when areas 2 and 3 are both set to sdram, auto-precharge mode must be set. in this case, precharging is not performed when the access ends. when accessing the same row address in the same bank, it is possible to issue the read or writ command immediately, without issuing an actv command. as sdram is internally divided into several banks, it is possible to activate one row address in each bank. if the next access is to a different row address, a pre command is first issued to precharge the relevant bank, then when precharging is completed,
section 9 bus state controller (bsc) page 324 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group the access is performed by issuing an actv command followed by a read or writ command. if this is followed by an access to a different row address, th e access time will be longer because of the precharging performed after the access reque st is issued. the number of cycles between issuance of the pre command and the actv command is determined by the wtrp1 and wtrp0 bits in cs3wcr. in a write, when an auto-precharge is performed, a command cannot be issued to the same bank for a period of trwl + tap cycles after issuan ce of the writa command. when bank active mode is used, read or writ commands can be issued su ccessively if the row address is the same. the number of cycles can thus be reduced by trwl + tap cycles for each write. there is a limit on tras, the time fo r placing each bank in the active state. if there is no guarantee that another row address will be accessed within the period in which this value is maintained by program execution, it is necessary to set the refr esh cycle to no more than the value of tras. a burst read cycle without auto-precharge is shown in figure 9.22, a burst read cycle for the same row address in figure 9.23, and a burst read cycle for different row addresses in figure 9.24. similarly, a single write cycle without auto-precharge is shown in figure 9.25, a single write cycle for the same row address in figure 9.26, and a single write cycle for different row addresses in figure 9.27. in figure 9.23, a tnop cycle in which no operation is performed is inserted before the tc cycle that issues the read command. the tnop cycle is inserted to acquire two cycles of cas latency for the dqmxx signal that specifies the read byte in the data read from the sdram. if the cas latency is specified as two cycles or more, the tnop cycle is not inserted because the two cycles of latency can be acquired even if the dqmxx signal is asserted after the tc cycle. when bank active mode is set, if only accesses to the respective banks in area 3 are considered, as long as accesses to the same row address continue , the operation starts with the cycle in figure 9.22 or 9.25, followed by repetition of the cycle in figure 9.23 or 9.26. an access to a different area or bank during this time has no effect. if ther e is an access to a different row address in the bank active state, after this is detected the bus cy cle in figure 9.23 or 9.26 is executed instead of that in figure 9.24 or 9.27. in bank active mode, too, all banks become inactive after a refresh cycle or after the bus is released as the result of bus arbitration.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 325 of 1560 mar 18, 2011 sh7080 group tc4 ck a25 to a0 csn rdwr rasl , rasu dqmxx d31 to d0 bs dackn * 2 tr tc2 tc3 tc1 td4 td2 td3 td1 tde a12/a11 * 1 casl , casu notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.22 burst read timing (no auto-precharge)
section 9 bus state controller (bsc) page 326 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tc4 ck a25 to a0 csn rdwr rasl , rasu dqmxx d31 to d0 bs dackn * 2 tc2 tc3 tc1 tnop td4 tde td2 td3 td1 a12/a11 * 1 casl , casu notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.23 burst read timing (bank active, same row address)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 327 of 1560 mar 18, 2011 sh7080 group tc4 ck a25 to a0 csn rdwr d31 to d0 bs tpw dackn * 2 tp tc2 tc3 tc1 td4 td2 td3 td1 a12/a11 * 1 tde tr rasl , rasu dqmxx casl , casu notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.24 burst read timing (b ank active, different row addresses)
section 9 bus state controller (bsc) page 328 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ck a25 to a0 csn rdwr d31 to d0 bs dackn * 2 tr tc1 a12/a11 * 1 rasl , rasu dqmxx casl , casu notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.25 single write timing (no auto-precharge)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 329 of 1560 mar 18, 2011 sh7080 group ck a25 to a0 csn rdwr d31 to d0 bs dackn * 2 tnop tc1 a12/a11 * 1 rasl , rasu dqmxx casl , casu notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.26 single write timing (bank active, same row address)
section 9 bus state controller (bsc) page 330 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ck a25 to a0 csn rdwr d31 to d0 bs tpw dackn * 2 tp tc1 a12/a11 * 1 tr rasl , rasu dqmxx casl , casu notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.27 single write timing (b ank active, different row addresses)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 331 of 1560 mar 18, 2011 sh7080 group refreshing: this lsi has a function for controlling sdram refreshing. auto-refreshing can be performed by clearing the rmode bit to 0 and setting the rfsh bit to 1 in sdcr. a continuous refreshing can be performed by setting the rrc[2:0] bits in rtcsr. if sdram is not accessed for a long period, self-refresh mode, in which the power consumption is low, can be activated by setting both the rmode bit and the rfsh bit to 1. 1. auto-refreshing the number of refreshings set by bits rrc[2:0] in rtcsr is performed at intervals determined by the input clock selected by bits cks[2:0] in rtcsr, and the value set in rtcor. register settings should be made so as to satisfy the refresh interval stipulation for the sdram used. first make the settings for rtcor, rtcnt, and the rmode and rfsh bits in sdcr, then make the cks[2:0] and rrc[2:0] settings. when the clock is selected by bits cks[2:0], rtcnt starts counting up from the value at that time. the rtcnt value is constantly compared with the rtcor value, and if the two values are the same, a refresh request is generated and an auto-refresh is performed for the number of times specified by the rrc[2:0]. at the same time, rtcnt is cleared to 0 and the count-up is restarted. figure 9.28 shows the auto-refresh cycle tim ing. after starting auto-refreshing, pall command is issued in the tp cycle to make a ll the banks to precharged state from active state when some bank is being precharged. then re f command is issued in the trr cycle after inserting idle cycles of which number is specified by the wtrp[1:0] bits in cs3wcr. a new command is not issued for the duration of the number of cycles specified by the wtrc[1:0] bits in cs3wcr after the trr cycle. the wtrc[1:0] bits must be set so as to satisfy the sdram refreshing cycle time stipulation (trc). an idle cycle is inserted between the tp cycle and trr cycle when the setting value of th e wtrp[1:0] bits in cs3wcr is one cycle or more.
section 9 bus state controller (bsc) page 332 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ck a25 to a0 csn rdwr d31 to d0 bs tpw dackn * 2 tp trr a12/a11 * 1 trc trc trc hi-z r a s l , r a su dqmxx c a s l , c a su notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.28 auto-refresh timing 2. self-refreshing self-refresh mode is a kind of standby mode in which the refresh timing and refresh addresses are generated within sdram. self-refreshing is activated by setting both the rmode bit and the rfsh bit in sdcr to 1. after starting the self-refreshing, pall command is issued in the tp cycle after the completion of the prechargi ng bank. a self command is then issued after inserting idle cycles of which number is specified by the wtrp[1:0] bits in cs3wcr. sdram cannot be accessed while in the self-refresh state. self-refresh mode is cleared by clearing the rmode bit to 0. after self-refresh mode has been cleared, command issuance is disabled for the number of cycles speci fied by the wtrc[1:0] bits in cs3wcr. self-refresh timing is shown in figure 9.29. afte r self-refreshing is cleared, settings must be made so that auto-refreshing is performed at the correct intervals. when self-refreshing is activated from the state in which auto-refreshing is set, auto-refreshing is restarted if the rfsh bit is set to 1 and the rmode bit is cleared to 0 when self-refresh mode is cleared. if the transition from clearing of self-refresh mode to the start of auto-refreshing takes time, making the rtcnt value 1 less than the rtcor value will enable auto-refreshing to be started immediately.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 333 of 1560 mar 18, 2011 sh7080 group after self-refreshing has been specified, the sd ram stays in the self-refresh state even after this lsi enters the standby state. the self-refresh state continues after recovery from the standby state by interrupt. however, the cke and other pins must be driven in the standby state by setting the hizcnt bit in the cmncr register to 1. the self-refresh state is not cleared by a manual reset. in case of a power-on reset, the bus state controller?s registers are initialized, and therefore the self-refresh state is cleared. ck a25 to a0 csn rdwr d31 to d0 bs tpw dackn * 2 tp trr a12/a11 * 1 trc trc trc hi-z trc trc cke r a s l , r a su dqmxx c a s l , c a su notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.29 self-refresh timing
section 9 bus state controller (bsc) page 334 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group relationship between refresh requests and bus cycles: if a refresh request occurs during bus cycle execution, the refresh cycle mu st wait for the bus cycle to be completed. if a refresh request occurs while the bus is released by the bus arbitration function, the refresh will not be executed until the bus mastership is acquired. this lsi has the irqout pin to request the bus while waiting for refresh execution. this lsi continues to assert irqout (low level) until the bus is acquired. if a new refresh request occurs while waiting for the previous refresh request, the previous refresh request is deleted. to refresh correctly, a bus cycle longer than the refresh interval or the bus mastership occupation must be prevented from occurring. if a bus mastership is requested during self-refresh, the bus will not be released until the self- refresh is cleared. power-on sequence: in order to use sdram, mode setting must first be made for sdram after powering on. to perform sdram initialization correctly, the bus state controller registers must first be set, followed by a write to the sdram mode register. in sdram mode register setting, the address signal value at that time is latched by a combination of the csn , rasu , rasl , casu , casl , and rdwr signals. if the value to be set is x, the bus state controller provides for value x to be written to the sdram mode register by performing a word-write to address h'fff84000 + x for area 2 sdram, and to addre ss h'fff85000 + x for area 3 sdram. in this operation, the write data is ignored. to set burst read/single write (burst length 1), burst read/burst write (burst length 1), cas latency 2 and 3, wrap type = sequential, and burst length 1 supported by the lsi, arbitrary data is written in a word-size access to the addresses shown in table 9.27. in this time, 0 is output at the external address pins of a12 and later.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 335 of 1560 mar 18, 2011 sh7080 group table 9.27 access address in sdram mode register write ? setting for area 2 (sdmr2) burst read/single write (burst length 1): data bus width cas latency access address external address pin 16 bits 2 h'fff84440 h'0000440 3 h'fff84460 h'0000460 32 bits 2 h'fff84880 h'0000880 3 h'fff848c0 h'00008c0 burst read/burst write (burst length 1): data bus width cas latency access address external address pin 16 bits 2 h'fff84040 h'0000040 3 h'fff84060 h'0000060 32 bits 2 h'fff84080 h'0000080 3 h'fff840c0 h'00000c0 ? setting for area 3 (sdmr3) burst read/single write (burst length 1): data bus width cas latency access address external address pin 16 bits 2 h'fff85440 h'0000440 3 h'fff85460 h'0000460 32 bits 2 h'fff85880 h'0000880 3 h'fff858c0 h'00008c0 burst read/burst write (burst length 1): data bus width cas latency access address external address pin 16 bits 2 h'fff85040 h'0000040 3 h'fff85060 h'0000060 32 bits 2 h'fff85080 h'0000080 3 h'fff850c0 h'00000c0
section 9 bus state controller (bsc) page 336 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group mode register setting timing is shown in figure 9.30. a pall command (all bank precharge command) is firstly issued. an ref command (auto- refresh command) is then issued 8 times. an mrs command (mode register write command) is fina lly issued. idle cycles, of which number is specified by the wtrp[1:0] bits in cs3wcr, are inserted between the pall and the first ref. idle cycles, of which number is specified by the wtrc[1:0] bits in cs3wcr, are inserted between ref and ref, and between the 8th ref and mrs. idle cycles, of which number is one or more, are inserted between the mr s and a command to be issued next. it is necessary to keep idle time of certain cy cles for sdram after power-on before issuing pall command. refer to the manual of the sdram for the idle time to be needed. when the pulse width of the reset signal is longer than the id le time, mode register setting can be started immediately after the reset, but care should be taken when the pulse width of the reset signal is shorter than the idle time. ck a25 to a0 csn rdwr r asl , rasu dqmxx d31 to d0 bs tpw dackn * 2 tp trr a12/a11 * 1 c asl , casu trc trc tmw hi-z tnop trc trr trc ref ref mrs pall notes: 1. address pin to be connected to pin a10 of sdram. 2. the waveform for dackn is when active low is specified. figure 9.30 sdram mode register write timing (based on jedec)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 337 of 1560 mar 18, 2011 sh7080 group 9.5.7 burst rom (clock asynchronous) interface the burst rom (clock asynchronous) interface is us ed to access a memory with a high-speed read function using a method of address switching called burst mode or page mode. in the burst rom (clock asynchronous) interface, basically the same access as the normal space is performed, but the 2nd and subsequent accesses ar e performed only by changing the address, without negating the rd signal at the end of the first cycle. in th e second and subsequent accesses, addresses are changed at the falling edge of the ck. for the first access cycle, the num ber of wait cycles specified by the w[3:0] bits in csnwcr is inserted. for the second and subsequent access cycl es, the number of wait cycles specified by the bw[1:0] bits in csnwcr is inserted. in the access to the burst rom (clock asynchronous), the bs signal is asserted only to the first access cycle. an external wait input is valid only to the first access cycle. in the single access that does not perform th e burst operation in the burst rom (clock asynchronous) interface, access timing is the same as a normal space. table 9.28 lists the relationship between bus wi dth, access size, and the number of bursts. figure 9.31 shows a timing chart.
section 9 bus state controller (bsc) page 338 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.28 relationship between bus width, access size, and number of bursts bus width ben bit access size number of bursts number of accesses not affected 8 bits 1 1 not affected 16 bits 2 1 not affected 32 bits 4 1 0 16 1 8 bits 1 16 bytes 4 4 not affected 8 bits 1 1 not affected 16 bits 1 1 not affected 32 bits 2 1 0 8 1 16 bits 1 16 bytes 2 4 not affected 8 bits 1 1 not affected 16 bits 1 1 32 bits not affected 32 bits 1 1 not affected 16 bytes 4 1
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 339 of 1560 mar 18, 2011 sh7080 group ck address rd d31 to d0 dack wait cs t1 tw tw tb2 twb tb2 twb tb2 twb t2 rdwr bs figure 9.31 burst rom (c lock asynchronous) access (bus width = 32 bits, 16 byte transfer (number of burst = 4), access wait for the 1st time = 2, acce ss wait for 2nd time and after = 1) 9.5.8 sram interface with byte selection the sram interface with byte selection is a memo ry interface which outputs a byte-selection pin ( wrxx ) in a read/write bus cycle. this interface has 16-bit data pins and accesses srams having upper and lower byte-selection pins, such as ub and lb. when the bas bit in csnwcr is cleared to 0 (i nitial value), the write access timing of the sram interface with byte selection is the same as that for the normal space interface. while in read access of the sram interface with byte selection, the byte-selection signal is output from the wrxx pin, which is different from that for the normal space interface. the basic access timing is shown in figure 9.32. in write access, data is written to memory according to the timing of the byte-selection pin ( wrxx ). for details, refer to the data sheet for the corresponding memory. if the bas bit in csnwcr is set to 1, the wrxx pin and rdwr pin timings change. figure 9.33 shows the basic access timing. in write access, data is written to memory according to the timing of the write enable pin (rdwr). the data hold timing from rdwr negation to data write must be acquired by setting the hw1 and hw0 bits in th e csnwcr register. figure 9.34 shows the access timing when a software wait is specified.
section 9 bus state controller (bsc) page 340 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ck a29 to a0 csn wrxx rdwr rd rd d31 to d0 d31 to d0 rdwr bs dackn * read write t1 t2 high note: * the waveform for dackn is when active low is specified. figure 9.32 basic access timing for s ram with byte selection (bas = 0)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 341 of 1560 mar 18, 2011 sh7080 group ck a29 to a0 csn wrxx rd rd d31 to d0 d31 to d0 rdwr rdwr bs dackn * read write t1 t2 high note: * the waveform for dackn is when active low is specified. figure 9.33 basic access timing for s ram with byte selection (bas = 1)
section 9 bus state controller (bsc) page 342 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group t2 ck a29 to a0 csn rdwr wrxx d31 to d0 bs read write tf dackn * th t1 tw rd rdwr d31 to d0 rd high note: * the waveform for dackn is when active low is specified. figure 9.34 byte selection sram wait timing (bas = 1, sw[1:0] = 01, wr[3:0] = 0001, hw[1:0] = 01)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 343 of 1560 mar 18, 2011 sh7080 group a15 a0 cs oe we i/o15 i/o0 ub lb . . . . . . . . . . . . a17 a2 csn rd rdwr d31 d16 wrhh wrhl d15 d0 wrh wrl this lsi 64k 16 bits sram . . . . a15 a0 cs oe we i/o15 i/o0 ub lb . . . . . . . . . . . . figure 9.35 example of connection with 32-bit data width byte-selection sram this lsi 64k 16 bits sram a15 a0 cs oe we i/o15 i/o0 ub lb . . . . a16 a1 csn rd rdwr d15 d0 wrh wrl . . . . . . . . . . . . figure 9.36 example of connection with 16-bit data width byte-selection sram
section 9 bus state controller (bsc) page 344 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.5.9 pcmcia interface with this lsi, the pcmcia interf ace can be specified in areas 5 and 6. areas 5 and 6 can be used for the ic memory card and i/o card interface de fined in the jeida speci fications version 4.2 (pcmcia2.1 rev. 2.1) by specifying bits type2 to type0 in csnbcr (n = 5 and 6) to b'101. in addition, bits sa1 and sa0 in csnwcr (n = 5 and 6) assign the upper or lower 32 mbytes of each area to ic memory card or i/o card interface. for example, if bits sa1 and sa0 in cs5wcr are set to 1 and cleared to 0, re spectively, the upper 32 mbytes of area 5 are used as ic memory card interface and the lower 32 mbytes are used as i/o card interface. when the pcmcia interface is used, the bus size must be specified as 8 bits or 16 bits using bits bsz1 and bsz0 in cs5bcr or cs6bcr. figure 9.37 shows an example of a connection be tween this lsi and a pcmcia card. to enable hot swapping (insertion and removal of the pcmcia card with the system power turned on), tri- state buffers must be connected be tween the lsi and the pcmcia card. in the jeida and pcmcia standards, operation in big endian mode is not clearly defined. consequently, the provided pcmcia interface in big endian mode is available only for this lsi.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 345 of 1560 mar 18, 2011 sh7080 group this lsi pc card (memory or i/o) a25 to a0 d7 to d0 ce1 ce2 oe we / pgm iord iowr reg a25 to a0 d7 to d0 d15 to d8 rdwr ce1a ce2a rd we iciord iciowr i/o ports wait iois16 g g dir g g dir d15 to d8 wait iois16 cd1, cd2 card detector figure 9.37 example of pcmcia interface connection basic timing for memo ry card interface: figure 9.38 shows the basic timing of the pcmcia ic memory card interface. if areas 5 and 6 are specified as the pcmcia interface, accessing the common memory areas in areas 5 and 6 automati cally accesses the bus with the ic memory card interface. if the external bus frequency (ck) in creases, the setup times and hold times for the address pins (a25 to a0), card enable signals ( ce1a , ce1b , ce2a , ce2b ), and write data (d15 to d0) to the rd and we signals become insufficient. to prevent this error, this lsi enables the setup times and hold times for areas 5 and 6 to be specified independently, using cs5wcr and cs6wcr. in the pcmcia interface, as in the nor mal space interface, a software wait or hardware wait using the wait pin can be inserted. figure 9.39 shows the pcmcia memory bus wait timing.
section 9 bus state controller (bsc) page 346 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tpcm1w ck a25 to a0 cexx rdwr rd d15 to d0 we d15 to d0 bs read write tpcm2 tpcm1 tpcm1w tpcm1w figure 9.38 basic access timing fo r pcmcia memory card interface
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 347 of 1560 mar 18, 2011 sh7080 group tpcm1w ck a25 to a0 cexx rdwr rd d15 to d0 we d15 to d0 bs read write tpcm2 tpcm0 tpcm1 tpcm1w tpcm0w tpcm2w tpcm1w tpcm1w wait figure 9.39 wait timing for pc mcia memory card interface (ted[3:0] = b'0010, teh[3:0] = b'0001, hardware wait = 1) when 32 mbytes of the memory space are used as ic memory card interface, a port is used to generate the reg signal that switches between the common memory and attribute memory. when the memory space used for the ic memory card in terface is 16 mbytes or less, pin a24 can be used as the reg signal by allocating a 16-mbyte common memory space and a 16-mbyte attribute memory space.
section 9 bus state controller (bsc) page 348 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group for 32-mbyte capacity (i/o port is used for reg ) area 5: h'14000000 attribute memory/common memory i/o space attribute memory/common memory i/o space area 5: h'16000000 area 6: h'18000000 area 6: h'1a000000 for 16-mbyte capacity (a24 is used for reg ) area 5: h'14000000 attribute memory i/o space area 5: h'15000000 area 5: h'16000000 h'17000000 area 6: h'18000000 area 6: h'19000000 area 6: h'1a000000 h'1b000000 common memory attribute memory i/o space common memory figure 9.40 example of pcmcia space assignment (cs5wcr.sa[1:0] = b'10, cs6wcr.sa[1:0] = b'10)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 349 of 1560 mar 18, 2011 sh7080 group basic timing for i/o card interface: figures 9.41 and 9.42 show the basic timings for the pcmcia i/o card interface. the i/o card and ic memory card interfaces are sw itched by an address to be accessed. when area 5 is specified as the pcmcia and both bits sa1 and sa0 in cs5wcr are set to 1, i/o card areas are allocated to address ranges from h'16000000 to h'17ffffff and from h'14000000 to h'15ffffff. when area 6 is specified as the pc mcia and both bits sa1 and sa0 in cs6wcr are set to 1, i/o card areas allocated to address ranges from h'1a000000 to h'1bffffff and from h'18000000 to h'19ffffff. in addition, note that this lsi does not support little endian and the iois16 signal must be fixed low. tpci1w ck a25 to a0 cexx rdwr iciord d15 to d0 iciowr d15 to d0 bs read write tpci2 tpci1 tpci1w tpci1w figure 9.41 basic timing for pcmcia i/o card interface
section 9 bus state controller (bsc) page 350 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tpci1w ck a25 to a0 cexx rdwr iciord d15 to d0 iciowr iois16 d15 to d0 bs read write tpci2 tpci0 tpci1 tpci1w tpci0w tpci2w tpci1w tpci1w wait figure 9.42 wait timing for pcmc ia i/o card interface timing (ted[3:0] = b'0010, teh[3:0] = b'0001, hardware wait 1)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 351 of 1560 mar 18, 2011 sh7080 group 9.5.10 burst mpx-i/o interface figure 9.43 shows an example of a connection between the lsi and the burst mpx device. figures 9.44 to 9.47 show the burst mpx space access timings. area 6 can be specified as the burst address/data multiplex i/o (mpx-i/o) interface using the type2 to type0 bits in the cs6bcr register. this mpx-i/o interface en ables the lsi to be easily connected to an external memory controller chip that uses an address/data multiplexed 32- bit single bus. in this case, the address and the access size for the mpx-i/o interface are output to d25 to d0 and d31 to d29, respectively, in ad dress cycles. for the access sizes of d31 to d29, see the description of the cs6wcr register. address pins a25 to a0 are used to output normal addresses. in the burst mpx-i/o interface, the bus size is fixed at 32 bits. the bsz1 and bsz0 bits in cs6bcr must be specified as 32 bits. in the burst mpx-i/o interface, a software wait and hardware wait using the wait pin can be inserted. in read cycles, a wait cycle is inserted auto matically following the address output even if the software wait insertion is specified as 0. this lsi cs bs frame we i/o31 i/o0 wait cs6 bs frame rdwr d31 d0 wait burst mpx device figure 9.43 burst mpx device connection example
section 9 bus state controller (bsc) page 352 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tm1 ck d31 to d0 a25 to a0 frame cs6 rdwr wait tmd1w tmd1 bs dackn * a d note: * the waveform for dackn is when active low is specified. figure 9.44 burst mpx space access timing (s ingle read, no wait or software wait 1)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 353 of 1560 mar 18, 2011 sh7080 group tm1 ck rdwr d31 to d0 a25 to a0 wait frame tmd1w tmd1w tmd1 bs cs6 dackn * ad note: * the waveform for dackn is when active low is specified. figure 9.45 burst mpx space access timing (single write, software wa it 1, hardware wait 1)
section 9 bus state controller (bsc) page 354 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tm1 tmd1w ck d31 to d0 a25 to a0 frame cs6 rdwr wait tmd1 tmd2 tmd3 tmd4 bs dackn * a d0 d1 d2 d3 note: * the waveform for dackn is when active low is specified. figure 9.46 burst mpx space access timing (burst read, no wait or software wait 1)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 355 of 1560 mar 18, 2011 sh7080 group tm1 ck d31 to d0 a25 to a0 f r ame cs6 rdwr w ait tmd1 tmd2 tmd3 tmd4 bs dackn a d0 d1 d2 d3 note: the waveform for dackn is when active low is specified. figure 9.47 burst mpx space access timing (burst write, no wait)
section 9 bus state controller (bsc) page 356 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.5.11 burst rom (clock synchronous) interface the burst-rom (clock synchronous) interface pr ovides high-speed access to rom that has a synchronous burst function. access through this interface is basically performed in the same way as access to the normal space. if this interf ace is used, it must be placed in area 0. for the first access cycle, the numbe r of wait cycles specified by the w3 to w0 bits in cs0wcr are inserted. for the second and subsequent access cycles, the number of wait cycles specified by the bw1 and bw0 bits in cs0wcr are inserted (0 to 3 cycles). in access to the burst rom (clock synchronous), the bs signal is only asserted on the fi rst access cycle. furthermore, an external wait input is only va lid for the first access cycle. set burst length = 8 when the bus width is 16 bits and burst length = 4 when the bus width is 32 bits. the 8-bit bus width is not supported. all r ead access through this interface is in burst mode. for example, in accessing a longword when the bus width is 16 bits, the data from the first two read operations are valid but unnecessary data is read out in the next six dummy operations. this dummy reading slows down memory access rate , lengthening program-execution and dma- transfer times. avoiding this requires the effective use of 16-byte dma transfer. twb ck address cs0 rdwr rd d15 to d0 dackn * bs t1 t2 tw t2b tw t2b twb twb t2b t2b twb twb t2b t2b twb t2b twb wait note: * the waveform for dackn is when active low is specified. figure 9.48 burst rom (clock synchronous) access timing (burst length = 8, access wait for the 1st ti me = 2, access wait for 2nd time after = 1)
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 357 of 1560 mar 18, 2011 sh7080 group 9.5.12 wait between access cycles as the operating frequency of lsis becomes highe r, the off-operation of the data buffer often collides with the next data output when the data output from devices with slow access speed is completed. as a result of these collisions, the reliability of the device is low and malfunctions may occur. a function that avoids data collisions by inserting wait cycles between continuous access cycles has been newly added. the number of wait cycles between access cycles can be set by bits iww[1:0], iwrwd[1:0], iwrws[1:0], iwrrd[1:0], and iwrrs[1:0] in csnbcr, and bits dmaiw[1:0] and dmaiwa in cmncr. the conditions for setting the wait cy cles between access cycles (idle cycles) are shown below. 1. continuous accesses are write-read or write-write 2. continuous accesses are read-write for different spaces 3. continuous accesses are read-write for the same space 4. continuous accesses are read-read for different spaces 5. continuous accesses are read-read for the same space 6. data output cycle of an exte rnal device caused by dma transfer in single address mode is followed by data output from another device that includes this lsi (dmaiwa = 0) 7. data output cycle of an exte rnal device caused by dma transfer in single address mode is followed by any type of access (dmaiwa = 1) besides the wait cycles between access cycles (idle cycles) described above, idle cycles must be inserted to reserve the minimum pulse width for a multiplexed pin ( wrxx ), and an interface with an internal bus. 8. idle cycle of the external bus fo r the interface with the internal bus a. insert one idle cycle imme diately before a write access cycl e after an external bus idle cycle or a read cycle. b. insert one idle cycle to tran sfer the read data to the intern al bus when a read cycle of the external bus terminates. insert two to three idle cycles including the id le cycle in a. for the write cycle immediately after a read cycle. 9. idle cycle of the external bus for accessing different memory for accessing different memory, insert idle cy cles as follows. the byte-selection sram interface with the bas bit = 1 specified is handled as an sdram interface because the wrxx change timing is identical.
section 9 bus state controller (bsc) page 358 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group a. insert one idle cycle to access the interface other than the sdram interface after the write access cycle is performed in the sdram interface. b. insert one idle cycle to access the sdra m interface after the nor mal space interface with the external wait invalidated or the byte-selection sram in terface with the bas bit = 0 specified is accessed. c. insert one idle cycle to access the sd ram interface after the mpx-i/o interface is accessed. d. insert two idle cycles to access the mpx-i/o interface from the external bus that is in the idle status. e. insert one idle cycle to access the mpx-i/o in terface after a read cycle is performed in the normal space interface, byte-selection sram interface with the ba s bit = 0, and the sdram interface. f. insert two idle cycles to access the mpx-i/o interface after a write cycle is performed in the sdram interface. tables 9.29 to 9.34 list the minimum number of id le cycles to be inserted for the normal space interface and the sdram interface. the csnbcr idle setting column in the tables describes the number of idle cycles to be set for iww, iwrwd, iwrws, iwrrd, and iwrrs.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 359 of 1560 mar 18, 2011 sh7080 group table 9.29 minimum number of idle cycles between cpu access cycles in normal space interface bsc register setting when access size is less than bus width when access size exceeds bus width csnwcr. wm setting csnbcr idle setting read to read write to write read to write write to read contin- uous read * 1 contin- uous write * 1 read to read * 2 write to write * 2 read to write * 2 write to read * 2 1 0 1/1/1/1 0/0/0/0 3/3/3/4 0/0/0/0 0/0/0/ 0 0/0/0/0 1/1/1/1 0/0/0/0 3/3/3/4 0/0/0/0 0 0 1/1/1/1 1/1/1/1 3/3/3/4 1/1/1/1 1/1/1/ 1 1/1/1/1 1/1/1/1 1/1/1/1 3/3/3/4 1/1/1/1 1 1 1/1/1/1 1/1/1/1 3/3/3/4 1/1/1/1 1/1/1/ 1 1/1/1/1 1/1/1/1 1/1/1/1 3/3/3/4 1/1/1/1 0 1 1/1/1/1 1/1/1/1 3/3/3/4 1/1/1/1 1/1/1/ 1 1/1/1/1 1/1/1/1 1/1/1/1 3/3/3/4 1/1/1/1 1 2 2/2/2/2 2/2/2/2 3/3/3/4 2/2/2/2 2/2/2/ 2 2/2/2/2 2/2/2/2 2/2/2/2 3/3/3/4 2/2/2/2 0 2 2/2/2/2 2/2/2/2 3/3/3/4 2/2/2/2 2/2/2/ 2 2/2/2/2 2/2/2/2 2/2/2/2 3/3/3/4 2/2/2/2 1 4 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/ 4 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/4 0 4 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/ 4 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/4 notes: the minimum numbers of idle cycles are described sequentially for i :b = 4:1, 3:1, 2:1, and 1:1. 1. minimum number of idle cycles between the word access to address 0 and the word access to address 2 in the 32-bit access with a 16-bit bus width, minimum number of idle cycles between the byte access to address 0 and the byte access to address 1 in the 16-bit access with an 8-bit bus width, minimum number of idle cycles between the byte accesses to address 0, to address 1, to address 2, and to address 3 in the 32-bit access with an 8-bit bus width, and minimum number of idle cycles between consecutive accesses in 16-byte transfer. 2. other than the above cases
section 9 bus state controller (bsc) page 360 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.30 minimum number of idle cycles between access cycles during dmac dual address mode and dtc transfer fo r the normal space interface bsc register setting when access size is less than bus width when access size exceeds bus width csnwcr. wm setting csnbcr idle setting read to write write to read continuous read * 1 read to write * 2 continuous write * 1 write to read * 2 1 0 2 0 0 2 0 0 0 0 2 1 1 2 1 1 1 1 2 1 1 2 1 1 0 1 2 1 1 2 1 1 1 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 1 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 notes: dmac and dtc are driven by b . the minimum number of idle cycles is not affected by changing a clock ratio. 1. minimum number of idle cycles between the word access to address 0 and the word access to address 2 in the 32-bit access with a 16-bit bus width, minimum number of idle cycles between the byte access to address 0 and the byte access to address 1 in the 16-bit access with an 8-bit bus width, minimum number of idle cycles between the byte accesses to address 0, to address 1, to address 2, and to address 3 in the 32-bit access with an 8-bit bus width, and minimum number of idle cycles between consecutive accesses in 16-byte transfer. 2. other than the above cases.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 361 of 1560 mar 18, 2011 sh7080 group table 9.31 minimum number of idle cycles during dmac single address mode transfer to the normal space interface from the external device with dack (1) transfer from the external device wi th dack to the normal space interface bsc register setting * 3 minimum number of idle cycles csnwcr.wm setting cmncr.dmaiwa setting cmncr.dmaiw idle setting when access size is greater than bus width * 1 when access size is less than or equal to bus width * 2 1 0 ? 0 1 * 5 0 0 ? 1 1 1 1 0 0 1 * 5 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 2 2 2 0 1 2 2 2 1 1 4 4 4 0 1 4 4 4
section 9 bus state controller (bsc) page 362 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (2) transfer from the normal space int erface to the external device with dack bsc register setting * 4 minimum number of idle cycles csnwcr.wm setting csnbcr idle setting when access size is greater than bus width * 1 when access size is less than or equal to bus width * 2 1 0 0 2 0 0 1 3 1 1 1 2 0 1 1 3 1 2 2 2 0 2 2 3 1 4 4 4 0 4 4 4 notes: dmac is driven by b . the minimum number of idle cycles is not affected by changing a clock ratio. 1. minimum number of idle cycles between the word access to address 0 and the word access to address 2 in the 32-bit access with a 16-bit bus width, minimum number of idle cycles between the byte access to address 0 and the byte access to address 1 in the 16-bit access with an 8-bit bus width, minimum number of idle cycles between the byte accesses to address 0, to address 1, to address 2, and to address 3 in the 32-bit access with an 8-bit bus width, and minimum number of idle cycles between consecutive accesses in 16-byte transfer. 2. other than the above cases. 3. for single address mode transfer from the external device with dack to the normal space interface, the minimum number of idle cycles is not affected by the iww, iwrwd, iwrws, iwrrd, and iwrrs bits in csnbcr. 4. for single address mode transfer from the normal space interface to the external device with dack, the minimum number of idle cycles is not affected by the dmaiwa and dmaiw bits in cmncr. 5. when the hw[1:0] in the csnwcr is set to specify 2.5 cycles or more, the number of idle cycles will be 0.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 363 of 1560 mar 18, 2011 sh7080 group table 9.32 minimum number of idle cycles between access cycles of cpu, the dmac dual address mode, and dtc for the sdram interface bsc register setting cpu access dmac or dtc access csnbcr idle setting cs3wcr. wtrp setting cs3wcr. trwl setting read to read write to write read to write write to read read to write write to read 0 1 0 1/1/1/1 0/0/0/0 3/3/3/4 0/0/0/0 2 0 0 1 1 1/1/1/1 1/1/1/1 3/3/3/4 1/1/1/1 2 1 0 1 2 1/1/1/1 2/2/2/2 3/3/3/4 2/2/2/2 2 2 0 1 3 1/1/1/1 3/3/3/3 3/3/3/4 3/3/3/3 2 3 0 2 0 2/2/2/2 1/1/1/1 3/3/3/4 1/1/1/1 2 1 0 2 1 2/2/2/2 2/2/2/2 3/3/3/4 2/2/2/2 2 2 0 2 2 2/2/2/2 3/3/3/3 3/3/3/4 3/3/3/3 2 3 0 2 3 2/2/2/2 4/4/4/4 3/3/3/4 4/4/4/4 2 4 0 3 0 3/3/3/3 2/2/2/2 3/3/3/4 2/2/2/2 3 2 0 3 1 3/3/3/3 3/3/3/3 3/3/3/4 3/3/3/3 3 3 0 3 2 3/3/3/3 4/4/4/4 3/3/3/4 4/4/4/4 3 4 0 3 3 3/3/3/3 5/5/5/5 3/3/3/4 5/5/5/5 3 5 0 4 0 4/4/4/4 3/3/3/3 4/4/4/4 3/3/3/3 4 3 0 4 1 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/4 4 4 0 4 2 4/4/4/4 5/5/5/5 4/4/4/4 5/5/5/5 4 5 0 4 3 4/4/4/4 6/6/6/6 4/4/4/4 6/6/6/6 4 6 1 1 0 2/2/2/2 1/1/1/1 3/3/3/4 1/1/1/1 2 1 1 1 1 2/2/2/2 1/1/1/1 3/3/3/4 1/1/1/1 2 1 1 1 2 2/2/2/2 2/2/2/2 3/3/3/4 2/2/2/2 2 2 1 1 3 2/2/2/2 3/3/3/3 3/3/3/4 3/3/3/3 2 3 1 2 0 2/2/2/2 1/1/1/1 3/3/3/4 1/1/1/1 2 1 1 2 1 2/2/2/2 2/2/2/2 3/3/3/4 2/2/2/2 2 2 1 2 2 2/2/2/2 3/3/3/3 3/3/3/4 3/3/3/3 2 3 1 2 3 2/2/2/2 4/4/4/4 3/3/3/4 4/4/4/4 2 4 1 3 0 3/3/3/3 2/2/2/2 3/3/3/4 2/2/2/2 3 2 1 3 1 3/3/3/3 3/3/3/3 3/3/3/4 3/3/3/3 3 3
section 9 bus state controller (bsc) page 364 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bsc register setting cpu access dmac or dtc access csnbcr idle setting cs3wcr. wtrp setting cs3wcr. trwl setting read to read write to write read to write write to read read to write write to read 1 3 2 3/3/3/3 4/4/4/4 3/3/3/4 4/4/4/4 3 4 1 3 3 3/3/3/3 5/5/5/5 3/3/3/4 5/5/5/5 3 5 1 4 0 4/4/4/4 3/3/3/3 4/4/4/4 3/3/3/3 4 3 1 4 1 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/4 4 4 1 4 2 4/4/4/4 5/5/5/5 4/4/4/4 5/5/5/5 4 5 1 4 3 4/4/4/4 6/6/6/6 4/4/4/4 6/6/6/6 4 6 2 1 0 3/3/3/3 2/2/2/2 3/3/3/4 2/2/2/2 3 2 2 1 1 3/3/3/3 2/2/2/2 3/3/3/4 2/2/2/2 3 2 2 1 2 3/3/3/3 2/2/2/2 3/3/3/4 2/2/2/2 3 2 2 1 3 3/3/3/3 3/3/3/3 3/3/3/4 3/3/3/3 3 3 2 2 0 3/3/3/3 2/2/2/2 3/3/3/4 2/2/2/2 3 2 2 2 1 3/3/3/3 2/2/2/2 3/3/3/4 2/2/2/2 3 2 2 2 2 3/3/3/3 3/3/3/3 3/3/3/4 3/3/3/3 3 3 2 2 3 3/3/3/3 4/4/4/4 3/3/3/4 4/4/4/4 3 4 2 3 0 3/3/3/3 2/2/2/2 3/3/3/4 2/2/2/2 3 2 2 3 1 3/3/3/3 3/3/3/3 3/3/3/4 3/3/3/3 3 3 2 3 2 3/3/3/3 4/4/4/4 3/3/3/4 4/4/4/4 3 4 2 3 3 3/3/3/3 5/5/5/5 3/3/3/4 5/5/5/5 3 5 2 4 0 4/4/4/4 3/3/3/3 4/4/4/4 3/3/3/3 4 3 2 4 1 4/4/4/4 4/4/4/4 4/4/4/4 4/4/4/4 4 4 2 4 2 4/4/4/4 5/5/5/5 4/4/4/4 5/5/5/5 4 5 2 4 3 4/4/4/4 6/6/6/6 4/4/4/4 6/6/6/6 4 6 4 1 0 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 1 1 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 1 2 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 1 3 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 2 0 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 2 1 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 365 of 1560 mar 18, 2011 sh7080 group bsc register setting cpu access dmac or dtc access csnbcr idle setting cs3wcr. wtrp setting cs3wcr. trwl setting read to read write to write read to write write to read read to write write to read 4 2 2 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 2 3 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 3 0 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 3 1 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 3 2 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 3 3 5/5/5/5 5/5/5/5 5/5/5/5 5/5/5/5 5 5 4 4 0 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 4 1 5/5/5/5 4/4/4/4 5/5/5/5 4/4/4/4 5 4 4 4 2 5/5/5/5 5/5/5/5 5/5/5/5 5/5/5/5 5 5 4 4 3 5/5/5/5 6/6/6/6 5/5/5/5 6/6/6/6 5 6 note: the minimum numbers of idle cycles in cpu access are described sequentially for i :b = 4:1, 3:1, 2:1, and 1:1. dmac and dtc are driven by b . the minimum number of idle cycles is not affected by changing a clock ratio.
section 9 bus state controller (bsc) page 366 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 9.33 minimum number of idle cycles between access cycles of the dmac single address mode for the sdram interface (1) transfer from the external device wi th dack to the sdram interface: bsc register setting * 1 cmncr.dmaiw setting cs3wcr.wtrp setting cs3wcr.trwl setting minimum number of idle cycles 0 1 0 1 * 2 0 1 1 1 0 1 2 2 0 1 3 3 0 2 0 1 0 2 1 2 0 2 2 3 0 2 3 4 0 3 0 2 0 3 1 3 0 3 2 4 0 3 3 5 0 4 0 3 0 4 1 4 0 4 2 5 0 4 3 6 1 1 0 1 1 1 1 1 1 1 2 2 1 1 3 3 1 2 0 1 1 2 1 2 1 2 2 3 1 2 3 4 1 3 0 2 1 3 1 3 1 3 2 4 1 3 3 5 1 4 0 3
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 367 of 1560 mar 18, 2011 sh7080 group bsc register setting * 1 cmncr.dmaiw setting cs3wcr.wtrp setting cs3wcr.trwl setting minimum number of idle cycles 1 4 1 4 1 4 2 5 1 4 3 6 2 1 0 2 2 1 1 2 2 1 2 2 2 1 3 3 2 2 0 2 2 2 1 2 2 2 2 3 2 2 3 4 2 3 0 2 2 3 1 3 2 3 2 4 2 3 3 5 2 4 0 3 2 4 1 4 2 4 2 5 2 4 3 6 4 1 0 4 4 1 1 4 4 1 2 4 4 1 3 4 4 2 0 4 4 2 1 4 4 2 2 4 4 2 3 4 4 3 0 4 4 3 1 4 4 3 2 4 4 3 3 5 4 4 0 4 4 4 1 4
section 9 bus state controller (bsc) page 368 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bsc register setting * 1 cmncr.dmaiw setting cs3wcr.wtrp setting cs3wcr.trwl setting minimum number of idle cycles 4 4 2 5 4 4 3 6 notes: dmac is driven by b . the minimum number of idle cycles is not affected by changing a clock ratio. 1. for single address mode transfer from the external device with dack to the sdram interface, the minimum number of idle cycles is not affected by the iww, iwrwd, iwrws, iwrrd, and iwrrs bits in csnbcr. 2. set the wtrcd bits to select 1 cycle or less.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 369 of 1560 mar 18, 2011 sh7080 group table 9.34 minimum number of idle cycles between access cycles of the dmac single address mode for the sdram interface (2) transfer from the sdram interface to the external device with dack bsc register setting * cs3bcr idle setting cs3wcr.wtrp setting minimum number of idle cycles 0 1 3 0 2 3 0 3 3 0 4 4 1 1 3 1 2 3 1 3 3 1 4 4 2 1 3 2 2 3 2 3 3 2 4 4 4 1 5 4 2 5 4 3 5 4 4 5 notes: dmac is driven by b . the minimum number of idle cycles is not affected by changing a clock ratio. * other than the following cases. single address mode transfer from the external device with dack to the sdram interface, where the minimum number of idle cycles is not affected by the iww, iwrwd, iwrws, iwrrd, and iwrrs bits in csnbcr. cmncr.dmaiwa = 0, where the setting is identical to cmncr.dmaiw[1:0] in table 9.33.
section 9 bus state controller (bsc) page 370 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.5.13 bus arbitration this lsi owns the bus mastership in normal stat e and releases the bus only when receiving a bus request from an external device. this lsi has th ree bus masters: cpu, dmac, and dtc. the bus mastership is given to these bus master s in accordance with th e following priority. request for bus mastership by external device ( breq ) > cpu > dtc > dmac > cpu. however, when dtc or dmac is requesting the bus mastership, the cpu does not obtain the bus mastership continuously. the following cases should be noted regarding the external space access request from the cpu. 1. when the csstp2 bit is 1 in the bus function extending register (bscher), the external space access request from the cpu has lower priority than the burst transfer request from the dmac and dtc transfer request with dtlock = 0 in the bus function extending register (bscher). 2. when an activation request is generated in the order of dmac and dtc while an external space is being accessed by the cpu, dma transfer is executed first and then dtc transfer. figure 9.49 shows the bus arbitration when th e dtc and dmac compete while an external space is accessed by the cpu.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 371 of 1560 mar 18, 2011 sh7080 group dtc dmac priority determination priority determination dtc dmac dtc dmac transfer is started for the request that is generated first transfer is started for the request that is generated first transfer is started in accordance with the bus priority (dtc>dmac) transfer is started in accordance with the bus priority (dtc>dmac) internal bus external space access from cpu external space access from cpu external space access from cpu access to on-chip peripheral module from cpu dmac dtc dtc activation request ? when activation request is generated in the order of dmac and dtc during external space access from cpu [reference] when activation request is generated in the order of dmac and dtc during access to an on-chip peripheral module by cpu ? when activation request is generated in the order of dtc and dmac during external space access from cpu ? when activation request is generated for dtc and dmac at the same time during external space access from cpu dmac activation request internal bus dtc activation request dmac activation request internal bus dtc activation request dmac activation request internal bus dtc activation request dmac activation request figure 9.49 bus arbitration when dtc a nd dmac compete during external space access from cpu
section 9 bus state controller (bsc) page 372 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group in addition, because the write buffer operates as described in section 9.5.14 (2), access in view of lsi internal bus master, arbitration between the cpu and dtc/dmac is different depending on whether the external space access by the cpu is a write or read access. figure 9.50 shows the bus arbitration when a dtc or dmac activation request is generated while an external space is accessed by cpu.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 373 of 1560 mar 18, 2011 sh7080 group dtc/dmac dtc/dmac dtc/dmac read access to external space from cpu read access to external space from cpu write to external space from cpu write to external space from cpu write to external space 1 from cpu write access to external space 1 from cpu write to external space 2 from cpu write access to external space 2 from cpu write access to external space from cpu write access to external space from cpu read access to external space from cpu read access to external space from cpu dtc/dmac activation request is generated in this period. dtc/dmac activation request is generated in this period. dtc/dmac activation request is generated in this period. dtc/dmac activation request is generated in this period. dtc/dmac internal bus external bus external bus external bus external bus ? when dtc/dmac activation request is generated during read access to external space from cpu ? when dtc/dmac activation request is generated during write access to external space from cpu (1) ? when dtc/dmac activation request is generated during write access to external space from cpu (2) (when external space read request is generated by cpu during execution of write access to external space from cpu) ? when dtc/dmac activation request is generated during write access to external space from cpu (3) (when external space write request is generated by cpu during execution of write access to external space from cpu) dtc/dmac activation request dtc/dmac activation request dtc/dmac activation request dtc/dmac activation request internal bus internal bus internal bus figure 9.50 bus arbitration when dtc or dmac activation request occurs during external space access from cpu
section 9 bus state controller (bsc) page 374 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group the states that do not allow bus arbitration are shown below. 1. between the read and write cycles of a tas instruction 2. multiple bus cycles generated when the data bus width is smaller than the access size (for example, between bus cycles when longword acce ss is made to a memory with a data bus width of 8 bits) 3. 16-byte transfer by the dmac to prevent device malfunction while the bus mastersh ip is transferred to the external device, the lsi negates all of the bus control signals before bus release. when the bus mastership is received, all of the bus control signals are first negated and then driven appropriately. in addition, to prevent noise while the bus control signal is in the high impedance state, pull-up resistors must be connected to these control signals. bus mastership is transferred to the external device at the boundary of bus cycles. namely, bus mastership is released immediat ely after receiving a bus request when a bus cycle is not being performed. the release of bus mastership is delayed until the bus cycle is complete when a bus cycle is in progress. even when from outside the lsi it looks like a bus cycle is not being performed, a bus cycle may be performing internally, started by inserting wait cycles between access cycles. therefore, it cannot be immediately determined whether or not bus mastership has been released by looking at the csn signal or other bus control signals. the external bus release by the breq and back signal handshaking requires some overhead. if the slave has many tasks, multiple bus cycles shoul d be executed in a bus mastership acquisition. reducing the cycles required for master to slave bu s mastership transitions streamlines the system design. the lsi has the bus mastership until a bus request is received from the external device. upon acknowledging the assertion (low level) of the external bus request signal breq , the lsi releases the bus at the completion of the current bus cycle and asserts the back signal. after the lsi acknowledges the negation (high level) of the breq signal that indicates the slave has released the bus, it negates the back signal and resumes the bus usage. when the sdram interface is used , an all bank precharge command (pall) is issued if any active banks exist and releases the bus after completion of the pall command. processing by this lsi continues even while bus ma stership is released to an external device, unless an external device is accesse d. when an external device is accessed, the lsi enters the state of waiting for bus mastership to be returned. while the bus is released, sleep mode, software standby mode, and deep software standby mode cannot be entered.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 375 of 1560 mar 18, 2011 sh7080 group the bus release sequence is as follows. the address bus and data bus are placed in a high- impedance state synchronized with the rising edge of ck. the bus mastership acknowledge signal is asserted 0.5 cycles after the above high impeda nce state, synchronized with the falling edge of ck. the bus control signals such as csn are placed in the high-impedance state at subsequent rising edges of ck. these bus control signals go high one cycle before being placed in the high- impedance state. bus request signals are sampled at the falling edge of ck. by setting the hizcnt bit in cmnr, the cke, rasu , rasl , casu , and casl can be continued to be driven even after the bus is released using the va lues immediately befo re the bus release. the sequence for reclaiming the bus mastership fr om an external device is described below. at 1.5 cycles after the negation of breq is detected at the falling edge of ck, the bus control signals are driven high. the bus acknowledge signa l is negated at the next falling edge of the clock. the fastest timing at which actual bus cycles can be resumed after bus control signal assertion is at the rising edge of the ck where address and data signals are driven. figure 9.51 shows the bus arbitration timing in master mode. in an original external device designed by the user, multiple bus accesses may be generated continuously to reduce the overhead caused by bus arbitration. in this case, to execute sdram refresh correctly, the external device must be de signed to release the bus mastership within the refresh interval time. this lsi has the irqout pin to request the bus while waiting for refresh execution. this lsi continues to assert irqout (low level) until the bus is acquired. when the external device receives this signal and releases the bus, th e lsi acquires the bus and executes refresh. after breq assertion (low level; bus request), the breq signal should be negated (high level; bus release) only after the back is asserted (low level; bus acknowledge). if breq is negated before back is asserted, back may be asserted only for one cycle depending on the breq negation timing, and a bus conflict may occur between the external device and this lsi. ck other bus control signals breq back a29 to a0 d31 to d0 csn figure 9.51 bus arbitration timing
section 9 bus state controller (bsc) page 376 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group acceptance of mastership for the dmac in bus arbitration takes 1b , so a nop 1b in duration is inserted on the i bus. acceptance of mastership for the dtc in bus arb itration does not require the insertion of a nop, so bus access proceeds continuously. 9.5.14 others (1) reset the bus state controller (bsc) can be initialized completely only at a power-on reset. at a power- on reset, all signals are negated and output buffers are turned off regardless of the bus cycle state. all control registers are initialized. in standby, sleep, and manual reset, control regist ers of the bus state cont roller are not initialized. at a manual reset, the current bus cycle being ex ecuted is completed and then the access wait state is entered. if a 16-byte transfer is performed by the dmac is executed, the current access is cancelled in longword units becau se the access request is cancelled by the bus master at a manual reset. since the rtcnt continues counting up during manual reset signal assertion, a refresh request occurs to initiate the refresh cycle. however, a bus arbitration request by the breq signal cannot be accepted during manual reset signal assertion. (2) access in view of lsi internal bus master there are three types of lsi internal buses: l bus, i bus, and peripheral bus. the cpu is connected to the l bus. the dmac, dtc, and bus state controller are connected to the i bus. low-speed peripheral modules are connected to the peripheral bus. on-chip memories are connected bidirectionally to the l bus and i bus. for an access of an external space or an on-chip peripheral module, the access is initiated via the i bus. thus, the dmac and dtc can be activated without bus arbitration with the cpu while the cpu is accessing an on-chip memory. since the bus state controller (bsc) incorporates a one-stage write buffer, the bsc can execute an access via the i bus before the previous external bu s cycle is completed in a write cycle. if the on- chip peripheral module is read or written after the external low-speed memory is written, the on- chip peripheral module can be accessed before th e completion of the exte rnal low-speed memory write cycle. in read cycles, the cpu is placed in the wait state until read operation has been completed. to continue the process after the data write to the device has been completed, perform a dummy read to the same address to check for completion of the write before the next process to be executed.
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 377 of 1560 mar 18, 2011 sh7080 group the write buffer of the bsc functions in the same way for an access by the dmac and dtc. accordingly, to perform dual address dma transfers, the next read cycle is initiated before the previous write cycle is completed. note, however, that if both the dma source and destination addresses exist in external memory space, the next read cycle will not be initiated until the previous write cycle is completed. since access cannot be performed correctly if any bsc register values are modified while the write buffer is operating, do not modify bsc regi sters immediately after a write access. if the bsc register need to be modified immediately after a write access, ex ecute dummy read to confirm the completion of the write access, th en modify the bsc register.
section 9 bus state controller (bsc) page 378 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.5.15 access to on-chip flash and on-chip ram by cpu access to the on-chip flash for read is synchronized with i clock and is executed in one clock cycle. for details on programming and erasing, see section 23, flash memory. access to the on-chip ram for read/write is synchronized with i clock and is executed in one clock cycle. for details, see section 25, ram. 9.5.16 access to on-chip peripheral i/o registers by cpu table 9.35 shows the number of cycles required for access to the on-chip peripheral i/o registers by the cpu. table 9.35 number of cycles for acces s to on-chip peripheral i/o registers number of access cycles write (3 + n) i + (1 + m) b + 2 p read (3 + n) i + (1 + m) b + 2 p + 2 i notes: 1. when i :b = 8:1, n = 0 to 7. when i :b = 4:1, n = 0 to 3. when b :p = 4:1, m = 0 to 3. when i :b = 3:1, n = 0 to 2. when b :p = 3:1, m = 0 to 2. when i :b = 2:1, n = 0 to 1. when b :p = 2:1, m = 0 to 1. when i :b = 1:1, n = 0. when b :p = 1:1, m = 0. n and m depend on the internal execution state. 2. the clock ratio of mi and mp does not affect the number of access cycles. synchronous logic and a layered bus structure have been adopted for this lsi. data on each bus are input and output in synchronization with rising edges of the corresponding clock signal. the l bus, i bus, and peripheral bus are synchronized with the i , b , and p clock, respectively. figure 9.52 shows an example of the timing of write access to a register in 2p cycle access with the connected peripheral bus width of 16 bits when i :b :p = 4:2:2. in access to the on-chip peripheral i/o registers, the cp u requires three cycles of i for preparation of data transfer to the i bus after the data has been output to the l bus. afte r these three cycles, data can be transferred to the i bus in synchronization with rising edges of b . however, as there are two i clock cycles in a single b clock cycle when i : b = 4:2, transfer of data from the l bus to the i bus takes (3 + n) i (n = 0 to 1) (3 i is indicated in figure 9.52). the relation between the timing of data output to the l bus and the rising edge of b depends on the state of program execution. in the
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 379 of 1560 mar 18, 2011 sh7080 group case shown in the figure, where n = 0 and m = 0, the time required for access is 3 i + 1 b + 2 p . i l bus b i bus p peripheral bus (3 + n) i (1 + m) b 2 p figure 9.52 timing of write access to on-chip peripheral i/o registers when i :b :p = 4:2:2 figure 9.53 shows an example of timing of read access to the peripheral bus when i :b :p = 4:2:1. transfer from the l bus to the peripheral bus is performed in the same way as for writing. in the case of reading, however, values output onto the peripheral bus need to be transferred to the cpu. although transfers from the peripheral bus to the i bus and from the i bus to the l bus are performed in synchronization with the rising edge of the respective bus clocks, a period of 2 i is actually required because i b p . in the case shown in the figure, where n = 0 and m = 1, the time required for access is 3 i + 2 b + 2 p + 2 i . (3 + n) i (1 + m) b 2 p 2 i i l bus b i bus p peripheral bus figure 9.53 timing of read access to on-chip peripheral i/o registers when i :b :p = 4:2:1
section 9 bus state controller (bsc) page 380 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9.5.17 access to external memory by cpu table 9.36 shows the number of cycles required for access to the external memory by the cpu. as the table shows, the number of cycles varies w ith the clock ratio, the acce ss size, the external bus width of the lsi, and the setting for wait insertion. for details on the wait-insertion setting, see section 9.4, register descriptions. table 9.36 number of ex ternal access cycles external bus width access size write/read number of access cycles write (1 + n) i + (3 + m) b byte read (1 + n) i + (3 + m) b + 1 i write (1 + n) i + (3 + m) b + 1 (2 + o) b word read (1 + n) i + (3 + m) b + 1 (2 + o) b + 1 i write (1 + n) i + (3 + m) b + 3 (2 + o) b 8 bits longword read (1 + n) i + (3 + m) b + 3 (2 + o) b + 1 i write (1 + n) i + (3 + m) b byte/word read (1 + n) i + (3 + m) b + 1 i write (1 + n) i + (3 + m) b + 1 (2 + o) b 16 bits longword read (1 + n) i + (3 + m) b + 1 (2 + o) b + 1 i write (1 + n) i + (3 + m) b 32 bits byte/word/ longword read (1 + n) i + (3 + m) b + 1 i note: n: when i :b = 8:1, n = 0 to 7. when i :b = 4:1, n = 0 to 3. when i :b = 3:1, n = 0 to 2. when i :b = 2:1, n = 0 to 1. when i :b = 1:1, n = 0. m, o: m: wait setting, o: wait setting + idle setting for details, see section 9.4, register descriptions. synchronous logic and a layered bus structure have been adopted fo r this lsi circuit. data on each bus are input and output in synchronization with rising edges of the corresponding clock signal. the l bus and i bus are synchronized with the i and b clocks, respectively. figure 9.54 shows an example of the timing of write access to a word of data over th e external bus, with a bus-width of 8 bits, when i :b = 2:1. once the cpu has output the data to the l bus, data are transferred to the i bus in synchronization with rising edges of b . there are two i clock cycles in a single b clock cycle when i : b = 2:1. thus, when i : b = 2:1, data transfer from the l bus to the i bus
section 9 bus state controller (bsc) r01uh0198ej0500 rev. 5.00 page 381 of 1560 mar 18, 2011 sh7080 group takes (1 + n) i (n = 0 to 1) (2 i is indicated in figure 9.54). the relation between the timing of data output to the l bus and the rising edge of b depends on the state of program execution. data output to the i bus are transferred to the external bus after one cycle of b . external access to each data takes at least two cycles, and this can be prolonged by the bsc register settings (m and o in the formulae for number of access cycles). in the case shown in figure 9.54, word data is written with a bus-width of 8 bits, two external accesses are required. in the example, since n = 1, m = 0, and o = 0, access takes 2 i + 3 b + 2 b . i l bus b (ck) i bus external bus (1 + n) i (3 + m) b (2 + o) b first external access this access period is prolonged by a period of m. this access period is prolonged by a period of o. second external access in this example, m = 0 and o = 0. for the numbers of cycles by which m and o prolong the access process, see section 9.4, register descriptions. figure 9.54 timing of write access to word data in external memory when i :b = 2:1 and external bus width is 8 bits figure 9.55 shows an example of the timing of r ead access when the external bus width is greater than or equal to the data width and i :b = 4:1. transfer from the l bus to the external bus is performed in the same way as for write access. in the case of reading, however, values output onto the external bus must be transfer red to the cpu. transfers from the external bus to the i bus and from the i bus to the l bus are again performed in synchronization with rising edges of the respective bus clocks. in the actual operation, transfer from the external bus to the l bus takes one period. in the case shown in the figure, where n = 2 and m = 0, access takes 3 i + 3 b + 1 i .
section 9 bus state controller (bsc) page 382 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group i l bus b (ck) i bus external bus external access this access period is prolonged by a period of m. in this example, m = 0. for the numbers of cycles by which m prolongs the access process, see section 9.4, register descriptions. (1 + n) i (3 + m) b 1 i figure 9.55 timing of read access with condition i :b = 4:1 and external bus width data width for access by the dmac or the dtc, the access cycles are obtained by subtracting the cycles of i required for l-bus access from the access cycles required for access by the cpu.
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 383 of 1560 mar 18, 2011 sh7080 group section 10 direct memory access controller (dmac) this lsi includes the direct memory access controller (dmac). the dmac can be used in place of the cpu to perform high-speed transfers between external devices that have dack (transfer request ackno wledge signal), external memory, on-chip memory, memory-mapped external devices, and on-chip peripheral modules. 10.1 features ? four channels (external requests can be received) ? 4-gbyte physical address space ? data transfer unit is selectable: byte, word (2 bytes), longword (4 bytes), and 16 bytes (longword 4) ? maximum transfer count: 16,777,216 transfers ? address mode: dual address mode or single address mode can be selected. ? transfer requests: external request, on-chip peripheral module request, or auto request can be selected. ? selectable bus modes: cycle steal mode (normal mode and intermittent mode) or burst mode can be selected. ? selectable channel priority levels: the channel priority levels are selectable between fixed mode and round-robin mode. ? interrupt request: an interrupt request can be generated to the cpu after transfers end by the specified counts. ? external request detection: there are following four types of dreq input detection. ? low level detection ? high level detection ? rising edge detection ? falling edge detection ? transfer request acknowledge signal: active levels for dack can be set independently.
section 10 direct memory access controller (dmac) page 384 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 10.1 shows the block diagram of the dmac. on-chip memory interrupt controller on-chip peripheral module iteration control register control start-up control request priority control bus interface sarn darn dmatcrn chcrn dmaor dma transfer request signal dma transfer acknowledge signal dein bus state controller external memory external i/o (memory mapped) dack0 to dack3, tend0, tend1 dreq0 to dreq3 external i/o (with acknowledge) peripheral bus internal bus dmac module [legend] sarn: darn: dmatcrn: chcrn: dmaor: dein: n: dma source address register dma destination address register dma transfer count register dma channel control register dma operation register dma transfer-end interrupt request to the cpu 0, 1, 2, 3 cpu/dtc/dmac request distinguish dtc figure 10.1 block diagram of dmac
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 385 of 1560 mar 18, 2011 sh7080 group 10.2 input/output pins the external pins for the dmac are described below. table 10.1 lists the configuration of the pins that are connected to ex ternal bus. the dmac has pins for 4 channels for external bus use. table 10.1 pin configuration channel pin name symbol i/o function dma transfer request dreq0 input dma transfer request input from external device to channel 0 dma transfer request acknowledge dack0 output dma transfer request acknowledge output from channel 0 to external device 0 dma transfer end tend0 output dma transfer end output for channel 0 dma transfer request dreq1 input dma transfer request input from external device to channel 1 dma transfer request acknowledge dack1 output dma transfer request acknowledge output from channel 1 to external device 1 dma transfer end tend1 output dma transfer end output for channel 1 dma transfer request dreq2 input dma transfer request input from external device to channel 2 2 dma transfer request acknowledge dack2 output dma transfer request acknowledge output from channel 2 to external device 3 dma transfer request dreq3 input dma transfer request input from external device to channel 3 dma transfer request acknowledge dack3 output dma transfer request acknowledge output from channel 3 to external device
section 10 direct memory access controller (dmac) page 386 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 10.3 register descriptions the dmac has the following registers. see section 27, list of registers, for the addresses of these registers and the state of them in each processing status. th e sar for channel 0 is expressed such as sar_0. table 10.2 register configuration channel register name abbrevia- tion r/w initial value address access size 0 dma source address register_0 sar_0 r/w h'00000000 h'ffffeb20 16, 32 dma destination address register_0 dar_0 r/w h'00000000 h'ffffeb24 16, 32 dma transfer count register_0 dmatcr_0 r/w h'00000000 h'ffffeb28 16, 32 dma channel control register_0 chcr_0 r/w h'00000000 h'ffffeb2c 8, 16, 32 1 dma source address register_1 sar_1 r/w h'00000000 h'ffffeb30 16, 32 dma destination address register_1 dar_1 r/w h'00000000 h'ffffeb34 16, 32 dma transfer count register_1 dmatcr_1 r/w h'00000000 h'ffffeb38 16, 32 dma channel control register_1 chcr_1 r/w h'00000000 h'ffffeb3c 8, 16, 32 2 dma source address register_2 sar_2 r/w h'00000000 h'ffffeb40 16, 32 dma destination address register_2 dar_2 r/w h'00000000 h'ffffeb44 16, 32 dma transfer count register_2 dmatcr_2 r/w h'00000000 h'ffffeb48 16, 32 dma channel control register_2 chcr_2 r/w h'00000000 h'ffffeb4c 8, 16, 32
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 387 of 1560 mar 18, 2011 sh7080 group channel register name abbrevia- tion r/w initial value address access size 3 dma source address register_3 sar_3 r/w h'00000000 h'ffffeb50 16, 32 dma destination address register_3 dar_3 r/w h'00000000 h'ffffeb54 16, 32 dma transfer count register_3 dmatcr_3 r/w h'00000000 h'ffffeb58 16, 32 dma channel control register_3 chcr_3 r/w h'00000000 h'ffffeb5c 8, 16, 32 common dma operation register dmaor r/w h'0000 h'ffffeb60 8, 16 bus function extending register bscehr r/w h'0000 h'ffffe89a 8, 16 10.3.1 dma source address registers_0 to _3 (sar_0 to sar_3) sar are 32-bit readable/w ritable registers that specify the source address of a dma transfer. during a dma transfer, these registers indicate the next source address. when the data is transferred from an external device with the dack in single address mode, the sar is ignored. to transfer data in 16 bits or in 32 bits, specify the address with 16-bit or 32-bit address boundary. when transferring data in 16-byte units, a 16-byte boundary must be set for the source address value. the initial value is undefined. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- ----------------
section 10 direct memory access controller (dmac) page 388 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 10.3.2 dma destination address registers_0 to _3 (dar_0 to dar_3) dar are 32-bit readable/writable re gisters that specify the destina tion address of a dma transfer. during a dma transfer, these registers indicate the next destination address. when the data is transferred from an external device with the dack in single address mode, the dar is ignored. to transfer data in 16 bits or in 32 bits, specify the address with 16-bit or 32-bit address boundary. when transferring data in 16-byte units, a 16-byte boundary must be set for the destination address value. the initial value is undefined. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- ---------------- 10.3.3 dma transfer count registers_0 to _3 (dmatcr_0 to dmatcr_3) dmatcr are 32-bit readable/writable registers th at specify the dma transfer count. the number of transfers is 1 when the setting is h'00000001, 16,777,215 when h'00ffffff is set, and 16,777,216 (the maximum) when h'00000000 is set. during a dma transfer, these registers indicate the remaining transfer count. the upper eight bits of dmatcr are always read as 0, and the write value should always be 0. to transfer data in 16 bytes, one 16-byte transfer (128 bits) counts one. the initial value is undefined. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrr/wr/wr/wr/wr/wr/wr/wr/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- ----------------
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 389 of 1560 mar 18, 2011 sh7080 group 10.3.4 dma channel control registers_0 to _3 (chcr_0 to chcr_3) chcr are 32-bit readable/writable registers that control the dma transfer mode. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 0000000000000000 rrrrrrrrr/wr/wrrrrr/wr/w 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/(w) * r/w note: writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. * - - - - - - - - do tl - - - - am al dm[1:0] sm[1:0] rs[3:0] dl ds tb ts[1:0] ie te de bit bit name initial value r/w descriptions 31 to 24 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 23 do 0 r/w dma overrun selects whether dreq is detected by overrun 0 or by overrun 1. 0: detects dreq by overrun 0 1: detects dreq by overrun 1 22 tl 0 r/w transfer end level this bit specifies the tend signal output is high active or low active. 0: low-active output of tend 1: high-active output of tend 21, 20 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 19 ? 0 r reserved undefined value is set when the dmac is activated. 18 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 10 direct memory access controller (dmac) page 390 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w descriptions 17 am 0 r/w acknowledge mode selects whether dack is output in data read cycle or in data write cycle in dual address mode. in single address mode, dack is always output regardless of the specification by this bit. 0: dack output in read cycle (dual address mode) 1: dack output in write cycle (dual address mode) 16 al 0 r/w acknowledge level specifies whether the dack signal output is high active or low active. 0: low-active output of dack 1: high-active output of dack 15, 14 dm[1:0] 00 r/w destination address mode 1, 0 specify whether the dma destination address is incremented, decremented, or left fixed. (in single address mode, the dm1 and dm0 bits are ignored when data is transferred to an external device with dack.) 00: fixed destination address (setting prohibited in 16- byte transfer) 01: destination address is incremented (+1 in byte-unit transfer, +2 in word-unit transfer, +4 in longword-unit transfer, +16 in 16-byte transfer) 10: destination address is decremented (?1 in byte-unit transfer, ?2 in word-unit transfer, ?4 in longword-unit transfer; setting prohibited in 16-byte transfer) 11: setting prohibited 13, 12 sm[1:0] 00 r/w source address mode 1, 0 specify whether the dma source address is incremented, decremented, or left fixed. (in single address mode, sm1 and sm0 bits are ignored when data is transferred from an external device with dack.) 00: fixed source address (setting prohibited in 16-byte transfer) 01: source address is incremented (+1 in byte-unit transfer, +2 in word-unit transfer, +4 in longword-unit transfer, +16 in 16-byte transfer) 10: source address is decremented (?1 in byte-unit transfer, ?2 in word-unit transfer, ?4 in longword-unit transfer; setting prohibited in 16-byte transfer) 11: setting prohibited
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 391 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w descriptions resource select 3 to 0 specify which transfer requests will be sent to the dmac. the changing of transfer request source should be done in the state that the dma enable bit (de) is set to 0. 0 0 0 0 external request, dual address mode 0 0 0 1 setting prohibited 0 0 1 0 external request, single address mode external address space external device with dack 0 0 1 1 external request, single address mode external device with dack external address space 0 1 0 0 auto request 0 1 0 1 setting prohibited 0 1 1 0 mtu2 (tgia_0) 0 1 1 1 mtu2 (tgia_1) 1 0 0 0 mtu2 (tgia_2) 1 0 0 1 mtu2 (tgia_3) 1 0 1 0 mtu2 (tgia_4) 1 0 1 1 a/d_1 (adi_1) 1 1 0 0 sci_0 (txi_0) 1 1 0 1 sci_0 (rxi_0) 1 1 1 0 sci_1 (txi_1) 1 1 1 1 sci_1 (rxi_1) 11 to 8 rs[3:0] 0000 r/w 7 6 dl ds 0 0 r/w r/w dreq level and dreq edge select specify the detecting method of the dreq pin input and the detecting level. if the transfer request source is specified as an on-chip peripheral module or if an auto-request is specified, these bits are invalid. 00: dreq detected in low level 01: dreq detected at falling edge 10: dreq detected in high level 11: dreq detected at rising edge
section 10 direct memory access controller (dmac) page 392 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w descriptions 5 tb 0 r/w transfer bus mode specifies the bus mode when dma transfers data. 0: cycle steal mode 1: burst mode note: when performing dma transfer in burst mode with mtu2 activation request, set the corresponding bit among dmmtu4 to dmmtu0 in bus function extending register (bscehr) (see section 9.4.8, bus function extending register (bscehr)). 4, 3 ts[1:0] 00 r/w transfer size 1, 0 specify the size of data to be transferred. select the size of data to be transferred when the source or destination is an on-chip peripheral module register of which transfer size is specified. 00: byte size 01: word size (2 bytes) 10: longword size (4 bytes) 11: 16-byte unit (four longword transfers) 2 ie 0 r/w interrupt enable specifies whether or not an interrupt request is generated to the cpu at the end of the dma transfer. setting this bit to 1 generates an interrupt request (dei) to the cpu when the te bit is set to 1. 0: interrupt request is disabled. 1: interrupt request is enabled.
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 393 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w descriptions 1 te 0 r/(w) * transfer end flag shows that dma transfer ends. the te bit is set to 1 when data transfer ends when dmatcr becomes to 0. the te bit is not set to 1 in the following cases. ? dma transfer ends due to an nmi interrupt or dma address error before dmatcr is cleared to 0. ? dma transfer is ended by clearing the de bit and dme bit in the dma operation register (dmaor). to clear the te bit, the te bit should be written to 0 after reading 1. even if the de bit is set to 1 while this bit is set to 1, transfer is not enabled. 0: during the dma transfer or dma transfer has been interrupted [clearing condition] writing 0 after te = 1 read 1: dma transfer ends by the specified count (dmatcr = 0) 0 de 0 r/w dma enable enables or disables the dma transfer. in auto request mode, dma transfer starts by setting the de bit and dme bit in dmaor to 1. in this time, all of the bits te, nmif, and ae in dmaor must be 0. in an external request or peripheral module request, dma transfer starts if dma transfer request is generated by the devices or peripheral modules after setting the bits de and dme to 1. in this case, however, all of the bits te, nmif, and ae must be 0, which is the same as in the case of auto request mode. clearing the de bit to 0 can terminate the dma transfer. 0: dma transfer disabled 1: dma transfer enabled note: * writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way.
section 10 direct memory access controller (dmac) page 394 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 10.3.5 dma operation register (dmaor) dmaor is a 16-bit readable/writable register that specifies the priority level of channels at the dma transfer. this register s hows the dma transfer status. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r r/w r/w r r r/w r/w r r r r r r/(w) * r/(w) * r/w note: writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. * - - cms[1:0] - - pr[1:0] - - - - - ae nmif dme bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13, 12 cms[1:0] 00 r/w cycle steal mode select 1, 0 select either normal mode or intermittent mode in cycle steal mode. it is necessary that all channel's bus modes are set to cycle steal mode to make valid intermittent mode. 00: normal mode 01: setting prohibited 10: intermittent mode 16 executes one dma transfer in each of 16 clocks of an external bus clock. 11: intermittent mode 64 executes one dma transfer in each of 64 clocks of an external bus clock. 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 395 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 9, 8 pr[1:0] 00 r/w priority mode 1, 0 select the priority level between channels when there are transfer requests for multiple channels simultaneously. 00: ch0 > ch1 > ch2 > ch3 01: ch0 > ch2 > ch3 > ch1 10: setting prohibited 11: round-robin mode 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 ae 0 r/(w) * address error flag indicates that an address error occurred during dma transfer. if this bit is set, dma transfer is disabled even if the de bit in chcr and the dme bit in dmaor are set to 1. this bit can only be cleared by writing 0 after reading 1. 0: no dmac address error [clearing condition] ? writing ae = 0 after ae = 1 read 1: dmac address error occurs
section 10 direct memory access controller (dmac) page 396 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 nmif 0 r/(w) * nmi flag indicates that an nmi interrupt occurred. if this bit is set, dma transfer is disabled even if the de bit in chcr and the dme bit in dmaor are set to 1. this bit can only be cleared by writing 0 after reading 1. when the nmi is input, the dma transfer in progress can be done in one transfer unit. when the dmac is not in operational, the nmif bit is set to 1 even if the nmi interrupt was input. 0: no nmi interrupt [clearing condition] ? writing nmif = 0 after nmif = 1 read 1: nmi interrupt occurs note: if the nmif bit is read at the same point in time that it is set to 1, in some cases the read value will be 0 but the internal state will be as if it was read as 1. therefore, subsequently writing 0 to nmif will clear it to 0 in the same way as writing 0 to the flag after reading it as 1. to prevent the nmif bit from being cleared to 0 inadvertently, always write 1 to the nmif bit except in cases when explicitly clearing it. to explicitly clear the nmif bit, write 0 to it after reading it as 1. note that if the nmif bit is not used, there is no problem with always writing 0 to it (and writing 0 to it after reading it as 1 explicitly to clear it). 0 dme 0 r/w dma master enable enables or disables dma transfers on all channels. if the dme bit and the de bit in chcr are set to 1, transfer is enabled. in this time, all of the bits te in chcr, nmif, and ae in dmaor must be 0. if this bit is cleared during transfer, transfers in all channels are terminated. 0: disables dma transfers on all channels 1: enables dma transfers on all channels note: * writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. 10.3.6 bus function extending register (bscehr) bscehr is a 16-bit readable/writable register that specifies the timing of bus release. it also sets the function to perform transfer by the dmac preferentially. for details, see section 9.4.8, bus function extending register (bscehr).
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 397 of 1560 mar 18, 2011 sh7080 group 10.4 operation when there is a dma transfer request, the dmac starts the tran sfer according to the predetermined channel priority; when the transfer end conditions ar e satisfied, it ends the transfer. transfers can be requested in thr ee modes: auto request, external request, and on-chip peripheral module request. in bus mode, burst mode or cycle steal mode can be selected. 10.4.1 dma transfer flow after the dma source address registers (sar), dma destination address registers (dar), dma transfer count registers (dmatcr), dma channel control registers (chcr), and dma operation register (dmaor) are set, the dmac transfer s data according to the following procedure: 1. checks to see if transfer is enabled (de = 1, dme = 1, te = 0, ae = 0, nmif = 0) 2. when a transfer request occurs while transfer is enabled, the dmac transfers one transfer unit of data (depending on the ts0 and ts1 settings). in auto request mode, the transfer begins automatically when the de bit and dme bit are set to 1. the dmatcr value will be decremented for each transfer. th e actual transfer flows vary by address mode and bus mode. 3. when the specified number of transfer ha ve been completed (when dmatcr reaches 0), the transfer ends normally. if the ie bit in chcr is set to 1 at this time, a dei interrupt is sent to the cpu. 4. when an address error or an nmi interrupt is generated, the transfer is aborted. transfers are also aborted when the de bit in chcr or the dme bit in dmaor is changed to 0. notes: the state of data transfer and register s when transfer by the dmac is interrupted 1. when dmac address error has occurred: data transfer is not performed. however, sar, dar, and dmatcr are updated. 2. when an nmi interrupt has occurred: data transfer is stopped after transferring one transfer unit of data. sar, dar, and dmatcr are properly updated. 3. when the de bit in the chcr and the dme bit in dmaor are cl eared: data transfer is stopped after transferring one transfer unit of data. sar, dar, and dmatcr are properly updated. figure 10.2 shows a flowchart of this procedure.
section 10 direct memory access controller (dmac) page 398 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group normal end nmif = 1 or ae = 1 or de = 0 or dme = 0? bus mode, transfer request mode, dreq detection selection system initial settings (sar, dar, dmatcr, chcr, dmaor) transfer (1 transfer unit); dmatcr ? 1 dmatcr, sar and dar updated dei interrupt request (when ie = 1) te = 1 no yes no yes no yes yes no yes no * 3 * 2 start transfer aborted dmatcr = 0? transfer request occurs? * 1 de, dme = 1 and nmif, ae, te = 0? nmif = 1 or ae = 1 or de = 0 or dme = 0? transfer end notes: 1. in auto-request mode, transfer begins when the nmif, ae, and te bits are all 0 and the de and dme bits are set to 1. 2. dreq = level detection in burst mode (external request) or cycle-steal mode. 3. dreq = edge detection in burst mode (external request), or auto-request mode in burst mode. figure 10.2 dma transfer flowchart
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 399 of 1560 mar 18, 2011 sh7080 group 10.4.2 dma transfer requests dma transfer requests are basically generated in eith er the data transfer source or destination, but they can also be generated by external devices or on-chip peripheral modules that are neither the source nor the destination. transfers can be requested in three modes: auto request, external request, and on-chip peripheral module request. the request mode is selected in the rs3 to rs0 bits in chcr0 to chcr3. (1) auto-request mode when there is no transfer request signal from an external source, as in a memory-to-memory transfer or a transfer between memory and an on-chip peripheral module unable to request a transfer, auto-request mode allows the dmac to automatically generate a transfer request signal internally. when the de bits in chcr0 to chcr3 and the dme bit in dmaor are set to 1, the transfer begins so long as the ae and nmif bits in dmaor and the te bits in chcr0 to chcr3 are all 0. (2) external request mode in this mode, a transfer is performed at the request signals (dreq0 to dreq3) of an external device. choose one of the modes shown in table 10.3 according to the application system. when this mode is selected, if the dma transfer is enabled (de = 1, dme = 1, te = 0, ae = 0, nmif = 0), a transfer is performed upon a request at the dreq input. table 10.3 selecting external request modes with rs bits rs3 rs2 rs1 rs0 address mode source destination 0 0 0 0 dual address mode any any 1 0 single address mode external memory, memory-mapped external device external device with dack 1 external device with dack external memory, memory-mapped external device choose to detect dreq by either the edge or level of the signal input with the dl bit and ds bit in chcr_0 to chcr_3 as shown in table 10.4. the source of the transfer request does not have to be the data transfer source or destination.
section 10 direct memory access controller (dmac) page 400 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 10.4 selecting external reque st detection with dl, ds bits chcr_0 to chcr_3 dl ds detection of external request 0 low level detection 0 1 falling edge detection 1 0 high level detection 1 rising edge detection note: prior to setting chcr_0 to chcr_3, select the dreq pin function by the pin function controller (pfc). when dreq is accepted, the dreq pin becomes request accept disabled state. after issuing acknowledge signal dack for the accepted dreq, the dreq pin again becomes request accept enabled state. when dreq is used by level detection, there ar e following two cases by the timing to detect the next dreq after outputting dack. ? overrun 0: transfer is aborted after the same number of transfer has been performed as requests. ? overrun 1: transfer is aborted after transfers have been performed for (the number of requests plus 1) times. the do bits in chcr_0 to chcr_3 select this overrun 0 or overrun 1. table 10.5 selecting external re quest detection with do bit chcr_0 to chcr_3 do external request 0 overrun 0 1 overrun 1
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 401 of 1560 mar 18, 2011 sh7080 group (3) on-chip peripheral module request mode in this mode, a transfer is performed at the transfer request signal of an on-chip peripheral module. the dma receives ten transfer request signals in total: five compare match and input capture interrupts from multi-function timer pulse unit 2 (mtu2), receive data full interrupts (rxi) and transmit data empty interrupts (txi) from two se rial communication inte rface (sci) channels, and the a/d conversion end interrupt (adi) from the a/d converter. when this mode is selected, if the dma transfer is enabled (de = 1, dme = 1, te = 0, ae = 0, nmif = 0), a transfer is performed upon the input of a transfer request signal. the transfer request source does not need to be the data transfer source or destination. however, when the transmit data empty tran sfer request (txi) from the sci is specified as the transfer request source, the transfer destination must be the transmit data register (tdr) in the respective sci channel. similarly, when the receive data full transfer request (rxi) in the sci is specified as the request source, the transfer source must be th e receive data register (rdr) in the respective sci channel. when the a/d conversion end transfer request (adi) is specified as the transfer request source, the transfer source must be the respective register in the a/d converter. table 10.6 selecting on-chip peripheral mo dule request modes with rs3 to rs0 bits rs3 rs2 rs1 rs0 transfer request source transfer request signal source destination bus mode 0 mtu2 tgia_0 any * any * burst or cycle steal 0 1 1 1 mtu2 tgia_1 any * any * burst or cycle steal 1 0 mtu2 tgia_2 any * any * burst or cycle steal 0 1 mtu2 tgia_3 any * any * burst or cycle steal 0 mtu2 tgia_4 any * any * burst or cycle steal 0 1 1 a/d_1 adi1 addr4 to addr7 any * cycle steal 1 0 sci_0 transmitter txi_0 any * sctdr_0 cycle steal 0 1 sci_0 receiver rxi_0 scrdr_0 any * cycle steal 1 0 sci_1 transmitter txi_1 any * sctdr_1 cycle steal 1 sci_1 receiver rxi_1 scrdr_1 any * cycle steal notes: mtu2: multi-function timer pulse unit 2 sci_0 and sci_1: serial communication interface channels 0 and 1 addr4 to addr7: a/d data register in a/d converter channel 1 sctdr_0 and sctdr_1: transmit data registers in sci_0 and sci_1 scrdr_0 and scrdr_1: receive data registers in sci_0 and sci_1 * an external memory, a memory-mapped external device, an on-chip memory, or an on- chip peripheral module (except dmac, dtc, bsc, and ubc)
section 10 direct memory access controller (dmac) page 402 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group to output a transfer request signal from an on-chip peripheral module, set the interrupt enable bit corresponding to the transfer request signal in the on-chip peripheral module. when an interrupt request signal in an on-chip peripheral module is used to request dma transfer, no interrupt is requested to the cpu. for details, refer to section 6.8, data transfer with interrupt request signals. the transfer request signal shown in table 10.7 is automatically cancelled when the corresponding dma transfer is performed. this cancellation occurs when one transf er unit is completed in cycle steal mode or at the end of burst transfer in burst mode. 10.4.3 channel priority when the dmac receives simultaneous transfer re quests on two or more channels, it transfers data according to a predetermined priority. two modes (fixed mode and round-robin mode) are selected by the bits pr1 and pr0 in dmaor. (1) fixed mode in this mode, the priority levels among the channels remain fixed. there are two kinds of fixed modes as follows: ? ch0 > ch1 > ch2 > ch3 ? ch0 > ch2 > ch3 > ch1 these are selected by the pr1 and the pr0 bits in dmaor. (2) round-robin mode in round-robin mode each time data of one transfer unit (word, byte, longword, or 16-byte unit) is transferred on one channel, the priority is rotated. the channel on which the transfer was just finished rotates to the bottom of the priority. the round-robin mode operation is shown in figure 10.3. the priority of round-robin mode is ch0 > ch1 > ch2 > ch3 immediately after reset. when round-robin mode is specified, do not mix the cycle steal mode and the burst mode in multiple channels' bus modes.
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 403 of 1560 mar 18, 2011 sh7080 group ch1 > ch2 > ch3 > ch0 ch0 > ch1 > ch2 > ch3 ch2 > ch3 > ch0 > ch1 ch0 > ch1 > ch2 > ch3 ch2 > ch3 > ch0 > ch1 ch0 > ch1 > ch2 > ch3 ch0 > ch1 > ch2 > ch3 ch3 > ch0 > ch1 > ch2 ch0 > ch1 > ch2 > ch3 (1) when channel 0 transfers initial priority order initial priority order initial priority order initial priority order priority order after transfer priority order does not change. channel 2 becomes bottom priority. the priority of channels 0 and 1, which were higher than channel 2, are also shifted. if immediately after there is a request to transfer channel 1 only, channel 1 becomes bottom priority and the priority of channels 3 and 0, which were higher than channel 1, are also shifted. channel 1 becomes bottom priority. the priority of channel 0, which was higher than channel 1, is also shifted. channel 0 becomes bottom priority priority order after transfer priority order after transfer priority order after transfer post-transfer priority order when there is an immediate transfer request to channel 1 only (2) when channel 1 transfers (3) when channel 2 transfers (4) when channel 3 transfers figure 10.3 round-robin mode
section 10 direct memory access controller (dmac) page 404 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 10.4 shows how the priority changes when channel 0 and channel 3 transfers are requested simultaneously and a channel 1 transfer is requested during the channel 0 transfer. the dmac operates as follows: 1. transfer requests are generated simultaneously to channels 0 and 3. 2. channel 0 has a higher priority, so the channe l 0 transfer begins first (channel 3 waits for transfer). 3. a channel 1 transfer request occurs during the channel 0 transfer (channels 1 and 3 are both waiting) 4. when the channel 0 transfer ends, channel 0 becomes lowest priority. 5. at this point, channel 1 has a higher priority than channel 3, so the channel 1 transfer begins (channel 3 waits for transfer). 6. when the channel 1 transfer ends, channel 1 becomes lowest priority. 7. the channel 3 transfer begins. 8. when the channel 3 transfer ends, channels 3 and 2 shift downward in priority so that channel 3 becomes the lowest priority. transfer request waiting channel(s) dmac operation channel priority (1) channels 0 and 3 (3) channel 1 0 > 1 > 2 > 3 (2) channel 0 transfer start (4) channel 0 transfer ends (5) channel 1 transfer starts (6) channel 1 transfer ends (7) channel 3 transfer starts (8) channel 3 transfer ends 1 > 2 > 3 > 0 2 > 3 > 0 > 1 0 > 1 > 2 > 3 priority order changes priority order changes priority order changes none 3 3 1,3 figure 10.4 changes in channel priority in round-robin mode
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 405 of 1560 mar 18, 2011 sh7080 group (3) activation priority when multiple dmac activation requests are generated when multiple dmac activation requests are generated, transfer is performed in the order of activation priority. however, if multiple dmac activation requests are generated while the dmac is not the bus master, transfer is started for the first activation request. in addition, if activation requests are generated while the cpu is accessing an external space, transfer is started for the first activation request and then the s econd request. figure 10.5 shows the example of activation priority operation of the dmac. transfer is started for the request that is generated first internal bus priority determination priority determination priority determination access to external space by the cpu dmac is inactive dmac is active dmac (ch3) dmac (ch2) dmac (ch0) dmac ch0 activation request (priority: 1) dmac ch1 activation request (priority: 2) dmac ch2 activation request (priority: 3) dmac ch3 activation request (priority: 4) dmac ch0 activation request (priority: 1) dmac ch1 activation request (priority: 2) dmac ch2 activation request (priority: 3) dmac ch3 activation request (priority: 4) when multiple dmac activation requests are generated while the cpu is accessing an external space dmac (ch1) transfer is performed according to the priority internal bus other than access to external space by the cpu dmac is inactive dmac is active dmac (ch3) dmac (ch0) dmac (ch1) when multiple dmac activation requests are generated while the cpu is not accessing an external space dmac (ch2) transfer is performed according to the priority figure 10.5 example of activation priority operation of dmac (priority fixed mode (ch0 > ch1 > ch2 > ch3))
section 10 direct memory access controller (dmac) page 406 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 10.4.4 dma transfer types dma transfer has two types; single address mode transfer and dual address mode transfer. they depend on the number of bus cycles of access to s ource and destination. a data transfer timing depends on the bus mode, which has cycle steal mode and burst mode. the dmac supports the transfers shown in table 10.7. table 10.7 supported dma transfers destination source external device with dack external memory memory- mapped external device on-chip peripheral module on-chip memory external device with dack not available dual, single dual, single not available not available external memory dual, single dual dual dual dual memory-mapped external device dual, single dual dual dual dual on-chip peripheral module not available dual dual dual dual on-chip memory not available dual dual dual dual notes: 1. dual: dual address mode 2. single: single address mode 3. for on-chip peripheral modules, 16-byte transfer is available only by registers which can be accessed in longword units.
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 407 of 1560 mar 18, 2011 sh7080 group address modes: ? dual address mode in dual address mode, both the transfer source and destination are accessed by an address. the source and destination can be located externally or internally. dma transfer requires two bus cycles because data is read from the transfer source in a data read cycle and written to the transfer destination in a data write cycle. at this time, transfer data is temporarily stored in the dmac. in the transfer between external memories as shown in figure 10.6, data is read to the dmac from one external memory in a data read cycle, and then that data is written to the other external memory in a write cycle. data buffer address bus data bus address bus data bus memory transfer source module transfer destination module memory transfer source module transfer destination module sar dar data buffer sar dar the sar value is an address, data is read from the transfer source module, and the data is temporarily stored in the dmac. first bus cycle second bus cycle the dar value is an address and the value stored in the data buffer in the dmac is written to the transfer destination module. dmac dmac figure 10.6 data flow of dual address mode auto request, external request, and on-chip pe ripheral module request are available for the transfer request. dack can be output in read cycle or write cycle in dual address mode. the am bit in the channel control register (ch cr) can specify whether the dack is output in read cycle or write cycle.
section 10 direct memory access controller (dmac) page 408 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 10.7 shows an example of dma transfer timing in dual address mode. ck a29 to a0 note: in transfer between external memories, with dack output in the read cycle, dack output timing is the same as that of csn . d31 to d0 wrxx rd dackn (active-low) csn transfer source address transfer destination address data read cycle data write cycle (1st cycle) (2nd cycle) figure 10.7 example of dma transfer timing in dual mode (source: ordinary memory, dest ination: ordinary memory)
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 409 of 1560 mar 18, 2011 sh7080 group ? single address mode in single address mode, either the transfer source or transfer destination peripheral device is accessed (selected) by means of the dack signa l, and the other device is accessed by an address. in this mode, the dmac performs one dma transfer in one bus cycle, accessing one of the external devices by outputting the dack transfer request acknowledge signal to it, and at the same time outputting an address to the other device involved in the transfer. for example, in the case of transfer between external memory and an external device with dack shown in figure 10.8, when the external device outputs data to the data bus, that data is written to the external memory in the same bus cycle. dmac this lsi dack dreq external address bus external data bus external memory external device with dack data flow figure 10.8 data flow in single address mode two kinds of transfer are possible in single addr ess mode: transfer between an external device with dack and a memory-mapped external device, and transfer between an external device with dack and external memory. in both cases , only the external request signal (dreq) is used for transfer requests.
section 10 direct memory access controller (dmac) page 410 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 10.9 shows an example of dma transfer timing in single address mode. address output to external memory space select signal to external memory space select signal to external memory space data output from external device with dack dack signal (active-low) to external device with dack write strobe signal to external memory space address output to external memory space data output from external memory space dack signal (active-low) to external device with dack read strobe signal to external memory space (a) external device with dack external memory space (ordinary memory) (b) external memory space (ordinary memory) external device with dack ck a29 to a0 d31 to d0 dackn csn wrxx ck a29 to a0 d31 to d0 dackn csn rd figure 10.9 example of dma transfer timing in single address mode bus modes: there are two bus modes: cycle steal mode and burst mode. select the mode in the tb bits in the channel control register (chcr). ? cycle-steal mode ? normal mode in cycle-steal normal mode, the bus mastership is given to another bus master after a one- transfer-unit (byte, word, longword, or 16-byte unit) dma transfer. when another transfer request occurs, the bus mastership is obtained from the other bus master and a transfer is performed for one transfer unit. when that tran sfer ends, the bus mastership is passed to the other bus master. this is repeated until the transfer end conditions are satisfied. in cycle-steal normal mode, transfer areas ar e not affected regardless of settings of the transfer request source, transfer s ource, and transfer destination. figure 10.10 shows an example of dma transfer timing in cycle-steal normal mode. transfer conditions shown in the figure are: ? dual address mode ? dreq low level detection
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 411 of 1560 mar 18, 2011 sh7080 group cpu cpu cpu dmac dmac cpu dmac dmac cpu dreq bus cycle bus mastership returned to cpu once read/write read/write figure 10.10 dma transfer exampl e in cycle-steal normal mode (dual address, dreq low level detection) ? intermittent mode 16 and intermittent mode 64 in intermittent mode of cycle steal, the dmac returns the bus mastership to other bus master whenever a unit of transfer (byte, word, longword, or 16-byte unit) is complete. if the next transfer request occu rs after that, the dmac gets the bus mastership from other bus master after waiting for 16 or 64 clocks in b count. the dmac then transfers data of one unit and returns the bus mastership to other bus master. these operations are repeated until the transfer end condition is satisfied. it is thus possible to make lower the ratio of bus occupation by dma transfer than cycle-steal normal mode. this intermittent mode can be used for all transfer section; transfer request source, transfer source, and transfer destination. the bus mode s, however, must be cycle steal mode in all channels. figure 10.11 shows an example of dma transfer timing in cycle steal intermittent mode. transfer conditions shown in the figure are: ? dual address mode ? dreq low level detection dreq cpu cpu bus cycle cpu more than 16 or 64 b (change by the cpu's state of using bus) dmac dmac cpu cpu dmac dmac cpu read/write read/write figure 10.11 example of dma transf er in cycle steal in termittent mode (dual address, dreq low level detection)
section 10 direct memory access controller (dmac) page 412 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? burst mode in burst mode, once the dmac obtains the bus mastership, the transfer is performed continuously without releasing the bus mastership until the tran sfer end condition is satisfied. in external request mode with level detection of the dreq pin, however, when the dreq pin is not active, the bus mastership passes to th e other bus master after the dmac transfer request that has already been accepted ends, even if the transfer end conditions have not been satisfied. figure 10.12 shows dma transfer timing in burst mode. cpu cpu cpu dmac dmac dmac dmac dmac dmac cpu dreq bus cycle read read read write write write figure 10.12 dma transfer example in burst mode (dual address, dreq low level detection)
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 413 of 1560 mar 18, 2011 sh7080 group relationship between request modes and bus modes by dma transfer category: table 10.8 shows the relationship between request modes and bus modes by dma transfer category. table 10.8 relationship between request modes and bus modes by dma transfer category address mode transfer category request mode bus mode transfer size (bits) usable channels external device with dack and external memory external b/c 8/16/32/128 0 to 3 external device with dack and memory- mapped external device external b/c 8/16/32/128 0 to 3 external memory and external memory all * 1 b/c 8/16/32/128 0 to 3 external memory and memory-mapped external device all * 1 b/c 8/16/32/128 0 to 3 memory-mapped external device and memory- mapped external device all * 1 b/c 8/16/32/128 0 to 3 external memory and on-chip peripheral module all * 2 b/c * 3 8/16/32/128 * 4 0 to 3 memory-mapped external device and on-chip peripheral module all * 2 b/c * 3 8/16/32/128 * 4 0 to 3 on-chip peripheral module and on-chip peripheral module all * 2 b/c * 3 8/16/32/128 * 4 0 to 3 on-chip memory and on-chip memory all * 1 b/c 8/16/32/128 0 to 3 on-chip memory and memory-mapped external device all * 1 b/c 8/16/32/128 0 to 3 on-chip memory and on-chip peripheral module all * 2 b/c * 3 8/16/32/128 * 4 0 to 3 dual on-chip memory and external memory all * 1 b/c 8/16/32/128 0 to 3 single external device with dack and external memory external b/c 8/16/32 0 to 3 external device with dack and memory- mapped external device external b/c 8/16/32 0 to 3 b: burst mode, c: cycle steal mode notes: 1. external requests, auto requests, and on-chip peripheral module requests are all available. for on-chip peripheral module requests, however, the sci and a/d converter cannot be specified as the transfer request source. 2. external requests, auto requests, and on-chip peripheral module requests are all available. however, when the sci or a/d converter is the transfer request source, the request source register must be designated as the transfer source or the transfer destination. 3. only cycle steal when the sci or a/d converter is the transfer request source. 4. access size permitted for the on-chip per ipheral module register functioning as the transfer source or transfer destination.
section 10 direct memory access controller (dmac) page 414 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bus mode and channel priority: when the priority is set in fixed mode (ch0 > ch1) and channel 1 is transferring in burst mode, if there is a transfer request to channel 0 with a higher priority, the transfer of channel 0 will begin immediately. at this time, if channel 0 is also operating in burst mode, the channel 1 transfer will continue after the channel 0 transfer ha s completely finished. when channel 0 is in cycle steal mode, channel 0 w ith a higher priority performs the transfer of one transfer unit and the channel 1 transfer is continuously performed without releasing the bus mastership. the bus mastership will then switch between the two in the order channel 0, channel 1, channel 0, and channel 1. therefore, the bu s state is such that the cpu cycle after the completion of cycle steal mode transfer has been replaced with the channel 1 burst mode transfer. (hereinafter referred to as burst mode priority execution.) this example is shown in figure 10.13. when multiple channels are operating in burst modes, the channel with the highest priority is executed first. when dma transfer is executed in the multiple channels, the bus mastership will not be given to the bus master until all competing burst transfers are complete. cpu dma ch1 dma ch1 dma ch0 dma ch1 dma ch0 dma ch1 dma ch1 cpu ch0 ch1 ch0 dmac ch0 and ch1 cycle-steal mode dmac ch1 burst mode cpu cpu priority: ch0 > ch1 ch0: cycle-steal mode ch1: burst mode dmac ch1 burst mode figure 10.13 bus state when mu ltiple channels are operating in round-robin mode, the priority changes accordi ng to the specification s hown in figure 10.3. however, the channel in cycle steal mode cannot be mixed with the channel in burst mode.
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 415 of 1560 mar 18, 2011 sh7080 group 10.4.5 number of bus cycle states and dreq pin sampling timing number of bus cycle states: when the dmac is the bus master, the number of bus cycle states is controlled by the bus state controller (bsc) in the same way as when the cpu is the bus master. for details, see section 9, bus state controller (bsc). dreq pin sampling timing: figures 10.14 to 10.17 show the sample timing of the dreq input in each bus mode, respectively. determination of dmac activation by dreq takes 3 bcyc (bcyc is the external clock (b = ck) cycle). timing of the dack output for the first dreq acceptance differs depending on the internal bus state, the am bit setting in chcr, and the configuration of the bsc regarding the transfer source/destination areas, but the fastest case is 6 bcyc. ck bus cycle dreq (rising edge) dack (active-high) cpu non-sensitive period 1st acceptance 2nd acceptance acceptance started cpu cpu dmac figure 10.14 example of dreq input det ection in cycle steal mode edge detection
section 10 direct memory access controller (dmac) page 416 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ck bus cycle dreq (overrun 0, high-level) bus cycle dreq (overrun 1, high-level) dack (active-high) cpu cpu cpu dmac ck dackn (active-high) cpu cpu cpu dmac non-sensitive period non-sensitive period non-sensitive period 1st acceptance 2nd acceptance 1st acceptance 2nd acceptance acceptance started acceptance started figure 10.15 example of dreq input det ection in cycle steal mode level detection ck dreq (rising edge) dack (active-high) cpu cpu dmac dmac bus cycle non-sensitive period burst acceptance figure 10.16 example of dreq input detection in burst mode edge detection
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 417 of 1560 mar 18, 2011 sh7080 group ck dack (active-high) cpu cpu dmac ck dack (active-high) cpu cpu dmac dmac bus cycle dreq (overrun 0, high-level) bus cycle dreq (overrun 1, high-level) non-sensitive period non-sensitive period 1st acceptance 1st acceptance 3rd acceptance acceptance started acceptance started 2nd acceptance acceptance started 2nd acceptance figure 10.17 example of dreq input detection in burst mode level detection figure 10.18 shows the tend output timing. dmac cpu cpu cpu dmac ck dreq dack tend bus cycle end of dma transfer figure 10.18 dma transfer end timi ng (in cycle steal level detection)
section 10 direct memory access controller (dmac) page 418 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group when 16-byte transfer to an external device is performed, when 8-bit or 16-bit external device is accessed in longword units, or when an 8-bit external device is accessed in word units, each dma transfer unit is divided into multiple bus cycles. if negation of cs between bus cycles is specified in these cases, the dack and tend outputs are also divided for data alignment. this example is illustrated in figure 10.19. with divided dack, sampling of dreq is not detected correctly and a maximum of one extra overrun may occur. to avoid this, use the settings with which dack is not divided, or in the case when dack is divided, specify the transfer size that is smaller than the bus width of the external device. ck cs wrxx dackn (active-low) wait rd address data tendn (active-low) t1 t2 taw t1 t2 note: the dack and tend are asserted for the last transfer unit of the dma transfer. when the transfer unit is divided into several bus cycles and the cs is negated between bus cycles, the dack and tend are also divided. figure 10.19 bsc ordinary memory access (no wait, idle cycle 1, longword access to 16-bit device)
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 419 of 1560 mar 18, 2011 sh7080 group 10.4.6 operation timing figures 10.20 and 10.21 illustrate the timing of dmac operations. note: the dmac request indicates the state of an internal bus request after determination of the source for dmac activation. for details on the dreq and dack timing in each operating mode, see section 10.4.5, number of bus cycle states and dreq pin sampling timing. clock (b ) data transfer internal address dmac activation request by dreq pin dmac request csn r w figure 10.20 example of timing of dmac operation?activation by dreq (in the case of cycle stealing transfer, du al address mode, low-level detection, i :b :p = 1:1/2:1/2, data transfer from external memory to external memory, and idle/wait = 0)
section 10 direct memory access controller (dmac) page 420 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group note: the dmac request indicates the state of an internal bus request after determination of the source for dmac activation. clock (b ) data transfer internal address dmac activation request dmac request r w figure 10.21 example of dmac operation timing? activation by an on-chip peripheral module (in the case of cycle stealing transfer, du al address mode, low-level detection, i :b :p = 1:1/2:1/2, and data transfer from on-chip peripheral module to on-chip ram)
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 421 of 1560 mar 18, 2011 sh7080 group 10.5 usage notes 10.5.1 notes on output from dack pin when burst mode and cycle steal mode are specified in multiple channels at the same time, unnecessary dack may be asserted at the end of bu rst transfer if the following conditions are all satisfied. 1. when dma transfer is performed with burst mode and cycle steal mode being specified in multiple channels at the same time. 2. when dual address mode is specified for the channel used in burst mode and dack output is enabled in write cycles. 3. when the dmac cannot acquire the bus mastership after the end of burst transfer while the dmac has accepted a cycle-steal transfer request. this can be avoided by one of the following actions. action 1: after confirming the end of burst transfer (te bit = 1), perform remaining dma transfer in cycle steal mode. action 2: do not enable dack in write cycles for the channel used in burst mode. action 3: when performing dma transfer in multiple channels at the same time, select either burst mode or cycle steal mode for all channels. 10.5.2 dma transfer by peripheral modules during dma transfer by peripheral modules, do not set the clock ratio of bus clock (b ):peripheral clock (p ), bus clock (b ):mtu2 clock (mp ), and bus clock (b ):mtu2s clock (mi ) to 1:1/3 or 1:1/4 10.5.3 module standby mode setting dmac operation can be enabled or disabled by setting the standby control register. the dmac is disabled by default. after module standby mode is canceled, access to the dmac registers is enabled. note that software standby mode or module standby mode must not be entered while the dmac is operating. before entering software standby mode or module standby mode, return the channel control registers (chcr_0 to chcr_3) and dma operation register (dmaor) to their initial values. for details, refer to section 26, power-down modes.
section 10 direct memory access controller (dmac) page 422 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 10.5.4 access to dmac and dtc registers through dmac do not access the dmac or dtc registers th rough dmac operation. do not access the dmac registers through dtc operation. 10.5.5 note on sci as dmac activation source when the txi interrupt in sci is specified as a dmac activation source, the tend flag in the sci must not be used as the transfer end flag. 10.5.6 chcr setting before modifying the chcr setting, be sure to clear the de bit in the respective channel. 10.5.7 note on multiple channel activation do not use the same on-chip request in multiple channels. 10.5.8 note on transfer request input transfer requests must be input after dmac settings are completed. 10.5.9 conflict between nmi interrupt and dmac activation when a conflict occurs between the generation of the nmi interrupt and the dmac activation, the nmi interrupt has priority. thus the nmi bit is set to 1 and the dmac is not activated. it takes 1 bcyc + 3 pcyc for determining dmac stop by nmi, 3 bcyc for determining dmac activation by dreq, and 1 pcyc for determining dmac activation by peripheral modules (bcyc is the external bus clock cycle, and pcyc is the peripheral clock cycle).
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 423 of 1560 mar 18, 2011 sh7080 group 10.5.10 notes on using peripheral module request modes when using a dma transfer for which a/d_1 (adi_1), sci_0 (txi_0), sci_0 (rxi_0), sci_1 (txi_1), or sci_1 (rxi_1) is selected as the transfer request source, any interrupt requests from the peripheral module selected as the transf er request source are accepted and held as dma transfer requests. as a result, a dma transfer ma y occur in the absence of a dma transfer request when one of the following conditions is met: 1. when a/d_1 (adi_1), sci_0 (txi_0), sci_0 (rxi_0), sci_1 (txi_1), or sci_1 (rxi_1) is selected as the dma transfer request source afte r an interrupt request (adi_1, txi_0, rxi_0, txi_1, or rxi_1) was generated and the interrupt source flag (adf in adcsr, tdre or rdrf in scssr) was cleared by the cpu or dtc. 2. when the interrupt source flag (adf in adcsr , tdre or rdrf in scssr) is cleared by the cpu after a/d_1 (adi_1), sci_0 (txi_0), sci_0 (rxi_0), sci_1 (txi_1), or sci_1 (rxi_1) was selected as the dma transfer request source. 3. when dma transfers are enabled (de = 1) while interrupts are disabled (adie = 0 in adcsr, tie = 0 or rie = 0 in scscr) for the peripheral module selected as the dma transfer request source. this problem can be avoided by using one of the following workarounds: 1. when sci_0 (txi_0) or sci_1 (txi_1) is the transfer request source ? enable dma transfers (de = 1) after confirming that the transmit data empty interrupt (te = 1 and tie = 1 in scscr and tdre = 1 in scssr) has been generated. 2. when a/d_1 (adi_1), sci_0 (rxi_0), or sci_1 (rxi_1) is the transfer request source ? before using a dma transfer, do not use a cpu interrupt or dtc transfer that uses the same interrupt request. ? only clear the interrupt sour ce flag (adf in adcsr or rdrf in scssr) by a dma transfer. do not clear it by th e cpu or dtc. when it is nece ssary to clear the interrupt source flag, perform one (dummy) dma transfer while operation of the peripheral module is disabled (adst = 0 in adcr or re = 0 in scscr). ? enable dma transfers (de = 1) after enabling the interrupt request (adie = 1 in adcsr or rie = 1 in scscr). figure 10.22 shows an example dma transfer sequence when sci_0 (rxi_0) or sci_1 (rxi_1) is selected as the transfer request source, and figure 10.23 shows an example dummy transfer sequence.
section 10 direct memory access controller (dmac) page 424 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group disable serial receive (re = 0 in scscr) clear serial receive error fla g disable dma transfers (de = 0) clear dma transfer end state (clear te) dmac initial settin g s enable serial receive and receive data full interrupt (re = 1 and rie = 1 in scscr) enable dma transfers (de = 1) disable serial receive and receive data full interrupt (re = 0 and rie = 0 in scscr) disable dmac operation (dme = 0) clear dmac error fla g enable dmac operation (dme = 1) no no no yes yes yes [3] [4] [5] [6] [7] [8] [9] [1] [2] start dma transfer dummy transfer interrupt source fla g set to 1 ? rdrf = 1 in scssr ? disable dma transfers (de = 0) clear dma transfer end state (clear te) continue dma transfer ? dma transfer end ? te = 1 ? [1] [1] disable serial receive so no interrupt (rxi) occurs durin g the transfer sequence. [2] clear the serial receive error fla g . at this point, do not clear the interrupt source fla g (rdrf in scssr). [3] if the interrupt source fla g has been set to 1, perform a dummy transfer to clear it. [4] after enablin g serial receive and the receive data full interrupt (re = 1 and rie = 1 in scscr), enable dma transfers (de = 1). [5] wait for the dma transfer to end. if the dei interrupt is enabled (ie = 1), a dei interrupt will be g enerated when the dma transfer ends. [6] disable dma transfers (de = 0). [7] clear the dma transfer end state (clear te). [8] to continue dma transfer operation, reset the dmac. no dummy transfer is needed in this case. [9] disable the receive data full interrupt (rie = 0 in scscr) to disable interrupt requests. dma transfer end figure 10.22 example dma transfer sequence in peripheral module request mode (rxi)
section 10 direct memory access controller (dmac) r01uh0198ej0500 rev. 5.00 page 425 of 1560 mar 18, 2011 sh7080 group disable serial receive (re = 0 in scscr) clear serial receive error fla g disable dma transfers (de = 0) clear dma transfer end state (clear te) clear dmac error fla g enable dmac operation (dme = 1) dmac initial settin g s sar = scrdr dar = any value dmatcr = 1 enable serial receive and receive data full interrupt (re = 0 and rie = 1 in scscr) enable dma transfers (de = 1) enable serial receive and receive data full interrupt (re = 0 and rie = 0 in scscr) disable dmac operation (dme = 0) no yes [3] [4] [5] [6] [7] [8] [1] [2] start dummy transfer disable dma transfers (de = 0) clear dma transfer end state (clear te) dma transfer end ? te = 1 ? [1] [1] disable serial receive so no interrupt (rxi) occurs durin g the transfer sequence. [2] clear the serial receive error fla g . at this point, do not clear the interrupt source fla g (rdrf in scssr). [3] initialize the dmac. set the dma transfer count to 1 (dmatcr = 1). [4] while serial receive remains disabled, enable the receive data full interrupt (re = 0 and rie = 1 in scscr). [5] wait for the dma transfer to end. if the dei interrupt is enabled (ie = 1), a dei interrupt will be g enerated when the dma transfer ends. [6] disable dma transfers (de = 0). [7] clear the dma transfer end state (clear te). [8] disable the receive data full interrupt (rie = 0 in scscr) to disable interrupt requests. dummy transfer end figure 10.23 example du mmy transfer sequence (rxi)
section 10 direct memory access controller (dmac) page 426 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 10.5.11 number of cycles per access to on-chip ram by dmac the number of cycles required for read/write acce ss to on-chip ram from the dmac is as shown in table 10.9, which differs depending on the frequency ratio of i (internal clock) to b (external bus clock). table 10.9 number of cycles per access to on-chip ram by dmac setting of i :b read write 1:1 3 bcyc 3 bcyc 1:1/2 2 bcyc 1 bcyc 1:1/3 2 bcyc 1 bcyc 1:1/4 or less 1 bcyc 1 bcyc notes: 1. bcyc is the external bus clock cycle. 2. the number of cycles for access to the on-chip peripheral i/o or an external device are indicated in section 9.5.16, access to on-chip peripheral i/o registers by cpu, and section 9.5.17, access to external memory by cpu. the access cycles are obtained by subtracting the cycles of i required for l-bus access from the cycles required for access by the cpu. 10.5.12 note on dmac transfer in burst mode when activation source is mtu2 the corresponding bit among dmmtu4 to dmmtu0 in the bus function extending register (bscehr) must be set when performing dma transfer in burst mode with the mtu2 specified as the activation source. for details, see section 9.4.8, bus function extending register (bscehr). 10.5.13 bus function extending register (bscehr) with the bus function extending register (bscehr), it is possible to set the function to perform transfer by the dmac preferentially. for details, see section 9.4.8, bus function extending register (bscehr).
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 427 of 1560 mar 18, 2011 sh7080 group section 11 multi-function timer pulse unit 2 (mtu2) this lsi has an on-chip multi-function timer pulse unit 2 (mtu2) that comprises six 16-bit timer channels. 11.1 features ? maximum 16 pulse input/output lines and three pulse input lines ? selection of eight c ounter input clocks for each channel (four clocks for channel 5) ? the following operations can be set for channels 0 to 4: ? waveform output at compare match ? input capture function ? counter clear operation ? multiple timer counters (tcnt) can be written to simultaneously ? simultaneous clearing by compare match and input capture is possible ? register simultaneous input/output is possible by synchronous counter operation ? a maximum 12-phase pwm output is possible in combination with synchronous operation ? buffer operation settable for channels 0, 3, and 4 ? phase counting mode settable independe ntly for each of channels 1 and 2 ? cascade connection operation ? fast access via internal 16-bit bus ? 28 interrupt sources ? automatic transfer of register data ? a/d converter start trigger can be generated ? module standby mode can be settable ? a total of six-phase waveform output, which includes complementary pwm output, and positive and negative phases of reset pwm output by interlocking operation of channels 3 and 4, is possible. ? ac synchronous motor (brushless dc motor) drive mode using complementary pwm output and reset pwm output is settable by interlocking operation of channels 0, 3, and 4, and the selection of two types of waveform outputs (chopping and level) is possible. ? dead time compensa tion counter available in channel 5 ? in complementary pwm mode, interrupts at the crest and trough of the counter value and a/d converter start triggers can be skipped.
section 11 multi-function timer pulse unit 2 (mtu2) page 428 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.1 mtu2 functions item channel 0 channel 1 channel 2 channel 3 channel 4 channel 5 count clock mp /1 mp /4 mp /16 mp /64 tclka tclkb tclkc tclkd mp /1 mp /4 mp /16 mp /64 mp /256 tclka tclkb mp /1 mp /4 mp /16 mp /64 mp /1024 tclka tclkb tclkc mp /1 mp /4 mp /16 mp /64 mp /256 mp /1024 tclka tclkb mp /1 mp /4 mp /16 mp /64 mp /256 mp /1024 tclka tclkb mp /1 mp /4 mp /16 mp /64 general registers tgra_0 tgrb_0 tgre_0 tgra_1 tgrb_1 tgra_2 tgrb_2 tgra_3 tgrb_3 tgra_4 tgrb_4 tgru_5 tgrv_5 tgrw_5 general registers/ buffer registers tgrc_0 tgrd_0 tgrf_0 ? ? tgrc_3 tgrd_3 tgrc_4 tgrd_4 ? i/o pins tioc0a tioc0b tioc0c tioc0d tioc1a tioc1b tioc2a tioc2b tioc3a tioc3b tioc3c tioc3d tioc4a tioc4b tioc4c tioc4d input pins tic5u tic5v tic5w counter clear function tgr compare match or input capture tgr compare match or input capture tgr compare match or input capture tgr compare match or input capture tgr compare match or input capture tgr compare match or input capture 0 output ? 1 output ? compare match output toggle output ? input capture function synchronous operation ? pwm mode 1 ? pwm mode 2 ? ? ? complementary pwm mode ? ? ? ? reset pwm mode ? ? ? ? ac synchronous motor drive mode ? ? ?
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 429 of 1560 mar 18, 2011 sh7080 group item channel 0 channel 1 channel 2 channel 3 channel 4 channel 5 phase counting mode ? ? ? ? buffer operation ? ? ? dead time compensation counter function ? ? ? ? ? dmac activation tgra_0 compare match or input capture tgra_1 compare match or input capture tgra_2 compare match or input capture tgra_3 compare match or input capture tgra_4 compare match or input capture ? dtc activation tgr compare match or input capture tgr compare match or input capture tgr compare match or input capture tgr compare match or input capture tgr compare match or input capture and tcnt overflow or underflow tgr compare match or input capture a/d converter start trigger tgra_0 compare match or input capture tgre_0 compare match tgra_1 compare match or input capture tgra_2 compare match or input capture tgra_3 compare match or input capture tgra_4 compare match or input capture tcnt_4 underflow (trough) in complement ary pwm mode ?
section 11 multi-function timer pulse unit 2 (mtu2) page 430 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group item channel 0 channel 1 channel 2 channel 3 channel 4 channel 5 interrupt sources 7 sources ? compare match or input capture 0a ? compare match or input capture 0b ? compare match or input capture 0c ? compare match or input capture 0d ? compare match 0e ? compare match 0f ? overflow 4 sources ? compare match or input capture 1a ? compare match or input capture 1b ? overflow ? underflow 4 sources ? compare match or input capture 2a ? compare match or input capture 2b ? overflow ? underflow 5 sources ? compare match or input capture 3a ? compare match or input capture 3b ? compare match or input capture 3c ? compare match or input capture 3d ? overflow 5 sources ? compare match or input capture 4a ? compare match or input capture 4b ? compare match or input capture 4c ? compare match or input capture 4d ? overflow or underflow 3 sources ? compare match or input capture 5u ? compare match or input capture 5v ? compare match or input capture 5w
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 431 of 1560 mar 18, 2011 sh7080 group item channel 0 channel 1 channel 2 channel 3 channel 4 channel 5 a/d converter start request delaying function ? ? ? ? ? a/d converter start request at a match between tadcor a_4 and tcnt_4 ? a/d converter start request at a match between tadcor b_4 and tcnt_4 ? interrupt skipping function ? ? ? ? skips tgra_3 compare match interrupts ? skips tciv_4 interrupts ? [legend] : possible ?: not possible
section 11 multi-function timer pulse unit 2 (mtu2) page 432 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 11.1 shows a block diagram of the mtu2. a/d conversion start signals channels 0 to 4: trgan channel 0: trg0n channel 4: trg4an trg4bn input/output pins channel 3: tioc3a tioc3b tioc3c tioc3d channel 4: tioc4a tioc4b tioc4c tioc4d input pins channel 5: tic5u tic5v tic5w interrupt request signals channel 3: tgia_3 tgib_3 tgic_3 tgid_3 tciv_3 channel 4: tgia_4 tgib_4 tgic_4 tgid_4 tciv_4 channel 5: tgiu_5 tgiv_5 tgiw_5 clock input internal clock: mp /1 mp /4 mp /16 mp /64 mp /256 mp /1024 external clock: tclka tclkb tclkc tclkd interrupt request signals channel 0: tgia_0 tgib_0 tgic_0 tgid_0 tgie_0 tgif_0 tciv_0 channel 1: tgia_1 tgib_1 tciv_1 tciu_1 channel 2: tgia_2 tgib_2 tciv_2 tciu_2 input/output pins channel 0: tioc0a tioc0b tioc0c tioc0d channel 1: tioc1a tioc1b channel 2: tioc2a tioc2b internal data bus tcnt tgra tgrb tgrc tgrd tmdr tcr tiorl tiorh tsr tier channel 3 tcnt tgra tgrb tgrc tgrd tmdr tcr tiorl tiorh tsr tier channel 4 tcnts tcbr tddr tcdr toer tocr tgcr bus i/f common tcnt tgra tgrb tmdr tcr tior tsr tier tsyr tstr channel 2 tcnt tgra tgrb tmdr tcr tior tsr tier channel 1 tcnt tgra tgrb tgrc tgrd tgre tgrf tmdr tcr tiorl tiorh tsr tier channel 0 tcntu tgru tcntv tgrv tcntw tgrw tcr tior tier tsr channel 5 control logic module data bus control logic for channels 0 to 2 control logic for channels 3 and 4 [legend] tstr: timer start register tsyr: timer synchronous register tcr: timer control register tmdr: timer mode register tior: timer i/o control register tiorh: timer i/o control register h tiorl: timer i/o control register l tier: timer interrupt enable register tgcr: timer gate control register toer: timer output master enable register tocr: timer output control register tsr: timer status register tcnt: timer counter tcnts: timer subcounter tcdr: timer cycle data register tcbr: timer cycle buffer register tddr: timer dead time data register tgra: timer general register a tgrb: timer general register b tgrc: timer general register c tgrd: timer general register d tgre: timer general register e tgrf: timer general register f tgru: timer general register u tgrv: timer general register v tgrw: timer general register w figure 11.1 block diagram of mtu2
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 433 of 1560 mar 18, 2011 sh7080 group 11.2 input/output pins table 11.2 pin configuration channel pin name i/o function common tclka input external clock a input pin (channel 1 phase counting mode a phase input) tclkb input external clock b input pin (channel 1 phase counting mode b phase input) tclkc input external clock c input pin (channel 2 phase counting mode a phase input) tclkd input external clock d input pin (channel 2 phase counting mode b phase input) 0 tioc0a i/o tgra_0 input capture input/output compare output/pwm output pin tioc0b i/o tgrb_0 input capture input/output compare output/pwm output pin tioc0c i/o tgrc_0 input capture input/output compare output/pwm output pin tioc0d i/o tgrd_0 input capture input/output compare output/pwm output pin 1 tioc1a i/o tgra_1 input capture input/output compare output/pwm output pin tioc1b i/o tgrb_1 input capture input/output compare output/pwm output pin 2 tioc2a i/o tgra_2 input capture input/output compare output/pwm output pin tioc2b i/o tgrb_2 input capture input/output compare output/pwm output pin 3 tioc3a i/o tgra_3 input capture input/output compare output/pwm output pin tioc3b i/o tgrb_3 input capture input/output compare output/pwm output pin tioc3c i/o tgrc_3 input capture input/output compare output/pwm output pin tioc3d i/o tgrd_3 input capture input/output compare output/pwm output pin 4 tioc4a i/o tgra_4 input capture input/output compare output/pwm output pin tioc4b i/o tgrb_4 input capture input/output compare output/pwm output pin tioc4c i/o tgrc_4 input capture input/output compare output/pwm output pin tioc4d i/o tgrd_4 input capture input/output compare output/pwm output pin 5 tic5u input tgru_5 input capture input/external pulse input pin tic5v input tgrv_5 input capture input/external pulse input pin tic5w input tgrw_5 input capture input/external pulse input pin
section 11 multi-function timer pulse unit 2 (mtu2) page 434 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3 register descriptions the mtu2 has the following registers. for details on register addresses and register states during each process, refer to section 27, list of register s. to distinguish registers in each channel, an underscore and the channel number are added as a suffix to the register name; tcr for channel 0 is expressed as tcr_0. table 11.3 register configuration register name abbrevia- tion r/w initial value address access size timer control register_3 tcr_3 r/w h'00 h'ffffc200 8, 16, 32 timer control register_4 tcr_4 r/w h'00 h'ffffc201 8 timer mode register_3 tmdr_3 r/w h'00 h'ffffc202 8, 16 timer mode register_4 tmdr_4 r/w h'00 h'ffffc203 8 timer i/o control register h_3 tiorh_3 r/w h'00 h'ffffc204 8, 16, 32 timer i/o control register l_3 tiorl_3 r/w h'00 h'ffffc205 8 timer i/o control register h_4 tiorh_4 r/w h'00 h'ffffc206 8, 16 timer i/o control register l_4 tiorl_4 r/w h'00 h'ffffc207 8 timer interrupt enable register_3 tier_3 r/w h'00 h'ffffc208 8, 16 timer interrupt enable register_4 tier_4 r/w h'00 h'ffffc209 8 timer output master enable register toer r/w h'c0 h'ffffc20a 8 timer gate control register tgcr r/w h'80 h'ffffc20d 8 timer output control register 1 tocr1 r/w h'00 h'ffffc20e 8, 16 timer output control register 2 tocr2 r/w h'00 h'ffffc20f 8 timer counter_3 tcnt_3 r/w h'0000 h'ffffc210 16, 32 timer counter_4 tcnt_4 r/w h'0000 h'ffffc212 16 timer cycle data register tcdr r/w h'ffff h'ffffc214 16, 32 timer dead time data register tddr r/w h'ffff h'ffffc216 16 timer general register a_3 tgra_3 r/w h'ffff h'ffffc218 16, 32 timer general register b_3 tgrb_3 r/w h'ffff h'ffffc21a 16 timer general register a_4 tgra_4 r/w h'ffff h'ffffc21c 16, 32 timer general register b_4 tgrb_4 r/w h'ffff h'ffffc21e 16
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 435 of 1560 mar 18, 2011 sh7080 group register name abbrevia- tion r/w initial value address access size timer subcounter tcnts r h'0000 h'ffffc220 16, 32 timer cycle buffer register tcbr r/w h'ffff h'ffffc222 16 timer general register c_3 tgrc_3 r/w h'ffff h'ffffc224 16, 32 timer general register d_3 tgrd_3 r/w h'ffff h'ffffc226 16 timer general register c_4 tgrc_4 r/w h'ffff h'ffffc228 16, 32 timer general register d_4 tgrd_4 r/w h'ffff h'ffffc22a 16 timer status register_3 tsr_3 r/w h'c0 h'ffffc22c 8, 16 timer status register_4 tsr_4 r/w h'c0 h'ffffc22d 8 timer interrupt skipping set register titcr r/w h'00 h'ffffc230 8, 16 timer interrupt skipping counter titcnt r h'00 h'ffffc231 8 timer buffer transfer set register tbter r/w h'00 h'ffffc232 8 timer dead time enable register tder r/w h'01 h'ffffc234 8 timer output level buffer register tolbr r/w h'00 h'ffffc236 8 timer buffer operation transfer mode register_3 tbtm_3 r/w h'00 h'ffffc238 8, 16 timer buffer operation transfer mode register_4 tbtm_4 r/w h'00 h'ffffc239 8 timer a/d converter start request control register tadcr r/w h'0000 h'ffffc240 16 timer a/d converter start request cycle set register a_4 tadcora_4 r/w h'ffff h'ffffc244 16, 32 timer a/d converter start request cycle set register b_4 tadcorb_4 r/w h'ffff h'ffffc246 16 timer a/d converter start request cycle set buffer register a_4 tadcobra_4 r/w h'ffff h'ffffc248 16, 32 timer a/d converter start request cycle set buffer register b_4 tadcobrb_4 r/w h'ffff h'ffffc24a 16
section 11 multi-function timer pulse unit 2 (mtu2) page 436 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register name abbrevia- tion r/w initial value address access size timer waveform control register twcr r/w h'00 h'ffffc260 8 timer start register tstr r/w h'00 h'ffffc280 8, 16 timer synchronous register tsyr r/w h'00 h'ffffc281 8 timer counter synchronous start register tcsystr r/w h'00 h'ffffc282 8 timer read/write enable register trwer r/w h'01 h'ffffc284 8 timer control register_0 tcr_0 r/w h'00 h'ffffc300 8, 16, 32 timer mode register_0 tmdr_0 r/w h'00 h'ffffc301 8 timer i/o control register h_0 tiorh_0 r/w h'00 h'ffffc302 8, 16 timer i/o control register l_0 tiorl_0 r/w h'00 h'ffffc303 8 timer interrupt enable register_0 tier_0 r/w h'00 h'ffffc304 8, 16, 32 timer status register_0 tsr_0 r/w h'c0 h'ffffc305 8 timer counter_0 tcnt_0 r/w h'0000 h'ffffc306 16 timer general register a_0 tgra_0 r/w h'ffff h'ffffc308 16, 32 timer general register b_0 tgrb_0 r/w h'ffff h'ffffc30a 16 timer general register c_0 tgrc_0 r/w h'ffff h'ffffc30c 16, 32 timer general register d_0 tgrd_0 r/w h'ffff h'ffffc30e 16 timer general register e_0 tgre_0 r/w h'ffff h'ffffc320 16, 32 timer general register f_0 tgrf_0 r/w h'ffff h'ffffc322 16 timer interrupt enable register 2_0 tier2_0 r/w h'00 h'ffffc324 8, 16 timer status register 2_0 tsr2_0 r/w h'c0 h'ffffc325 8 timer buffer operation transfer mode register_0 tbtm_0 r/w h'00 h'ffffc326 8 timer control register_1 tcr_1 r/w h'00 h'ffffc380 8, 16 timer mode register_1 tmdr_1 r/w h'00 h'ffffc381 8 timer i/o control register_1 tior_1 r/w h'00 h'ffffc382 8 timer interrupt enable register_1 tier_1 r/w h'00 h'ffffc384 8, 16, 32 timer status register_1 tsr_1 r/w h'c0 h'ffffc385 8
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 437 of 1560 mar 18, 2011 sh7080 group register name abbrevia- tion r/w initial value address access size timer counter_1 tcnt_1 r/w h'0000 h'ffffc386 16 timer general register a_1 tgra_1 r/w h'ffff h'ffffc388 16, 32 timer general register b_1 tgrb_1 r/w h'ffff h'ffffc38a 16 timer input capture control register ticcr r/w h'00 h'ffffc390 8 timer control register_2 tcr_2 r/w h'00 h'ffffc400 8, 16 timer mode register_2 tmdr_2 r/w h'00 h'ffffc401 8 timer i/o control register_2 tior_2 r/w h'00 h'ffffc402 8 timer interrupt enable register_2 tier_2 r/w h'00 h'ffffc404 8, 16, 32 timer status register_2 tsr_2 r/w h'c0 h'ffffc405 8 timer counter_2 tcnt_2 r/w h'0000 h'ffffc406 16 timer general register a_2 tgra_2 r/w h'ffff h'ffffc408 16, 32 timer general register b_2 tgrb_2 r/w h'ffff h'ffffc40a 16 timer counter u_5 tcntu_5 r/w h'0000 h'ffffc480 16, 32 timer general register u_5 tgru_5 r/w h'ffff h'ffffc482 16 timer control register u_5 tcru_5 r/w h'00 h'ffffc484 8 timer i/o control register u_5 tioru_5 r/w h'00 h'ffffc486 8 timer counter v_5 tcntv_5 r/w h'0000 h'ffffc490 16, 32 timer general register v_5 tgrv_5 r/w h'ffff h'ffffc492 16 timer control register v_5 tcrv_5 r/w h'00 h'ffffc494 8 timer i/o control register v_5 tiorv_5 r/w h'00 h'ffffc496 8 timer counter w_5 tcntw_5 r/w h'0000 h'ffffc4a0 16, 32 timer general register w_5 tgrw_5 r/w h'ffff h'ffffc4a2 16 timer control register w_5 tcrw_5 r/w h'00 h'ffffc4a4 8 timer i/o control register w_5 tiorw_5 r/w h'00 h'ffffc4a6 8 timer status register_5 tsr_5 r/w h'00 h'ffffc4b0 8 timer interrupt enable register_5 tier_5 r/w h'00 h'ffffc4b2 8 timer start register_5 tstr_5 r/w h'00 h'ffffc4b4 8 timer compare match clear register tcntcmpclr r/w h'00 h'ffffc4b6 8
section 11 multi-function timer pulse unit 2 (mtu2) page 438 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.1 timer control register (tcr) the tcr registers are 8-bit readable/writable regi sters that control the tcnt operation for each channel. the mtu2 has a total of eight tcr registers, one each for channels 0 to 4 and three (tcru_5, tcrv_5, and tcrw_5) for channel 5. tcr register settings should be conducted only when tcnt operation is stopped. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w cclr[2:0] ckeg[1:0] tpsc[2:0] bit bit name initial value r/w description 7 to 5 cclr[2:0] 000 r/w counter clear 0 to 2 these bits select the tcnt counter clearing source. see tables 11.4 and 11.5 for details. 4, 3 ckeg[1:0] 00 r/w clock edge 0 and 1 these bits select the input clock edge. when the input clock is counted using both edges, the input clock period is halved (e.g. mp /4 both edges = mp /2 rising edge). if phase counting mode is used on channels 1 and 2, this setting is ignored and the phase counting mode setting has priority. internal clock edge selection is valid when the input clock is mp /4 or slower. when mp /1, or the overflow/underflow of another channel is selected for the input clock, although values can be written, counter operation compiles with the initial value. 00: count at rising edge 01: count at falling edge 1x: count at both edges 2 to 0 tpsc[2:0] 000 r/w time prescaler 0 to 2 these bits select the tcnt counter clock. the clock source can be selected independently for each channel. see tables 11.6 to 11.10 for details. [legend] x: don't care
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 439 of 1560 mar 18, 2011 sh7080 group table 11.4 cclr0 to cclr2 (channels 0, 3, and 4) channel bit 7 cclr2 bit 6 cclr1 bit 5 cclr0 description 0, 3, 4 0 0 0 tcnt clearing disabled 1 tcnt cleared by tgra compare match/input capture 1 0 tcnt cleared by tgrb compare match/input capture 1 tcnt cleared by counter clearing for another channel performing synchronous clearing/ synchronous operation * 1 1 0 0 tcnt clearing disabled 1 tcnt cleared by tgrc compare match/input capture * 2 1 0 tcnt cleared by tgrd compare match/input capture * 2 1 tcnt cleared by counter clearing for another channel performing synchronous clearing/ synchronous operation * 1 notes: 1. synchronous operation is set by setting the sync bit in tsyr to 1. 2. when tgrc or tgrd is used as a buffer register, tcnt is not cleared because the buffer register setting has priority, and compare match/input capture does not occur. table 11.5 cclr0 to cclr2 (channels 1 and 2) channel bit 7 reserved * 2 bit 6 cclr1 bit 5 cclr0 description 1, 2 0 0 0 tcnt clearing disabled 1 tcnt cleared by tgra compare match/input capture 1 0 tcnt cleared by tgrb compare match/input capture 1 tcnt cleared by counter clearing for another channel performing synchronous clearing/ synchronous operation * 1 notes: 1. synchronous operation is selected by setting the sync bit in tsyr to 1. 2. bit 7 is reserved in channels 1 and 2. it is always read as 0 and cannot be modified.
section 11 multi-function timer pulse unit 2 (mtu2) page 440 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.6 tpsc0 to tpsc2 (channel 0) channel bit 2 tpsc2 bit 1 tpsc1 bit 0 tpsc0 description 0 0 0 0 internal clock: counts on mp /1 1 internal clock: counts on mp /4 1 0 internal clock: counts on mp /16 1 internal clock: counts on mp /64 1 0 0 external clock: counts on tclka pin input 1 external clock: counts on tclkb pin input 1 0 external clock: counts on tclkc pin input 1 external clock: counts on tclkd pin input table 11.7 tpsc0 to tpsc2 (channel 1) channel bit 2 tpsc2 bit 1 tpsc1 bit 0 tpsc0 description 1 0 0 0 internal clock: counts on mp /1 1 internal clock: counts on mp /4 1 0 internal clock: counts on mp /16 1 internal clock: counts on mp /64 1 0 0 external clock: counts on tclka pin input 1 external clock: counts on tclkb pin input 1 0 internal clock: counts on mp /256 1 counts on tcnt_2 overflow/underflow note: this setting is ignored when channel 1 is in phase counting mode.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 441 of 1560 mar 18, 2011 sh7080 group table 11.8 tpsc0 to tpsc2 (channel 2) channel bit 2 tpsc2 bit 1 tpsc1 bit 0 tpsc0 description 2 0 0 0 internal clock: counts on mp /1 1 internal clock: counts on mp /4 1 0 internal clock: counts on mp /16 1 internal clock: counts on mp /64 1 0 0 external clock: counts on tclka pin input 1 external clock: counts on tclkb pin input 1 0 external clock: counts on tclkc pin input 1 internal clock: counts on mp /1024 note: this setting is ignored when channel 2 is in phase counting mode. table 11.9 tpsc0 to tpsc2 (channels 3 and 4) channel bit 2 tpsc2 bit 1 tpsc1 bit 0 tpsc0 description 3, 4 0 0 0 internal clock: counts on mp /1 1 internal clock: counts on mp /4 1 0 internal clock: counts on mp /16 1 internal clock: counts on mp /64 1 0 0 internal clock: counts on mp /256 1 internal clock: counts on mp /1024 1 0 external clock: counts on tclka pin input 1 external clock: counts on tclkb pin input
section 11 multi-function timer pulse unit 2 (mtu2) page 442 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.10 tpsc1 and tpsc0 (channel 5) channel bit 1 tpsc1 bit 0 tpsc0 description 5 0 0 internal clock: counts on mp /1 1 internal clock: counts on mp /4 1 0 internal clock: counts on mp /16 1 internal clock: counts on mp /64 note: bits 7 to 2 are reserved in channel 5. these bits are always read as 0. the write value should always be 0. 11.3.2 timer mode register (tmdr) the tmdr registers are 8-bit readab le/writable registers that are used to set the operating mode of each channel. the mtu2 has five tmdr registers, one each for channels 0 to 4. tmdr register settings should be changed only when tcnt operation is stopped. bit: initial value: r/w: 7654321 0 00000000 - r/w r/w r/w r/w r/w r/w r/w - bfe bfb bfa md[3:0] bit bit name initial value r/w description 7 ? 0 ? reserved this bit is always read as 0. the write value should always be 0. 6 bfe 0 r/w buffer operation e specifies whether tgre_0 and tgrf_0 are to operate in the normal way or to be used together for buffer operation. compare match with tgrf occurs even when tgrf is used as a buffer register. in channels 1 to 4, this bit is reserved. it is always read as 0 and the write value should always be 0. 0: tgre_0 and tgrf_0 operate normally 1: tgre_0 and tgrf_0 used together for buffer operation
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 443 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 bfb 0 r/w buffer operation b specifies whether tgrb is to operate in the normal way, or tgrb and tgrd are to be used together for buffer operation. when tgrd is used as a buffer register, tgrd input capture/output compare do not take place in modes other than complementary pwm mode, but compare match with tgrd occurs in complementary pwm mode. since the tgfd flag will be set if a compare match occurs during tb interval in complementary pwm mode, the tgied bit in timer interrupt enable register 3/4 (tier_3/4) should be cleared to 0. in channels 1 and 2, which have no tgrd, bit 5 is reserved. it is always read as 0 and cannot be modified. 0: tgrb and tgrd operate normally 1: tgrb and tgrd used together for buffer operation 4 bfa 0 r/w buffer operation a specifies whether tgra is to operate in the normal way, or tgra and tgrc are to be used together for buffer operation. when tgrc is used as a buffer register, tgrc input capture/output compare do not take place in modes other than complementary pwm mode, but compare match with tgrc occurs in complementary pwm mode. since the tgfc flag will be set if a compare match occurs on channel 4 during tb interval in complementary pwm mode, the tgiec bit in timer interrupt enable register 4 (tier_4) should be cleared to 0. in channels 1 and 2, which have no tgrc, bit 4 is reserved. it is always read as 0 and cannot be modified. 0: tgra and tgrc operate normally 1: tgra and tgrc used together for buffer operation 3 to 0 md[3:0] 0000 r/w modes 0 to 3 these bits are used to set the timer operating mode. see table 11.11 for details.
section 11 multi-function timer pulse unit 2 (mtu2) page 444 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.11 setting of operation mode by bits md0 to md3 bit 3 md3 bit 2 md2 bit 1 md1 bit 0 md0 description 0 0 0 0 normal operation 1 setting prohibited 1 0 pwm mode 1 1 pwm mode 2 * 1 1 0 0 phase counting mode 1 * 2 1 phase counting mode 2 * 2 1 0 phase counting mode 3 * 2 1 phase counting mode 4 * 2 1 0 0 0 reset synchronous pwm mode * 3 1 setting prohibited 1 x setting prohibited 1 0 0 setting prohibited 1 complementary pwm mode 1 (transmit at crest) * 3 1 0 complementary pwm mode 2 (transmit at trough) * 3 1 complementary pwm mode 2 (transmit at crest and trough) * 3 [legend] x: don't care notes: 1. pwm mode 2 can not be set for channels 3 and 4. 2. phase counting mode can not be set for channels 0, 3, and 4. 3. reset synchronous pwm mode and complementary pwm mode can only be set for channel 3. when channel 3 is set to reset synchronous pwm mode or complementary pwm mode, the channel 4 settings become ineffective and automatically conform to the channel 3 settings. however, do not set channel 4 to reset synchronous pwm mode or complementary pwm mode. reset synchronous pwm mode and complementary pwm mode cannot be set for channels 0, 1, and 2.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 445 of 1560 mar 18, 2011 sh7080 group 11.3.3 timer i/o control register (tior) the tior registers are 8-bit read able/writable registers that control the tgr registers. the mtu2 has a total of eleven tior registers, two each for channels 0, 3, and 4, one each for channels 1 and 2, and three (tioru_5, tiorv_5, and tiorw_5) for channel 5. tior should be set when tmdr is set to select normal operation, pwm mode, or phase counting mode. the initial output specified by tior is valid when the counter is stopped (the cst bit in tstr is cleared to 0). note also that, in pwm mode 2, the output at the point at which the counter is cleared to 0 is specified. when tgrc or tgrd is designated for buffer operation, this setting is invalid and the register operates as a buffer register. ? tiorh_0, tior_1, tior_2, tiorh_3, tiorh_4 bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w iob[3:0] ioa[3:0] bit bit name initial value r/w description 7 to 4 iob[3:0] 0000 r/w i/o control b0 to b3 specify the function of tgrb. see the following tables. tiorh_0: table 11.12 tior_1: table 11.14 tior_2: table 11.15 tiorh_3: table 11.16 tiorh_4: table 11.18 3 to 0 ioa[3:0] 0000 r/w i/o control a0 to a3 specify the function of tgra. see the following tables. tiorh_0: table 11.20 tior_1: table 11.22 tior_2: table 11.23 tiorh_3: table 11.24 tiorh_4: table 11.26
section 11 multi-function timer pulse unit 2 (mtu2) page 446 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? tiorl_0, tiorl_3, tiorl_4 bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w iod[3:0] ioc[3:0] bit bit name initial value r/w description 7 to 4 iod[3:0] 0000 r/w i/o control d0 to d3 specify the function of tgrd. see the following tables. tiorl_0: table 11.13 tiorl_3: table 11.17 tiorl_4: table 11.19 3 to 0 ioc[3:0] 0000 r/w i/o control c0 to c3 specify the function of tgrc. see the following tables. tiorl_0: table 11.21 tiorl_3: table 11.25 tiorl_4: table 11.27 ? tioru_5, tiorv_5, tiorw_5 bit: initial value: r/w: 7654321 0 00000000 r r r r/w r/w r/w r/w r/w - - - ioc[4:0] bit bit name initial value r/w description 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 to 0 ioc[4:0] 00000 r/w i/o control c0 to c4 specify the function of tgru_5, tgrv_5, and tgrw_5. for details, see table 11.28.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 447 of 1560 mar 18, 2011 sh7080 group table 11.12 tiorh_0 (channel 0) description bit 7 iob3 bit 6 iob2 bit 5 iob1 bit 4 iob0 tgrb_0 function tioc0b pin function 0 output retained * 0 1 initial output is 0 0 output at compare match 0 initial output is 0 1 output at compare match 0 1 1 initial output is 0 toggle output at compare match 0 0 output retained 1 initial output is 1 0 output at compare match 0 initial output is 1 1 output at compare match 0 1 1 1 output compare register initial output is 1 toggle output at compare match 1 0 input capture at rising edge 0 1 input capture at falling edge 0 1 x input capture register input capture at both edges 1 x x capture input source is channel 1/count clock input capture at tcnt_1 count-up/count-down [legend] x: don't care note: * after power-on reset, 0 is output until tior is set.
section 11 multi-function timer pulse unit 2 (mtu2) page 448 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.13 tiorl_0 (channel 0) description bit 7 iod3 bit 6 iod2 bit 5 iod1 bit 4 iod0 tgrd_0 function tioc0d pin function 0 0 0 0 output retained * 1 1 initial output is 0 0 output at compare match 1 0 output compare register * 2 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 0 0 0 input capture at rising edge 1 input capture at falling edge 1 x input capture register * 2 input capture at both edges 1 x x capture input source is channel 1/count clock input capture at tcnt_1 count-up/count-down [legend] x: don't care notes: 1. after power-on reset, 0 is output until tior is set. 2. when the bfb bit in tmdr_0 is set to 1 and tgrd_0 is used as a buffer register, this setting is invalid and input capture/output compare is not generated.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 449 of 1560 mar 18, 2011 sh7080 group table 11.14 tior_1 (channel 1) description bit 7 iob3 bit 6 iob2 bit 5 iob1 bit 4 iob0 tgrb_1 function tioc1b pin function 0 0 0 0 output retained * 1 output compare register initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 0 0 0 input capture at rising edge 1 input capture at falling edge 1 x input capture register input capture at both edges 1 x x input capture at generation of tgrc_0 compare match/input capture [legend] x: don't care note: * after power-on reset, 0 is output until tior is set.
section 11 multi-function timer pulse unit 2 (mtu2) page 450 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.15 tior_2 (channel 2) description bit 7 iob3 bit 6 iob2 bit 5 iob1 bit 4 iob0 tgrb_2 function tioc2b pin function 0 0 0 0 output retained * 1 output compare register initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 x 0 0 input capture at rising edge 1 input capture register input capture at falling edge 1 x input capture at both edges [legend] x: don't care note: * after power-on reset, 0 is output until tior is set.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 451 of 1560 mar 18, 2011 sh7080 group table 11.16 tiorh_3 (channel 3) description bit 7 iob3 bit 6 iob2 bit 5 iob1 bit 4 iob0 tgrb_3 function tioc3b pin function 0 0 0 0 output retained * 1 output compare register initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 x 0 0 input capture at rising edge 1 input capture register input capture at falling edge 1 x input capture at both edges [legend] x: don't care note: * after power-on reset, 0 is output until tior is set.
section 11 multi-function timer pulse unit 2 (mtu2) page 452 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.17 tiorl_3 (channel 3) description bit 7 iod3 bit 6 iod2 bit 5 iod1 bit 4 iod0 tgrd_3 function tioc3d pin function 0 0 0 0 output retained * 1 1 output compare register * 2 initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 x 0 0 input capture at rising edge 1 input capture register * 2 input capture at falling edge 1 x input capture at both edges [legend] x: don't care notes: 1. after power-on reset, 0 is output until tior is set. 2. when the bfb bit in tmdr_3 is set to 1 and tgrd_3 is used as a buffer register, this setting is invalid and input capture/output compare is not generated.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 453 of 1560 mar 18, 2011 sh7080 group table 11.18 tiorh_4 (channel 4) description bit 7 iob3 bit 6 iob2 bit 5 iob1 bit 4 iob0 tgrb_4 function tioc4b pin function 0 0 0 0 output retained * 1 output compare register initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 x 0 0 input capture at rising edge 1 input capture register input capture at falling edge 1 x input capture at both edges [legend] x: don't care note: * after power-on reset, 0 is output until tior is set.
section 11 multi-function timer pulse unit 2 (mtu2) page 454 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.19 tiorl_4 (channel 4) description bit 7 iod3 bit 6 iod2 bit 5 iod1 bit 4 iod0 tgrd_4 function tioc4d pin function 0 0 0 0 output retained * 1 1 output compare register * 2 initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 x 0 0 input capture at rising edge 1 input capture register * 2 input capture at falling edge 1 x input capture at both edges [legend] x: don't care notes: 1. after power-on reset, 0 is output until tior is set. 2. when the bfb bit in tmdr_4 is set to 1 and tgrd_4 is used as a buffer register, this setting is invalid and input capture/output compare is not generated.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 455 of 1560 mar 18, 2011 sh7080 group table 11.20 tiorh_0 (channel 0) description bit 3 ioa3 bit 2 ioa2 bit 1 ioa1 bit 0 ioa0 tgra_0 function tioc0a pin function 0 0 0 0 output retained * 1 output compare register initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 0 0 0 input capture at rising edge 1 input capture at falling edge 1 x input capture register input capture at both edges 1 x x capture input source is channel 1/count clock input capture at tcnt_1 count-up/count-down [legend] x: don't care note: * after power-on reset, 0 is output until tior is set.
section 11 multi-function timer pulse unit 2 (mtu2) page 456 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.21 tiorl_0 (channel 0) description bit 3 ioc3 bit 2 ioc2 bit 1 ioc1 bit 0 ioc0 tgrc_0 function tioc0c pin function 0 0 0 0 output retained * 1 1 output compare register * 2 initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 0 0 0 input capture at rising edge 1 input capture at falling edge 1 x input capture register * 2 input capture at both edges 1 x x capture input source is channel 1/count clock input capture at tcnt_1 count-up/count-down [legend] x: don't care notes: 1. after power-on reset, 0 is output until tior is set. 2. when the bfa bit in tmdr_0 is set to 1 and tgrc_0 is used as a buffer register, this setting is invalid and input capture/output compare is not generated.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 457 of 1560 mar 18, 2011 sh7080 group table 11.22 tior_1 (channel 1) description bit 3 ioa3 bit 2 ioa2 bit 1 ioa1 bit 0 ioa0 tgra_1 function tioc1a pin function 0 0 0 0 output retained * 1 output compare register initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 0 0 0 input capture at rising edge 1 input capture at falling edge 1 x input capture register input capture at both edges 1 x x input capture at generation of channel 0/tgra_0 compare match/input capture [legend] x: don't care note: * after power-on reset, 0 is output until tior is set.
section 11 multi-function timer pulse unit 2 (mtu2) page 458 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.23 tior_2 (channel 2) description bit 3 ioa3 bit 2 ioa2 bit 1 ioa1 bit 0 ioa0 tgra_2 function tioc2a pin function 0 0 0 0 output retained * 1 output compare register initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 x 0 0 input capture at rising edge 1 input capture register input capture at falling edge 1 x input capture at both edges [legend] x: don't care note: * after power-on reset, 0 is output until tior is set.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 459 of 1560 mar 18, 2011 sh7080 group table 11.24 tiorh_3 (channel 3) description bit 3 ioa3 bit 2 ioa2 bit 1 ioa1 bit 0 ioa0 tgra_3 function tioc3a pin function 0 0 0 0 output retained * 1 output compare register initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 x 0 0 input capture at rising edge 1 input capture register input capture at falling edge 1 x input capture at both edges [legend] x: don't care note: * after power-on reset, 0 is output until tior is set.
section 11 multi-function timer pulse unit 2 (mtu2) page 460 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.25 tiorl_3 (channel 3) description bit 3 ioc3 bit 2 ioc2 bit 1 ioc1 bit 0 ioc0 tgrc_3 function tioc3c pin function 0 0 0 0 output retained * 1 1 output compare register * 2 initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 x 0 0 input capture at rising edge 1 input capture register * 2 input capture at falling edge 1 x input capture at both edges [legend] x: don't care notes: 1. after power-on reset, 0 is output until tior is set. 2. when the bfa bit in tmdr_3 is set to 1 and tgrc_3 is used as a buffer register, this setting is invalid and input capture/output compare is not generated.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 461 of 1560 mar 18, 2011 sh7080 group table 11.26 tiorh_4 (channel 4) description bit 3 ioa3 bit 2 ioa2 bit 1 ioa1 bit 0 ioa0 tgra_4 function tioc4a pin function 0 0 0 0 output retained * 1 output compare register initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 x 0 0 input capture at rising edge 1 input capture register input capture at falling edge 1 x input capture at both edges [legend] x: don't care note: * after power-on reset, 0 is output until tior is set.
section 11 multi-function timer pulse unit 2 (mtu2) page 462 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.27 tiorl_4 (channel 4) description bit 3 ioc3 bit 2 ioc2 bit 1 ioc1 bit 0 ioc0 tgrc_4 function tioc4c pin function 0 0 0 0 output retained * 1 1 output compare register * 2 initial output is 0 0 output at compare match 1 0 initial output is 0 1 output at compare match 1 initial output is 0 toggle output at compare match 1 0 0 output retained 1 initial output is 1 0 output at compare match 1 0 initial output is 1 1 output at compare match 1 initial output is 1 toggle output at compare match 1 x 0 0 input capture at rising edge 1 input capture register * 2 input capture at falling edge 1 x input capture at both edges [legend] x: don't care notes: 1. after power-on reset, 0 is output until tior is set. 2. when the bfa bit in tmdr_4 is set to 1 and tgrc_4 is used as a buffer register, this setting is invalid and input capture/output compare is not generated.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 463 of 1560 mar 18, 2011 sh7080 group table 11.28 tioru_5, tiorv_5, and tiorw_5 (channel 5) description bit 4 ioc4 bit 3 ioc3 bit 2 ioc2 bit 1 ioc1 bit 0 ioc0 tgru_5, tgrv_5, and tgrw_5 function tic5u, tic5v, and tic5w pin function 0 0 0 0 0 compare match 1 setting prohibited 1 x setting prohibited 1 x x setting prohibited 1 x x x compare match register setting prohibited 1 0 0 0 0 setting prohibited 1 input capture at rising edge 1 0 input capture at falling edge 1 input capture at both edges 1 x x setting prohibited 1 0 0 0 setting prohibited 1 measurement of low pulse width of external input signal capture at trough of complementary pwm mode 1 0 measurement of low pulse width of external input signal capture at crest of complementary pwm mode 1 measurement of low pulse width of external input signal capture at crest and trough of complementary pwm mode 1 0 0 setting prohibited 1 measurement of high pulse width of external input signal capture at trough of complementary pwm mode 1 0 input capture register measurement of high pulse width of external input signal capture at crest of complementary pwm mode 1 measurement of high pulse width of external input signal capture at crest and trough of complementary pwm mode [legend] x: don't care
section 11 multi-function timer pulse unit 2 (mtu2) page 464 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.4 timer compare match clear register (tcntcmpclr) tcntcmpclr is an 8-bit readable/writable regist er that specifies requests to clear tcntu_5, tcntv_5, and tcntw_5. the mtu2 has one tcntcmpclr in channel 5. bit: initial value: r/w: 7654321 0 00000000 r r r r r r/w r/w r/w ----- cmp clr5u cmp clr5v cmp clr5w bit bit name initial value r/w description 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 cmpclr5u 0 r/w tcnt compare clear 5u enables or disables requests to clear tcntu_5 at tgru_5 compare match or input capture. 0: disables tcntu_5 to be cleared to h'0000 at tcntu_5 and tgru_5 compare match or input capture 1: enables tcntu_5 to be cleared to h'0000 at tcntu_5 and tgru_5 compare match or input capture 1 cmpclr5v 0 r/w tcnt compare clear 5v enables or disables requests to clear tcntv_5 at tgrv_5 compare match or input capture. 0: disables tcntv_5 to be cleared to h'0000 at tcntv_5 and tgrv_5 compare match or input capture 1: enables tcntv_5 to be cleared to h'0000 at tcntv_5 and tgrv_5 compare match or input capture
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 465 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 cmpclr5w 0 r/w tcnt compare clear 5w enables or disables requests to clear tcntw_5 at tgrw_5 compare match or input capture. 0: disables tcntw_5 to be cleared to h'0000 at tcntw_5 and tgrw_5 compare match or input capture 1: enables tcntw_5 to be cleared to h'0000 at tcntw_5 and tgrw_5 compare match or input capture 11.3.5 timer interrupt enable register (tier) the tier registers are 8-bit read able/writable registers that control enabling or disabling of interrupt requests for each channel. the mtu2 has seven tier registers, two for channel 0 and one each for channels 1 to 5. ? tier_0, tier_1, tier_2, tier_3, tier_4 bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w ttge ttge2 tcieu tciev tgied tgiec tgieb tgiea bit bit name initial value r/w description 7 ttge 0 r/w a/d converter start request enable enables or disables generation of a/d converter start requests by tgra input capture/compare match. 0: a/d converter start request generation disabled 1: a/d converter start request generation enabled
section 11 multi-function timer pulse unit 2 (mtu2) page 466 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 ttge2 0 r/w a/d converter start request enable 2 enables or disables generation of a/d converter start requests by tcnt_4 underflow (trough) in complementary pwm mode. in channels 0 to 3, bit 6 is reserved. it is always read as 0 and the write value should always be 0. 0: a/d converter start request generation by tcnt_4 underflow (trough) disabled 1: a/d converter start request generation by tcnt_4 underflow (trough) enabled 5 tcieu 0 r/w underflow interrupt enable enables or disables interrupt requests (tciu) by the tcfu flag when the tcfu flag in tsr is set to 1 in channels 1 and 2. in channels 0, 3, and 4, bit 5 is reserved. it is always read as 0 and the write value should always be 0. 0: interrupt requests (tciu) by tcfu disabled 1: interrupt requests (tciu) by tcfu enabled 4 tciev 0 r/w overflow interrupt enable enables or disables interrupt requests (tciv) by the tcfv flag when the tcfv flag in tsr is set to 1. 0: interrupt requests (tciv) by tcfv disabled 1: interrupt requests (tciv) by tcfv enabled 3 tgied 0 r/w tgr interrupt enable d enables or disables interrupt requests (tgid) by the tgfd bit when the tgfd bit in tsr is set to 1 in channels 0, 3, and 4. in channels 1 and 2, bit 3 is reserved. it is always read as 0 and the write value should always be 0. 0: interrupt requests (tgid) by tgfd bit disabled 1: interrupt requests (tgid) by tgfd bit enabled
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 467 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 tgiec 0 r/w tgr interrupt enable c enables or disables interrupt requests (tgic) by the tgfc bit when the tgfc bit in tsr is set to 1 in channels 0, 3, and 4. in channels 1 and 2, bit 2 is reserved. it is always read as 0 and the write value should always be 0. 0: interrupt requests (tgic) by tgfc bit disabled 1: interrupt requests (tgic) by tgfc bit enabled 1 tgieb 0 r/w tgr interrupt enable b enables or disables interrupt requests (tgib) by the tgfb bit when the tgfb bit in tsr is set to 1. 0: interrupt requests (tgib) by tgfb bit disabled 1: interrupt requests (tgib) by tgfb bit enabled 0 tgiea 0 r/w tgr interrupt enable a enables or disables interrupt requests (tgia) by the tgfa bit when the tgfa bit in tsr is set to 1. 0: interrupt requests (tgia) by tgfa bit disabled 1: interrupt requests (tgia) by tgfa bit enabled
section 11 multi-function timer pulse unit 2 (mtu2) page 468 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? tier2_0 bit: initial value: r/w: 7654321 0 00000000 r/w r r r r r r/w r/w ttge2 - - - - - tgief tgiee bit bit name initial value r/w description 7 ttge2 0 r/w a/d converter start request enable 2 enables or disables generation of a/d converter start requests by compare match between tcnt_0 and tgre_0. 0: a/d converter start request generation by compare match between tcnt_0 and tgre_0 disabled 1: a/d converter start request generation by compare match between tcnt_0 and tgre_0 enabled 6 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 tgief 0 r/w tgr interrupt enable f enables or disables interrupt requests by compare match between tcnt_0 and tgrf_0. 0: interrupt requests (tgif) by tgfe bit disabled 1: interrupt requests (tgif) by tgfe bit enabled 0 tgiee 0 r/w tgr interrupt enable e enables or disables interrupt requests by compare match between tcnt_0 and tgre_0. 0: interrupt requests (tgie) by tgee bit disabled 1: interrupt requests (tgie) by tgee bit enabled
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 469 of 1560 mar 18, 2011 sh7080 group ? tier_5 bit: initial value: r/w: 7654321 0 00000000 r r r r r r/w r/w r/w - - - - - tgie5u tgie5v tgie5w bit bit name initial value r/w description 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 tgie5u 0 r/w tgr interrupt enable 5u enables or disables interrupt requests (tgiu_5) by the cmfu5 bit when the cmfu5 bit in tsr_5 is set to 1. 0: interrupt requests (tgiu_5) disabled 1: interrupt requests (tgiu_5) enabled 1 tgie5v 0 r/w tgr interrupt enable 5v enables or disables interrupt requests (tgiv_5) by the cmfv5 bit when the cmfv5 bit in tsr_5 is set to 1. 0: interrupt requests (tgiv_5) disabled 1: interrupt requests (tgiv_5) enabled 0 tgie5w 0 r/w tgr interrupt enable 5w enables or disables interrupt requests (tgiw_5) by the cmfw5 bit when the cmfw5 bit in tsr_5 is set to 1. 0: interrupt requests (tgiw_5) disabled 1: interrupt requests (tgiw_5) enabled
section 11 multi-function timer pulse unit 2 (mtu2) page 470 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.6 timer status register (tsr) the tsr registers are 8-bit readable /writable registers that indicate the status of each channel. the mtu2 has seven tsr registers, two for cha nnel 0 and one each for channels 1 to 5. ? tsr_0, tsr_1, tsr_2, tsr_3, tsr_4 bit: initial value: r/w: 76543210 11000000 rr r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. tcfd - tcfu tcfv tgfd tgfc tgfb tgfa note: * bit bit name initial value r/w description 7 tcfd 1 r count direction flag status flag that shows the direction in which tcnt counts in channels 1 to 4. in channel 0, bit 7 is reserved. it is always read as 1 and the write value should always be 1. 0: tcnt counts down 1: tcnt counts up 6 ? 1 r reserved this bit is always read as 1. the write value should always be 1. 5 tcfu 0 r/(w) * 1 underflow flag status flag that indicates that tcnt underflow has occurred when channels 1 and 2 are set to phase counting mode. only 0 can be written, for flag clearing. in channels 0, 3, and 4, bit 5 is reserved. it is always read as 0 and the write value should always be 0. [setting condition] ? when the tcnt value underflows (changes from h'0000 to h'ffff) [clearing condition] ? when 0 is written to tcfu after reading tcfu = 1 * 2
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 471 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 tcfv 0 r/(w) * 1 overflow flag status flag that indicates that tcnt overflow has occurred. only 0 can be written, for flag clearing. [setting condition] ? when the tcnt value overflows (changes from h'ffff to h'0000) in channel 4, when the tcnt_4 value underflows (changes from h'0001 to h'0000) in complementary pwm mode, this flag is also set. [clearing condition] ? when 0 is written to tcfv after reading tcfv = 1 * 2 in cannel 4, when dtc is activated by tciv interrupt and the disel bit of mrb in dtc is 0, this flag is also cleared. 3 tgfd 0 r/(w) * 1 input capture/output compare flag d status flag that indicates the occurrence of tgrd input capture or compare match in channels 0, 3, and 4. only 0 can be written, for flag clearing. in channels 1 and 2, bit 3 is reserved. it is always read as 0 and the write value should always be 0. [setting conditions] ? when tcnt = tgrd and tgrd is functioning as output compare register ? when tcnt value is transferred to tgrd by input capture signal and tgrd is functioning as input capture register [clearing conditions] ? when dtc is activated by tgid interrupt and the disel bit of mrb in dtc is 0 ? when 0 is written to tgfd after reading tgfd = 1 * 2
section 11 multi-function timer pulse unit 2 (mtu2) page 472 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 tgfc 0 r/(w) * 1 input capture/output compare flag c status flag that indicates the occurrence of tgrc input capture or compare match in channels 0, 3, and 4. only 0 can be written, for flag clearing. in channels 1 and 2, bit 2 is reserved. it is always read as 0 and the write value should always be 0. [setting conditions] ? when tcnt = tgrc and tgrc is functioning as output compare register ? when tcnt value is transferred to tgrc by input capture signal and tgrc is functioning as input capture register [clearing conditions] ? when dtc is activated by tgic interrupt and the disel bit of mrb in dtc is 0 ? when 0 is written to tgfc after reading tgfc = 1 * 2 1 tgfb 0 r/(w) * 1 input capture/output compare flag b status flag that indicates the occurrence of tgrb input capture or compare match. only 0 can be written, for flag clearing. [setting conditions] ? when tcnt = tgrb and tgrb is functioning as output compare register ? when tcnt value is transferred to tgrb by input capture signal and tgrb is functioning as input capture register [clearing conditions] ? when dtc is activated by tgib interrupt and the disel bit of mrb in dtc is 0 ? when 0 is written to tgfb after reading tgfb = 1 * 2
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 473 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 tgfa 0 r/(w) * 1 input capture/output compare flag a status flag that indicates the occurrence of tgra input capture or compare match. only 0 can be written, for flag clearing. [setting conditions] ? when tcnt = tgra and tgra is functioning as output compare register ? when tcnt value is transferred to tgra by input capture signal and tgra is functioning as input capture register [clearing conditions] ? when dmac is activated by tgia interrupt ? when dtc is activated by tgia interrupt and the disel bit of mrb in dtc is 0 ? when 0 is written to tgfa after reading tgfa = 1 * 2 notes: 1. writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. 2. if another flag setting condition occurs before writing 0 to the bit after reading it as 1, the flag will not be cleared by writing 0 to it once. in this case, read the bit as 1 again and write 0 to it.
section 11 multi-function timer pulse unit 2 (mtu2) page 474 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? tsr2_0 bit: initial value: r/w: 76543210 11000000 rrrrrr r/(w) * r/(w) * writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. - - - - - - tgff tgfe note: * bit bit name initial value r/w description 7, 6 ? all 1 r reserved these bits are always read as 1. the write value should always be 1. 5 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 tgff 0 r/(w) * 1 compare match flag f status flag that indicates the occurrence of compare match between tcnt_0 and tgrf_0. [setting condition] ? when tcnt_0 = tgrf_0 and tgrf_0 is functioning as a compare register [clearing condition] ? when 0 is written to tgff after reading tgff = 1 * 2 0 tgfe 0 r/(w) * 1 compare match flag e status flag that indicates the occurrence of compare match between tcnt_0 and tgre_0. [setting condition] ? when tcnt_0 = tgre_0 and tgre_0 is functioning as compare register [clearing condition] ? when 0 is written to tgfe after reading tgfe = 1 * 2 notes: 1. writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. 2. if another flag setting condition occurs before writing 0 to the bit after reading it as 1, the flag will not be cleared by writing 0 to it once. in this case, read the bit as 1 again and write 0 to it.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 475 of 1560 mar 18, 2011 sh7080 group ? tsr_5 bit: initial value: r/w: 76543210 00000000 rrrrr r/(w) * r/(w) * r/(w) * writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. - - - - - cmfu5 cmfv5 cmfw5 note: * bit bit name initial value r/w description 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 cmfu5 0 r/(w) * 1 compare match/input capture flag u5 status flag that indicates the occurrence of tgru_5 input capture or compare match. [setting conditions] ? when tcntu_5 = tgru_5 and tgru_5 is functioning as output compare register ? when tcntu_5 value is transferred to tgru_5 by input capture signal and tgru_5 is functioning as input capture register ? when tcntu_5 value is transferred to tgru_5 and tgru_5 is functioning as a register for measuring the pulse width of the external input signal . the transfer timing is specified by the ioc bits in timer i/o control register u_5 (tioru_5). * 2 [clearing conditions] ? when dtc is activated by a tgiu_5 interrupt and the disel bit of mrb in dtc is 0 ? when 0 is written to cmfu5 after reading cmfu5 = 1
section 11 multi-function timer pulse unit 2 (mtu2) page 476 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 cmfv5 0 r/(w) * 1 compare match/input capture flag v5 status flag that indicates the occurrence of tgrv_5 input capture or compare match. [setting conditions] ? when tcntv_5 = tgrv_5 and tgrv_5 is functioning as output compare register ? when tcntv_5 value is transferred to tgrv_5 by input capture signal and tgrv_5 is functioning as input capture register ? when tcntv_5 value is transferred to tgrv_5 and tgrv_5 is functioning as a register for measuring the pulse width of the external input signal . the transfer timing is specified by the ioc bits in timer i/o control register v_5 (tiorv_5). * 2 [clearing conditions] ? when dtc is activated by a tgiv_5 interrupt and the disel bit of mrb in dtc is 0 ? when 0 is written to cmfv5 after reading cmfv5 = 1
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 477 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 cmfw5 0 r/(w) * 1 compare match/input capture flag w5 status flag that indicates the occurrence of tgrw_5 input capture or compare match. [setting conditions] ? when tcntw_5 = tgrw_5 and tgrw_5 is functioning as output compare register ? when tcntw_5 value is transferred to tgrw_5 by input capture signal and tgrw_5 is functioning as input capture register ? when tcntw_5 value is transferred to tgrw_5 and tgrw_5 is functioning as a register for measuring the pulse width of the external input signal . the transfer timing is specified by the ioc bits in timer i/o control register w_5 (tiorw_5). * 2 [clearing conditions] ? when dtc is activated by a tgiw_5 interrupt and the disel bit of mrb in dtc is 0 ? when 0 is written to cmfw5 after reading cmfw5 = 1 notes: 1. writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. 2. the transfer timing is specified by the ioc bit in timer i/o control registers u_5/v_5/w_5 (tioru_5, tiorv_5, tiorw_5).
section 11 multi-function timer pulse unit 2 (mtu2) page 478 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.7 timer buffer operation tran sfer mode register (tbtm) the tbtm registers are 8-bit read able/writable registers that specify the timing for transferring data from the buffer register to the timer general register in pwm mode. the mtu2 has three tbtm registers, one each for channels 0, 3, and 4. bit: initial value: r/w: 7654321 0 00000000 r r r r r r/w r/w r/w ----- ttse ttsb ttsa bit bit name initial value r/w description 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 ttse 0 r/w timing select e specifies the timing for transferring data from tgrf_0 to tgre_0 when they are used together for buffer operation. in channels 3 and 4, bit 2 is reserved. it is always read as 0 and the write value should always be 0. when using channel 0 in other than pwm mode, do not set this bit to 1. 0: when compare match e occurs in channel 0 1: when tcnt_0 is cleared 1 ttsb 0 r/w timing select b specifies the timing for transferring data from tgrd to tgrb in each channel when they are used together for buffer operation. when using a channel in other than pwm mode, do not set this bit to1. 0: when compare match b occurs in each channel 1: when tcnt is cleared in each channel
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 479 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 ttsa 0 r/w timing select a specifies the timing for transferring data from tgrc to tgra in each channel when they are used together for buffer operation. when using a channel in other than pwm mode, do not set this bit to 1. 0: when compare match a occurs in each channel 1: when tcnt is cleared in each channel 11.3.8 timer input capture control register (ticcr) ticcr is an 8-bit readable/writable register that specifies i nput capture conditions when tcnt_1 and tcnt_2 are cascaded. the mtu2 has one ticcr in channel 1. bit: initial value: r/w: 7654321 0 00000000 r r r r r/w r/w r/w r/w - - - - i2be i2ae i1be i1ae bit bit name initial value r/w description 7 to 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 3 i2be 0 r/w input capture enable specifies whether to include the tioc2b pin in the tgrb_1 input capture conditions. 0: does not include the tioc2b pin in the tgrb_1 input capture conditions 1: includes the tioc2b pin in the tgrb_1 input capture conditions
section 11 multi-function timer pulse unit 2 (mtu2) page 480 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 i2ae 0 r/w input capture enable specifies whether to include the tioc2a pin in the tgra_1 input capture conditions. 0: does not include the tioc2a pin in the tgra_1 input capture conditions 1: includes the tioc2a pin in the tgra_1 input capture conditions 1 i1be 0 r/w input capture enable specifies whether to include the tioc1b pin in the tgrb_2 input capture conditions. 0: does not include the tioc1b pin in the tgrb_2 input capture conditions 1: includes the tioc1b pin in the tgrb_2 input capture conditions 0 i1ae 0 r/w input capture enable specifies whether to include the tioc1a pin in the tgra_2 input capture conditions. 0: does not include the tioc1a pin in the tgra_2 input capture conditions 1: includes the tioc1a pin in the tgra_2 input capture conditions
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 481 of 1560 mar 18, 2011 sh7080 group 11.3.9 timer synchronous clear register (tsycr) tsycr is an 8-bit readable/writable register that specifies conditions for clearing tcnt_3 and tcnt_4 in the mtu2s in synchronization with the mtu2. the mtu2s has one tsycrs in channel 3 but the mtu2 has no tsycr. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w ce0a ce0b ce0c ce0d ce1a ce1b ce2a ce2b bit bit name initial value r/w description 7 ce0a 0 r/w clear enable 0a enables or disables counter clearing when the tgfa flag of tsr_0 in the mtu2 is set. 0: disables counter clearing by the tgfa flag in tsr_0 1: enables counter clearing by the tgfa flag in tsr_0 6 ce0b 0 r/w clear enable 0b enables or disables counter clearing when the tgfb flag of tsr_0 in the mtu2 is set. 0: disables counter clearing by the tgfb flag in tsr_0 1: enables counter clearing by the tgfb flag in tsr_0 5 ce0c 0 r/w clear enable 0c enables or disables counter clearing when the tgfc flag of tsr_0 in the mtu2 is set. 0: disables counter clearing by the tgfc flag in tsr_0 1: enables counter clearing by the tgfc flag in tsr_0 4 ce0d 0 r/w clear enable 0d enables or disables counter clearing when the tgfd flag of tsr_0 in the mtu2 is set. 0: disables counter clearing by the tgfd flag in tsr_0 1: enables counter clearing by the tgfd flag in tsr_0
section 11 multi-function timer pulse unit 2 (mtu2) page 482 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 ce1a 0 r/w clear enable 1a enables or disables counter clearing when the tgfa flag of tsr_1 in the mtu2 is set. 0: disables counter clearing by the tgfa flag in tsr_1 1: enables counter clearing by the tgfa flag in tsr_1 2 ce1b 0 r/w clear enable 1b enables or disables counter clearing when the tgfb flag of tsr_1 in the mtu2 is set. 0: disables counter clearing by the tgfb flag in tsr_1 1: enables counter clearing by the tgfb flag in tsr_1 1 ce2a 0 r/w clear enable 2a enables or disables counter clearing when the tgfa flag of tsr_2 in the mtu2 is set. 0: disables counter clearing by the tgfa flag in tsr_2 1: enables counter clearing by the tgfa flag in tsr_2 0 ce2b 0 r/w clear enable 2b enables or disables counter clearing when the tgfb flag of tsr_2 in the mtu2 is set. 0: disables counter clearing by the tgfb flag in tsr_2 1: enables counter clearing by the tgfb flag in tsr_2
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 483 of 1560 mar 18, 2011 sh7080 group 11.3.10 timer a/d converter start request control register (tadcr) tadcr is a 16-bit readable/writable register that enables or disables a/d converter start requests and specifies whether to link a/d converter start requests with interrupt skipping operation. the mtu2 has one tadcr in channel 4. bit: initial value: r/w: 151413121110987654321 0 0000000000 * 00 * 0 * 0 * 0 * 0 * r/w r/w r r r r r r r/w r/w r/w r/w r/w r/w r/w r/w note: do not set to 1 when complementary pwm mode is not selected. * bf[1:0] - - - - - - ut4ae dt4ae ut4be dt4be ita3ae ita4ve itb3ae itb4ve bit bit name initial value r/w description 15, 14 bf[1:0] 00 r/w tadcobra_4/tadcobrb_4 transfer timing select select the timing for transferring data from tadcobra_4 and tadcobrb_4 to tadcora_4 and tadcorb_4. for details, see table 11.29. 13 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 ut4ae 0 r/w up-count trg4an enable enables or disables a/d converter start requests (trg4an) during tcnt_4 up-count operation. 0: a/d converter start requests (trg4an) disabled during tcnt_4 up-count operation 1: a/d converter start requests (trg4an) enabled during tcnt_4 up-count operation 6 dt4ae 0 * r/w down-count trg4an enable enables or disables a/d converter start requests (trg4an) during tcnt_4 down-count operation. 0: a/d converter start requests (trg4an) disabled during tcnt_4 down-count operation 1: a/d converter start requests (trg4an) enabled during tcnt_4 down-count operation
section 11 multi-function timer pulse unit 2 (mtu2) page 484 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 ut4be 0 r/w up-count trg4bn enable enables or disables a/d converter start requests (trg4bn) during tcnt_4 up-count operation. 0: a/d converter start requests (trg4bn) disabled during tcnt_4 up-count operation 1: a/d converter start requests (trg4bn) enabled during tcnt_4 up-count operation 4 dt4be 0 * r/w down-count trg4bn enable enables or disables a/d converter start requests (trg4bn) during tcnt_4 down-count operation. 0: a/d converter start requests (trg4bn) disabled during tcnt_4 down-count operation 1: a/d converter start requests (trg4bn) enabled during tcnt_4 down-count operation 3 ita3ae 0 * r/w tgia_3 interrupt skipping link enable select whether to link a/d converter start requests (trg4an) with tgia_3 interrupt skipping operation. 0: does not link with tgia_3 interrupt skipping 1: links with tgia_3 interrupt skipping 2 ita4ve 0 * r/w tciv_4 interrupt skipping link enable select whether to link a/d converter start requests (trg4an) with tciv_4 interrupt skipping operation. 0: does not link with tciv_4 interrupt skipping 1: links with tciv_4 interrupt skipping 1 itb3ae 0 * r/w tgia_3 interrupt skipping link enable select whether to link a/d converter start requests (trg4bn) with tgia_3 interrupt skipping operation. 0: does not link with tgia_3 interrupt skipping 1: links with tgia_3 interrupt skipping
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 485 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 itb4ve 0 * r/w tciv_4 interrupt skipping link enable select whether to link a/d converter start requests (trg4bn) with tciv_4 interrupt skipping operation. 0: does not link with tciv_4 interrupt skipping 1: links with tciv_4 interrupt skipping notes: 1. tadcr must not be accessed in eight bits; it should always be accessed in 16 bits. 2. when interrupt skipping is disabled (the t3aen and t4ven bits in the timer interrupt skipping set register (titcr) are cleared to 0 or the skipping count set bits (3acor and 4vcor) in titcr are cleared to 0), do not link a/d converter start requests with interrupt skipping operation (clear the ita3ae, ita4ve, itb3ae, and itb4ve bits in the timer a/d converter start request control register (tadcr) to 0). 3. if link with interrupt skipping is enabled while interrupt skipping is disabled, a/d converter start requests will not be issued. * do not set to 1 when complementary pwm mode is not selected. table 11.29 setting of transfer timing by bf1 and bf0 bits bit 7 bit 6 bf1 bf0 description 0 0 does not transfer data from the cycle set buffer register to the cycle set register. 0 1 transfers data from the cycle set buffer register to the cycle set register at the crest of the tcnt_4 count. * 1 1 0 transfers data from the cycle set buffer register to the cycle set register at the trough of the tcnt_4 count. * 2 1 1 transfers data from the cycle set buffer register to the cycle set register at the crest and trough of the tcnt_4 count. * 2 notes: 1. data is transferred from the cycle set buffer register to the cycle set register when the crest of the tcnt_4 count is reached in complementary pwm mode, when compare match occurs between tcnt_3 and tgra_3 in reset-synchronized pwm mode, or when compare match occurs between tcnt_4 and tgra_4 in pwm mode 1 or normal operation mode. 2. these settings are prohibited when complementary pwm mode is not selected.
section 11 multi-function timer pulse unit 2 (mtu2) page 486 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.11 timer a/d converter start request cycle set registers (tadcora_4 and tadcorb_4) tadcora_4 and tadcorb_4 are 16-bit readable/writable registers. when the tcnt_4 count reaches the value in tadcora_4 or tadcorb_4, a corresponding a/d converter start request will be issued. tadcora_4 and tadcorb_4 are initialized to h'ffff. bit: initial value: r/w: 151413121110987654321 0 1111111111111111 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w note: tadcora_4 and tadcorb_4 must not be accessed in eight bits; they should always be accessed in 16 bits. 11.3.12 timer a/d converter start request cycle set buffer registers (tadcobra_4 and tadcobrb_4) tadcobra_4 and tadcobrb_4 are 16-bit readable /writable registers. when the crest or trough of the tcnt_4 count is reached, these regi ster values are transferred to tadcora_4 and tadcorb_4, respectively. tadcobra_4 and tadcobrb_4 are initialized to h'ffff. bit: initial value: r/w: 151413121110987654321 0 1111111111111111 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w note: tadcobra_4 and tadcobrb_4 must not be accessed in eight bits; they should always be accessed in 16 bits.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 487 of 1560 mar 18, 2011 sh7080 group 11.3.13 timer counter (tcnt) the tcnt counters are 16-bit readable/writable counters. the mtu2 has eight tcnt counters, one each for channels 0 to 4 and three (tcntu_5, tcntv_5, and tcntw_5) for channel 5. the tcnt counters are initialized to h'0000 by a reset. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w note: the tcnt counters must not be accessed in eight bits; they should always be accessed in 16 bits. 11.3.14 timer general register (tgr) the tgr registers are 16-bit readable/writable regi sters. the mtu2 has 21 tgr registers, six for channel 0, two each for channels 1 and 2, four each for channels 3 and 4, and three for channel 5. tgra, tgrb, tgrc, and tgrd function as either output compare or input capture registers. tgrc and tgrd for channels 0, 3, and 4 can also be designated for operation as buffer registers. tgr buffer register combinations are tgra and tgrc, and tgrb and tgrd. tgre_0 and tgrf_0 function as compare registers. when the tcnt_0 count matches the tgre_0 value, an a/d converter start request can be issued. tgrf can also be designated for operation as a buffer register. tgr buffer register combination is tgre and tgrf. tgru_5, tgrv_5, and tgrw_5 function as compare match, input capture, or external pulse width measurement registers. bit: initial value: r/w: 151413121110987654321 0 1111111111111111 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w note: the tgr registers must not be accessed in eight bits; they should always be accessed in 16 bits. tgr registers are initialized to h'ffff.
section 11 multi-function timer pulse unit 2 (mtu2) page 488 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.15 timer start register (tstr) tstr is an 8-bit readable/writable register that selects operation/stoppage of tcnt for channels 0 to 4. tstr_5 is an 8-bit readable/writable register that selects operation/stoppage of tcntu_5, tcntv_5, and tcntw_5 for channel 5. when setting the operating mode in tmdr or setting the count clock in tcr, first stop the tcnt counter. ? tstr bit: initial value: r/w: 7654321 0 00000000 r/w r/w r r r r/w r/w r/w cst4 cst3 - - - cst2 cst1 cst0 bit bit name initial value r/w description 7 cst4 0 r/w 6 cst3 0 r/w counter start 4 and 3 these bits select operation or stoppage for tcnt. if 0 is written to the cst bit during operation with the tioc pin designated for output, the counter stops but the tioc pin output compare output level is retained. if tior is written to when the cst bit is cleared to 0, the pin output level will be changed to the set initial output value. 0: tcnt_4 and tcnt_3 count operation is stopped 1: tcnt_4 and tcnt_3 performs count operation 5 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 489 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 cst2 0 r/w 1 cst1 0 r/w 0 cst0 0 r/w counter start 2 to 0 these bits select operation or stoppage for tcnt. if 0 is written to the cst bit during operation with the tioc pin designated for output, the counter stops but the tioc pin output compare output level is retained. if tior is written to when the cst bit is cleared to 0, the pin output level will be changed to the set initial output value. 0: tcnt_2 to tcnt_0 count operation is stopped 1: tcnt_2 to tcnt_0 performs count operation ? tstr_5 bit: initial value: r/w: 7654321 0 00000000 r r r r r r/w r/w r/w - - - - - cstu5 cstv5 cstw5 bit bit name initial value r/w description 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 cstu5 0 r/w counter start u5 selects operation or stoppage for tcntu_5. 0: tcntu_5 count operation is stopped 1: tcntu_5 performs count operation 1 cstv5 0 r/w counter start v5 selects operation or stoppage for tcntv_5. 0: tcntv_5 count operation is stopped 1: tcntv_5 performs count operation 0 cstw5 0 r/w counter start w5 selects operation or stoppage for tcntw_5. 0: tcntw_5 count operation is stopped 1: tcntw_5 performs count operation
section 11 multi-function timer pulse unit 2 (mtu2) page 490 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.16 timer synchronous register (tsyr) tsyr is an 8-bit readable/writable register that selects independent operation or synchronous operation for the channel 0 to 4 tcnt counters. a channel performs synchronous operation when the corresponding bit in tsyr is set to 1. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r r r r/w r/w r/w sync4 sync3 - - - sync2 sync1 sync0 bit bit name initial value r/w description 7 sync4 0 r/w 6 sync3 0 r/w timer synchronous operation 4 and 3 these bits are used to select whether operation is independent of or synchronized with other channels. when synchronous operation is selected, the tcnt synchronous presetting of multiple channels, and synchronous clearing by counter clearing on another channel, are possible. to set synchronous operation, the sync bits for at least two channels must be set to 1. to set synchronous clearing, in addition to the sync bit, the tcnt clearing source must also be set by means of bits cclr0 to cclr2 in tcr. 0: tcnt_4 and tcnt_3 operate independently (tcnt presetting/clearing is unrelated to other channels) 1: tcnt_4 and tcnt_3 performs synchronous operation tcnt synchronous presetting/synchronous clearing is possible 5 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 491 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 sync2 0 r/w 1 sync1 0 r/w 0 sync0 0 r/w timer synchronous operation 2 to 0 these bits are used to select whether operation is independent of or synchronized with other channels. when synchronous operation is selected, the tcnt synchronous presetting of multiple channels, and synchronous clearing by counter clearing on another channel, are possible. to set synchronous operation, the sync bits for at least two channels must be set to 1. to set synchronous clearing, in addition to the sync bit, the tcnt clearing source must also be set by means of bits cclr0 to cclr2 in tcr. 0: tcnt_2 to tcnt_0 operates independently (tcnt presetting /clearing is unrelated to other channels) 1: tcnt_2 to tcnt_0 performs synchronous operation tcnt synchronous presetting/synchronous clearing is possible
section 11 multi-function timer pulse unit 2 (mtu2) page 492 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.17 timer counter synchronous start register (tcsystr) tcsystr is an 8-bit readable/writable register th at specifies synchronous start of the mtu2 and mtu2s counters. note that the mtu2s does not have tcsystr. bit: initial value: r/w: 7654321 0 00000000 r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r r/(w) * r/(w) * note: only 1 can be written to set the register. * sch0 sch1 sch2 sch3 sch4 - sch3s sch4s bit bit name initial value r/w description 7 sch0 0 r/(w) * synchronous start controls synchronous start of tcnt_0 in the mtu2. 0: does not specify synchronous start for tcnt_0 in the mtu2 1: specifies synchronous start for tcnt_0 in the mtu2 [clearing condition] ? when 1 is set to the cst0 bit of tstr in mtu2 while sch0 = 1 6 sch1 0 r/(w) * synchronous start controls synchronous start of tcnt_1 in the mtu2. 0: does not specify synchronous start for tcnt_1 in the mtu2 1: specifies synchronous start for tcnt_1 in the mtu2 [clearing condition] ? when 1 is set to the cst1 bit of tstr in mtu2 while sch1 = 1
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 493 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 sch2 0 r/(w) * synchronous start controls synchronous start of tcnt_2 in the mtu2. 0: does not specify synchronous start for tcnt_2 in the mtu2 1: specifies synchronous start for tcnt_2 in the mtu2 [clearing condition] ? when 1 is set to the cst2 bit of tstr in mtu2 while sch2 = 1 4 sch3 0 r/(w) * synchronous start controls synchronous start of tcnt_3 in the mtu2. 0: does not specify synchronous start for tcnt_3 in the mtu2 1: specifies synchronous start for tcnt_3 in the mtu2 [clearing condition] ? when 1 is set to the cst3 bit of tstr in mtu2 while sch3 = 1 3 sch4 0 r/(w) * synchronous start controls synchronous start of tcnt_4 in the mtu2. 0: does not specify synchronous start for tcnt_4 in the mtu2 1: specifies synchronous start for tcnt_4 in the mtu2 [clearing condition] ? when 1 is set to the cst4 bit of tstr in mtu2 while sch4 = 1 2 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 11 multi-function timer pulse unit 2 (mtu2) page 494 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 sch3s 0 r/(w) * synchronous start controls synchronous start of tcnt_3s in the mtu2s. 0: does not specify synchronous start for tcnt_3s in the mtu2s 1: specifies synchronous start for tcnt_3s in the mtu2s [clearing condition] ? when 1 is set to the cst3 bit of tstrs in mtu2s while sch3s = 1 0 sch4s 0 r/(w) * synchronous start controls synchronous start of tcnt_4s in the mtu2s. 0: does not specify synchronous start for tcnt_4s in the mtu2s 1: specifies synchronous start for tcnt_4s in the mtu2s [clearing condition] ? when 1 is set to the cst4 bit of tstrs in mtu2s while sch4s = 1 note: * only 1 can be written to set the register.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 495 of 1560 mar 18, 2011 sh7080 group 11.3.18 timer read/write enable register (trwer) trwer is an 8-bit readab le/writable register that enables or disables access to the registers and counters which have write-protection capability agai nst accidental modificatio n in channels 3 and 4. bit: initial value: r/w: 7654321 0 00000001 rrrrrrrr/w -------rwe bit bit name initial value r/w description 7 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 rwe 1 r/w read/write enable enables or disables access to the registers which have write-protection capability against accidental modification. 0: disables read/write access to the registers 1: enables read/write access to the registers [clearing condition] ? when 0 is written to the rwe bit after reading rwe = 1 ? registers and counters having write-protection capability ag ainst accidental modification 22 registers: tcr_3, tcr_4, tmdr_3, tmdr_4, tiorh_3, tiorh_4, tiorl_3, tiorl_4, tier_3, tier_4, tgra_3, tg ra_4, tgrb_3, tgrb_4, toer, tocr1, tocr2, tgcr, tcdr, tddr, tcnt_3, and tcnt4.
section 11 multi-function timer pulse unit 2 (mtu2) page 496 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.19 timer output master enable register (toer) toer is an 8-bit readable/writable register that enables/disables output settings for output pins tioc4d, tioc4c, tioc3d, tioc4b, tioc4a, and tioc3b. these pins do not output correctly if the toer bits have not been set. set toer of ch3 and ch4 prior to setting tior of ch3 and ch4. bit: initial value: r/w: 7654321 0 11000000 r r r/w r/w r/w r/w r/w r/w - - oe4d oe4c oe3d oe4b oe4a oe3b bit bit name initial value r/w description 7, 6 ? all 1 r reserved these bits are always read as 1. the write value should always be 1. 5 oe4d 0 r/w master enable tioc4d this bit enables/disables the tioc4d pin mtu2 output. 0: mtu2 output is disabled (inactive level) * 1: mtu2 output is enabled 4 oe4c 0 r/w master enable tioc4c this bit enables/disables the tioc4c pin mtu2 output. 0: mtu2 output is disabled (inactive level) * 1: mtu2 output is enabled 3 oe3d 0 r/w master enable tioc3d this bit enables/disables the tioc3d pin mtu2 output. 0: mtu2 output is disabled (inactive level) * 1: mtu2 output is enabled 2 oe4b 0 r/w master enable tioc4b this bit enables/disables the tioc4b pin mtu2 output. 0: mtu2 output is disabled (inactive level) * 1: mtu2 output is enabled 1 oe4a 0 r/w master enable tioc4a this bit enables/disables the tioc4a pin mtu2 output. 0: mtu2 output is disabled (inactive level) * 1: mtu2 output is enabled
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 497 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 oe3b 0 r/w master enable tioc3b this bit enables/disables the tioc3b pin mtu2 output. 0: mtu2 output is disabled (inactive level) * 1: mtu2 output is enabled note: * the inactive level is determined by the settings in timer output control registers 1 and 2 (tocr1 and tocr2). for details, refer to section 11.3.20, timer output control register 1 (tocr1), and section 11.3.21, timer output control register 2 (tocr2). set these bits to 1 to enable mtu2 output in other than complementary pwm or reset- synchronized pwm mode. when these bits are set to 0, low level is output. 11.3.20 timer output control register 1 (tocr1) tocr1 is an 8-bit readable/writable register that enables/disables pwm synchronized toggle output in complementary pwm mode/reset synchronized pwm mode, and controls output level inversion of pwm output. bit: initial value: r/w: 7654321 0 00000000 r r/w r r r/(w) * r/w r/w r/w note: this bit can be set to 1 only once after a power-on reset. after 1 is written, 0 cannot be written to the bit. * - psye - - tocl tocs olsn olsp bit bit name initial value r/w description 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 psye 0 r/w pwm synchronous output enable this bit selects the enable/disable of toggle output synchronized with the pwm period. 0: toggle output is disabled 1: toggle output is enabled 5, 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 11 multi-function timer pulse unit 2 (mtu2) page 498 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 tocl 0 r/(w) * 1 toc register write protection * 2 this bit selects the enable/disable of write access to the tocs, olsn, and olsp bits in tocr1. 0: write access to the tocs, olsn, and olsp bits is enabled 1: write access to the tocs, olsn, and olsp bits is disabled 2 tocs 0 r/w toc select this bit selects either the tocr1 or tocr2 setting to be used for the output level in complementary pwm mode and reset-synchronized pwm mode. 0: tocr1 setting is selected 1: tocr2 setting is selected 1 olsn 0 r/w output level select n * 3 this bit selects the reverse phase output level in reset- synchronized pwm mode/complementary pwm mode. see table 11.30. 0 olsp 0 r/w output level select p * 3 this bit selects the positive phase output level in reset- synchronized pwm mode/complementary pwm mode. see table 11.31. notes: 1. this bit can be set to 1 only once after a power on reset. after 1 is written, 0 cannot be written to the bit. 2. setting the tocl bit to 1 prevents accidental modification when the cpu goes out of control. 3. clearing the tocs0 bit to 0 makes this bit setting valid. table 11.30 output level select function bit 1 function compare match output olsn initial output active level up count down count 0 high level low level high level low level 1 low level high level low level high level note: the reverse phase waveform initial output value changes to active level after elapse of the dead time after count start.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 499 of 1560 mar 18, 2011 sh7080 group table 11.31 output level select function bit 0 function compare match output olsp initial output active level up count down count 0 high level low level low level high level 1 low level high level high level low level figure 11.2 shows an example of complementary pwm mode output (1 phase) when olsn = 1, olsp = 1. tcnt_3 and tcnt_4 values tgra_3 tgra_4 tddr h'0000 time tcnt_4 tcnt_3 positive phase output reverse phase output active level compare match output (up count) initial output initial output active level compare match output (down count) compare match output (down count) compare match output (up count) active level figure 11.2 complementary pwm mode output level example
section 11 multi-function timer pulse unit 2 (mtu2) page 500 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.21 timer output control register 2 (tocr2) tocr2 is an 8-bit readable/writable register that controls output level inversion of pwm output in complementary pwm mode and reset-synchronized pwm mode. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w bf[1:0] ols3n ols3p ols2n ols2p ols1n ols1p bit bit name initial value r/w description 7, 6 bf[1:0] 00 r/w tolbr buffer transfer timing select these bits select the timing for transferring data from tolbr to tocr2. for details, see table 11.32. 5 ols3n 0 r/w output level select 3n * this bit selects the output level on tioc4d in reset- synchronized pwm mode/complementary pwm mode. see table 11.33. 4 ols3p 0 r/w output level select 3p * this bit selects the output level on tioc4b in reset- synchronized pwm mode/complementary pwm mode. see table 11.34. 3 ols2n 0 r/w output level select 2n * this bit selects the output level on tioc4c in reset- synchronized pwm mode/complementary pwm mode. see table 11.35. 2 ols2p 0 r/w output level select 2p * this bit selects the output level on tioc4a in reset- synchronized pwm mode/complementary pwm mode. see table 11.36. 1 ols1n 0 r/w output level select 1n * this bit selects the output level on tioc3d in reset- synchronized pwm mode/complementary pwm mode. see table 11.37.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 501 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 ols1p 0 r/w output level select 1p * this bit selects the output level on tioc3b in reset- synchronized pwm mode/complementary pwm mode. see table 11.38. note: * setting the tocs bit in tocr1 to 1 makes this bit setting valid. table 11.32 setting of bits bf1 and bf0 bit 7 bit 6 description bf1 bf0 complementary pwm mode reset-synchronized pwm mode 0 0 does not transfer data from the buffer register (tolbr) to tocr2. does not transfer data from the buffer register (tolbr) to tocr2. 0 1 transfers data from the buffer register (tolbr) to tocr2 at the crest of the tcnt_4 count. transfers data from the buffer register (tolbr) to tocr2 when tcnt_3/tcnt_4 is cleared 1 0 transfers data from the buffer register (tolbr) to tocr2 at the trough of the tcnt_4 count. setting prohibited 1 1 transfers data from the buffer register (tolbr) to tocr2 at the crest and trough of the tcnt_4 count. setting prohibited table 11.33 tioc4d output level select function bit 5 function compare match output ols3n initial output active level up count down count 0 high level low level high level low level 1 low level high level low level high level note: the reverse phase waveform initial output value changes to the active level after elapse of the dead time after count start.
section 11 multi-function timer pulse unit 2 (mtu2) page 502 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.34 tioc4b output level select function bit 4 function compare match output ols3p initial output active level up count down count 0 high level low level low level high level 1 low level high level high level low level table 11.35 tioc4c output level select function bit 3 function compare match output ols2n initial output active level up count down count 0 high level low level high level low level 1 low level high level low level high level note: the reverse phase waveform initial output value changes to the active level after elapse of the dead time after count start. table 11.36 tioc4a output level select function bit 2 function compare match output ols2p initial output active level up count down count 0 high level low level low level high level 1 low level high level high level low level table 11.37 tioc3d output level select function bit 1 function compare match output ols1n initial output active level up count down count 0 high level low level high level low level 1 low level high level low level high level note: the reverse phase waveform initial output value changes to the active level after elapse of the dead time after count start.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 503 of 1560 mar 18, 2011 sh7080 group table 11.38 tioc4b output level select function bit 0 function compare match output ols1p initial output active level up count down count 0 high level low level low level high level 1 low level high level high level low level 11.3.22 timer output level buffer register (tolbr) tolbr is an 8-bit readable/writable register that functions as a buffer for tocr2 and specifies the pwm output level in complementary pwm mode and reset-synchronized pwm mode. bit: initial value: r/w: 7654321 0 00000000 r r r/w r/w r/w r/w r/w r/w - - ols3n ols3p ols2n ols2p ols1n ols1p bit bit name initial value r/w description 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 ols3n 0 r/w specifies the buffer value to be transferred to the ols3n bit in tocr2. 4 ols3p 0 r/w specifies the buffer value to be transferred to the ols3p bit in tocr2. 3 ols2n 0 r/w specifies the buffer value to be transferred to the ols2n bit in tocr2. 2 ols2p 0 r/w specifies the buffer value to be transferred to the ols2p bit in tocr2. 1 ols1n 0 r/w specifies the buffer value to be transferred to the ols1n bit in tocr2. 0 ols1p 0 r/w specifies the buffer value to be transferred to the ols1p bit in tocr2.
section 11 multi-function timer pulse unit 2 (mtu2) page 504 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 11.3 shows an example of the pwm output level setting procedure in buffer operation. set bit tocs set tocr2 set tolbr [1] [2] [3] [1] set bit tocs in tocr1 to 1 to enable the tocr2 setting. [2] use bits bf1 and bf0 in tocr2 to select the tolbr buffer transfer timing. use bits ols3n to ols1n and ols3p to ols1p to specify the pwm output levels. [3] the tolbr initial setting must be the same value as specified in bits ols3n to ols1n and ols3p to ols1p in tocr2. figure 11.3 pwm output level sett ing procedure in buffer operation 11.3.23 timer gate control register (tgcr) tgcr is an 8-bit readable/writable register that controls the waveform output necessary for brushless dc motor control in reset-synchronized pwm mode/complementary pwm mode. these register settings are ineffective for anything other than complementary pwm mode/reset- synchronized pwm mode. bit: initial value: r/w: 7654321 0 10000000 r r/w r/w r/w r/w r/w r/w r/w -bdcn pfb * wf vf uf bit bit name initial value r/w description 7 ? 1 r reserved this bit is always read as 1. the write value should always be 1. 6 bdc 0 r/w brushless dc motor this bit selects whether to make the functions of this register (tgcr) effective or ineffective. 0: ordinary output 1: functions of this register are made effective
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 505 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 n 0 r/w reverse phase output (n) control this bit selects whether the level output or the reset- synchronized pwm/complementary pwm output while the reverse pins (tioc3d, tioc4c, and tioc4d) are output. 0: level output 1: reset synchronized pwm/complementary pwm output 4 p 0 r/w positive phase output (p) control this bit selects whether the level output or the reset- synchronized pwm/complementary pwm output while the positive pin (tioc3b, tioc4a, and tioc4b) are output. 0: level output 1: reset synchronized pwm/complementary pwm output 3 fb * 0 r/w external feedback signal enable this bit selects whether the switching of the output of the positive/reverse phase is carried out automatically with the mtu2/channel 0 tgra, tgrb, tgrc input capture signals or by writing 0 or 1 to bits 2 to 0 in tgcr. 0: output switching is external input (input sources are channel 0 tgra, tgrb, tgrc input capture signal) 1: output switching is carried out by software (tgcr's uf, vf, wf settings). 2 wf 0 r/w 1 vf 0 r/w 0 uf 0 r/w output phase switch 2 to 0 these bits set the positive phase/negative phase output phase on or off state. the setting of these bits is valid only when the fb bit in this register is set to 1. in this case, the setting of bits 2 to 0 is a substitute for external input. see table 11.39. note: * when the mtu2s is used to set the bdc bit to 1, do not set the fb bit to 0.
section 11 multi-function timer pulse unit 2 (mtu2) page 506 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.39 output level select function function bit 2 bit 1 bit 0 tioc3b tioc4a tioc4b tioc3d tioc4c tioc4d wf vf uf u phase v phase w phase u phase v phase w phase 0 0 0 off off off off off off 1 on off off off off on 1 0 off on off on off off 1 off on off off off on 1 0 0 off off on off on off 1 on off off off on off 1 0 off off on on off off 1 off off off off off off 11.3.24 timer subcounter (tcnts) tcnts is a 16-bit read-only counter that is used only in complementary pwm mode. the initial value of tcnts is h'0000. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr note: accessing the tcnts in 8-bit units is prohibited. always access in 16-bit units.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 507 of 1560 mar 18, 2011 sh7080 group 11.3.25 timer dead time data register (tddr) tddr is a 16-bit register, used only in complementary pwm mode, that specifies the tcnt_3 and tcnt_4 counter offset values. in complementary pwm mode, when the tcnt_3 and tcnt_4 counters are cleared and then restarted, the tddr register value is loaded into the tcnt_3 counter and the count operation starts. the initial value of tddr is h'ffff. bit: initial value: r/w: 151413121110987654321 0 1111111111111111 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w note: accessing the tddr in 8-bit units is prohibited. always access in 16-bit units. 11.3.26 timer cycle data register (tcdr) tcdr is a 16-bit register used only in complementary pwm mode. set half the pwm carrier sync value as the tcdr register value. this register is constantly compared with the tcnts counter in complementary pwm mode, and when a match occurs, the tcnts counter switches direction (decrement to increment). the initial value of tcdr is h'ffff. bit: initial value: r/w: 151413121110987654321 0 1111111111111111 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w note: accessing the tcdr in 8-bit units is prohibited. always access in 16-bit units.
section 11 multi-function timer pulse unit 2 (mtu2) page 508 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.27 timer cycle buffer register (tcbr) tcbr is a 16-bit register used only in complementary pwm mode. it functions as a buffer register for the tcdr register. the tcbr register values are transferred to the tcdr register with the transfer timing set in the tmdr register. the initial value of tcbr is h'ffff. bit: initial value: r/w: 151413121110987654321 0 1111111111111111 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w note: accessing the tcbr in 8-bit units is prohibited. always access in 16-bit units. 11.3.28 timer interrupt skipping set register (titcr) titcr is an 8-bit readable/writable register that enables or disables interrupt skipping and specifies the interrupt skipping count. the mtu2 has one titcr. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w t3aen 3acor[2:0] t4ven 4vcor[2:0] bit bit name initial value r/w description 7 t3aen 0 r/w t3aen enables or disables tgia_3 interrupt skipping. 0: tgia_3 interrupt skipping disabled 1: tgia_3 interrupt skipping enabled 6 to 4 3acor[2:0] 000 r/w these bits specify the tgia_3 interrupt skipping count within the range from 0 to 7. * for details, see table 11.40. 3 t4ven 0 r/w t4ven enables or disables tciv_4 interrupt skipping. 0: tciv_4 interrupt skipping disabled 1: tciv_4 interrupt skipping enabled
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 509 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 to 0 4vcor[2:0] 000 r/w these bits specify the tciv_4 interrupt skipping count within the range from 0 to 7. * for details, see table 11.41. note: * when 0 is specified for the interrupt skipping count, no interrupt skipping will be performed. before changing the interrupt skipping count, be sure to clear the t3aen and t4ven bits to 0 to clear the skipping counter (titcnt). table 11.40 setting of interrupt skipping count by bits 3acor2 to 3acor0 bit 6 bit 5 bit 4 3acor2 3acor1 3acor0 description 0 0 0 does not skip tgia_3 interrupts. 0 0 1 sets the tgia_3 interrupt skipping count to 1. 0 1 0 sets the tgia_3 interrupt skipping count to 2. 0 1 1 sets the tgia_3 interrupt skipping count to 3. 1 0 0 sets the tgia_3 interrupt skipping count to 4. 1 0 1 sets the tgia_3 interrupt skipping count to 5. 1 1 0 sets the tgia_3 interrupt skipping count to 6. 1 1 1 sets the tgia_3 interrupt skipping count to 7. table 11.41 setting of interrupt skipping count by bits 4vcor2 to 4vcor0 bit 2 bit 1 bit 0 4vcor2 4vcor1 4vcor0 description 0 0 0 does not skip tciv_4 interrupts. 0 0 1 sets the tciv_4 interrupt skipping count to 1. 0 1 0 sets the tciv_4 interrupt skipping count to 2. 0 1 1 sets the tciv_4 interrupt skipping count to 3. 1 0 0 sets the tciv_4 interrupt skipping count to 4. 1 0 1 sets the tciv_4 interrupt skipping count to 5. 1 1 0 sets the tciv_4 interrupt skipping count to 6. 1 1 1 sets the tciv_4 interrupt skipping count to 7.
section 11 multi-function timer pulse unit 2 (mtu2) page 510 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.29 timer interrupt skipping counter (titcnt) titcnt is an 8-bit readable/writable counter. the mtu2 has one titcnt. titcnt retains its value even after stopping the count operation of tcnt_3 and tcnt_4. bit: initial value: r/w: 7654321 0 00000000 rrrrrrrr - 3acnt[2:0] - 4vcnt[2:0] bit bit name initial value r/w description 7 ? 0 r reserved this bit is always read as 0. 6 to 4 3acnt[2:0] 000 r tgia_3 interrupt counter while the t3aen bit in titcr is set to 1, the count in these bits is incremented every time a tgia_3 interrupt occurs. [clearing conditions] ? when the 3acnt2 to 3acnt0 value in titcnt matches the 3acor2 to 3acor0 value in titcr ? when the t3aen bit in titcr is cleared to 0 ? when the 3acor2 to 3acor0 bits in titcr are cleared to 0 3 ? 0 r reserved this bit is always read as 0. 2 to 0 4vcnt[2:0] 000 r tciv_4 interrupt counter while the t4ven bit in titcr is set to 1, the count in these bits is incremented every time a tciv_4 interrupt occurs. [clearing conditions] ? when the 4vcnt2 to 4vcnt0 value in titcnt matches the 4vcor2 to 4vcor2 value in titcr ? when the t4ven bit in titcr is cleared to 0 ? when the 4vcor2 to 4vcor2 bits in titcr are cleared to 0 note: to clear the titcnt, clear the t3aen and t4ven bits in titcr to 0.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 511 of 1560 mar 18, 2011 sh7080 group 11.3.30 timer buffer transfer set register (tbter) tbter is an 8-bit readable/writable register that enables or disables transfer from the buffer registers* used in complementary pwm mode to the temporary registers and specifies whether to link the transfer with interrupt skipping operation. the mtu2 has one tbter. bit: initial value: r/w: 7654321 0 00000000 rrrrrrr/wr/w - - - - - - bte[1:0] bit bit name initial value r/w description 7 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1, 0 bte[1:0] 00 r/w these bits enable or disable transfer from the buffer registers * used in complementary pwm mode to the temporary registers and specify whether to link the transfer with interrupt skipping operation. for details, see table 11.42. note: * applicable buffer registers: tgrc_3, tgrd_3, tgrc_4, tgrd_4, and tcbr
section 11 multi-function timer pulse unit 2 (mtu2) page 512 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.42 setting of bits bte1 and bte0 bit 1 bit 0 bte1 bte0 description 0 0 enables transfer from the buffer registers to the temporary registers * 1 and does not link the transfer with interrupt skipping operation. 0 1 disables transfer from the buffer registers to the temporary registers. 1 0 links transfer from the buffer registers to the temporary registers with interrupt skipping operation. * 2 1 1 setting prohibited notes: 1. data is transferred according to the md3 to md0 bit setting in tmdr. for details, refer to section 11.4.8, complementary pwm mode. 2. when interrupt skipping is disabled (the t3aen and t4ven bits are cleared to 0 in the timer interrupt skipping set register (titcr) or the skipping count set bits (3acor and 4vcor) in titcr are cleared to 0)), be sure to disable link of buffer transfer with interrupt skipping (clear the bte1 bit in the timer buffer transfer set register (tbter) to 0). if link with interrupt skipping is enabled while interrupt skipping is disabled, buffer transfer will not be performed.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 513 of 1560 mar 18, 2011 sh7080 group 11.3.31 timer dead time enable register (tder) tder is an 8-bit readable/writable register that controls dead time generation in complementary pwm mode. the mtu2 has one tder in channel 3. tder must be modified only while tcnt stops. bit: initial value: r/w: 7654321 0 00000001 rrrrrrrr/(w) -------tder bit bit name initial value r/w description 7 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 tder 1 r/(w) dead time enable specifies whether to generate dead time. 0: does not generate dead time 1: generates dead time * [clearing condition] ? when 0 is written to tder after reading tder = 1 note: * tddr must be set to 1 or a larger value.
section 11 multi-function timer pulse unit 2 (mtu2) page 514 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.3.32 timer waveform control register (twcr) twcr is an 8-bit readable/writable register that controls the waveform when synchronous counter clearing occurs in tcnt_3 and tcnt_4 in complementary pwm mode and specifies whether to clear the counters at tgra_3 compare match. the cce bit and wre bit in twcr must be modified only while tcnt stops. bit: initial value: r/w: 7654321 0 note: do not set to 1 when complementary pwm mode is not selected. * 0 * 0000000 r/(w) r r r r r r/(w) r/(w) cce-----sccwre bit bit name initial value r/w description 7 cce 0 * r/(w) compare match clear enable specifies whether to clear counters at tgra_3 compare match in complementary pwm mode. 0: does not clear counters at tgra_3 compare match 1: clears counters at tgra_3 compare match [setting condition] ? when 1 is written to cce after reading cce = 0 6 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 515 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 scc 0 r/(w) synchronous clearing control specifies whether to clear tcnt_3 and tcnt_4 in the mtu2s when synchronous counter clearing between the mtu2 and mtu2s occurs in complementary pwm mode. when using this control, place the mtu2s in complementary pwm mode. when modifying the scc bit while the counters are operating, do not modify the cce or wre bits. counter clearing synchronized with the mtu2 is disabled by the scc bit setting only when synchronous clearing occurs outside the tb interval at the trough. when synchronous clearing occurs in the tb interval at the trough including the period immediately after tcnt_3 and tcnt_4 start operation, tcnt_3 and tcnt_4 in the mtu2s are cleared. for the tb interval at the trough in complementary pwm mode, see figure 11.40. in the mtu2, this bit is reserved. it is always read as 0 and the write value should always be 0. 0: enables clearing of tcnt_3 and tcnt_4 in the mtu2s by mtu2?mtu2s synchronous clearing operation 1: disables clearing of tcnt_3 and tcnt_4 in the mtu2s by mtu2?mtu2s synchronous clearing operation [setting condition] ? when 1 is written to scc after reading scc = 0
section 11 multi-function timer pulse unit 2 (mtu2) page 516 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 wre 0 r/(w) initial output suppression enable selects the waveform output when synchronous counter clearing occurs in complementary pwm mode. the initial output is suppressed only when synchronous clearing occurs within the tb interval at the trough in complementary pwm mode. when synchronous clearing occurs outside this interval, the initial value specified in tocr is output regardless of the wre bit setting. the initial value is also output when synchronous clearing occurs in the tb interval at the trough immediately after tcnt_3 and tcnt_4 start operation. for the tb interval at the trough in complementary pwm mode, see figure 11.40. 0: outputs the initial value specified in tocr 1: suppresses initial output [setting condition] ? when 1 is written to wre after reading wre = 0 note: * do not set to 1 when complementary pwm mode is not selected. 11.3.33 bus master interface the timer counters (tcnt), general registers (t gr), timer subcounter (tcnts), timer cycle buffer register (tcbr), timer dead time data register (tddr), timer cycle data register (tcdr), timer a/d converter start request control register (tadcr), timer a/d converter start request cycle set registers (tadcor), and timer a/d conve rter start request cycle set buffer registers (tadcobr) are 16-bit registers. a 16-bit data bus to the bus master enables 16-bit read/writes. 8- bit read/write is not possible. always access in 16-bit units. all registers other than the above registers are 8- bit registers. these are connected to the cpu by a 16-bit data bus, so 16-bit read/writes and 8-bit read/writes are both possible.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 517 of 1560 mar 18, 2011 sh7080 group 11.4 operation 11.4.1 basic functions each channel has a tcnt and tgr register. tcnt performs up-counting, and is also capable of free-running operation, cycle counting, and external event counting. each tgr can be used as an input capture register or output compare register. always select mtu2 external pins set function using the pin function controller (pfc). counter operation: when one of bits cst0 to cst4 in tstr or bits cstu5, cstv5, and cstw5 in tstr_5 is set to 1, the tcnt counter for the corresponding ch annel begins counting. tcnt can operate as a free-running counter, periodic counter, for example. 1. example of count operation setting procedure figure 11.4 shows an example of th e count operation setting procedure. operation selection select counter clock periodic counter select counter clearing source select output compare register set period free-running counter start count operation start count operation [1] [2] [3] [4] [5] [5] [1] select the counter clock with bits tpsc2 to tpsc0 in tcr. at the same time, select the input clock edge with bits ckeg1 and ckeg0 in tcr. [2] for periodic counter operation, select the tgr to be used as the tcnt clearing source with bits cclr2 to cclr0 in tcr. [3] designate the tgr selected in [2] as an output compare register by means of tior. [4] set the periodic counter cycle in the tgr selected in [2]. [5] set the cst bit in tstr to 1 to start the counter operation. figure 11.4 example of count er operation setting procedure
section 11 multi-function timer pulse unit 2 (mtu2) page 518 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2. free-running count operation and periodic count operation: immediately after a reset, the mtu2?s tcnt counters are all designated as free-running counters. when the relevant bit in tstr is set to 1 the corresponding tcnt counter starts up- count operation as a free-running counter. when tcnt overflows (from h'ffff to h'0000), the tcfv bit in tsr is set to 1. if the value of the corresponding tciev bit in tier is 1 at this point, the mtu2 requests an interrupt. after overflow, tcnt starts counting up again from h'0000. figure 11.5 illustrates free-running counter operation. tcnt value h'ffff h'0000 cst bit tcfv time figure 11.5 free-running counter operation when compare match is selected as the tcnt clearing source, the tcnt counter for the relevant channel performs periodic count operation. the tgr register for setting the period is designated as an output compare register, and counter clearing by compare match is selected by means of bits cclr0 to cclr2 in tcr. after the settings have been made, tcnt starts up-count operation as a periodic counter when the corresponding bit in tstr is set to 1. when the count value matches the value in tgr, the tgf bit in tsr is set to 1 and tcnt is cleared to h'0000. if the value of the corresponding tgie bit in tier is 1 at this point, the mtu2 requests an interrupt. after a compare match, tcnt starts counting up again from h'0000.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 519 of 1560 mar 18, 2011 sh7080 group figure 11.6 illustrates peri odic counter operation. tcnt value tgr h'0000 cst bit tgf time counter cleared by tgr compare match flag cleared by software or dtc/dmac activation figure 11.6 period ic counter operation waveform output by compare match: the mtu2 can perform 0, 1, or toggle output from the corresponding output pin using compare match. 1. example of setting procedure for waveform output by compare match figure 11.7 shows an example of the setting procedure for waveform output by compare match output selection select waveform output mode set output timing start count operation [1] [2] [3] [1] select initial value 0 output or 1 output, and compare match output value 0 output, 1 output, or toggle output, by means of tior. the set initial value is output at the tioc pin until the first compare match occurs. [2] set the timing for compare match generation in tgr. [3] set the cst bit in tstr to 1 to start the count operation. figure 11.7 example of setting procedure for waveform output by compare match
section 11 multi-function timer pulse unit 2 (mtu2) page 520 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2. examples of waveform output operation: figure 11.8 shows an example of 0 output/1 output. in this example tcnt has been designated as a free-running counter, a nd settings have been made such that 1 is output by compare match a, and 0 is output by compare match b. when the set level and the pin level coincide, the pin level does not change. tcnt value h'ffff h'0000 tioca tiocb time tgra tgrb no change no change no change no change 1 output 0 output figure 11.8 example of 0 output/1 output operation figure 11.9 shows an example of toggle output. in this example, tcnt has been designated as a periodic counter (with counter clearing on compare match b), and settings have been made such that the output is toggled by both compare match a and compare match b. tcnt value h'ffff h'0000 tiocb tioca time tgrb tgra toggle output toggle output counter cleared by tgrb compare match figure 11.9 example of toggle output operation
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 521 of 1560 mar 18, 2011 sh7080 group input capture function: the tcnt value can be transferred to tgr on detection of the tioc pin input edge. rising edge, falling edge, or both edges can be select ed as the detected edge. for channels 0 and 1, it is also possible to specify another channel's counter input clock or compare match signal as the input capture source. note: when another channel's counter input clock is used as the input capture input for channels 0 and 1, mp /1 should not be selected as the counter input clock used for input capture input. input capture will not be generated if mp /1 is selected. 1. example of input capture operation setting procedure figure 11.10 shows an example of the input capture operation setting procedure. input selection select input capture input start count [1] [2] [1] designate tgr as an input capture register by means of tior, and select rising edge, falling edge, or both edges as the input capture source and input signal edge. [2] set the cst bit in tstr to 1 to start the count operation. figure 11.10 example of input capture operation setting procedure
section 11 multi-function timer pulse unit 2 (mtu2) page 522 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2. example of input capture operation: figure 11.11 shows an example of input capture operation. in this example both rising and falling edges have been selected as the tioca pin input capture input edge, the falling edge has been se lected as the tiocb pi n input capture input edge, and counter clearing by tgrb input capture has been designated for tcnt. tcnt value h'0180 h'0000 tioca tgra h'0010 h'0005 counter cleared by tiocb input (falling edge) h'0160 h'0005 h'0160 h'0010 tgrb h'0180 tiocb time figure 11.11 example of input capture operation
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 523 of 1560 mar 18, 2011 sh7080 group 11.4.2 synchronous operation in synchronous operation, the values in a number of tcnt counters can be rewritten simultaneously (synchronous presetting). also, a number of tcnt counters can be cleared simultaneously by making the appropriate setting in tcr (synchronous clearing). synchronous operation enables tgr to be incremented with respect to a single time base. channels 0 to 4 can all be designated for synchr onous operation. channel 5 cannot be used for synchronous operation. example of synchronous operation setting procedure: figure 11.12 shows an example of the synchronous operation setting procedure. no yes set synchronous operation clearing source generation channel? select counter clearing source start count set synchronous counter clearing start count [1] [3] [5] [4] [5] [2] synchronous operation selection [1] set to 1 the sync bits in tsyr corresponding to the channels to be designated for synchronous operation. [2] when the tcnt counter of any of the channels designated for synchronous operation is written to, the same value is simultaneously written to the other tcnt counters. [3] use bits cclr2 to cclr0 in tcr to specify tcnt clearing by input capture/output compare, etc. [4] use bits cclr2 to cclr0 in tcr to designate synchronous clearing for the counter clearing source. [5] set to 1 the cst bits in tstr for the relevant channels, to start the count operation. set tcnt synchronous presetting synchronous clearing figure 11.12 example of synchronous operation setting procedure
section 11 multi-function timer pulse unit 2 (mtu2) page 524 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group example of synchronous operation: figure 11.13 shows an example of synchronous operation. in this example, synchronous operation and pwm m ode 1 have been designated for channels 0 to 2, tgrb_0 compare match has been set as the channel 0 counter clearing source, and synchronous clearing has been set for the channel 1 and 2 counter clearing source. three-phase pwm waveforms are output from pins tioc0a, tioc1a, and tioc2a. at this time, synchronous presetting, and synchron ous clearing by tgrb_0 compare match, are performed for channel 0 to 2 tcnt counters, and the data set in tgrb_0 is used as the pwm cycle. for details of pwm modes, see section 11.4.5, pwm modes. tcnt_0 to tcnt_2 values h'0000 tioc0a tioc1a tgrb_0 synchronous clearing by tgrb_0 compare match tgra_2 tgra_1 tgrb_2 tgra_0 tgrb_1 tioc2a time figure 11.13 example of synchronous operation
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 525 of 1560 mar 18, 2011 sh7080 group 11.4.3 buffer operation buffer operation, provided for channels 0, 3, and 4, enables tgrc and tgrd to be used as buffer registers. in channel 0, tgrf can also be used as a buffer register. buffer operation differs depending on whether tgr has been designated as an input capture register or as a compare match register. note: tgre_0 cannot be designated as an input capture register and can only operate as a compare match register. table 11.43 shows the register combinations used in buffer operation. table 11.43 register combinat ions in buffer operation channel timer general re gister buffer register 0 tgra_0 tgrc_0 tgrb_0 tgrd_0 tgre_0 tgrf_0 3 tgra_3 tgrc_3 tgrb_3 tgrd_3 4 tgra_4 tgrc_4 tgrb_4 tgrd_4 ? when tgr is an output compare register when a compare match occurs, the value in the buffer register for the corresponding channel is transferred to the timer general register. this operation is illustrated in figure 11.14. buffer register timer general register tcnt comparator compare match signal figure 11.14 compare match buffer operation
section 11 multi-function timer pulse unit 2 (mtu2) page 526 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? when tgr is an input capture register when input capture occurs, the value in tcnt is transferred to tgr and the value previously held in the timer general register is transferred to the buffer register. this operation is illustrated in figure 11.15. buffer register timer general register tcnt input capture signal figure 11.15 input capture buffer operation example of buffer operati on setting procedure: figure 11.16 shows an example of the buffer operation setting procedure. buffer operation select tgr function set buffer operation start count [1] [2] [3] [1] designate tgr as an input capture register or output compare register by means of tior. [2] designate tgr for buffer operation with bits bfa and bfb in tmdr. [3] set the cst bit in tstr to 1 start the count operation. figure 11.16 example of buffer operation setting procedure
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 527 of 1560 mar 18, 2011 sh7080 group examples of bu ffer operation: 1. when tgr is an output compare register figure 11.17 shows an operation example in which pwm mode 1 has been designated for channel 0, and buffer operation has been desi gnated for tgra and tgrc. the settings used in this example are tcnt clearing by compare match b, 1 output at compare match a, and 0 output at compare match b. in this example, the ttsa bit in tbtm is cleared to 0. as buffer operation has been se t, when compare match a occurs the output changes and the value in buffer register tgrc is simultaneously transferred to timer general register tgra. this operation is repeated each tim e that compare match a occurs. for details of pwm modes, see section 11.4.5, pwm modes. tcnt value tgrb_0 h'0000 tgrc_0 tgra_0 h'0200 h'0520 tioca h'0200 h'0450 h'0520 h'0450 tgra_0 h'0450 h'0200 transfer time figure 11.17 example of buffer operation (1) 2. when tgr is an input capture register figure 11.18 shows an operation example in which tgra has been designated as an input capture register, and buffer operation has been designated for tgra and tgrc. counter clearing by tgra input capture has been set for tcnt, and both rising and falling edges have been selected as the tioca pin input capture input edge. as buffer operation has been set, when the tcnt value is stored in tgra upon the occurrence of input capture a, the value previously stored in tgra is simultaneously transferred to tgrc.
section 11 multi-function timer pulse unit 2 (mtu2) page 528 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tcnt value h'09fb h'0000 tgrc time h'0532 tioca tgra h'0f07 h'0532 h'0f07 h'0532 h'0f07 h'09fb figure 11.18 example of buffer operation (2) selecting timing for transfer from buffer regi sters to timer general registers in buffer operation: the timing for transfer from buffer register s to timer general registers can be selected in pwm mode 1 or 2 for channel 0 or in pwm mode 1 for channels 3 and 4 by setting the buffer operation transfer mode registers (tbtm_0, tbtm_3, and tbtm_4). either compare match (initial setting) or tcnt clearing can be select ed for the transfer timing. tcnt clearing as transfer timing is one of the following cases. ? when tcnt overflows (h'ffff to h'0000) ? when h'0000 is written to tcnt during counting ? when tcnt is cleared to h'0000 under the cond ition specified in the cclr2 to cclr0 bits in tcr note: tbtm must be modified only while tcnt stops. figure 11.19 shows an operation example in which pwm mode 1 is designated for channel 0 and buffer operation is designated for tgra_0 and tgrc_0. the settings used in this example are tcnt_0 clearing by compare match b, 1 output at compare match a, and 0 output at compare match b. the ttsa bit in tbtm_0 is set to 1.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 529 of 1560 mar 18, 2011 sh7080 group tcnt_0 value h'0000 tgra_0 time tioca tgrc_0 h'0520 h'0520 h'0450 h'0450 h'0200 h'0520 h'0450 h'0200 h'0200 tgrb_0 tgra_0 transfer figure 11.19 example of buffer operation when tcnt_0 cleari ng is selected for tgrc_0 to tgra_0 transfer timing 11.4.4 cascaded operation in cascaded operation, two 16-bit counters for different channels are used together as a 32-bit counter. this function works by counting the channel 1 counter clock upon overflow/underflow of tcnt_2 as set in bits tp sc0 to tpsc2 in tcr. underflow occurs only when the lower 16-bit tcnt is in phase-counting mode. table 11.44 shows the register combinations used in cascaded operation. note: when phase counting mode is set for channel 1, the counter clock setting is invalid and the counters operates independently in phase counting mode. table 11.44 cascaded combinations combination upper 16 bits lower 16 bits channels 1 and 2 tcnt_1 tcnt_2 for simultaneous input capture of tcnt_1 and tcnt_2 during cascaded operation, additional input capture input pins can be specified by the input capture control register (ticcr). for input capture in cascade connection, refer to section 11.7.22, simultaneous capture of tcnt_1 and tcnt_2 in cascade connection.
section 11 multi-function timer pulse unit 2 (mtu2) page 530 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.45 shows the ticcr setting and input capture input pins. table 11.45 ticcr setting and input capture input pins target input capture ticcr setting input capture input pins i2ae bit = 0 (initial value) tioc1a input capture from tcnt_1 to tgra_1 i2ae bit = 1 tioc1a, tioc2a i2be bit = 0 (initial value) tioc1b input capture from tcnt_1 to tgrb_1 i2be bit = 1 tioc1b, tioc2b i1ae bit = 0 (initial value) tioc2a input capture from tcnt_2 to tgra_2 i1ae bit = 1 tioc2a, tioc1a i1be bit = 0 (initial value) tioc2b input capture from tcnt_2 to tgrb_2 i1be bit = 1 tioc2b, tioc1b example of cascaded opera tion setting procedure: figure 11.20 shows an example of the setting procedure for cascaded operation. cascaded operation set cascading start count [1] [2] [1] set bits tpsc2 to tpsc0 in the channel 1 tcr to b'1111 to select tcnt_2 overflow/ underflow counting. [2] set the cst bit in tstr for the upper and lower channel to 1 to start the count operation. figure 11.20 cascaded op eration setting procedure cascaded operation example (a): figure 11.21 illustrates the operation when tcnt_2 overflow/underflow counting has been set for tcnt_1 and phase counting mode has been designated for channel 2. tcnt_1 is incremented by tcnt_2 overflow and decremented by tcnt_2 underflow.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 531 of 1560 mar 18, 2011 sh7080 group tclkc tcnt_2 fffd tcnt_1 0001 tclkd fffe ffff 0000 0001 0002 0001 0000 ffff 0000 0000 figure 11.21 cascaded operation example (a) cascaded operation example (b): figure 11.22 illustrates the operation when tcnt_1 and tcnt_2 have been cascaded and the i2ae bit in ticcr has been set to 1 to include the tioc2a pin in the tgra_1 input capture conditions. in this example, the ioa0 to ioa3 bits in tior_1 have selected the tioc1a rising edge for the input capture timing while the ioa0 to ioa3 bits in tior_2 have selected the tioc2a rising edge for the input capture timing. under these conditions, the rising edge of both tioc1a and tioc2a is used for the tgra_1 input capture condition. for the tgra_2 input captu re condition, the tioc2a rising edge is used. tcnt_2 value h'0000 tgra_1 tgra_2 time tioc1a tioc2a tcnt_1 h'0514 h'0513 h'0512 h'0513 h'0512 h'c256 h'c256 h'ffff h'6128 as i1ae in ticcr is 0, data is not captured in tgra_2 at the tioc1a input timing. figure 11.22 cascaded operation example (b)
section 11 multi-function timer pulse unit 2 (mtu2) page 532 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group cascaded operation example (c): figure 11.23 illustrates the operation when tcnt_1 and tcnt_2 have been cascaded and the i2ae and i1ae bits in ticcr have been set to 1 to include the tioc2a and tioc1a pins in the tg ra_1 and tgra_2 input capture conditions, respectively. in this example, the ioa0 to ioa3 bits in both tior_1 and tior_2 have selected both the rising and falling edges for the input capture timing. under these conditions, the ored result of tioc1a and tioc2a input is used for the tgra_1 and tgra_2 input capture conditions. tcnt_2 value h'0000 tgra_1 tgra_2 time tioc1a tioc2a tcnt_1 h'0514 h'0514 h'0513 h'0512 h'0513 h'0512 h'c256 h'c256 h'ffff h'6128 h'6128 h'2064 h'2064 h'9192 h'9192 figure 11.23 cascaded operation example (c) cascaded operation example (d): figure 11.24 illustrates the operation when tcnt_1 and tcnt_2 have been cascaded and the i2ae bit in ticcr has been set to 1 to include the tioc2a pin in the tgra_1 input capture conditions. in this example, the ioa0 to ioa3 bits in tior_1 have selected tgra_0 compare match or input capture occurrence for the input capture timing while the ioa0 to ioa3 bits in tior_2 have selected the tioc2a rising edge for the input capture timing. under these conditions, as tior_1 has selected tgra_0 compare match or input capture occurrence for the input capture timing, the tioc2a edge is not used for tgra_1 input capture condition although the i2ae bit in ticcr has been set to 1.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 533 of 1560 mar 18, 2011 sh7080 group tcnt_2 value h'0000 h'0000 tgra_1 tgra_2 time tioc1a tioc2a tcnt_1 h'0513 h'0512 h'0513 h'd000 h'ffff h'd000 tcnt_0 value time tgra_0 compare match between tcnt_0 and tgra_0 figure 11.24 cascaded operation example (d)
section 11 multi-function timer pulse unit 2 (mtu2) page 534 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.4.5 pwm modes in pwm mode, pwm waveforms are output from the output pins. the output level can be selected as 0, 1, or toggle output in response to a compare match of each tgr. tgr registers settings can be used to output a pwm waveform in the range of 0% to 100% duty. designating tgr compare match as the counter clearing source enables the period to be set in that register. all channels can be designated for pw m mode independently. synchronous operation is also possible. there are two pwm modes, as described below. 1. pwm mode 1 pwm output is generated from the tioca and tiocc pins by pairing tgra with tgrb and tgrc with tgrd. the output specified by bits ioa0 to ioa3 and ioc0 to ioc3 in tior is output from the tioca and tiocc pins at compare matches a and c, and the output specified by bits iob0 to iob3 and iod0 to iod3 in tior is output at compare matches b and d. the initial output value is the value set in tgra or tgrc. if the set values of paired tgrs are identical, the output value does not change when a compare match occurs. in pwm mode 1, a maximum 8-phase pwm output is possible. 2. pwm mode 2 pwm output is generated using one tgr as the cycle register and the others as duty registers. the output specified in tior is performed by means of compare matches. upon counter clearing by a synchronization register compare match, the output value of each pin is the initial value set in tior. if the set values of the cy cle and duty registers are identical, the output value does not change when a compare match occurs. in pwm mode 2, a maximum 8-phase pwm output is possible in combination use with synchronous operation. the correspondence between pwm output pins and registers is shown in table 11.46.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 535 of 1560 mar 18, 2011 sh7080 group table 11.46 pwm output registers and output pins output pins channel registers pwm mode 1 pwm mode 2 tgra_0 tioc0a tgrb_0 tioc0a tioc0b tgrc_0 tioc0c 0 tgrd_0 tioc0c tioc0d tgra_1 tioc1a 1 tgrb_1 tioc1a tioc1b tgra_2 tioc2a 2 tgrb_2 tioc2a tioc2b tgra_3 cannot be set tgrb_3 tioc3a cannot be set tgrc_3 cannot be set 3 tgrd_3 tioc3c cannot be set 4 tgra_4 cannot be set tgrb_4 tioc4a cannot be set tgrc_4 tioc4c cannot be set tgrd_4 cannot be set note: in pwm mode 2, pwm output is not possible for the tgr register in which the period is set.
section 11 multi-function timer pulse unit 2 (mtu2) page 536 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group example of pwm mode setting procedure: figure 11.25 shows an example of the pwm mode setting procedure. pwm mode select counter clock select counter clearing source select waveform output level set tgr set pwm mode start count [1] [2] [3] [4] [5] [6] [1] select the counter clock with bits tpsc2 to tpsc0 in tcr. at the same time, select the input clock edge with bits ckeg1 and ckeg0 in tcr. [2] use bits cclr2 to cclr0 in tcr to select the tgr to be used as the tcnt clearing source. [3] use tior to designate the tgr as an output compare register, and select the initial value and output value. [4] set the cycle in the tgr selected in [2], and set the duty in the other tgr. [5] select the pwm mode with bits md3 to md0 in tmdr. [6] set the cst bit in tstr to 1 to start the count operation. figure 11.25 example of pwm mode setting procedure examples of pwm mode operation: figure 11.26 shows an example of pwm mode 1 operation. in this example, tgra compare match is set as the tcnt clearing source, 0 is set for the tgra initial output value and output value, and 1 is set as the tgrb output value. in this case, the value set in tgra is used as th e period, and the values set in the tgrb registers are used as the duty levels. tcnt value tgra h'0000 tioca time tgrb counter cleared by tgra compare match figure 11.26 example of pwm mode operation (1)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 537 of 1560 mar 18, 2011 sh7080 group figure 11.27 shows an example of pwm mode 2 operation. in this example, synchronous operation is designated for channels 0 and 1, tgrb_1 compare match is set as the tcnt clearing source, and 0 is set for the initial output value and 1 for the output value of the other tgr registers (tgra_0 to tgrd_0, tgra_1), outputting a 5-phase pwm waveform. in this case, the value set in tgrb_1 is used as th e cycle, and the values set in the other tgrs are used as the duty levels. tcnt value tgrb_1 h'0000 tioc0a counter cleared by tgrb_1 compare match time tgra_1 tgrd_0 tgrc_0 tgrb_0 tgra_0 tioc0b tioc0c tioc0d tioc1a figure 11.27 example of pwm mode operation (2)
section 11 multi-function timer pulse unit 2 (mtu2) page 538 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 11.28 shows examples of pwm waveform output with 0% duty and 100% duty in pwm mode. tcnt value tgra h'0000 tioca time tgrb 0% duty tgrb rewritten tgrb rewritten tgrb rewritten tcnt value tgra h'0000 tioca time tgrb 100% duty tgrb rewritten tgrb rewritten tgrb rewritten output does not change when cycle register and duty register compare matches occur simultaneously tcnt value tgra h'0000 tioca time tgrb 100% duty tgrb rewritten tgrb rewritten tgrb rewritten output does not change when cycle register and duty register compare matches occur simultaneously 0% duty figure 11.28 example of pwm mode operation (3)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 539 of 1560 mar 18, 2011 sh7080 group 11.4.6 phase counting mode in phase counting mode, the phase difference between two external clock inputs is detected and tcnt is incremented/d ecremented accordingly. this mode can be set for channels 1 and 2. when phase counting mode is set, an external cl ock is selected as the counter input clock and tcnt operates as an up/down-counter regardless of the setting of bits tpsc0 to tpsc2 and bits ckeg0 and ckeg1 in tcr. however, the functions of bits cclr0 and cclr1 in tcr, and of tior, tier, and tgr, are valid, and input capture/compare match and interrupt functions can be used. this can be used for two-phase encoder pulse input. if overflow occurs when tcnt is counting up, the tcfv flag in tsr is set; if underflow occurs when tcnt is counting down, the tcfu flag is set. the tcfd bit in tsr is the count direction flag. reading the tcfd flag reveals whether tcnt is counting up or down. table 11.47 shows the correspondence between external clock pins and channels. table 11.47 phase counting mode clock input pins external clock pins channels a-phase b-phase when channel 1 is set to phase counting mode tclka tclkb when channel 2 is set to phase counting mode tclkc tclkd example of phase counting mode setting procedure: figure 11.29 shows an example of the phase counting mode setting procedure. phase counting mode select phase counting mode start count [1] [2] [1] select phase counting mode with bits md3 to md0 in tmdr. [2] set the cst bit in tstr to 1 to start the count operation. figure 11.29 example of phase counting mode setting procedure
section 11 multi-function timer pulse unit 2 (mtu2) page 540 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group examples of phase counting mode operation: in phase counting mode, tcnt counts up or down according to the phase difference between tw o external clocks. there are four modes, according to the count conditions. 1. phase counting mode 1 figure 11.30 shows an example of phase counting mode 1 operation, and table 11.48 summarizes the tcnt up/down-count conditions. tcnt value time tclka (channel 1) tclkc (channel 2) tclkb (channel 1) tclkd (channel 2) up-count down-count figure 11.30 example of phase counting mode 1 operation table 11.48 up/down-count conditions in phase counting mode 1 tclka (channel 1) tclkc (channel 2) tclkb (channel 1) tclkd (channel 2) operation high level up-count low level low level high level high level down-count low level high level low level [legend] : rising edge : falling edge
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 541 of 1560 mar 18, 2011 sh7080 group 2. phase counting mode 2 figure 11.31 shows an example of phase counting mode 2 operation, and table 11.49 summarizes the tcnt up/down-count conditions. time down-count up-count tcnt value tclka (channel 1) tclkc (channel 2) tclkb (channel 1) tclkd (channel 2) figure 11.31 example of phase counting mode 2 operation table 11.49 up/down-count conditions in phase counting mode 2 tclka (channel 1) tclkc (channel 2) tclkb (channel 1) tclkd (channel 2) operation high level don't care low level don't care low level don't care high level up-count high level don't care low level don't care high level don't care low level down-count [legend] : rising edge : falling edge
section 11 multi-function timer pulse unit 2 (mtu2) page 542 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 3. phase counting mode 3 figure 11.32 shows an example of phase counting mode 3 operation, and table 11.50 summarizes the tcnt up/down-count conditions. time up-count down-count tcnt value tclka (channel 1) tclkc (channel 2) tclkb (channel 1) tclkd (channel 2) figure 11.32 example of phase counting mode 3 operation table 11.50 up/down-count conditions in phase counting mode 3 tclka (channel 1) tclkc (channel 2) tclkb (channel 1) tclkd (channel 2) operation high level don't care low level don't care low level don't care high level up-count high level down-count low level don't care high level don't care low level don't care [legend] : rising edge : falling edge
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 543 of 1560 mar 18, 2011 sh7080 group 4. phase counting mode 4 figure 11.33 shows an example of phase counting mode 4 operation, and table 11.51 summarizes the tcnt up/down-count conditions. time up-count down-count tcnt value tclka (channel 1) tclkc (channel 2) tclkb (channel 1) tclkd (channel 2) figure 11.33 example of phase counting mode 4 operation table 11.51 up/down-count conditions in phase counting mode 4 tclka (channel 1) tclkc (channel 2) tclkb (channel 1) tclkd (channel 2) operation high level up-count low level low level don't care high level high level down-count low level high level don't care low level [legend] : rising edge : falling edge
section 11 multi-function timer pulse unit 2 (mtu2) page 544 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group phase counting mode application example: figure 11.34 shows an example in which channel 1 is in phase counting mode, and channel 1 is coupled with channel 0 to input servo motor 2-phase encoder pulses in order to detect position or speed. channel 1 is set to phase counting mode 1, and the encoder pulse a-phase and b-phase are input to tclka and tclkb. channel 0 operates with tcnt counter clearing by tgrc_0 compare match; tgra_0 and tgrc_0 are used for the compare match function a nd are set with the speed control period and position control period. tgrb_0 is used for input capture, with tgrb_0 and tgrd_0 operating in buffer mode. the channel 1 counter input clock is designated as the tgrb_0 input capture source, and the pulse widths of 2-phase encoder 4-multiplication pulses are detected. tgra_1 and tgrb_1 for channel 1 are designated for input capture, and channel 0 tgra_0 and tgrc_0 compare matches are selected as the input capture source and store the up/down-counter values for the control periods. this procedure enables the accurate detection of position and speed.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 545 of 1560 mar 18, 2011 sh7080 group tcnt_1 tcnt_0 channel 1 tgra_1 (speed period capture) tgra_0 (speed control period) tgrb_1 (position period capture) tgrc_0 (position control period) tgrb_0 (pulse width capture) tgrd_0 (buffer operation) channel 0 tclka tclkb edge detection circuit + - + - figure 11.34 phase counting mode application example
section 11 multi-function timer pulse unit 2 (mtu2) page 546 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.4.7 reset-synchronized pwm mode in the reset-synchronized pwm mode, three-phase output of positive and negative pwm waveforms that share a common wave transition point can be obtained by combining channels 3 and 4. when set for reset-synchronized pwm mode, the tioc3b, tioc3d, tioc4a, tioc4c, tioc4b, and tioc4d pins function as pwm output pins and tcnt3 functions as an upcounter. table 11.52 shows the pwm output pins used. table 11.53 shows the settings of the registers. table 11.52 output pins for reset-synchronized pwm mode channel output pin description 3 tioc3b pwm output pin 1 tioc3d pwm output pin 1' (negative-phase waveform of pwm output 1) 4 tioc4a pwm output pin 2 tioc4c pwm output pin 2' (negative-phase waveform of pwm output 2) tioc4b pwm output pin 3 tioc4d pwm output pin 3' (negative-phase waveform of pwm output 3) table 11.53 register settings for reset-synchronized pwm mode register description of setting tcnt_3 initial setting of h'0000 tcnt_4 initial setting of h'0000 tgra_3 set count cycle for tcnt_3 tgrb_3 sets the turning point for pwm waveform output by the tioc3b and tioc3d pins tgra_4 sets the turning point for pwm waveform output by the tioc4a and tioc4c pins tgrb_4 sets the turning point for pwm waveform output by the tioc4b and tioc4d pins
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 547 of 1560 mar 18, 2011 sh7080 group procedure for selecting the reset-synchronized pwm mode: figure 11.35 shows an example of procedure for selecting the reset synchronized pwm mode. stop counting select counter clock and counter clear source set tgr reset-synchronized pwm mode brushless dc motor control setting set tcnt enable waveform output set reset-synchronized pwm mode pwm cycle output enabling, pwm output level setting start count operation reset-synchronized pwm mode [1] clear the cst3 and cst4 bits in the tstr to 0 to halt the counting of tcnt. the reset-synchronized pwm mode must be set up while tcnt_3 and tcnt_4 are halted. [2] set bits tpsc2 to tpsc0 and ckeg1 and ckeg0 in the tcr_3 to select the counter clock and clock edge for channel 3. set bits cclr2 to cclr0 in the tcr_3 to select tgra compare-match as a counter clear source. [3] when performing brushless dc motor control, set bit bdc in the timer gate control register (tgcr) and set the feedback signal input source and output chopping or gate signal direct output. [4] reset tcnt_3 and tcnt_4 to h'0000. [5] tgra_3 is the period register. set the waveform period value in tgra_3. set the transition timing of the pwm output waveforms in tgrb_3, tgra_4, and tgrb_4. set times within the compare-match range of tcnt_3. x tgra_3 (x: set value). [6] select enabling/disabling of toggle output synchronized with the pmw cycle using bit psye in the timer output control register (tocr1), and set the pwm output level with bits olsp and olsn. when specifying the pwm output level by using tolbr as a buffer for tocr2, see figure 11.3. [7] set bits md3 to md0 in tmdr_3 to b'1000 to select the reset-synchronized pwm mode. do not set to tmdr_4. [8] set the enabling/disabling of the pwm waveform output pin in toer. [9] set the port control register and the port i/o register. [10] set the cst3 bit in the tstr to 1 to start the count operation. [1] [2] [3] [4] [5] [6] [7] [8] pfc setting [9] [10] note: the output waveform starts to toggle operation at the point of tcnt_3 = tgra_3 = x by setting x = tgra, i.e., cycle = duty. figure 11.35 procedure for selecting reset-synchronized pwm mode
section 11 multi-function timer pulse unit 2 (mtu2) page 548 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group reset-synchronized pw m mode operation: figure 11.36 shows an example of operation in the reset-synchronized pwm mode. tcnt_3 and tcnt_4 operate as upcounters. the counter is cleared when a tcnt_3 and tgra_3 compare-matc h occurs, and then begins incrementing from h'0000. the pwm output pin output toggles with each oc currence of a tgrb_3, tgra_4, tgrb_4 compare-match, and upon counter clears. tgra_3 tgrb_3 tgrb_4 h'0000 tgra_4 tioc3b tioc3d tioc4a tioc4c tioc4b tioc4d time tcnt_3 and tcnt_4 values figure 11.36 reset-s ynchronized pwm mode operation example (when tocr?s olsn = 1 and olsp = 1)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 549 of 1560 mar 18, 2011 sh7080 group 11.4.8 complementary pwm mode in the complementary pwm mode, three-phase output of non-overlapping positive and negative pwm waveforms can be obtained by combining channels 3 and 4. pwm waveforms without non- overlapping interval is also available. in complementary pwm mode, tioc3b, tioc3d, tioc4a, tioc4b, tioc4c, and tioc4d pins function as pwm output pins, the tioc3a pin can be set for toggle output synchronized with the pwm period. tcnt_3 and tcnt_4 function as up/down counters. table 11.54 shows the pwm output pins used. table 11.55 shows the settings of the registers used. a function to directly cut off the pwm output by using an external signal is supported as a port function. table 11.54 output pins for complementary pwm mode channel output pin description 3 tioc3a toggle output synchronized with pwm period (or i/o port) tioc3b pwm output pin 1 tioc3c i/o port * tioc3d pwm output pin 1' (non-overlapping negative-phase waveform of pwm output 1; pwm output without non-overlapping interval is also available) 4 tioc4a pwm output pin 2 tioc4b pwm output pin 3 tioc4c pwm output pin 2' (non-overlapping negative-phase waveform of pwm output 2; pwm output without non-overlapping interval is also available) tioc4d pwm output pin 3' (non-overlapping negative-phase waveform of pwm output 3; pwm output without non-overlapping interval is also available) note: * avoid setting the tioc3c pin as a timer i/o pin in the complementary pwm mode.
section 11 multi-function timer pulse unit 2 (mtu2) page 550 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.55 register settings for complementary pwm mode channel counter/register description read/write from cpu 3 tcnt_3 start of up-count from value set in dead time register maskable by trwer setting * tgra_3 set tcnt_3 upper limit value (1/2 carrier cycle + dead time) maskable by trwer setting * tgrb_3 pwm output 1 compare register maskable by trwer setting * tgrc_3 tgra_3 buffer register always readable/writable tgrd_3 pwm output 1/tgrb_3 buffer register always readable/writable 4 tcnt_4 up-count start, initialized to h'0000 maskable by trwer setting * tgra_4 pwm output 2 compare register maskable by trwer setting * tgrb_4 pwm output 3 compare register maskable by trwer setting * tgrc_4 pwm output 2/tgra_4 buffer register always readable/writable tgrd_4 pwm output 3/tgrb_4 buffer register always readable/writable timer dead time data register (tddr) set tcnt_4 and tcnt_3 offset value (dead time value) maskable by trwer setting * timer cycle data register (tcdr) set tcnt_4 upper limit value (1/2 carrier cycle) maskable by trwer setting * timer cycle buffer register (tcbr) tcdr buffer register always readable/writable subcounter (tcnts) subcounter for dead time generation read-only temporary register 1 (temp1) pwm output 1/tgrb_3 temporary register not readable/writable temporary register 2 (temp2) pwm output 2/tgra_4 temporary register not readable/writable temporary register 3 (temp3) pwm output 3/tgrb_4 temporary register not readable/writable note: * access can be enabled or disabled according to the setting of bit 0 (rwe) in trwer (timer read/write enable register).
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 551 of 1560 mar 18, 2011 sh7080 group tgrc_3 tddr tcnt_3 tgrd_3 tgrd_4 tgrc_4 tgrb_3 temp 1 tgra_4 temp 2 tgrb_4 temp 3 tcnts tcnt_4 tgra_3 tcdr tcbr comparator comparator match signal match signal output controller output protection circuit pwm cycle output pwm output 1 pwm output 2 pwm output 3 pwm output 4 pwm output 5 pwm output 6 poe0 poe1 poe2 poe3 external cutoff input external cutoff interrupt : registers that can always be read or written from the cpu : registers that cannot be read or written from the cpu (except for tcnts, which can only be read) : registers that can be read or written from the cpu (but for which access disabling can be set by trwer) tgra_3 compare- match interrupt tcnt_4 underflow interrupt figure 11.37 block diagram of channels 3 and 4 in complementary pwm mode
section 11 multi-function timer pulse unit 2 (mtu2) page 552 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group example of complementary pwm mode setting procedure: an example of the complementary pwm mode setting procedure is shown in figure 11.38. complementary pwm mode stop count operation counter clock, counter clear source selection brushless dc motor control setting tcnt setting inter-channel synchronization setting tgr setting enable/disable dead time generation start count operation [1] clear bits cst3 and cst4 in the timer start register (tstr) to 0, and halt timer counter (tcnt) operation. perform complementary pwm mode setting when tcnt_3 and tcnt_4 are stopped. [2] set the same counter clock and clock edge for channels 3 and 4 with bits tpsc2 to tpsc0 and bits ckeg1 and ckeg0 in the timer control register (tcr). use bits cclr2 to cclr0 to set synchronous clearing only when restarting by a synchronous clear from another channel during complementary pwm mode operation. [3] when performing brushless dc motor control, set bit bdc in the timer gate control register (tgcr) and set the feedback signal input source and output chopping or gate signal direct output. [4] set the dead time in tcnt_3. set tcnt_4 to h'0000. [5] set only when restarting by a synchronous clear from another channel during complementary pwm mode operation. in this case, synchronize the channel generating the synchronous clear with channels 3 and 4 using the timer synchro register (tsyr). [6] set the output pwm duty in the duty registers (tgrb_3, tgra_4, tgrb_4) and buffer registers (tgrd_3, tgrc_4, tgrd_4). set the same initial value in each corresponding tgr. [7] this setting is necessary only when no dead time should be generated. make appropriate settings in the timer dead time enable register (tder) so that no dead time is generated. [8] set the dead time in the dead time register (tddr), 1/2 the carrier cycle in the carrier cycle data register (tcdr) and carrier cycle buffer register (tcbr), and 1/2 the carrier cycle plus the dead time in tgra_3 and tgrc_3. when no dead time generation is selected, set 1 in tddr and 1/2 the carrier cycle + 1 in tgra_3 and tgrc_3. [9] select enabling/disabling of toggle output synchronized with the pwm cycle using bit psye in the timer output control register 1 (tocr1), and set the pwm output level with bits olsp and olsn. when specifying the pwm output level by using tolbr as a buffer for tocr_2, see figure 11.3. [10] select complementary pwm mode in timer mode register 3 (tmdr_3). do not set in tmdr_4. [11] set enabling/disabling of pwm waveform output pin output in the timer output master enable register (toer). [12] set the port control register and the port i/o register. [13] set bits cst3 and cst4 in tstr to 1 simultaneously to start the count operation. [1] [2] [3] [4] [5] [6] [7] [8] [9] [11] dead time, carrier cycle setting pwm cycle output enabling, pwm output level setting complementary pwm mode setting enable waveform output start count operation [10] pfc setting [12] [13] figure 11.38 example of complementary pwm mode setting procedure
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 553 of 1560 mar 18, 2011 sh7080 group outline of complementary pwm mode operation: in complementary pwm mode, 6-phase pwm output is possible. figure 11.39 illustrates counter operation in complementary pwm mode, and figure 11.40 shows an example of complementary pwm mode operation. 1. counter operation in complementary pwm mode, three counters?tcnt_3, tcnt_4, and tcnts?perform up/down-count operations. tcnt_3 is automatically initialized to the value set in tddr when complementary pwm mode is selected and the cst bit in tstr is 0. when the cst bit is set to 1, tcnt_3 counts up to the value set in tgra_3, then switches to down-counting when it matches tgra_3. when the tcnt3 value matches tddr, the counter switches to up-counting, and the operation is repeated in this way. tcnt_4 is initialized to h'0000. when the cst bit is set to 1, tcnt4 counts up in synchronization with tcnt_3, and switches to down-counting when it matches tc dr. on reaching h'0000, tcnt4 switches to up-counting, and the operation is repeated in this way. tcnts is a read-only counter. it need not be initialized. when tcnt_3 matches tcdr during tcnt_3 and tcnt_4 up/down-counting, down- counting is started, and when tcnts matches tcdr, the operation switches to up-counting. when tcnts matches tgra_3, it is cleared to h'0000. when tcnt_4 matches tddr during tcnt_3 and tcnt_4 down-counting, up-counting is started, and when tcnts matches tddr, the operation switches to down-counting. when tcnts reaches h'0000, it is set with the value in tgra_3. tcnts is compared with the compare register and temporar y register in which the pwm duty is set during the count operation only. counter value tgra_3 tcdr tddr h'0000 tcnt_4 tcnts tcnt_3 tcnt_3 tcnt_4 tcnts time figure 11.39 complementary pwm mode counter operation
section 11 multi-function timer pulse unit 2 (mtu2) page 554 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2. register operation in complementary pwm mode, nine registers ar e used, comprising compare registers, buffer registers, and temporary registers. figure 11.40 shows an example of complementary pwm mode operation. the registers which are constantly compared with the counters to perform pwm output are tgrb_3, tgra_4, and tgrb_4. when these registers match the counter, the value set in bits olsn and olsp in the timer output control register (tocr) is output. the buffer registers for these compare re gisters are tgrd_3, tgrc_4, and tgrd_4. between a buffer register and compare register there is a temporary register. the temporary registers cannot be accessed by the cpu. data in a compare register is changed by writing the new data to the corresponding buffer register. the buffer registers can be read or written at any time. the data written to a buffer register is constantly transferred to the temporary register in the ta interval. data is not transferred to the temporary register in the tb interval. data written to a buffer register in this interval is transferred to the temporary register at the end of the tb interval. the value transferred to a temporary register is transferred to the compare register when tcnts for which the tb interval ends matches tgra_3 when counting up, or h'0000 when counting down. the timing for transfer from the temporary register to the compare register can be selected with bits md3 to md0 in the timer mode register (tmdr). figure 11.40 shows an example in which the mode is selected in which the change is made in the trough. in the tb interval (tb1 in figure 11.40) in which data transfer to the temporary register is not performed, the temporary register has the same function as the compare register, and is compared with the counter. in this interval, th erefore, there are two compare match registers for one-phase output, with the compare register containing the pre-change data, and the temporary register containing the new data. in this interval, the three counters?tcnt_3, tcnt_4, and tcnts?and two registers?compare register and temporary register?are compared, and pwm output controlled accordingly.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 555 of 1560 mar 18, 2011 sh7080 group tgra_3 tcdr tgra_4 tgrc_4 tddr h'0000 buffer register tgrc_4 temporary register temp2 compare register tgra_4 output waveform output waveform t b2 t a t b1 t a t b2 t a tcnt_3 tcnt_4 tcnts (output waveform is active-low) h'6400 h'0080 h'6400 h'6400 h'0080 h'0080 transfer from temporary register to compare register transfer from temporary register to compare register figure 11.40 example of complementary pwm mode operation
section 11 multi-function timer pulse unit 2 (mtu2) page 556 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 3. initialization in complementary pwm mode, there are six registers that must be initialized. in addition, there is a register that specifies whether to generate dead time (it should be used only when dead time generation should be disabled). before setting complementary pwm mode with bits md3 to md0 in the timer mode register (tmdr), the following initial register values must be set. tgrc_3 operates as the buffer register for tgra_3, and should be set with 1/2 the pwm carrier cycle + dead time td. th e timer cycle buffer register (tcbr) operates as the buffer register for the timer cycle data register (tcdr), and should be set with 1/2 the pwm carrier cycle. set dead time td in the timer dead time data register (tddr). when dead time is not needed, the tder bit in the timer dead time enable register (tder) should be cleared to 0, tgrc_3 and tgra_3 should be set to 1/2 the pwm carrier cycle + 1, and tddr should be set to 1. set the respective initial pwm duty values in buffer registers tgrd_3, tgrc_4, and tgrd_4. the values set in the five buffer registers ex cluding tddr are transferred simultaneously to the corresponding compare registers wh en complementary pwm mode is set. set tcnt_4 to h'0000 before setting complementary pwm mode. table 11.56 registers and counters requiring initialization register/counter set value tgrc_3 1/2 pwm carrier cycle + dead time td (1/2 pwm carrier cycle + 1 when dead time generation is disabled by tder) tddr dead time td (1 when dead time generation is disabled by tder) tcbr 1/2 pwm carrier cycle tgrd_3, tgrc_4, tgrd_4 initial pwm duty value for each phase tcnt_4 h'0000 note: the tgrc_3 set value must be the sum of 1/2 the pwm carrier cycle set in tcbr and dead time td set in tddr. when dead time generation is disabled by tder, tgrc_3 must be set to 1/2 the pwm carrier cycle + 1.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 557 of 1560 mar 18, 2011 sh7080 group 4. pwm output level setting in complementary pwm mode, the pwm pulse output level is set with bits olsn and olsp in timer output control register 1 (tocr1) or bits ols1p to ols3p and ols1n to ols3n in timer output control register 2 (tocr2). the output level can be set for each of the three positive phases and three negative phases of 6- phase output. complementary pwm mode should be cleared be fore setting or changing output levels. 5. dead time setting in complementary pwm mode, pwm pulses are output with a non-overlapping relationship between the positive and negative phases. this non-overlap time is called the dead time. the non-overlap time is set in the timer dead time data register (tddr). the value set in tddr is used as the tcnt_3 counter start value, and creates non-overlap between tcnt_3 and tcnt_4. complementary pwm mode should be cleared before changing the contents of tddr. 6. dead time suppressing dead time generation is suppressed by clearing the tder bit in the timer dead time enable register (tder) to 0. tder can be cleared to 0 only when 0 is written to it after reading tder = 1. tgra_3 and tgrc_3 should be set to 1/2 pwm carrier cycle + 1 and the timer dead time data register (tddr) should be set to 1. by the above settings, pwm waveforms without dead time can be obta ined. figure 11.41 shows an example of operation without dead time.
section 11 multi-function timer pulse unit 2 (mtu2) page 558 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tgra_3=tcdr+1 tcdr tgra_4 tgrc_4 tddr=1 h'0000 buffer register tgrc_4 temporary register temp2 compare register tgra_4 output waveform output waveform initial output initial output t a t b1 t a t b2 t a tcnt_3 tcnt_4 tcnts output waveform is active-low. data1 data2 data1 data2 data1 data2 transfer from temporary register to compare register figure 11.41 example of operation without dead time
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 559 of 1560 mar 18, 2011 sh7080 group 7. pwm cycle setting in complementary pwm mode, the pwm pulse cy cle is set in two registers?tgra_3, in which the tcnt_3 upper limit value is set, and tcdr, in which the tcnt_4 upper limit value is set. the settings should be made so as to achieve the following relationship between these two registers: with dead time: tgra_3 set value = tcdr set value + tddr set value without dead time: tgra_3 set value = tcdr set value + 1 the tgra_3 and tcdr settings are made by setting the values in buffer registers tgrc_3 and tcbr. the values set in tgrc_3 and tcbr are transferred simultaneously to tgra_3 and tcdr in accordance with the transfer timing select ed with bits md3 to md0 in the timer mode register (tmdr). the updated pwm cycle is reflected from the next cycle when the data update is performed at the crest, and from the current cycle when performed in the trough. figure 11.42 illustrates the operation when the pwm cycle is updated at the crest. see the following section, register data updating, for the method of updating the data in each buffer register. counter value tgrc_3 update tgra_3 update tgra_3 tcnt_3 tcnt_4 time figure 11.42 example of pwm cycle updating
section 11 multi-function timer pulse unit 2 (mtu2) page 560 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 8. register data updating in complementary pwm mode, the buffer register is used to update the data in a compare register. the update data can be written to the buffer register at any time. there are five pwm duty and carrier cycle registers that have buffer registers and can be updated during operation. there is a temporary register between each of these registers and its buffer register. when subcounter tcnts is not counting, if buffer register data is updated, the temporary register value is also rewritten. transfer is not performed from buffer registers to temporary registers when tcnts is counting; in this case, the value written to a buffer register is transferred after tcnts halts. the temporary register value is transferred to the compare register at the data update timing set with bits md3 to md0 in the timer mode register (tmdr). figure 11.43 shows an example of data updating in complementary pwm mode. this example shows the mode in which data updating is performed at both the counter crest and trough. when rewriting buffer register data, a write to tgrd_4 must be performed at the end of the update. data transfer from the buffer registers to the temporary registers is performed simultaneously for all five registers after the write to tgrd_4. a write to tgrd_4 must be performed after writing data to the registers to be updated, even when not updating all five registers, or when updating the tgrd_4 data. in this case, the data written to tgrd_4 should be the same as the data prior to the write operation.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 561 of 1560 mar 18, 2011 sh7080 group data update timing: counter crest and trough transfer from temporary register to compare register transfer from temporary register to compare register transfer from temporary register to compare register transfer from temporary register to compare register transfer from temporary register to compare register transfer from temporary register to compare register counter value tgra_3 tgrc_4 tgra_4 h'0000 br data1 data2 data3 data4 data5 data6 data1 data1 data2 data3 data4 data6 data2 data3 data4 data5 data6 temp_r gr time : compare register : buffer register figure 11.43 example of data update in complementary pwm mode
section 11 multi-function timer pulse unit 2 (mtu2) page 562 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 9. initial output in complementary pwm mode in complementary pwm mode, the initial output is determined by the setting of bits olsn and olsp in timer output control register 1 (tocr1) or bits ols1n to ols3n and ols1p to ols3p in timer output control register 2 (tocr2). this initial output is the pwm pulse non-active level, and is output from when complementary pwm mode is set with the timer mode regist er (tmdr) until tcnt_4 exceeds the value set in the dead time register (tddr). figure 11.44 shows an example of the initial output in complementary pwm mode. an example of the waveform when the initial pwm duty value is smaller than the tddr value is shown in figure 11.45. timer output control register settings olsn bit: 0 (initial output: high; active level: low) olsp bit: 0 (initial output: high; active level: low) tcnt_3 and tcnt_4 values tgra_4 tddr tcnt_3 tcnt_4 initial output dead time time active level active level tcnt_3 and tcnt_4 count start (tstr setting) complementary pwm mode (tmdr setting) positive phase output negative phase output figure 11.44 example of initial output in complementary pwm mode (1)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 563 of 1560 mar 18, 2011 sh7080 group timer output control register settings olsn bit: 0 (initial output: high; active level: low) olsp bit: 0 (initial output: high; active level: low) tcnt_3 and tcnt_4 values tgra_4 tddr tcnt_3 tcnt_4 initial output time active level tcnt_3 and tcnt_4 count start (tstr setting) complementary pwm mode (tmdr setting) positive phase output negative phase output figure 11.45 example of initial output in complementary pwm mode (2)
section 11 multi-function timer pulse unit 2 (mtu2) page 564 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 10. complementary pwm mode pwm output generation method in complementary pwm mode, 3-phase output is performed of pwm waveforms with a non- overlap time between the positive and negative phases. this non-overlap time is called the dead time. a pwm waveform is generated by output of the output level selected in the timer output control register in the event of a compare-match between a counter and data register. while tcnts is counting, data register and temporary register values are simultaneously compared to create consecutive pwm pulses from 0 to 100%. the relative timing of on and off compare- match occurrence may vary, but the compare-matc h that turns off each phase takes precedence to secure the dead time and ensure that the positive phase and negative phase on times do not overlap. figures 11.46 to 11.48 show examples of waveform generation in complementary pwm mode. the positive phase/negative phase off timing is generated by a compare-match with the solid- line counter, and the on timing by a compare-match with the dotted-line counter operating with a delay of the dead time behind the solid-lin e counter. in the t1 period, compare-match a that turns off the negative phase has the highest priority, and compare-matches occurring prior to a are ignored. in the t2 period, compare-match c that turns off the positive phase has the highest priority, and compare-matches occurring prior to c are ignored. in normal cases, compare-matches occur in the order a b c d (or c d a' b' ), as shown in figure 11.46. if compare-matches deviate from the a b c d order, since the time for which the negative phase is off is less than twice the dead time, the figure shows the positive phase is not being turned on. if compare-matches deviate from the c d a' b' order, since the time for which the positive phase is off is less than twice the dead time, the figure shows the negative phase is not being turned on. if compare-match c occurs first following compare-match a , as shown in figure 11.47, compare-match b is ignored, and the negative phase is turned off by compare-match d . this is because turning off of the positive phase has priority due to the occurrence of compare-match c (positive phase off timing) before compare-match b (positive phase on timing) (consequently, the waveform does not change since the positive phase goes from off to off). similarly, in the example in figure 11.48, compare-match a' with the new data in the temporary register occurs before compare-match c , but other compare-matches occurring up to c , which turns off the positive phase, are ignored. as a result, the negative phase is not turned on. thus, in complementary pwm mode, compare-ma tches at turn-off timings take precedence, and turn-on timing compare-matches that occur before a turn-off timing compare-match are ignored.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 565 of 1560 mar 18, 2011 sh7080 group t2 period t1 period t1 period ab c a' b' d tgra_3 tcdr tddr h'0000 positive phase negative phase figure 11.46 example of complementary pwm mode waveform output (1) t2 period t1 period t1 period tgra_3 tcdr tddr h'0000 positive phase negative phase c d a a b b figure 11.47 example of complementary pwm mode waveform output (2)
section 11 multi-function timer pulse unit 2 (mtu2) page 566 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ab c a' b' d t1 period t2 period t1 period tgra_3 tcdr tddr h'0000 positive phase negative phase figure 11.48 example of complementary pwm mode waveform output (3) a b c d a' b' t2 period t1 period t1 period tgra_3 tcdr tddr h'0000 positive phase negative phase figure 11.49 example of complementary pwm mode 0% and 100% waveform output (1)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 567 of 1560 mar 18, 2011 sh7080 group t2 period t1 period t1 period tgra_3 tcdr tddr h'0000 positive phase negative phase a c d a b b figure 11.50 example of complementary pwm mode 0% and 100% waveform output (2) t2 period t1 period t1 period a b c d tgra_3 tcdr tddr h'0000 positive phase negative phase figure 11.51 example of complementary pwm mode 0% and 100% waveform output (3)
section 11 multi-function timer pulse unit 2 (mtu2) page 568 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tgra_3 tcdr tddr h'0000 positive phase negative phase t2 period t1 period t1 period a b c b' d a' figure 11.52 example of complementary pwm mode 0% and 100% waveform output (4) cad b t2 period t1 period t1 period tgra_3 tcdr tddr h'0000 positive phase negative phase figure 11.53 example of complementary pwm mode 0% and 100% waveform output (5)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 569 of 1560 mar 18, 2011 sh7080 group 11. complementary pwm mode 0% and 100% duty output in complementary pwm mode, 0% and 100% duty cycles can be output as required. figures 11.49 to 11.53 show output examples. 100% duty output is performed when the data register value is set to h'0000. the waveform in this case has a positive phase with a 100% on-state. 0% duty output is performed when the data register value is set to the same value as tgra_3. the waveform in this case has a positive phase with a 100% off-state. on and off compare-matches occur simultaneousl y, but if a turn-on compare-match and turn- off compare-match for the same phase occu r simultaneously, both compare-matches are ignored and the waveform does not change. 12. toggle output synchronized with pwm cycle in complementary pwm mode, toggle output can be performed in synchronization with the pwm carrier cycle by setting the psye bit to 1 in the timer output control register (tocr). an example of a toggle output waveform is shown in figure 11.54. this output is toggled by a compare-match between tcnt_3 and tgra_3 and a compare- match between tcnt4 and h'0000. the output pin for this toggl e output is the tioc3a pin. the initial output is 1. tgra_3 h'0000 toggle output tioc3a pin tcnt_4 tcnt_3 figure 11.54 example of toggle output waveform synchronized with pwm output
section 11 multi-function timer pulse unit 2 (mtu2) page 570 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 13. counter clearing by another channel in complementary pwm mode, by setting a mode for synchronization with another channel by means of the timer synchronous register (tsyr), and selecting synchronous clearing with bits cclr2 to cclr0 in the timer control register (tcr), it is possible to have tcnt_3, tcnt_4, and tcnts cleared by another channel. figure 11.55 illustrates the operation. use of this function enables counter clearing and restarting to be performed by means of an external signal. tgra_3 tcdr tddr h'0000 channel 1 input capture a tcnt_1 tcnt_3 tcnt_4 tcnts synchronous counter clearing by channel 1 input capture a figure 11.55 counter clearing synchronized with another channel
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 571 of 1560 mar 18, 2011 sh7080 group 14. output waveform control at synchronous counter clearing in complementary pwm mode setting the wre bit in twcr to 1 suppresses initial output when synchronous counter clearing occurs in the tb inte rval at the trough in complementary pwm mode and controls abrupt change in duty cycle at synchronous counter clearing. initial output suppression is applicable only when synchronous clearing occurs in the tb interval at the trough as indicated by (10) or (11) in figure 11.56. when synchronous clearing occurs outside that interval, the initial value specified by the ols bits in tocr is output. even in the tb interval at the trough, if synchronous clear ing occurs in the initial value output period (indicated by (1) in figure 11.56) immediately after the counters start operation, initial value output is not suppressed. when using the initial output suppression functi on, make sure to set compare registers tgrb_3, tgra_4, and tgrb_4 to a value twice or more the setting of dead time data register tddr. if synchronous clearing occurs w ith the compare registers set to a value less than twice the setting of tddr, the pwm output dead time may be too short (or nonexistent) or illegal active-level pwm negative-phase output may occur during the initial output suppression interval. for details, see section 11.7.23, notes on output waveform control during synchronous counter clearing in complementary pwm mode. this function can be used in both the mtu2 and mtu2s. in the mtu2, synchronous clearing generated in channels 0 to 2 in the mtu2 can cause counter clearing in complementary pwm mode; in the mtu2s, compare match or input ca pture flag setting in channels 0 to 2 in the mtu2 can cause counter clearing.
section 11 multi-function timer pulse unit 2 (mtu2) page 572 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tb interval tb interval tb interval tgra_3 tgrb_3 tcdr tcnt_3 tcnt_4 tddr h'0000 positive phase negative phase output waveform is active-low (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) counter start figure 11.56 timing for synchronous counter clearing
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 573 of 1560 mar 18, 2011 sh7080 group ? example of procedure for setting output waveform control at synchronous counter clearing in complementary pwm mode an example of the procedure for setting output waveform control at synchronous counter clearing in complementary pwm mode is shown in figure 11.57. stop count operation output waveform control at synchronous counter clearing set twcr and complementary pwm mode start count operation output waveform control at synchronous counter clearing [1] [2] [3] [1] clear bits cst3 and cst4 in the timer start register (tstr) to 0, and halt timer counter (tcnt) operation. perform twcr setting while tcnt_3 and tcnt_4 are stopped. [2] read bit wre in twcr and then write 1 to it to suppress initial value output at counter clearing. [3] set bits cst3 and cst4 in tstr to 1 to start count operation. figure 11.57 example of procedure for setting output waveform control at synchronous counter clearing in complementary pwm mode ? examples of output waveform control at synchronous counter clearing in complementary pwm mode figures 11.58 to 11.61 show examples of output waveform control in which the mtu2 operates in complementary pwm mode and synchronous counter clearing is generated while the wre bit in twcr is set to 1. in the examples shown in figures 11.58 to 11.61, synchronous counter clearing occurs at timing (3), (6), (8), and (11) shown in figure 11.56, respectively. in the mtu2s, these examples are equivalent to the cases when th e mtu2s operates in complementary pwm mode and synchronous counter clearing is generated while the scc bit is cleared to 0 and the wr e bit is set to 1 in twcr.
section 11 multi-function timer pulse unit 2 (mtu2) page 574 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tgra_3 tgrb_3 tcdr tddr h'0000 positive phase negative phase output waveform is active-low. synchronous clearing tcnt_3 (mtu2) tcnt_4 (mtu2) bit wre = 1 figure 11.58 example of synchronous clearing in dead time during up-counting (timing (3) in figure 11.56; bit wre of twcr in mtu2 is 1) positive phase negative phase output waveform is active-low. synchronous clearing bit wre = 1 tcnt_3 (mtu2) tcnt_4 (mtu2) tgra_3 tgrb_3 tcdr tddr h'0000 figure 11.59 example of synchronous clearing in interval tb at crest (timing (6) in figure 11.56; bit wre of twcr in mtu2 is 1)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 575 of 1560 mar 18, 2011 sh7080 group positive phase negative phase output waveform is active-low. synchronous clearing bit wre = 1 tcnt_3 (mtu2) tcnt_4 (mtu2) tgra_3 tgrb_3 tcdr tddr h'0000 figure 11.60 example of synchronous clearing in dead time during down-counting (timing (8) in figure 11.56; bit wre of twcr is 1) positive phase negative phase output waveform is active-low. synchronous clearing bit wre = 1 tgra_3 tgrb_3 tcdr tddr h'0000 initial value output is suppressed. tcnt_3 (mtu2) tcnt_4 (mtu2) figure 11.61 example of synchronous clearing in interval tb at trough (timing (11) in figure 11.56; bit wre of twcr is 1)
section 11 multi-function timer pulse unit 2 (mtu2) page 576 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 15. suppressing mtu2?mtu2s synchronous counter clearing in the mtu2s, setting the scc bit in twcr to 1 suppresses synchronous counter clearing caused by the mtu2. synchronous counter clearing is suppressed only within the interval shown in figure 11.62. when using this function, the mtu2s should be set to complementary pwm mode. for details of synchronous clearing caused by the mtu2, refer to the description about mtu2s counter clearing caused by mtu2 flag setting source (mtu2-mtu2s synchronous counter clearing) in section 11.4.10, mtu2?mtu2s synchronous operation. tb interval at the crest tb interval at the trough tb interval at the crest tb interval at the trough tgra_3 tgrb_3 tcdr tddr h'0000 tb interval immediately after counter operation starts mtu2-mtu2s synchronous counter clearing is suppressed. mtu2-mtu2s synchronous counter clearing is suppressed. figure 11.62 mtu2?mtu2s synchronous clearing-suppressed interval specified by scc bit in twcr
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 577 of 1560 mar 18, 2011 sh7080 group ? example of procedure for suppressing mtu2?mtu2s synchronous counter clearing an example of the procedure for suppressing mtu2?mtu2s synchronous counter clearing is shown in figure 11.63. stop count operation (mtu2 and mtu2s) mtu2-mtu2s synchronous counter clearing suppress start count operation (mtu2 and mtu2s) output waveform control at synchronous counter clearing and synchronous counter clearing suppress [1] [3] ? set the following. ? complementary pwm mode (mtu2s) ? compare match/input capture operation (mtu2) ? bit wre in twcr (mtu2s) [2] set bit scc in twcr (mtu2s) [4] [1] clear bits cst of the timer start register (tstr) in the mtu2s to 0, and halt count operation. clear bits cst of tstr in the mtu2 to 0, and halt count operation. [2] set the complementary pwm mode in the mtu2s and compare match/input capture operation in the mtu2. when bit wre in twcr should be set, make appropriate setting here. [3] set bits cst3 and cst4 of tstr in the mtu2s to 1 to start count operation. for mtu2-mtu2s synchronous counter clearing, set bits cst of tstr in the mtu2 to 1 to start count operation in any one of tcnt_0 to tcnt_2. [4] read twcr and then set bit scc in twcr to 1 to suppress mtu2-mtu2s synchronous counter clearing * . here, do not modify the cce and wre bit values in twcr of the mtu2s. mtu2-mtu2s synchronous counter clearing is suppressed in the intervals shown in figure 11.62. note: * the scc bit value can be modified during counter operation. however, if a synchronous clearing occurs when bit scc is modified from 0 to 1, the synchronous clearing may not be suppressed. if a synchronous clearing occurs when bit scc is modified from 1 to 0, the synchronous clearing may be suppressed. figure 11.63 example of procedure for suppressing mtu2?mtu2s synchronous counter clearing ? examples of suppression of mtu2?mtu2s synchronous counter clearing figures 11.64 to 11.67 show examples of operation in which the mtu2s operates in complementary pwm mode and mtu2?mtu2s synchronous counter clearing is suppressed by setting the scc bit in twcr in th e mtu2s to 1. in the examples shown in figures 11.64 to 11.67, synchronous counter clearing occurs at timing (3), (6), (8), and (11) shown in figure 11.56, respectively. in these examples, the wre bit in twcr of the mtu2s is set to 1.
section 11 multi-function timer pulse unit 2 (mtu2) page 578 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tgra_3 tgrb_3 tcdr tddr h'0000 positive phase negative phase output waveform is active-low. mtu2-mtu2s synchronous clearing tcnt_3 (mtu2s) tcnt_4 (mtu2s) bit wre = 1 bit scc = 1 counters are not cleared figure 11.64 example of synchronous clearing in dead time during up-counting (timing (3) in figure 11.56; bit wre is 1 and bit scc is 1 in twcr of mtu2s)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 579 of 1560 mar 18, 2011 sh7080 group positive phase negative phase output waveform is active-low. mtu2-mtu2s synchronous clearing bit wre = 1 bit scc = 1 counters are not cleared tgra_3 tgrb_3 tcdr tddr h'0000 tcnt_3 (mtu2s) tcnt_4 (mtu2s) figure 11.65 example of synchronous clearing in interval tb at crest (timing (6) in figure 11.56; bit wre is 1 and bit scc is 1 in twcr of mtu2s)
section 11 multi-function timer pulse unit 2 (mtu2) page 580 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group positive phase negative phase output waveform is active-low. mtu2-mtu2s synchronous clearing bit wre = 1 bit scc = 1 counters are not cleared tgra_3 tgrb_3 tcdr tddr h'0000 tcnt_3 (mtu2s) tcnt_4 (mtu2s) figure 11.66 example of synchronous clearing in dead time during down-counting (timing (8) in figure 11.56; bit wre is 1 and bit scc is 1 in twcr of mtu2s)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 581 of 1560 mar 18, 2011 sh7080 group positive phase negative phase output waveform is active-low. mtu2-mtu2s synchronous clearing bit wre = 1 bit scc = 1 tgra_3 tgrb_3 tcdr tddr h'0000 tcnt_3 (mtu2s) tcnt_4 (mtu2s) counters are cleared initial value output is suppressed. figure 11.67 example of synchronous clearing in interval tb at trough (timing (11) in figure 11.56; bit wre is 1 and bit scc is 1 in twcr of mtu2s)
section 11 multi-function timer pulse unit 2 (mtu2) page 582 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 16. counter clearing by tgra_3 compare match in complementary pwm mode, by setting the cce bit in the timer waveform control register (twcr), it is possible to have tcnt_3, tcnt_4, and tcnts cleared by tgra_3 compare match. figure 11.68 illustrates an operation example. notes: 1. use this function only in complementary pwm mode 1 (transfer at crest) 2. do not specify synchronous clearing by another channel (do not set the sync0 to sync4 bits in the timer synchronous register (tsyr) to 1 or the ce0a, ce0b, ce0c, ce0d, ce1a, ce1b, ce1c, and ce1d bits in the timer synchronous clear register (tsycr) to 1). 3. do not set the pwm duty value to h'0000. 4. do not set the psye bit in timer output control register 1 (tocr1) to 1. tgra_3 tgrb_3 tcdr tddr h'0000 output waveform output waveform output waveform is active-high. counter cleared by tgra_3 compare match figure 11.68 example of counter cleari ng operation by tgra_3 compare match
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 583 of 1560 mar 18, 2011 sh7080 group 17. example of ac synchronous motor (brushless dc motor) drive waveform output in complementary pwm mode, a brushless dc motor can easily be controlled using the timer gate control register (tgcr). figures 11.69 to 11.72 show examples of brushless dc motor drive waveforms created using tgcr. when output phase switching for a 3-phase brushless dc motor is performed by means of external signals detected with a hall element, etc., clear the fb b it in tgcr to 0. in this case, the external signals indicating the polarity position are input to channel 0 timer input pins tioc0a, tioc0b, and tioc0c (set with pfc). when an edge is detected at pin tioc0a, tioc0b, or tioc0c, the output on/off state is switched automatically. when the fb bit is 1, the output on/off state is switched when the uf, vf, or wf bit in tgcr is cleared to 0 or set to 1. the drive waveforms are output from the complementary pwm mode 6-phase output pins. with this 6-phase output, in the case of on output, it is possible to use complementary pwm mode output and perform chopping output by setting the n bit or p bit to 1. when the n bit or p bit is 0, level output is selected. the 6-phase output active level (on output level) can be set with the olsn and olsp bits in the timer output control register (tocr) regardless of the setting of the n and p bits. external input tioc0a pin tioc0b pin tioc0c pin tioc3b pin tioc3d pin tioc4a pin tioc4c pin tioc4b pin tioc4d pin 6-phase output when bdc = 1, n = 0, p = 0, fb = 0, output active level = high figure 11.69 example of output phase switching by external input (1)
section 11 multi-function timer pulse unit 2 (mtu2) page 584 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group external input tioc0a pin tioc0b pin tioc0c pin tioc3b pin tioc3d pin tioc4a pin tioc4c pin tioc4b pin tioc4d pin 6-phase output when bdc = 1, n = 1, p = 1, fb = 0, output active level = high figure 11.70 example of output phase switching by external input (2) tgcr uf bit vf bit wf bit tioc3b pin tioc3d pin tioc4a pin tioc4c pin tioc4b pin tioc4d pin 6-phase output when bdc = 1, n = 0, p = 0, fb = 1, output active level = high figure 11.71 example of output phase switching by means of uf, vf, wf bit settings (1)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 585 of 1560 mar 18, 2011 sh7080 group tgcr uf bit vf bit wf bit tioc3b pin tioc3d pin tioc4a pin tioc4c pin tioc4b pin tioc4d pin 6-phase output when bdc = 1, n = 1, p = 1, fb = 1, output active level = high figure 11.72 example of output phase switching by means of uf, vf, wf bit settings (2) 18. a/d converter start request setting in complementary pwm mode, an a/d converter start request can be issued using a tgra_3 compare-match, tcnt_4 underflow (trough), or compare-match on a channel other than channels 3 and 4. when start requests using a tgra_3 compare-match are specified, a/d conversion can be started at the crest of the tcnt_3 count. a/d converter start requests can be set by se tting the ttge bit to 1 in the timer interrupt enable register (tier). to issue an a/d converter start request at a tcnt_4 underflow (trough), set the ttge2 bit in tier_4 to 1.
section 11 multi-function timer pulse unit 2 (mtu2) page 586 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group interrupt skipping in complementary pwm mode: interrupts tgia_3 (at the crest) and tciv_4 (at the trough) in channels 3 and 4 can be skipped up to seven times by making settings in the timer interrupt skipping set register (titcr). transfers from a buffer register to a temporary re gister or a compare register can be skipped in coordination with interrupt skipping by making settings in the timer buffer transfer register (tbter). for the linkage with buffer registers, refer to description 3, buffer transfer control linked with interrupt skipping, below. a/d converter start requests generated by the a/d converter start request delaying function can also be skipped in coordination with interrupt skipping by making settings in the timer a/d converter request control register (tadcr). for the linkage with the a/d converter start request delaying function, refer to section 11.4.9, a/ d converter start request delaying function. the setting of the timer interrupt skipping setting register (titcr) must be done while the tgia_3 and tciv_4 interrupt requests are disabled by the settings of registers tier_3 and tier_4 along with under the conditions in which tgfa_3 and tcfv_4 flag settings by compare match never occur. before changing the skipping count, be sure to clear the t3aen and t4ven bits to 0 to clear the skipping counter. 1. example of interrupt skipping operation setting procedure figure 11.73 shows an example of the interrupt skipping operation setting procedure. figure 11.74 shows the periods during which interrupt skipping count can be changed. clear interrupt skipping counter interrupt skipping set skipping count and enable interrupt skipping [1] [2] [1] set bits t3aen and t4ven in the timer interrupt skipping set register (titcr) to 0 to clear the skipping counter. [2] specify the interrupt skipping count within the range from 0 to 7 times in bits 3acor2 to 3acor0 and 4vcor2 to 4vcor0 in titcr, and enable interrupt skipping through bits t3aen and t4ven. note: the setting of titcr must be done while the tgia_3 and tciv_4 interrupt requests are disabled by the settings of registers tier_3 and tier_4 along with under the conditions in which tgfa_3 and tcfv_4 flag settings by compare match never occur. before changing the skipping count, be sure to clear the t3aen and t4ven bits to 0 to clear the skipping counter. figure 11.73 example of interrupt skipping operation setting procedure
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 587 of 1560 mar 18, 2011 sh7080 group tcnt_3 tcnt_4 period during which changing skipping count can be performed period during which changing skipping count can be performed period during which changing skipping count can be performed period during which changing skipping count can be performed figure 11.74 periods during which in terrupt skipping count can be changed 2. example of interrupt skipping operation figure 11.75 shows an example of tgia_3 interrupt skipping in which the interrupt skipping count is set to three by the 3acor bit and the t3aen bit is set to 1 in the timer interrupt skipping set register (titcr). tgia_3 interrupt flag set signal skipping counter tgfa_3 flag interrupt skipping period 00 01 02 03 00 01 02 03 interrupt skipping period figure 11.75 example of interrupt skipping operation
section 11 multi-function timer pulse unit 2 (mtu2) page 588 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 3. buffer transfer control linked with interrupt skipping in complementary pwm mode, whether to transfer data from a buffer register to a temporary register and whether to link the transfer with interrupt skipping can be specified with the bte1 and bte0 bits in the timer buffer transfer set register (tbter). figure 11.76 shows an example of operation when buffer transfer is suppressed (bte1 = 0 and bte0 = 1). while this setting is valid, data is not transferred from the buffer register to the temporary register. figure 11.77 shows an example of operation when buffer transfer is linked with interrupt skipping (bte1 = 1 and bet0 = 0). while this setting is valid, data is not transferred from the buffer register outside the buffer transfer-enabled period. note that the buffer transfer-enabled period depends on the t3aen and t4ven bit settings in the timer interrupt skipping set register (titcr). figure 11.78 shows the relationship between the t3aen and t4ven bit settings in titcr and buffer transfer-enabled period. note: this function must always be used in combination with interrupt skipping. when interrupt skipping is disabled (the t3aen and t4ven bits in the timer interrupt skipping set register (titcr) are cleared to 0 or the skipping count set bits (3acor and 4vcor) in titcr are cleared to 0), make su re that buffer transfer is not linked with interrupt skipping (clear the bte1 bit in the timer buffer transfer set register (tbter) to 0). if buffer transfer is linked with interrupt skipping while interrupt skipping is disabled, buffer transfer is never performed.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 589 of 1560 mar 18, 2011 sh7080 group buffer register temporary register general register tcnt_3 tcnt_4 data1 data2 data * data2 data * data2 (1) (2) (3) buffer transfer is suppressed note: * when buffer transfer at the crest is selected. data1 bit bte1 in tbter bit bte0 in tbter (1) no data is transferred from the buffer register to the temporary register in the buffer transfer-disabled period (bits bte1 and bte0 in tbter are set to 0 and 1, respectively). (2) data is transferred from the temporary register to the general register even in the buffer transfer-disabled period. (3) after buffer transfer is enabled, data is transferred from the buffer register to the temporary register. [legend] figure 11.76 example of operation when buffer transfer is suppressed (bte1 = 0 and bte0 = 1)
section 11 multi-function timer pulse unit 2 (mtu2) page 590 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (1) when buffer re g ister is rewritten within one carrier cycle after the tgia_3 interrupt tgia_3 interrupt g enerated buffer re g ister rewrite timin g tgia_3 interrupt g enerated buffer re g ister rewrite timin g 0 2 1 0 1 data1 2 2 data2 data data1 data2 data data1 data2 data (2) when buffer re g ister is rewritten after one carrier cycle has elapsed after the tgia_3 interrupt tgia_3 interrupt g enerated tgia_3 interrupt g enerated buffer re g ister rewrite timin g 0 2 1 0 1 data1 data data1 data data1 data buffer transfer-enabled period bits 6 to 4 in titcr bits 6 to 4 in titcnt buffer re g ister temporary re g ister general re g ister buffer transfer-enabled period bits 6 to 4 in titcr bits 6 to 4 in titcnt buffer re g ister temporary re g ister general re g ister note: bits md3 to md0 in tmdr_3 are set to 1101, selectin g buffer transfer at the crest. the skippin g count is set to two. t3aen is set to 1, and t4ven is cleared to 0. figure 11.77 example of operation when buffer transfer is linked with interrupt skipping (bte1 = 1 and bte0 = 0)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 591 of 1560 mar 18, 2011 sh7080 group note: bits md3 to md0 in tmdr_3 are set to 1111, selectin g buffer transfer at the crest and trou g h. the skippin g count is set to three. t3aen and t4ven are set to 1. 00 12 3 0123 01 23 0123 skippin g counter 3acnt skippin g counter 4vcnt buffer transfer-enabled period (t3aen set to 1) buffer transfer-enabled period (t4ven set to 1) buffer transfer-enabled period (t3aen and t4ven set to 1) figure 11.78 relationship between bits t3aen and t4ven in timer interrupt skipping set register (titcr) and buffer transfer-enabled period
section 11 multi-function timer pulse unit 2 (mtu2) page 592 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group complementary pwm mode output protection function: complementary pwm mode output has the following protection functions. 1. register and counter miswrite prevention function with the exception of the buffer registers, which can be rewritten at any time, access by the cpu can be enabled or disabled for the mode re gisters, control registers, compare registers, and counters used in complementary pwm mode by means of the rwe bit in the timer read/write enable register (trw er). the applicable registers ar e some (21 in total) of the registers in channels 3 and 4 shown in the following: ? tcr_3 and tcr_4, tmdr_3 and tmdr_4, tiorh_3 and tiorh_4, tiorl_3 and tiorl_4, tier_3 and tier_4, tcnt_3 and tcnt_4, tgra_3 and tgra_4, tgrb_3 and tgrb_4, toer, tocr, tgcr, tcdr, and tddr. this function enables miswriting due to cpu runaway to be prevented by disabling cpu access to the mode registers, control registers, and counters. when the applicable registers are read in the access-disabled state, undefined valu es are returned. writing to these registers is ignored. 2. halting of pwm output by external signal the 6-phase pwm output pins can be set automatically to the high-impedance state by inputting specified external signals. there are four external signal input pins. see section 13, port output enable (poe), for details. 3. halting of pwm output when oscillator is stopped if it is detected that the clock input to this lsi has stopped, the 6-phase pwm output pins automatically go to the high-imp edance state. the pin states ar e not guaranteed when the clock is restarted. see section 4.7, function for detecting oscillator stop.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 593 of 1560 mar 18, 2011 sh7080 group 11.4.9 a/d converter start request delaying function a/d converter start requests can be issued in channel 4 by making settings in the timer a/d converter start request control register (tadcr), timer a/d converter start request cycle set registers (tadcora_4 and tadcorb_4), and timer a/d converter start request cycle set buffer registers (tadcobra_4 and tadcobrb_4). the a/d converter start request delaying function compares tcnt_4 with tadcora_4 or tadcorb_4, and when their values match, the function issues a respective a/d converter start request (trg4an or trg4bn). a/d converter start requests (trg4an and trg4bn) can be skipped in coordination with interrupt skipping by making settings in the ita3ae, ita4ve, itb3ae, and itb4ve bits in tadcr. 1. example of procedure for specifying a/d converter start request delaying function figure 11.79 shows an example of procedure for specifying the a/d converter start request delaying function. set a/d converter start request cycle a/d converter start request delaying function ? set the timing of transfer from cycle set buffer register ? set linkage with interrupt skipping ? enable a/d converter start request delaying function a/d converter start request delaying function [1] [2] [1] set the cycle in the timer a/d converter start request cycle buffer register (tadcobra_4 or tadcobrb_4) and timer a/d converter start request cycle register (tadcora_4 or tadcorb_4). (the same initial value must be specified in the cycle buffer register and cycle register.) [2] use bits bf1 and bf2 in the timer a/d converter start request control register (tadcr) to specify the timing of transfer from the timer a/d converter start request cycle buffer register to a/d converter start request cycle register. ? specify whether to link with interrupt skipping through bits ita3ae, ita4ve, itb3ae, and itb4ve. ? use bits tu4ae, dt4ae, ut4be, and dt4be to enable a/d conversion start requests (trg4an or trg4bn). notes: 1. perform tadcr setting while tcnt_4 is stopped. 2. do not set bf1 to 1 when complementary pwm mode is not selected. 3. do not set ita3ae, ita4ve, itb3ae, itb4ve, dt4ae, or dt4be to 1 when complementary pwm mode is not selected. figure 11.79 example of proce dure for specifying a/d converter start request delaying function
section 11 multi-function timer pulse unit 2 (mtu2) page 594 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2. basic operation example of a/d converter start request delaying function figure 11.80 shows a basic example of a/d converter request signal (trg4an) operation when the trough of tcnt_4 is specified for the buffer transfer timing and an a/d converter start request signal is output during tcnt_4 down-counting. tadcora_4 tadcobra_4 tcnt_4 transfer from cycle buffer register to cycle register transfer from cycle buffer register to cycle register transfer from cycle buffer register to cycle register a/d converter start request (trg4an) (complementary pwm mode) figure 11.80 basic example of a/d converter start request signal (trg4an) operation 3. buffer transfer the data in the timer a/d converter start request cycle set registers (tadcora_4 and tadcorb_4) is updated by writing data to the timer a/d converter start request cycle set buffer registers (tadcobra_4 and tadcobrb_4). data is transferred from the buffer registers to the respective cycle set registers at the timing selected with the bf1 and bf0 bits in the timer a/d converter start request control register (tadcr_4). 4. a/d converter start request delaying function linked with interrupt skipping a/d converter start requests (trg4an and trg4bn) can be issued in coordination with interrupt skipping by making settings in the ita3ae, ita4ve, itb3ae, and itb4ve bits in the timer a/d converter start request control register (tadcr). figure 11.81 shows an example of a/d converter start request signal (trg4an) operation when trg4an output is enabled during tcnt_4 up-counting and down-counting and a/d converter start requests are linked with interrupt skipping. figure 11.82 shows another example of a/d converter start request signal (trg4an) operation when trg4an output is enabled during tcnt_4 up-counting and a/d converter start requests are linked with interrupt skipping.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 595 of 1560 mar 18, 2011 sh7080 group note: this function must be used in combination with interrupt skipping. when interrupt skipping is disabled (the t3aen and t4ven bits in the timer interrupt skipping set register (titcr) are cleared to 0 or the skipping count set bits (3acor and 4vcor) in titcr are cleared to 0), make sure that a/d converter start requests are not linked with interrupt skipping (clear the ita3ae, ita4ve, itb3ae, and itb4ve bits in the timer a/d converter start request control register (tadcr) to 0). tadcora_4 tcnt_4 a/d converter start request (trg4an) note: when the interrupt skipping count is set to two. tgia_3 interrupt skipping counter tciv_4 interrupt skipping counter tgia_3 a/d request-enabled period tciv_4 a/d request-enabled period when linked with tgia_3 and tciv_4 interrupt skipping when linked with tgia_3 interrupt skipping when linked with tciv_4 interrupt skipping 00 01 00 01 02 00 01 00 01 02 (ut4ae/dt4ae = 1) figure 11.81 example of a/d converter start request signal (trg4an) operation linked with interrupt skipping
section 11 multi-function timer pulse unit 2 (mtu2) page 596 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group a/d converter start request (trg4an) note: when the interrupt skipping count is set to two. tgia_3 interrupt skipping counter tciv_4 interrupt skipping counter tgia_3 a/d request-enabled period tciv_4 a/d request-enabled period when linked with tgia_3 and tciv_4 interrupt skipping when linked with tgia_3 interrupt skipping when linked with tciv_4 interrupt skipping tadcora_4 tcnt_4 00 01 00 01 02 00 01 00 01 02 ut4ae = 1 dt4ae = 0 figure 11.82 example of a/d converter start request signal (trg4an) operation linked with interrupt skipping
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 597 of 1560 mar 18, 2011 sh7080 group 11.4.10 mtu2?mtu2s synchronous operation mtu2?mtu2s synchronous counter start: the counters in the mtu2 and mtu2s which operate at different clock systems can be started synchronously by making the tcsystr settings in the mtu2. 1. example of mtu2?mtu 2s synchronous counter start setting procedure figure 11.83 shows an example of synchronous counter start setting procedure. stop count operation mtu2-mtu2s synchronous counter start set the necessary operation [1] [2] set tcsystr [3] [1] use tstr registers in the mtu2 and mtu2s and halt the counters used for synchronous start operation. [2] specify necessary operation with appropriate registers such as tcr and tmdr. [3] in tcsystr in the mtu2, set the bits corresponding to the counters to be started synchronously to 1. the tstrs are automatically set appropriately and the counters start synchronously. notes: 1. even if a bit in tcsystr corresponding to an operating counter is cleared to 0, the counter will not stop. to stop the counter, clear the corresponding bit in tstr to 0 directly. 2. to start channels 3 and 4 in reset-synchronized pwm mode or complementary pwm mode, make appropriate settings in tcystr according to the tstr setting for the respective mode. for details, refer to section 11.4.7, reset-synchronized pwm mode, and section 11.4.8, complementary pwm mode. figure 11.83 example of synchronous counter start setting procedure
section 11 multi-function timer pulse unit 2 (mtu2) page 598 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2. examples of synchronous counter start operation figures 11.84 (1), 11.84 (2), 11.84 (3), and 11.84 (4) show examples of synchronous counter start operation when the clock frequency ratio between the mtu2 and mtu2s is 1:1, 1:2, 1:3, and 1:4, respectively. in these examples, the counte r clock of the mtu2 is mp /1. mtu2 clock mtu2s clock mtu2/tstr mtu2s/tstr h'51 tcsystr h'00 h'42 h'00 h'80 h'00 h'00 h'0001 mtu2/tcnt_1 h'0000 h'0002 h'0001 h'0002 mtu2s/tcnt_4 h'0000 automatically cleared after tcsystr setting is made figure 11.84 (1) example of synchronous counter start operation (mtu2-to-mtu2s clock frequency ratio = 1:1)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 599 of 1560 mar 18, 2011 sh7080 group mtu2 clock mtu2s clock automatically cleared after tcsystr setting is made mtu2/tstr mtu2s/tstr h'51 tcsystr h'00 h'42 h'00 h'80 h'00 h'00 h'0001 mtu2/tcnt_1 h'0000 h'0002 h'0001 mtu2s/tcnt_4 h'0000 h'0002 h'0003 h'0004 figure 11.84 (2) example of synchronous counter start operation (mtu2-to-mtu2s clock frequency ratio = 1:2) mtu2 clock mtu2s clock automatically cleared after tcsystr setting is made mtu2/tstr mtu2s/tstr h'51 tcsystr h'00 h'42 h'00 h'80 h'00 h'00 h'0001 mtu2/tcnt_1 h'0000 h'0002 h'0001 mtu2s/tcnt_4 h'0000 h'0002 h'0003 h'0004 figure 11.84 (3) example of synchronous counter start operation (mtu2-to-mtu2s clock frequency ratio = 1:3)
section 11 multi-function timer pulse unit 2 (mtu2) page 600 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group mtu2 clock mtu2s clock automatically cleared after tcsystr setting is made mtu2/tstr mtu2s/tstr h'51 tcsystr h'00 h'42 h'00 h'80 h'00 h'00 h'0001 mtu2/tcnt_1 h'0000 h'0002 h'0001 mtu2s/tcnt_4 h'0000 h'0002 h'0003 h'0004 figure 11.84 (4) example of synchronous counter start operation (mtu2-to-mtu2s clock frequency ratio = 1:4)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 601 of 1560 mar 18, 2011 sh7080 group mtu2s counter clearing caused by mtu2 flag se tting source (mtu2?mtu2s synchronous counter clearing): the mtu2s counters can be cleared by sources for setting the flags in tsr_0 to tsr_2 in the mtu2 th rough the tsycr_3 settings in the mtu2s. 1. example of procedure for specifying mtu2 s counter clearing by mtu2 flag setting source figure 11.85 shows an example of procedure for specifying mtu2s counter clearing by mtu2 flag setting source. stop count operation mtu2s counter clearing by mtu2s flag setting source set tsycr_3 [1] [2] [3] [1] [4] start one of channels 0 to 2 in mtu2 start channel 3 or 4 in mtu2s [1] use tstr registers in the mtu2 and mtu2s and halt the counters used for this function. [2] use tsycr_3 in the mtu2s to specify the flag setting source to be used for the tcnt_3 and tcnt_4 clearing source. [3] start tcnt_3 or tcnt_4 in the mtu2s. [4] start tcnt_0, tcnt_1, or tcnt_2 in the mtu2. note: the tsycr_3 setting is ignored while the counter is stopped. the setting becomes valid after tcnt_3 or tcnt4 is started. figure 11.85 example of proce dure for specifying mtu2s counter clearing by mtu2 flag setting source
section 11 multi-function timer pulse unit 2 (mtu2) page 602 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 2. examples of mtu2s counter clearing caused by mtu2 flag setting source figures 11.86 (1) and 11.86 (2) show examples of mts2s counter clearing caused by mtu2 flag setting source. tcnt_0 value in mtu2 tgra_0 h'0000 time compare match between tcnt_0 and tgra_0 tcnt_0 in mtu2 tcnt_4 value in mtu2s h'0000 time tcnt_4 in mtu2s tsycr_3 h'00 h'80 figure 11.86 (1) example of mtu2s count er clearing caused by mtu2 flag setting source (1) tcnt_0 value in mtu2 tgrd_0 tgrb_0 tgrc_0 tgra_0 h'0000 time compare match between tcnt_0 and tgr tcnt_0 in mtu2 tcnt_4 value in mtu2s h'0000 time tcnt_4 in mtu2s tsycr_3 h'00 h'f0 figure 11.86 (2) example of mtu2s count er clearing caused by mtu2 flag setting source (2)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 603 of 1560 mar 18, 2011 sh7080 group 11.4.11 external pulse width measurement the pulse widths of up to three external input lines can be measured in channel 5. example of external pulse width measurement setting procedure: select counter clock external pulse width measurement select pulse width measuring conditions start count operation [1] use bits tpsc1 and tpsc0 in tcr to select the counter clock. [2] in tior, select the high level or low level for the pulse width measuring condition. [3] set bits cst in tstr to 1 to start count operation. notes: 1. do not set bits cmpclr5u, cmpclr5v, or cmpclr5w in tcntcmpclr to 1. 2. do not set bits tgie5u, tgie5v, or tgie5w in tier_5 to 1. 3. the value in tcnt is not captured in tgr. [1] [2] [3] figure 11.87 example of external pu lse width measurement setting procedure example of external pu lse width measurement: 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 0007 000a 000b tic5u tcntu_5 mp figure 11.88 example of external pulse width measurement (measuring high pulse width)
section 11 multi-function timer pulse unit 2 (mtu2) page 604 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.4.12 dead time compensation by measuring the delay of the output waveform and reflecting it to duty, the external pulse width measurement function can be used as the dead time compensation function while the complementary pwm is in operation. tdead tdelay upper arm signal lower arm signal inverter output detection signal dead time delay signal figure 11.89 delay in dead time in complementary pwm operation
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 605 of 1560 mar 18, 2011 sh7080 group example of dead time compensation setting procedure: figure 11.90 shows an example of dead time compensation setting procedure by using three counters in channel 5. tcnt_5 input capture occurs external pulse width measurement complementary pwm mode interrupt processing start count operation in channels 3 to 5 [3] [4] * [5] [1] [2] [1] place channels 3 and 4 in complementary pwm mode. for details, refer to section 11.4.8, complementary pwm mode. [2] specify the external pulse width measurement function for the target tior in channel 5. for details, refer to section 11.4.11, external pulse width measurement. [3] set bits cst3 and cst4 in tstr and bits cst5u, cst5v, and cst5w in tstr2 to 1 to start count operation. [4] when the capture condition specified in tior is satisfied, the tcnt_5 value is captured in tgr_5. [5] for u-phase dead time compensation, when an interrupt is generated at the crest (tgia_3) or trough (tciv_4) in complementary pwm mode, read the tgru_5 value, calculate the difference in time in tgrb_3, and write the corrected value to tgrd_3 in the interrupt processing. for the v phase and w phase, read the tgrv_5 and tgrw_5 values and write the corrected values to tgrc_4 and tgrd_4, respectively, in the same way as for u-phase compensation. the tcnt_5 value should be cleared through the tcntcmpclr setting or by software. notes: the pfc settings must be completed in advance. * as an interrupt flag is set under the capture condition specified in tior, do not enable interrupt requests in tier_5. figure 11.90 example of dead time compensation setting procedure mtu ch3/4 ch5 complementary pwm output dead time delay input inverter output monitor signals -+ u v w u v w u v w motor level conversion dc figure 11.91 example of moto r control circuit configuration
section 11 multi-function timer pulse unit 2 (mtu2) page 606 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.4.13 tcnt capture at crest and/or trough in complementary pwm operation the tcnt value is captured in tgr at either the crest or trough or at both the crest and trough during complementary pwm operation. the timing for capturing in tgr can be selected by tior. figure 11.92 is an operating example in which tcnt is used as a free-running counter without being cleared, and the tcnt value is captured in tgr at the specified timing (either crest or trough, or both crest and trough). tdead tdelay upper arm signal lower arm signal inverter output monitor signal dead time delay signal tgra_4 3e5b 3e5b 3f37 3f37 3faf 3faf 3de7 tcnt[15:0] tgr[15:0] up-count/down-count signal (udflg) 3de7 3ed3 3ed3 figure 11.92 tcnt capturing at crest and/or trough in complementary pwm operation
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 607 of 1560 mar 18, 2011 sh7080 group 11.5 interrupt sources 11.5.1 interrupt sources and priorities there are three kinds of mtu2 interrupt source; tgr input capture/compare match, tcnt overflow, and tcnt underflow. each interrupt source has its own status flag and enable/disabled bit, allowing the generation of interrupt request signals to be enabled or disabled individually. when an interrupt request is generated, the corresponding status flag in tsr is set to 1. if the corresponding enable/disable bit in tier is set to 1 at this time, an interrupt is requested. the interrupt request is cleared by cl earing the status flag to 0. relative channel priorities can be changed by the interrupt controller, however the priority order within a channel is fixed. for details, s ee section 6, interrupt controller (intc). table 11.57 lists the mtu2 interrupt sources.
section 11 multi-function timer pulse unit 2 (mtu2) page 608 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 11.57 mtu2 interrupts channel name interrupt source interrupt flag dmac activation dtc activation priority 0 tgia_0 tgra_0 input capture/compare match tgfa_0 possible possible high tgib_0 tgrb_0 input capture/compare match tgfb_0 not possible possible tgic_0 tgrc_0 input capture/compare match tgfc_0 not possible possible tgid_0 tgrd_0 input capture/compare match tgfd_0 not possible possible tciv_0 tcnt_0 overflow tcfv_0 not possible not possible tgie_0 tgre_0 compare match tgfe_0 not possible not possible tgif_0 tgrf_0 compare match tgff_0 not possible not possible 1 tgia_1 tgra_1 input capture/compare match tgfa_1 possible possible tgib_1 tgrb_1 input capture/compare match tgfb_1 not possible possible tciv_1 tcnt_1 overflow tcfv_1 not possible not possible tciu_1 tcnt_1 underflow tcfu_1 not possible not possible 2 tgia_2 tgra_2 input capture/compare match tgfa_2 possible possible tgib_2 tgrb_2 input capture/compare match tgfb_2 not possible possible tciv_2 tcnt_2 overflow tcfv_2 not possible not possible tciu_2 tcnt_2 underflow tcfu_2 not possible not possible 3 tgia_3 tgra_3 input capture/compare match tgfa_3 possible possible tgib_3 tgrb_3 input capture/compare match tgfb_3 not possible possible tgic_3 tgrc_3 input capture/compare match tgfc_3 not possible possible tgid_3 tgrd_3 input capture/compare match tgfd_3 not possible possible tciv_3 tcnt_3 overflow tcfv_3 not possible not possible 4 tgia_4 tgra_4 input capture/compare match tgfa_4 possible possible tgib_4 tgrb_4 input capture/compare match tgfb_4 not possible possible tgic_4 tgrc_4 input capture/compare match tgfc_4 not possible possible tgid_4 tgrd_4 input capture/compare match tgfd_4 not possible possible tciv_4 tcnt_4 overflow/underflow tcfv_4 not possible possible 5 tgiu_5 tgru_5 input capture/compare match tgfu_5 not possible possible tgiv_5 tgrv_5 input capture/compare match tgfv_5 not possible possible tgiw_5 tgrw_5 input capture/compare match tgfw_5 not possible possible low note: this table shows the initial state immediately after a reset. the relative channel priorities can be changed by the interrupt controller.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 609 of 1560 mar 18, 2011 sh7080 group input capture/compare match interrupt: an interrupt is requested if the tgie bit in tier is set to 1 when the tgf flag in tsr is set to 1 by the occurrence of a tgr input capture/compare match on a particular channel. the interrupt reques t is cleared by clearing the tgf flag to 0. the mtu2 has 21 input capture/compare match interrupts, six for channel 0, four each for channels 3 and 4, two each for channels 1 and 2, and thr ee for channel 5. the tgfe_0 and tgff_0 flags in channel 0 are not set by the occurrence of an input capture. overflow interrupt: an interrupt is requested if the tciev bit in tier is set to 1 when the tcfv flag in tsr is set to 1 by the occurren ce of tcnt overflow on a channel. the interrupt request is cleared by clearing the tcfv flag to 0. the mtu2 has five overflow interrupts, one for each channel. underflow interrupt: an interrupt is requested if the tcie u bit in tier is set to 1 when the tcfu flag in tsr is set to 1 by the occurrence of tcnt underf low on a channel. the interrupt request is cleared by clearing the tcfu flag to 0. the mtu2 has two underflow interrupts, one each for channels 1 and 2. 11.5.2 dtc/dmac activation dtc activation: the dtc can be activated by the tgr input capture/compare match interrupt in each channel or the overflow interrupt in channel 4. for details, see section 8, data transfer controller (dtc). a total of 20 mtu2 input capture/compare match interrupts and overflow interrupts can be used as dtc activation sources, four each for channels 0 and 3, two each for channels 1 and 2, five for channel 4, and three for channel 5. dmac activation: the dmac can be activated by the tgra input capture/compare match interrupt in each channel. for details, see section 10, direct memory access controller (dmac). in the mtu2, a total of five tgra input capture/compare match interrupts can be used as dmac activation sources, one each for channels 0 to 4. when the dmac is activated by the mtu2, the activation source is cleared at the point the dmac requests the internal bus mastership. ther efore, the request for dmac transfer may be kept pending for a certain period even after th e activation source is cleared depending on the internal bus state. to initiate burst transfer by the dmac using an mtu2 interrupt, setting of the bus function extending register (bscehr) is necessary. for details, see section 9.4.8, bus function extending register (bscehr).
section 11 multi-function timer pulse unit 2 (mtu2) page 610 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.5.3 a/d converter activation the a/d converter can be activated by one of the following three methods in the mtu2. table 11.58 shows the relationship between interrupt sources and a/d converter start request signals. a/d converter activation by tgra input capture/compare match or at tcnt_4 trough in complementary pwm mode: the a/d converter can be ac tivated by the occurrence of a tgra input capture/compare match in each ch annel. in addition, if complementary pwm operation is performed while the ttge2 bit in tier_4 is set to 1, the a/d converter can be activated at the trough of tcnt_4 count (tcnt_4 = h'0000). a/d converter start request signal trgan is issued to the a/d converter under either one of the following conditions. ? when the tgfa flag in tsr is set to 1 by the occurrence of a tgra input capture/compare match on a particular channel while the ttge bit in tier is set to 1 ? when the tcnt_4 count reaches the trough (tcnt_4 = h'0000) during complementary pwm operation while the ttge2 bit in tier_4 is set to 1 when either condition is satisfi ed, if a/d converter start si gnal trgan from the mtu2 is selected as the trigger in the a/d converter, a/d conversion will start. a/d converter activation by compa re match between tcnt_0 and tgre_0: the a/d converter can be activated by generating a/d converter start request signal trg0n when a compare match occurs between tcnt_0 and tgre_0 in channel 0. when the tgfe flag in tsr2_0 is set to 1 by the occurrence of a compare match between tcnt_0 and tgre_0 in channel 0 while the ttge2 bit in tier2_0 is set to 1, a/d converter start request tgr0n is issued to the a/d converter. if a/d converter start signal tgr0n from the mtu2 is selected as the trigger in the a/d converter, a/d conversion will start. a/d converter activation by a/d converter start request delaying function: the a/d converter can be activated by generating a/d co nverter start request signal trg4an or trg4bn when the tcnt_4 count matches the tadcora or tadcorb value if the tad4ae or tad4be bit in the a/d converter start request control register (tadcr) is set to 1. for details, refer to section 11.4.9, a/d converter start request delaying function. a/d conversion will start if a/d converter start signal trg4an from the mtu2 is selected as the trigger in the a/d converter when trg4an is generated or if trg4bn from the mtu2 is selected as the trigger in the a/d converter when trg4bn is generated.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 611 of 1560 mar 18, 2011 sh7080 group table 11.58 interrupt sources and a/d converter start request signals target registers interrupt source a/d converter start request signal tgra_0 and tcnt_0 tgra_1 and tcnt_1 tgra_2 and tcnt_2 tgra_3 and tcnt_3 tgra_4 and tcnt_4 input capture/compare match tcnt_4 tcnt_4 trough in complementary pwm mode trgan tgre_0 and tcnt_0 compare match trg0n tadcora and tcnt_4 trg4an tadcorb and tcnt_4 trg4bn
section 11 multi-function timer pulse unit 2 (mtu2) page 612 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.6 operation timing 11.6.1 input/output timing tcnt count timing: figures 11.93 and 11.94 show tcnt count timing in internal clock operation, and figure 11.95 shows tcnt count timing in external clock operation (normal mode), and figure 11.96 shows tcnt count timing in external clock operation (phase counting mode). tcnt tcnt input clock internal clock mp falling edge rising edge n - 1 n n + 1 figure 11.93 count timing in internal clock operation (channels 0 to 4) tcnt tcnt input clock internal clock mp rising edge n - 1 n figure 11.94 count timing in internal clock operation (channel 5) mp tcnt tcnt input clock external clock falling edge rising edge n - 1 n n + 1 figure 11.95 count timing in external clock operation (channels 0 to 4)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 613 of 1560 mar 18, 2011 sh7080 group mp external clock tcnt input clock tcnt rising edge falling edge n - 1 n n - 1 figure 11.96 count timing in external clock operation (phase counting mode) output compare output timing: a compare match signal is generated in the final state in which tcnt and tgr match (the point at which the count value matched by tcnt is updated). when a compare match signal is generated, the output value set in tior is output at the output compare output pin (tioc pin). after a match between tcnt and tgr, the compare match signal is not generated until the tc nt input clock is generated. figure 11.97 shows output compare output timing (normal mode and pwm mode) and figure 11.98 shows output compare output timing (complementary pwm mode and reset synchronous pwm mode). tgr tcnt tcnt input clock n n n + 1 compare match signal tioc pin mp figure 11.97 output compare output timing (normal mode/pwm mode)
section 11 multi-function timer pulse unit 2 (mtu2) page 614 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tcnt input clock tcnt n n + 1 tgr compare match signal tioc pin n mp figure 11.98 output compare output timing (complementary pwm mode/reset synchronous pwm mode) input capture signal timing: figure 11.99 shows input capture signal timing. tcnt input capture input n n + 1 n + 2 n n + 2 tgr input capture signal mp figure 11.99 input capture input signal timing
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 615 of 1560 mar 18, 2011 sh7080 group timing for counter clearing by compare match/input capture: figures 11.100 and 11.101 show the timing when counter clearing on compare match is specified, and figure 11.102 shows the timing when counter clearing on input capture is specified. mp tcnt counter clear signal compare match signal tgr n n h'0000 figure 11.100 counter clear timing (compare match) (channels 0 to 4) mp tcnt counter clear signal compare match signal tgr n n - 1 h'0000 figure 11.101 counter clear timing (compare match) (channel 5) tcnt counter clear signal input capture signal tgr n h'0000 n mp figure 11.102 counter clear timing (input capture) (channels 0 to 5)
section 11 multi-function timer pulse unit 2 (mtu2) page 616 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group buffer operation timing: figures 11.103 to 11.105 show the timing in buffer operation. tgra, tgrb compare match buffer signal tcnt tgrc, tgrd n n n n n + 1 mp figure 11.103 buffer operation timing (compare match) tgra, tgrb tcnt input capture signal tgrc, tgrd n n n n + 1 n n n + 1 mp figure 11.104 buffer operation timing (input capture)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 617 of 1560 mar 18, 2011 sh7080 group tgra, tgrb, tgre tcnt clear signal buffer transfer signal tcnt mp tgrc, tgrd, tgrf n n n n h'0000 figure 11.105 buffer transfer timing (when tcnt cleared) buffer transfer timing (complementary pwm mode) : figures 11.106 to 11.108 show the buffer transfer timing in complementary pwm mode. buffer register tgrd_4 write signal temporary register transfer signal tcnts mp temporary register n n n n h'0000 figure 11.106 transfer timing from buffer register to temporary register (tcnts stop)
section 11 multi-function timer pulse unit 2 (mtu2) page 618 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group buffer register tgrd_4 write signal tcnts mp temporary register n n n n p - x p h'0000 figure 11.107 transfer timing from buffer register to temporary register (tcnts operating) temporary register buffer transfer signal tcnts mp compare register n n n p - 1 p h'0000 figure 11.108 transfer timing from temporary register to compare register
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 619 of 1560 mar 18, 2011 sh7080 group 11.6.2 interrupt signal timing tgf flag setting timing in case of compare match: figures 11.109 and 11.110 show the timing for setting of the tgf flag in tsr on compare match, and tgi interrupt request signal timing. tgr tcnt tcnt input clock n n n + 1 compare match signal tgf flag tgi interrupt mp figure 11.109 tgi interrupt timing (compare match) (channels 0 to 4) tgr tcnt tcnt input clock n n - 1 n compare match signal tgf flag tgi interrupt mp figure 11.110 tgi interrupt timing (compare match) (channel 5)
section 11 multi-function timer pulse unit 2 (mtu2) page 620 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tgf flag setting timing in case of input capture: figures 11.111 and 11.112 show the timing for setting of the tgf flag in tsr on input capture, and tgi interrupt request signal timing. tgr tcnt input capture signal n n tgf flag tgi interrupt mp , p figure 11.111 tgi interrupt timing (input capture) (channels 0 to 4) tgr tcnt input capture signal n n tgf flag tgi interrupt mp , p figure 11.112 tgi interrupt timing (input capture) (channel 5)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 621 of 1560 mar 18, 2011 sh7080 group tcfv flag/tcfu flag setting timing: figure 11.113 shows the timing for setting of the tcfv flag in tsr on overflow, and tciv interrupt request signal timing. figure 11.114 shows the timing for setting of the tcfu flag in tsr on underflow, and tciu interrupt request signal timing. overflow signal tcnt (overflow) tcnt input clock h'ffff h'0000 tcfv flag tciv interrupt mp , p figure 11.113 tciv interrupt setting timing underflow signal tcnt (underflow) tcnt input clock h'0000 h'ffff tcfu flag tciu interrupt mp , p figure 11.114 tciu interrupt setting timing
section 11 multi-function timer pulse unit 2 (mtu2) page 622 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group status flag clearing timing: after a status flag is read as 1 by the cpu, it is cleared by writing 0 to it. when the dtc/dmac is activated, the fl ag is cleared automatically. figures 11.115 and 11.116 show the timing for status flag clearing by the cpu, and figures 11.117 to 11.119 show the timing for status flag clearing by the dtc/dmac. status flag write signal address tsr address interrupt request signal tsr write cycle t1 t2 mp , p figure 11.115 timing for status flag clearing by cpu (channels 0 to 4) status flag write signal address tsr address interrupt request signal tsr write cycle t1 t2 mp , p figure 11.116 timing for status flag clearing by cpu (channel 5)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 623 of 1560 mar 18, 2011 sh7080 group interrupt request signal flag clear signal status flag address source address dtc read cycle destination address dtc write cycle mp , p , b figure 11.117 timing for status flag clearing by dtc activation (channels 0 to 4) interrupt request signal flag clear signal status flag address source address dtc read cycle destination address dtc write cycle mp , p , b figure 11.118 timing for status flag clearing by dtc activation (channel 5) interrupt request signal flag clear signal status flag address source address dmac read cycle destination address dmac write cycle mp , p , b figure 11.119 timing for status flag clearing by dmac activation
section 11 multi-function timer pulse unit 2 (mtu2) page 624 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.7 usage notes 11.7.1 module standby mode setting mtu2 operation can be disabled or enabled using the standby control register. the initial setting is for mtu2 operation to be halted. register access is enabled by clearing module standby mode. for details, refer to section 26, power-down modes. 11.7.2 input clock restrictions the input clock pulse width must be at least 1.5 states in the case of single-edge detection, and at least 2.5 states in the case of both-edge detecti on. the mtu2 will not operate properly at narrower pulse widths. in phase counting mode, the phase difference and overlap between the two input clocks must be at least 1.5 states, and the pulse width must be at least 2.5 states. figure 11.120 shows the input clock conditions in phase counting mode. overlap phase differ- ence phase differ- ence overlap tclka (tclkc) tclkb (tclkd) pulse width pulse width pulse width pulse width notes: phase difference and overlap pulse width : 1.5 states or more : 2.5 states or more figure 11.120 phase differ ence, overlap, and pulse widt h in phase counting mode
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 625 of 1560 mar 18, 2011 sh7080 group 11.7.3 caution on period setting when counter clearing on compare match is set, tcnt is cleared in the final state in which it matches the tgr value (the point at which the count value matched by tcnt is updated). consequently, the actual counter frequency is given by the following formula: ? channels 0 to 4 f = mp (n + 1) ? channel 5 f = mp n where f: counter frequency mp : mtu2 peripheral clock operating frequency n: tgr set value 11.7.4 contention between tcnt write and clear operations if the counter clear signal is generated in the t2 state of a tcnt write cycle, tcnt clearing takes precedence and the tcnt write is not performed. figure 11.121 shows the timing in this case. counter clear signal write signal address tcnt address tcnt tcnt write cycle t1 t2 n h'0000 mp counter clear signal write signal address tcnt address tcnt tcnt write cycle t1 t2 n h'0000 mp figure 11.121 contention between tcnt write and clear operations
section 11 multi-function timer pulse unit 2 (mtu2) page 626 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.7.5 contention between tcnt wr ite and increment operations if incrementing occurs in the t2 state of a tcnt write cycle, the tcnt write takes precedence and tcnt is not incremented. figure 11.122 shows the timing in this case. tcnt input clock write signal address tcnt address tcnt tcnt write cycle t1 t2 nm tcnt write data mp figure 11.122 contention between tcnt write and increment operations
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 627 of 1560 mar 18, 2011 sh7080 group 11.7.6 contention between tgr write and compare match if a compare match occurs in the t2 state of a tg r write cycle, the tgr write is executed and the compare match signal is also generated. figure 11.123 shows the timing in this case. compare match signal write signal address tgr address tcnt tgr write cycle t1 t2 nm tgr write data tgr n n + 1 mp figure 11.123 contention betw een tgr write and compare match
section 11 multi-function timer pulse unit 2 (mtu2) page 628 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.7.7 contention between buffer regi ster write and compare match if a compare match occurs in the t2 state of a tgr write cycle, the data that is transferred to tgr by the buffer operation is the data before write. figure 11.124 shows the timing in this case. address write signal compare match signal compare match buffer signal tgr write cycle t1 t2 buffer register address n n m buffer register write data buffer register tgr mp figure 11.124 contention between bu ffer register write and compare match
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 629 of 1560 mar 18, 2011 sh7080 group 11.7.8 contention between buffer re gister write and tcnt clear when the buffer transfer timing is set at the tc nt clear by the buffer transfer mode register (tbtm), if tcnt clear occurs in th e t2 state of a tgr write cycle, the data that is transferred to tgr by the buffer operation is the data before write. figure 11.125 shows the timing in this case. address write signal tcnt clear signal buffer transfer signal tgr write cycle t1 t2 buffer register address n n m buffer register write data buffer register tgr mp figure 11.125 contention between buffer register write and tcnt clear
section 11 multi-function timer pulse unit 2 (mtu2) page 630 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.7.9 contention between tgr read and input capture if an input capture signal is generated in the t1 state of a tgr read cycle, the data that is read will be the data in the buffer before input capture transfer for channels 0 to 4, and the data after input capture transfer for channel 5. figures 11.126 and 11.127 show the timing in this case. input capture signal read signal address tgr read cycle t1 t2 tgr internal data bus tgr address mp n n m figure 11.126 contention between tgr read and input capture (channels 0 to 4) input capture signal read signal address tgr read cycle t1 t2 tgr internal data bus tgr address mp m nm figure 11.127 contention between tgr read and input capture (channel 5)
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 631 of 1560 mar 18, 2011 sh7080 group 11.7.10 contention between tgr write and input capture if an input capture signal is generated in the t2 state of a tgr write cycle, the input capture operation takes precedence and the write to tgr is not performed for channels 0 to 4. for channel 5, write to tgr is performed and th e input capture signal is generated. figures 11.128 and 11.129 show the timing in this case. input capture signal write signal address tcnt tgr write cycle t1 t2 m tgr m tgr address mp figure 11.128 contention between tgr write and input capture (channels 0 to 4) input capture signal write signal address tcnt tgr write cycle t1 t2 n tgr m tgr address mp tgr write data figure 11.129 contention between tgr write and input capture (channel 5)
section 11 multi-function timer pulse unit 2 (mtu2) page 632 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.7.11 contention between buffer regi ster write and input capture if an input capture signal is generated in the t2 state of a buffer register write cycle, the buffer operation takes precedence and the write to the buffer register is not performed. figure 11.130 shows the timing in this case. input capture signal write signal address tcnt buffer register write cycle t1 t2 n tgr n m m buffer register buffer register address mp figure 11.130 contention between buffer register write and input capture 11.7.12 tcnt_2 write and overflow/ underflow contention in cascade connection with timer counters tcnt_1 and tcnt_2 in a cascade connection, when a contention occurs during tcnt_1 count (during a tcnt_2 overflow/underflow) in the t2 state of the tcnt_2 write cycle, the write to tcnt_2 is conducted, and the tcnt_1 count signal is disabled. at this point, if there is match with tgra_1 and the tcnt_1 value, a compare signal is issued. furthermore, when the tcnt_1 count clock is selected as the input capture source of channel 0, tgra_0 to tgrd_0 carry out the input capture operation. in addition, when the compare match/input capture is selected as the input capture source of tgrb_1, tgrb_1 carries out input capture operation. the timing is shown in figure 11.131. for cascade connections, be sure to synchronize settings for channels 1 and 2 when setting tcnt clearing.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 633 of 1560 mar 18, 2011 sh7080 group t1 t2 h'fffe h'ffff n n + 1 h'ffff m m n p qp m disabled tcnt_2 write data tcnt_2 address tcnt write cycle address write signal tcnt_2 tgra_2 to tgrb_2 ch2 compare- match signal a/b tcnt_1 input clock tcnt_1 tgra_1 ch1 compare- match signal a tgrb_1 ch1 input capture signal b tcnt_0 tgra_0 to tgrd_0 ch0 input capture signal a to d mp figure 11.131 tcnt_2 write and overflow/underflow contention with cascade connection
section 11 multi-function timer pulse unit 2 (mtu2) page 634 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.7.13 counter value during complementary pwm mode stop when counting operation is suspended with tcnt_3 and tcnt_4 in complementary pwm mode, tcnt_3 has the timer dead time register (tddr) value, and tcnt_4 is held at h'0000. when restarting complementary pwm mode, counting begins automatically from the initialized state. this explanatory diagram is shown in figure 11.132. when counting begins in another operating mode , be sure that tcnt_3 and tcnt_4 are set to the initial values. tgra_3 tcdr tddr h'0000 tcnt_3 tcnt_4 complementary pwm mode operation complementary pwm mode operation counter operation stop complementary pmw restart figure 11.132 counter value during complementary pwm mode stop 11.7.14 buffer operation setting in complementary pwm mode in complementary pwm mode, conduct rewrites by buffer operation for the pwm cycle setting register (tgra_3), timer cycle data register (tcdr), and duty setting registers (tgrb_3, tgra_4, and tgrb_4). in complementary pwm mode, channel 3 and channel 4 buffers operate in accordance with bit settings bfa and bfb of tmdr_3. when tmdr_3's bfa bit is set to 1, tgrc_3 functions as a buffer register for tgra_3. at the same time, tgrc_4 functions as the buffer register for tgra_4, and tcbr functions as the tcdr's buffer register.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 635 of 1560 mar 18, 2011 sh7080 group 11.7.15 reset sync pwm mode buffer operation and compare match flag when setting buffer operation for reset sync pwm mode, set the bfa and bfb bits in tmdr_4 to 0. the tioc4c pin will be unable to produce its waveform output if the bfa bit in tmdr_4 is set to 1. in reset sync pwm mode, the channel 3 and channe l 4 buffers operate in accordance with the bfa and bfb bit settings of tmdr_3. for example, if the bfa bit in tmdr_3 is set to 1, tgrc_3 functions as the buffer register for tgra_3. at the same time, tgrc_4 functions as the buffer register for tgra_4. the tgfc bit and tgfd bit in tsr_3 and tsr_4 are not set when tgrc_3 and tgrd_3 are operating as buffer registers. figure 11.133 shows an example of operations for tgr_3, tgr_4, tioc3, and tioc4, with tmdr_3's bfa and bfb bits set to 1, and tmdr_4's bfa and bfb bits set to 0. tgra_3 tgrc_3 tgrb_3, tgra_4, tgrb_4 tgrd_3, tgrc_4, tgrd_4 h'0000 tioc3a tioc3b tioc3d tioc4a tioc4c tioc4b tioc4d tgfc tgfd tgra_3, tgrc_3 tgrb_3, tgrd_3, tgra_4, tgrc_4, tgrb_4, tgrd_4 buffer transfer with compare match a3 tcnt3 not set not set point a point b figure 11.133 buffer operation and compare-match flags in reset synchronous pwm mode
section 11 multi-function timer pulse unit 2 (mtu2) page 636 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.7.16 overflow flags in reset synchronous pwm mode when set to reset synchronous pwm mode, tcnt_3 and tcnt_4 start counting when the cst3 bit of tstr is set to 1. at this point, tcnt_4's count clock source and count edge obey the tcr_3 setting. in reset synchronous pwm mode, with cycle register tgra_3's set value at h'ffff, when specifying tgr3a compare-match for the counter clear source, tcnt_3 and tcnt_4 count up to h'ffff, then a compare-match occurs with tgra_3, and tcnt_3 and tcnt_4 are both cleared. at this point, tsr's overfl ow flag tcfv bit is not set. figure 11.134 shows a tcfv bit operation example in reset synchronous pwm mode with a set value for cycle register tgra_3 of h'ffff, when a tgra_3 compare-match has been specified without synchronous setting fo r the counter clear source. tgra_3 (h'ffff) h'0000 tcfv_3 tcfv_4 tcnt_3 = tcnt_4 counter cleared by compare match 3a not set not set figure 11.134 reset synchronous pwm mode overflow flag
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 637 of 1560 mar 18, 2011 sh7080 group 11.7.17 contention between overflow/u nderflow and co unter clearing if overflow/underflow and counter clearing occur simultaneously, the tcfv/tcfu flag in tsr is not set and tcnt clearing takes precedence. figure 11.135 shows the operation timing when a tg r compare match is specified as the clearing source, and when h'ffff is set in tgr. counter clear signal tcnt tcnt input clock h'ffff h'0000 tgf tcfv disabled mp figure 11.135 contention betw een overflow and counter clearing
section 11 multi-function timer pulse unit 2 (mtu2) page 638 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.7.18 contention between tcnt wr ite and overflo w/underflow if there is an up-count or down-count in the t2 state of a tcnt write cycle, and overflow/underflow occurs, the tcnt write takes precedence and the tcfv/t cfu flag in tsr is not set. figure 11.136 shows the operation timing when there is contention between tcnt write and overflow. disabled write signal address tcnt address tcnt tcnt write cycle t1 t2 h'ffff m tcnt write data tcfv flag mp figure 11.136 contention be tween tcnt write and overflow 11.7.19 cautions on transition from normal operation or pwm mode 1 to reset- synchronized pwm mode when making a transition from channel 3 or 4 normal operation or pwm mode 1 to reset- synchronized pwm mode, if the counter is halted with the output pins (tioc3b, tioc3d, tioc4a, tioc4c, tioc4b, tioc4d) in the high-lev el state, followed by the transition to reset- synchronized pwm mode and operation in that mode, the initial pin output will not be correct. when making a transition from normal operation to reset-synchronized pwm mode, write h'11 to registers tiorh_3, tiorl_3, tiorh_4, and tior l_4 to initialize the output pins to low level output, then set an initial register value of h'00 before making the mode transition. when making a transition from pwm mode 1 to reset-synchronized pwm mode, first switch to normal operation, then initialize the output pins to low level output and set an initial register value of h'00 before making the transition to reset-synchronized pwm mode.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 639 of 1560 mar 18, 2011 sh7080 group 11.7.20 output level in complementary pwm mo de and reset-synchronized pwm mode when channels 3 and 4 are in complementary pwm mode or reset-synchronized pwm mode, the pwm waveform output level is set with the olsp and olsn bits in the timer output control register (tocr). in the case of complementary pwm mode or reset-synchronized pwm mode, tior should be set to h'00. 11.7.21 interrupts in module standby mode if module standby mode is entered when an interrupt has been requested, it will not be possible to clear the cpu interrupt source or the dtc/dmac activation source. interrupts should therefore be disabled before entering module standby mode. 11.7.22 simultaneous capture of tcnt_1 and tcnt_2 in cascade connection when timer counters 1 and 2 (tcnt_1 and tcnt_2) are operated as a 32-bit counter in cascade connection, the cascade counter value cannot be captured successfully even if input-capture input is simultaneously done to tioc1a and tioc2a or to tioc1b and tioc2b. this is because the input timing of tioc1a and tioc2a or of tioc1b and tioc2b may not be the same when external input-capture signals to be input into tcnt_1 and tcnt_2 are taken in synchronization with the internal clock. for example, tcnt_1 (the counter for upper 16 bits) does not capture the count-up value by overflow from tcnt_2 (the counter for lower 16 bits) but captures the count value before the count-up. in this case, the values of tcnt_1 = h'fff1 and tcnt_2 = h'0000 should be transferred to tgra_1 and tgra_2 or to tgrb_1 and tgrb_2, but the values of tcnt_1 = h'fff0 and tcnt _2 = h'0000 are erroneously transferred. the mtu2 has a new function that allows simultaneous capture of tcnt_1 and tcnt_2 with a single input-capture input as the trigger. this function allows reading of the 32-bit counter such that tcnt_1 and tcnt_2 are captured at the same time. for details, see section, 11.3.8, timer input capture control register (ticcr).
section 11 multi-function timer pulse unit 2 (mtu2) page 640 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.7.23 notes on output waveform control during synchronous counter clearing in complementary pwm mode in complementary pwm mode, when output waveform control during synchronous counter clearing is enabled (wre in the twcr register set to 1), the following problems may occur when condition (1) or condition (2), below, is satisfied. ? dead time for the pwm output pins may be too short (or nonexistent). ? active-level output from the pwm negative-phase pins may occur outside the correct active- level output interval condition (1): when synchronous clearing occurs in the pwm output dead time interval within initial output suppression interval (10) (figure 11.137). condition (2): when synchronous clearing occurs w ithin initial output suppression interval (10) or (11) and tgrb_3 tddr, tgra_4 tddr, or tgrb_4 tddr is true (figure 11.138). tcnt3 tcnt4 tddr tgra_3 tgr tddr 0 synchronous clearing dead time note: pwm output is low-active. pwm output (positive phase) pwm output (negative phase) shortened dead time initial output suppression tb interval tb interval (10) (10) (11) (11) figure 11.137 condition (1) synchronous clearing example
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 641 of 1560 mar 18, 2011 sh7080 group tcnt3 tcnt4 tgra_3 tgr tddr 0 synchronous clearing dead time note: pwm output is low-active. pwm output (positive phase) pwm output (negative phase) initial output suppression tb interval tb interval (10) (10) (11) (11) active-level output occurs at synchronous clearing even though no active-level output interval has been set. nonexistent dead time figure 10.138 condition (2) synchronous clearing example the following workaround can be used to avoid these problems. when using synchronous clearing, make sure to set compare registers tgrb_3, tgra_4, and tgrb_4 to a value twice or more the setting of dead time data register tddr.
section 11 multi-function timer pulse unit 2 (mtu2) page 642 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.8 mtu2 output pin initialization 11.8.1 operating modes the mtu2 has the following six operating modes. waveform output is possible in all of these modes. ? normal mode (channels 0 to 4) ? pwm mode 1 (channels 0 to 4) ? pwm mode 2 (channels 0 to 2) ? phase counting modes 1 to 4 (channels 1 and 2) ? complementary pwm mode (channels 3 and 4) ? reset-synchronized pwm mode (channels 3 and 4) the mtu2 output pin initialization method for each of these modes is described in this section. 11.8.2 reset start operation the mtu2 output pins (tioc*) are initialized low by a reset and in standby mode. since mtu2 pin function selection is performed by the pin function controller (pfc), when the pfc is set, the mtu2 pin states at that point are output to the ports. when mtu2 output is selected by the pfc immediately after a reset, the mtu2 output initial level, low, is output directly at the port. when the active level is low, the syst em will operate at this point, a nd therefore the pfc setting should be made after initialization of the mtu2 output pins is completed. note: channel number and port notation are substituted for *.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 643 of 1560 mar 18, 2011 sh7080 group 11.8.3 operation in case of re-setting du e to error during operation, etc. if an error occurs during mtu2 operation, mtu2 output should be cut by the system. cutoff is performed by switching the pin output to port output with the pfc and outputting the inverse of the active level. for large-current pins, output can also be cut by hardware, using port output enable (poe). the pin initialization procedures for re-setting due to an error during operation, etc., and the procedures for restarting in a different mode after re-setting, are shown below. the mtu2 has six operating modes, as stat ed above. there are thus 36 mode transition combinations, but some transitions are not available with certain channel and mode combinations. possible mode transition combinations are shown in table 11.59. table 11.59 mode transition combinations after before normal pwm1 pwm2 pcm cpwm rpwm normal (1) (2) (3) (4) (5) (6) pwm1 (7) (8) (9) (10) (11) (12) pwm2 (13) (14) (15) (16) none none pcm (17) (18) (19) (20) none none cpwm (21) (22) none none (23) (24) (25) rpwm (26) (27) none none (28) (29) [legend] normal: normal mode pwm1: pwm mode 1 pwm2: pwm mode 2 pcm: phase counting modes 1 to 4 cpwm: complementary pwm mode rpwm: reset-synchronized pwm mode
section 11 multi-function timer pulse unit 2 (mtu2) page 644 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 11.8.4 overview of initialization procedures and mode transitions in case of error during operation, etc. ? when making a transition to a mode (normal, pwm1, pwm2, pcm) in which the pin output level is selected by the timer i/o control register (tior) setting, initialize the pins by means of a tior setting. ? in pwm mode 1, since a waveform is not output to the tioc*b (tioc *d) pin, setting tior will not initialize the pins. if initialization is required, carry it out in normal mode, then switch to pwm mode 1. ? in pwm mode 2, since a waveform is not output to the cycle register pin, setting tior will not initialize the pins. if initialization is required, carry it out in normal mode, then switch to pwm mode 2. ? in normal mode or pwm mode 2, if tgrc and tgrd operate as buffer registers, setting tior will not initialize the buffer register pins. if initialization is required, clear buffer mode, carry out initialization, then set buffer mode again. ? in pwm mode 1, if either tgrc or tgrd operates as a buffer register, setting tior will not initialize the tgrc pin. to initialize the tgrc pin, clear buffer mode, carry out initialization, then set buffer mode again. ? when making a transition to a mode (cpwm, rpwm) in which the pin output level is selected by the timer output control register (tocr) setting, switch to normal mode and perform initialization with tior, then restore tior to its initial value, and temporarily disable channel 3 and 4 output with the timer output mast er enable register (t oer). then operate the unit in accordance with the mode setting procedure (tocr setting, tmdr setting, toer setting). note: channel number is substituted for * indicated in this article.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 645 of 1560 mar 18, 2011 sh7080 group pin initialization procedures are described below for the numbered combinations in table 11.59. the active level is assumed to be low. operation when error occurs during normal mode operation, and operation is restarted in normal mode: figure 11.139 shows an explanatory diag ram of the case where an error occurs in normal mode and operation is restar ted in normal mode after re-setting. 1 reset 2 tmdr (normal) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (normal) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen n = 0 to 15 hi-z hi-z figure 11.139 error occu rrence in normal mode, r ecovery in normal mode 1. after a reset, mtu2 output is low a nd ports are in the high-impedance state. 2. after a reset, the tmdr setting is for normal mode. 3. for channels 3 and 4, enable output with toer before initializing the pins with tior. 4. initialize the pins with tior. (the example shows initial high output, with low output on compare-match occurrence.) 5. set mtu2 output with the pfc. 6. the count operation is started by tstr. 7. output goes low on compare-match occurrence. 8. an error occurs. 9. set port output with the pfc and output the inverse of the active level. 10. the count operation is stopped by tstr. 11. not necessary when restarting in normal mode. 12. initialize the pins with tior. 13. set mtu2 output with the pfc. 14. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 646 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during normal mode operation, and operation is restarted in pwm mode 1: figure 11.140 shows an explanatory diag ram of the case where an error occurs in normal mode and operation is restar ted in pwm mode 1 after re-setting. 1 reset 2 tmdr (normal) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (pwm1) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (tioc * b) n = 0 to 15 hi-z hi-z figure 11.140 error occurrence in no rmal mode, recovery in pwm mode 1 1 to 10 are the same as in figure 11.139. 11. set pwm mode 1. 12. initialize the pins with tior. (in pwm mode 1, the tioc*b side is not initialized. if initialization is required, initialize in normal mode, then switch to pwm mode 1.) 13. set mtu2 output with the pfc. 14. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 647 of 1560 mar 18, 2011 sh7080 group operation when error occurs during normal mode operation, and operation is restarted in pwm mode 2: figure 11.141 shows an explanatory diag ram of the case where an error occurs in normal mode and operation is restar ted in pwm mode 2 after re-setting. 1 reset 2 tmdr (normal) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (pwm2) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (cycle register) n = 0 to 15 hi-z hi-z figure 11.141 error occurrence in no rmal mode, recovery in pwm mode 2 1 to 10 are the same as in figure 11.139. 11. set pwm mode 2. 12. initialize the pins with tior. (in pwm mode 2, the cycle register pins are not initialized. if initialization is required, initialize in normal mode, then switch to pwm mode 2.) 13. set mtu2 output with the pfc. 14. operation is restarted by tstr. note: pwm mode 2 can only be set for channels 0 to 2, and therefore toer setting is not necessary.
section 11 multi-function timer pulse unit 2 (mtu2) page 648 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during normal mode operation, and operation is restarted in phase counting mode: figure 11.142 shows an explanatory diagram of the case where an error occurs in normal mode and operation is rest arted in phase counting mode after re-setting. 1 reset 2 tmdr (normal) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (pcm) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen n = 0 to 15 hi-z hi-z figure 11.142 error occur rence in normal mode, recov ery in phase counting mode 1 to 10 are the same as in figure 11.139. 11. set phase counting mode. 12. initialize the pins with tior. 13. set mtu2 output with the pfc. 14. operation is restarted by tstr. note: phase counting mode can only be set for channels 1 and 2, and therefore toer setting is not necessary.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 649 of 1560 mar 18, 2011 sh7080 group operation when error occurs during normal mode operation, and operation is restarted in complementary pwm mode: figure 11.143 shows an explanat ory diagram of the case where an error occurs in normal mode and operation is restarted in complementary pwm mode after re- setting. 1 reset 2 tmdr (normal) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tior (0 init 0 out) 12 tior ( disabled ) 13 toer (0) 14 tocr 15 tmdr (cpwm) 16 toer (1) 17 pfc (mtu2) 18 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 hi-z hi-z hi-z figure 11.143 error occu rrence in normal mode, recovery in complementary pwm mode 1 to 10 are the same as in figure 11.139. 11. initialize the normal mode waveform generation section with tior. 12. disable operation of the normal mode waveform generation section with tior. 13. disable channel 3 and 4 output with toer. 14. select the complementary pwm output level and cyclic output enabling/disabling with tocr. 15. set complementary pwm. 16. enable channel 3 and 4 output with toer. 17. set mtu2 output with the pfc. 18. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 650 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during normal mode operation, and operation is restarted in reset-synchronized pwm mode: figure 11.144 shows an explanatory diagram of the case where an error occurs in normal mode and operation is restarted in reset-synchronized pwm mode after re-setting. 1 reset 2 tmdr (normal) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tior (0 init 0 out) 12 tior ( disabled ) 13 toer (0) 14 tocr 15 tmdr (rpwm) 16 toer (1) 17 pfc (mtu2) 18 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 hi-z hi-z hi-z figure 11.144 error occu rrence in normal mode, recovery in reset-synchronized pwm mode 1 to 13 are the same as in figure 11.139. 14. select the reset-synchronized pwm output level and cyclic output enabling/disabling with tocr. 15. set reset-synchronized pwm. 16. enable channel 3 and 4 output with toer. 17. set mtu2 output with the pfc. 18. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 651 of 1560 mar 18, 2011 sh7080 group operation when error occurs during pwm mode 1 operation, and operation is restarted in normal mode: figure 11.145 shows an explanatory diagra m of the case where an error occurs in pwm mode 1 and operation is restarted in normal mode after re-setting. 1 reset 2 tmdr (pwm1) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (normal) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (tioc * b) n = 0 to 15 hi-z hi-z figure 11.145 error occu rrence in pwm mode 1, r ecovery in normal mode 1. after a reset, mtu2 output is low a nd ports are in the high-impedance state. 2. set pwm mode 1. 3. for channels 3 and 4, enable output with toer before initializing the pins with tior. 4. initialize the pins with tior. (the example shows initial high output, with low output on compare-match occurrence. in pwm mode 1, the tioc*b side is not initialized.) 5. set mtu2 output with the pfc. 6. the count operation is started by tstr. 7. output goes low on compare-match occurrence. 8. an error occurs. 9. set port output with the pfc and output the inverse of the active level. 10. the count operation is stopped by tstr. 11. set normal mode. 12. initialize the pins with tior. 13. set mtu2 output with the pfc. 14. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 652 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during pwm mode 1 operation, and operation is restarted in pwm mode 1: figure 11.146 shows an explanatory diag ram of the case where an error occurs in pwm mode 1 and operation is restarted in pwm mode 1 after re-setting. 1 reset 2 tmdr (pwm1) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (pwm1) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (tioc * b) not initialized (tioc * b) n = 0 to 15 hi-z hi-z figure 11.146 error occu rrence in pwm mode 1, recovery in pwm mode 1 1 to 10 are the same as in figure 11.145. 11. not necessary when restarting in pwm mode 1. 12. initialize the pins with tior. (in pwm mode 1, the tioc*b side is not initialized.) 13. set mtu2 output with the pfc. 14. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 653 of 1560 mar 18, 2011 sh7080 group operation when error occurs during pwm mode 1 operation, and operation is restarted in pwm mode 2: figure 11.147 shows an explanatory diag ram of the case where an error occurs in pwm mode 1 and operation is restarted in pwm mode 2 after re-setting. 1 reset 2 tmdr (pwm1) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (pwm2) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (tioc * b) not initialized (cycle register) n = 0 to 15 hi-z hi-z figure 11.147 error occu rrence in pwm mode 1, recovery in pwm mode 2 1 to 10 are the same as in figure 11.145. 11. set pwm mode 2. 12. initialize the pins with tior. (in pwm mode 2, the cycle register pins are not initialized.) 13. set mtu2 output with the pfc. 14. operation is restarted by tstr. note: pwm mode 2 can only be set for channels 0 to 2, and therefore toer setting is not necessary.
section 11 multi-function timer pulse unit 2 (mtu2) page 654 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during pwm mode 1 operation, and operation is restarted in phase counting mode: figure 11.148 shows an explanatory diagram of the case where an error occurs in pwm mode 1 and operation is restarted in phase counting mode after re-setting. 1 reset 2 tmdr (pwm1) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (pcm) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (tioc * b) n = 0 to 15 hi-z hi-z figure 11.148 error occur rence in pwm mode 1, recov ery in phase counting mode 1 to 10 are the same as in figure 11.145. 11. set phase counting mode. 12. initialize the pins with tior. 13. set mtu2 output with the pfc. 14. operation is restarted by tstr. note: phase counting mode can only be set for channels 1 and 2, and therefore toer setting is not necessary.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 655 of 1560 mar 18, 2011 sh7080 group operation when error occurs during pwm mode 1 operation, and operation is restarted in complementary pwm mode: figure 11.149 shows an explanat ory diagram of the case where an error occurs in pwm mode 1 and operation is restarted in complementary pwm mode after re- setting. 1 reset 2 tmdr (pwm1) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (normal) 12 tior (0 init 0 out) 13 tior ( disabled ) 14 toer (0) 15 tocr 16 tmdr (cpwm) 17 toer (1) 18 pfc (mtu2) 19 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 not initialized (tioc3b) not initialized (tioc3d) hi-z hi-z hi-z figure 11.149 error occu rrence in pwm mode 1, recovery in complementary pwm mode 1 to 10 are the same as in figure 11.145. 11. set normal mode for initialization of the normal mode waveform generation section. 12. initialize the pwm mode 1 waveform generation section with tior. 13. disable operation of the pwm mode 1 waveform generation section with tior. 14. disable channel 3 and 4 output with toer. 15. select the complementary pwm output level and cyclic output enabling/disabling with tocr. 16. set complementary pwm. 17. enable channel 3 and 4 output with toer. 18. set mtu2 output with the pfc. 19. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 656 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during pwm mode 1 operation, and operation is restarted in reset-synchronized pwm mode: figure 11.150 shows an explanatory diagram of the case where an error occurs in pwm mode 1 and operation is restarted in reset-synchronized pwm mode after re-setting. 1 reset 2 tmdr (pwm1) 3 toer (1) 5 pfc (mtu2) 4 tior (1 init 0 out) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (normal) 12 tior (0 init 0 out) 13 tior ( disabled ) 14 toer (0) 15 tocr 16 tmdr (rpwm) 17 toer (1) 18 pfc (mtu2) 19 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 not initialized (tioc3b) not initialized (tioc3d) hi-z hi-z hi-z figure 11.150 error occu rrence in pwm mode 1, recovery in reset-synchronized pwm mode 1 to 14 are the same as in figure 11.149. 15. select the reset-synchronized pwm output level and cyclic output enabling/disabling with tocr. 16. set reset-synchronized pwm. 17. enable channel 3 and 4 output with toer. 18. set mtu2 output with the pfc. 19. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 657 of 1560 mar 18, 2011 sh7080 group operation when error occurs during pwm mode 2 operation, and operation is restarted in normal mode: figure 11.151 shows an explanatory diagra m of the case where an error occurs in pwm mode 2 and operation is restarted in normal mode after re-setting. 1 reset 2 tmdr (pwm2) 3 tior (1 init 0 out) 5 tstr (1) 4 pfc (mtu2) 6 match 7 error occurs 8 pfc (port) 9 tstr (0) 10 tmdr (normal) 11 tior (1 init 0 out) 12 pfc (mtu2) 13 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (cycle register) n = 0 to 15 hi-z hi-z figure 11.151 error occu rrence in pwm mode 2, r ecovery in normal mode 1. after a reset, mtu2 output is low a nd ports are in the high-impedance state. 2. set pwm mode 2. 3. initialize the pins with tior. (the example shows initial high output, with low output on compare-match occurrence. in pwm mode 2, the cycle register pins are not initialized. in the example, tioc *a is the cycle register.) 4. set mtu2 output with the pfc. 5. the count operation is started by tstr. 6. output goes low on compare-match occurrence. 7. an error occurs. 8. set port output with the pfc and output the inverse of the active level. 9. the count operation is stopped by tstr. 10. set normal mode. 11. initialize the pins with tior. 12. set mtu2 output with the pfc. 13. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 658 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during pwm mode 2 operation, and operation is restarted in pwm mode 1: figure 11.152 shows an explanatory diagra m of the case where an error occurs in pwm mode 2 and operation is restarted in pwm mode 1 after re-setting. 1 reset 2 tmdr (pwm2) 3 tior (1 init 0 out) 5 tstr (1) 4 pfc (mtu2) 6 match 7 error occurs 8 pfc (port) 9 tstr (0) 10 tmdr (pwm1) 11 tior (1 init 0 out) 12 pfc (mtu2) 13 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (tioc * b) not initialized (cycle register) n = 0 to 15 hi-z hi-z figure 11.152 error occu rrence in pwm mode 2, recovery in pwm mode 1 1 to 9 are the same as in figure 11.151. 10. set pwm mode 1. 11. initialize the pins with tior. (in pwm mode 1, the tioc*b side is not initialized.) 12. set mtu2 output with the pfc. 13. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 659 of 1560 mar 18, 2011 sh7080 group operation when error occurs during pwm mode 2 operation, and operation is restarted in pwm mode 2: figure 11.153 shows an explanatory diag ram of the case where an error occurs in pwm mode 2 and operation is restarted in pwm mode 2 after re-setting. 1 reset 2 tmdr (pwm2) 3 tior (1 init 0 out) 5 tstr (1) 4 pfc (mtu2) 6 match 7 error occurs 8 pfc (port) 9 tstr (0) 10 tmdr (pwm2) 11 tior (1 init 0 out) 12 pfc (mtu2) 13 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (cycle register) not initialized (cycle register) n = 0 to 15 hi-z hi-z figure 11.153 error occu rrence in pwm mode 2, recovery in pwm mode 2 1 to 9 are the same as in figure 11.151. 10. not necessary when restarting in pwm mode 2. 11. initialize the pins with tior. (in pwm mode 2, the cycle register pins are not initialized.) 12. set mtu2 output with the pfc. 13. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 660 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during pwm mode 2 operation, and operation is restarted in phase counting mode: figure 11.154 shows an explanatory diagram of the case where an error occurs in pwm mode 2 and operation is restarted in phase counting mode after re-setting. 1 reset 2 tmdr (pwm2) 3 tior (1 init 0 out) 5 tstr (1) 4 pfc (mtu2) 6 match 7 error occurs 8 pfc (port) 9 tstr (0) 10 tmdr (pcm) 11 tior (1 init 0 out) 12 pfc (mtu2) 13 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (cycle register) n = 0 to 15 hi-z hi-z figure 11.154 error occur rence in pwm mode 2, recov ery in phase counting mode 1 to 9 are the same as in figure 11.151. 10. set phase counting mode. 11. initialize the pins with tior. 12. set mtu2 output with the pfc. 13. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 661 of 1560 mar 18, 2011 sh7080 group operation when error occurs during phase counting mode operation, and operation is restarted in normal mode: figure 11.155 shows an explanator y diagram of the case where an error occurs in phase counting mode and operation is restarted in normal mode after re-setting. 1 reset 2 tmdr (pcm) 3 tior (1 init 0 out) 5 tstr (1) 4 pfc (mtu2) 6 match 7 error occurs 8 pfc (port) 9 tstr (0) 10 tmdr (normal) 11 tior (1 init 0 out) 12 pfc (mtu2) 13 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen n = 0 to 15 hi-z hi-z figure 11.155 error occur rence in phase counting mode, recovery in normal mode 1. after a reset, mtu2 output is low a nd ports are in the high-impedance state. 2. set phase counting mode. 3. initialize the pins with tior. (the example shows initial high output, with low output on compare-match occurrence.) 4. set mtu2 output with the pfc. 5. the count operation is started by tstr. 6. output goes low on compare-match occurrence. 7. an error occurs. 8. set port output with the pfc and output the inverse of the active level. 9. the count operation is stopped by tstr. 10. set in normal mode. 11. initialize the pins with tior. 12. set mtu2 output with the pfc. 13. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 662 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during phase counting mode operation, and operation is restarted in pwm mode 1: figure 11.156 shows an explanator y diagram of the case where an error occurs in phase counting mode and operation is restarted in pwm mode 1 after re-setting. 1 reset 2 tmdr (pcm) 3 tior (1 init 0 out) 5 tstr (1) 4 pfc (mtu2) 6 match 7 error occurs 8 pfc (port) 9 tstr (0) 10 tmdr (pwm1) 11 tior (1 init 0 out) 12 pfc (mtu2) 13 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen not initialized (tioc * b) n = 0 to 15 hi-z hi-z figure 11.156 error occur rence in phase counting mode, recovery in pwm mode 1 1 to 9 are the same as in figure 11.155. 10. set pwm mode 1. 11. initialize the pins with tior. (in pwm mode 1, the tioc *b side is not initialized.) 12. set mtu2 output with the pfc. 13. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 663 of 1560 mar 18, 2011 sh7080 group operation when error occurs during phase counting mode operation, and operation is restarted in pwm mode 2: figure 11.157 shows an explanator y diagram of the case where an error occurs in phase counting mode and operation is restarted in pwm mode 2 after re-setting. 1 reset 2 tmdr (pcm) 3 tior (1 init 0 out) 5 tstr (1) 4 pfc (mtu2) 6 match 7 error occurs 8 pfc (port) 9 tstr (0) 10 tmdr (pwm2) 11 tior (1 init 0 out) 12 pfc (mtu2) 13 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen n = 0 to 15 hi-z hi-z not initialized (cycle register) figure 11.157 error occur rence in phase counting mode, recovery in pwm mode 2 1 to 9 are the same as in figure 11.155. 10. set pwm mode 2. 11. initialize the pins with tior. (in pwm mode 2, the cycle register pins are not initialized.) 12. set mtu2 output with the pfc. 13. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 664 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during phase counting mode operation, and operation is restarted in phase counting mode: figure 11.158 shows an explanatory diagram of the case where an error occurs in phase counting mode and operation is restarted in phase counting mode after re-setting. 1 reset 2 tmdr (pcm) 3 tior (1 init 0 out) 5 tstr (1) 4 pfc (mtu2) 6 match 7 error occurs 8 pfc (port) 9 tstr (0) 10 tmdr (pcm) 11 tior (1 init 0 out) 12 pfc (mtu2) 13 tstr (1) mtu2 module output tioc * a tioc * b port output pen pen n = 0 to 15 hi-z hi-z figure 11.158 error occur rence in phase counting mode, recovery in phase counting mode 1 to 9 are the same as in figure 11.155. 10. not necessary when restarting in phase counting mode. 11. initialize the pins with tior. 12. set mtu2 output with the pfc. 13. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 665 of 1560 mar 18, 2011 sh7080 group operation when error occu rs during complementary pwm mode operation, and operation is restarted in normal mode: figure 11.159 shows an explanatory diagram of the case where an error occurs in complementary pwm mode and operation is restarted in normal mode after re-setting. 1 reset 2 tocr 3 tmdr (cpwm) 5 pfc (mtu2) 4 toer (1) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (normal) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 hi-z hi-z hi-z figure 11.159 error occurren ce in complementary pwm mode, recovery in normal mode 1. after a reset, mtu2 output is low a nd ports are in the high-impedance state. 2. select the complementary pwm output level and cyclic output enabling/disabling with tocr. 3. set complementary pwm. 4. enable channel 3 and 4 output with toer. 5. set mtu2 output with the pfc. 6. the count operation is started by tstr. 7. the complementary pwm waveform is output on compare-match occurrence. 8. an error occurs. 9. set port output with the pfc and output the inverse of the active level. 10. the count operation is stopped by tstr. (mtu2 output becomes the complementary pwm output initial value.) 11. set normal mode. (mtu2 output goes low.) 12. initialize the pins with tior. 13. set mtu2 output with the pfc. 14. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 666 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occu rs during complementary pwm mode operation, and operation is restarted in pwm mode 1: figure 11.160 shows an explanatory diagram of the case where an error occurs in complementary pwm mode and operation is restarted in pwm mode 1 after re-setting. 1 reset 2 tocr 3 tmdr (cpwm) 5 pfc (mtu2) 4 toer (1) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (pwm1) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 not initialized (tioc3b) not initialized (tioc3d) hi-z hi-z hi-z figure 11.160 error occurren ce in complementary pwm mode, recovery in pwm mode 1 1 to 10 are the same as in figure 11.159. 11. set pwm mode 1. (mtu2 output goes low.) 12. initialize the pins with tior. (in pwm mode 1, the tioc *b side is not initialized.) 13. set mtu2 output with the pfc. 14. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 667 of 1560 mar 18, 2011 sh7080 group operation when error occu rs during complementary pwm mode operation, and operation is restarted in complementary pwm mode: figure 11.161 shows an explanatory diagram of the case where an error occurs in complementary pwm mode and operation is restarted in complementary pwm mode after re-setting (when operation is restarted using the cycle and duty settings at the time the counter was stopped). 1 reset 2 tocr 3 tmdr (cpwm) 5 pfc (mtu2) 4 toer (1) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 pfc (mtu2) 12 tstr (1) 13 match mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 hi-z hi-z hi-z figure 11.161 error occurren ce in complementary pwm mode, recovery in complementary pwm mode 1 to 10 are the same as in figure 11.159. 11. set mtu2 output with the pfc. 12. operation is restarted by tstr. 13. the complementary pwm waveform is output on compare-match occurrence.
section 11 multi-function timer pulse unit 2 (mtu2) page 668 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occu rs during complementary pwm mode operation, and operation is restarted in complementary pwm mode: figure 11.162 shows an explanatory diagram of the case where an error occurs in complementary pwm mode and operation is restarted in complementary pwm mode after re-setting (when operation is restarted using completely new cycle and duty settings). 1 reset 2 tocr 3 tmdr (cpwm) 5 pfc (mtu2) 4 toer (1) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (normal) 12 toer (0) 13 tocr 14 tmdr (cpwm) 15 toer (1) 16 pfc (mtu2) 17 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 hi-z hi-z hi-z figure 11.162 error occurren ce in complementary pwm mode, recovery in complementary pwm mode 1 to 10 are the same as in figure 11.159. 11. set normal mode and make new settings. (mtu2 output goes low.) 12. disable channel 3 and 4 output with toer. 13. select the complementary pwm mode output level and cyclic output enabling/disabling with tocr. 14. set complementary pwm. 15. enable channel 3 and 4 output with toer. 16. set mtu2 output with the pfc. 17. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 669 of 1560 mar 18, 2011 sh7080 group operation when error occu rs during complementary pwm mode operation, and operation is restarted in reset-synchronized pwm mode: figure 11.163 shows an explanatory diagram of the case where an er ror occurs in complementary pwm mode and operation is restarted in reset-sync hronized pwm mode after re-setting. 1 reset 2 tocr 3 tmdr (cpwm) 5 pfc (mtu2) 4 toer (1) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (normal) 12 toer (0) 13 tocr 14 tmdr (rpwm) 15 toer (1) 16 pfc (mtu2) 17 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 hi-z hi-z hi-z figure 11.163 error occurren ce in complementary pwm mode, recovery in reset-syn chronized pwm mode 1 to 10 are the same as in figure 11.159. 11. set normal mode. (mtu2 output goes low.) 12. disable channel 3 and 4 output with toer. 13. select the reset-synchronized pwm mode output level and cyclic output enabling/disabling with tocr. 14. set reset-synchronized pwm. 15. enable channel 3 and 4 output with toer. 16. set mtu2 output with the pfc. 17. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 670 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during reset-synchronized pwm mode operation, and operation is restarted in normal mode: figure 11.164 shows an explanatory diagram of the case where an error occurs in reset-synchronized pwm mode and operation is restarted in normal mode after re-setting. 1 reset 2 tocr 3 tmdr (rpwm) 5 pfc (mtu2) 4 toer (1) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (normal) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 hi-z hi-z hi-z figure 11.164 error occurrence in reset-synchronized pwm mode, recovery in normal mode 1. after a reset, mtu2 output is low a nd ports are in the high-impedance state. 2. select the reset-synchronized pwm output level and cyclic output enabling/disabling with tocr. 3. set reset-synchronized pwm. 4. enable channel 3 and 4 output with toer. 5. set mtu2 output with the pfc. 6. the count operation is started by tstr. 7. the reset-synchronized pwm waveform is output on compare-match occurrence. 8. an error occurs. 9. set port output with the pfc and output the inverse of the active level. 10. the count operation is stopped by tstr. (mtu2 output becomes the reset-synchronized pwm output initial value.) 11. set normal mode. (mtu2 positive phase output is low, and negative phase output is high.) 12. initialize the pins with tior. 13. set mtu2 output with the pfc. 14. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 671 of 1560 mar 18, 2011 sh7080 group operation when error occurs during reset-synchronized pwm mode operation, and operation is restarted in pwm mode 1: figure 11.165 shows an explanatory diagram of the case where an error occurs in reset-synchronized pwm mode and operation is restarted in pwm mode 1 after re-setting. 1 reset 2 tocr 3 tmdr (rpwm) 5 pfc (mtu2) 4 toer (1) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 tmdr (pwm1) 12 tior (1 init 0 out) 13 pfc (mtu2) 14 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 not initialized (tioc3b) not initialized (tioc3d) hi-z hi-z hi-z figure 11.165 error occurrence in reset-synchronized pwm mode, recovery in pwm mode 1 1 to 10 are the same as in figure 11.164. 11. set pwm mode 1. (mtu2 positive phase output is low, and negative phase output is high.) 12. initialize the pins with tior. (in pwm mode 1, the tioc *b side is not initialized.) 13. set mtu2 output with the pfc. 14. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) page 672 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group operation when error occurs during reset-synchronized pwm mode operation, and operation is restarted in complementary pwm mode: figure 11.166 shows an explanatory diagram of the case where an er ror occurs in reset-synchronized pwm mode and operation is restarted in complementary pwm mode after re-setting. 1 reset 2 tocr 3 tmdr (rpwm) 5 pfc (mtu2) 4 toer (1) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 toer (0) 12 tocr 13 tmdr (cpwm) 14 toer (1) 15 pfc (mtu2) 16 tstr (1) mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 hi-z hi-z hi-z figure 11.166 error occurrence in reset-synchronized pwm mode, recovery in complementary pwm mode 1 to 10 are the same as in figure 11.164. 11. disable channel 3 and 4 output with toer. 12. select the complementary pwm output level and cyclic output enabling/disabling with tocr. 13. set complementary pwm. (the mtu2 cyclic output pin goes low.) 14. enable channel 3 and 4 output with toer. 15. set mtu2 output with the pfc. 16. operation is restarted by tstr.
section 11 multi-function timer pulse unit 2 (mtu2) r01uh0198ej0500 rev. 5.00 page 673 of 1560 mar 18, 2011 sh7080 group operation when error occurs during reset-synchronized pwm mode operation, and operation is restarted in reset-synchronized pwm mode: figure 11.167 shows an explanatory diagram of the case where an error occurs in reset-synchronized pwm mode and operation is restarted in reset-sync hronized pwm mode after re-setting. 1 reset 2 tocr 3 tmdr (rpwm) 5 pfc (mtu2) 4 toer (1) 6 tstr (1) 7 match 8 error occurs 9 pfc (port) 10 tstr (0) 11 pfc (mtu2) 12 tstr (1) 13 match mtu2 module output tioc3a tioc3b tioc3d port output pe9 pe8 pe11 hi-z hi-z hi-z figure 11.167 error occurrence in reset-synchronized pwm mode, recovery in reset-syn chronized pwm mode 1 to 10 are the same as in figure 11.164. 11. set mtu2 output with the pfc. 12. operation is restarted by tstr. 13. the reset-synchronized pwm waveform is output on compare-match occurrence.
section 11 multi-function timer pulse unit 2 (mtu2) page 674 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 12 multi-function timer pulse unit 2s (mtu2s) r01uh0198ej0500 rev. 5.00 page 675 of 1560 mar 18, 2011 sh7080 group section 12 multi-function timer pulse unit 2s (mtu2s) this lsi has an on-chip multi-function timer pulse unit 2s (mtu2s) that comprises three 16-bit timer channels. the mtu2s includes channels 3 to 5 of the mtu2. for details, refer to section 11, multi-function timer pulse unit 2 (mtu2). to dis tinguish from the mtu2, "s" is added to the end of the mtu2s input/output pin and register names. for example, tioc3a is called tioc3as and tgra_3 is called tgra_3s in this section. the mtu2s can operate at 80 mhz max. for comp lementary pwm output functions or at 40 mhz max. for the other functions.
section 12 multi-function timer pulse unit 2s (mtu2s) page 676 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 12.1 mtu2s functions item channel 3 channel 4 channel 5 count clock mi /1 mi /4 mi /16 mi /64 mi /256 mi /1024 mi /1 mi /4 mi /16 mi /64 mi /256 mi /1024 mi /1 mi /4 mi /16 mi /64 general registers (tgr) tgra_3s tgrb_3s tgra_4s tgrb_4s tgru_5s tgrv_5s tgrw_5s general registers/ buffer registers tgrc_3s tgrd_3s tgrc_4s tgrd_4s ? i/o pins tioc3as tioc3bs tioc3cs tioc3ds tioc4as tioc4bs tioc4cs tioc4ds input pins tic5us tic5vs tic5ws counter clear function tgr compare match or input capture tgr compare match or input capture tgr compare match or input capture 0 output ? 1 output ? compare match output toggle output ? input capture function synchronous operation ? pwm mode 1 ? pwm mode 2 ? ? ? complementary pwm mode ? reset pwm mode ? ac synchronous motor drive mode ? ? ? phase counting mode ? ? ? buffer operation ?
section 12 multi-function timer pulse unit 2s (mtu2s) r01uh0198ej0500 rev. 5.00 page 677 of 1560 mar 18, 2011 sh7080 group item channel 3 channel 4 channel 5 counter function of compensation for dead time ? ? dtc activation tgr compare match or input capture tgr compare match or input capture and tcnt overflow or underflow tgr compare match or input capture a/d converter start trigger tgra_3s compare match or input capture tgra_4s compare match or input capture tcnt_4s underflow (trough) in complementary pwm mode ? interrupt sources 5 sources ? compare match or input capture 3as ? compare match or input capture 3bs ? compare match or input capture 3cs ? compare match or input capture 3ds ? overflow 5 sources ? compare match or input capture 4as ? compare match or input capture 4bs ? compare match or input capture 4cs ? compare match or input capture 4ds ? overflow or underflow 3 sources ? compare match or input capture 5us ? compare match or input capture 5vs ? compare match or input capture 5ws a/d converter start request delaying function ? ? a/d converter start request at a match between tadcora_4s and tcnt_4s ? a/d converter start request at a match between tadcorb_4s and tcnt_4s ?
section 12 multi-function timer pulse unit 2s (mtu2s) page 678 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group item channel 3 channel 4 channel 5 interrupt skipping function ? skips tgra_3s compare match interrupts ? skips tciv_4s interrupts ? [legend] : possible ?: not possible
section 12 multi-function timer pulse unit 2s (mtu2s) r01uh0198ej0500 rev. 5.00 page 679 of 1560 mar 18, 2011 sh7080 group 12.1 input/output pins table 12.2 pin configuration channel symbol i/o function 3 tioc3as i/o tgra_3s input capture input/output compare output/pwm output pin tioc3bs i/o tgrb_3s input capture input/output compare output/pwm output pin tioc3cs i/o tgrc_3s input capture input/output compare output/pwm output pin tioc3ds i/o tgrd_3s input capture input/output compare output/pwm output pin 4 tioc4as i/o tgra_4s input capture input/output compare output/pwm output pin tioc4bs i/o tgrb_4s input capture input/output compare output/pwm output pin tioc4cs i/o tgrc_4s input capture input/output compare output/pwm output pin tioc4ds i/o tgrd_4s input capture input/output compare output/pwm output pin 5 tic5us input tgru_5s input capture input/external pulse input pin tic5vs input tgrv_5s input capture input/external pulse input pin tic5ws input tgrw_5s input capture input/external pulse input pin
section 12 multi-function timer pulse unit 2s (mtu2s) page 680 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 12.2 register descriptions the mtu2s has the following registers. for details on register addresses and register states during each process, refer to section 27, list of register s. to distinguish registers in each channel, an underscore and the channel number are added as a suffix to the register name; tcr for channel 3 is expressed as tcr_3s. table 12.3 register configuration register name abbrevia- tion r/w initial value address access size timer control register_3s tcr_3s r/w h'00 h'ffffc600 8, 16, 32 timer control register_4s tcr_4s r/w h'00 h'ffffc601 8 timer mode register_3s tmdr_3s r/w h'00 h'ffffc602 8, 16 timer mode register_4s tmdr_4s r/w h'00 h'ffffc603 8 timer i/o control register h_3s tiorh_3s r/w h'00 h'ffffc604 8, 16, 32 timer i/o control register l_3s tiorl_3s r/w h'00 h'ffffc605 8 timer i/o control register h_4s tiorh_4s r/w h'00 h'ffffc606 8, 16 timer i/o control register l_4s tiorl_4s r/w h'00 h'ffffc607 8 timer interrupt enable register_3s tier_3s r/w h'00 h'ffffc608 8, 16 timer interrupt enable register_4s tier_4s r/w h'00 h'ffffc609 8 timer output master enable register s toers r/w h'c0 h'ffffc60a 8 timer gate control register s tgcrs r/w h'80 h'ffffc60d 8 timer output control register 1s tocr1s r/w h'00 h'ffffc60e 8, 16 timer output control register 2s tocr2s r/w h'00 h'ffffc60f 8 timer counter_3s tcnt_3s r/w h'0000 h'ffffc610 16, 32 timer counter_4s tcnt_4s r/w h'0000 h'ffffc612 16 timer cycle data register s tcdrs r/w h'ffff h'ffffc614 16, 32 timer dead time data register s tddrs r/w h'ffff h'ffffc616 16 timer general register a_3s tgra_3s r/w h'ffff h'ffffc618 16, 32 timer general register b_3s tgrb_3s r/w h'ffff h'ffffc61a 16 timer general register a_4s tgra_4s r/w h'ffff h'ffffc61c 16, 32 timer general register b_4s tgrb_4s r/w h'ffff h'ffffc61e 16
section 12 multi-function timer pulse unit 2s (mtu2s) r01uh0198ej0500 rev. 5.00 page 681 of 1560 mar 18, 2011 sh7080 group register name abbrevia- tion r/w initial value address access size timer subcounter s tcntss r h'0000 h'ffffc620 16, 32 timer cycle buffer register s tcbrs r/w h'ffff h'ffffc622 16 timer general register c_3s tgrc_3s r/w h'ffff h'ffffc624 16, 32 timer general register d_3s tgrd_3s r/w h'ffff h'ffffc626 16 timer general register c_4s tgrc_4s r/w h'ffff h'ffffc628 16, 32 timer general register d_4s tgrd_4s r/w h'ffff h'ffffc62a 16 timer status register_3s tsr_3s r/w h'c0 h'ffffc62c 8, 16 timer status register_4s tsr_4s r/w h'c0 h'ffffc62d 8 timer interrupt skipping set register s titcrs r/w h'00 h'ffffc630 8, 16 timer interrupt skipping counter s titcnts r h'00 h'ffffc631 8 timer buffer transfer set register s tbters r/w h'00 h'ffffc632 8 timer dead time enable register s tders r/w h'01 h'ffffc634 8 timer output level buffer register s tolbrs r/w h'00 h'ffffc636 8 timer buffer operation transfer mode register_3s tbtm_3s r/w h'00 h'ffffc638 8, 16 timer buffer operation transfer mode register_4s tbtm_4s r/w h'00 h'ffffc639 8 timer a/d converter start request control register s tadcrs r/w h'0000 h'ffffc640 16 timer a/d converter start request cycle set register a_4s tadcora_4s r/w h'ffff h'ffffc644 16, 32 timer a/d converter start request cycle set register b_4s tadcorb_4s r/w h'ffff h'ffffc646 16 timer a/d converter start request cycle set buffer register a_4s tadcobra_4s r/w h'ffff h'ffffc648 16, 32 timer a/d converter start request cycle set buffer register b_4s tadcobrb_4s r/w h'ffff h'ffffc64a 16
section 12 multi-function timer pulse unit 2s (mtu2s) page 682 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register name abbrevia- tion r/w initial value address access size timer synchronous clear register s tsycrs r/w h'00 h'ffffc650 8 timer waveform control register s twcrs r/w h'00 h'ffffc660 8 timer start register s tstrs r/w h'00 h'ffffc680 8, 16 timer synchronous register s tsyrs r/w h'00 h'ffffc681 8 timer read/write enable register s trwers r/w h'01 h'ffffc684 8 timer counter u_5s tcntu_5s r/w h'0000 h'ffffc880 16, 32 timer general register u_5s tgru_5s r/w h'ffff h'ffffc882 16 timer control register u_5s tcru_5s r/w h'00 h'ffffc884 8 timer i/o control register u_5s tioru_5s r/w h'00 h'ffffc886 8 timer counter v_5s tcntv_5s r/w h'0000 h'ffffc890 16, 32 timer general register v_5s tgrv_5s r/w h'ffff h'ffffc892 16 timer control register v_5s tcrv_5s r/w h'00 h'ffffc894 8 timer i/o control register v_5s tiorv_5s r/w h'00 h'ffffc896 8 timer counter w_5s tcntw_5s r/w h'0000 h'ffffc8a0 16, 32 timer general register w_5s tgrw_5s r/w h'ffff h'ffffc8a2 16 timer control register w_5s tcrw_5s r/w h'00 h'ffffc8a4 8 timer i/o control register w_5s tiorw_5s r/w h'00 h'ffffc8a6 8 timer status register_5s tsr_5s r/w h'00 h'ffffc8b0 8 timer interrupt enable register_5s tier_5s r/w h'00 h'ffffc8b2 8 timer start register_5s ts tr_5s r/w h'00 h'ffffc8b4 8 timer compare match clear register s tcntcmpclrs r/w h'00 h'ffffc8b6 8
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 683 of 1560 mar 18, 2011 sh7080 group section 13 port output enable (poe) the port output enable (poe) can be used to place the high-current pins (pins multiplexed with tioc3b, tioc3d, tioc4a, tioc4b, tioc4c, and tioc4d in the mtu2 and tioc3bs, tioc3ds, tioc4as, tioc4bs, tioc4cs, and tioc4ds in the mtu2s) and the pins for channel 0 of the mtu2 (pins multiplexed with tioc0a, tioc0b, tioc 0c, and tioc0d) in high-impedance state, depending on the change on poe0 to poe8 input pins and the output status of the high-current pins, or by modifying register settings. it can also simultaneously generate interrupt requests. 13.1 features ? each of the poe0 to poe8 input pins can be set for falling edge, p /8 16, p /16 16, or p /128 16 low-level sampling. ? high-current pins and the pins for channel 0 of the mtu2 can be placed in high-impedance state by poe0 to poe8 pin falling-edge or low-level sampling. ? high-current pins can be placed in high-impedance state when the high-current pin output levels are compared and simultaneous active-level output continues for one cycle or more. ? high-current pins and the pins for channel 0 of the mtu2 can be placed in high-impedance state by modifying the poe register settings. ? interrupts can be generated by input-level sampling or output-level comparison results. the poe has input level detection circuits, output level comparison circuits, and a high-impedance request/interrupt request generating circuit as shown in figure 13.1. in addition to control by the poe, high-current pins can be placed in high-impedance state when the oscillator stops or in software standby state. fo r details, refer to section 21.1.11, high-current port control register (hcpcr), and appendix a, pin states.
section 13 port output enable (poe) page 684 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 13.1 shows a block diagram of the poe. icsr1: icsr2: icsr3: ocsr1: ocsr2: input level control/status register 1 input level control/status register 2 input level control/status register 3 output level control/status register 1 output level control/status register 2 spoer: poecr1: poecr2: software port output enable register port output enable control register 1 port output enable control register 2 [legend] tioc3b tioc4a tioc4c tioc4b tioc4d output level comparison circuit ocsr1 icsr1 output level comparison circuit output level comparison circuit input level detection circuit falling edge detection circuit low level sampling circuit poe3 poe2 poe1 poe0 icsr2 input level detection circuit falling edge detection circuit low level sampling circuit poe7 poe6 poe5 poe4 icsr3 input level detection circuit falling edge detection circuit low level sampling circuit poe8 p /8 p p /16 p /128 tioc3d tioc3bs tioc4as tioc4cs tioc4bs tioc4ds output level comparison circuit ocsr2 output level comparison circuit output level comparison circuit tioc3ds high-impedance request signal for mtu2 high-current pins high-impedance request signal for mtu2 channel 0 pins high-impedance request signal for mtu2s high-current pins interrupt request signal frequency divider poecr1, poecr2 spoer high-impedance request/interrupt request generating circuit figure 13.1 block diagram of poe
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 685 of 1560 mar 18, 2011 sh7080 group 13.2 input/output pins table 13.1 pin configuration pin name symbol i/o description port output enable input pins 0 to 3 poe0 to poe3 input input request signals to place high- current pins for mtu2 in high- impedance state port output enable input pins 4 to 7 poe4 to poe7 input input request signals to place high- current pins for mtu2s in high- impedance state port output enable input pin 8 poe8 input inputs a request signal to place pins for channel 0 in mtu2 in high- impedance state
section 13 port output enable (poe) page 686 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 13.2 shows output-level comparisons with pin combinations. table 13.2 pin combinations pin combination i/o description pe9/tioc3b and pe11/tioc3d pe12/tioc4a and pe14/tioc4c pe13/tioc4b and pe15/tioc4d output the high-current pins for the mtu2 are placed in high-impedance state when the pins simultaneously output an active level (low level when the output level select p (olsp) bit of the timer output control register (tocr) in the mtu2 is 0 or high level when the bit is 1) for one or more cycles of the peripheral clock (p ). this active level comparison is done when the mtu2 output function or general output function is selected in the pin function controller. if another function is selected, the output level is not checked. pin combinations for output comparison and high- impedance control can be selected by poe registers. pd9/tioc3bs and pd11/tioc3ds pd12/tioc4as and pd14/tioc4cs pd13/tioc4bs and pd15/tioc4ds pd29/tioc3bs and pd28/tioc3ds pd27/tioc4as and pd25/tioc4cs pd26/tioc4bs and pd24/tioc4ds pe16/tioc3bs and pe17/tioc3ds pe18/tioc4as and pe20/tioc4cs pe19/tioc4bs and pe21/tioc4ds output the high-current pins for the mtu2s are placed in high-impedance state when the pins simultaneously output an active level (low level when the output level select p (olsp) bit of the timer output control register (tocr) in the mtu2s is 0 or high level when the bit is 1) for one or more cycles of the peripheral clock (p ). this active level comparison is done when the mtu2s output function or general output function is selected in the pin function controller. if another function is selected, the output level is not checked. pin combinations for output comparison and high- impedance control can be selected by poe registers.
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 687 of 1560 mar 18, 2011 sh7080 group 13.3 register descriptions the poe has the following registers. for details on register addresses and register states during each processing, refer to section 27, list of registers. table 13.3 register configuration register name abbrevia- tion r/w initial value address access size input level control/status register 1 icsr1 r/w h'0000 h'ffffd000 8, 16, 32 output level control/status register 1 ocsr1 r/w h'0000 h'ffffd002 8, 16 input level control/status register 2 icsr2 r/w h'0000 h'ffffd004 8, 16, 32 output level control/status register 2 ocsr2 r/w h'0000 h'ffffd006 8, 16 input level control/status register 3 icsr3 r/w h'0000 h'ffffd008 8, 16 software port output enable register spoer r/w h'00 h'ffffd00a 8 port output enable control register 1 poecr1 r/w h'00 h'ffffd00b 8 port output enable control register 2 poecr2 r/w h'7700 h'ffffd00c 8, 16
section 13 port output enable (poe) page 688 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 13.3.1 input level control/status register 1 (icsr1) icsr1 is a 16-bit readable/writa ble register that selects the poe0 to poe3 pin input modes, controls the enable/disable of interrupts, and indicates status. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/(w) * 1 r/(w) * 1 r/(w) * 1 r/(w) * 1 rrrr/wr/w * 2 r/w * 2 r/w * 2 r/w * 2 r/w * 2 r/w * 2 r/w * 2 r/w * 2 notes: writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. can be modified only once after a power-on reset. 1. 2. poe3f poe2f poe1f poe0f - - - pie1 poe3m[1:0] poe2m[1:0] poe1m[1:0] poe0m[1:0] bit bit name initial value r/w description 15 poe3f 0 r/(w) * 1 poe3 flag this flag indicates that a high impedance request has been input to the poe3 pin. [clearing conditions] ? by writing 0 to poe3f after reading poe3f = 1 (when the falling edge is selected by bits 7 and 6 in icsr1) ? by writing 0 to poe3f after reading poe3f = 1 after a high level input to poe3 is sampled at p /8, p /16, or p /128 clock (when low-level sampling is selected by bits 7 and 6 in icsr1) [setting condition] ? when the input set by icsr1 bits 7 and 6 occurs at the poe3 pin
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 689 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 poe2f 0 r/(w) * 1 poe2 flag this flag indicates that a high impedance request has been input to the poe2 pin. [clearing conditions] ? by writing 0 to poe2f after reading poe2f = 1 (when the falling edge is selected by bits 5 and 4 in icsr1) ? by writing 0 to poe2f after reading poe2f = 1 after a high level input to poe2 is sampled at p /8, p /16, or p /128 clock (when low-level sampling is selected by bits 5 and 4 in icsr1) [setting condition] ? when the input set by icsr1 bits 5 and 4 occurs at the poe2 pin 13 poe1f 0 r/(w) * 1 poe1 flag this flag indicates that a high impedance request has been input to the poe1 pin. [clearing conditions] ? by writing 0 to poe1f after reading poe1f = 1 (when the falling edge is selected by bits 3 and 2 in icsr1) ? by writing 0 to poe1f after reading poe1f = 1 after a high level input to poe1 is sampled at p /8, p /16, or p /128 clock (when low-level sampling is selected by bits 3 and 2 in icsr1) [setting condition] ? when the input set by icsr1 bits 3 and 2 occurs at the poe1 pin
section 13 port output enable (poe) page 690 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 12 poe0f 0 r/(w) * 1 poe0 flag this flag indicates that a high impedance request has been input to the poe0 pin. [clearing conditions] ? by writing 0 to poe0f after reading poe0f = 1 (when the falling edge is selected by bits 1 and 0 in icsr1) ? by writing 0 to poe0f after reading poe0f = 1 after a high level input to poe0 is sampled at p /8, p /16, or p /128 clock (when low-level sampling is selected by bits 1 and 0 in icsr1) [setting condition] ? when the input set by icsr1 bits 1 and 0 occurs at the poe0 pin 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pie1 0 r/w port interrupt enable 1 this bit enables/disables interrupt requests when any one of the poe0f to poe3f bits of the icsr1 is set to 1. 0: interrupt requests disabled 1: interrupt requests enabled 7, 6 poe3m[1:0] 00 r/w * 2 poe3 mode 1, 0 these bits select the input mode of the poe3 pin. 00: accept request on falling edge of poe3 input 01: accept request when poe3 input has been sampled for 16 p /8 clock pulses and all are low level. 10: accept request when poe3 input has been sampled for 16 p /16 clock pulses and all are low level. 11: accept request when poe3 input has been sampled for 16 p /128 clock pulses and all are low level.
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 691 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5, 4 poe2m[1:0] 00 r/w * 2 poe2 mode 1, 0 these bits select the input mode of the poe2 pin. 00: accept request on falling edge of poe2 input 01: accept request when poe2 input has been sampled for 16 p /8 clock pulses and all are low level. 10: accept request when poe2 input has been sampled for 16 p /16 clock pulses and all are low level. 11: accept request when poe2 input has been sampled for 16 p /128 clock pulses and all are low level. 3, 2 poe1m[1:0] 00 r/w * 2 poe1 mode 1, 0 these bits select the input mode of the poe1 pin. 00: accept request on falling edge of poe1 input 01: accept request when poe1 input has been sampled for 16 p /8 clock pulses and all are low level. 10: accept request when poe1 input has been sampled for 16 p /16 clock pulses and all are low level. 11: accept request when poe1 input has been sampled for 16 p /128 clock pulses and all are low level. 1, 0 poe0m[1:0] 00 r/w * 2 poe0 mode 1, 0 these bits select the input mode of the poe0 pin. 00: accept request on falling edge of poe0 input 01: accept request when poe0 input has been sampled for 16 p /8 clock pulses and all are low level. 10: accept request when poe0 input has been sampled for 16 p /16 clock pulses and all are low level. 11: accept request when poe0 input has been sampled for 16 p /128 clock pulses and all are low level. notes: 1. writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. 2. can be modified only once after a power-on reset.
section 13 port output enable (poe) page 692 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 13.3.2 output level control/status register 1 (ocsr1) ocsr1 is a 16-bit readable/writable register that controls the enable/disable of both output level comparison and interrupts, and indicates status. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrr r/wrrrrrrrr r/(w) * 1 r/w * 2 osf1 - - - - - oce1 oie1 - - - - - - - - notes: writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. can be modified only once after a power-on reset. 1. 2. bit bit name initial value r/w description 15 osf1 0 r/(w) * 1 output short flag 1 this flag indicates that any one of the three pairs of mtu2 2-phase outputs to be compared has simultaneously become an active level. [clearing condition] ? by writing 0 to osf1 after reading osf1 = 1 [setting condition] ? when any one of the three pairs of 2-phase outputs has simultaneously become an active level 14 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 oce1 0 r/w * 2 output short high-impedance enable 1 this bit specifies whether to place the pins in high- impedance state when the osf1 bit in ocsr1 is set to 1. 0: does not place the pins in high-impedance state 1: places the pins in high-impedance state 8 oie1 0 r/w output short interrupt enable 1 this bit enables or disables interrupt requests when the osf1 bit in ocsr is set to 1. 0: interrupt requests disabled 1: interrupt requests enabled
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 693 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. notes: 1. writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. 2. can be modified only once after a power-on reset. 13.3.3 input level control/status register 2 (icsr2) icsr2 is a 16-bit readable/writa ble register that selects the poe4 to poe7 pin input modes, controls the enable/disable of interrupts, and indicates status. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/(w) * 1 r/(w) * 1 r/(w) * 1 r/(w) * 1 rrrr/wr/w * 2 r/w * 2 r/w * 2 r/w * 2 r/w * 2 r/w * 2 r/w * 2 r/w * 2 notes: writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. can be modified only once after a power-on reset. 1. 2. poe7f poe6f poe5f poe4f - - - pie2 poe7m[1:0] poe6m[1:0] poe5m[1:0] poe4m[1:0] bit bit name initial value r/w description 15 poe7f 0 r/(w) * 1 poe7 flag this flag indicates that a high impedance request has been input to the poe7 pin. [clearing conditions] ? by writing 0 to poe7f after reading poe7f = 1 (when the falling edge is selected by bits 7 and 6 in icsr2) ? by writing 0 to poe7f after reading poe7f = 1 after a high level input to poe7 is sampled at p /8, p /16, or p /128 clock (when low-level sampling is selected by bits 7 and 6 in icsr2) [setting condition] ? when the input condition set by bits 7 and 6 in icsr2 occurs at the poe7 pin
section 13 port output enable (poe) page 694 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 poe6f 0 r/(w) * 1 poe6 flag this flag indicates that a high impedance request has been input to the poe6 pin. [clearing conditions] ? by writing 0 to poe6f after reading poe6f = 1 (when the falling edge is selected by bits 5 and 4 in icsr2) ? by writing 0 to poe6f after reading poe6f = 1 after a high level input to poe6 is sampled at p /8, p /16, or p /128 clock (when low-level sampling is selected by bits 5 and 4 in icsr2) [setting condition] ? when the input condition set by bits 5 and 4 in icsr2 occurs at the poe6 pin 13 poe5f 0 r/(w) * 1 poe5 flag this flag indicates that a high impedance request has been input to the poe5 pin. [clearing conditions] ? by writing 0 to poe5f after reading poe5f = 1 (when the falling edge is selected by bits 3 and 2 in icsr2) ? by writing 0 to poe5f after reading poe5f = 1 after a high level input to poe5 is sampled at p /8, p /16, or p /128 clock (when low-level sampling is selected by bits 3 and 2 in icsr2) [setting condition] ? when the input condition set by bits 3 and 2 in icsr2 occurs at the poe5 pin
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 695 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 12 poe4f 0 r/(w) * 1 poe4 flag this flag indicates that a high impedance request has been input to the poe4 pin. [clearing conditions] ? by writing 0 to poe4f after reading poe4f = 1 (when the falling edge is selected by bits 1 and 0 in icsr2) ? by writing 0 to poe4f after reading poe4f = 1 after a high level input to poe4 is sampled at p /8, p /16, or p /128 clock (when low-level sampling is selected by bits 1 and 0 in icsr2) [setting condition] ? when the input condition set by bits 1 and 0 in icsr2 occurs at the poe4 pin 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pie2 0 r/w port interrupt enable 2 this bit enables/disables interrupt requests when any one of the poe4f to poe7f bits of the icsr2 is set to 1. 0: interrupt requests disabled 1: interrupt requests enabled 7, 6 poe7m[1:0] 00 r/w * 2 poe7 mode 1 and 0 these bits select the input mode of the poe7 pin. 00: accept request on falling edge of poe7 input 01: accept request when poe7 input has been sampled for 16 p /8 clock pulses and all are at a low level. 10: accept request when poe7 input has been sampled for 16 p /16 clock pulses and all are at a low level. 11: accept request when poe7 input has been sampled for 16 p /128 clock pulses and all are at a low level.
section 13 port output enable (poe) page 696 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5, 4 poe6m[1:0] 00 r/w * 2 poe6 mode 1 and 0 these bits select the input mode of the poe6 pin. 00: accept request on falling edge of poe6 input 01: accept request when poe6 input has been sampled for 16 p /8 clock pulses and all are at a low level. 10: accept request when poe6 input has been sampled for 16 p /16 clock pulses and all are at a low level. 11: accept request when poe6 input has been sampled for 16 p /128 clock pulses and all are at a low level. 3, 2 poe5m[1:0] 00 r/w * 2 poe5 mode 1 and 0 these bits select the input mode of the poe5 pin. 00: accept request on falling edge of poe5 input 01: accept request when poe5 input has been sampled for 16 p /8 clock pulses and all are at a low level. 10: accept request when poe5 input has been sampled for 16 p /16 clock pulses and all are at a low level. 11: accept request when poe5 input has been sampled for 16 p /128 clock pulses and all are at a low level. 1, 0 poe4m[1:0] 00 r/w * 2 poe4 mode 1 and 0 these bits select the input mode of the poe4 pin. 00: accept request on falling edge of poe4 input 01: accept request when poe4 input has been sampled for 16 p /8 clock pulses and all are at a low level. 10: accept request when poe4 input has been sampled for 16 p /16 clock pulses and all are at a low level. 11: accept request when poe4 input has been sampled for 16 p /128 clock pulses and all are at a low level. notes: 1. writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. 2. can be modified only once after a power-on reset.
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 697 of 1560 mar 18, 2011 sh7080 group 13.3.4 output level control/status register 2 (ocsr2) ocsr2 is a 16-bit readable/writable register that controls the enable/disable of both output level comparison and interrupts, and indicates status. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/(w) * 1 rrrrrr/w * 2 r/wrrrrrrrr notes: writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. can be modified only once after a power-on reset. 1. 2. osf2 - - - - - oce2 oie2 - - - - - - - - bit bit name initial value r/w description 15 osf2 0 r/(w) * 1 output short flag 2 this flag indicates that any one of the three pairs of mtu2s 2-phase outputs to be compared has simultaneously become an active level. [clearing condition] ? by writing 0 to osf2 after reading osf2 = 1 [setting condition] ? when any one of the three pairs of 2-phase outputs has simultaneously become an active level 14 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 oce2 0 r/w * 2 output short high-impedance enable 2 this bit specifies whether to place the pins in high- impedance state when the osf2 bit in ocsr2 is set to 1. 0: does not place the pins in high-impedance state 1: places the pins in high-impedance state 8 oie2 0 r/w output short interrupt enable 2 this bit enables or disables interrupt requests when the osf2 bit in ocsr2 is set to 1. 0: interrupt requests disabled 1: interrupt requests enabled
section 13 port output enable (poe) page 698 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. notes: 1. writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. 2. can be modified only once after a power-on reset. 13.3.5 input level control/status register 3 (icsr3) icsr3 is a 16-bit readable/writa ble register that selects the poe8 pin input mode, controls the enable/disable of interrupts, and indicates status. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrr r/(w) * 1 rrr/w * 2 r/wrrrrrrr/w * 2 r/w * 2 notes: writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. can be modified only once after a power-on reset. 1. 2. poe8f - - poe8e - - - - - - - - pie3 - poe8m[1:0] bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 poe8f 0 r/(w) * 1 poe8 flag this flag indicates that a high impedance request has been input to the poe8 pin. [clearing conditions] ? by writing 0 to poe8f after reading poe8f = 1 (when the falling edge is selected by bits 1 and 0 in icsr3) ? by writing 0 to poe8f after reading poe8f = 1 after a high level input to poe8 is sampled at p /8, p / 16, or p /128 clock (when low-level sampling is selected by bits 1 and 0 in icsr3) [setting condition] ? when the input condition set by bits 1 and 0 in icsr3 occurs at the poe8 pin
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 699 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 poe8e 0 r/w * 2 poe8 high-impedance enable this bit specifies whether to place the pins in high- impedance state when the poe8f bit in icsr3 is set to 1. 0: does not place the pins in high-impedance state 1: places the pins in high-impedance state 8 pie3 0 r/w port interrupt enable 3 this bit enables or disables interrupt requests when the poe8 bit in icsr3 is set to 1. 0: interrupt requests disabled 1: interrupt requests enabled 7 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1, 0 poe8m[1:0] 00 r/w * 2 poe8 mode 1 and 0 these bits select the input mode of the poe8 pin. 00: accept request on falling edge of poe8 input 01: accept request when poe8 input has been sampled for 16 p /8 clock pulses and all are low level. 10: accept request when poe8 input has been sampled for 16 p /16 clock pulses and all are low level. 11: accept request when poe8 input has been sampled for 16 p /128 clock pulses and all are low level. notes: 1. writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. 2. can be modified only once after a power-on reset.
section 13 port output enable (poe) page 700 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 13.3.6 software port output enable register (spoer) spoer is an 8-bit readable/writable register that controls high-impedance state of the pins. bit: initial value: r/w: 7654321 0 00000000 r r r r r r/w r/w r/w ----- mtu2s hiz mtu2 ch0hiz mtu2 ch34hiz bit bit name initial value r/w description 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 mtu2shiz 0 r/w mtu2s output high-impedance this bit specifies whether to place the high-current pins for the mtu2s in high-impedance state. 0: does not place the pins in high-impedance state [clearing conditions] ? power-on reset ? by writing 0 to mtu2shiz after reading mtu2shiz = 1 1: places the pins in high-impedance state [setting condition] ? by writing 1 to mtu2shiz 1 mtu2ch0hiz 0 r/w mtu2 channel 0 output high-impedance this bit specifies whether to place the pins for channel 0 in the mtu2 in high-impedance state. 0: does not place the pins in high-impedance state [clearing conditions] ? power-on reset ? by writing 0 to mtu2ch0hiz after reading mtu2ch0hiz = 1 1: places the pins in high-impedance state [setting condition] ? by writing 1 to mtu2ch0hiz
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 701 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 mtu2ch34hiz 0 r/w mtu2 channel 3 and 4 output high-impedance this bit specifies whether to place the high-current pins for the mtu2 in high-impedance state. 0: does not place the pins in high-impedance state [clearing conditions] ? power-on reset ? by writing 0 to mtu2ch34hiz after reading mtu2ch34hiz = 1 1: places the pins in high-impedance state [setting condition] ? by writing 1 to mtu2ch34hiz 13.3.7 port output enable co ntrol register 1 (poecr1) poecr1 is an 8-bit readable/writable register that controls high-impedance state of the pins. bit: initial value: r/w: 7654321 0 00000000 rrrrr/w * r/w * r/w * r/w * note: can be modified only once after a power-on reset. * ---- mtu2 pe3ze mtu2 pe2ze mtu2 pe1ze mtu2 pe0ze bit bit name initial value r/w description 7 to 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 3 mtu2pe3ze 0 r/w * mtu2 pe3 high-impedance enable this bit specifies whether to place the pe3/tioc0d pin for channel 0 in the mtu2 in high-impedance state when either poe8f or mtu2ch0hiz bit is set to 1. 0: does not place the pin in high-impedance state 1: places the pin in high-impedance state
section 13 port output enable (poe) page 702 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 mtu2pe2ze 0 r/w * mtu2 pe2 high-impedance enable this bit specifies whether to place the pe2/tioc0c pin for channel 0 in the mtu2 in high-impedance state when either poe8f or mtu2ch0hiz bit is set to 1. 0: does not place the pin in high-impedance state 1: places the pin in high-impedance state 1 mtu2pe1ze 0 r/w * mtu2 pe1 high-impedance enable this bit specifies whether to place the pe1/tioc0b pin for channel 0 in the mtu2 in high-impedance state when either poe8f or mtu2ch0hiz bit is set to 1. 0: does not place the pin in high-impedance state 1: places the pin in high-impedance state 0 mtu2pe0ze 0 r/w * mtu2 pe0 high-impedance enable this bit specifies whether to place the pe0/tioc0a pin for channel 0 in the mtu2 in high-impedance state when either poe8f or mtu2ch0hiz bit is set to 1. 0: does not place the pin in high-impedance state 1: places the pin in high-impedance state note: * can be modified only once after a power-on reset.
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 703 of 1560 mar 18, 2011 sh7080 group 13.3.8 port output enable co ntrol register 2 (poecr2) poecr2 is a 16-bit readable/writable register that controls high-impedance state of the pins. bit: initial value: r/w: 151413121110987654321 0 0111011100000000 rr/w * r/w * r/w * rr/w * r/w * r/w * rr/w * r/w * r/w * rr/w * r/w * r/w * note: can be modified only once after a power-on reset. * - mtu2 p1cze mtu2 p2cze mtu2 p3cze - mtu2s p1cze mtu2s p2cze mtu2s p3cze - mtu2s p4cze mtu2s p5cze mtu2s p6cze - mtu2s p7cze mtu2s p8cze mtu2s p9cze bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 mtu2p1cze 1 r/w * mtu2 port 1 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2 high-current pe9/tioc3b and pe11/tioc3d pins and to place them in high- impedance state when the osf1 bit is set to 1 while the oce1 bit is 1 or when any one of the poe0f, poe1f, poe2f, poe3f, a nd mtu2ch34hiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state
section 13 port output enable (poe) page 704 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 13 mtu2p2cze 1 r/w * mtu2 port 2 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2 high-current pe12/tioc4a and pe14/tioc4c pins and to place them in high- impedance state when the osf1 bit is set to 1 while the oce1 bit is 1 or when any one of the poe0f, poe1f, poe2f, poe3f, a nd mtu2ch34hiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state 12 mtu2p3cze 1 r/w * mtu2 port 3 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2 high-current pe13/tioc4b and pe15/tioc4d pins and to place them in high- impedance state when the osf1 bit is set to 1 while the oce1 bit is 1 or when any one of the poe0f, poe1f, poe2f, poe3f, a nd mtu2ch34hiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 705 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 mtu2sp1cze 1 r/w * mtu2s port 1 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2s high-current pe16/tioc3bs and pe17/tioc3ds pins and to place them in high- impedance state when the osf2 bit is set to 1 while the oce2 bit is 1 or when any one of the poe4f, poe5f, poe6f, poe7f, a nd mtu2shiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state 9 mtu2sp2cze 1 r/w * mtu2s port 2 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2s high-current pe18/tioc4as and pe20/tioc4cs pins and to place them in high- impedance state when the osf2 bit is set to 1 while the oce2 bit is 1 or when any one of the poe4f, poe5f, poe6f, poe7f, a nd mtu2shiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state 8 mtu2sp3cze 1 r/w * mtu2s port 3 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2s high-current pe19/tioc4bs and pe21/tioc4ds pins and to place them in high- impedance state when the osf2 bit is set to 1 while the oce2 bit is 1 or when any one of the poe4f, poe5f, poe6f, poe7f, a nd mtu2shiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state
section 13 port output enable (poe) page 706 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 mtu2sp4cze 0 r/w * mtu2s port 4 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2s high-current pd9/tioc3bs and pd11/tioc3ds pins and to place them in high- impedance state when the osf2 bit is set to 1 while the oce2 bit is 1 or when any one of the poe4f, poe5f, poe6f, poe7f, a nd mtu2shiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state 5 mtu2sp5cze 0 r/w * mtu2s port 5 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2s high-current pd12/tioc4as and pd14/tioc4cs pins and to place them in high- impedance state when the osf2 bit is set to 1 while the oce2 bit is 1 or when any one of the poe4f, poe5f, poe6f, poe7f, a nd mtu2shiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 707 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 mtu2sp6cze 0 r/w * mtu2s port 6 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2s high-current pd13/tioc4bs and pd15/tioc4ds pins and to place them in high- impedance state when the osf2 bit is set to 1 while the oce2 bit is 1 or when any one of the poe4f, poe5f, poe6f, poe7f, a nd mtu2shiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 mtu2sp7cze 0 r/w * mtu2s port 7 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2s high-current pd29/tioc3bs and pd28/tioc3ds pins and to place them in high- impedance state when the osf2 bit is set to 1 while the oce2 bit is 1 or when any one of the poe4f, poe5f, poe6f, poe7f, a nd mtu2shiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state
section 13 port output enable (poe) page 708 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 mtu2sp8cze 0 r/w * mtu2s port 8 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2s high-current pd27/tioc4as and pd25/tioc4cs pins and to place them in high- impedance state when the osf2 bit is set to 1 while the oce2 bit is 1 or when any one of the poe4f, poe5f, poe6f, poe7f, a nd mtu2shiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state 0 mtu2sp9cze 0 r/w * mtu2s port 9 output comparison/high-impedance enable this bit specifies whether to compare output levels for the mtu2s high-current pd26/tioc4bs and pd24/tioc4ds pins and to place them in high- impedance state when the osf2 bit is set to 1 while the oce2 bit is 1 or when any one of the poe4f, poe5f, poe6f, poe7f, a nd mtu2shiz bits is set to 1. 0: does not compare output levels or place the pins in high-impedance state 1: compares output levels and places the pins in high-impedance state note: * can be modified only once after a power-on reset.
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 709 of 1560 mar 18, 2011 sh7080 group 13.4 operation table 13.4 shows the target pins for high-impedance control and conditions to place the pins in high-impedance state. table 13.4 target pins and condi tions for high-i mpedance control pins conditions detailed conditions mtu2 high-current pins (pe9/tioc3b and pe11/tioc3d) input level detection, output level comparison, or spoer setting mtu2p1cze ? ((poe3f + poe2f + poe1f + poe0f) + (osf1 ? oce1) + (mtu2ch34hiz)) mtu2 high-current pins (pe12/tioc4a and pe14/tioc4c) input level detection, output level comparison, or spoer setting mtu2p2cze ? ((poe3f + poe2f + poe1f + poe0f) + (osf1 ? oce1) + (mtu2ch34hiz)) mtu2 high-current pins (pe13/tioc4b and pe15/tioc4d) input level detection, output level comparison, or spoer setting mtu2p3cze ? ((poe3f + poe2f + poe1f + poe0f) + (osf1 ? oce1) + (mtu2ch34hiz)) mtu2s high-current pins (pe16/tioc3bs and pe17/tioc3ds) input level detection, output level comparison, or spoer setting mtu2sp1cze ? ((poe4f + poe5f + poe6f + poe7f) + (osf2 ? oce2) + (mtu2shiz)) mtu2s high-current pins (pe18/tioc4as and pe20/tioc4cs) input level detection, output level comparison, or spoer setting mtu2sp2cze ? ((poe4f + poe5f + poe6f + poe7f) + (osf2 ? oce2) + (mtu2shiz)) mtu2s high-current pins (pe19/tioc4bs and pe21/tioc4ds) input level detection, output level comparison, or spoer setting mtu2sp3cze ? ((poe4f + poe5f + poe6f + poe7f) + (osf2 ? oce2) + (mtu2shiz)) mtu2s high-current pins (pd9/tioc3bs and pd11/tioc3ds) input level detection, output level comparison, or spoer setting mtu2sp4cze ? ((poe4f + poe5f + poe6f + poe7f) + (osf2 ? oce2) + (mtu2shiz)) mtu2s high-current pins (pd12/tioc4as and pd14/tioc4cs) input level detection, output level comparison, or spoer setting mtu2sp5cze ? ((poe4f + poe5f + poe6f + poe7f) + (osf2 ? oce2) + (mtu2shiz)) mtu2s high-current pins (pd13/tioc4bs and pd15/tioc4ds) input level detection, output level comparison, or spoer setting mtu2sp6cze ? ((poe4f + poe5f + poe6f + poe7f) + (osf2 ? oce2) + (mtu2shiz)) mtu2s high-current pins (pd29/tioc3bs and pd28/tioc3ds) input level detection, output level comparison, or spoer setting mtu2sp7cze ? ((poe4f + poe5f + poe6f + poe7f) + (osf2 ? oce2) + (mtu2shiz))
section 13 port output enable (poe) page 710 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pins conditions detailed conditions mtu2s high-current pins (pd27/tioc4as and pd25/tioc4cs) input level detection, output level comparison, or spoer setting mtu2sp8cze ? ((poe4f + poe5f + poe6f + poe7f) + (osf2 ? oce2) + (mtu2shiz)) mtu2s high-current pins (pd26/tioc4bs and pd24/tioc4ds) input level detection, output level comparison, or spoer setting mtu2sp9cze ? ((poe4f + poe5f + poe6f + poe7f) + (osf2 ? oce2) + (mtu2shiz)) mtu2 channel 0 pin (pe0/tioc0a) input level detection or spoer setting mtu2pe0ze ((poe8f ? poe8e) + (mtu2ch0hiz)) mtu2 channel 0 pin (pe1/tioc0b) input level detection or spoer setting mtu2pe1ze ((poe8f ? poe8e) + (mtu2ch0hiz)) mtu2 channel 0 pin (pe2/tioc0c) input level detection or spoer setting mtu2pe2ze ((poe8f ? poe8e) + (mtu2ch0hiz)) mtu2 channel 0 pin (pe3/tioc0d) input level detection or spoer setting mtu2pe3ze ((poe8f ? poe8e) + (mtu2ch0hiz))
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 711 of 1560 mar 18, 2011 sh7080 group 13.4.1 input level detection operation if the input conditions set by icsr1 to icsr3 occur on the poe0 to poe8 pins, the high-current pins and the pins for channel 0 of the mtu2 ar e placed in high-impedance state. note however, that these high-current and mtu2 pins enter high-impedance state only when general input/output function, mtu2 function, or mtu2s function is selected for these pins. (1) falling edge detection when a change from a high to low level is input to the poe0 to poe8 pins, the high-current pins and the pins for channel 0 of the mtu2 are pl aced in high-impedance state. figure 13.2 shows a sample timing after the level changes in input to the poe0 to poe8 pins until the respective pins enter high-impedance state. p poe input pe9/tioc3b p rising edge falling edge detection high-impedance state * note: * the other high-current pins also enter the high-impedance state in the similar timing. figure 13.2 falling edge detection (2) low-level detection figure 13.3 shows the low-level detection operation. sixteen continuous low levels are sampled with the sampling clock selected by icsr1 to icsr3. if even one high level is detected during this interval, the low leve l is not accepted. the timing when the high-current pins enter the high-impedance state after the sampling clock is input is the same in both falling-edge detection and in low-level detection.
section 13 port output enable (poe) page 712 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group p sampling clock 3 poe input pe9/ tioc3b when low level is sampled at all points when high level is sampled at least once flag set ( poe received) flag not set high-impedance state * note: * other high-current pins also go to the high-impedance state at the same timing. 2 1 2 1 16 13 8/16/128 clock cycles figure 13.3 low-level detection operation 13.4.2 output-level co mpare operation figure 13.4 shows an example of the output-level compare operation for the combination of tioc3b and tioc3d. the operation is the same for the other pin combinations. p pe11/ tioc3d pe9/ tioc3b low level overlapping detected high impedance state figure 13.4 output-lev el compare operation
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 713 of 1560 mar 18, 2011 sh7080 group 13.4.3 release from high-impedance state high-current pins that have entered high-impedance state due to input-level detection can be released either by returning them to their initial state with a power-on reset, or by clearing all of the flags in bits 12 to 15 (poe0f to poe8f) of icsr1 to icsr3. however, note that when low- level sampling is selected by bits 0 to 7 in icsr1 to icsr3, just writing 0 to a flag is ignored (the flag is not cleared); flags can be cleared by writing 0 to it only after a high level is input to the poe pin and is sampled. high-current pins that have entered high-impedance state due to output-level detection can be released either by returning them to their initial state with a power-on reset, or by clearing the flag in bit 15 (ocf1 and ocf2) in ocsr1 and ocsr2. however, note that just writing 0 to a flag is ignored (the flag is not cleared); flags can be cleared only after an inactive level is output from the high-current pins. inactive-level outputs can be achieved by setting the mtu2 and mtu2s internal registers.
section 13 port output enable (poe) page 714 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 13.5 interrupts the poe issues a request to generate an interrupt when the specified condition is satisfied during input level detection or output level comparison. table 13.5 shows the interrupt sources and their conditions. table 13.5 interrupt sources and conditions name interrupt source interrupt flag condition oei1 output enable interrupt 1 poe3f, poe2f, poe1f, poe0f, and osf1 pie1 ? (poe3f + poe2f + poe1f + poe0f) + oie1 ? osf1 oei3 output enable interrupt 3 poe8f pie3 ? poe8f oei2 output enable interrupt 2 poe4f, poe5f, poe6f, poe7f, and osf2 pie2 ? (poe4f + poe5f + poe6f + poe7f) + oie2 ? osf2
section 13 port output enable (poe) r01uh0198ej0500 rev. 5.00 page 715 of 1560 mar 18, 2011 sh7080 group 13.6 usage note 13.6.1 pin state when a power-on reset is issued from the watchdog timer when a power-on reset is issued from the watchdog timer (wdt), initialization of the pin function controller (pfc) sets initial values that select the general input function for the i/o ports. however, when a power-on reset is issued from the wdt while a pin is being handled as high impedance by the port output enable (poe), the pin is placed in the output state for one cycle of the peripheral clock (p ), after which the function is switched to general input. this also occurs when a power-on reset is issued from the wdt for pins that are being handled as high impedance due to short-circuit detection by the mtu2 and mtu2s. figure 13.5 shows the state of a pin for which the poe input has selected high impedance handling with the timer output selected when a power-on reset is issued from the wdt. timer output pin state general input timer output general input high impedance state timer output 1p cycle poe input p pfc setting value power-on reset by wdt figure 13.5 pin state when a power-on reset is issued from the watchdog timer
section 13 port output enable (poe) page 716 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 14 watchdog timer (wdt) r01uh0198ej0500 rev. 5.00 page 717 of 1560 mar 18, 2011 sh7080 group section 14 watchdog timer (wdt) this lsi includes the watchdog timer (wdt). this lsi can be reset by the overflow of the counter when the value of the counter has not been updated because of a system runaway. the watchdog timer (wdt) is a single-channel timer that uses a peripheral clock as an input and counts the clock settling time when re voking software standby mode. it can also be used as an interval timer. 14.1 features ? can be used to ensure the clock settling time: use the wdt to revoke software standby mode. ? can switch between watchdog timer mode and interval timer mode. ? generates internal resets in watchdog timer mode: internal resets occur after counter overflow. ? an interrupt is generated in interval timer mode an interval timer interrupt is generated when the counter overflows. ? choice of eight counter input clocks eight clocks ( 1 to 1/4096) that are obtained by dividing the peripheral clock can be chosen. ? choice of two resets power-on reset and manual reset are available. figure 14.1 shows a block diagram of the wdt.
section 14 watchdog timer (wdt) page 718 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group wtcsr standby control bus interface wtcnt divider clock selector internal bus clock standby mode peripheral clock (p ) standby cancellation reset control clock selection wdt overflow wdtovf internal reset request interrupt control interrupt request [legend] wtcsr: wtcnt: watchdog timer control/status register watchdog timer counter figure 14.1 block diagram of wdt
section 14 watchdog timer (wdt) r01uh0198ej0500 rev. 5.00 page 719 of 1560 mar 18, 2011 sh7080 group 14.2 input/output pin for wdt table 14.1 lists the wdt pin configuration. table 14.1 wdt pin configuration pin name symbol i/o description watchdog timer overflow wdtovf output when an overflow occurs in watchdog timer mode, an internal reset is generated and this pin outputs the low level for one clock cycle specified by the cks2 to cks0 bits in wtcsr.
section 14 watchdog timer (wdt) page 720 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 14.3 register descriptions the wdt has the following two registers. refer to section 27, list of registers, for the details of the addresses of these registers and the state of registers in each operating mode. table 14.2 register configuration register name abbrevia- tion r/w initial value address access size watchdog timer counter wtcnt r/w h'00 h'ffffe810 8, 16 watchdog timer control/status register wtcsr r/w h'00 h'ffffe812 8, 16 14.3.1 watchdog timer counter (wtcnt) wtcnt is an 8-bit readable/writable register th at increments on the selected clock. when an overflow occurs, it generates a reset in watchdog timer mode and an interrupt in interval time mode. the wtcnt counter is not initialized by an internal reset due to the wdt overflow. the wtcnt counter is initialized to h'00 only by a power-on reset using the res pin. use a word access to write to the wtcnt counter, with h'5a in the upper byte. use a byte access to read wtcnt. note: wtcnt differs from other registers in that it is more difficult to write to. see section 14.3.3, notes on register access, for details. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w
section 14 watchdog timer (wdt) r01uh0198ej0500 rev. 5.00 page 721 of 1560 mar 18, 2011 sh7080 group 14.3.2 watchdog timer control/s tatus register (wtcsr) wtcsr is an 8-bit readable/writabl e register composed of bits to select the clock used for the count, bits to select the timer mode, and overflow flags. wtcsr holds its value in an internal reset due to the wdt overflow. wtcsr is initialized to h'00 only by a power-on reset using the res pin. when used to count the clock settling time for re voking a software standby, it retains its value after counter overflow. use a word access to write to wtcsr, with h'a5 in the upper byte. use a byte access to read wtcsr. note: wtcsr differs from other registers in that it is more difficult to write to. see section 14.3.3, notes on register access, for details. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w tme wt/it rsts wovf iovf cks[2:0] bit bit name initial value r/w description 7 tme 0 r/w timer enable starts and stops timer operation. clear this bit to 0 when using the wdt to revoke software standby mode. 0: timer disabled: count-up stops and wtcnt value is retained 1: timer enabled 6 wt/it 0 r/w timer mode select selects whether to use the wdt as a watchdog timer or an interval timer. 0: interval timer mode 1: watchdog timer mode note: if wt/it is modified when the wdt is operating, the up-count may not be performed correctly.
section 14 watchdog timer (wdt) page 722 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 rsts 0 r/w reset select selects the type of reset when the wtcnt overflows in watchdog timer mode. in interval timer mode, this setting is ignored. 0: power-on reset 1: manual reset 4 wovf 0 r/w watchdog timer overflow indicates that the wtcnt has overflowed in watchdog timer mode. this bit is not set in interval timer mode. 0: no overflow 1: wtcnt has overflowed in watchdog timer mode 3 iovf 0 r/w interval timer overflow indicates that the wtcnt has overflowed in interval timer mode. this bit is not set in watchdog timer mode. 0: no overflow 1: wtcnt has overflowed in interval timer mode 2 to 0 cks[2:0] 000 r/w clock select 2 to 0 these bits select the clock to be used for the wtcnt count from the eight types obtainable by dividing the peripheral clock (p ). the overflow period that is shown inside the parenthesis in the table is the value when the peripheral clock (p ) is 40 mhz. 000: p (6.4 s) 001: p /4 (25.6 s) 010: p /16 (102.4 s) 011: p /32 (204.8 s) 100: p /64 (409.6 s) 101: p /256 (1.64 ms) 110: p /1024 (6.55 ms) 111: p /4096 (26.21 ms) note: if bits cks2 to cks0 are modified when the wdt is operating, the up-count may not be performed correctly. ensure that these bits are modified only when the wdt is not operating.
section 14 watchdog timer (wdt) r01uh0198ej0500 rev. 5.00 page 723 of 1560 mar 18, 2011 sh7080 group 14.3.3 notes on register access the watchdog timer counter (wtcnt) and watchdog timer control/status register (wtcsr) are more difficult to write to than other registers. the procedure for writing to these registers is given below. writing to wtcnt and wtcsr: these registers must be written by a word transfer instruction. they cannot be written by a byte or longword transfer instruction. when writing to wtcnt, set the upper byte to h'5a and transfer the lower byte as the write data, as shown in figure 14.2. when writing to wtcsr, set the upper byte to h'a5 and transfer the lower byte as the write data. this transfer procedure writes the lower byte data to wtcnt or wtcsr. 15 8 7 0 h'5a write data address: h'ffffe810 wtcnt write 15 8 7 0 h'a5 write data address: h'ffffe812 wtcsr write figure 14.2 writing to wtcnt and wtcsr
section 14 watchdog timer (wdt) page 724 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 14.4 operation 14.4.1 revoking software standbys the wdt can be used to revoke software standby mode with an nmi interrupt or external interrupt (irq). the procedure is described below. (the wdt does not run when resets are used for revoking, so keep the res pin low until the clock stabilizes.) 1. before transition to software standby mode, always clear the tme bit in wtcsr to 0. when the tme bit is 1, an erroneous reset or interval timer interrupt may be generated when the count overflows. 2. set the type of count clock used in the cks2 to cks0 bits in wtcsr and the initial values for the counter in the wtcnt counter. these va lues should ensure that the time till count overflow is longer than the clock oscillation settling time. 3. transition to software standby mode by ex ecuting a sleep instruction to stop the clock. 4. the wdt starts counting by detecting a change in the level input to the nmi or irq pin. 5. when the wdt count overflows, the cpg starts supplying the clock and the lsi resumes operation. the wovf flag in wtcsr is not set when this happens. 14.4.2 using watchdog timer mode while operating in watchdog timer mode, the wdt generates an internal reset of the type specified by the rsts bit in wtcsr and asserts a signal through the wdtovf pin every time the counter overflows. 1. set the wt/it bit in wtcsr to 1, set the reset type in the rsts bit, set the type of count clock in the cks2 to cks0 bits, and set th e initial value of the counter in the wtcnt counter. 2. set the tme bit in wtcsr to 1 to start the count in watchdog timer mode. 3. while operating in watchdog timer mode, rewrite the counter periodically to prevent the counter from overflowing. 4. when the counter overflows, the wdt sets the wovf flag in wtcsr to 1, asserts a signal through the wdtovf pin for one cycle of the count clock specified by the cks2 to cks0 bits, and generates a reset of the type specified by the rsts bit. the counter then resumes counting.
section 14 watchdog timer (wdt) r01uh0198ej0500 rev. 5.00 page 725 of 1560 mar 18, 2011 sh7080 group wtcnt value h'ff h'00 wdtovf signal internal reset signal (power-on reset selected) overflow occurs h'00 is written to wtcnt wt/it = 1 tme = 1 h'00 is written to wtcnt count starts wovf = 1 wdtovf is asserted and an internal reset is generated 32 p clock 3 p + one cycle of count clock internal reset signal (manual reset selected) 18 p clock time figure 14.3 operation in watchdog timer mode (when wtcnt count clock is specified to p /32 by cks2 to cks0) 14.4.3 using interval timer mode when operating in interval timer mode, interval timer interrupts are generated at every overflow of the counter. this enables interrupts to be generated at set periods. 1. clear the wt/it bit in wtcsr to 0, set the type of count clock in the cks2 to cks0 bits, and set the initial value of the co unter in the wtcnt counter. 2. set the tme bit in wtcsr to 1 to start the count in interval timer mode. 3. when the counter overflows, the wdt sets the iovf flag in wtcsr to 1 and an interval timer interrupt request is sent to the intc. the counter then resumes counting.
section 14 watchdog timer (wdt) page 726 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 14.5 interrupt source the wdt has one interrupt source: the interval timer interrupt (iti). table 14.3 shows this interrupt source. an interval timer interrupt (iti) is generated when the interval timer overflow flag bit (iovf) in the watchdog timer control status register (wtscr) is set to 1. the interrupt request is canceled by clearing the interrupt flag to 0. table 14.3 interrupt source name interrupt source interrupt enable bit interrupt flag bit iti interval timer interrupt ? interval timer overflow flag (iovf) 14.6 usage note 14.6.1 wtcnt setting value if wtcnt is set to h'ff in interval timer mode, overflow does not occur when wtcnt changes from h'ff to h'00 after one cycle of count clock, but overflow occurs when wtcnt changes from h'ff to h'00 after 257 cycles of count clock. if wtcnt is set to h'ff in watchdog timer mode, overflow occurs when wtcnt changes from h'ff to h'00 after one cycle of count clock.
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 727 of 1560 mar 18, 2011 sh7080 group section 15 serial communication interface (sci) this lsi has three independent serial communication interface (sci) channels. the sci can handle both asynchronous and clock synchronous serial communication. in asynchronous serial communication mode, serial data communication can be carried out with standard asynchronous communication chips such as a universal asynchronous receiver/transmitter (uart) or asynchronous communication interface adapter (acia). a function is also provided for serial communication between processors (multiprocessor communication function). 15.1 features ? choice of asynchronous or clock synchronous serial communication mode ? asynchronous mode: ? serial data communication is performed by start-stop in character units. the scif can communicate with a universal asynchronous r eceiver/transmitter (uart), an asynchronous communication interface adapter (acia), or an y other communications chip that employs a standard asynchronous serial system. th ere are twelve selectable serial data communication formats. ? data length: 7 or 8 bits ? stop bit length: 1 or 2 bits ? parity: even, odd, or none ? multiprocessor communications ? receive error detection: parity , overrun, and framing errors ? break detection: break is detected by reading the rxd pin level directly when a framing error occurs. ? clock synchronous mode: ? serial data communication is synchronized w ith a clock signal. the scif can communicate with other chips having a clock synchronous communication function. ? data length: 8 bits ? receive error detection: overrun errors ? full duplex communication: the transmitting and r eceiving sections are independent, so the sci can transmit and receive simultaneously. bo th sections use double buffering, so high- speed continuous data transfer is possible in both the transmit and receive directions. ? on-chip baud rate generator with selectable bit rates ? internal or external transmit/receive clock source: from either baud rate generator (internal clock) or sck pin (external clock)
section 15 serial communication interface (sci) page 728 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? choice of lsb-first or msb-first data transfer (except for 7-bit data in asynchronous mode) ? four types of interrupts: there are four interrupt sources, transmit-data-empty, transmit end, receive-data-full, and receive error interr upts, and each interrupt can be requested independently. the data transfer controller (dtc) or the direct memory access controller (dmac) can be activated by the transmit-data-emp ty interrupt or receive -data-full interrupt to transfer data. ? module standby mode can be set figure 15.1 shows a block diagram of the sci. receive shift register receive data register transmit shift register transmit data register serial mode register serial control register serial status register bit rate register serial port register serial direction control register internal data bus p scrdr module data bus sctdr scrsr sctsr scssr scsmr scsptr scscr scsdcr scbrr transmission/reception control baud rate generator clock tei txi rxi eri external clock parity generation parity check p /4 p /16 p /64 sck txd rxd sci [legend] scrsr: scrdr: sctsr: sctdr: scsmr: scscr: scssr: scbrr: scsptr: scsdcr: bus interface figure 15.1 block diagram of sci
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 729 of 1560 mar 18, 2011 sh7080 group 15.2 input/output pins the sci has the serial pins summarized in table 15.1. table 15.1 pin configuration channel pin name * i/o function 0 sck0 i/o sci0 clock input/output rxd0 input sci0 receive data input txd0 output sci0 transmit data output 1 sck1 i/o sci1 clock input/output rxd1 input sci1 receive data input txd1 output sci1 transmit data output 2 sck2 i/o sci2 clock input/output rxd2 input sci2 receive data input txd2 output sci2 transmit data output note: * pin names sck, rxd, and txd are used in the description for all channels, omitting the channel designation.
section 15 serial communication interface (sci) page 730 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 15.3 register descriptions the sci has the following register s for each channel. for details on register addresses and register states during each processing, refer to section 27, list of registers. table 15.2 register configuration chan- nel register name abbrevia- tion r/w initial value address access size 0 serial mode register_0 scsmr_0 r/w h'00 h'ffffc000 8 bit rate register_0 scbrr_0 r/w h'ff h'ffffc002 8 serial control register_0 scscr_0 r/w h'00 h'ffffc004 8 transmit data register_0 sctdr_0 ? ? h'ffffc006 8 serial status register_0 scssr_0 r/w h'84 h'ffffc008 8 receive data register_0 scrdr_0 ? ? h'ffffc00a 8 serial direction control register_0 scsdcr_0 r/w h'f2 h'ffffc00c 8 serial port register_0 scsptr_0 r/w h'0x h'ffffc00e 8 1 serial mode register_1 scsmr_1 r/w h'00 h'ffffc080 8 bit rate register_1 scbrr_1 r/w h'ff h'ffffc082 8 serial control register_1 scscr_1 r/w h'00 h'ffffc084 8 transmit data register_1 sctdr_1 ? ? h'ffffc086 8 serial status register_1 scssr_1 r/w h'84 h'ffffc088 8 receive data register_1 scrdr_1 ? ? h'ffffc08a 8 serial direction control register_1 scsdcr_1 r/w h'f2 h'ffffc08c 8 serial port register_1 scsptr_1 r/w h'0x h'ffffc08e 8 2 serial mode register_2 scsmr_2 r/w h'00 h'ffffc100 8 bit rate register_2 scbrr_2 r/w h'ff h'ffffc102 8 serial control register_2 scscr_2 r/w h'00 h'ffffc104 8 transmit data register_2 sctdr_2 ? ? h'ffffc106 8 serial status register_2 scssr_2 r/w h'84 h'ffffc108 8 receive data register_2 scrdr_2 ? ? h'ffffc10a 8 serial direction control register_2 scsdcr_2 r/w h'f2 h'ffffc10c 8 serial port register_2 scsptr_2 r/w h'0x h'ffffc10e 8
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 731 of 1560 mar 18, 2011 sh7080 group 15.3.1 receive shift register (scrsr) scrsr receives serial data. data input at the rxd pin is loaded into scrsr in the order received, lsb (bit 0) first, converting the data to parallel form. when one byte has been received, it is automatically transferred to scrdr. the cpu cannot read or write to scrsr directly. bit: initial value: r/w: 7654321 0 -------- -------- 15.3.2 receive data register (scrdr) scrdr is a register that stores serial receive da ta. after receiving one byte of serial data, the sci transfers the received data from the receive shif t register (scrsr) into scrdr for storage and completes operation. after that, sc rsr is ready to receive data. since scrsr and scrdr work as a double buffer in this way, data can be received continuously. scrdr is a read-only register and cannot be written to by the cpu. bit: initial value: r/w: 7654321 0 -------- -------- 15.3.3 transmit shift register (sctsr) sctsr transmits serial data. the sci loads transmit data from the transmit data register (sctdr) into sctsr, then transmits the data serially from the txd pin, lsb (bit 0) first. after transmitting one data byte, the sci automatically loads the next transmit data from sctdr into sctsr and starts transmitting again. if the tdre flag in the serial status register (scssr) is set to 1, the sci does not transfer data from sctdr to sctsr. the cpu cannot read or write to sctsr directly. bit: initial value: r/w: 7654321 0 -------- --------
section 15 serial communication interface (sci) page 732 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 15.3.4 transmit data register (sctdr) sctdr is an 8-bit register that stores data for serial transmission. when the sci detects that the transmit shift register (sctsr) is empty, it moves transmit data written in the sctdr into sctsr and starts serial transmission. if the next transmit data has been written to sctdr during serial transmission from sctsr, the sci can tran smit data continuously. sctdr can always be written or read to by the cpu. bit: initial value: r/w: 7654321 0 -------- -------- 15.3.5 serial mode register (scsmr) scsmr is an 8-bit register that specifies the sci serial comm unication format and selects the clock source for the baud rate generator. the cpu can always read and write to scsmr. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w c/ a chr pe o/ e stop mp cks[1:0] bit bit name initial value r/w description 7 c/ a 0 r/w communication mode selects whether the sci operates in asynchronous or clock synchronous mode. 0: asynchronous mode 1: clock synchronous mode 6 chr 0 r/w character length selects 7-bit or 8-bit data in asynchronous mode. in the clock synchronous mode, the data length is always eight bits, regardless of the chr setting. when 7-bit data is selected, the msb (bit 7) of the transmit data register is not transmitted. 0: 8-bit data 1: 7-bit data
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 733 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 pe 0 r/w parity enable selects whether to add a parity bit to transmit data and to check the parity of receive data, in asynchronous mode. in clock synchronous mode, a parity bit is neither added nor checked, regardless of the pe setting. 0: parity bit not added or checked 1: parity bit added and checked * note: * when pe is set to 1, an even or odd parity bit is added to transmit data, depending on the parity mode (o/ e ) setting. receive data parity is checked according to the even/odd (o/ e ) mode setting. 4 o/ e 0 r/w parity mode selects even or odd parity when parity bits are added and checked. the o/ e setting is used only in asynchronous mode and only when the parity enable bit (pe) is set to 1 to enable parity addition and checking. the o/ e setting is ignored in clock synchronous mode, or in asynchronous mode when parity addition and checking is disabled. 0: even parity 1: odd parity if even parity is selected, the parity bit is added to transmit data to make an even number of 1s in the transmitted character and parity bit combined. receive data is checked to see if it has an even number of 1s in the received character and parity bit combined. if odd parity is selected, the parity bit is added to transmit data to make an odd number of 1s in the transmitted character and parity bit combined. receive data is checked to see if it has an odd number of 1s in the received character and parity bit combined.
section 15 serial communication interface (sci) page 734 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 stop 0 r/w stop bit length selects one or two bits as the stop bit length in asynchronous mode. this setting is used only in asynchronous mode. it is ignored in clock synchronous mode because no stop bits are added. 0: one stop bit * 1 1: two stop bits * 2 when receiving, only the first stop bit is checked, regardless of the stop bit setting. if the second stop bit is 1, it is treated as a stop bit, but if the second stop bit is 0, it is treated as the start bit of the next incoming character. notes: 1. when transmitting, a single 1-bit is added at the end of each transmitted character. 2. when transmitting, two 1 bits are added at the end of each transmitted character. 2 mp 0 r/w multiprocessor mode (only in asynchronous mode) enables or disables multiprocessor mode. the pe and o/ e bit settings are ignored in multiprocessor mode. 0: multiprocessor mode disabled 1: multiprocessor mode enabled 1, 0 cks[1:0] 00 r/w clock select 1 and 0 select the internal clock source of the on-chip baud rate generator. four clock sources are available. p , p /4, p /16 and p /64. for further information on the clock source, bit rate register settings, and baud rate, see section 15.3.10, bit rate register (scbrr). 00: p 01: p /4 10: p /16 11: p /64 note: p : peripheral clock
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 735 of 1560 mar 18, 2011 sh7080 group 15.3.6 serial control register (scscr) scscr is an 8-bit register th at enables or disables sci tr ansmission/reception and interrupt requests and selects the transmit/receive clock s ource. the cpu can always read and write to scscr. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w tie rie te re mpie teie cke[1:0] bit bit name initial value r/w description 7 tie 0 r/w transmit interrupt enable enables or disables a transmit-data-empty interrupt (txi) to be issued when the tdre flag in the serial status register (scssr) is set to 1 after serial transmit data is sent from the transmit data register (sctdr) to the transmit shift register (sctsr). txi can be canceled by clearing the tdre flag to 0 after reading tdre = 1 or by clearing the tie bit to 0. 0: transmit-data-empty interrupt request (txi) is disabled 1: transmit-data-empty interrupt request (txi) is enabled 6 rie 0 r/w receive interrupt enable enables or disables a receive-data-full interrupt (rxi) and a receive error interrupt (eri) to be issued when the rdrf flag in scssr is set to 1 after the serial data received is transferred from the receive shift register (scrsr) to the receive data register (scrdr). rxi can be canceled by clearing the rdrf flag after reading rdrf =1. eri can be canceled by clearing the fer, per, or orer flag to 0 after reading 1 from the flag. both rxi and eri can also be canceled by clearing the rie bit to 0. 0: receive-data-full interrupt (rxi) and receive-error interrupt (eri) requests are disabled 1: receive-data-full interrupt (rxi) and receive-error interrupt (eri) requests are enabled
section 15 serial communication interface (sci) page 736 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 te 0 r/w transmit enable enables or disables the sci serial transmitter. 0: transmitter disabled * 1 1: transmitter enabled * 2 notes: 1. the tdre flag in scssr is fixed at 1. 2. serial transmission starts after writing transmit data into sctdr and clearing the tdre flag in scssr to 0 while the transmitter is enabled. select the transmit format in the serial mode register (scsmr) before setting te to 1. 4 re 0 r/w receive enable enables or disables the sci serial receiver. 0: receiver disabled * 1 1: receiver enabled * 2 notes: 1. clearing re to 0 does not affect the receive flags (rdrf, fer, per, and orer). these flags retain their previous values. 2. serial reception starts when a start bit is detected in asynchronous mode, or synchronous clock input is detected in clock synchronous mode. select the receive format in scsmr before setting re to 1. 3 mpie 0 r/w multiprocessor interrupt enable (only when mp = 1 in scsmr in asynchronous mode) when this bit is set to 1, receive data in which the multiprocessor bit is 0 is skipped and setting of the rdrf, fer, and orer status flags in scssr is prohibited. on receiving data in which the multiprocessor bit is 1, this bit is automatically cleared to 0 and normal receiving operation is resumed. for details, refer to section 15.4.4, multiprocessor communication function.
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 737 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 teie 0 r/w transmit end interrupt enable enables or disables a transmit end interrupt (tei) to be issued when no valid transmit data is found in sctdr during msb data transmission. tei can be canceled by clearing the tend flag to 0 (by clearing the tdre flag in scssr to 0 after reading tdre = 1) or by clearing the teie bit to 0. 0: transmit end interrupt request (tei) is disabled 1: transmit end interrupt request (tei) is enabled 1, 0 cke[1:0] 00 r/w clock enable 1 and 0 select the sci clock source and enable or disable clock output from the sck pin. depending on the combination of cke1 and cke0, the sck pin can be used for serial clock output or serial clock input. when selecting the clock output in clock synchronous mode, set the c/ a bit in scsmr to 1 and then set bits cke1 and cke0. for details on clock source selection, refer to table 15.14. ? asynchronous mode 00: internal clock, sck pin used for input pin (the input signal is ignored.) 01: internal clock, sck pin used for clock output * 1 10: external clock, sck pin used for clock input * 2 11: external clock, sck pin used for clock input * 2 ? clock synchronous mode 00: internal clock, sck pin used for synchronous clock output 01: internal clock, sck pin used for synchronous clock output 10: external clock, sck pin used for synchronous clock input 11: external clock, sck pin used for synchronous clock input notes: 1. the output clock frequency is 16 times the bit rate. 2. the input clock frequency is 16 times the bit rate.
section 15 serial communication interface (sci) page 738 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 15.3.7 serial status register (scssr) scssr is an 8-bit register that contains status flags to indicate the sci operating state. the cpu can always read and write to scssr, but cannot write 1 to status flags tdre, rdrf, orer, per, and fer. these flags can be cleared to 0 only after 1 is read from the flags. the tend flag is a read-only bit and cannot be modified. bit: initial value: r/w: 7654321 0 10000100 r/(w) * r/(w) * r/(w) * r/(w) * r/(w) * r r r/w tdre rdrf orer fer per tend mpb mpbt note: writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. * bit bit name initial value r/w description 7 tdre 1 r/(w) * transmit data register empty indicates whether data has been transferred from the transmit data register (sctdr) to the transmit shift register (sctsr) and sctdr has become ready to be written with next serial transmit data. 0: indicates that sctdr holds valid transmit data [clearing conditions] ? when 0 is written to tdre after reading tdre = 1 ? when data is written to sctdr by a txi interrupt through the dmac ? when the dtc is activated by a txi interrupt and transmit data is transferred to sctdr while the disel bit of mrb in the dtc is 0 1: indicates that sctdr does not hold valid transmit data [setting conditions] ? by a power-on reset or in standby mode ? when the te bit in scscr is 0 ? when data is transferred from sctdr to sctsr and data can be written to sctdr
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 739 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 rdrf 0 r/(w) * receive data register full indicates that the received data is stored in the receive data register (scrdr). 0: indicates that valid received data is not stored in scrdr [clearing conditions] ? by a power-on reset or in standby mode ? when 0 is written to rdrf after reading rdrf = 1 ? when the scrdr data is read by an rxi interrupt through the dmac ? when the dtc is activated by an rxi interrupt and data is transferred from scrdr while the disel bit of mrb in the dtc is 0 1: indicates that valid received data is stored in scrdr [setting condition] ? when serial reception ends normally and receive data is transferred from scrsr to scrdr note: scrdr and the rdrf flag are not affected and retain their previous states even if an error is detected during data reception or if the re bit in the serial control register (scscr) is cleared to 0. if reception of the next data is completed while the rdrf flag is still set to 1, an overrun error will occur and the received data will be lost.
section 15 serial communication interface (sci) page 740 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 orer 0 r/(w) * overrun error indicates that an overrun error occurred during reception, causing abnormal termination. 0: indicates that reception is in progress or was completed successfully * 1 [clearing conditions] ? by a power-on reset or in standby mode ? when 0 is written to orer after reading orer = 1 1: indicates that an overrun error occurred during reception * 2 [setting condition] ? when the next serial reception is completed while rdrf = 1 notes: 1. the orer flag is not affected and retains its previous value when the re bit in scscr is cleared to 0. 2. the receive data prior to the overrun error is retained in scrdr, and the data received subsequently is lost. subsequent serial reception cannot be continued while the orer flag is set to 1.
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 741 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 fer 0 r/(w) * framing error indicates that a framing error occurred during data reception in asynchronous mode, causing abnormal termination. 0: indicates that reception is in progress or was completed successfully * 1 [clearing conditions] ? by a power-on reset or in standby mode ? when 0 is written to fer after reading fer = 1 1: indicates that a framing error occurred during reception [setting condition] ? when the sci founds that the stop bit at the end of the received data is 0 after completing reception * 2 notes: 1. the fer flag is not affected and retains its previous value when the re bit in scscr is cleared to 0. 2. in 2-stop-bit mode, only the first stop bit is checked for a value to 1; the second stop bit is not checked. if a framing error occurs, the receive data is transferred to scrdr but the rdrf flag is not set. subsequent serial reception cannot be continued while the fer flag is set to 1.
section 15 serial communication interface (sci) page 742 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 per 0 r/(w) * parity error indicates that a parity error occurred during data reception in asynchronous mode, causing abnormal termination. 0: indicates that reception is in progress or was completed successfully * 1 [clearing conditions] ? by a power-on reset or in standby mode ? when 0 is written to per after reading per = 1 1: indicates that a parity error occurred during reception * 2 [setting condition] ? when the number of 1s in the received data and parity does not match the even or odd parity specified by the o/ e bit in the serial mode register (scsmr). notes: 1. the per flag is not affected and retains its previous value when the re bit in scscr is cleared to 0. 2. if a parity error occurs, the receive data is transferred to scrdr but the rdrf flag is not set. subsequent serial reception cannot be continued while the per flag is set to 1.
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 743 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 tend 1 r transmit end indicates that no valid data was in sctdr during transmission of the last bit of the transmit character and transmission has ended. the tend flag is read-only and cannot be modified. 0: indicates that transmission is in progress [clearing condition] ? when 0 is written to tdre after reading tdre = 1 1: indicates that transmission has ended [setting conditions] ? by a power-on reset or in standby mode ? when the te bit in scscr is 0 ? when tdre = 1 during transmission of the last bit of a 1-byte serial transmit character note: the tend flag value becomes undefined if data is written to sctdr by activating the dmac or dtc by a txi interrupt. in this case, do not use the tend flag as the transmit end flag. 1 mpb 0 r multiprocessor bit stores the multiprocessor bit found in the receive data. when the re bit in scscr is cleared to 0, its previous state is retained. 0 mpbt 0 r/w multiprocessor bit transfer specifies the multiprocessor bit value to be added to the transmit frame. note: * writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way.
section 15 serial communication interface (sci) page 744 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 15.3.8 serial port re gister (scsptr) scsptr is an 8-bit register that controls input/output and data for the ports multiplexed with the sci function pins. data to be output through the txd pin can be specified to control break of serial transfer. through bits 3 and 2, data reading and writing through the sck pin can be specified. bit 7 enables or disables rxi interr upts. the cpu can always read and write to scsptr. when reading the value on the sci pins , use the respective port register. for details, refer to section 22, i/o ports. bit: initial value: r/w: 76543210 00000 - 01 r/w - - - r/w r/w r/w r/w eio--- spb1io spb1dt spb0io spb0dt bit bit name initial value r/w description 7 eio 0 r/w error interrupt only enables or disables rxi interrupts. while the eio bit is set to 1, the sci does not request an rxi interrupt to the cpu even if the rie bit is set to 1. 0: the rie bit enables or disables rxi and eri interrupts. while the rie bit is 1, rxi and eri interrupts are sent to the intc. 1: while the rie bit is 1, only the eri interrupt is sent to the intc. 6 to 4 ? all 0 ? reserved these bits are always read as 0. the write value should always be 0. 3 spb1io 0 r/w clock port input/output in serial port specifies the input/output direction of the sck pin in the serial port. to output the data specified in the spb1dt bit through the sck pin as a port output pin, set the c/ a bit in scsmr and the cke1 and cke0 bits in scscr to 0. 0: does not output the spb1dt bit value through the sck pin. 1: outputs the spb1dt bit value through the sck pin.
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 745 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 spb1dt undefined r/w clock port data in serial port specifies the data output through the sck pin in the serial port. output should be enabled by the spb1io bit (for details, refer to the spb1io bit description). when output is enabled, the spb1dt bit value is output through the sck pin. 0: low level is output 1: high level is output 1 spb0io 0 r/w serial port break output together with the spb0dt bit and the te bit in scscr, controls the txd pin. serial port break data together with the spb0io bit and te bit in scscr, controls the txd pin. note that the txd pin function needs to have been selected with the pin function controller (pfc). te bit setting in scscr spb0io bit setting spb0dt bit setting state of txd pin 0 0 * spb0dt output disabled (initial state) 0 1 0 output, low level 0 1 1 output, high level 1 * * output for transmit data in accord with the serial core logic 0 spb0dt 1 r/w note: * don't care
section 15 serial communication interface (sci) page 746 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 15.3.9 serial direction cont rol register (scsdcr) the dir bit in the serial direction control regi ster (scsdcr) selects lsb-first or msb-first transfer. with an 8-bit data length, lsb-first/msb-first selection is available regardless of the communication mode. bit: initial value: r/w: 7654321 0 11110010 rrrrr/wrrr ----dir--- bit bit name initial value r/w description 7 to 4 ? all 1 r reserved these bits are always read as 1. the write value should always be 1. 3 dir 0 r/w data transfer direction selects the serial/parallel conversion format. valid for an 8-bit transmit/receive format. 0: sctdr contents are transmitted in lsb-first order receive data is stored in scrdr in lsb-first 1: sctdr contents are transmitted in msb-first order receive data is stored in scrdr in msb-first 2 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 1 ? 1 r reserved this bit is always read as 1. the write value should always be 1. 0 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 747 of 1560 mar 18, 2011 sh7080 group 15.3.10 bit rate register (scbrr) scbrr is an 8-bit register that, together with the baud rate generator clock source selected by the cks1 and cks0 bits in the serial mode register (scsmr), determines th e serial transmit/receive bit rate. the cpu can always read and write to scbrr. the scbrr setting is calculated as follows: bit: initial value: r/w: 7654321 0 11111111 r/w r/w r/w r/w r/w r/w r/w r/w ? asynchronous mode: n = 10 6 - 1 64 2 2n-1 b p ? clock synchronous mode: n = 10 6 - 1 8 2 2n-1 b p b: bit rate (bits/s) n: scbrr setting for baud rate generator (0 n 255) (the setting value should satisfy the electrical characteristics.) p : operating frequency for peripheral modules (mhz) n: baud rate generator clock source (n = 0, 1, 2, 3) (for the clock sources and values of n, see table 15.3.)
section 15 serial communication interface (sci) page 748 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 15.3 scsmr settings scsmr settings n clock source cks1 cks0 0 p 0 0 1 p /4 0 1 2 p /16 1 0 3 p /64 1 1 note: the bit rate error in asynchronous is given by the following formula: error (%) = - 1 100 (n + 1) b 64 2 2n-1 p 10 6
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 749 of 1560 mar 18, 2011 sh7080 group tables 15.4 to 15.6 show examples of scbrr settings in asynchronous mode, and tables 15.7 to 15.9 show examples of scbrr settings in clock synchronous mode. table 15.4 bit rates and scbrr settings in asynchronous mode (1) p (mhz) 10 12 14 16 18 20 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) 110 2 177 -0.25 2 212 0.03 2 248 -0.17 3 70 0.03 3 79 -0.12 3 88 -0.25 150 2 129 0.16 2 155 0.16 2 181 0.16 2 207 0.16 2 233 0.16 3 64 0.16 300 2 64 0.16 2 77 0.16 2 90 0.16 2 103 0.16 2 116 0.16 2 129 0.16 600 1 129 0.16 1 155 0.16 1 181 0.16 1 207 0.16 1 233 0.16 2 64 0.16 1200 1 64 0.16 1 77 0.16 1 90 0.16 1 103 0.16 1 116 0.16 1 129 0.16 2400 0 129 0.16 0 155 0.16 0 181 0.16 0 207 0.16 0 233 0.16 1 64 0.16 4800 0 64 0.16 0 77 0.16 0 90 0.16 0 103 0.16 0 116 0.16 0 129 0.16 9600 0 32 -1.36 0 38 0.16 0 45 -0.93 0 51 0.16 0 58 -0.69 0 64 0.16 14400 0 21 -1.36 0 25 0.16 0 29 1.27 0 34 -0.79 0 38 0.16 0 42 0.94 19200 0 15 1.73 0 19 -2.34 0 22 -0.93 0 25 0.16 0 28 1.02 0 32 -1.36 28800 0 10 -1.36 0 12 0.16 0 14 1.27 0 16 2.12 0 19 -2.34 0 21 -1.36 31250 0 9 0.00 0 11 0.00 0 13 0.00 0 15 0.00 0 17 0.00 0 19 0.00 38400 0 7 1.73 0 9 -2.34 0 10 3.57 0 12 0.16 0 14 -2.34 0 15 1.73
section 15 serial communication interface (sci) page 750 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 15.5 bit rates and scbrr settings in asynchronous mode (2) p (mhz) 22 24 26 28 30 32 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) 110 3 97 -0.35 3 106 -0.44 3 114 0.36 3 123 0.23 3 132 0.13 3 141 0.03 150 3 71 -0.54 3 77 0.16 3 84 -0.43 3 90 0.16 3 97 -0.35 3 103 0.16 300 2 142 0.16 2 155 0.16 2 168 0.16 2 181 0.16 2 194 0.16 2 207 0.16 600 2 71 -0.54 2 77 0.16 2 84 -0.43 2 90 0.16 2 97 -0.35 2 103 0.16 1200 1 142 0.16 1 155 0.16 1 168 0.16 1 181 0.16 1 194 0.16 1 207 0.16 2400 1 71 -0.54 1 77 0.16 1 84 -0.43 1 90 0.16 1 97 -0.35 1 103 0.16 4800 0 142 0.16 0 155 0.16 0 168 0.16 0 181 0.16 0 194 0.16 0 207 0.16 9600 0 71 -0.54 0 77 0.16 0 84 -0.43 0 90 0.16 0 97 -0.35 0 103 0.16 14400 0 47 -0.54 0 51 0.16 0 55 0.76 0 60 -0.39 0 64 0.16 0 68 0.64 19200 0 35 -0.54 0 38 0.16 0 41 0.76 0 45 -0.93 0 48 -0.35 0 51 0.16 28800 0 23 -0.54 0 25 0.16 0 27 0.76 0 29 1.27 0 32 -1.36 0 34 -0.79 31250 0 21 0.00 0 23 0.00 0 25 0.00 0 27 0.00 0 29 0.00 0 31 0.00 38400 0 17 -0.54 0 19 -2.34 0 20 0.76 0 22 -0.93 0 23 1.73 0 25 0.16
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 751 of 1560 mar 18, 2011 sh7080 group table 15.6 bit rates and scbrr settings in asynchronous mode (3) p (mhz) 34 36 38 40 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) 110 3 150 -0.05 3 159 -0.12 3 168 -0.19 3 177 -0.25 150 3 110 -0.29 3 116 0.16 3 123 -0.24 3 129 0.16 300 2 220 0.16 2 233 0.16 2 246 0.16 3 64 0.16 600 2 110 -0.29 2 116 0.16 2 123 -0.24 2 129 0.16 1200 1 220 0.16 1 233 0.16 1 246 0.16 2 64 0.16 2400 1 110 -0.29 1 116 0.16 1 123 -0.24 1 129 0.16 4800 0 220 0.16 0 233 0.16 0 246 0.16 1 64 0.16 9600 0 110 -0.29 0 116 0.16 0 123 -0.24 0 129 0.16 14400 0 73 -0.29 0 77 0.16 0 81 0.57 0 86 -0.22 19200 0 54 0.62 0 58 -0.69 0 61 -0.24 0 64 0.16 28800 0 36 -0.29 0 38 0.16 0 40 0.57 0 42 0.94 31250 0 33 0.00 0 35 0.00 0 37 0.00 0 39 0.00 38400 0 27 -1.18 0 28 1.02 0 30 -0.24 0 32 -1.36
section 15 serial communication interface (sci) page 752 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 15.7 bit rates and scbrr settings in clock synchronous mode (1) p (mhz) 10 12 14 16 18 20 bit rate (bits/s) n n n n n n n n n n n n 250 3 155 3 187 3 218 3 249 500 3 77 3 93 3 108 3 124 3 140 3 155 1000 2 155 2 187 2 218 2 249 3 69 3 77 2500 1 249 2 74 2 87 2 99 2 112 2 124 5000 1 124 1 149 1 174 1 199 1 224 1 249 10000 0 249 1 74 1 87 1 99 1 112 1 124 25000 0 99 0 119 0 139 0 159 0 179 0 199 50000 0 49 0 59 0 69 0 79 0 89 0 99 100000 0 24 0 29 0 34 0 39 0 44 0 49 250000 0 9 0 11 0 13 0 15 0 17 0 19 500000 0 4 0 5 0 6 0 7 0 8 0 9 1000000 ? ? 0 2 ? ? 0 3 ? ? 0 4 2500000 0 0 * ? ? ? ? ? ? ? ? 0 1 5000000 ? ? ? ? ? ? ? ? 0 0 *
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 753 of 1560 mar 18, 2011 sh7080 group table 15.8 bit rates and scbrr settings in clock synchronous mode (2) p (mhz) 22 24 26 28 30 32 bit rate (bits/s) n n n n n n n n n n n n 250 500 3 171 3 187 3 202 3 218 3 233 3 249 1000 3 85 3 93 3 101 3 108 3 116 3 124 2500 2 137 2 149 2 162 2 174 2 187 2 199 5000 2 68 2 74 2 80 2 87 2 93 2 99 10000 1 137 1 149 1 162 1 174 1 187 1 199 25000 0 219 0 239 1 64 1 69 1 74 1 79 50000 0 109 0 119 0 129 0 139 0 149 0 159 100000 0 54 0 59 0 64 0 69 0 74 0 79 250000 0 21 0 23 0 25 0 27 0 29 0 31 500000 0 10 0 11 0 12 0 13 0 14 0 15 1000000 ? ? 0 5 ? ? 0 6 ? ? 0 7 2500000 ? ? ? ? ? ? ? ? 0 2 ? ? 5000000 ? ? ? ? ? ? ? ? ? ? ? ?
section 15 serial communication interface (sci) page 754 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 15.9 bit rates and scbrr settings in clock synchronous mode (3) p (mhz) 34 36 38 40 bit rate (bits/s) n n n n n n n n 250 500 1000 3 132 3 140 3 147 3 155 2500 2 212 2 224 2 237 2 249 5000 2 105 2 112 2 118 2 124 10000 1 212 1 224 1 237 1 249 25000 1 84 1 89 1 94 1 99 50000 0 169 0 179 0 189 0 199 100000 0 84 0 89 0 94 0 99 250000 0 33 0 35 0 37 0 39 500000 0 16 0 17 0 18 0 19 1000000 ? ? 0 8 ? ? 0 9 2500000 ? ? ? ? ? ? 0 3 5000000 ? ? ? ? ? ? 0 1 [legend] blank: no setting possible ? : setting possible, but error occurs * : continuous transmission/reception is disabled. note: settings with an error of 1% or less are recommended.
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 755 of 1560 mar 18, 2011 sh7080 group table 15.10 indicates the maximum bit rates in asynchronous mode when the baud rate generator is used. tables 15.11 and 15.12 list the maximum rates for external clock input. table 15.10 maximum bit rates for various frequencies with baud rate generator (asynchronous mode) settings p (mhz) maximum bit rate (bits/s) n n 10 312500 0 0 12 375000 0 0 14 437500 0 0 16 500000 0 0 18 562500 0 0 20 625000 0 0 22 687500 0 0 24 750000 0 0 26 812500 0 0 28 875000 0 0 30 937500 0 0 32 1000000 0 0 34 1062500 0 0 36 1125000 0 0 38 1187500 0 0 40 1250000 0 0
section 15 serial communication interface (sci) page 756 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 15.11 maximum bit rates with external clock input (asynchronous mode) p (mhz) external input clock (m hz) maximum bit rate (bits/s) 10 2.5000 156250 12 3.0000 187500 14 3.5000 218750 16 4.0000 250000 18 4.5000 281250 20 5.0000 312500 22 5.5000 343750 24 6.0000 375000 26 6.5000 406250 28 7.0000 437500 30 7.5000 468750 32 8.0000 500000 34 8.5000 531250 36 9.0000 562500 38 9.5000 593750 40 10.0000 625000
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 757 of 1560 mar 18, 2011 sh7080 group table 15.12 maximum bit rates with external clock input (clock synchronous mode) p (mhz) external input clock (m hz) maximum bit rate (bits/s) 10 1.6667 1666666.7 12 2.0000 2000000.0 14 2.3333 2333333.3 16 2.6667 2666666.7 18 3.0000 3000000.0 20 3.3333 3333333.3 22 3.6667 3666666.7 24 4.0000 4000000.0 26 4.3333 4333333.3 28 4.6667 4666666.7 30 5.0000 5000000.0 32 5.3333 5333333.3 34 5.6667 5666666.7 36 6.0000 6000000.0 38 6.3333 6333333.3 40 6.6667 6666666.7
section 15 serial communication interface (sci) page 758 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 15.4 operation 15.4.1 overview for serial communication, the sci has an asynchronous mode in which characters are synchronized individually, and a clock synchronous mode in which communication is synchronized with clock pulses. asynchronous or clock synchronous mode is selected and the transmit format is specified in the serial mode register (scsmr) as shown in table 15.13. the sci clock source is selected by the combination of the c/ a bit in scsmr and the cke1 and cke0 bits in the serial control register (scscr) as shown in table 15.14. (1) asynchronous mode ? data length is selectable: 7 or 8 bits. ? parity bit is selectable. so is the stop bit length (1 or 2 bits). the combination of the preceding selections constitutes the communication format and character length. ? in receiving, it is possible to detect framing er rors, parity errors, overrun errors, and breaks. ? an internal or external clock can be selected as the sci clock source. ? when an internal clock is selected, the sci operates using the clock supplied by the on- chip baud rate generator and can output a clock with a frequency 16 times the bit rate. ? when an external clock is sel ected, the external clock input must have a frequency 16 times the bit rate. (the on-chip baud rate generator is not used.) (2) clock synchronous mode ? the transmission/reception format has a fixed 8-bit data length. ? in receiving, it is possible to detect overrun errors. ? an internal or external clock can be selected as the sci clock source. ? when an internal clock is selected, the sci operates using the on-chip baud rate generator, and outputs a serial clock signal to external devices. ? when an external clock is selected, the sci operates on the input serial clock. the on-chip baud rate generator is not used.
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 759 of 1560 mar 18, 2011 sh7080 group table 15.13 scsmr settings and sci communication formats scsmr settings sci communication format bit 7 c/ a bit 6 chr bit 5 pe bit 3 stop mode data length parity bit stop bit length 0 0 0 0 8-bit not set 1 bit 1 2 bits 1 0 set 1 bit 1 2 bits 1 0 0 7-bit not set 1 bit 1 2 bits 1 0 set 1 bit 1 asynchronous 2 bits 1 x x x clock synchronous 8-bit not set none [legend] x: don't care table 15.14 scsmr and scscr setting s and sci clock source selection scsmr scscr settings bit 7 c/ a bit 1 cke1 bit 0 cke0 mode clock source sck pin function 0 0 0 asynchronous internal sci does not use the sck pin. 1 clock with a frequency 16 times the bit rate is output. 1 0 1 external input a clock with frequency 16 times the bit rate. 1 0 0 internal serial clock is output. 1 clock synchronous 1 0 external input the serial clock. 1
section 15 serial communication interface (sci) page 760 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 15.4.2 operation in asynchronous mode in asynchronous mode, each transmitted or received character begins with a start bit and ends with a stop bit. serial communication is s ynchronized one character at a time. the transmitting and receiving sections of the sci are independent, so full duplex communication is possible. both the transmitter and receiver have a double-buffered structure so that data can be read or written during transmission or recep tion, enabling continuous data transfer. figure 15.2 shows the general format of asynchronous serial communication. in asynchronous serial communication, the communica tion line is normally held in the mark (high) state. the sci monitors the line and starts se rial communication when the line goes to the space (low) state, indicating a start bit. one serial character consists of a start bit (low), data (lsb first), parity bit (high or low), and stop bit (high), in that order. when receiving in asynchronous mode, the sci synchr onizes at the falling edge of the start bit. the sci samples each data bit on the eighth pulse of a clock with a frequency 16 times the bit rate. receive data is latched at the center of each bit. lsb start bit msb idle state (mark state) stop bit 0 transmit/receive data d0 d1 d2 d3 d4 d5 d6 d7 0/1 1 1 1 1 serial data parity bit 1 bit 1 or 2 bits 7 or 8 bits 1 bit or none one unit of transfer data (character or frame) figure 15.2 example of data format in asynchronous communication (8-bit data with parity and two stop bits)
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 761 of 1560 mar 18, 2011 sh7080 group (1) transmit/receive formats table 15.15 shows the transfer formats that can be selected in asynchronous mode. any of 12 transfer formats can be selected according to the scsmr settings. table 15.15 serial transfer formats (asynchronous mode) [legend] s: start bit stop: stop bit p: parity bit mpb: multiprocessor bit x: don't care pe 0 0 1 1 0 0 1 1 x x x x s 8-bit data stop s 7-bit data stop s 8-bit data stop stop s 8-bit data p stop s 7-bit data stop p s 8-bit data mpb stop s 8-bit data mpb stop stop s 7-bit data stop mpb s 7-bit data stop mpb stop s 7-bit data stop stop chr 0 0 0 0 1 1 1 1 0 0 1 1 mp 0 0 0 0 0 0 0 0 1 1 1 1 stop 0 1 0 1 0 1 0 1 0 1 0 1 scsmr settings 123456789101112 serial transfer format and frame length stop s 8-bit data p stop s 7-bit data stop p stop
section 15 serial communication interface (sci) page 762 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (2) clock an internal clock generated by the on-chip baud rate generator or an external clock input from the sck pin can be selected as the sci transmit/receive clock. the clock source is selected by the c/ a bit in the serial mode register (scsmr) and bits cke1 and cke0 in the serial control register (scscr) (table 15.14). when an external clock is input at the sck pin, it must have a frequency equal to 16 times the desired bit rate. when the sci operates on an internal clock, it can output a clock signal at the sck pin. the frequency of this output clock is equal to 16 times the desired bit rate. (3) transmitting and receiving data sci initialization (asynchronous mode): before transmitting or receiving, clear the te and re bits to 0 in the serial control register (scscr), then initialize the sci as follows. when changing the operation mode or the communi cation format, always clear the te and re bits to 0 before following the procedure given below. clearing the te bit to 0 sets the tdre flag to 1 and initializes the transmit shift register (sctsr). clearing the re bit to 0, however, does not initialize the rdrf, per, fer, and orer flags or receive data register (scrdr), which retain their previous contents. when an external clock is used, the clock should not be stopped during initia lization or subsequent operation. sci operation becomes unreliable if the clock is stopped.
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 763 of 1560 mar 18, 2011 sh7080 group [4] [5] < initialization completed> [1] set the clock selection in scscr. [2] set the data transfer format in scsmr and scsdcr. [3] write a value corresponding to the bit rate to scbrr. not necessary if an external clock is used. [4] set pfc of the external pin used. set rxd input during receiving and txd output during transmitting. set sck input/output according to contents set by cke1 and cke0. when cke1 and cke0 are 0 in asynchronous mode, setting the sck pin is unnecessary. outputting clocks from the sck pin starts at synchronous clock output setting. [5] set the te bit or re bit in scscr to 1. * also make settings of the rie, tie, teie, and mpie bits. at this time, the txd, rxd, and sck pins are ready to be used. the txd pin is in a mark state during transmitting, and rxd pin is in an idle state for waiting the start bit during receiving. set the pfc for the external pins to be used (sck, txd, rxd) set te and re bits of scscr to 1 set the rie, tie, teie, and mpie bits in scscr wait yes [1] start initialization clear rie, tie, teie, mpie, te, and re bits in scscr to 0 * [2] no set value in scbrr [3] 1-bit interval elapsed? set data transfer format in scsmr, scsdcr set cke1 and cke0 bits in scscr (te and re bits are 0) note : * in simultaneous transmit/receive operation, the te and re bits must be cleared to 0 or set to 1 simultaneously. figure 15.3 sample flowchart for sci initialization
section 15 serial communication interface (sci) page 764 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group transmitting serial data (asynchronous mode): figure 15.4 shows a sample flowchart for serial transmission. use the following procedure for serial data tran smission after enabling the sci for transmission. start of transmission read tdre flag in scssr tdre = 1? write transmit data in sctdr and clear tdre bit in scssr to 0 all data transmitted? read tend flag in scssr tend = 1? break output? clear spb0dt to 0 and set spb0io to 1 clear te bit in scscr to 0 end of transmission no yes no yes no yes no yes [1] sci status check and transmit data write: read scssr and check that the tdre flag is set to 1, then write transmit data to sctdr, and clear the tdre flag to 0. [2] serial transmission continuation procedure: to continue serial transmission, read 1 from the tdre flag to confirm that writing is possible, then write data to sctdr, and then clear the tdre flag to 0. checking and clearing of the tdre flag is automatic when the dmac or dtc is activated by a transmit data empty interrupt (txi) request, and data is written to sctdr. [3] break output at the end of serial transmission: to output a break in serial transmission, clear the spb0dt bit to 0 and set the spb0io bit to 1 in scsptr, then clear the te bit in scscr to 0. figure 15.4 sample flowchart for transmitting serial data
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 765 of 1560 mar 18, 2011 sh7080 group in serial transmission, the sci operates as described below. 1. the sci monitors the tdre flag in the serial status register (s cssr). if it is cleared to 0, the sci recognizes that data has been written to th e transmit data register (sctdr) and transfers the data from sctdr to the transmit shift register (sctsr). 2. after transferring data from sctdr to sctsr, the sci sets the tdre flag to 1 and starts transmission. if the tie bit in the serial control register (scscr) is set to 1 at this time, a transmit-data-empty interrupt (txi) request is generated. the serial transmit data is sent from the txd pin in the following order. a. start bit: one-bit 0 is output. b. transmit data: 8-bit or 7-bit data is output in lsb-first order. c. parity bit or multiprocessor bit: one parity bit (even or odd parity) or one multiprocessor bit is output. (a format in which neither parity nor multiprocessor bit is output can also be selected.) d. stop bit(s): one or two 1 bits (stop bits) are output. e. mark state: 1 is output continuously until the start bit that starts the next transmission is sent. 3. the sci checks the tdre flag at the timing for sending the stop bit. if the tdre flag is 0, the data is transferred from sctdr to sctsr, the stop bit is sent, and then serial transmission of the next frame is started. if the tdre flag is 1, the tend flag in scssr is set to 1, the stop bit is sent, and then the "mark state" is entered in which 1 is output. if the teie bit in scscr is set to 1 at this time, a tei interrupt request is generated.
section 15 serial communication interface (sci) page 766 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 15.5 shows an example of the operation for transmission. 1 0 d0 d1 d7 0/1 1 0 d0 d1 d7 0/1 1 1 tdre tend serial data start bit data parity bit stop bit start bit idle state (mark state) data parity bit stop bit txi interrupt request data written to sctdr and tdre flag cleared to 0 by txi interrupt handler one frame txi interrupt request tei interrupt request figure 15.5 example of transmission in asynchronous mode (8-bit data, parity, one stop bit)
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 767 of 1560 mar 18, 2011 sh7080 group receiving serial data (asynchronous mode): figure 15.6 shows a sample flow chart for serial reception. use the following procedure for serial data r eception after enabling the sci for reception. start of reception read orer, per, and fer flags in scssr per, fer, or orer = 1? read rdrf flag in scssr rdrf = 1? read receive data in scrdr, and clear rdrf flag in scssr to 0 all data received? clear re bit in scscr to 0 end of reception yes no yes yes no no error handling [1] receive error handling and break detection: if a receive error occurs, read the orer, per, and fer flags in scssr to identify the error. after performing the appropriate error processing, ensure that the orer, per, and fer flags are all cleared to 0. reception cannot be resumed if any of these flags are set to 1. in the case of a framing error, a break can also be detected by reading the value of the rxd pin. [2] sci status check and receive data read: read scssr and check that rdrf = 1, then read the receive data in scrdr clear the rdrf flag to 0. [3] serial reception continuation procedure: to continue serial reception, clear the rdrf flag to 0 before the stop bit for the current frame is received. the rdrf flag is cleared automatically when the direct memory access controller (dmac) or data transfer controller (dtc) is activated by an rxi interrupt to read the scrdr value, and this step is not needed. figure 15.6 sample flowchart for receiving serial data (1)
section 15 serial communication interface (sci) page 768 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group error processing parity error processing yes no clear orer, per, and fer flags in scssr to 0 no yes no yes framing error processing no yes overrun error processing orer = 1? fer = 1? break? per = 1? clear re bit in scscr to 0 figure 15.6 sample flowchart for receiving serial data (2)
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 769 of 1560 mar 18, 2011 sh7080 group in serial reception, the sci op erates as described below. 1. the sci monitors the transmission line, and if a 0 start bit is detected, performs internal synchronization and starts reception. 2. the received data is stored in scrsr in lsb-to-msb order. 3. the parity bit and stop bit are received. after receiving these bits, the sci carries out the following checks. a. parity check: th e sci counts the number of 1s in th e received data and checks whether the count matches the even or odd parity specified by the o/ e bit in the serial mode register (scsmr). b. stop bit check: the sci checks wh ether the stop bit is 1. if there are two stop bits, only the first is checked. c. status check: the sci checks whether the rdrf flag is 0 and the received data can be transferred from the receive shift register (scrsr) to scrdr. if all the above checks are passed, the rdrf flag is set to 1 and the received data is stored in scrdr. if a receive error is detected, th e sci operates as shown in table 15.16 note: when a receive error occurs, subsequent reception cannot be continued. in addition, the rdrf flag will not be set to 1 after reception; be sure to clear the error flag to 0. 4. if the eio bit in scsptr is cleared to 0 and the rie bit in scscr is set to 1 when the rdrf flag changes to 1, a receive-dat a-full interrupt (rxi) request is generated. if the rie bit in scscr is set to 1 when the orer, per, or fer flag changes to 1, a receive error interrupt (eri) request is generated. table 15.16 receive errors and error conditions receive error abbreviation error condition data transfer overrun error orer when the next data reception is completed while the rdrf flag in scssr is set to 1 the received data is not transferred from scrsr to scrdr. framing error fer when the stop bit is 0 the received data is transferred from scrsr to scrdr. parity error per when the received data does not match the even or odd parity specified in scsmr the received data is transferred from scrsr to scrdr.
section 15 serial communication interface (sci) page 770 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 15.7 shows an example of the operation for reception. 1 0 d0 d1 d7 0/1 1 0 d0 d1 d7 0/1 0/1 1 rdrf fer serial data start bit data parity bit stop bit start bit data parity bit stop bit rxi interrupt request one frame data read and rdrf flag cleared to 0 by rxi interrupt handler eri interrupt request generated by framing error figure 15.7 example of sci receive operation (8-bit data, parity, one stop bit) 15.4.3 clock synchronous mode in clock synchronous mode, the scif transmits and receives data in s ynchronization with clock pulses. this mode is suitable for high-speed serial communication. the sci transmitter and receiver are independent, so full-duplex communication is possible while sharing the same clock. both the transmitter and r eceiver have a double-buffered structure so that data can be read or written during transmission or reception, enabling continuous data transfer. figure 15.8 shows the general format in clock synchronous serial communication. don ' t care don ' t care one unit of transfer data (character or frame) bit 0 serial data synchronization clock bit 1 bit 3 bit 4 bit 5 lsb msb bit 2 bit 6 bit 7 * * note: * high level except in continuous transfer figure 15.8 data format in clock synchronous communication
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 771 of 1560 mar 18, 2011 sh7080 group in clock synchronous serial communication, each data bit is output on the communication line from one falling edge of the serial clock to the next. data is guaranteed valid at the rising edge of the serial clock. in each character, the serial data bits are transmitted in order from the lsb (first) to the msb (last). after output of the msb, the communication line remains in the state of the msb. in clock synchronous mode, the sci transm its or receives data by synchronizing with the rising edge of the serial clock. (1) communication format the data length is fixed at eight bits. no parity bit can be added. (2) clock an internal clock generated by the on-chip baud rate generator or an external clock input from the sck pin can be selected as the sci transmit/receive clock. for selection of the sci clock source, see table 15.14. when the sci operates on an internal clock, it outputs the clock signal at the sck pin. eight clock pulses are output per transmitted or received character. when the sci does not perform transmission or reception, the clock signal remain s in the high state. when only reception is performed, output of the synchronous clock continues until an overrun error occurs or the re bit is cleared to 0. for the reception of n characters, select the external clock as the clock source. if the internal clock has to be used, set re and te to 1, then transmit n characters of dummy data at the same time as receiving the n characters of data. (3) transmitting and receiving data sci initialization (clock synchronous mode): before transmitting, receiving, or changing the mode or communication format, the software must clear the te and re bits to 0 in the serial control register (scscr), then initialize the sci. clearing te to 0 sets the tdre flag to 1 and initializes the transmit shift register (sctsr). clearing re to 0, however, does not initialize the rdrf, per, fer, and orer flags and receive data register (scrdr), which retain their previous contents.
section 15 serial communication interface (sci) page 772 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 15.9 shows a sample flowchart for initializing the sci. [4] [5] set the pfc for the external pins to be used (sck, txd, rxd) [1] set the clock selection in scscr. [2] set the data transfer format in scsmr. [3] write a value corresponding to the bit rate to scbrr. not necessary if an external clock is used. [4] set pfc of the external pin used. set rxd input during receiving and txd output during transmitting. set sck input/output according to contents set by cke1 and cke0. [5] set the te bit or re bit in scr to 1. * also make settings of the rie, tie, teie, and mpie bits. at this time, the txd, rxd, and sck pins are ready to be used. the txd pin is in a mark state during transmitting. when synchronous clock output (clock master) is set during receiving in clock synchronous mode, outputting clocks from the sck pin starts. note: * in simultaneous transmit and receive operations, the te and re bits should both be cleared to 0 or set to 1 simultaneously. set te and re bits of scscr to 1 set the rie, tie, teie, and mpie bits in scscr wait no yes start initialization set data transfer format in scsmr set value in scbrr clear rie, tie, teie, mpie, te and re bits in scscr to 0 * [2] [3] 1-bit interval elapsed? set cke1 and cke0 bits in scscr (te and re bits are 0) [1] figure 15.9 sample flowchart for sci initialization
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 773 of 1560 mar 18, 2011 sh7080 group transmitting serial data (clock synchronous mode): figure 15.10 shows a sample flowchart for transmitting serial data. use the following procedure for serial data tran smission after enabling the sci for transmission. start of transmission read tdre flag in scssr tdre = 1? write transmit data to sctdr and clear tdre flag in scssr to 0 all data transmitted? read tend flag in scssr tend = 1? clear te bit in scscr to 0 end of transmission no yes no yes no yes [1] sci status check and transmit data write: read scssr and check that the tdre flag is set to 1, then write transmit data to sctdr, and clear the tdre flag to 0. [2] serial transmission continuation procedure: to continue serial transmission, read 1 from the tdre flag to confirm that writing is possible, then write data to sctdr, and then clear the tdre flag to 0. checking and clearing of the tdre flag is automatic when the dmac or dtc is activated by a transmit data empty interrupt (txi) request, and data is written to sctdr. figure 15.10 sample flowchart for transmitting serial data
section 15 serial communication interface (sci) page 774 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group in transmitting serial data, the sci operates as follows: 1. the sci monitors the tdre flag in the serial status register (s cssr). if it is cleared to 0, the sci recognizes that data has been written to th e transmit data register (sctdr) and transfers the data from sctdr to the transmit shift register (sctsr). 2. after transferring data from sctdr to sctsr, the sci sets the tdre flag to 1 and starts transmission. if the transmit-data-empty interrupt enable bit (tie) in the serial control register (scscr) is set to 1 at this time, a transmit-data-empty interrupt (txi) request is generated. if clock output mode is selected, the sci outputs eight synchronous clock pulses. if an external clock source is selected, the sci outputs data in synchronization with the input clock. data is output from the txd pin in order from the lsb (bit 0) to the msb (bit 7). 3. the sci checks the tdre flag at the timing for sending the msb (bit 7). if the tdre flag is 0, the data is transferred from sctdr to sctsr and serial transmission of the next frame is started, if the tdre flag is 1, the tend flag in scssr is set to 1, the msb (bit 7) is sent, and then the txd pin holds the states. if the teie bit in scscr is set to 1 at this time, a tei interrupt request is generated. 4. after the end of serial transmission, the sck pin is held in the high state. figure 15.11 shows an example of sci transmit operation. synchronization clock serial data bit 0 bit 1 bit 7 bit 0 bit 1 bit 6 bit 7 lsb msb data written to sctdr and tdre flag cleared to 0 by txi interrupt handler tdre tend txi interrupt request txi interrupt request one frame tei interrupt request transfer direction figure 15.11 example of sci transmit operation
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 775 of 1560 mar 18, 2011 sh7080 group receiving serial data (clock synchronous mode): figure 15.12 shows a sample flowchart for receiving serial data. use the follo wing procedure for serial data reception after enabling the scif for reception. when switching from asynchronous mode to clock synchronous mode, make sure that the orer, per, and fer flags are all cleared to 0. if the fer or per flag is set to 1, the rdrf flag will not be set and data reception cannot be started. start of reception read orer flag in scssr orer = 1? read rdrf flag in scssr rdrf = 1? read receive data in scrdr, and clear rdrf flag in scssr to 0 all data received? clear re bit in scscr to 0 end of reception yes no yes yes no no error handling [1] receive error handling: read the orer flag in scssr to identify any error, perform the appropriate error handling, then clear the orer flag to 0. reception cannot be resumed while the orer flag is set to 1. [2] sci status check and receive data read: read scssr and check that rdrf = 1, then read the receive data in scrdr, and clear the rdrf flag to 0. the transition of the rdrf flag from 0 to 1 can also be identified by an rxi interrupt. [3] serial reception continuation procedure: to continue serial reception, read the receive data register (scrdr) and clear the rdrf flag to 0 before the msb (bit 7) of the current frame is received. the rdrf flag is cleared automatically when the direct memory access controller (dmac) or data transfer controller (dtc) is activated by a receive-data-full interrupt (rxi) request to read the scrdr value, and this step is not needed. figure 15.12 sample flowchart for receivi ng serial data (1)
section 15 serial communication interface (sci) page 776 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group error handling clear orer flag in scssr to 0 end overrun error handling orer = 1? yes no figure 15.12 sample flowchart for receivi ng serial data (2) in receiving, the sci operates as follows: 1. the sci synchronizes with serial clock input or output and initializes internally. 2. receive data is shifted into scrsr in orde r from the lsb to the msb. after receiving the data, the sci checks whether the rdrf flag is 0 and the receive data can be transferred from scrsr to scrdr. if this check is passed, the sci sets the rdrf flag to 1 and stores the received data in scrdr. if a receive error is detected, the sci operates as shown in table 15.16. in this state, subsequent reception cannot be continued. in addition, the rdrf flag will not be set to 1 after reception; be sure to clear the rdrf flag to 0. 3. after setting rdrf to 1, if the receive-data- full interrupt enable bit (rie) is set to 1 in scscr, the sci requests a receive-data-full interrupt (rxi). if the orer bit is set to 1 and the rie bit in scscr is also set to 1, the sci requests a receive error interrupt (eri).
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 777 of 1560 mar 18, 2011 sh7080 group figure 15.13 shows an example of sci receive operation. synchronization clock serial data bit 7 bit 0 bit 7 bit 0 bit 1 bit 6 bit 7 data read from scrdr and rdrf flag cleared to 0 by rxi interrupt handler rdrf orer rxi interrupt request rxi interrupt request one frame eri interrupt request by overrun error transfer direction figure 15.13 example of sci receive operation transmitting and receiving seri al data simult aneously (clock synchronous mode): figure 15.14 shows a sample flowchart for transmitting and receiving serial data simultaneously. use the following procedure for serial data tran smission and reception after enabling the sci for transmission and reception.
section 15 serial communication interface (sci) page 778 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group yes no start of transmission and reception error processing no yes orer = 1? all data received? read tdre flag in scssr no yes tdre = 1? write transmit data to sctdr and clear tdre flag in scssr to 0 no yes rdrf = 1? read orer flag in scssr read rdrf flag in scssr [1] sci status check and transmit data write: read scssr and check that the tdre flag is set to 1, then write transmit data to sctdr and clear the tdre flag to 0. transition of the tdre flag from 0 to 1 can also be identified by a txi interrupt. [2] receive error processing: if a receive error occurs, read the orer flag in scssr, and after performing the appropriate error processing, clear the orer flag to 0. reception cannot be resumed if the orer flag is set to 1. [3] sci status check and receive data read: read scssr and check that the rdrf flag is set to 1, then read the receive data in scrdr and clear the rdrf flag to 0. transition of the rdrf flag from 0 to 1 can also be identified by an rxi interrupt. [4] serial transmission/reception continuation procedure: to continue serial transmission/reception, before the msb (bit 7) of the current frame is received, finish reading the rdrf flag, reading scrdr, and clearing the rdrf flag to 0. also, before the msb (bit 7) of the current frame is transmitted, read 1 from the tdre flag to confirm that writing is possible. then write data to sctdr and clear the tdre flag to 0. checking and clearing of the tdre flag is automatic when the dtc or dmac is activated by a transmit data empty interrupt (txi) request and data is written to sctdr. also, the rdrf flag is cleared automatically when the dtc or dmac is activated by a receive data full interrupt (rxi) request and the scrdr value is read. note: when switching from transmit or receive operation to simultaneous transmit and receive operations, first clear the te bit and re bit to 0, then set both these bits to 1 simultaneously. clear te and re bits in scscr to 0 read receive data in scrdr, and clear rdrf flag in scssr to 0 end of transmission and reception figure 15.14 sample fl owchart for transmitting /receiving serial data
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 779 of 1560 mar 18, 2011 sh7080 group 15.4.4 multiprocessor communication function use of the multiprocessor communication function en ables data transfer to be performed among a number of processors sharing communication lines by means of asynchronous serial communication using the multiprocessor format, in which a multiprocessor bit is added to the transfer data. when multiprocessor communication is carried out, each receiving station is addressed by a unique id code. the serial communication cycle consists of two component cycles: an id transmission cycle which sp ecifies the receiving station, and a data transmission cycle. the multiprocessor bit is used to differentiate between the id transmission cycle and the data transmission cycle. if the multiprocessor bit is 1, the cycle is an id transmission cycle, and if the multiprocessor bit is 0, the cycle is a data transmission cycle. figure 15.15 shows an example of inter-processor communication using the multiprocessor format. the transmitting station first sends the id code of the receiving station with which it wants to perform serial communication as data with a 1 multiprocessor bit added. it then sends transmit data as data with a 0 multiprocessor bit added. the receiving station skips data until data with a 1 multiprocessor bit is sent. when data with a 1 multiprocessor bit is received, the receivi ng station compares that data with its own id. the station whose id matches then receives the da ta sent next. stations whose id does not match continue to skip data until data with a 1 multiprocessor bit is again received. the sci uses the mpie bit in scscr to implement this function. when the mpie bit is set to 1, transfer of receive data from sc rsr to scrdr, error flag detection, and setting the scssr status flags, rdrf, fer, and oer to 1 are inhibited until data with a 1 multiprocessor bit is received. on reception of receive character with a 1 multiprocessor bit, the mpbr bit in scssr is set to 1 and the mpie bit is automatically cleared, thus normal reception is resumed. if the rie bit in scscr is set to 1 at this time, an rxi interrupt is generated. when the multiprocessor format is selected, the parity bit setting is invalid. all other bit settings are the same as those in normal asynchronous mode. the clock used for multiprocessor communication is the same as that in normal asynchronous mode.
section 15 serial communication interface (sci) page 780 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group transmitting station receiving station a (id = 01) receiving station b (id = 02) receiving station c (id = 03) receiving station d (id = 04) serial transmission line serial data id transmission cycle = receiving station specification data transmission cycle = data transmission to receiving station specified by id (mpb = 1) (mpb = 0) h'01 h'aa [legend] mpb: multiprocessor bit figure 15.15 example of communication using multiprocessor format (transmission of data h'aa to receiving station a)
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 781 of 1560 mar 18, 2011 sh7080 group 15.4.5 multiprocessor serial data transmission figure 15.16 shows a sample flowchart for multiprocessor serial data transmission. for an id transmission cycle, set the mpbt bit in scssr to 1 before transmission. maintain the mpbt value at 1 until the id transmission actually completes. for a data transmission cycle, clear the mpbt bit in scssr to 0 before transmission. all other sci operations are the same as those in asynchronous mode. no [1] yes initialization start transmission read tdre flag in scssr [2] no yes no yes read tend flag in scssr [3] no yes [4] clear dr to 0 clear te bit in scscr to 0; select the txd pin as an output port with the pfc tdre = 1? all data transmitted? tend = 1? break output? clear tdre flag to 0 [1] sci initialization: set the txd pin using the pfc. after the te bit is set to 1, 1 is output for one frame, and transmission is enabled. however, data is not transmitted. [2] sci status check and transmit data write: read scssr and check that the tdre flag is set to 1, then write transmit data to sctdr. set the mpbt bit in scssr to 0 or 1. finally, clear the tdre flag to 0. to transmit an id after the sci is initialized, write the id to sctdr. the data is immediately transferred to sctsr and the tdre flag is set to 1. at this point the id has not yet been transmitted from the txd pin, so it is necessary to maintain the mpbt value at 1. clear the mpbt bit to 0 after the next data to be transmitted is written to sctdr and the tdre flag is set to 1. [3] serial transmission continuation procedure: to continue serial transmission, be sure to read 1 from the tdre flag to confirm that writing is possible, then write data to sctdr, and then clear the tdre flag to 0. checking and clearing of the tdre flag is automatic when the dmac or dtc is activated by a transmit data empty interrupt (txi) request, and data is written to sctdr. [4] break output at the end of serial transmission: to output a break in serial transmission, first clear the port data register (dr) to 0, then clear the te bit to 0 in scscr and use the pfc to select the txd pin as an output port. write transmit data to sctdr and set mpbt bit in scssr figure 15.16 sample multiprocessor serial transmission flowchart
section 15 serial communication interface (sci) page 782 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 15.4.6 multiprocessor serial data reception figure 15.18 shows a sample flowchart for multiprocessor serial data reception. if the mpie bit in scscr is set to 1, data is skipped until data with a 1 multiprocessor bit is sent. on receiving data with a 1 multiprocessor bit, the receive data is tr ansferred to scrdr. an rxi interrupt request is generated at this time. all other sci operations are the same as in asynchronous mode. figure 15.17 shows an example of sci operation for multiprocessor format reception. mpie rxd rxd scrdr value 0 d0 d1 d7 1 1 0 d0 d1 d7 01 1 1 data (id1) start bit mpb stop bit start bit data (data1) mpb stop bit data (id2) start bit stop bit start bit data (data2) stop bit rxi interrupt request (multiprocessor interrupt) generated idle state (mark state) rdrf scrdr data read and rdrf flag cleared to 0 in rxi interrupt processing routine if not this station?s id, mpie bit is set to 1 again rxi interrupt request is not generated, and scrdr retains its state id1 (a) data does not match station?s id mpie scrdr value 0 d0 d1 d7 1 1 0 d0 d1 d7 01 1 1 mpb mpb rxi interrupt request (multiprocessor interrupt) generated idle state (mark state) rdrf scrdr data read and rdrf flag cleared to 0 in rxi interrupt processing routine matches this station?s id, so reception continues, and data is received in rxi interrupt processing routine mpie bit is set to 1 again id2 (b) data matches station?s id data2 id1 mpie = 0 mpie = 0 figure 15.17 example of sc i operation in reception (example with 8-bit data, multiprocessor bit, one stop bit)
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 783 of 1560 mar 18, 2011 sh7080 group yes [1] no initialization start reception no yes [4] clear re bit in scscr to 0 error processing (continued on next page) [5] no yes fer = 1? or orer = 1? rdrf = 1? all data received? set mpie bit in scscr to 1 [2] read orer and fer flags in scssr read rdrf flag in scssr [3] read receive data in scrdr no yes this station?s id? read orer and fer flags in scssr yes no read rdrf flag in scssr no yes fer = 1? or orer = 1? read receive data in scrdr rdrf = 1? [1] sci initialization: set the rxd pin using the pfc. [2] id reception cycle: set the mpie bit in scscr to 1. [3] sci status check, id reception and comparison: read scssr and check that the rdrf flag is set to 1, then read the receive data in scrdr and compare it with this station?s id. if the data is not this station?s id, set the mpie bit to 1 again, and clear the rdrf flag to 0. if the data is this station?s id, clear the rdrf flag to 0. [4] sci status check and data reception: read scssr and check that the rdrf flag is set to 1, then read the data in scrdr. [5] receive error processing and break detection: if a receive error occurs, read the orer and fer flags in scssr to identify the error. after performing the appropriate error processing, ensure that the orer and fer flags are all cleared to 0. reception cannot be resumed if either of these flags is set to 1. in the case of a framing error, a break can be detected by reading the rxd pin value. figure 15.18 sample multiprocesso r serial reception flowchart (1)
section 15 serial communication interface (sci) page 784 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group error processing yes no clear orer and fer flags in scssr to 0 no yes no yes framing error processing overrun error processing orer = 1 fer = 1 break? clear re bit in scscr to 0 [5] figure 15.18 sample multiprocesso r serial reception flowchart (2)
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 785 of 1560 mar 18, 2011 sh7080 group 15.5 sci interrupt sources and dmac/dtc the sci has four interrupt sources: transmit end (tei), receive error (eri), receive-data-full (rxi), and transmit-data-empty (txi) interrupt requests. table 15.17 shows the interrupt sources. the interrupt sources are enabled or disabled by means of the tie, rie, and teie bits in scscr and the eio bit in scsptr. a separate interrupt request is sent to the interrupt controller fo r each of these interrupt sources. when the tdre flag in the serial status regist er (scssr) is set to 1, a tdr empty interrupt request is generated. this request can be used to activate the direct memory access controller (dmac) or data transfer controller (dtc) to transfer data. the tdre flag is automatically cleared to 0 when data is written to the transmit data register (sctdr) through the dmac or dtc. when the rdrf flag in scssr is set to 1, an rdr full interrupt request is generated. this request can be used to activate the dmac or dtc to transfer data. the rdrf flag is automatically cleared to 0 when data is read from the recei ve data register (scrdr) through the dmac or dtc. when the orer, fer, or per flag in scssr is se t to 1, an eri interrupt request is generated. this request cannot be used to activate the dmac or dtc. it is possible to disable generation of rxi interrupt requests and allow only eri interrupt requests to be generated during data reception processing. to accomplish this, set the rie bit to 1 and the eio bit in scsptr to 1. note that setting the eio bit to 1 will prevent the dmac or dtc from transferring received data because no er i interrupt requests are generated. when the tend flag in scssr is set to 1, a tei interrupt request is generated. this request cannot be used to activate the dmac or dtc. the txi interrupt indicates that transmit data can be written, and the tei interrupt indicates that transmission has been completed.
section 15 serial communication interface (sci) page 786 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 15.17 sci interrupt sources interrupt source description dmac/dtc activation eri interrupt caused by receive error (orer, fer, or per) not possible rxi interrupt caused by receive data full (rdrf) possible txi interrupt caused by transmit data empty (tdre) possible tei interrupt caused by transmit end (tent) not possible 15.6 serial port register (s csptr) and sci pins the relationship between scsptr and the sci pins is shown in figures 15.19 and 15.20. [legend] sptrw: scsptr write note: * these signals control the sck pin according to the settings of the c/ a bit in scsmr and bits cke1 and cke0 in scscr. reset internal data bus clock output enable signal * serial clock output signal * serial clock input signal * serial input enable signal * bit 3 bit 2 reset qd r sckio sck c qd r sckdt sptrw sptrw c figure 15.19 sckio bit, sckdt bit, and sck pin
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 787 of 1560 mar 18, 2011 sh7080 group [legend] sptrw: scsptr write reset internal data bus transmit enable signal bit 1 bit 0 reset serial transmit data qd r spbio txd c qd r spbdt sptrw sptrw c figure 15.20 spbio bit, spbdt bit, and txd pin
section 15 serial communication interface (sci) page 788 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 15.7 usage notes 15.7.1 sctdr writing and tdre flag the tdre flag in the serial stat us register (scssr) is a status flag indicating transferring of transmit data from sctdr into sctsr. the sci sets the tdre flag to 1 when it transfers data from sctdr to sctsr. data can be written to sctdr regardless of the tdre bit status. if new data is written in sctdr when tdre is 0, however, the old data stored in sctdr will be lost because the data has not yet been transfer red to sctsr. before writing transmit data to sctdr, be sure to check that the tdre flag is set to 1. 15.7.2 multiple receive error occurrence if multiple receive errors occur at the same time, the status flags in scssr are set as shown in table 15.18. when an overrun error occurs, data is not transferred from the receive shift register (scrsr) to the receive data register (scrdr) and the received data will be lost. table 15.18 scssr status flag values and transfer of received data scssr status flags receive errors generated rdrf orer fer per receive data transfer from scrsr to scrdr overrun error 1 1 0 0 not transferred framing error 0 0 1 0 transferred parity error 0 0 0 1 transferred overrun error + framing error 1 1 1 0 not transferred overrun error + parity error 1 1 0 1 not transferred framing error + parity error 0 0 1 1 transferred overrun error + framing error + parity error 1 1 1 1 not transferred
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 789 of 1560 mar 18, 2011 sh7080 group 15.7.3 break detection and processing break signals can be detected by reading the r xd pin directly when a framing error (fer) is detected. in the break state the input from the rxd pin consists of all 0s, so the fer flag is set and the parity error flag (per) may also be set. note that, although transfer of receive data to scrdr is halted in the break state, the sci receiver continues to operate. 15.7.4 sending a break signal the i/o condition and level of the txd pin are determined by the spb0io and spb0dt bits in the serial port register (scsptr). this feature can be used to send a break signal. until te bit is set to 1 (enabling transmission) after initializing, txd pin does not work. during the period, mark status is performed by spb0dt bit. therefore, the spb0io and spb0dt bits should be set to 1 (high level output). to send a break signal during serial transmission, clear the spb0dt bit to 0 (low level), then clear the te bit to 0 (halting transmission). when the te bit is cleared to 0, the transmitter is initialized regardless of the current transmission state, and 0 is output from the txd pin. 15.7.5 receive data sampling ti ming and receive margin (asynchronous mode) the sci operates on a base clock with a frequency of 16 times the transfer rate in asynchronous mode. in reception, the sci synchron izes internally with the fall of the start bit, which it samples on the base clock. receive data is latched at th e rising edge of the eighth base clock pulse. the timing is shown in figure 15.21.
section 15 serial communication interface (sci) page 790 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 0 1 2 3 4 5 6 7 8 9 10 1112 1314 15 0 1 2 3 4 5 6 7 8 9 10 1112 1314 15 0 1 2 3 4 5 d0 d1 16 clocks 8 clocks base clock receive data (rxd) start bit ?7.5 clocks +7.5 clocks synchronization sampling timing data sampling timing figure 15.21 receive data samplin g timing in asynchronous mode the receive margin in asynchronous mode can therefore be expressed as shown in equation 1. equation 1: m = (0.5 - ) - (l - 0.5) f - (1+f) 100 % 1 2n d - 0.5 n where: m: receive margin (%) n: ratio of bit rate to clock (n = 16) d: clock duty (d = 0 to 1.0) l: frame length (l = 9 to 12) f: absolute deviation of clock frequency from equation 1, if f = 0 and d = 0.5, the recei ve margin is 46.875%, as given by equation 2. equation 2: when d = 0.5 and f = 0: m = (0.5 ? 1/(2 16)) 100 % = 46.875 % this is a theoretical value. a reasonable margin to allow in system designs is 20% to 30%.
section 15 serial communication interface (sci) r01uh0198ej0500 rev. 5.00 page 791 of 1560 mar 18, 2011 sh7080 group 15.7.6 note on using dmac or dtc when the external clock source is used for the clock for synchronization, input the external clock after waiting for five or more cycles of the peripheral operating clock after sctdr is modified through the dmac or dtc. if a transmit clock is input within four cycles after sctdr is modified, a malfunction may occur (figure 15.22). sck tdre txd d0 d2 d6 d1 d3 d4 d5 d7 t note: when using the external clock, t must be set to larger than 4 cycles. figure 15.22 example of clock synchronous transfer using dmac or dtc when data is written to sctdr by activating the dmac or dtc by a txi interrupt, the tend flag value becomes undefined. in this case, do not use the tend flag as the transmit end flag. 15.7.7 note on using external clock in clock synchronous mode te and re must be set to 1 after waiting for four or more cycles of the peripheral operating clock after the sck external clock is changed from 0 to 1. te and re must be set to 1 only while the sck external clock is 1. 15.7.8 module standby mode setting sci operation can be disabled or enabled using the standby contro l register. the initial setting is for sci operation to be halted. register access is enabled by clearing module standby mode. for details, refer to section 26, power-down modes.
section 15 serial communication interface (sci) page 792 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 793 of 1560 mar 18, 2011 sh7080 group section 16 serial communication interface with fifo (scif) this lsi has a channel serial communication in terface with fifo (scif) that supports both asynchronous and clock synchronous serial communication. it also has 16-stage fifo registers for both transmission and reception independently that en able this lsi to perform efficient high-speed continuous communication. 16.1 features ? asynchronous serial communication: ? serial data communication is performed by start-stop in character units. the scif can communicate with a universal asynchronous r eceiver/transmitter (uart), an asynchronous communication interface adapter (acia), or an y other communications chip that employs a standard asynchronous serial system. th ere are eight selectable serial data communication formats. ? data length: 7 or 8 bits ? stop bit length: 1 or 2 bits ? parity: even, odd, or none ? receive error detection: parity , framing, and overrun errors ? break detection: break is detected when a fram ing error is followed by at least one frame at the space 0 level (low level). it is also detect ed by reading the rxd level directly from the serial port data register when a framing error occurs. ? clock synchronous mode: ? serial data communication is synchronized w ith a clock signal. the scif can communicate with other chips having a clock synchronous communication function. there is one serial data communication format. ? data length: 8 bits ? receive error detection: overrun errors ? full duplex communication: the transmitting and r eceiving sections are independent, so the scif can transmit and receive simultaneously. bo th sections use 16-stage fifo buffering, so high-speed continuous data transfer is possibl e in both the transmit and receive directions. ? on-chip baud rate generator with selectable bit rates ? internal or external transmit/receive clock source: from either baud rate generator (internal) or sck pin (external)
section 16 serial communication interface with fifo (scif) page 794 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? four types of interrupts: transmit-fifo-dat a-empty, break, receive-fifo-data-full, and receive-error interrupts are requested independently. ? the transmit fifo data empty and receive fi fo data full requests can activate the data transfer controller (dtc) for data transfer. ? when the scif is not in use, it can be st opped by halting the clock supplied to it, saving power. ? in asynchronous, on-chip modem control functions ( rts and cts ). ? the number of data in the transmit and receive fi fo registers and the number of receive errors of the receive data in the receive fifo register can be ascertained. ? a time-out error (dr) can be detected when receiving in asynchronous mode. figure 16.1 shows a block diagram of the scif. module data bus scfrdr (16 stage) scrsr rxd3 txd3 sck3 cts3 rts3 scftdr (16 stage) sctsr scsmr sclsr scfdr scfcr scfsr scbrrn parity generation parity check transmission/ reception control baud rate generator clock external clock p p /4 p /16 p /64 txif rxif erif brif scif bus interface internal data bus scscr scsptr scrsr: scfrdr: sctsr: scftdr: scsmr: scscr: [legend] scfsr: scbrr: scsptr: scfcr: scfdr: sclsr: receive shift register receive fifo data register transmit shift register transmit fifo data register serial mode register serial control register serial status register bit rate register serial port register fifo control register fifo data count register line status register figure 16.1 block diagram of scif
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 795 of 1560 mar 18, 2011 sh7080 group 16.2 input/output pins the scif has the serial pins summarized in table 16.1. table 16.1 pin configuration channel pin name abbreviation i/o function 3 serial clock pin sck3 i/o clock i/o receive data pin rxd3 input receive data input transmit data pin txd3 output transmit data output request to send pin rts3 output request to send clear to send pin cts3 input clear to send note: in the following descriptions in this section, the channel number in the abbreviated pin names is omitted as in sck, rxd, txd, rts , and cts .
section 16 serial communication interface with fifo (scif) page 796 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 16.3 register descriptions the scif has the following registers. these regist ers specify the data format and bit rate, and control the transmitter and receiver sections. table 16.2 register configuration register name abbr. r/w initial value address access size serial mode register_3 scsmr_3 r/w h'0000 h'ffffc180 16 bit rate register_3 scbrr_3 r/w h'ff h'ffffc182 8 serial control register_3 scscr_3 r/w h'0000 h'ffffc184 16 transmit fifo data register_3 scftdr_3 w h'xx h'ffffc186 8 serial status register_3 scfsr_3 r/w h'0060 h'ffffc188 16 receive fifo data register_3 scfrdr_3 r h'xx h'ffffc18a 8 fifo control register_3 scfcr_3 r/w h'0000 h'ffffc18c 16 fifo data count register_3 scfdr_3 r h'0000 h'ffffc18e 16 serial port register_3 scsptr_3 r/w h'00xx h'ffffc190 16 line status register_3 sclsr_3 r/w h'0000 h'ffffc192 16 16.3.1 receive shift register (scrsr) scrsr receives serial data. data input at the rxd pin is loaded into scrsr in the order received, lsb (bit 0) first, converting the data to parallel form. when one byte has been received, it is automatically tr ansferred to scfrdr, the receive fifo data register. the cpu cannot read or write to scrsr directly. bit: initial value: r/w: 7654321 0 -------- --------
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 797 of 1560 mar 18, 2011 sh7080 group 16.3.2 receive fifo data register (scfrdr) scfrdr is a 16-stage 8-bit fifo register that st ores serial receive data. the scif completes the reception of one byte of serial da ta by moving the received data from the receive shift register (scrsr) into scfrdr for storage. continuous r eception is possible until 16 bytes are stored. the cpu can read but not write to scfrdr. if data is read when th ere is no receive data in the scfrdr, the value is undefined. when this register is full of receive data, subsequent serial data is lost. bit: initial value: r/w: 7654321 0 -------- rrrrrrrr bit bit name initial value r/w description 7 to 0 undefined r fifo for receive serial data 16.3.3 transmit shift register (sctsr) sctsr transmits serial data. the scif loads transmit data from the transmit fifo data register (scftdr) into sctsr, then transmits the data serially from the txd pin, lsb (bit 0) first. after transmitting one data byte, the scif automatically loads the next transmit data from scftdr into sctsr and starts transmitting again. the cpu cannot read or write to sctsr directly. bit: initial value: r/w: 7654321 0 -------- --------
section 16 serial communication interface with fifo (scif) page 798 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 16.3.4 transmit fifo data register (scftdr) scftdr is a 16-stage 8-bit fifo re gister that stores data for seri al transmission. when the scif detects that the transmit shift register (sctsr) is empty, it moves transmit data written in the scftdr into sctsr and starts serial transmission. continuous serial transmission is performed until there is no transmit data left in scftdr. scftdr can always be written to by the cpu. when scftdr is full of transmit data (16 bytes), no more data can be written. if writing of new data is attempted, the data is ignored. bit: initial value: r/w: 7654321 0 -------- wwwwwwww bit bit name initial value r/w description 7 to 0 undefined w fifo for transmits serial data 16.3.5 serial mode register (scsmr) scsmr is a 16-bit register that specifies the sc if serial communication format and selects the clock source for the baud rate generator. the cpu can always read and write to scsmr. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrr/wr/wr/wr/wr/wrr/wr/w --------c/ a chr pe o/ e stop - cks[1:0] bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 799 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7 c/ a 0 r/w communication mode selects whether the scif operates in asynchronous or clock synchronous mode. 0: asynchronous mode 1: clock synchronous mode 6 chr 0 r/w character length selects 7-bit or 8-bit data in asynchronous mode. in the clock synchronous mode, the data length is always eight bits, regardless of the chr setting. 0: 8-bit data 1: 7-bit data * note: * when 7-bit data is selected, the msb (bit 7) of the transmit fifo data register is not transmitted. 5 pe 0 r/w parity enable selects whether to add a parity bit to transmit data and to check the parity of receive data, in asynchronous mode. in clock synchronous mode, a parity bit is neither added nor checked, regardless of the pe setting. 0: parity bit not added or checked 1: parity bit added and checked * note: * when pe is set to 1, an even or odd parity bit is added to transmit data, depending on the parity mode (o/ e ) setting. receive data parity is checked according to the even/odd (o/ e ) mode setting.
section 16 serial communication interface with fifo (scif) page 800 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 o/ e 0 r/w parity mode selects even or odd parity when parity bits are added and checked. the o/ e setting is used only in asynchronous mode and only when the parity enable bit (pe) is set to 1 to enable parity addition and checking. the o/ e setting is ignored in clock synchronous mode, or in asynchronous mode when parity addition and checking is disabled. 0: even parity * 1 1: odd parity * 2 notes: 1. if even parity is selected, the parity bit is added to transmit data to make an even number of 1s in the transmitted character and parity bit combined. receive data is checked to see if it has an even number of 1s in the received character and parity bit combined. 2. if odd parity is selected, the parity bit is added to transmit data to make an odd number of 1s in the transmitted character and parity bit combined. receive data is checked to see if it has an odd number of 1s in the received character and parity bit combined. 3 stop 0 r/w stop bit length selects one or two bits as the stop bit length in asynchronous mode. this setting is used only in asynchronous mode. it is ignored in clock synchronous mode because no stop bits are added. when receiving, only the first stop bit is checked, regardless of the stop bit setting. if the second stop bit is 1, it is treated as a stop bit, but if the second stop bit is 0, it is treated as the start bit of the next incoming character. 0: one stop bit when transmitting, a single 1-bit is added at the end of each transmitted character. 1: two stop bits when transmitting, two 1 bits are added at the end of each transmitted character.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 801 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 1, 0 cks[1:0] 00 r/w clock select 1 and 0 select the internal clock source of the on-chip baud rate generator. four clock sources are available. p , p /4, p /16 and p /64. for further information on the clock source, bit rate register settings, and baud rate, see section 16.3.8, bit rate register (scbrr). 00: p 01: p /4 10: p /16 11: p /64 note: p : peripheral clock 16.3.6 serial control register (scscr) scscr is a 16-bit register that operates the scif transmitter/receiver, enables/disables interrupt requests, and selects the transmit/receive clock s ource. the cpu can always read and write to scscr. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrr/wr/wr/wr/wr/wrr/wr/w - - - - - - - - tie rie te re reie - cke[1:0]
section 16 serial communication interface with fifo (scif) page 802 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 tie 0 r/w transmit interrupt enable enables or disables the transmit-fifo-data-empty interrupt (txif). serial transmit data in the transmit fifo data register (scftdr) is send to the transmit shift register (sctsr). then, the tdfe flag in the serial status register (scfsr) is set to1 when the number of data in scftdr becomes less than the number of transmission triggers. at this time, a txif is requested. 0: transmit-fifo-data-empty interrupt request (txif) is disabled * 1: transmit-fifo-data-empty interrupt request (txif) is enabled note: * the txif interrupt request can be cleared by writing a greater number of transmit data than the specified transmission trigger number to scftdr and by clearing the tdfe bit to 0 after reading 1 from the tdfe bit, or can be cleared by clearing this bit to 0.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 803 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 rie 0 r/w receive interrupt enable enables or disables the receive-data-full (rxif) interrupts requested when the rdf flag or dr flag in serial status register (scfsr) is set to1, receive-error (erif) interrupts requested when the er flag in scfsr is set to1, and break (brif) interrupts requested when the brk flag in scfsr or the orer flag in line status register (sclsr) is set to1. 0: receive-data-full interrupt (rxif), receive-error interrupt (erif), and break interrupt (brif) requests are disabled * 1: receive-data-full interrupt (rxif), receive-error interrupt (erif), and break interrupt (brif) requests are enabled note: * rxif interrupt requests can be cleared by reading the dr or rdf flag after it has been set to 1, then clearing the flag to 0, or by clearing rie to 0. erif or brif interrupt requests can be cleared by reading the er, br or orer flag after it has been set to 1, then clearing the flag to 0, or by clearing rie and reie to 0. 5 te 0 r/w transmit enable enables or disables the scif serial transmitter. 0: transmitter disabled 1: transmitter enabled * note: * serial transmission starts after writing of transmit data into scftdr. select the transmit format in scsmr and scfcr and reset the transmit fifo before setting te to 1.
section 16 serial communication interface with fifo (scif) page 804 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 re 0 r/w receive enable enables or disables the scif serial receiver. 0:receiver disabled * 1 1: receiver enabled * 2 notes: 1. clearing re to 0 does not affect the receive flags (dr, er, brk, rdf, fer, per, and orer). these flags retain their previous values. 2. serial reception starts when a start bit is detected in asynchronous mode, or synchronous clock input is detected in clock synchronous mode. select the receive format in scsmr and scfcr and reset the receive fifo before setting re to 1. 3 reie 0 r/w receive error interrupt enable enables or disables the receive-error (erif) interrupts and break (brif) interrupts. the setting of reie bit is valid only when rie bit is set to 0. 0: receive-error interrupt (erif) and break interrupt (brif) requests are disabled * 1: receive-error interrupt (erif) and break interrupt (brif) requests are enabled note: * erif or brif interrupt requests can be cleared by reading the er, br or orer flag after it has been set to 1, then clearing the flag to 0, or by clearing rie and reie to 0. even if rie is set to 0, when reie is set to 1, erif or brif interrupt requests are enabled.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 805 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 1, 0 cke[1:0] 00 r/w clock enable 1 and 0 select the scif clock source and enable or disable clock output from the sck pin. depending on the combination of cke1 and cke0, the sck pin can be used for serial clock output or serial clock input. the cke0 setting is valid only when the scif is operating on the internal clock (cke1 = 0). the cke0 setting is ignored when an external clock source is selected (cke1 = 1). in clock synchronous mode, select the scif operating mode in the serial mode register (scsmr), then set cke1 and cke0. ? asynchronous mode 00: internal clock, sck pin used for input pin (the input signal is ignored. the state of the sck pin depends on both the sckio and sckdt bits.) 01: internal clock, sck pin used for clock output ( the output clock frequency is 16 times the bit rate. ) 10: external clock, sck pin used for clock input (the input clock frequency is 16 times the bit rate.) 11: setting prohibited ? clock synchronous mode 00: internal clock, sck pin used for serial clock output 01: internal clock, sck pin used for serial clock output 10: external clock, sck pin used for serial clock input 11: setting prohibited
section 16 serial communication interface with fifo (scif) page 806 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 16.3.7 serial status register (scfsr) scfsr is a 16-bit register. the upper 8 bits indicat e the number of receives errors in the scfrdr data, and the lower 8 bits indicate the status flag indicating scif operating state. the cpu can always read and write to scfsr, but cannot write 1 to the status flags (er, tend, tdfe, brk, rdf, and dr). these flags can be cl eared to 0 only if they have first been read (after being set to 1). bits 3 (fer) and 2 (p er) are read-only bits that cannot be written. bit: initial value: r/w: 151413121110987654321 0 0000000001100000 rrrrrrrrr/(w) * r/(w) * r/(w) * r/(w) * r r r/(w) * r/(w) * note: to clear the flag, only 0 can be written after reading 1. * per[3:0] fer[3:0] er tend tdfe brk fer per rdf dr bit bit name initial value r/w description 15 to 12 per[3:0] 0000 r number of parity errors indicate the number of data including a parity error in the receive data stored in the receive fifo data register (scfrdr). after the er bit in scfsr is set to 1, the value indicated by bits 15 to 12 indicates the number of parity errors in scfrdr. when parity errors have occurred in all 16-byte receive data in scfrdr, per3 to per0 show 0. 11 to 8 fer[3:0] 0000 r number of framing errors indicate the number of data including a framing error in the receive data stored in scfrdr. after the er bit in scfsr is set to 1, the value indicated by bits 11 to 8 indicates the number of framing errors in scfrdr. when framing errors have occurred in all 16-byte receive data in scfrdr, fer3 to fer0 show 0.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 807 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7 er 0 r/(w) * receive error indicates the occurrence of a framing error, or of a parity error when receiving data that includes parity. * 1 0: receiving is in progress or has ended normally [clearing conditions] ? er is cleared to 0 a power-on reset ? er is cleared to 0 when the chip is when 0 is written after 1 is read from er 1: a framing error or parity error has occurred. [setting conditions] ? er is set to 1 when the stop bit is 0 after checking whether or not the last stop bit of the received data is 1 at the end of one data receive operation * 2 ? er is set to 1 when the total number of 1s in the receive data plus parity bit does not match the even/odd parity specified by the o/ e bit in scsmr notes: 1. clearing the re bit to 0 in scscr does not affect the er bit, which retains its previous value. even if a receive error occurs, the receive data is transferred to scfrdr and the receive operation is continued. whether or not the data read from scfrdr includes a receive error can be detected by the fer and per bits in scfsr. 2. in two stop bits mode, only the first stop bit is checked; the second stop bit is not checked.
section 16 serial communication interface with fifo (scif) page 808 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 tend 1 r/(w) * transmit end indicates that when the last bit of a serial character was transmitted, scftdr did not contain valid data, so transmission has ended. 0: transmission is in progress [clearing condition] ? tend is cleared to 0 when 0 is written after 1 is read from tend after transmit data is written in scftdr 1: end of transmission [setting conditions] ? tend is set to 1 when the chip is a power-on reset ? tend is set to 1 when te is cleared to 0 in the serial control register (scscr) ? tend is set to 1 when scftdr does not contain receive data when the last bit of a one-byte serial character is transmitted note: when data is written to scftdr by activating the dtc through a txif interrupt, the tend flag value is undefined. in this case, do not use the tend flag as a transmit end flag.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 809 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 tdfe 1 r/(w) * transmit fifo data empty indicates that data has been transferred from the transmit fifo data register (scftdr) to the transmit shift register (sctsr), the number of data in scftdr has become less than the transmission trigger number specified by the ttrg1 and ttrg0 bits in the fifo control register (scfcr), and writing of transmit data to scftdr is enabled. 0: the number of transmit data written to scftdr is greater than the specified transmission trigger number [clearing conditions] ? tdfe is cleared to 0 when data exceeding the specified transmission trigger number is written to scftdr after 1 is read from the tdfe bit and then 0 is written ? tdfe is cleared to 0 when data exceeding the specified transmission trigger number is written to scftdr by using the dtc 1: the number of transmit data in scftdr is less than or equal to the specified transmission trigger number * [setting conditions] ? tdfe is set to 1 by a power-on reset ? tdfe is set to 1 when the number of transmit data in scftdr becomes less than or equal to the specified transmission trigger number as a result of transmission note: * since scftdr is a 16-byte fifo register, the maximum number of data that can be written when tdfe is 1 is "16 minus the specified transmission trigger number". if an attempt is made to write additional data, the data is ignored. the number of data in scftdr is indicated by the upper 8 bits of scfdr.
section 16 serial communication interface with fifo (scif) page 810 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 brk 0 r/(w) * break detection indicates that a break signal has been detected in receive data. 0: no break signal received [clearing conditions] ? brk is cleared to 0 when the chip is a power-on reset ? brk is cleared to 0 when software reads brk after it has been set to 1, then writes 0 to brk 1: break signal received * [setting condition] ? brk is set to 1 when data including a framing error is received, and a framing error occurs with space 0 in the subsequent receive data note: * when a break is detected, transfer of the receive data (h'00) to scfrdr stops after detection. when the break ends and the receive signal becomes mark 1, the transfer of receive data resumes. 3 fer 0 r framing error indicates a framing error in the data read from the next receive fifo data register (scfrdr) in asynchronous mode. 0: no receive framing error occurred in the next data read from scfrdr [clearing conditions] ? fer is cleared to 0 when the chip undergoes a power-on reset ? fer is cleared to 0 when no framing error is present in the next data read from scfrdr 1: a receive framing error occurred in the next data read from scfrdr. [setting condition] ? fer is set to 1 when a framing error is present in the next data read from scfrdr
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 811 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 per 0 r parity error indicates a parity error in the data read from the next receive fifo data register (scfrdr) in asynchronous mode. 0: no receive parity error occurred in the next data read from scfrdr [clearing conditions] ? per is cleared to 0 when the chip undergoes a power-on reset ? per is cleared to 0 when no parity error is present in the next data read from scfrdr 1: a receive parity error occurred in the next data read from scfrdr [setting condition] ? per is set to 1 when a parity error is present in the next data read from scfrdr
section 16 serial communication interface with fifo (scif) page 812 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 rdf 0 r/(w) * receive fifo data full indicates that receive data has been transferred to the receive fifo data register (scfrdr), and the number of data in scfrdr has become more than the receive trigger number specified by the rtrg1 and rtrg0 bits in the fifo control register (scfcr). 0: the number of transmit data written to scfrdr is less than the specified receive trigger number [clearing conditions] ? rdf is cleared to 0 by a power-on reset ? rdf is cleared to 0 when the scfrdr is read until the number of receive data in scfrdr becomes less than the specified receive trigger number after 1 is read from rdf and then 0 is written ? rdf is cleared to 0 when the scfrdr is read by using the dtc until the number of receive data in scfrdr becomes less than the specified receive trigger number 1: the number of receive data in scfrdr is more than the specified receive trigger number [setting condition] ? rdf is set to 1 when a number of receive data more than the specified receive trigger number is stored in scfrdr * note: * scftdr is a 16-byte fifo register. when rdf is 1, the specified receive trigger number of data can be read at the maximum. if an attempt is made to read after all the data in scfrdr has been read, the data is undefined. the number of receive data in scfrdr is indicated by the lower 8 bits of scfdr.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 813 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 dr 0 r/(w) * receive data ready indicates that the number of data in the receive fifo data register (scfrdr) is less than the specified receive trigger number, and that the next data has not yet been received after the elapse of 15 etu from the last stop bit in asynchronous mode. in clock synchronous mode, this bit is not set to 1. 0: receiving is in progress, or no receive data remains in scfrdr after receiving ended normally [clearing conditions] ? dr is cleared to 0 when the chip undergoes a power-on reset ? dr is cleared to 0 when all receive data are read after 1 is read from dr and then 0 is written ? dr is cleared to 0 when all receive data in scfrdr are read by the dtc 1: next receive data has not been received [setting condition] ? dr is set to 1 when scfrdr contains less data than the specified receive trigger number, and the next data has not yet been received after the elapse of 15 etu from the last stop bit. * note: * this is equivalent to 1.5 frames with the 8-bit, 1-stop-bit format. (etu: elementary time unit) note: * to clear the flag, only 0 can be written after reading 1.
section 16 serial communication interface with fifo (scif) page 814 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 16.3.8 bit rate register (scbrr) scbrr is an 8-bit register that, together with the baud rate generator clock source selected by the cks1 and cks0 bits in the serial mode register (scsmr), determines th e serial transmit/receive bit rate. the cpu can always read and write to scbrr. scbrr is initialized to h'ff by a power-on reset. the scbrr setting is calculated as follows: bit: initial value: r/w: 7654321 0 11111111 r/w r/w r/w r/w r/w r/w r/w r/w ? asynchronous mode: n = 10 6 - 1 64 2 2n-1 b p ? clock synchronous mode: n = 10 6 - 1 8 2 2n-1 b p b: bit rate (bits/s) n: scbrr setting for baud rate generator (0 n 255) (the setting value should satisfy the electrical characteristics.) p : operating frequency for peripheral modules (mhz) n: baud rate generator clock source (n = 0, 1, 2, 3) (for the clock sources and values of n, see table 16.3.)
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 815 of 1560 mar 18, 2011 sh7080 group table 16.3 scsmr settings scsmr settings n clock source cks1 cks0 0 p 0 0 1 p /4 0 1 2 p /16 1 0 3 p /64 1 1 note: the bit rate error in asynchronous is given by the following formula: error (%) = - 1 100 (n + 1) b 64 2 2n-1 p 10 6
section 16 serial communication interface with fifo (scif) page 816 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tables 16.4 to 16.6 list examples of scbrr settings in asynchronous mode, and tables 16.7 to 16.9 list examples of scbrr settings in clock synchronous mode. table 16.4 bit rates and scbrr settings in asynchronous mode p (mhz) 10 12 14 16 18 20 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) 110 2 177 -0.25 2 212 0.03 2 248 -0.17 3 70 0.03 3 79 -0.12 3 88 -0.25 150 2 129 0.16 2 155 0.16 2 181 0.16 2 207 0.16 2 233 0.16 3 64 0.16 300 2 64 0.16 2 77 0.16 2 90 0.16 2 103 0.16 2 116 0.16 2 129 0.16 600 1 129 0.16 1 155 0.16 1 181 0.16 1 207 0.16 1 233 0.16 2 64 0.16 1200 1 64 0.16 1 77 0.16 1 90 0.16 1 103 0.16 1 116 0.16 1 129 0.16 2400 0 129 0.16 0 155 0.16 0 181 0.16 0 207 0.16 0 233 0.16 1 64 0.16 4800 0 64 0.16 0 77 0.16 0 90 0.16 0 103 0.16 0 116 0.16 0 129 0.16 9600 0 32 -1.36 0 38 0.16 0 45 -0.93 0 51 0.16 0 58 -0.69 0 64 0.16 14400 0 21 -1.36 0 25 0.16 0 29 1.27 0 34 -0.79 0 38 0.16 0 42 0.94 19200 0 15 1.73 0 19 -2.34 0 22 -0.93 0 25 0.16 0 28 1.02 0 32 -1.36 28800 0 10 -1.36 0 12 0.16 0 14 1.27 0 16 2.12 0 19 -2.34 0 21 -1.36 31250 0 9 0.00 0 11 0.00 0 13 0.00 0 15 0.00 0 17 0.00 0 19 0.00 38400 0 7 1.73 0 9 -2.34 0 10 3.57 0 12 0.16 0 14 -2.34 0 15 1.73
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 817 of 1560 mar 18, 2011 sh7080 group table 16.5 bit rates and scbrr settings in asynchronous mode p (mhz) 22 24 26 28 30 32 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) 110 3 97 -0.35 3 106 -0.44 3 114 0.36 3 123 0.23 3 132 0.13 3 141 0.03 150 3 71 -0.54 3 77 0.16 3 84 -0.43 3 90 0.16 3 97 -0.35 3 103 0.16 300 2 142 0.16 2 155 0.16 2 168 0.16 2 181 0.16 2 194 0.16 2 207 0.16 600 2 71 -0.54 2 77 0.16 2 84 -0.43 2 90 0.16 2 97 -0.35 2 103 0.16 1200 1 142 0.16 1 155 0.16 1 168 0.16 1 181 0.16 1 194 0.16 1 207 0.16 2400 1 71 -0.54 1 77 0.16 1 84 -0.43 1 90 0.16 1 97 -0.35 1 103 0.16 4800 0 142 0.16 0 155 0.16 0 168 0.16 0 181 0.16 0 194 0.16 0 207 0.16 9600 0 71 -0.54 0 77 0.16 0 84 -0.43 0 90 0.16 0 97 -0.35 0 103 0.16 14400 0 47 -0.54 0 51 0.16 0 55 0.76 0 60 -0.39 0 64 0.16 0 68 0.64 19200 0 35 -0.54 0 38 0.16 0 41 0.76 0 45 -0.93 0 48 -0.35 0 51 0.16 28800 0 23 -0.54 0 25 0.16 0 27 0.76 0 29 1.27 0 32 -1.36 0 34 -0.79 31250 0 21 0.00 0 23 0.00 0 25 0.00 0 27 0.00 0 29 0.00 0 31 0.00 38400 0 17 -0.54 0 19 -2.34 0 20 0.76 0 22 -0.93 0 23 1.73 0 25 0.16
section 16 serial communication interface with fifo (scif) page 818 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 16.6 bit rates and scbrr settings in asynchronous mode p (mhz) 34 36 38 40 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) 110 3 150 -0.05 3 159 -0.12 3 168 -0.19 3 177 -0.25 150 3 110 -0.29 3 116 0.16 3 123 -0.24 3 129 0.16 300 2 220 0.16 2 233 0.16 2 246 0.16 3 64 0.16 600 2 110 -0.29 2 116 0.16 2 123 -0.24 2 129 0.16 1200 1 220 0.16 1 233 0.16 1 246 0.16 2 64 0.16 2400 1 110 -0.29 1 116 0.16 1 123 -0.24 1 129 0.16 4800 0 220 0.16 0 233 0.16 0 246 0.16 1 64 0.16 9600 0 110 -0.29 0 116 0.16 0 123 -0.24 0 129 0.16 14400 0 73 -0.29 0 77 0.16 0 81 0.57 0 86 -0.22 19200 0 54 0.62 0 58 -0.69 0 61 -0.24 0 64 0.16 28800 0 36 -0.29 0 38 0.16 0 40 0.57 0 42 0.94 31250 0 33 0.00 0 35 0.00 0 37 0.00 0 39 0.00 38400 0 27 -1.18 0 28 1.02 0 30 -0.24 0 32 -1.36
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 819 of 1560 mar 18, 2011 sh7080 group table 16.7 bit rates and scbrr settings in clock synchronous mode p (mhz) 10 12 14 16 18 20 bit rate (bits/s) n n n n n n n n n n n n 250 3 155 3 187 3 218 3 249 500 3 77 3 93 3 108 3 124 3 140 3 155 1000 2 155 2 187 2 218 2 249 3 69 3 77 2500 1 249 2 74 2 87 2 99 2 112 2 124 5000 1 124 1 149 1 174 1 199 1 224 1 249 10000 0 249 1 74 1 87 1 99 1 112 1 124 25000 0 99 0 119 0 139 0 159 0 179 0 199 50000 0 49 0 59 0 69 0 79 0 89 0 99 100000 0 24 0 29 0 34 0 39 0 44 0 49 250000 0 9 0 11 0 13 0 15 0 17 0 19 500000 0 4 0 5 0 6 0 7 0 8 0 9 1000000 ? ? 0 2 ? ? 0 3 ? ? 0 4 2500000 0 0 * ? ? ? ? ? ? ? ? 0 1 5000000 ? ? ? ? ? ? ? ? 0 0 *
section 16 serial communication interface with fifo (scif) page 820 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 16.8 bit rates and scbrr settings in clock synchronous mode p (mhz) 22 24 26 28 30 32 bit rate (bits/s) n n n n n n n n n n n n 250 500 3 171 3 187 3 202 3 218 3 233 3 249 1000 3 85 3 93 3 101 3 108 3 116 3 124 2500 2 137 2 149 2 162 2 174 2 187 2 199 5000 2 68 2 74 2 80 2 87 2 93 2 99 10000 1 137 1 149 1 162 1 174 1 187 1 199 25000 0 219 0 239 1 64 1 69 1 74 1 79 50000 0 109 0 119 0 129 0 139 0 149 0 159 100000 0 54 0 59 0 64 0 69 0 74 0 79 250000 0 21 0 23 0 25 0 27 0 29 0 31 500000 0 10 0 11 0 12 0 13 0 14 0 15 1000000 ? ? 0 5 ? ? 0 6 ? ? 0 7 2500000 ? ? ? ? ? ? ? ? 0 2 ? ? 5000000 ? ? ? ? ? ? ? ? ? ? ? ?
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 821 of 1560 mar 18, 2011 sh7080 group table 16.9 bit rates and scbrr settings in clock synchronous mode p (mhz) 34 36 38 40 bit rate (bits/s) n n n n n n n n 250 500 1000 3 132 3 140 3 147 3 155 2500 2 212 2 224 2 237 2 249 5000 2 105 2 112 2 118 2 124 10000 1 212 1 224 1 237 1 249 25000 1 84 1 89 1 94 1 99 50000 0 169 0 179 0 189 0 199 100000 0 84 0 89 0 94 0 99 250000 0 33 0 35 0 37 0 39 500000 0 16 0 17 0 18 0 19 1000000 ? ? 0 8 ? ? 0 9 2500000 ? ? ? ? ? ? 0 3 5000000 ? ? ? ? ? ? 0 1 [legend] blank: no setting possible ? : setting possible, but error occurs * : continuous transmission/reception is disabled. note: settings with an error of 1% or less are recommended. table 16.10 indicates the maximum bit rates in asynchronous mode when the baud rate generator is used. tables 16.11 and 16.12 list the maximum rates for external clock input.
section 16 serial communication interface with fifo (scif) page 822 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 16.10 maximum bit rates for various frequencies with baud rate generator (asynchronous mode) settings p (mhz) maximum bit rate (bits/s) n n 10 312500 0 0 12 375000 0 0 14 437500 0 0 16 500000 0 0 18 562500 0 0 20 625000 0 0 22 687500 0 0 24 750000 0 0 26 812500 0 0 28 875000 0 0 30 937500 0 0 32 1000000 0 0 34 1062500 0 0 36 1125000 0 0 38 1187500 0 0 40 1250000 0 0
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 823 of 1560 mar 18, 2011 sh7080 group table 16.11 maximum bit rates with external clock input (asynchronous mode) p (mhz) external input clock (m hz) maximum bit rate (bits/s) 10 2.5000 156250 12 3.0000 187500 14 3.5000 218750 16 4.0000 250000 18 4.5000 281250 20 5.0000 312500 22 5.5000 343750 24 6.0000 375000 26 6.5000 406250 28 7.0000 437500 30 7.5000 468750 32 8.0000 500000 34 8.5000 531250 36 9.0000 562500 38 9.5000 593750 40 10.0000 625000
section 16 serial communication interface with fifo (scif) page 824 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 16.12 maximum bit rates with external clock input (clock synchronous mode) p (mhz) external input clock (m hz) maximum bit rate (bits/s) 10 1.6667 1666666.7 12 2.0000 2000000.0 14 2.3333 2333333.3 16 2.6667 2666666.7 18 3.0000 3000000.0 20 3.3333 3333333.3 22 3.6667 3666666.7 24 4.0000 4000000.0 26 4.3333 4333333.3 28 4.6667 4666666.7 30 5.0000 5000000.0 32 5.3333 5333333.3 34 5.6667 5666666.7 36 6.0000 6000000.0 38 6.3333 6333333.3 40 6.6667 6666666.7
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 825 of 1560 mar 18, 2011 sh7080 group 16.3.9 fifo control register (scfcr) scfcr is a 16-bit register that resets the num ber of data in the transmit and receive fifo registers, sets the trigger data number, and contains an enable bit for loop-back testing. scfcr can always be read and written to by the cpu. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/w - - - - - rstrg[2:0] rtrg[1:0] ttrg[1:0] mce tfrst rfrst loop bit bit name initial value r/w description 15 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 to 8 rstrg[2:0] 000 r/w rts output active trigger when the number of receive data in the receive fifo register (scfrdr) becomes more than the number shown below, the rts signal is set to high. these bits are valid only when modem control signals are enabled in asynchronous mode. 000: 15 001: 1 010: 4 011: 6 100: 8 101: 10 110: 12 111: 14
section 16 serial communication interface with fifo (scif) page 826 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7, 6 rtrg[1:0] 00 r/w receive fifo data trigger set the specified receive trigger number. the receive data full (rdf) flag in the serial status register (scfsr) is set when the number of receive data stored in the receive fifo register (scfrdr) exceeds the specified trigger number shown below. ? asynchronous mode 00: 1 01: 4 10: 8 11: 14 ? clock synchronous mode 00: 1 01: 2 10: 8 11: 14 5, 4 ttrg[1:0] 00 r/w transmit fifo data trigger 1 and 0 set the specified transmit trigger number. the transmit fifo data register empty (tdfe) flag in the serial status register (scfsr) is set when the number of transmit data in the transmit fifo data register (scftdr) becomes less than the specified trigger number shown below. 00: 8 (8) * 01: 4 (12) * 10: 2 (14) * 11: 0 (16) * note: * values in parentheses mean the number of remaining bytes in scftdr when the tdfe flag is set to 1.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 827 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 mce 0 r/w modem control enable enables modem control signals cts and rts . in clock synchronous mode, clear this bit to 0. 0: modem signal disabled * 1: modem signal enabled note: * regardless of the input value, the cts level has no effect on transmit operation and the rts level has no effect on receive operation. 2 tfrst 0 r/w transmit fifo data register reset disables the transmit data in the transmit fifo data register and resets the data to the empty state. 0: reset operation disabled * 1: reset operation enabled note: * reset operation is executed by a power-on reset. 1 rfrst 0 r/w receive fifo data register reset disables the receive data in the receive fifo data register and resets the data to the empty state. 0: reset operation disabled * 1: reset operation enabled note: * reset operation is executed by a power-on reset. 0 loop 0 r/w loop-back test internally connects the transmit output pin (txd) and receive input pin (rxd) and internally connects the rts pin and cts pin and enables loop-back testing. 0: loop back test disabled 1: loop back test enabled
section 16 serial communication interface with fifo (scif) page 828 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 16.3.10 fifo data count register (scfdr) scfdr is a 16-bit register which indicates the number of data stored in the transmit fifo data register (scftdr) and the receive fifo data register (scfrdr). it indicates the number of transmit data in scftdr with the upper eight bits , and the number of receive data in scfrdr with the lower eight bits. scfdr can always be read from by the cpu. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr - - - t[4:0] - - - r[4:0] bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 to 8 t[4:0] 00000 r indicate the number of non-transmitted data stored in scftdr. h'00 means no transmit data, and h'10 means that scftdr is full of transmit data. 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 to 0 r[4:0] 00000 r indicate the number of receive data stored in scfrdr. h'00 means no receive data, and h'10 means that scfrdr full of receive data.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 829 of 1560 mar 18, 2011 sh7080 group 16.3.11 serial port re gister (scsptr) scsptr is a 16-bit register that controls input/output and data for the pins multiplexed to the scif function. bits 7 and 6 can control the rts pin, bits 5 and 4 can control the cts pin, and bits 3 and 2 can control the sck pin. bits 1 and 0 can be used to output data to the txd pin, so they control break of serial transfer. in addition to descriptions of individual bits shown below, see section 16.6, serial port register (scsptr) and scif pins. scsptr can always be read from or written to by the cpu. note that the respective port registers should be used to read the values on the scif pins. for details, refer to section 22, i/o ports. bit: initial value: r/w: 151413121110987654321 0 00000000 0-0-0-0- rrrrrrrrr/wr/wr/wr/wr/wr/wr/wr/w - - - - - - - - rtsio rtsdt ctsio ctsdt sckio sckdt spbio spbdt bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 rtsio 0 r/w rts port input/output control controls the rts pin in combination with the rtsdt bit in this register and the mce bit in scfcr. 6 rtsdt undefined r/w rts port data controls the rts pin in combination with the rtsio bit in this register and the mce bit in scfcr. select the rts pin function in the pfc (pin function controller) beforehand. mce rtsio rtsdt: rts pin state 0 0 : setting prohibited (initial state) 0 1 0: low level output 0 1 1: high level output 1 : sequence output according to modem control logic note: : don't care
section 16 serial communication interface with fifo (scif) page 830 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 ctsio 0 r/w cts port input/output control controls the cts pin in combination with the ctsdt bit in this register and the mce bit in scfcr. 4 ctsdt undefined r/w cts port data controls the cts pin in combination with the ctsio bit in this register and the mce bit in scfcr. select the cts pin function in the pfc (pin function controller) beforehand. mce ctsio ctsdt: cts pin state 0 0 : setting prohibited (initial state) 0 1 0: low level output 0 1 1: high level output 1 : input to modem control logic note: : don't care 3 sckio 0 r/w sck port input/output control controls the sck pin in combination with the sckdt bit in this register, the c/a bit in scsmr, and bits cke1 and cke0 in scscr.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 831 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 sckdt undefined r/w sck port data controls the sck pin in combination with the sckio bit in this register, the c/ a bit in scsmr, and bits cke1 and cke0 in scscr. select the sck pin function in the pfc (pin function controller) beforehand. c/ a cke1 cke0 sckio sckdt: sck pin state 0 0 0 0 : setting prohibited (initial state) 0 0 0 1 0: low level output 0 0 0 1 1: high level output 0 0 1 : internal clock output according to serial core logic 0 1 0 : external clock input to serial core logic 0 1 1 : setting prohibited 1 0 0 : internal clock output according to serial core logic 1 0 1 : internal clock output according to serial core logic 1 1 0 : external clock input to serial core logic 1 1 1 : setting prohibited note: : don't care 1 spbio 0 r/w serial port break output control controls the txd pin in combination with the spbdt bit in this register and the te bit in scscr. 0 spbdt undefined r/w serial port break data controls the txd pin in combination with the spbio bit in this register and the te bit in scscr. select the txd pin function in the pfc (pin function controller) beforehand. te spbio spbdt: txd pin state 0 0 : setting prohibited (initial state) 0 1 0: low level output 0 1 1: high level output 0 : transmit data output according to serial core logic note: : don't care
section 16 serial communication interface with fifo (scif) page 832 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 16.3.12 line status register (sclsr) sclsr is a 16-bit readable/writable register which can always be read from and written to by the cpu. however, a 1 cannot be written to the orer flag. this flag can be cleared to 0 only if it has first been read (after being set to 1). bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr/(w) * note: to clear the flag, only 0 can be written after reading 1. * - - - - - - - - - - - - - - - orer bit bit name initial value r/w description 15 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 orer 0 r/(w) * overrun error indicates the occurrence of an overrun error. 0: receiving is in progress or has ended normally * 1 [clearing conditions] ? orer is cleared to 0 when the chip is a power-on reset ? orer is cleared to 0 when 0 is written after 1 is read from orer. 1: an overrun error has occurred * 2 [setting condition] ? orer is set to 1 when the next serial receiving is finished while receive fifo data are full. notes: 1. clearing the re bit to 0 in scscr does not affect the orer bit, which retains its previous value. 2. the receive fifo data register (scfrdr) hold the data before an overrun error is occurred, and the next receive data is extinguished. when orer is set to 1, scif can not continue the next serial receiving.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 833 of 1560 mar 18, 2011 sh7080 group 16.4 operation 16.4.1 overview for serial communication, the scif has an asynchronous mode in which characters are synchronized individually, and a clock synchronous mode in which communication is synchronized with clock pulses. the scif has a 16-byte fifo buffe r for both transmit and receive operations, reducing the overhead of the cpu, and enabling continuous high-speed communication. moreover, it has rts and cts signals as modem control signals. the transmission format is selected in the serial mode register (scsmr) as shown in table 16.13. the scif clock source is selected by the combination of the cke1 and cke0 bits in the serial control register (scscr) as shown in table 16.14. (1) asynchronous mode ? data length is selectable: 7 or 8 bits. ? parity bit is selectable. so is the stop bit length (1 or 2 bits). the combination of the preceding selections constitutes the communication format and character length. ? in receiving, it is possible to detect framing er rors, parity errors, receive fifo data full, overrun errors, receive data ready, and breaks. ? the number of stored data bytes is indicated fo r both the transmit and receive fifo registers. ? an internal or external clock can be selected as the scif clock source. ? when an internal clock is selected, the scif operates using the on-chip baud rate generator. ? when an external clock is sel ected, the external clock input must have a frequency 16 times the bit rate. (the on-chip baud rate generator is not used.) (2) clock synchronous mode ? the transmission/reception format has a fixed 8-bit data length. ? in receiving, it is possible to detect overrun errors (orer). ? an internal or external clock can be selected as the scif clock source. ? when an internal clock is selected, the scif operates using the on-chip baud rate generator, and outputs a serial clock signal to external devices. ? when an external clock is selected, the scif operates on the input serial clock. the on- chip baud rate generator is not used.
section 16 serial communication interface with fifo (scif) page 834 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 16.13 scsmr settings and scif communication formats scsmr settings scif communication format bit 7 c/ a bit 6 chr bit 5 pe bit 3 stop mode data length parity bit stop bit length 0 0 0 0 8-bit not set 1 bit 1 2 bits 1 0 set 1 bit 1 2 bits 1 0 0 7-bit not set 1 bit 1 2 bits 1 0 set 1 bit 1 asynchronous 2 bits 1 x x x clock synchronous 8-bit not set none [legend] x: don't care table 16.14 scsmr and scscr settings and scif clock source selection scsmr scscr settings scif transmit/receive clock bit 7 c/ a bit 1 cke1 bit 0 cke0 mode clock source sck pin function 0 0 0 asynchronous internal scif does not use the sck pin. the state of the sck pin depends on both the sckio and sckdt bits. 1 clock with a frequency 16 times the bit rate is output. 1 0 external input a clock with frequency 16 times the bit rate. 1 ? setting prohibited. 1 0 x internal serial clock is output. 1 0 clock synchronous external input the serial clock. 1 ? setting prohibited. [legend] x: don't care
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 835 of 1560 mar 18, 2011 sh7080 group 16.4.2 operation in asynchronous mode in asynchronous mode, each transmitted or received character begins with a start bit and ends with a stop bit. serial communication is s ynchronized one character at a time. the transmitting and receiving sections of the scif are independent, so full duplex communication is possible. the transmitter and receive r are 16-byte fifo buffered, so data can be written and read while transmitting and receiving ar e in progress, enabling continuous transmitting and receiving. figure 16.2 shows the general form at of asynchronous serial communication. in asynchronous serial communication, the communication line is normally held in the mark (high) state. the scif monitors the line and starts serial communi cation when the line goes to the space (low) state, indicating a start b it. one serial character consists of a start bit (low), data (lsb first), parity bit (high or low), and stop bit (high), in that order. when receiving in asynchronous mode, the scif synchronizes at the falling edge of the start bit. the scif samples each data bit on the eighth pulse of a clock with a frequency 16 times the bit rate. receive data is latched at the center of each bit. lsb start bit msb idle state (mark state) stop bit 0 transmit/receive data d0 d1 d2 d3 d4 d5 d6 d7 0/1 1 1 1 1 serial data parity bit 1 bit 1 or 2 bits 7 or 8 bits 1 bit or none one unit of transfer data (character or frame) figure 16.2 example of data format in asynchronous communication (8-bit data with parity and two stop bits)
section 16 serial communication interface with fifo (scif) page 836 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (1) transmit/receive formats table 16.15 lists the eight communication formats that can be selected in asynchronous mode. the format is selected by settings in th e serial mode register (scsmr). table 16.15 serial communication formats (asynchronous mode) scsmr bits serial transmit/receive format and frame length chr pe stop 1 2 3 4 5 6 7 8 9 10 11 12 0 0 0 start 8-bit data stop 0 0 1 start 8-bit data stop stop 0 1 0 start 8-bit data p stop 0 1 1 start 8-bit data p stop stop 1 0 0 start 7-bit data stop 1 0 1 start 7-bit data stop stop 1 1 0 start 7-bit data p stop 1 1 1 start 7-bit data p stop stop [legend] start: start bit stop: stop bit p: parity bit (2) clock an internal clock generated by the on-chip baud rate generator or an external clock input from the sck pin can be selected as the scif transmit/receive clock. the cl ock source is selected by the c/ a bit in the serial mode register (scsmr) and bits cke1 and cke0 in the serial control register (scscr). for selection of the scif clock source, see table 16.14. when an external clock is input at the sck pin, it must have a frequency equal to 16 times the desired bit rate. when the scif operates on an internal clock, it can output a clock signal at the sck pin. the frequency of this output clock is equal to 16 times the desired bit rate.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 837 of 1560 mar 18, 2011 sh7080 group (3) transmitting and receiving data scif initialization (asynchronous mode): before transmitting or receiving, clear the te and re bits to 0 in the serial control register (scscr), then initialize the scif as follows. when changing the operation mode or the communi cation format, always clear the te and re bits to 0 before following the procedure given below. clearing te to 0 initializes the transmit shift register (sctsr). clearing te and re to 0, however, does not initialize the serial status register (scfsr), transmit fifo data register (scftdr), or receive fifo data register (scfrdr), which retain their previous contents. clear te to 0 after all transmit data has been transmitted and the tend flag in the scfsr is set. the te bit can be cleared to 0 during transmission, but the transmit data goes to the mark state after the bit is cleared to 0. set the tfrst bit in scfcr to 1 and reset scftdr before te is set again to start transmission. when an external clock is used, the clock should not be stopped during initia lization or subsequent operation. scif operation becomes unr eliable if the clock is stopped.
section 16 serial communication interface with fifo (scif) page 838 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 16.3 shows a sample flowchart for initializing the scif. start of initialization clear te and re bits in scscr to 0 set tfrst and rfrst bits in scfcr to 1 set cke1 and cke0 bits in scscr (leaving te, re, tie, and rie bits cleared to 0) set data transfer format in scsmr set value in scbrr 1-bit interval elapsed? set rtrg1-0 and ttrg1-0 and mce bits in scfcr, and clear tfrst and rfrst bits to 0 set pfc for external pins to be used (sck, txd, rxd, cts , and rts ) wait no yes set the clock selection in scscr. be sure to clear bits tie, rie, te, and re to 0. set the data transfer format in scsmr. write a value corresponding to the bit rate into scbrr. (not necessary if an external clock is used.) make appropriate settings in the pfc for the external pins to be used. wait at least one bit interval, then set the te bit or re bit in scscr to 1. also set the rie, reie, and tie bits. setting the te bit enables the txd and rxd pins to be used. when transmitting, the scif will go to the mark state; when receiving, it will go to the idle state, waiting for a start bit. [1] [1] [2] [3] [4] [5] [2] [3] [4] set te and re bits in scscr to 1, and set tie, rie, and reie bits end of initialization [5] after reading brk, dr, and er flags in scfsr, and each flag in sclsr, write 0 to clear them figure 16.3 sample flowchart for scif initialization
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 839 of 1560 mar 18, 2011 sh7080 group transmitting serial data (asynchronous mode): figure 16.4 shows a sample flowchart for serial transmission. use the following procedure for seri al data transmission after enabling the scif for transmission. start of transmission read tdfe flag in scfsr tdfe = 1? write transmit data in scftdr, and read 1 from tdfe flag and tend flag in scfsr, then clear to 0 all data transmitted? read tend flag in scfsr tend = 1? break output? clear spbdt to 0 and set spbio to 1 clear te bit in scscr to 0 end of transmission no yes no yes no yes no yes [1] scif status check and transmit data write: read scfsr and check that the tdfe flag is set to 1, then write transmit data to scftdr, and read 1 from the tdfe and tend flags, then clear to 0. the number of transmit data bytes that can be written is 16 - (transmit trigger set number). [2] serial transmission continuation procedure: to continue serial transmission, read 1 from the tdfe flag to confirm that writing is possible, then write data to scftdr, and then clear the tdfe flag to 0. [3] break output at the end of serial transmission: to output a break in serial transmission, clear the spbdt bit to 0 and set the spbio bit to 1 in scsptr, then clear the te bit in scscr to 0. in [1] and [2], it is possible to ascertain the number of data bytes that can be written from the number of transmit data bytes in scftdr indicated by the upper 8 bits of scfdr. [1] [2] [3] figure 16.4 sample flowchart for transmitting serial data
section 16 serial communication interface with fifo (scif) page 840 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group in serial transmission, the scif operates as described below. 1. when data is written into the transmit fifo data register (scftdr), the scif transfers the data from scftdr to the transmit shift register (sctsr) and starts transmitting. confirm that the tdfe flag in the serial status register (scfsr) is set to 1 before writing transmit data to scftdr. the number of data bytes that can be written is (16 ? transmit trigger setting). 2. when data is transferred from scftdr to sctsr and transmission is started, consecutive transmit operations are performed until there is no transmit data left in scftdr. when the number of transmit data bytes in scftdr falls below the transmit trigger number set in the fifo control register (scfcr), the tdfe flag is set. if the tie bit in the serial control register (scsr) is set to 1 at this time, a transmit-fifo-data-empty interrupt (txif) request is generated. the serial transmit data is sent from the txd pin in the following order. a. start bit: one-bit 0 is output. b. transmit data: 8-bit or 7-bit data is output in lsb-first order. c. parity bit: one parity bit (even or odd parity) is output. (a format in which a parity bit is not output can also be selected.) d. stop bit(s): one or two 1 bits (stop bits) are output. e. mark state: 1 is output continuously until the start bit that starts the next transmission is sent. 3. the scif checks the scftdr transmit data at the timing for sending the stop bit. if data is present, the data is transferred from scftdr to sctsr, the stop bit is sent, and then serial transmission of the next frame is started. if th ere is no transmit data, the tend flag in scfsr is set to 1, the stop bit is sent, and then the line goes to the mark state in which 1 is output continuously.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 841 of 1560 mar 18, 2011 sh7080 group figure 16.5 shows an example of the operation for transmission. 1 0 d0 d1 d7 0/1 1 0 d0 d1 d7 0/1 1 1 tdfe tend serial data start bit data parity bit stop bit start bit idle state (mark state) data parity bit stop bit txif interrupt request data written to scftdr and tdfe flag read as 1 then cleared to 0 by txif interrupt handler one frame txif interrupt request figure 16.5 example of transmit operation (8-bit data, parity, one stop bit) 4. when modem control is enabled, transmission can be stopped and restarted in accordance with the cts input value. when cts is set to 1, if transmission is in progress, the line goes to the mark state after transmission of one frame. when cts is set to 0, the next transmit data is output starting from the start bit. figure 16.6 shows an example of the operation when modem control is used. serial data txd 0 d0 d1 d7 0/1 0 d0 d1 d7 0/1 cts drive high before stop bit start bit parity bit stop bit start bit figure 16.6 example of operation using modem control ( cts )
section 16 serial communication interface with fifo (scif) page 842 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group receiving serial data (asynchronous mode): figures 16.7 and 16.8 show a sample flowchart for serial reception. use the following procedure for serial data r eception after enabling th e scif for reception. start of reception read er, dr, brk flags in scfsr and orer flag in sclsr er, dr, brk or orer = 1? read rdf flag in scfsr rdf = 1? read receive data in scfrdr, and clear rdf flag in scfsr to 0 all data received? clear re bit in scscr to 0 end of reception yes no yes yes no no error handling [1] receive error handling and break detection: read the dr, er, and brk flags in scfsr, and the orer flag in sclsr, to identify any error, perform the appropriate error handling, then clear the dr, er, brk, and orer flags to 0. in the case of a framing error, a break can also be detected by reading the value of the rxd pin. [2] scif status check and receive data read: read scfsr and check that rdf = 1, then read the receive data in scfrdr, read 1 from the rdf flag, and then clear the rdf flag to 0. the transition of the rdf flag from 0 to 1 can also be identified by an rxif interrupt. [3] serial reception continuation procedure: to continue serial reception, read at least the receive trigger number of receive data bytes from scfrdr, read 1 from the rdf flag, then clear the rdf flag to 0. the number of receive data bytes in scfrdr can be ascertained by reading from the lower 8 bits of scfdr. [1] [2] [3] figure 16.7 sample flowchart for recei ving serial data
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 843 of 1560 mar 18, 2011 sh7080 group error handling receive error handling er = 1? brk = 1? break handling dr = 1? read receive data in scfrdr clear dr, er, brk flags in scfsr, and orer flag in sclsr, to 0 end yes yes yes no overrun error handling orer = 1? yes no no no [1] whether a framing error or parity error has occurred in the receive data that is to be read from scfrdr can be ascertained from the fer and per bits in scfsr. [2] when a break signal is received, receive data is not transferred to scfrdr while the brk flag is set. however, note that the last data in scfrdr is h'00, and the break data in which a framing error occurred is stored. figure 16.8 sample flowchart for receiving serial data (cont)
section 16 serial communication interface with fifo (scif) page 844 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group in serial reception, the scif operates as described below. 1. the scif monitors the transmission line, and if a 0 start bit is detected, performs internal synchronization and starts reception. 2. the received data is stored in scrsr in lsb-to-msb order. 3. the parity bit and stop bit are received. after receiving these bits, the scif carries out the following checks. a. stop bit check: the scif check s whether the stop bit is 1. if there are two stop bits, only the first is checked. b. the scif checks whether rece ive data can be transferred from the receive shift register (scrsr) to scfrdr. c. overrun check: the scif checks that the orer flag is 0, i ndicating that the overrun error has not occurred. d. break check: the scif checks that the brk flag is 0, indi cating that the break state is not set. if all the above checks are passed, the receive data is stored in scfrdr. note: when a parity error or a framing error occurs, reception is not suspended. 4. if the rie bit in scscr is se t to 1 when the rdf or dr flag changes to 1, a receive-fifo- data-full interrupt (rxif) request is generated. if the rie bit or the reie bit in scscr is set to 1 when the er flag changes to 1, a receive-err or interrupt (erif) request is generated. if the rie bit or the reie bit in scscr is set to 1 when the brk or orer flag changes to 1, a break reception interrupt (brif) request is generated. figure 16.9 shows an example of the operation for reception.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 845 of 1560 mar 18, 2011 sh7080 group 1 1 0 d0 d1 d7 0/1 1 0 d0 d1 d7 0/1 idle state (mark state) 1 rdf fer serial data start bit data parity bit stop bit start bit data parity bit stop bit rxif interrupt request one frame data read and rdf flag read as 1 then cleared to 0 by rxif interrupt handler erif interrupt request generated by receive error figure 16.9 example of scif receive operation (8-bit data, parity, one stop bit) 5. when modem control is enabled, the rts signal is output depending on the empty status of scfrdr. when rts is 0, reception is possible. when rts is 1, this indicates that the scfrdr is full and no extra data can be received. figure 16.10 shows an example of the operation when modem control is used. d0 d1 d2 d7 0/1 d0 d1 d7 0/1 10 0 rts serial data rxd start bit parity bit stop bit start bit figure 16.10 example of operation using modem control ( rts )
section 16 serial communication interface with fifo (scif) page 846 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 16.4.3 clock synchronous mode in clock synchronous mode, the scif transmits and receives data in s ynchronization with clock pulses. this mode is suitable for high-speed serial communication. the scif transmitter and receiver are independent, so full-duplex communication is possible while sharing the same clock. the transmitter a nd receiver are also 16-byte fifo buffered, so continuous transmitting or receiving is possible by reading or writing data while transmitting or receiving is in progress. figure 16.11 shows the general format in clock synchronous serial communication. don ' t care don ' t care one unit of transfer data (character or frame) bit 0 serial data synchronization clock bit 1 bit 3 bit 4 bit 5 lsb msb bit 2 bit 6 bit 7 * * note: * high except in continuous transfer figure 16.11 data format in clock synchronous communication
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 847 of 1560 mar 18, 2011 sh7080 group in clock synchronous serial communication, each data bit is output on the communication line from one falling edge of the serial clock to the next. data is guaranteed valid at the rising edge of the serial clock. in each character, the serial data bits are transmitted in order from the lsb (first) to the msb (last). after output of the msb, the communication line remains in the state of the msb. in clock synchronous mode, the scif receives data in synchronization with the rising edge of the serial clock. (1) communication format the data length is fixed at eight bits. no parity bit can be added. (2) clock an internal clock generated by the on-chip baud rate generator or an external clock input from the sck pin can be selected as th e scif transmit/receive clock. when the scif operates on an internal clock, it outputs the clock signal at the sck pin. eight clock pulses are output per transmitted or received character. when the scif is not transmitting or receiving, the clock signal remains in the high st ate. when only receiving, the clock signal outputs while the re bit of scscr is 1 and the number of data in receive fifo is more than the receive fifo data trigger number. in this case, 8 (16 + 1) = 136 pulses of synchronous clock are output. to perform reception of n characters of data, select an external clock as the clock source. if an internal clock should be used, set re = 1 and te = 1 and receive n characters of data simultaneously with the transmission of n characters of dummy data. (3) transmitting and receiving data scif initialization (clock synchronous mode): before transmitting, receiving, or changing the mode or communication format, the software must clear the te and re bits to 0 in the serial control register (scscr), then initialize the scif. clearing te to 0 initializes the transmit shift register (sctsr). clearing re to 0, however, does not initialize the rdf, per, fer, and orer flags and receive data regi ster (scrdr), which retain their previous contents.
section 16 serial communication interface with fifo (scif) page 848 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 16.12 shows a sample flowchart for initializing the scif. start of initialization clear te and re bits in scscr to 0 set tfrst and rfrst bits in scfcr to 1 to clear the fifo buffer after reading brk, dr, and er flags in scfsr and a flag in sclsr, write 0 to clear them set cke1 and cke0 bits in scscr (leaving te, re, tie, and rie bits cleared to 0) set data transfer format in scsmr set value in scbrr 1-bit interval elapsed? set rtrg1-0 and ttrg1-0 bits in scfcr, and clear tfrst and rfrst bits to 0 set pfc for external pins to be used (sck, txd, rxd, cts , and rts ) wait no yes leave the te and re bits cleared to 0 until the initialization almost ends. be sure to clear the tie, rie, te, and re bits to 0. set the data transfer format in scsmr. set the cke1 and cke0 bits. write a value corresponding to the bit rate into scbrr. this is not necessary if an external clock is used. wait at least one bit interval after this write before moving to the next step. make appropriate settings in the pfc for the external pins to be used. set the te or re bit in scscr to 1. also set the tei, rie, and reie bits to enable the txd, rxd, and sck pins to be used. when transmitting, the txd pin will go to the mark state. when receiving in clock synchronous mode with the synchronization clock output (clock master) selected, a clock starts to be output from the sck pin at this point. [1] [1] [2] [3] [4] [5] [6] [2] [3] [4] [5] set te and re bits in scscr to 1, and set tie, rie, and reie bits end of initialization [6] figure 16.12 sample flowchart for scif initialization
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 849 of 1560 mar 18, 2011 sh7080 group transmitting serial data (clock synchronous mode): figure 16.13 shows a sample flowchart for transmitting serial data. start of transmission read tdfe flag in scfsr tdfe = 1? write transmit data to scftdr and clear tdfe flag and tend flag in scfsr to 0 after reading them as 1 all data transmitted? read tend flag in scfsr tend = 1? clear te bit in scscr to 0 end of transmission no yes no yes no yes [1] scif status check and transmit data write: read scfsr and check that the tdfe flag and the tend flag are set to 1, then write transmit data to scftdr, and clear the tdfe flag and the tend flag to 0. [2] serial transmission continuation procedure: to continue serial transmission, read 1 from the tdfe flag to confirm that writing is possible, them write data to scftdr, and then clear the tdfe flag to 0. [1] [2] figure 16.13 sample flowchart for transmitting serial data
section 16 serial communication interface with fifo (scif) page 850 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group in transmitting serial data, the scif operates as follows: 1. when data is written into the transmit fifo data register (scftdr), the scif transfers the data from scftdr to the transmit shift register (sctsr) and starts transmitting. confirm that the tdfe flag in the serial status register (scfsr) is set to 1 before writing transmit data to scftdr. the number of data bytes that can be written is (16 ? transmit trigger setting). 2. when data is transferred from scftdr to sctsr and transmission is started, consecutive transmit operations are performed until there is no transmit data left in scftdr. when the number of transmit data bytes in scftdr falls below the transmit trigger number set in the fifo control register (scfcr), the tdfe flag is set. if the tie bit in the serial control register (scsr) is set to 1 at this time, a transmit-fifo-data-empty interrupt (txif) request is generated. if clock output mode is selected, the scif outputs eight synchronous clock pulses. if an external clock source is selected, the scif outputs data in synchronization with the input clock. data is output from the txd pin in order from the lsb (bit 0) to the msb (bit 7). 3. the scif checks the scftdr transmit data at the timing for sending the msb (bit 7). if data is present, the data is transferred from scftdr to sctsr, the msb (bit 7) is sent, and then serial transmission of the next frame is started. if there is no transmit data, the tend flag in scfsr is set to 1, the msb (bit 7) is sent, and then the txd pin holds the states. 4. after the end of serial transmission, the sck pin is held in the high state. figure 16.14 shows an example of scif transmit operation. synchronization clock serial data tdfe tend data written to scftdr and tdfe flag cleared to 0 by txif interrupt handler one frame bit 0 lsb txif interrupt request msb bit 1 bit 6 bit 7 bit 7 bit 0 bit 1 txif interrupt request figure 16.14 example of scif transmit operation
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 851 of 1560 mar 18, 2011 sh7080 group receiving serial data (c lock synchronous mode): figures 16.15 and 16.16 show a sample flowchart for receiving serial data. when switching from asynchronous mode to clock synchronous mode without scif initialization, make sure that orer, per, and fer are cleared to 0. start of reception read orer flag in sclsr orer = 1? read rdf flag in scfsr rdf = 1? read receive data in scfrdr, and clear rdf flag in scfsr to 0 all data received? clear re bit in scscr to 0 end of reception yes no yes yes no no error handling [1] receive error handling: read the orer flag in sclsr to identify any error, perform the appropriate error handling, then clear the orer flag to 0. transmission/reception cannot be resumed while the orer flag is set to 1. [2] scif status check and receive data read: read scfsr and check that rdf = 1, then read the receive data in scfrdr, and clear the rdf flag to 0. the transition of the rdf flag from 0 to 1 can also be identified by an rxif interrupt. [3] serial reception continuation procedure: to continue serial reception, read at least the receive trigger number of receive data bytes from scfrdr, read 1 from the rdf flag, then clear the rdf flag to 0. the number of receive data bytes in scfrdr can be ascertained by reading from the lower 8 bits of scfdr. [1] [2] [3] figure 16.15 sample flowchart for receivi ng serial data (1) error handling clear orer flag in sclsr to 0 end overrun error handling orer = 1? yes no figure 16.16 sample flowchart for receivi ng serial data (2)
section 16 serial communication interface with fifo (scif) page 852 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group in receiving, the scif operates as follows: 1. the scif synchronizes with serial clock input or output and initializes internally. 2. receive data is shifted into scrsr in orde r from the lsb to the msb. after receiving the data, the scif checks the receive data can be loaded from scrsr into scfrdr or not. if this check is passed, the scif stores the receive d data in scfrdr. if the check is not passed (overrun error is detected), further reception is prevented. 3. after setting rdf to 1, if the receive-data-full interrupt enable b it (rie) is set to 1 in scscr, the scif requests a receive-data-full interrupt (r xif). if the orer bit is set to 1 and the rie bit or reie bit in scscr is also set to 1, the scif requests a break interrupt (brif). figure 16.17 shows an example of scif receive operation. synchronization clock serial data rdf orer data read from scfrdr and rdf flag cleared to 0 by rxif interrupt handler one frame bit 7 lsb rxif interrupt request msb bit 0 bit 6 bit 7 bit 7 bit 0 bit 1 brif interrupt request by overrun error rxif interrupt request figure 16.17 example of scif receive operation transmitting and receiving s erial data simultaneously (clock synchronous mode): figure 16.18 shows a sample flowchart for transmitting and receiving serial data simultaneously.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 853 of 1560 mar 18, 2011 sh7080 group start of transmission and reception initialization read tdfe flag in scfsr tdfe = 1? write transmit data to scftdr, and clear tdfe flag and tend flag in scfsr to 0 after reading them as 1 read orer flag in sclsr orer = 1? read rdf flag in scfsr rdf = 1? clear te and re bits in scscr to 0 end of transmission and reception read receive data in scfrdr, and clear rdf flag in scfsr to 0 all data received? no no yes no no yes yes [1] scif status check and transmit data write: read scfsr and check that the tdfe flag and the tend flag are set to 1, then write transmit data to scftdr, and clear the tdfe flag and the tend flag to 0. the transition of the tdfe flag from 0 to 1 can also be identified by a txif interrupt. [2] receive error handling: read the orer flag in sclsr to identify any error, perform the appropriate error handling, then clear the orer flag to 0. transmission/reception cannot be resumed while the orer flag is set to 1. [3] scif status check and receive data read: read scfsr and check that rdf = 1, then read the receive data in scfrdr, and clear the rdf flag to 0. the transition of the rdf flag from 0 to 1 can also be identified by an rxif interrupt. [4] serial transmission and reception continuation procedure: to continue serial transmission and reception, read 1 from the rdf flag and the receive data in scfrdr, and clear the rdf flag to 0 before receiving the last bit in the current frame. similarly, read 1 from the tdfe flag to confirm that writing is possible before transmitting the msb in the current frame. then write data to scftdr and clear the tdfe flag to 0. [1] yes error handling [4] when switching from a transmit operation or receive operation to simultaneous transmission and reception operations, clear the te and re bits to 0, and then set them simultaneously to 1. note: [3] [2] figure 16.18 sample fl owchart for transmitting /receiving serial data
section 16 serial communication interface with fifo (scif) page 854 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 16.5 scif interrupt sources and dtc the scif has four interrupt sources: transmit- fifo-data-empty (txif), receive-error (erif), receive-data-full (rxif), and break (brif). table 16.16 shows the interrupt sources and their order of priority. the interrupt sources are enabled or disabled by means of the tie, rie, and reie bits in scscr. a separate interrupt request is sent to the interrupt controller for each of these interrupt sources. when txif request is enabled by ti e bit and the tdfe flag in the serial status register (scfsr) is set to 1, a txif interrupt request is generated. when rxif request is enabled by rie bit and the rdf or dr flag in scfsr is set to 1, an rxif interrupt request is generated. the rxif interrupt request caused by dr flag is generated only in asynchronous mode. when brif request is enabled by rie bit or reie bit and the brk flag in scfsr or orer flag in sclsr is set to 1, a brif interrupt request is generated. when erif request is enabled by rie bit or reie bit and the er flag in scfcr is set to 1, an erif interrupt request is generated. when the rie bit is set to 0 and the reie bit is set to 1, scif request erif interrupt and brif interrupt without requesting rxif interrupt. the txif interrupt indicates that transmit data can be written, and the rxif interrupt indicates that there is receive data in scfrdr. table 16.16 scif interrupt sources interrupt source description interrupt enable bit dtc activation erif interrupt initiated by receive error (er) rie or reie ? rxif interrupt initiated by receive data fifo full (rdf) or data ready (dr) rie brif interrupt initiated by break (brk) or overrun error (orer) rie or reie ? txif interrupt initiated by transmit fifo data empty (tdfe) tie
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 855 of 1560 mar 18, 2011 sh7080 group 16.6 serial port register (s csptr) and scif pins the relationship between scsptr and the scif pins is shown in figures 16.19 to 16.22. [legend] sptrw: scsptr write note: * the modem control function is specified for the rts pin by setting the mce bit in scfcr. reset internal data bus modem control enable signal * bit 7 bit 6 reset rts signal qd r rtsio rts c qd r rtsdt sptrw sptrw c figure 16.19 rtsio bit, rtsdt bit, and rts pin
section 16 serial communication interface with fifo (scif) page 856 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group sptrw: scsptr write note: * the modem control function is specified for the cts pin by setting the mce bit in scfcr. reset internal data bus modem control enable signal * bit 5 bit 4 reset cts signal qd r ctsio cts c qd r ctsdt sptrw sptrw c [legend] figure 16.20 ctsio bit, ctsdt bit, and cts pin [legend] sptrw: scsptr write note: * these signals control the sck pin according to the settings of the c/ a bit in scsmr and bits cke1 and cke0 in scscr. reset internal data bus clock output enable signal * sirial clock output signal * serial clock input signal * serial input enable signal * bit 3 bit 2 reset qd r sckio sck c qd r sckdt sptrw sptrw c figure 16.21 sckio bit, sckdt bit, and sck pin
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 857 of 1560 mar 18, 2011 sh7080 group [legend] sptrw: scsptr write reset internal data bus transmit enable signal bit 1 bit 0 reset serial transmit data qd r spbio txd c qd r spbdt sptrw sptrw c figure 16.22 spbio bit, spbdt bit, and txd pin
section 16 serial communication interface with fifo (scif) page 858 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 16.7 usage notes note the following when using the scif. 16.7.1 scftdr writing and tdfe flag the tdfe flag in the serial stat us register (scfsr) is set when the number of transmit data bytes written in the transmit fifo data register (scftdr) has fallen below the transmit trigger number set by bits ttrg1 and ttrg0 in the fifo control register (scfcr). after tdfe is set, transmit data up to the number of empty bytes in scft dr can be written, allowing efficient continuous transmission. however, if the number of data bytes written in scftdr is equal to or less than the transmit trigger number, the tdfe flag will be set to 1 again after being read as 1 and cleared to 0. tdfe clearing should therefore be carried out when scftdr contains more than the transmit trigger number of transmit data bytes. the number of transmit data bytes in scftdr can be found from the upper 8 bits of the fifo data count register (scfdr). 16.7.2 scfrdr reading and rdf flag the rdf flag in the serial status register (scfsr) is set when the number of receive data bytes in the receive fifo data register (scfrdr) has beco me equal to or greater than the receive trigger number set by bits rtrg1 and rtrg0 in the fifo control register (scfcr). after rdf is set, receive data equivalent to the trigger number can be read from sc frdr, allowing efficient continuous reception. however, if the number of data bytes in scfrdr is equal to or greater than the trigger number, the rdf flag will be set to 1 agai n if it is cleared to 0. rdf shoul d therefore be cleared to 0 after being read as 1 after reading the number of the r eceived data in the receive fifo data register (scfrdr) which is less than the trigger number. the number of receive data bytes in scfrdr can be found from the lower 8 bits of the fifo data count register (scfdr).
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 859 of 1560 mar 18, 2011 sh7080 group 16.7.3 break detection and processing break signals can be detected by reading the r xd pin directly when a framing error (fer) is detected. in the break state the input from the rxd pin consists of all 0s, so the fer flag is set and the parity error flag (per) may also be set. note that, although transfer of receive data to scfrdr is halted in the break state, the scif receiver continues to operate. 16.7.4 sending a break signal the i/o condition and level of the txd pin are determined by the spbio and spbdt bits in the serial port register (scsptr). this feat ure can be used to send a break signal. until te bit is set to 1 (enabling transmission) after initializing, txd pin does not work. during the period, mark status is performed by spbdt bit. therefore, the spbio and spbdt bits should be set to 1 (high level output). to send a break signal during serial transmission, clear the spbdt bit to 0 (designating low level), then clear the te bit to 0 (halting transmission). when the te bit is cleared to 0, the transmitter is initialized regardless of the current transmission state, and 0 is output from the txd pin. 16.7.5 receive data sampling ti ming and receive margin (asynchronous mode) the scif operates on a base clock with a frequency of 16 times the transfer rate. in reception, the scif synchronizes internally with the fall of the start bit, which it samples on the base clock. receive data is latched at the rising edge of th e eighth base clock pulse. the timing is shown in figure 16.23.
section 16 serial communication interface with fifo (scif) page 860 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 0 1 2 3 4 5 6 7 8 9 10 1112 1314 15 0 1 2 3 4 5 6 7 8 9 10 1112 1314 15 0 1 2 3 4 5 d0 d1 16 clocks 8 clocks base clock receive data (rxd) start bit ?7.5 clocks +7.5 clocks synchronization sampling timing data sampling timing figure 16.23 receive data samplin g timing in asynchronous mode the receive margin in asynchronous mode can therefore be expressed as shown in equation 1. equation 1: m = (0.5 - ) - (l - 0.5) f - (1+f) 100 % 1 2n d - 0.5 n where: m: receive margin (%) n: ratio of clock frequency to bit rate (n = 16) d: clock duty (d = 0 to 1.0) l: frame length (l = 9 to 12) f: absolute deviation of clock frequency from equation 1, if f = 0 and d = 0.5, the recei ve margin is 46.875%, as given by equation 2. equation 2: when d = 0.5 and f = 0: m = (0.5 ? 1/(2 16)) 100 % = 46.875 % this is a theoretical value. a reasonable margin to allow in system designs is 20% to 30%.
section 16 serial communication interface with fifo (scif) r01uh0198ej0500 rev. 5.00 page 861 of 1560 mar 18, 2011 sh7080 group 16.7.6 module standby mode setting the scif operation can be disabled or enable d using the standby control register. the initial setting is for scif operation to be halted. access to registers is enabled by clearing module standby mode. for details, refer to section 26, power-down modes. 16.7.7 note on using dtc when data is written to scftdr by activating the dtc through a txif interrupt, the tend flag value is undefined. in this case, do not use the tend flag as a transmit end flag. 16.7.8 fer flag and per flag of serial status register (scfsr) the fer flag and per flag in the serial status regi ster (scfsr) are status fl ags that apply to next entry to be read from the receive fifo data re gister (scfrdr). after the cpu or dtc reads the receive fifo data register, the flags of fram ing errors and parity errors will disappear. to check the received data for the states of framing errors and parity errors, only read the receive fifo register after reading the serial status register.
section 16 serial communication interface with fifo (scif) page 862 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 863 of 1560 mar 18, 2011 sh7080 group section 17 synchronous serial communication unit (ssu) this lsi has an independent synchronous serial communication unit (ssu) channel. the ssu has master mode in which this lsi outputs clocks as a master device for synchronous serial communication and slave mode in which clocks are input from an external device for synchronous serial communication. synchronous serial communication can be performed with devices having different clock polarity and clock phase. 17.1 features ? choice of ssu mode and clock synchronous mode ? choice of master mode and slave mode ? choice of standard mode and bidirectional mode ? synchronous serial communication with devices with different clock polarity and clock phase ? choice of 8/16/32-bit width of transmit/receive data ? full-duplex communication capability the shift register is incorp orated, enabling transmission a nd reception to be executed simultaneously. ? consecutive serial communication ? choice of lsb-first or msb-first transfer ? choice of a clock source p /4, p /8, p /16, p /32, p /64, p /128, p /256, or an external clock ? five interrupt sources transmit end, transmit data register empty, recei ve data full, overrun error, and conflict error. the data transfer controller (dtc) can be activated by a transmit data register empty request or a receive data full request to transfer data. ? module standby mode can be set
section 17 synchronous serial communication unit (ssu) page 864 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 17.1 shows a block diagram of the ssu. sso ssck (external clock) module data bus sscrh sscei sstrsr selector ssrxi sscrl sscr2 ssmr sser sssr control circuit clock p p /4 p /8 p /16 p /32 p /64 p /128 p /256 clock selector internal data bus bus interface scs ssi shiftout shiftin ssoei sstxi sstei [legend] sscrh: sscrl: sscr2: ssmr: sser: sssr: sstdr0 to sstdr3: ssrdr0 to ssrdr3: sstrsr: ss control register h ss control register l ss control register 2 ss mode register ss enable register ss status register ss transmit data registers 0 to 3 ss receive data registers 0 to 3 ss shift register ssrdr 0 ssrdr 1 ssrdr 2 ssrdr 3 sstdr 0 sstdr 1 sstdr 2 sstdr 3 figure 17.1 block diagram of ssu
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 865 of 1560 mar 18, 2011 sh7080 group 17.2 input/output pins table 17.1 shows the ssu pin configuration. table 17.1 pin configuration symbol i/o function ssck i/o ssu clock input/output ssi i/o ssu data input/output sso i/o ssu data input/output scs i/o ssu chip select input/output
section 17 synchronous serial communication unit (ssu) page 866 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 17.3 register descriptions the ssu has the following registers. for details on the addresses of these registers and the states of these registers in each processing stat e, see section 27, list of registers. table 17.2 register configuration register name abbrevia- tion r/w initial value address access size ss control register h sscrh r/w h'0d h'ffffcd00 8, 16 ss control register l sscrl r/w h'00 h'ffffcd01 8 ss mode register ssmr r/w h'00 h'ffffcd02 8, 16 ss enable register sser r/w h'00 h'ffffcd03 8 ss status register sssr r/w h'04 h'ffffcd04 8, 16 ss control register 2 sscr2 r/w h'00 h'ffffcd05 8 ss transmit data register 0 sstdr0 r/w h'00 h'ffffcd06 8, 16 ss transmit data register 1 sstdr1 r/w h'00 h'ffffcd07 8 ss transmit data register 2 sstdr2 r/w h'00 h'ffffcd08 8, 16 ss transmit data register 3 sstdr3 r/w h'00 h'ffffcd09 8 ss receive data register 0 ssrdr0 r h'00 h'ffffcd0a 8, 16 ss receive data register 1 ssrdr1 r h'00 h'ffffcd0b 8 ss receive data register 2 ssrdr2 r h'00 h'ffffcd0c 8, 16 ss receive data register 3 ssrdr3 r h'00 h'ffffcd0d 8
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 867 of 1560 mar 18, 2011 sh7080 group 17.3.1 ss control register h (sscrh) sscrh specifies master/slave device selection, bidirectional mode enable, sso pin output value selection, ssck pin selection, and scs pin selection. bit: initial value: r/w: 7654321 0 00001101 r/w r/w r r/w r/w r r/w r/w mss bide - sol solp - css[1:0] bit bit name initial value r/w description 7 mss 0 r/w master/slave device select selects that this module is used in master mode or slave mode. when master mode is selected, transfer clocks are output from the ssck pin. when the ce bit in sssr is set, this bit is automatically cleared. 0: slave mode is selected. 1: master mode is selected. 6 bide 0 r/w bidirectional mode enable selects that both serial data input pin and output pin are used or one of them is used. however, transmission and reception are not performed simultaneously when bidirectional mode is selected. for details, section 17.4.3, relationship between data input/output pins and shift register. 0: standard mode (two pins are used for data input and output) 1: bidirectional mode (one pin is used for data input and output) 5 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 17 synchronous serial communication unit (ssu) page 868 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 sol 0 r/w serial data output value select the serial data output retains its level of the last bit after completion of transmission. the output level before or after transmission can be specified by setting this bit. when specifying the output level, use the mov instruction after clearing the solp bit to 0. since writing to this bit during data transmission causes malfunctions, this bit should not be changed. 0: serial data output is changed to low. 1: serial data output is changed to high. 3 solp 1 r/w sol bit write protect when changing the output level of serial data, set the sol bit to 1 or clear the sol bit to 0 after clearing the solp bit to 0 using the mov instruction. 0: output level can be changed by the sol bit 1: output level cannot be changed by the sol bit. this bit is always read as 1. 2 ? 1 r reserved this bit is always read as 1. the write value should always be 1. 1, 0 css[1:0] 01 r/w scs pin select select that the scs pin functions as scs input or output. 00: setting prohibited 01: setting prohibited 10: function as scs automatic input/output (function as scs input before and after transfer and output a low level during transfer) 11: function as scs automatic output (outputs a high level before and after transfer and outputs a low level during transfer)
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 869 of 1560 mar 18, 2011 sh7080 group 17.3.2 ss control register l (sscrl) sscrl selects operating mode, software re set, and transmit/receive data length. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r r r r/w r/w fclrm ssums sres - - - dats[1:0] bit bit name initial value r/w description 7 fclrm 0 r/w flag clear mode selects whether the ssrxi and sstxi interrupt flags are cleared on writing to sstdr or reading from ssrdr or on completion of dtc transfer. when using the dtc, set this bit to 0. 0: flags are cleared when dtc transfer is completed (except when transfer counter value is h'0000) 1: flags are cleared on sstdr or ssrdr access 6 ssums 0 r/w selects transfer mode from ssu mode and clock synchronous mode. 0: ssu mode 1: clock synchronous mode 5 sres 0 r/w software reset setting this bit to 1 forcibly resets the ssu internal sequencer. after that, this bit is automatically cleared. the orer, tend, tdre, rdrf, and ce bits in sssr and the te and re bits in sser are also initialized. values of other bits for ssu registers are held. to stop transfer, set this bit to 1 to reset the ssu internal sequencer. 4 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 17 synchronous serial communication unit (ssu) page 870 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1, 0 dats[1:0] 00 r/w transmit/receive data length select select serial data length. 00: 8 bits 01: 16 bits 10: 32 bits 11: setting prohibited 17.3.3 ss mode register (ssmr) ssmr selects the msb first/lsb first, clock polarity, clock phase, and clock rate of synchronous serial communication. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r r r/w r/w r/w mls cpos cphs - - cks[2:0] bit bit name initial value r/w description 7 mls 0 r/w msb first/lsb first select selects that the serial data is transmitted in msb first or lsb first. 0: lsb first 1: msb first 6 cpos 0 r/w clock polarity select selects the ssck clock polarity. 0: high output in idle mode, and low output in active mode 1: low output in idle mode, and high output in active mode 5 cphs 0 r/w clock phase select (only for ssu mode) selects the ssck clock phase. 0: data changes at the first edge. 1: data is latched at the first edge.
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 871 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4, 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 to 0 cks[2:0] 000 r/w transfer clock rate select select the transfer clock rate (prescaler division rate) when an internal clock is selected. 000: reserved 001: p /4 010: p /8 011: p /16 100: p /32 101: p /64 110: p /128 111: p /256 17.3.4 ss enable register (sser) sser performs transfer/receive control of sync hronous serial communication and setting of interrupt enable. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r r r/w r/w r/w r/w te re - - teie tie rie ceie bit bit name initial value r/w description 7 te 0 r/w transmit enable when this bit is set to 1, transmission is enabled. 6 re 0 r/w receive enable when this bit is set to 1, reception is enabled. 5, 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 17 synchronous serial communication unit (ssu) page 872 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 teie 0 r/w transmit end interrupt enable when this bit is set to 1, a sstei interrupt request is enabled. 2 tie 0 r/w transmit interrupt enable when this bit is set to 1, a sstxi interrupt request is enabled. 1 rie 0 r/w receive interrupt enable when this bit is set to 1, an ssrxi interrupt request and an ssoei interrupt request are enabled. 0 ceie 0 r/w conflict error interrupt enable when this bit is set to 1, a sscei interrupt request is enabled.
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 873 of 1560 mar 18, 2011 sh7080 group 17.3.5 ss status register (sssr) sssr is a status flag register for interrupts. bit: initial value: r/w: 7654321 0 00000100 r r/w r r r/w r/w r/w r/w - orer - - tend tdre rdrf ce bit bit name initial value r/w description 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 orer 0 r/w overrun error if the next data is received while rdrf = 1, an overrun error occurs, indicating abnormal termination. ssrdr stores 1-frame receive data before an overrun error occurs and loses data to be received later. while orer = 1, consecutive serial reception cannot be continued. serial transmission cannot be continued, either. [setting condition] ? when one byte of the next reception is completed with rdrf = 1 [clearing condition] ? when writing 0 after reading orer = 1 5, 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 17 synchronous serial communication unit (ssu) page 874 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 tend 0 r/w transmit end [setting conditions] ? when the last bit of transmit data is transmitted while the tendsts bit in sscr2 is cleared to 0 and the tdre bit is set to 1 ? after the last bit of transmit data is transmitted while the tendsts bit in sscr2 is set to 1 and the tdre bit is set to 1 [clearing conditions] ? when writing 0 after reading tend = 1 ? when writing data to sstdr with fclrm = 1 2 tdre 1 r/w transmit data empty indicates whether or not sstdr contains transmit data. [setting conditions] ? when the te bit in sser is 0 ? when data is transferred from sstdr to sstrsr and sstdr is ready to be written to. [clearing conditions] ? when writing 0 after reading tdre = 1 ? when writing data to sstdr with te = 1 and fclrm = 1 ? when the dtc is activated by an sstxi interrupt and transmit data is written to sstdr while the disel bit in mrb of the dtc is 0 (except when dtc transfer counter value is h'0000) 1 rdrf 0 r/w receive data register full indicates whether or not ssrdr contains receive data. [setting condition] ? when receive data is transferred from sstrsr to ssrdr after successful serial data reception [clearing conditions] ? when writing 0 after reading rdrf = 1 ? when reading receive data from ssrdr with fclrm = 1 ? when the dtc is activated by an ssrxi interrupt and receive data is read into ssrdr while the disel bit in mrb of the dtc is 0 (except when dtc transfer counter value is h'0000)
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 875 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 ce 0 r/w conflict/incomplete error indicates that a conflict error has occurred when 0 is externally input to the scs pin with ssums = 0 (ssu mode) and mss = 1 (master mode). if the scs pin level changes to 1 with ssums = 0 (ssu mode) and mss = 0 (slave mode), an incomplete error occurs because it is determined that a master device has terminated the transfer. in addition, when ssums = 0 (ssu mode) and mss = 0 (slave mode) and the next serial receive operation starts while rdrf = 1, an incomplete error occurs even if the data received from ssrdr is read before the completion of reception and rdrf is cleared to 0 before the scs pin is set to 1. data reception does not continue while the ce bit is set to 1. serial transmission also does not continue. reset the ssu internal sequencer by setting the sres bit in sscrl to 1 before resuming transfer after incomplete error. [setting conditions] ? when a low level is input to the scs pin in master mode (the mss bit in sscrh is set to 1) ? when the scs pin is changed to 1 during transfer in slave mode (the mss bit in sscrh is cleared to 0) ? when in slave mode (mss = 0 in sscrh), the next serial receive operation starts while rdrf = 1, and data is read from ssrdr before the completion of reception, after which the scs pin is set to 1 [clearing condition] ? when writing 0 after reading ce = 1
section 17 synchronous serial communication unit (ssu) page 876 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 17.3.6 ss control register 2 (sscr2) sscr2 is a register that selects the assert timing of the scs pin, data output timing of the sso pin, and set timing of the tend bit. bit: initial value: r/w: 7654321 0 00000000 r r r r/w r/w r/w r r --- tendsts scsats ssodts -- bit bit name initial value r/w description 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 tendsts 0 r/w selects the timing of setting the tend bit (valid in ssu and master mode). 0: sets the tend bit when the last bit is being transmitted 1: sets the tend bit after the last bit is transmitted 3 scsats 0 r/w selects the assertion timing of the scs pin (valid in ssu and master mode). 0: min. values of t lead and t lag are 1/2 t sucyc 1: min. values of t lead and t lag are 3/2 t sucyc 2 ssodts 0 r/w selects the data output timing of the sso pin (valid in ssu and master mode) 0: while bide = 0, mss = 1, and te = 1 or while bide = 1, te = 1, and re = 0, the sso pin outputs data 1: while bide = 0, mss = 1, and te = 1 or while bide = 1, te = 1, and re = 0, the sso pin outputs data while the scs pin is driven low 1, 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 877 of 1560 mar 18, 2011 sh7080 group 17.3.7 ss transmit data registers 0 to 3 (sstdr0 to sstdr3) sstdr is an 8-bit register that stores transmit data. when 8-bit data length is selected by bits dats1 and dats0 in sscrl, sstdr0 is valid. when 16-bit data length is selected, sstdr0 and sstdr1 are valid. when 32-bit data length is selected, sstdr0 to sstdr3 are valid. do not access sstdr that is not valid. when the ssu detects that sstrsr is empty, it transfers the transmit data written in sstdr to sstrsr and starts serial transmission. if the next transmit data has already been written to sstdr during serial transmission, the ssu performs consecutive serial transmission. although sstdr can always be read from or writte n to by the cpu and dtc, to achieve reliable serial transmission, write transmit data to sstdr after confirming that the tdre bit in sssr is set to 1. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w bit bit name initial value r/w description 7 to 0 all 0 r/w serial transmit data table 17.3 setting of dats bits in sscrl and corresponding sstdr dats[1:0] setting 00 01 10 11 (invalid setting) sstdr0 valid valid valid invalid sstdr1 invalid valid valid invalid sstdr2 invalid invalid valid invalid sstdr3 invalid invalid valid invalid
section 17 synchronous serial communication unit (ssu) page 878 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 17.3.8 ss receive data registers 0 to 3 (ssrdr0 to ssrdr3) ssrdr is an 8-bit register that stores receive data. when 8-bit data length is selected by bits dats1 and dats0 in sscrl, ssrdr0 is valid. when 16-bit data length is selected, ssrdr0 and ssrdr1 are valid. when 32-bit data length is selected, ssrdr0 to ssrdr3 are valid. do not access ssrdr that is not valid. when the ssu has received 1-byte data, it transf ers the received serial data from sstrsr to ssrdr where it is stored. afte r this, sstrsr is ready for reception. since sstrsr and ssrdr function as a double buffer in this way, c onsecutive receive operations can be performed. read ssrdr after confirming that the rdrf bit in sssr is set to 1. ssrdr is a read-only register, therefore, cannot be written to by the cpu. bit: initial value: r/w: 7654321 0 00000000 rrrrrrrr bit bit name initial value r/w description 7 to 0 all 0 r serial receive data table 17.4 setting of dats bit in sscrl and corresponding ssrdr dats[1:0] setting 00 01 10 11 (invalid setting) ssrdr0 valid valid valid invalid ssrdr1 invalid valid valid invalid ssrdr2 invalid invalid valid invalid ssrdr3 invalid invalid valid invalid
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 879 of 1560 mar 18, 2011 sh7080 group 17.3.9 ss shift register (sstrsr) sstrsr is a shift register that transmits and receives serial data. when data is transferred from sstdr to sstrsr, bit 0 of transmit data is bit 0 in the sstdr contents (mls = 0: lsb first communication) and is bit 7 in the sstdr contents (mls = 1: msb first communication). the ssu transfers data from the lsb (bit 0) in sstrsr to the sso pin to perform serial data transmission. in reception, the ssu sets serial data that has been input via the ssi pin in sstrsr from the lsb (bit 0). when 1-byte data has been received, the sstrsr contents are automa tically transferred to ssrdr. sstrsr cannot be directly accessed by the cpu. bit: initial value: r/w: 7654321 0 -------- --------
section 17 synchronous serial communication unit (ssu) page 880 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 17.4 operation 17.4.1 transfer clock a transfer clock can be selected from seven internal clocks and an external clock. before using this module, enable the ssck pin function in the pfc. when the mss bit in sscrh is 1, an internal clock is selected and the ssck pin is used as an output pin. when transfer is started, the clock with the transfer rate set by bits cks2 to cks0 in ssmr is output from the ssck pin. when mss = 0, an external clock is selected and the ssck pin is used as an input pin. 17.4.2 relationship of clock phase, polarity, and data the relationship of clock phase, polarity, and transfer data depends on the combination of the cpos and cphs bits in ssmr when the value of the ssums bit in sscrl is 0. figure 17.2 shows the relationship. when ssums = 1, the cp hs setting is invalid a lthough the cpos setting is valid. setting the mls bit in ssmr selects that msb or lsb first communication. when mls = 0, data is transferred from the lsb to the msb. when mls = 1, data is transferred from the msb to the lsb. ssck (cpos = 0) (1) when cphs = 0 (2) when cphs = 1 ssck (cpos = 1) ssi, sso scs bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 ssck (cpos = 0) ssck (cpos = 1) ssi, sso scs bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 figure 17.2 relationship of clock phase, polarity, and data
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 881 of 1560 mar 18, 2011 sh7080 group 17.4.3 relationship between data input/output pins and shift register the connection between data input/output pins and the ss shift register (sstrsr) depends on the combination of the mss and bide bits in sscrh and the ssums bit in sscrl. figure 17.3 shows the relationship. the ssu transmits serial data from the sso pin and receives serial data from the ssi pin when operating with bide = 0 and mss = 1 (standard, master mode) (see figure 17.3 (1)). the ssu transmits serial data from the ssi pin and recei ves serial data from th e sso pin when operating with bide = 0 and mss = 0 (standard, slave mode) (see figure 17.3 (2)). the ssu transmits and receives serial data from the sso pin regardless of master or slave mode when operating with bide = 1 (bidirectional mode) (see figures 17.3 (3) and (4)). however, even if both the te and re bits are set to 1, transmission and reception are not performed simultaneously. either the te or re bit must be selected. the ssu transmits serial data from the sso pin and receives serial data from the ssi pin when operating with ssums = 1. the ssck pin outputs the internal clock when mss = 1 and function as an input pin when mss = 0 (see figures 17.3 (5) and (6)).
section 17 synchronous serial communication unit (ssu) page 882 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ssck shift register (sstrsr) shift register (sstrsr) shift register (sstrsr) shift register (sstrsr) sso ssi ssck sso ssi ssck sso ssi ssck sso ssi (1) when ssums = 0, bide = 0 (standard mode), mss = 1, te = 1, and re = 1 ssck shift register (sstrsr) sso ssi ssck shift register (sstrsr) sso ssi (2) when ssums = 0, bide = 0 (standard mode), mss = 0, te = 1, and re = 1 (4) when ssums = 0, bide = 1 (bidirectional mode), mss = 0, and either te or re = 1 (3) when ssums = 0, bide = 1 (bidirectional mode), mss = 1, and either te or re = 1 (5) when ssums = 1 and mss = 1 (6) when ssums = 1 and mss = 0 figure 17.3 relationship between data input/output pins and the shift register
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 883 of 1560 mar 18, 2011 sh7080 group 17.4.4 communication modes and pin functions the ssu switches the input/output pin (ssi, sso, ssck, and scs ) functions according to the communication modes and register settings. the input/output directions of the pins should be selected in the port i/o registers. the relationship of communication modes and input/output pin functions are shown in tables 17.5 to 17.7. table 17.5 communication modes and pin states of ssi and sso pins register setting pin state communication mode ssums bide mss te re ssi sso 0 0 0 0 1 ? input ssu communication mode 1 0 output ? 1 output input 1 0 1 input ? 1 0 ? output 1 input output 0 1 0 0 1 ? input ssu (bidirectional) communication mode 1 0 ? output 1 0 1 ? input 1 0 ? output 1 0 0 0 1 input ? clock synchronous communication mode 1 0 ? output 1 input output 1 0 1 input ? 1 0 ? output 1 input output [legend] ? : not used as ssu pin
section 17 synchronous serial communication unit (ssu) page 884 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 17.6 communication modes and pin states of ssck pin register setting pin state communication mode ssums mss ssck 0 0 input ssu communication mode 1 output 1 0 input clock synchronous communication mode 1 output [legend] ? : not used as ssu pin table 17.7 communication modes and pin states of scs pin register setting pin state communication mode ssums mss css1 css0 scs 0 0 x x input ssu communication mode 1 0 0 ? 0 1 ? 1 0 automatic input/output 1 1 output clock synchronous communication mode 1 x x x ? [legend] x: don't care ? : not used as ssu pin
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 885 of 1560 mar 18, 2011 sh7080 group 17.4.5 ssu mode in ssu mode, data communications are performed via four lines: clock line (ssck), data input line (ssi or sso), data output line (ssi or sso), and chip select line ( scs ). in addition, the ssu supports bidirectional mode in which a single pin functi ons as data input and data output lines. (1) initial settings in ssu mode figure 17.4 shows an example of the initial settings in ssu mode. before data transfer, clear both the te and re bits in sser to 0 to set the initial values. note: before changing operating modes and communications formats, clear both the te and re bits to 0. although clearing the te bit to 0 sets the tdre bit to 1, clearing the re bit to 0 does not change the values of the rdrf and orer bits and ssrdr. those bits retain the previous values.
section 17 synchronous serial communication unit (ssu) page 886 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group [4] end specify bits mls, cpos, cphs, cks2, cks1, and cks0 in ssmr specify bits tendsts, scsats, and ssodts in sscr2 [1] make appropriate settings in the pfc for the external pins to be used. [2] specify master/slave mode selection, bidirectional mode enable, sso pin output value selection, ssck pin selection, and scs pin selection. [3] selects ssu mode and specify transmit/receive data length. [4] specify msb first/lsb first selection, clock polarity selection, clock phase selection, and transfer clock rate selection. [5] specify timing of tend bit setting, scs pin assertion, and data output on the sso pin. [6] enables/disables interrupt requests to the cpu. [5] specify bits te, re, teie, tie, rie, and ceie in sser simultaneously [6] start setting initial values [1] [2] [3] set pfc for external pins to be used (ssck, ssi, sso, and scs ) clear ssums in sscrh to 0 and specify bits dats1 and dats0 specify mss, bide, sol, css1, and css0 bits in sscrh clear te and re bits in sser to 0 figure 17.4 example of initial settings in ssu mode
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 887 of 1560 mar 18, 2011 sh7080 group (2) data transmission figure 17.5 shows an example of transmission operation, and figure 17.6 shows a flowchart example of data transmission. when transmitting data, the ssu operates as shown below. in master mode, the ssu outputs a transfer clock and data. in slave mode, when a low level signal is input to the scs pin and a transfer clock is input to the ssck pin, the ssu outputs data in synchronization with the transfer clock. writing transmit data to sstdr after the te bit is set to 1 clears the tdre bit in sssr to 0, and the sstdr contents are transferred to sstrsr. after that, the ssu sets the tdre bit to 1 and starts transmission. at this time, if the tie bit in sser is set to 1, a txi interrupt is generated. when 1-frame data has been transferred with tdre = 0, the sstdr contents are transferred to sstrsr to start the next frame transmission. when the 8th bit of transmit data has been transferred with tdre = 1, the tend bit in sssr is set to 1 and the state is retained. at this time, if the teie bit is set to 1, a tei interrupt is generated. after transmission, the output level of the ssck pin is fixed high when cpos = 0 and low when cpos = 1. while the orer bit in sssr is set to 1, transm ission is not performed. check that the orer bit is cleared to 0 before transmission.
section 17 synchronous serial communication unit (ssu) page 888 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group scs ssck (1) when 8-bit data length is selected (sstdr0 is valid) with cpos = 0 and cphs = 0 (2) when 16-bit data length is selected (sstdr0 and sstdr1 are valid) with cpos = 0 and cphs = 0 (3) when 32-bit data length is selected (sstdr0 to sstdr3 are valid) with cpos = 0 and cphs = 0 bit 0 bit 0 bit 1 bit 1 bit 2 bit 2 bit 3 bit 3 bit 4 bit 4 bit 5 bit 5 bit 6 bit 6 bit 7 bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 7 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 bit 0 to to to to to to to to bit 0 bit 7 bit 7 bit 0 bit 7 bit 0 bit 7 bit 0 bit 7 bit 0 bit 7 bit 0 bit 7 bit 0 bit 7 bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 sso tdre tend lsi operation user operation lsi operation user operation lsi operation user operation txi interrupt generated tei interrupt generated tei interrupt generated txi interrupt generated data written to sstdr0 data written to sstdr0 and sstdr1 data written to sstdr0 sstdr1 scs ssck tdre tend sso (lsb first) sso (msb first) sso (lsb first) sso (msb first) sstdr0 sstdr0 sstdr1 scs ssck tdre tend sstdr0 sstdr3 sstdr1 sstdr2 sstdr2 sstdr1 sstdr 3 sstdr0 1 frame 1 frame 1 frame sstdr0 (lsb first transmission) sstdr0 (msb first transmission) 1 frame txi interrupt generated tei interrupt generated data written to sstdr0 to sstdr3 txi interrupt generated tei interrupt generated figure 17.5 example of transmission operation (ssu mode)
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 889 of 1560 mar 18, 2011 sh7080 group yes start [1] [2] [3] [1] initial setting: specify the transmit data format. [2] check that the ssu state and write transmit data: write transmit data to sstdr after reading and confirming that the tdre bit is 1. the tdre bit is automatically cleared to 0 and transmission is started by writing data to sstdr. [3] procedure for consecutive data transmission: to continue data transmission, confirm that the tdre bit is 1 meaning that sstdr is ready to be written to. after that, data can be written to sstdr. the tdre bit is automatically cleared to 0 by writing data to sstdr. [4] procedure for data transmission end: to end data transmission, confirm that the tend bit is cleared to 0. after completion of transmitting the last bit, clear the te bit to 0. note: hatching boxes represent ssu internal operations. initial setting read tdre in sssr tdre = 1? yes yes no no no write transmit data to sstdr tdre automatically cleared data transferred from sstdr to sstrsr set tdre to 1 to start transmission consecutive data transmission? read tend in sssr tend = 1? clear tend to 0 clear te in sser to 0 end transmission yes no confirm that tend is cleared to 0 one bit time quantum elapsed? [4] figure 17.6 flowchart example of data transmission (ssu mode)
section 17 synchronous serial communication unit (ssu) page 890 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (3) data reception figure 17.7 shows an example of reception operati on, and figure 17.8 shows a flowchart example of data reception. when receiving da ta, the ssu operates as shown below. after setting the re bit to 1 and dummy-read ing ssrdr, the ssu starts data reception. in master mode, the ssu outputs a transfer cloc k and receives data. in slave mode, when a low level signal is input to the scs pin and a transfer clock is input to the ssck pin, the ssu receives data in synchronization with the transfer clock. when 1-frame data has been received, the rdrf b it in sssr is set to 1 and the receive data is stored in ssrdr. at this time, if the rie bit in sser is set to 1, an rxi interrupt is generated. the rdrf bit is automatically cleared to 0 by reading ssrdr. when the rdrf bit has been set to 1 at the 8th rising edge of the transfer clock, the orer bit in sssr is set to 1. this indicates that an overrun error (oei) has occurred. at this time, data reception is stopped. while the orer bit in sssr is set to 1, reception is not performed. to resume the reception, clear the orer bit to 0. when setting the ssu to slave mode to perform c ontinuous reception, read ssrdr before starting the next receive operation. if the next receive ope ration starts before ssrdr is read and rdrf is cleared to 0, and ssrdr is read before receptio n completes, ce in sssr is set to 1 after the completion of reception. in addition, if the next receive operation starts be fore ssrdr is read and rdrf is cleared to 0, and ssrdr is not read until after reception completes, the receive data is discarded even though neither ce nor orer in sssr is set to 1.
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 891 of 1560 mar 18, 2011 sh7080 group scs ssck (1) when 8-bit data length is selected (ssrdr0 is valid) with cpos = 0 and cphs = 0 (2) when 16-bit data length is selected (ssrdr0 and ssrdr1 are valid) with cpos = 0 and cphs = 0 (3) when 32-bit data length is selected (ssrdr0 to ssrdr3 are valid) with cpos = 0 and cphs = 0 ssi rdrf ssrdr1 scs ssck rdrf ssrdr0 ssrdr0 ssrdr1 scs ssck rdrf ssrdr0 ssrdr3 ssrdr1 ssrdr2 ssrdr2 ssrdr1 ssrdr3 ssrdr0 1 frame 1 frame 1 frame 1 frame bit 0 bit 0 bit 1 bit 1 bit 2 bit 2 bit 3 bit 3 bit 4 bit 4 bit 5 bit 5 bit 6 bit 6 bit 7 bit 7 lsi operation dummy-read ssrdr0 dummy-readssrdr0 read ssrdr0 user operation lsi operation user operation lsi operation user operation ssrdr0 (lsb first transmission) ssrdr0 (msb first transmission) rxi interrupt generated rxi interrupt generated rxi interrupt generated bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 ssi (lsb first) ssi (msb first) bit 0 to to to to to to to to bit 0 bit 7 bit 7 bit 0 bit 7 bit 0 bit 7 bit 0 bit 7 bit 0 bit 7 bit 0 bit 7 bit 0 bit 7 ssi (lsb first) ssi (msb first) dummy-readssrdr0 rxi interrupt generated figure 17.7 example of reception operation (ssu mode)
section 17 synchronous serial communication unit (ssu) page 892 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group yes [1] [2] [3] [4] [5] [6] [1] initial setting: specify the receive data format. [2] start reception: when ssrdr is dummy-read with re = 1, reception is started. [3], [6] receive error processing: when a receive error occurs, execute the designated error processing after reading the orer bit in sssr. after that, clear the orer bit to 0. while the orer bit is set to 1, transmission or reception is not resumed. [4] to continue single reception: when continuing single reception, wait for time of t sucyc while the rdrf flag is set to 1 and then read receive data in ssrdr. the next single reception starts after reading receive data in ssrdr. [5] to complete reception: to complete reception, read receive data after clearing the re bit to 0. when reading ssrdr without clearing the re bit, reception is resumed. no yes yes no start initial setting dummy-read ssrdr read sssr rdrf = 1? orer = 1? consecutive data reception? read received data in ssrdr rdrf automatically cleared re = 0 read receive data in ssrdr end reception overrun error processing clear orer in sssr end reception note: hatching boxes represent ssu internal operations. no figure 17.8 flowchar t example of data reception (ssu mode) (4) data transmission/reception figure 17.9 shows a flowchart example of si multaneous transmission/reception. the data transmission/reception is performed combining the data transmission and data reception as mentioned above. the data tran smission/reception is started by writing transmit data to sstdr with te = re = 1. before switching transmission mode (te = 1) or reception mode (re = 1) to transmission/reception mode (te = re = 1), clear the te and re bits to 0. when starting the
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 893 of 1560 mar 18, 2011 sh7080 group transfer, confirm that the tend, rdrf, and orer bits are cleared to 0 before setting the te or re bit to 1. if the value of rdrf is 1 when the 8th clock rises, orer in sssr is set to 1, an overrun error occurs, and reception halts. receive operation is not possible while orer is set to 1. to restart reception, first clear orer to 0. yes start initial setting [1] [2] [1] initial setting: specify the transmit/receive data format. [2] check the ssu state and write transmit data: write transmit data to sstdr after reading and confirming that the tdre bit in sssr is 1. the tdre bit is automatically cleared to 0 and transmission/ reception is started by writing data to sstdr. [3] check the ssu state: read sssr confirming that the rdrf bit is 1. a change of the rdrf bit (from 0 to 1) can be notified by rxi interrupt. [4] receive error processing: when a receive error occurs, execute the designated error processing after reading the orer bit in sssr. after that, clear the orer bit to 0. while the orer bit is set to 1, transmission or reception is not resumed. [5] procedure for consecutive data transmission/reception: to continue serial data transmission/reception, confirm that the tdre bit is 1 meaning that sstdr is ready to be written to. after that, data can be written to sstdr. the tdre bit is automatically cleared to 0 by writing data to sstdr. [4] [5] [3] read tdre in sssr. tdre = 1? yes yes yes yes no no no no write transmit data to sstdr tdre automatically cleared data transferred from sstdr to sstrsr tdre set to 1 to start transmission read sssr rdrf = 1? orer = 1? tend = 1? read receive data in ssrdr rdrf automatically cleared consecutive data transmission/reception? no yes one bit time quantum elapsed? no read the tend bit in sssr clear tend in sssr to 0 clear te and re in sser to 0 error processing end transmission/reception note: hatching boxes represent ssu internal operations. figure 17.9 flowchar t example of simultaneous tran smission/reception (ssu mode)
section 17 synchronous serial communication unit (ssu) page 894 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 17.4.6 scs pin control and conflict error when bits css1 and css0 in sscrh are set to b'10 and the ssums bit in sscrl is cleared to 0, the scs pin becomes an input pin (hi-z) before th e serial transfer is started and after the serial transfer is complete. because of this, the ssu performs conf lict error detection during these periods. if a low level signal is input to the scs pin during these periods, it is detected as a conflict error. at this time, the ce bit in sssr is set to 1 and the mss bit is cleared to 0. note: while the ce bit is set to 1, transmission or reception is not resumed. clear the ce bit to 0 before resuming the transmission or reception. ce data written to sstdr conflict error detection period worst time for internal clocking of scs mss internal signal for transfer enable scs output external input to scs internally-clocked scs (hi-z) figure 17.10 conflict error det ection timing (before transfer)
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 895 of 1560 mar 18, 2011 sh7080 group p scs mss ce (hi-z) transfer end conflict error detection period internal si g nal for transfer enable figure 17.11 conflict error det ection timing (after transfer end)
section 17 synchronous serial communication unit (ssu) page 896 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 17.4.7 clock synchronous communication mode in clock synchronous communication mode, data communications are performed via three lines: clock line (ssck), data input line (ssi), and data output line (sso). (1) initial settings in clock synchronous communication mode figure 17.12 shows an example of the initial settings in clock synchronous communication mode. before data transfer, clear both the te and re bits in sser to 0 to set the initial values. note: before changing operating modes and communications formats, clear both the te and re bits to 0. although clearing the te bit to 0 sets the tdre bit to 1, clearing the re bit to 0 does not change the values of the rdrf and orer bits and ssrdr. those bits retain the previous values. start setting initial values [1] [2] [3] [4] set pfc for external pins to be used (ssck, ssi, sso, and scs ) set ssums in sscrl to 1 and specify bits dats1 and dats0 specify mss in sscrh specify cpos, cks2, cks1, and cks0 bits in ssmr clear te and re bits in sser to 0 [1] make appropriate settings in the pfc for the external pins to be used. [2] specify master/slave mode selection and ssck pin selection. [3] selects clock synchronous communication mode and specify transmit/receive data length. [4] specify clock polarity selection and transfer clock rate selection. [5] specify timing of tend bit setting, scs pin assertion, and data output on the sso pin. [6] enables/disables interrupt requests to the cpu. end specify bits tendsts, scsats, and ssodts in sscr2 [5] specify bits te, re, teie, tie, rie, and ceie in sser simultaneously [6] figure 17.12 example of initial settings in clock synchronous communication mode
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 897 of 1560 mar 18, 2011 sh7080 group (2) data transmission figure 17.13 shows an example of transmission operation, and figure 17.14 shows a flowchart example of data transmission. when transmitting data in clock synchronous communication mode, the ssu operates as shown below. in master mode, the ssu outputs a transfer clock a nd data. in slave mode, when a transfer clock is input to the ssck pin, the ssu outputs data in synchronization with the transfer clock. writing transmit data to sstdr after the te bit is set to 1 clears the tdre bit in sssr to 0, and the sstdr contents are transferred to sstrsr. after that, the ssu sets the tdre bit to 1 and starts transmission. at this time, if the tie bit in sser is set to 1, a txi interrupt is generated. when 1-frame data has been transferred with tdre = 0, the sstdr contents are transferred to sstrsr to start the next frame transmission. when the 8th bit of transmit data has been transferred with tdre = 1, the tend bit in sssr is set to 1 and the state is retained. at this time, if the teie bit is set to 1, a tei interrupt is generated. while the orer bit in sssr is set to 1, transm ission is not performed. check that the orer bit is cleared to 0 before transmission. lsi operation user operation sso ssck tdre tend data written to sstdr txi interrupt generated tei interrupt generated txi interrupt generated data written to sstdr bit 0 bit 1 bit 7 bit 0 bit 1 bit 7 1 frame 1 frame figure 17.13 example of transmission operation (clock synchronous communication mode)
section 17 synchronous serial communication unit (ssu) page 898 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group yes start [1] [2] [3] [1] initial setting: specify the transmit data format. [2] check that the ssu state and write transmit data: write transmit data to sstdr after reading and confirming that the tdre bit is 1. the tdre bit is automatically cleared to 0 and transmission is started by writing data to sstdr. [3] procedure for consecutive data transmission: to continue data transmission, confirm that the tdre bit is 1 meaning that sstdr is ready to be written to. after that, data can be written to sstdr. the tdre bit is automatically cleared to 0 by writing data to sstdr. [4] procedure for data transmission end: to end data transmission, confirm that the tend bit is cleared to 0. after completion of transmitting the last bit, clear the te bit to 0. note: hatched boxes represent ssu internal operations. initial setting read tdre in sssr tdre = 1? yes yes no no no write transmit data to sstdr tdre automatically cleared data transferred from sstdr to sstrsr set tdre to 1 to start transmission consecutive data transmission? read tend in sssr tend = 1? clear te in sser to 0 end transmission yes no confirm that tend is cleared to 0 one-bit intreval elapsed? clear tend to 0 [4] figure 17.14 flowchart example of transmission operation (clock synchronous communication mode)
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 899 of 1560 mar 18, 2011 sh7080 group (3) data reception figure 17.15 shows an example of reception oper ation, and figure 17.16 shows a flowchart example of data reception. when receiving data, the ssu operates as shown below. after setting the re bit in sser to 1, the ssu starts data reception. in master mode, the ssu outputs a transfer clock and receives data. in slave mode, when a transfer clock is input to the ssck pin, the ssu receives da ta in synchronization with the transfer clock. when 1-frame data has been received, the rdrf b it in sssr is set to 1 and the receive data is stored in ssrdr. at this time, if the rie bit is se t to 1, an rxi interrupt is generated. the rdrf bit is automatically cleared to 0 by reading ssrdr. when setting the ssu to slave mode to perform c ontinuous reception, read ssrdr before starting the next receive operation. if the next receive ope ration starts before ssrdr is read and rdrf is cleared to 0, the integrity of subsequent data cannot be guaranteed. lsi operation user operation sso ssck rdrf dummy-read ssrdr rxi interrupt generated rxi interrupt generated rxi interrupt generated read data from ssrdr read data from ssrdr bit 0 bit 7 bit 0 bit 0 bit 7 bit 7 1 frame 1 frame figure 17.15 example of reception operation (clock synchronous communication mode)
section 17 synchronous serial communication unit (ssu) page 900 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group yes [1] [2] [3] [4] [5] [1] initial setting: specify the receive data format. [2] start reception: when setting the re bit to 1, reception is started. [3], [5] receive error processing: when a receive error occurs, execute the designated error processing after reading the orer bit in sssr. after that, clear the orer bit to 0. while the orer bit is set to 1, transmission or reception is not resumed. [4] to complete reception: to complete reception, read receive data after clearing the re bit to 0. when reading ssrdr without clearing the re bit, reception is resumed. no yes yes no start initial setting read sssr rdrf = 1? orer = 1? consecutive data reception? read received data in ssrdr rdrf automatically cleared re = 0 read receive data in ssrdr end reception overrun error processing clear orer in sssr end reception note: hatching boxes represent ssu internal operations. no figure 17.16 flowchart e xample of data reception (clock synchronous communication mode) (4) data transmission/reception figure 17.17 shows a flowchart example of si multaneous transmission/reception. the data transmission/reception is performed combining the data transmission and data reception as mentioned above. the data tran smission/reception is started by writing transmit data to sstdr with te = re = 1. before switching transmission mode (te = 1) or reception mode (re = 1) to transmission/reception mode (te = re = 1), clear the te and re bits to 0. when starting the transfer, confirm that the tend, rdrf, and orer bits are cleared to 0 before setting the te or re bits to 1.
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 901 of 1560 mar 18, 2011 sh7080 group if the value of rdrf is 1 when the 8th clock rises, orer in sssr is set to 1, an overrun error occurs, and reception halts. receive operation is not possible while orer is set to 1. to restart reception, first clear orer to 0. yes start initial setting [1] [2] [1] initial setting: specify the transmit/receive data format. [2] check the ssu state and write transmit data: write transmit data to sstdr after reading and confirming that the tdre bit in sssr is 1. the tdre bit is automatically cleared to 0 and transmission is started by writing data to sstdr. [3] check the ssu state: read sssr confirming that the rdrf bit is 1. a change of the rdrf bit (from 0 to 1) can be notified by rxi interrupt. [4] receive error processing: when a receive error occurs, execute the designated error processing after reading the orer bit in sssr. after that, clear the orer bit to 0. while the orer bit is set to 1, transmission or reception is not resumed. [5] procedure for consecutive data transmission/reception: to continue serial data transmission/reception, confirm that the tdre bit is 1 meaning that sstdr is ready to be written to. after that, data can be written to sstdr. the tdre bit is automatically cleared to 0 by writing data to sstdr. [4] [5] [3] read tdre in sssr. tdre = 1? yes yes yes no no no write transmit data to sstdr tdre automatically cleared data transferred from sstdr to sstrsr tdre set to 1 to start transmission read sssr rdrf = 1? orer = 1? read receive data in ssrdr rdrf automatically cleared consecutive data transmission/reception? clear tend in sssr to 0 clear te and re in sser to 0 error processing end transmission/reception note: hatching boxes represent ssu internal operations. yes tend = 1? no yes no read tend in sssr no one bit time quantum elapsed? figure 17.17 flowchart example of simultaneous transmission/reception (clock synchronous communication mode)
section 17 synchronous serial communication unit (ssu) page 902 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 17.5 ssu interrupt sources and dtc the ssu interrupt requests are an overrun error, a conflict error, a receive data register full, transmit data register empty, and a transmit end interrupts. of these interrupt sources, a receive data register full, and a transmit data register empty can activate the dtc for data transfer. since both an overrun error and a conflict error in terrupts are allocated to the sseri vector address, and both a transmit data register empty and a transmit end interrupt s are allocated to the sstxi vector address, the interrupt source should be decided by their flags. table 17.8 lists the interrupt sources. when an interrupt condition shown in table 17.8 is satisfied, an interrupt is requested. clear the interrupt source by cpu or dtc data transfer. table 17.8 ssu interrupt sources abbreviation interrupt source symbol interrupt condition dtc activation sseri overrun error ssoei (rie = 1) ? (orer = 1) ? conflict error sscei (ceie = 1) ? (ce = 1) ? ssrxi receive data register full ssrxi (rie = 1) ? (rdrf = 1) yes sstxi transmit data register empty sstxi (tie = 1) ? (tdre = 1) yes transmit end sstei (teie = 1) ? (tend = 1) ?
section 17 synchronous serial communication unit (ssu) r01uh0198ej0500 rev. 5.00 page 903 of 1560 mar 18, 2011 sh7080 group 17.6 usage notes 17.6.1 module standby mode setting the ssu operation can be disabl ed or enabled using the standby control register. the initial setting is for ssu operation to be halted. access to registers is enabled by clearing module standby mode. for details, refer to section 26, power-down modes. 17.6.2 access to sstdr and ssrdr registers do not access sstdr and ssrdr registers not validated by the setting of the dats bits of the sscrl register. if accessed, transmission or recep tion thereafter may not be performed normally. 17.6.3 continuous transmission/reception in ssu slave mode during continuous transmission/recepti on in ssu slave mode, negate the scs pin (high level) for every frame. if the scs pin is kept asserted (low level) for more than one frame, transmission or reception cannot be performed correctly. 17.6.4 note for reception operati ons in ssu slave mode in continuous reception when slav e reception in ssu mode has been selected, read the ss receive- data register (ssrdr) before each next round of reception starts (i.e. before an externally connected master device starts a next round of transmission). if the next round of reception starts after the ss status register receive-data full (rdrf) bit has been set to 1 but before the ssr dr has been read, and the ssrdr is read before the reception of one frame is complete, the conflict/incomplete error bit in sssr will be set to 1 on completion of reception. furthermore, when the next round of reception st arts after the receive-data full (rdrf) bit has been set to 1 and before the ssrdr has been read, and the ssrdr has not been read by the end of the reception of the frame, the ce and overflow-error (orer) bits will not have been set, but the received data will be discarded. further note that this point for caution does not apply to simultaneous transmission and reception in ssu slave mode or to clock-synchronous mode.
section 17 synchronous serial communication unit (ssu) page 904 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 17.6.5 note on master transmission and mast er reception operations in ssu mode to perform master transmission or reception in ssu mode, perform one of the following operations: ? after the tdre flag in the sssr register is set to 1, store the next byte of transmit data in sstdr before transmission of the second to last bit starts. ? store the next byte of transmit data in sstdr after confirming that the tend flag in the sssr register has been set to 1. ? use the ssu with tendsts in the sscr2 regist er cleared to 0, or with both tendsts and scsats in the sscr2 register set to 1. 17.6.6 note on dtc transfers when a dtc transfer occurs with sstxi as the activation source, tdre is not cleared when the transfer counter reaches h'0000 but communication operation starts anyway. when using the sstxi interrupt to clear the flag, perform interrupt handling first. however, do not clear the flag within the sstxi interrupt handler when the initial value of the dtc?s transfer counter is set to h'0001 and disel is set to 1. in this case, clearing the flag by the interrupt handler may cause the ssu to start communication operation a second time.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 905 of 1560 mar 18, 2011 sh7080 group section 18 i 2 c bus interface 2 (i 2 c2) the i 2 c bus interface 2 conforms to and provides a subset of the philips i 2 c (inter-ic) bus interface functions. however, the configura tion of the registers that control the i 2 c bus differs partly from the philips register configuration. figure 18.1 shows a block diagram of the i 2 c bus interface 2. figure 18.2 shows an example of i/o pin connections to external circuits. 18.1 features ? selection of i 2 c format or clock synchronous serial format ? continuous transmission/reception since the shift register, transmit data register, and receive da ta register are independent from each other, the continuous transm ission/reception can be performed. ? module standby mode can be set i 2 c bus format: ? start and stop conditions generated automatically in master mode ? selection of acknowledge out put levels when receiving ? automatic loading of acknow ledge bit when transmitting ? bit synchronization function in master mode, the state of scl is monitored per bit, and the timing is synchronized automatically. if transmission/reception is not yet possible, set the scl to low until preparations are completed. ? six interrupt sources transmit data empty (including slave-address match), transmit e nd, receive data full (including slave-address match), arbitration lost, nack detection, and stop condition detection the data transfer controller (dtc) can be activated by a transmit-data-empty request or receive-data-full request to transfer data. ? direct bus drive two pins, scl and sda pins, function as nmos open-drain outputs when the bus drive function is selected.
section 18 i 2 c bus interface 2 (i 2 c2) page 906 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group clock synchronous serial format: ? four interrupt sources transmit-data-empty, transmit-end, r eceive-data-full, and overrun error the data transfer controller (dtc) can be activated by a transmit-data-empty request or receive-data-full request to transfer data. scl iccr1 transfer clock generation circuit address comparator interrupt generator interrupt request bus state decision circuit arbitration decision circuit noise canceler noise canceler output control output control transmission/ reception control circuit iccr2 icmr icsr icier icdrr nf2cyc icdrs icdrt i 2 c bus control register 1 i 2 c bus control register 2 i 2 c bus mode register i 2 c bus status register i 2 c bus interrupt enable register i 2 c bus transmit data register i 2 c bus receive data register i 2 c bus shift register slave address register nf2cyc register [legend] iccr1 : iccr2 : icmr : icsr : icier : icdrt : icdrr : icdrs : sar : nf2cyc : sar sda internal data bus figure 18.1 block diagram of i 2 c bus interface 2
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 907 of 1560 mar 18, 2011 sh7080 group vcc vcc scl in scl out scl sda in sda out sda scl (master) (slave 1) (slave 2) sda scl in scl out scl sda in sda out sda scl in scl out scl sda in sda out sda figure 18.2 external circuit connections of i/o pins
section 18 i 2 c bus interface 2 (i 2 c2) page 908 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.2 input/output pins table 18.1 shows the pin configuration for the i 2 c bus interface 2. table 18.1 i 2 c bus interface pin configuration pin name symbol i/o function serial clock scl i/o i 2 c serial clock input/output serial data sda i/o i 2 c serial data input/output
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 909 of 1560 mar 18, 2011 sh7080 group 18.3 register descriptions the i 2 c bus interface 2 has the following registers. for details on register addresses and register states during each processing, refer to section 27, list of registers. table 18.2 register configuration register name abbrevia- tion r/w initial value address access size i 2 c bus control register 1 iccr1 r/w h'00 h'ffffcd80 8 i 2 c bus control register 2 iccr2 r/w h'7d h'ffffcd81 8 i 2 c bus mode register icmr r/w h'38 h'ffffcd82 8 i 2 c bus interrupt enable register icier r/w h'00 h'ffffcd83 8 i 2 c bus status register icsr r/w h'00 h'ffffcd84 8 i 2 c bus slave address register sar r/w h'00 h'ffffcd85 8 i 2 c bus transmit data register icdrt r/w h'ff h'ffffcd86 8 i 2 c bus receive data register icdrr r/w h'ff h'ffffcd87 8 nf2cyc register nf2cyc r/w h'00 h'ffffcd88 8 18.3.1 i 2 c bus control register 1 (iccr1) iccr1 is an 8-bit readable/writable regi ster that enables or disables the i 2 c bus interface 2, controls transmission or recepti on, and selects master or slave mode, transmission or reception, and transfer clock frequency in master mode. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w ice rcvd mst trs cks[3:0] bit bit name initial value r/w description 7 ice 0 r/w i 2 c bus interface 2 enable 0: scl and sda output is disabled. (input to scl and sda is enabled) 1: this bit is enabled for transfer operations. (scl and sda pins are bus drive state.)
section 18 i 2 c bus interface 2 (i 2 c2) page 910 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 rcvd 0 r/w reception disable when trs = 0, this bit enables or disables continuous reception without reading of icdrr. in master receive mode, when icdrr cannot be read before the rising edge of the 8th clock of scl, set rcvd to 1 so that data is received in byte units. 0: enables continuous reception 1: disables continuous reception 5 4 mst trs 0 0 r/w r/w master/slave select transmit/receive select in master mode with the i 2 c bus format, when arbitration is lost, mst and trs are both reset by hardware, causing a transition to slave receive mode. modification of the trs bit should be made between transfer frames. when seven bits after the start condition is issued in slave receive mode match the slave address set to sar and the 8th bit is set to 1, trs is automatically set to 1. if an overrun error occurs in master receive mode with the clock synchronous serial format, mst is cleared and the mode changes to slave receive mode. operating modes are described below according to mst and trs combination. when clock synchronous serial format is selected and mst = 1, clock is output. 00: slave receive mode 01: slave transmit mode 10: master receive mode 11: master transmit mode 3 to 0 cks[3:0] 0000 r/w transfer clock select 3 to 0 these bits should be set according to the necessary transfer rate (table 18.3) in master mode. in slave mode, these bits should be used to specify the data setup time in transmission mode. the setup time is set to 10 tpcyc when cks3 = 0 or 20 tpcyc when cks3 = 1 (tpcyc is one p cycle).
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 911 of 1560 mar 18, 2011 sh7080 group table 18.3 transfer rate bit 3 bit 2 bit 1 bit 0 transfer rate cks3 cks2 cks1 cks0 clock p =10 mhz p =16 mhz p =20 mhz p =25 mhz p =33 mhz p =40 mhz 0 0 0 0 p /28 357 khz 571 khz 714 khz 893 khz 1.18 mhz 1.43 mhz 1 p /40 250 khz 400 khz 500 khz 625 khz 825 khz 1.00 mhz 1 0 p /48 208 khz 333 khz 417 khz 521 khz 688 khz 833 khz 1 p /64 156 khz 250 khz 313 khz 391 khz 516 khz 625 khz 1 0 0 p /80 125 khz 200 khz 250 khz 313 khz 413 khz 500 khz 1 p /100 100 khz 160 khz 200 khz 250 khz 330 khz 400 khz 1 0 p /112 89.3 khz 143 khz 179 khz 223 khz 295 khz 357 khz 1 p /128 78.1 khz 125 khz 156 khz 195 khz 258 khz 313 khz 1 0 0 0 p /112 89.3 khz 143 khz 179 khz 223 khz 295 khz 357 khz 1 p /160 62.5 khz 100 khz 125 khz 156 khz 206 khz 250 khz 1 0 p /192 52.1 khz 83.3 khz 104 khz 130 khz 172 khz 208 khz 1 p /256 39.1 khz 62.5 khz 78.1 khz 97.7 khz 129 khz 156 khz 1 0 0 p /320 31.3 khz 50.0 khz 62.5 khz 78.1 khz 103 khz 125 khz 1 p /400 25.0 khz 40.0 khz 50.0 khz 62.5 khz 82.5 khz 100 khz 1 0 p /448 22.3 khz 35.7 khz 44.6 khz 55.8 khz 73.7 khz 89.3 khz 1 p /512 19.5 khz 31.3 khz 39.1 khz 48.8 khz 64.5 khz 78.1 khz
section 18 i 2 c bus interface 2 (i 2 c2) page 912 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.3.2 i 2 c bus control register 2 (iccr2) iccr2 is an 8-bit readable/writable register that issues start/stop conditions, manipulates the sda pin, monitors the scl pin, and controls reset in the control part of the i 2 c bus interface 2. bit: initial value: r/w: 7654321 0 01111101 r/w r/w r/w r/w r r r/w r bbsy scp sdao sdaop sclo - iicrst - bit bit name initial value r/w description 7 bbsy 0 r/w bus busy this bit enables to confirm whether the i 2 c bus is occupied or released and to issue start/stop conditions in master mode. with the clock synchronous serial format, this bit is always read as 0. with the i 2 c bus format, this bit is set to 1 when the sda level changes from high to low under the condition of scl = high, assuming that the start condition has been issued. this bit is cleared to 0 when the sda level changes from low to high under the condition of scl = high, assuming that the stop condition has been issued. to issue a start condition, simultaneously write 1 to bbsy and 0 to scp. follow this procedure also when transmitting a repeated start condition. to issue a stop condition, simultaneously write 0 to bbsy and 0 to scp. 6 scp 1 r/w start/stop issue condition disable the scp bit controls the issue of start/stop conditions in master mode. to issue a start condition, simultaneously write 1 to bbsy and 0 to scp. a repeated start condition is issued in the same way. to issue a stop condition, simultaneously write 0 to bbsy and 0 to scp. this bit is always read as 1. even if 1 is written to this bit, the data will not be stored.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 913 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 sdao 1 r/w sda output value control this bit is used with sdaop when modifying output level of sda. this bit should not be manipulated during transfer. 0: when reading, sda pin outputs low. when writing, sda pin is changed to output low. 1: when reading, sda pin outputs high. when writing, sda pin is changed to output hi-z (outputs high by external pull-up resistance). 4 sdaop 1 r/w sdao write protect this bit controls change of output level of the sda pin by modifying the sdao bit. to change the output level, clear sdao and sdaop to 0 or set sdao to 1 and clear sdaop to 0. this bit is always read as 1. 3 sclo 1 r scl output level this bit monitors scl output level. when sclo is 1, scl pin outputs high. when sclo is 0, scl pin outputs low. 2 ? 1 r reserved this bit is always read as 1. the write value should always be 1. 1 iicrst 0 r/w iic control part reset this bit resets the control part except for i 2 c registers. if this bit is set to 1 when hang-up occurs because of communication failure during i 2 c operation, some of i 2 c registers and control part can be reset. 0 ? 1 r reserved this bit is always read as 1. the write value should always be 1.
section 18 i 2 c bus interface 2 (i 2 c2) page 914 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.3.3 i 2 c bus mode register (icmr) icmr is an 8-bit readable/writable register that selects whether the msb or lsb is transferred first and selects the transfer bit count. bit: initial value: r/w: 7654321 0 00111000 r/w r r r r/w r/w r/w r/w mls - - - bcwp bc[2:0] bit bit name initial value r/w description 7 mls 0 r/w msb-first/lsb-first select 0: msb-first 1: lsb-first set this bit to 0 when the i 2 c bus format is used. 6 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 5, 4 ? all 1 r reserved these bits are always read as 1. the write value should always be 1. 3 bcwp 1 r/w bc write protect this bit controls the bc2 to bc0 modifications. when modifying bc2 to bc0, this bit should be cleared to 0. in clock synchronous serial mode, bc should not be modified. 0: when writing, values of bc2 to bc0 are set. 1: when reading, 1 is always read. when writing, settings of bc2 to bc0 are invalid.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 915 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 to 0 bc[2:0] 000 r/w bit counter 2 to 0 these bits specify the number of bits to be transferred next. when read, the remaining number of transfer bits is indicated. with the i 2 c bus format, the data is transferred with one addition acknowledge bit. should be made between transfer frames. if bits bc2 to bc0 are set to a value other than 000, the setting should be made while the scl pin is low. the value returns to 000 at the end of a data transfer, including the acknowledge bit. these bits are automatically set to 111 after a stop condition is detected. these bits are cleared by a power-on reset and in standby mode. these bits are also cleared by setting iicrst of iccr2 to 1. with the clock synchronous serial format, these bits should not be modified. i 2 c bus format 000: 9 bits 001: 2 bits 010: 3 bits 011: 4 bits 100: 5 bits 101: 6 bits 110: 7 bits 111: 8 bits clock synchronous serial format 000: 8 bits 001: 1 bit 010: 2 bits 011: 3 bits 100: 4 bits 101: 5 bits 110: 6 bits 111: 7 bits
section 18 i 2 c bus interface 2 (i 2 c2) page 916 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.3.4 i 2 c bus interrupt enable register (icier) icier is an 8-bit readable/writable register th at enables or disables interrupt sources and acknowledge bits, sets acknowledge bits to be transferred, and confirms acknowledge bits received. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r r/w tie teie rie nakie stie acke ackbr ackbt bit bit name initial value r/w description 7 tie 0 r/w transmit interrupt enable when the tdre bit in icsr is set to 1 or 0, this bit enables or disables the transmit data empty interrupt (iitxi). 0: transmit data empty interrupt request (iitxi) is disabled. 1: transmit data empty interrupt request (iitxi) is enabled. 6 teie 0 r/w transmit end interrupt enable this bit enables or disables the transmit end interrupt (iitei) at the rising of the ninth clock while the tdre bit in icsr is 1. iitei can be canceled by clearing the tend bit or the teie bit to 0. 0: transmit end interrupt request (iitei) is disabled. 1: transmit end interrupt request (iitei) is enabled. 5 rie 0 r/w receive interrupt enable rie enables or disables the receive data full interrupt request (iirxi) when receive data is transferred from icdrs to icdrr and the rdrf bit in icsr is set to 1. iirxi can be canceled by clearing the rdrf or rie bit to 0. 0: receive data full interrupt request (iirxi) are disabled. 1: receive data full interrupt request (iirxi) are enabled.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 917 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 nakie 0 r/w nack receive interrupt enable nakie enables or disables the nack detection/arbitration lost/overrun error interrupt request (iinaki) when the nackf or al/ove bit in icsr is set to 1. iinaki can be canceled by clearing the nackf, al/ove, or nakie bit to 0. 0: nack receive interrupt request (iinaki) is disabled. 1: nack receive interrupt request (iinaki) is enabled. 3 stie 0 r/w stop condition detection interrupt enable this bit enables or disables the stop condition detection interrupt request (iistpi) when the stop bit in icsr is set. 0: stop condition detection interrupt request (iistpi) is disabled. 1: stop condition detection interrupt request (iistpi) is enabled. 2 acke 0 r/w acknowledge bit judgment select 0: the value of the receive acknowledge bit is ignored, and continuous transfer is performed. 1: if the receive acknowledge bit is 1, continuous transfer is halted. 1 ackbr 0 r receive acknowledge in transmit mode, this bit stores the acknowledge data that are returned by the receive device. this bit cannot be modified. this bit can be canceled by setting the bbsy bit in iccr2 to 1. 0: receive acknowledge = 0 1: receive acknowledge = 1 0 ackbt 0 r/w transmit acknowledge in receive mode, this bit specifies the bit to be sent at the acknowledge timing. 0: 0 is sent at the acknowledge timing. 1: 1 is sent at the acknowledge timing.
section 18 i 2 c bus interface 2 (i 2 c2) page 918 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.3.5 i 2 c bus status register (icsr) icsr is an 8-bit readable/writable register that confirms interrupt request flags and their status. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w tdre tend rdrf nackf stop al/ove aas adz bit bit name initial value r/w description 7 tdre 0 r/w transmit data register empty [setting conditions] ? when data is transferred from icdrt to icdrs and icdrt becomes empty ? when trs is set ? when the start condition (including retransmission) is issued ? when slave mode is changed from receive mode to transmit mode [clearing conditions] ? when 0 is written to tdre after reading tdre = 1 ? when data is written to icdrt ? dtc is activated by iitxi interrupt and the disel bit in mrb of dtc is 0. 6 tend 0 r/w transmit end [setting conditions] ? when the ninth clock of scl rises with the i 2 c bus format while the tdre flag is 1 ? when the final bit of transmit frame is sent with the clock synchronous serial format [clearing conditions] ? when 0 is written to tend after reading tend = 1 ? when data is written to icdrt ? dtc is activated by iitxi interrupt and the disel bit in mrb of dtc is 0.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 919 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 rdrf 0 r/w receive data register full [setting condition] ? when a receive data is transferred from icdrs to icdrr [clearing conditions] ? when 0 is written to rdrf after reading rdrf = 1 ? when icdrr is read ? dtc is activated by iirxi interrupt and the disel bit in mrb of dtc is 0. 4 nackf 0 r/w no acknowledge detection flag * [setting condition] ? when no acknowledge is detected from the receive device in transmission while the acke bit in icier is 1 [clearing condition] ? when 0 is written to nackf after reading nackf = 1 3 stop 0 r/w stop condition detection flag [setting conditions] ? in master mode, when a stop condition is detected after frame transfer ? in slave mode, when a stop condition is detected after the slave address in the first byte that came following the detection of a start condition have matched the address set in sar. [clearing condition] ? when 0 is written to stop after reading stop = 1
section 18 i 2 c bus interface 2 (i 2 c2) page 920 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 al/ove 0 r/w arbitration lost flag/overrun error flag this flag indicates that arbitration was lost in master mode with the i 2 c bus format and that the final bit has been received while rdrf = 1 with the clock synchronous format. when two or more master devices attempt to seize the bus at nearly the same time, if the i 2 c bus interface 2 detects data differing from the data it sent, it sets al to 1 to indicate that the bus has been occupied by another master. [setting conditions] ? if the internal sda and sda pin disagree at the rise of scl in master transmit mode ? when the sda pin outputs high in master mode while a start condition is detected ? when the final bit is received with the clock synchronous format while rdrf = 1 [clearing condition] ? when 0 is written to al/ove after reading al/ove = 1 1 aas 0 r/w slave address recognition flag in slave receive mode, this flag is set to 1 if the first frame following a start condition matches bits sva6 to sva0 in sar. [setting conditions] ? when the slave address is detected in slave receive mode ? when the general call address is detected in slave receive mode. [clearing condition] ? when 0 is written to aas after reading aas=1
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 921 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 adz 0 r/w general call address recognition flag this bit is valid in slave receive mode with the i 2 c bus format. [setting condition] ? when the general call address is detected in slave receive mode [clearing condition] ? when 0 is written to adz after reading adz=1 note: * when nackf = 1 is detected, be sure to clear nackf in the transfer end processing. until the flag is cleared, next transmission or reception cannot be started. 18.3.6 i 2 c bus slave address register (sar) sar is an 8-bit readable/writable register that selects the communications format and sets the slave address. in slave mode with the i 2 c bus format, if the upper seven bits of sar match the upper seven bits of the first frame received after a start condition, this module operates as the slave device. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w sva[6:0] fs bit bit name initial value r/w description 7 to 1 sva[6:0] all 0 r/w slave address 6 to 0 these bits set a unique address in bits sva6 to sva0, differing form the addresses of other slave devices connected to the i 2 c bus. 0 fs 0 r/w format select 0: i 2 c bus format is selected 1: clock synchronous serial format is selected
section 18 i 2 c bus interface 2 (i 2 c2) page 922 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.3.7 i 2 c bus transmit data register (icdrt) icdrt is an 8-bit readable/writable register that stores the transmit data. when icdrt detects the space in the shift register (icdrs ), it transfers the tr ansmit data which is written in icdrt to icdrs and starts transferring data. if the next transfer data is written to icdrt during transferring data of icdrs, continuous transfer is possible. if icdrt is written to and then read while the mls bit in icmr is set to 1, data is read in the reversed order (msb?lsb order is reversed). icdrt is initialized to h'ff. bit: initial value: r/w: 7654321 0 11111111 r/w r/w r/w r/w r/w r/w r/w r/w 18.3.8 i 2 c bus receive data register (icdrr) icdrr is an 8-bit register that stores the receive data. when data of one byte is received, icdrr transfers the receive data from icdrs to icdrr and the next data can be received. icdrr is a receive-only register, therefore the cpu cannot write to this register. icdrr is initialized to h'ff. bit: initial value: r/w: 7654321 0 11111111 r/w r/w r/w r/w r/w r/w r/w r/w 18.3.9 i 2 c bus shift register (icdrs) icdrs is a register that is used to transfer/recei ve data. in transmission, data is transferred from icdrt to icdrs and the data is sent from the s da pin. in reception, data is transferred from icdrs to icdrr after data of one byte is received. this register cannot be read directly from the cpu. bit: initial value: r/w: 7654321 0 -------- --------
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 923 of 1560 mar 18, 2011 sh7080 group 18.3.10 nf2cyc register (nf2cyc) nf2cyc is an 8-bit readable/writable register that selects the range of the noise filtering for the scl and sda pins. for details of the noise filter, see section 18.4.7, noise filter. bit: initial value: r/w: 7654321 0 00000000 rrrrrrrr/w ------- nf2cyc bit bit name initial value r/w description 7 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 nf2cyc 0 r/w noise filtering range select 0: the noise less than one cycle of the peripheral clock can be filtered out 1: the noise less than two cycles of the peripheral clock can be filtered out
section 18 i 2 c bus interface 2 (i 2 c2) page 924 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.4 operation the i 2 c bus interface 2 can communicate either in i 2 c bus mode or clock synchronous serial mode by setting fs in sar. 18.4.1 i 2 c bus format figure 18.3 shows the i 2 c bus formats. figure 18.4 shows the i 2 c bus timing. the first frame following a start condition always consists of eight bits. s sla r/ w a data a a/ a p 1111 n 7 1 m (a) i 2 c bus format (fs = 0) (b) i 2 c bus format (start condition retransmission, fs = 0) n: transfer bit count (n = 1 to 8) m: transfer frame count (m 1) s sla r/ w a data 111n1 7 1 m1 s sla r/ w a data a/ a p 111n2 7 1 m2 11 1 a/ a n1 and n2: transfer bit count (n1 and n2 = 1 to 8) m1 and m2: transfer frame count (m1 and m2 1) 11 figure 18.3 i 2 c bus formats sda scl s 1-7 sla 8 r/ w 9 a 1-7 data 89 1-7 89 a data p a figure 18.4 i 2 c bus timing [legend] s: start condition. the master device drives sda from high to low while scl is high. sla: slave address r/ w : indicates the direction of data transfer: from the slave device to the master device when r/w is 1, or from the master device to the slave device when r/w is 0. a: acknowledge. the receive device drives sda to low. data: transfer data p: stop condition. the master device drives sda from low to high while scl is high.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 925 of 1560 mar 18, 2011 sh7080 group 18.4.2 master transmit operation in master transmit mode, the master device outputs the transmit clock and transmit data, and the slave device returns an acknowledge signal. for master transmit mode operation timing, refer to figures 18.5 and 18.6. the transmission procedur e and operations in master transmit mode are described below. 1. set the ice bit in iccr1 to 1. set the mls bit in icmr and bits cks3 to cks0 in iccr1. (initial setting) 2. read the bbsy flag in iccr2 to confirm that the bus is free. set the mst and trs bits in iccr1 to select master transmit mode. then, write 1 to bbsy and 0 to scp. (start condition issued) this generates the start condition. 3. after confirming that tdre in icsr has been set, write the transmit data (the first byte data show the slave address and r/ w ) to icdrt. at this time, tdre is automatically cleared to 0, and data is transferred from icdrt to icdrs. tdre is set again. 4. when transmission of one byte data is completed while tdre is 1, tend in icsr is set to 1 at the rise of the 9th transmit clock pulse. read the ackbr bit in icier, and confirm that the slave device has been selected. then, write seco nd byte data to icdrt. when ackbr is 1, the slave device has not been acknowledged, so issue the stop condition. to issue the stop condition, write 0 to bbsy and scp. scl is fixed low until the transmit data is prepared or the stop condition is issued. 5. the transmit data after the second byte is written to icdrt every time tdre is set. 6. write the number of bytes to be transmitted to icdrt. wait until tend is set (the end of last byte data transmission) while tdre is 1, or wait for nack (nackf in icsr = 1) from the receive device while acke in icier is 1. th en, issue the stop condition to clear tend or nackf. 7. when the stop bit in icsr is set to 1, the operation retu rns to the slave receive mode.
section 18 i 2 c bus interface 2 (i 2 c2) page 926 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tdre scl (master output) sda (master output) sda (slave output) tend [5] write data to icdrt (third byte) icdrt icdrs [2] instruction of start condition issuance [3] write data to icdrt (first byte) [4] write data to icdrt (second byte) user processing 1 bit 7 slave address address + r/ w data 1 data 1 data 2 address + r/ w bit 6 bit 7 bit 6 bit 5bit 4bit 3bit 2bit 1bit 0 212 3456789 a r/ w figure 18.5 master transmit mode operation timing (1) tdre [6] issue stop condition. clear tend. [7] set slave receive mode tend icdrt icdrs 1 9 23456789 a a/ a scl (master output) sda (master output) sda (slave output) bit 7 bit 6 data n data n bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 [5] write data to icdrt user processing figure 18.6 master transmit mode operation timing (2)
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 927 of 1560 mar 18, 2011 sh7080 group 18.4.3 master receive operation in master receive mode, the master device outputs the receive clock, receives data from the slave device, and returns an acknowledge signal. for ma ster receive mode operation timing, refer to figures 18.7 and 18.8. the reception procedure an d operations in master receive mode are shown below. 1. clear the tend bit in icsr to 0, then clear the trs bit in iccr1 to 0 to switch from master transmit mode to master receive mode . then, clear the tdre bit to 0. 2. when icdrr is read (dummy data read), recep tion is started, and the receive clock is output, and data received, in synchronization with the internal clock. the master device outputs the level specified by ackbt in icier to s da, at the 9th receive clock pulse. 3. after the reception of first frame data is completed, the rdrf bit in icsr is set to 1 at the rise of 9th receive clock pulse. at this time, the r eceive data is read by reading icdrr, and rdrf is cleared to 0. 4. the continuous reception is performed by reading icdrr every time rdrf is set. if 8th receive clock pulse falls after reading icdrr by the other processing while rdrf is 1, scl is fixed low until icdrr is read. 5. if next frame is the last receive data, set th e rcvd bit in iccr1 to 1 before reading icdrr. this enables the issuance of the stop condition after the next reception. 6. when the rdrf bit is set to 1 at rise of the 9th receive clock pulse, issue the stage condition. 7. when the stop bit in icsr is set to 1, read icdrr. then clear the rcvd bit to 0. 8. the operation returns to the slave receive mode. note: if only one byte is received, read icdrr (dummy-read) after the rcvd bit in iccr1 is set.
section 18 i 2 c bus interface 2 (i 2 c2) page 928 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tdre tend icdrs icdrr [1] clear tdre after clearing tend and trs [2] read icdrr (dummy read) [3] read icdrr 1 a 21 3456789 9 a trs rdrf scl (master output) sda (master output) sda (slave output) bit 7 master transmit mode master receive mode bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 user processing data 1 data 1 figure 18.7 master receive mode operation timing (1)
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 929 of 1560 mar 18, 2011 sh7080 group rdrf rcvd icdrs icdrr data n-1 data n data n data n-1 [5] read icdrr after setting rcvd [6] issue stop condition [7] read icdrr, and clear rcvd [8] set slave receive mode 1 9 23456789 aa/ a scl (master output) sda (master output) sda (slave output) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 user processing figure 18.8 master receive mode operation timing (2)
section 18 i 2 c bus interface 2 (i 2 c2) page 930 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.4.4 slave transmit operation in slave transmit mode, the slave device outputs the transmit data, while the master device outputs the receive clock and returns an acknowledge si gnal. for slave transmit mode operation timing, refer to figures 18.9 and 18.10. the transmission procedure and operations in slave transmit mode are described below. 1. set the ice bit in iccr1 to 1. set the mls bit in icmr and bits cks3 to cks0 in iccr1. (initial setting) set the mst and trs bits in i ccr1 to select slave receive mode, and wait until the slave address matches. 2. when the slave address matches in the first frame following detection of the start condition, the slave device outputs the level specified by ackb t in icier to sda, at the rise of the 9th clock pulse. at this time, if the 8th bit data (r/w) is 1, the trs bit in iccr1 and the tdre bit in icsr are set to 1, and the mode change s to slave transmit m ode automatically. the continuous transmission is performed by writing transmit data to icdrt every time tdre is set. 3. if tdre is set after writing last transmit data to icdrt, wait until tend in icsr is set to 1, with tdre = 1. when tend is set, clear tend. 4. clear trs for the end processing, and read icdrr (dummy read). scl is free. 5. clear tdre.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 931 of 1560 mar 18, 2011 sh7080 group tdre tend icdrs icdrr 1 a 21 3456789 9 a trs icdrt scl (master output) slave receive mode slave transmit mode sda (master output) sda (slave output) scl (slave output) bit 7 bit 7 data 1 data 1 data 2 data 3 data 2 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 [2] write data to icdrt (data 1) [2] write data to icdrt (data 2) [2] write data to icdrt (data 3) user processing figure 18.9 slave transmit mode operation timing (1)
section 18 i 2 c bus interface 2 (i 2 c2) page 932 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tdre data n tend icdrs icdrr 1 9 23456789 trs icdrt a scl (master output) sda (master output) sda (slave output) scl (slave output) bit 7 slave transmit mode slave receive mode bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 a [3] clear tend [5] clear tdre [4] read icdrr (dummy read) after clearing trs user processing figure 18.10 slave transmit mode operation timing (2)
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 933 of 1560 mar 18, 2011 sh7080 group 18.4.5 slave receive operation in slave receive mode, the master device outputs the transmit clock and transmit data, and the slave device returns an acknowledge signal. for slave receive mode operation timing, refer to figures 18.11 and 18.12. the reception procedur e and operations in slave receive mode are described below. 1. set the ice bit in iccr1 to 1. set the mls bit in icmr and bits cks3 to cks0 in iccr1. (initial setting) set the mst and trs bits in i ccr1 to select slave receive mode, and wait until the slave address matches. 2. when the slave address matches in the first frame following detection of the start condition, the slave device outputs the level specified by ackb t in icier to sda, at the rise of the 9th clock pulse. at the same time, rdrf in icsr is set to read icdrr (dummy read). (since the read data show the slave address and r/w, it is not used.) 3. read icdrr every time rdrf is set. if 8th r eceive clock pulse falls while rdrf is 1, scl is fixed low until icdrr is read. the change of the acknowledge before reading icdrr, to be returned to the master device, is re flected to the next transmit frame. 4. the last byte data is read by reading icdrr. icdrs icdrr 12 1 345678 9 9 a a rdrf data 1 data 2 data 1 scl (master output) sda (master output) sda (slave output) scl (slave output) bit 7 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 [2] read icdrr (dummy read) [2] read icdrr user processing figure 18.11 slave receive mode operation timing (1)
section 18 i 2 c bus interface 2 (i 2 c2) page 934 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group icdrs icdrr 12345678 9 9 a a rdrf scl (master output) sda (master output) sda (slave output) scl (slave output) user processing bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 data 1 [3] set ackbt [3] read icdrr [4] read icdrr data 2 data 1 figure 18.12 slave receive mode operation timing (2) 18.4.6 clock synchronous serial format this module can be operated with the clock s ynchronous serial format, by setting the fs bit in sar to 1. when the mst bit in iccr1 is 1, the transfer clock output from scl is selected. when mst is 0, the external clock input is selected. (1) data transfer format figure 18.13 shows the clock synchronous serial transfer format. the transfer data is output from the fall to the fall of the scl clock, and the data at the rising edge of the scl clock is guaranteed. the mls bit in icmr sets the order of data transfer, in either the msb first or lsb first. the output level of sda can be changed during the transfer wait, by the sdao bit in iccr2. sda bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 scl figure 18.13 clock synchronous serial transfer format
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 935 of 1560 mar 18, 2011 sh7080 group (2) transmit operation in transmit mode, transmit data is output from sda, in synchronization with the fall of the transfer clock. the transfer clock is output when mst in iccr1 is 1, and is input when mst is 0. for transmit mode operation timing, refer to figure 18.14. the transmission procedure and operations in transmit mode are described below. 1. set the ice bit in iccr1 to 1. set the mst and cks3 to cks0 bits in iccr1. (initial setting) 2. set the trs bit in iccr1 to select the transmit mode. then, tdre in icsr is set. 3. confirm that tdre has been set. then, write the transmit data to icdrt. the data is transferred from icdrt to icdrs, and tdre is set automatically. the continuous transmission is performed by writing data to icdrt every time tdre is set. when changing from transmit mode to receive mode, clear trs while tdre is 1. 12 781 78 1 scl trs bit 0 data 1 data 1 data 2 data 3 data 2 data 3 bit 6 bit 7 bit 0 bit 6 bit 7 bit 0 bit 1 sda (output) tdre icdrt icdrs user processing [3] write data to icdrt [3] write data to icdrt [3] write data to icdrt [3] write data to icdrt [2] set trs figure 18.14 transmit mode operation timing
section 18 i 2 c bus interface 2 (i 2 c2) page 936 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (3) receive operation in receive mode, data is latched at the rise of th e transfer clock. the tran sfer clock is output when mst in iccr1 is 1, and is i nput when mst is 0. for receive mode operation timing, refer to figure 18.15. the reception procedure and operati ons in receive mode are described below. 1. set the ice bit in iccr1 to 1. set the mst and cks3 to cks0 bits in iccr1. (initial setting) 2. when the transfer clock is output, set mst to 1 to start outputting the receive clock. 3. when the receive operation is completed, data is transferred from icdrs to icdrr and rdrf in icsr is set. when mst = 1, the next byte can be received, so the clock is continually output. the continuous reception is performed by reading icdrr every time rdrf is set. when the 8th clock is risen while rdrf is 1, the overrun is detected and al/ove in icsr is set. at this time, the pr evious reception data is retained in icdrr. 4. to stop receiving when mst = 1, set rcvd in iccr1 to 1, then read icdrr. then, scl is fixed high after receivi ng the next byte data. notes: follow the steps below to receive only one byte with mst=1 specified. see figure 18.16 for the operation timing. 1. set the ice bit in iccr1 to 1. set bits cks3 to cks0 in iccr1. (initial setting) 2. set mst=1 while the rcvd bit in iccr1 is 0. this causes the receive clock to be output. 3. check if the bc2 bit in icmr is set to 1 and then set the rcvd bit in iccr1 to 1. this causes the scl to be fixed to the high level after outputting one byte of the receive clock.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 937 of 1560 mar 18, 2011 sh7080 group 12 781 7812 scl mst trs rdrf icdrs icdrr sda (input) bit 0 bit 6 bit 7 bit 0 bit 6 bit 7 bit 0 bit 1 bit 1 user processing data 1 data 1 data 2 data 2 data 3 [2] set mst (when outputting the clock) [3] read icdrr [3] read icdrr figure 18.15 receive mode operation timing sda (input) bit 0 12345678 000 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 scl mst rcvd bc2 to bc0 [2] set mst 111 110 101 100 011 010 001 000 [3] set the rcvd bit after checking if bc2 = 1 figure 18.16 operation timi ng for receiving one byte
section 18 i 2 c bus interface 2 (i 2 c2) page 938 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.4.7 noise filter the logic levels at the scl and sda pins are routed through noise filters before being latched internally. figure 18.17 shows a block diagram of the noise filter circuit. the noise filter consists of three cascaded latche s and a match detector. the scl (or sda) input signal is sampled on the peripheral clock. when nf2cyc is set to 0, this signal is not passed forward to the next circuit unless the outputs of both latches agree. when nf2cyc is set to 1, this signal is not passed forward to the next circuit unless the outputs of three latches agree. if they do not agree, the previous value is held. 1 0 scl or sda input signal internal scl or sda signal sampling clock sampling clock peripheral clock cycle c latch q d c latch q d match detector c latch q d match detector nf2cyc figure 18.17 block diagram of noise filter
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 939 of 1560 mar 18, 2011 sh7080 group 18.4.8 using the iicrst bit to reset i 2 c bus interface 2 some registers and the control part for i 2 c of the i 2 c bus interface 2 can be reset by writing 1 to the iicrst bit in iccr2. figure 18.18 shows an example of the sequence for resetting the i 2 c bus interface 2 by using the iicrst bit. reset start no yes are scl and sda at the high level? (pb2pr = 1 and pb3pr = 1?) halt the i 2 c function (ice in iccr1 = 0) (2) (3) (1) (1) (2) (3) (4) (5) (6) (7) (8) (9) write 0 to the ice bit in iccr1 to halt functioning of the i 2 c bus interface 2. write 1 to the iicrst bit in iccr2 to reset some registers and the contol part of the i 2 c bus interface 2 module. the bbsy flag in iccr2 becomes undefined. write 0 to the mst and trs bits in iccr1 to switch the operating mode to slave receiver mode. wait until the bus is released. determine whether the bus is released by reading the i/o port bits (the pb2pr and pb3pr bits in pbprl) corresponding to scl and sda. write 1 to the fs bit in sar and clear the bbsy flag in iccr2 to 0. after the bbsy flag has been cleared to 0, write 0 to the fs bit. clear the flags (tend, rdrf, nackf, stop, al/ove, aas, and ads) in icsr to 0. write 0 to the iicrst bit to release the i 2 c module from the reset state. initialize i 2 c registers (iccr1, iccr2, icmr, icier, sar, and nf2cyc). write 1 to the ice bit in iccr1 to enable transfer operations. reset the i 2 c module (iicrst in iccr2 = 1) slave receiver mode (mst and trs in iccr1 = 0) (4) (5) clear the bbsy flag in iccr2 to 0 (fs in sar = 1) (6) clear the flags in icsr fs in sar = 0 reset end enable i 2 c operation (ice in iccr1 = 1) (7) (8) (9) cancel the i 2 c reset (iicrst in iccr2 = 0) initial settings figure 18.18 sequence for us ing the iicrst bit to reset i 2 c bus interface 2
section 18 i 2 c bus interface 2 (i 2 c2) page 940 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.4.9 example of use flowcharts in respectiv e modes that use the i 2 c bus interface 2 are shown in figures 18.19 to 18.22. bbsy=0 ? no tend=1 ? no yes start [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [13] [14] [15] initialize set mst and trs in iccr1 to 1 write 1 to bbsy and 0 to scp write transmit data in icdrt write 0 to bbsy and scp set mst to 1 and trs to 0 in iccr1 read bbsy in iccr2 read tend in icsr read ackbr in icier mater receive mode yes ackbr=0 ? write transmit data in icdrt read tdre in icsr read tend in icsr clear tend in icsr read stop in icsr clear tdre in icsr end write transmit data in icdrt transmit mode? no yes tdre=1 ? last byte? stop=1 ? no no no no no yes yes tend=1 ? yes yes yes [1] test the status of the scl and sda lines. [2] set master transmit mode. [3] issue the start condition. [4] set the first byte (slave address + r/ w ) of transmit data. [5] wait for 1 byte to be transmitted. [6] test the acknowledge transferred from the specified slave device. [7] set the second and subsequent bytes (except for the final byte) of transmit data. [8] wait for icdrt empty. [9] set the last byte of transmit data. [10] wait for last byte to be transmitted. [11] clear the tend flag. [12] clear the stop flag. [13] issue the stop condition. [14] wait for the creation of stop condition. [15] set slave receive mode. clear tdre. [12] clear stop in icsr figure 18.19 sample flowchart for master transmit mode
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 941 of 1560 mar 18, 2011 sh7080 group [10] no yes rdrf=1 ? no yes rdrf=1 ? last receive - 1? mater receive mode clear tend in icsr clear trs in iccr1 to 0 clear tdre in icsr clear ackbt in icier to 0 dummy-read icdrr read rdrf in icsr read icdrr set ackbt in icier to 1 set rcvd in iccr1 to 1 read icdrr read rdrf in icsr write 0 to bbsy and scp read stop in icsr read icdrr clear rcvd in iccr1 to 0 clear mst in iccr1 to 0 end no yes stop=1 ? no yes [1] clear tend, select master receive mode, and then clear tdre. * [2] set acknowledge to the transmit device. * [3] dummy-read icddr. * [4] wait for 1 byte to be received [5] check whether it is the (last receive - 1). [6] read the receive data. [7] set acknowledge of the final byte. disable continuous reception (rcvd = 1). [8] read the (final byte - 1) of received data. [9] wait for the last byte to be receive. [10] clear the stop flag. [11] issue the stop condition. [12] wait for the creation of stop condition. [13] read the last byte of receive data. [14] clear rcvd. [15] set slave receive mode. [1] [2] [3] [4] [5] [6] [7] [8] [9] [11] [12] [13] [14] [15] notes: * make sure that no interrupt will be generated during steps [1] to [3]. when the size of receive data is only one byte in reception, steps [2] to [6] are skipped after step [1], before jumping to step [7]. the step [8] is dummy-read in icdrr. however, when the size of receive data is two bytes and more, steps [2] to [6] are not skipped after step [1]. clear stop in icsr figure 18.20 sample flowch art for master receive mode
section 18 i 2 c bus interface 2 (i 2 c2) page 942 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tdre=1 ? yes yes no slave transmit mode clear aas in icsr write transmit data in icdrt read tdre in icsr last byte? write transmit data in icdrt read tend in icsr clear tend in icsr clear trs in iccr1 to 0 dummy-read icdrr clear tdre in icsr end [1] clear the aas flag. [2] set transmit data for icdrt (except for the last byte). [3] wait for icdrt empty. [4] set the last byte of transmit data. [5] wait for the last byte to be transmitted. [6] clear the tend flag . [7] set slave receive mode. [8] dummy-read icdrr to release the scl line. [9] clear the tdre flag. no no yes tend=1 ? [1] [2] [3] [4] [5] [6] [7] [8] [9] figure 18.21 sample flowchart for slave transmit mode
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 943 of 1560 mar 18, 2011 sh7080 group no yes rdrf=1 ? no yes rdrf=1 ? last receive - 1? slave receive mode clear aas in icsr clear ackbt in icier to 0 dummy-read icdrr read rdrf in icsr read icdrr set ackbt in icier to 1 read icdrr read rdrf in icsr read icdrr end no yes [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [1] clear the aas flag. [2] set acknowledge to the transmit device. [3] dummy-read icdrr. [4] wait for 1 byte to be received. [5] check whether it is the (last receive - 1). [6] read the receive data. [7] set acknowledge of the last byte. [8] read the (last byte - 1) of receive data. [9] wait the last byte to be received. [10] read for the last byte of receive data. note: when the size of receive data is only one byte in reception, steps [2] to [6] are skipped after step [1], before jumping to step [7]. the step [8] is dummy-read in icdrr. however, when the size of receive data is two bytes and more, steps [2] to [6] are not skipped after step [1]. figure 18.22 sample flowch art for slave receive mode
section 18 i 2 c bus interface 2 (i 2 c2) page 944 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.5 i 2 c2 interrupt sources there are six interrupt requests in this module; tran smit data empty, transmit end, receive data full, nack receive, stop recognition, and arbitrati on lost/overrun error. table 18.4 shows the contents of each interrupt request. table 18.4 interrupt requests interrupt request abbreviation interrupt condition i 2 c mode clock synchronous mode dtc activation transmit data empty iitxi (tdre=1) ? (tie=1) transmit end iitei (tend=1) ? (teie=1) receive data full iirxi (rdrf=1) ? (rie=1) stop recognition iistpi (stop=1) ? (stie=1) nack receive arbitration lost/ overrun error iinaki {(nackf=1)+(al=1)} ? (nakie=1) when the interrupt condition described in table 18.4 is 1, the cpu executes an interrupt exception handling. interrupt sources should be cleared in the exception handling. the tdre and tend bits are automatically cleared to 0 by writing the transmit data to icdrt. the rdrf bit is automatically cleared to 0 by r eading icdrr. the tdre bit is set to 1 again at the same time when the transmit data is written to icdrt. therefore, when the tdre bit is cleared to 0, then an excessive data of one byte may be transmitted. the tdre, tend, and rdrf bits are automatically cleared while the specified number of transfer s by the dtc is in progress; however, the tdre, tend, and rdrf bits are not cleared automatically when the transfer is complete.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 945 of 1560 mar 18, 2011 sh7080 group 18.6 operation using the dtc in the i 2 c bus format, since the slave device or the dir ection of transfer is selected by the slave address or the r/w bit, and the acknowledge bit ma y indicate the end of reception or reception of the final frame, the continuous transfer of data by the dtc must be performed combined with the cpu processing by the interrupt. table 18.5 shows some example of processing usi ng the dtc. these examples assume that the number of transfer data bytes is known in slave mode. table 18.5 example of processing using dtc item master transmit mode master receive mode slave transmit mode slave receive mode slave address + r/ w bit transmission/ reception transmission by dtc (icdr write) transmission by cpu (icdr write) reception by cpu (icdr read) reception by cpu (icdr read) dummy data read ? processing by cpu (icdr read) ? ? actual data transmission/ reception transmission by dtc (icdr write) reception by dtc (icdr read) transmission by dtc (icdr write) reception by dtc (icdr read) last frame processing not necessary reception by cpu (icdr read) not necessary reception by cpu (icdr read) setting of number of dtc transfer data frames transmission: actual data count + 1 (+ 1 equivalent to slave address + r/ w bits) reception: actual data count transmission: actual data count reception: actual data count
section 18 i 2 c bus interface 2 (i 2 c2) page 946 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.7 bit synchronous circuit in master mode, this module has a possibility that high level period may be short in the two states described below. ? when scl is driven to low by the slave device ? when the rising speed of scl is lowered by the load of the scl line (l oad capacitance or pull- up resistance) therefore, it monitors scl and communicates by bit with synchronization. figure 18.23 shows the timing of the bit synchronous circuit and table 18.6 shows the time when scl output changes from low to hi-z then scl is monitored. scl monitor scl pin level monitor scl pin level v ih scl monitor timing reference clock internal scl figure 18.23 the timing of the bit synchronous circuit table 18.6 time for monitoring scl cks3 cks2 nf2cyc time for monitoring scl * 1 0 6.5 t pcyc * 2 0 1 5.5 t pcyc * 2 0 18.5 t pcyc * 2 0 1 1 17.5 t pcyc * 2 1 0 16.5 t pcyc * 2 0 1 15.5 t pcyc * 2 1 0 40.5 t pcyc * 2 1 39.5 t pcyc * 2 notes: 1. scl pin level is monitored after "time for monitoring scl" has elapsed from the rising edge of the reference clock for monitoring scl. 2. t pcyc indicates the period of the peripheral clock.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 947 of 1560 mar 18, 2011 sh7080 group 18.8 usage note 18.8.1 module standby mode setting the i 2 c2 operation can be disabled or enabled usi ng the standby control register. the initial setting is for i 2 c2 operation to be halted. access to registers is enabled by clearing module standby mode. for details, refer to section 26, power-down modes. 18.8.2 issuance of stop condition and repeated start condition a stop condition or repeated start condition should be issued after the fall of the ninth clock pulse is recognized. the fall of the ninth clock pulse can be recognized by checking the sclo bit in the i 2 c bus control register 2 (iccr2). 18.8.3 issuance of a start condition and stop condition in sequence do not issue a start condition and stop condition in sequence. if a start condition and stop condition are to be issued in sequence, be sure to transmit a slave address before issuing the stop condition. 18.8.4 settings for multi-master operation 1. transfer rate setting in multi-master operation, specify a transfer rate of at least 1/1.8 of the fastest transfer rate among the other masters. for example, when the fastest of the other masters is at 400 kbps, the iic transfer rate of this lsi must be specified as 223 kbps ( = 400/1.8) or a higher rate. 2. mst and trs bits in iccr1 in multi-master operation, use the mov instruction to set the mst and trs bits in iccr1. 3. loss of arbitration when arbitration is lost, check whether the mst and trs bits in iccr1 are 0. if the mst and trs bits in iccr1 have been set to a value other than 0, clear the bits to 0. 18.8.5 reading icdrr in master receive mode in master receive mode, read icdrr before the rising edge of the 8th clock of scl. if icdrr cannot be read before the rising edge of the 8th clock so that th e next round of reception proceeds with the rdrf bit in icsr set to 1, the 8the clock is fixed low and the 9th clock is output. if icdrr cannot be read before the rising edge of the 8th clock of scl, set the rcvd bit in icrr1 to 1 so that transf er proceeds in byte units.
section 18 i 2 c bus interface 2 (i 2 c2) page 948 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 18.8.6 access to ice and iicrst bits during i 2 c bus operations writing 0 to the ice bit in iccr1 or 1 to the iicrst bit in iccr2 while this lsi is in any of the following states (1 to 4) causes the bbsy flag in iccr2 and the st op flag in icsr to become undefined. 1. this module is the i 2 c bus master in master transmit mode (mst = 1 and trs = 1 in iccr1). 2. this module is the i 2 c bus master in master receive mode (mst = 1 and trs = 0 in iccr1). 3. this module is transmitting data in slave tr ansmit mode (mst = 0 and trs = 1 in iccr1). 4. this module is transmitting acknowledge signals in slave receive mode (mst = 0 and trs = 0 in iccr1). executing any of the following procedures releas es the bbsy flag in ic cr2 from the undefined state. ? input a start condition (falling edge of sda while scl is at the high level) to set the bbsy flag to 1. ? input a stop condition (rising edge of sda while scl is at the high level) to clear the bbsy flag to 0. ? if the module is in master transmit mode, issue a start condition by writing 1 and 0 to the bbsy flag and the scp bit in iccr2, respectively, while scl and sda are at the high level. the bbsy flag is set to 1 on output of the start condition (falling edge of sda while scl is at the high level). ? with the module in master transmit or master receive mode, sda at the low level, and no other device holding scl at the low level, issue a stop condition by writing 0 to the bbsy flag and the scp bit in iccr2. the bbsy flag is cleared to 0 on output of the stop condition (rising edge of sda while scl is at the high level). ? writing 1 to the fs bit in sar clears the bbst flag to 0.
section 18 i 2 c bus interface 2 (i 2 c2) r01uh0198ej0500 rev. 5.00 page 949 of 1560 mar 18, 2011 sh7080 group 18.8.7 using the iicrst bit to initialize the registers ? writing 1 to the iicrst bit in the iccr2 register sets the sdao and sclo bits in the iccr2 register to 1. ? writing 1 to the iicrst bit in master transmit mode or slave transmit mode sets the tdre flag in icsr to 1. ? during a reset due to the iicrst bit being set to 1, writing to the bbsy flag and the scp and sdao bits is invalid. ? the bbsy flag in the iccr2 register is not cleared to 0 even when 1 is written to the iicrst bit. however, in some cases the conditions of pins scl and sda may generate a stop condition (rising edge of sda while scl is at the high level), causing the bbsy flag to be cleared as a result. ? data transmit and receive stops during a reset due to the iicrst bit being set to 1. however, the function that detects start conditions, stop conditions, and loss in bus contention continues to operate. the state of the iccr1, iccr2, and icsr registers may be updated by signals input on scl and sda. 18.8.8 operation of i 2 c bus interface 2 while ice = 0 writing 0 to the ice bit in iccr1 disables output on scl and sda. however, input on scl and sda remains valid. this module operates in acco rd with the signals input on scl and sda.
section 18 i 2 c bus interface 2 (i 2 c2) page 950 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 951 of 1560 mar 18, 2011 sh7080 group section 19 a/d converter (adc) this lsi includes a successive approximation type 10-bit a/d converter. 19.1 features ? 10-bit resolution ? input channels ? 8 channels in sh7083/sh7084/sh7085 (two independent a/d conversion modules) ? 16 channels in sh7086 (three independent a/d conversion modules) ? conversion time: 2.0 s per channel (operation when p = 25 mhz) ? three operating modes ? single mode: single-channel a/d conversion ? continuous scan mode: repetitive a/d conve rsion on up to four channels in sh7083/sh7084/sh7085 and up to eight channels in sh7086 ? single-cycle scan mode: continuous a/d conversion on up to four channels in sh7083/sh7084/sh7085 and up to eight channels in sh7086 ? data registers ? conversion results are held in a 16-bit data register for each channel ? sample-and-hold function ? three methods for conversion start ? software ? conversion start trigger from multifunction timer pulse unit 2 (mtu2) or multifunction timer pulse unit 2s (mtu2s) ? external trigger signal ? interrupt request ? an a/d conversion end interrupt request (adi) can be generated ? module standby mode can be set
section 19 a/d converter (adc) page 952 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group figure 19.1 shows a block diagram of the a/d converter. module data bus control circuit internal data bus 10-bit d/a comparator + sample-and- hold circuit adi interrupt signal bus interface successive approximations register multiplexer addrm ? ? ? addrn adcsr adtsr adcr anm ? ? ? ? ? ? ann [legend] adcr: a/d control register adcsr: a/d control/status register adtsr: a/d trigger select register addrm to addrn: a/d data registers m to n note: the register number corresponds to the channel number of the module. (m to n = 0 to 7 in sh7083/sh7084/sh7085 m to n = 0 to 15 in sh7086) adtrg conversion start trigger from mtu2/mtu2s p p /2 p /3 p /4 av cc av ref av ss figure 19.1 block diagram of a/d converter (for one module)
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 953 of 1560 mar 18, 2011 sh7080 group 19.2 input/output pins table 19.1 summarizes the input pins used by the a/d converter. the sh7083/sh7084/sh7085 has two a/d conversion modules and the sh7086 has three a/d conversion modules, each of which can be operated independently. the input channels of a/d modules 0 and 1 are divided into two channel groups. table 19.1 pin configuration product classification module type pin name i/o function sh7083 sh7084 sh7085 sh7086 common av cc input analog block power supply and reference voltage av ref input a/d conversion reference voltage ? av ss input analog block ground and reference voltage adtrg input a/d external trigger input pin an0 input analog input pin 0 group 0 a/d module 0 (a/d_0) an1 input analog input pin 1 an2 input analog input pin 2 group 1 an3 input analog input pin 3 an4 input analog input pin 4 group 0 a/d module 1 (a/d_1) an5 input analog input pin 5 an6 input analog input pin 6 group 1 an7 input analog input pin 7 an8 input analog input pin 8 ? ? ? a/d module 2 (a/d_2) an9 input analog input pin 9 ? ? ? an10 input analog input pin 10 ? ? ? an11 input analog input pin 11 ? ? ? an12 input analog input pin 12 ? ? ? an13 input analog input pin 13 ? ? ? an14 input analog input pin 14 ? ? ? an15 input analog input pin 15 ? ? ? note: the connected a/d module differs for each pin. the control registers of each module must be set.
section 19 a/d converter (adc) page 954 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 19.3 register descriptions the a/d converter has the following registers. for details on register addresses and register states in each processing state, refer to section 27, list of registers. table 19.2 register configuration register name abbrevia- tion r/w initial value address access size a/d data register 0 addr0 r h'0000 h'ffffc900 16 a/d data register 1 addr1 r h'0000 h'ffffc902 16 a/d data register 2 addr2 r h'0000 h'ffffc904 16 a/d data register 3 addr3 r h'0000 h'ffffc906 16 a/d control/status register_0 adcsr_0 r/w h'0000 h'ffffc910 16 a/d control register_0 adcr_0 r/w h'0000 h'ffffc912 16 a/d data register 4 addr4 r h'0000 h'ffffc980 16 a/d data register 5 addr5 r h'0000 h'ffffc982 16 a/d data register 6 addr6 r h'0000 h'ffffc984 16 a/d data register 7 addr7 r h'0000 h'ffffc986 16 a/d control/status register_1 adcsr_1 r/w h'0000 h'ffffc990 16 a/d control register_1 adcr_1 r/w h'0000 h'ffffc992 16 a/d data register 8 addr8 r h'0000 h'ffffca00 16 a/d data register 9 addr9 r h'0000 h'ffffca02 16 a/d data register 10 addr10 r h'0000 h'ffffca04 16 a/d data register 11 addr11 r h'0000 h'ffffca06 16 a/d data register 12 addr12 r h'0000 h'ffffca08 16 a/d data register 13 addr13 r h'0000 h'ffffca0a 16 a/d data register 14 addr14 r h'0000 h'ffffca0c 16 a/d data register 15 addr15 r h'0000 h'ffffca0e 16 a/d control/status register_2 adcsr_2 r/w h'0000 h'ffffca10 16 a/d control register_2 adcr_2 r/w h'0000 h'ffffca12 16 a/d trigger select register_0 adtsr_0 r/w h'0000 h'ffffe890 8, 16 a/d trigger select register_1 adtsr_1 r/w h'0000 h'ffffe892 8, 16
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 955 of 1560 mar 18, 2011 sh7080 group 19.3.1 a/d data registers 0 to 15 (addr0 to addr15) addrs are 16-bit read-only registers. the convers ion result for each analog input channel is stored in addr with the corresponding number. for example, the conversion result of an4 is stored in addr4. the converted 10-bit data is stored in bits 6 to 15. the lower 6 bits are always read as 0. the initial value of addr is h'0000. bit: initial value: r/w: 151413121110987654321 0 rrrr rrrrrrrrrrrr 0000000000000000 ------ bit bit name initial value r/w description 15 to 6 all 0 r bit data (10 bits) 5 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 19 a/d converter (adc) page 956 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 19.3.2 a/d control/status registers_0 to _2 (adcsr_0 to adcsr_2) adcsr for each module controls a/d conversion operations. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/(w) * r/w r r r/w r r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w note: writing 0 to this bit after reading it as 1 is clears the flag and is the only allowed way. * adf adie - - trge - conadf stc cksl[1:0] adm[1:0] adcs ch[2:0] bit bit name initial value r/w description 15 adf 0 r/(w) * a/d end flag a status flag that indicates the end of a/d conversion. [setting conditions] ? when a/d conversion ends in single mode ? when a/d conversion ends on all specified channels in scan mode [clearing conditions] ? when 0 is written after reading adf = 1 ? when the dmac is activated by an adi interrupt and addr is read ? when the dtc is activated by an adi interrupt and addr is read while the disel bit in the mrb register of the dtc is cleared to 0 14 adie 0 r/w a/d interrupt enable the a/d conversion end interrupt (adi) request is enabled when 1 is set when changing the operating mode, first clear the adst bit to 0. 13, 12 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 957 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 11 trge 0 r/w trigger enable enables or disables triggering of a/d conversion by adtrg , an mtu2 trigger, or an mtu2s trigger. 0: a/d conversion triggering is disabled 1: a/d conversion triggering is enabled when changing the operating mode, first clear the adst bit to 0. 10 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 9 conadf 0 r/w adf control controls setting of the adf bit in 2-channel scan mode. the setting of this bit is valid only when triggering of a/d conversion is enabled (trge = 1) in 2-channel scan mode. the setting of this bit is ignored in single mode, 4-channel scan mode, or 8-channel scan mode. 0: the adf bit is set when a/d conversion started by the group 0 trigger or group 1 trigger has finished. 1: the adf bit is set when a/d conversion started by the group 0 trigger and a/d conversion started by the group 1 trigger have both finished. note that the triggering order has no affect. when changing the operating mode, first clear the adst bit to 0. 8 stc 0 r/w state control sets the a/d conversion time in combination with the cksl1 and cksl0 bits. 0: 50 states 1: 64 states when changing the a/d conversion time, first clear the adst bit to 0.
section 19 a/d converter (adc) page 958 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7, 6 cksl[1:0] 00 r/w clock select 1 and 0 select the a/d conversion time. 00: p /4 01: p /3 10: p /2 11: p when changing the a/d conversion time, first clear the adst bit to 0. cksl[1:0] = b'11 can be set while p 25 [mhz]. 5, 4 adm[1:0] 00 r/w a/d mode 1 and 0 select the a/d conversion mode. 2-channel scan mode is supported only by a/d modules 0 and 1. do not select 2-channel scan mode in a/d module 2. 00: single mode 01: 4-channel scan mode 10: 8-channel scan mode 11: 2-channel scan mode when changing the operating mode, first clear the adst bit to 0. 3 adcs 0 r/w a/d continuous scan selects either single-cycle scan or continuous scan in scan mode. this bit is valid only when scan mode is selected. 0: single-cycle scan 1: continuous scan when changing the operating mode, first clear the adst bit to 0. 2 to 0 ch[2:0] 000 r/w channel select 2 to 0 select analog input channels. see table 19.3. when changing the operating mode, first clear the adst bit to 0. note: * writing 0 to this bit after reading it as 1 is clears the flag and is the only allowed way.
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 959 of 1560 mar 18, 2011 sh7080 group 19.3.3 a/d control registers_0 to _2 (adcr_0 to adcr_2) adcr for each module controls a/d conversion. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrr/wrrrrrrrrrrrrr - - adst - - - - - - - - - - - - - bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 adst 0 r/w a/d start starts or stops a/d conversion. when this bit is set to 1, a/d conversion is started. when this bit is cleared to 0, a/d conversion is stopped and the a/d converter enters the idle state. in single or single-cycle scan mode, this bit is automatically cleared to 0 when a/d conversion ends on the selected single channel. in continuous scan mode, a/d conversion is continuously performed for the selected channels in sequence until this bit is cleared by software, reset, or in software standby mode or module standby mode. 12 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 19 a/d converter (adc) page 960 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 19.3 channel select list ? single mode analog input channels bit 2 bit 1 bit 0 single mode ch2 ch1 ch0 a/d_0 a/d_1 a/d_2 0 0 0 an0 an4 an8 1 an1 an5 an9 1 0 an2 an6 an10 1 an3 an7 an11 1 0 0 an12 1 an13 1 0 an14 1 setting prohibited setting prohibited an15 ? 2-channel scan mode analog input channels software activation other than software activation bit 2 bit 1 bit 0 a/d_0 a/d_1 ch2 ch1 ch0 a/d_0 a/d_1 a/d_2 group 0 group 1 group 0 group 1 a/d_2 0 0 0 an0 an4 an0 an2 an4 an6 1 an0, an1 an4, an5 an0, an1 an2, an3 an4, an5 an6, an7 1 0 an2 an6 1 an2, an3 an6, an7 1 0 0 1 1 0 1 setting prohibited setting prohibited setting prohibited setting prohibited setting prohibited setting prohibited setting prohibited setting prohibited note: when 2-, 4-, or 8-channel scan mode has been selected, the channels for operation are selected only by bits ch2 to ch0. for example, when 8-channel scan mode has been selected with continuous scan mode, continuous conversion will be performed on an8 if bits ch2 to ch0 have been set to 000.
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 961 of 1560 mar 18, 2011 sh7080 group ? 4-channel scan mode analog input channels bit 2 bit 1 bit 0 4-channel scan mode * ch2 ch1 ch0 a/d_0 a/d_1 a/d_2 0 0 0 an0 an4 an8 1 an0, an1 an4, an5 an8, an9 1 0 an0 to an2 an4 to an6 an8 to an10 1 an0 to an3 an4 to an7 an8 to an11 1 0 0 setting prohibited setting prohibited an12 1 an12, an13 1 0 an12 to an14 1 an12 to an15 note: * continuous scan mode or single-scan mode can be selected with the adcs bit. when 2-, 4-, or 8-channel scan mode has been selected, the channels for operation are selected only by bits ch2 to ch0. for example, when 8-channel scan mode has been selected with continuous scan mode, continuous conversion will be performed on an8 if bits ch2 to ch0 have been set to 000. ? 8-channel scan mode analog input channels bit 2 bit 1 bit 0 8-channel scan mode * ch2 ch1 ch0 a/d_2 0 0 0 an8 1 an8, an9 1 0 an8 to an10 1 an8 to an11 1 0 0 an8 to an12 1 an8 to an13 1 0 an8 to an14 1 an8 to an15 note: * continuous scan mode or single-scan mode can be selected with the adcs bit. when 2-, 4-, or 8-channel scan mode has been selected, the channels for operation are selected only by bits ch2 to ch0. for example, when 8-channel scan mode has been selected with continuous scan mode, continuous conversion will be performed on an8 if bits ch2 to ch0 have been set to 000.
section 19 a/d converter (adc) page 962 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 19.3.4 a/d trigger select registers_0 and _1 (adtsr_0 and adtsr_1) the adtsr enables an a/d conversion started by an external trigger signal. in particular, the four channels in a/d module 0 and a/d module 1 are divided into two groups (group 0 and group 1) and the a/d trigger can be specified for each group independently in 2- channel scan mode.
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 963 of 1560 mar 18, 2011 sh7080 group ? adtsr_0 bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w trg11s[3:0] trg01s[3:0] trg1s[3:0] trg0s[3:0] bit bit name initial value r/w description 15 to 12 trg11s[3:0] 0000 r/w a/d trigger 1 group 1 select 3 to 0 select an external trigger, mtu2 trigger, or mtu2s trigger to start a/d conversion for group 1 when a/d module 1 is in 2-channel scan mode. 0000: external trigger pin ( adtrg ) input 0001: tgra input capture/compare match on each mtu2 channel or tcnt_4 trough in complementary pwm mode (trgan) 0010: mtu2 ch0 compare match (trg0n) 0011: mtu2 a/d conversion start request delaying (trg4an) 0100: mtu2 a/d conversion start request delaying (trg4bn) 0101: tgra input capture/compare match on each mtu2s channel or tcnt_4 trough in complementary pwm mode (trgan) 0110: setting prohibited 0111: mtu2s a/d conversion start request delaying (trg4an) 1000: mtu2s a/d conversion start request delaying (trg4bn) 1001: setting prohibited 101x: setting prohibited 11xx: setting prohibited when switching the selector, first clear the adst bit in the a/d control register (adcr) to 0. specify different trigger sources for the group 0 and group 1 conversion requests so that a group 0 conversion request is not generated simultaneously with a group 1 conversion request in 2-channel scan mode.
section 19 a/d converter (adc) page 964 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 11 to 8 trg01s[3:0] 0000 r/w a/d trigger 0 group 1 select 3 to 0 select an external trigger, mtu2 trigger, or mtu2s trigger to start a/d conversion for group 1 when a/d module 0 is in 2-channel scan mode. 0000: external trigger pin ( adtrg ) input 0001: tgra input capture/compare match on each mtu2 channel or tcnt_4 trough in complementary pwm mode (trgan) 0010: mtu2 ch0 compare match (trg0n) 0011: mtu2 a/d conversion start request delaying (trg4an) 0100: mtu2 a/d conversion start request delaying (trg4bn) 0101: tgra input capture/compare match on each mtu2s channel or tcnt_4 trough in complementary pwm mode (trgan) 0110: setting prohibited 0111: mtu2s a/d conversion start request delaying (trg4an) 1000: mtu2s a/d conversion start request delaying (trg4bn) 1001: setting prohibited 101x: setting prohibited 11xx: setting prohibited when switching the selector, first clear the adst bit in the a/d control register (adcr) to 0. specify different trigger sources for the group 0 and group 1 conversion requests so that a group 0 conversion request is not generated simultaneously with a group 1 conversion request in 2-channel scan mode.
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 965 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7 to 4 trg1s[3:0] 0000 r/w a/d trigger 1 select 3 to 0 select an external trigger, mtu2 trigger, or mtu2s trigger to start a/d conversion for a/d module 1. in 2- channel scan mode, these bits select an external trigger, mtu2 trigger, or mtu2s trigger to start a/d conversion for group 0. 0000: external trigger pin ( adtrg ) input 0001: tgra input capture/compare match on each mtu2 channel or tcnt_4 trough in complementary pwm mode (trgan) 0010: mtu2 ch0 compare match (trg0n) 0011: mtu2 a/d conversion start request delaying (trg4an) 0100: mtu2 a/d conversion start request delaying (trg4bn) 0101: tgra input capture/compare match on each mtu2s channel or tcnt_4 trough in complementary pwm mode (trgan) 0110: setting prohibited 0111: mtu2s a/d conversion start request delaying (trg4an) 1000: mtu2s a/d conversion start request delaying (trg4bn) 1001: setting prohibited 101x: setting prohibited 11xx: setting prohibited when switching the selector, first clear the adst bit in the a/d control register (adcr) to 0. specify different trigger sources for the group 0 and group 1 conversion requests so that a group 0 conversion request is not generated simultaneously with a group 1 conversion request in 2-channel scan mode.
section 19 a/d converter (adc) page 966 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 to 0 trg0s[3:0] 0000 r/w a/d trigger 0 select 3 to 0 select an external trigger, mtu2 trigger, or mtu2s trigger to start a/d conversion for a/d module 0. in 2- channel scan mode, these bits select an external trigger, mtu2 trigger, or mtu2s trigger to start a/d conversion for group 0. 0000: external trigger pin ( adtrg ) input 0001: tgra input capture/compare match on each mtu2 channel or tcnt_4 trough in complementary pwm mode (trgan) 0010: mtu2 ch0 compare match (trg0n) 0011: mtu2 a/d conversion start request delaying (trg4an) 0100: mtu2 a/d conversion start request delaying (trg4bn) 0101: tgra input capture/compare match on each mtu2s channel or tcnt_4 trough in complementary pwm mode (trgan) 0110: setting prohibited 0111: mtu2s a/d conversion start request delaying (trg4an) 1000: mtu2s a/d conversion start request delaying (trg4bn) 1001: setting prohibited 101x: setting prohibited 11xx: setting prohibited when switching the selector, first clear the adst bit in the a/d control register (adcr) to 0. specify different trigger sources for the group 0 and group 1 conversion requests so that a group 0 conversion request is not generated simultaneously with a group 1 conversion request in 2-channel scan mode. [legend] x: don't care
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 967 of 1560 mar 18, 2011 sh7080 group ? adtsr_1 bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/wr/wr/wr/wrrrrrrrrrrrr trg2s[3:0] - - - - - - - - - - - - bit bit name initial value r/w description 15 to 12 trg2s[3:0] 0000 r/w a/d trigger 2 select 3 to 0 select an external trigger, mtu2 trigger, or mtu2s trigger to start a/d conversion for a/d module 2. 0000: external trigger pin ( adtrg ) input 0001: tgra input capture/compare match for each mtu2 channel or tcnt_4 trough in complementary pwm mode (trgan) 0010: mtu2 ch0 compare match (trg0n) 0011: mtu2 a/d conversion start request delaying (trg4an) 0100: mtu2 a/d conversion start request delaying (trg4bn) 0101: tgra input capture/compare match for each mtu2 channel or tcnt_4 trough in complementary pwm mode (trgan) 0110: setting prohibited 0111: mtu2s a/d conversion start request delaying (trg4an) 1000: mtu2s a/d conversion start request delaying (trg4bn) 1001: setting prohibited 101x: setting prohibited 11xx: setting prohibited when switching the selector, first clear the adst bit in the a/d control register (adcr) to 0. 11 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. [legend] x: don't care
section 19 a/d converter (adc) page 968 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 19.4 operation the a/d converter operates by successive appr oximation with 10-bit resolution. it has two operating modes; single mode and scan mode. there are two kinds of scan mode: continuous mode and single-cycle mode. when changing the oper ating mode or analog input channel, in order to prevent incorrect operation, first clear the adst bit to 0 in adcr. 19.4.1 single mode in single mode, a/d conversion is to be performed only once on the specified single channel. the operations are as follows. 1. a/d conversion is started when the adst bit in adcr is set to 1, according to software, mtu2, mtu2s, or external trigger input. 2. when a/d conversion is completed, the result is transferred to the a/d data register corresponding to the channel. 3. on completion of conversion, the adf bit in adcsr is set to 1. if the adie bit is set to 1 at this time, an adi interrupt request is generated. 4. the adst bit remains set to 1 during a/d conversion. when a/d conversion ends, the adst bit is automatically cleared to 0 and the a/d converter enters the idle state. when the adst bit is cleared to 0 during a/d conversion, a/d conversion stops and the a/d converter enters the idle state. 19.4.2 continuous scan mode in continuous scan mode, a/d conversion is to be performed sequentially on the specified channels (up to four channels in sh7083/sh7084/sh7085 and up to eight channels in sh7086). 1. when the adst bit in adcr is set to 1 by software, mtu2, mtu2s, or external trigger input, a/d conversion starts on the channel with the lowest number in the group (an0, an1, ..., an7). 2. when a/d conversion for each channel is completed, the result is sequentially transferred to the a/d data register corresponding to each channel. 3. when conversion of all the selected channels is completed, the adf bit in adcsr is set to 1. if the adie bit is set to 1 at this time, an adi interrupt is requested after a/d conversion ends. conversion of the first channel in the group starts again. 4. steps 2 to 3 are repeated as long as the adst bit remains set to 1. when the adst bit is cleared to 0, a/d conversion stops and the a/d converter enters the idle state.
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 969 of 1560 mar 18, 2011 sh7080 group 19.4.3 single-cycle scan mode in single-cycle scan mode, a/d conversion is to be performed once on the specified channels (up to four channels in sh7083/sh7084/sh7085 and up to eight channels in sh7086). 1. when the adst bit in adcr is set to 1 by a software, mtu2, mtu2s, or external trigger input, a/d conversion starts on the channel with the lowest number in the group (an0, an1, ..., an7). 2. when a/d conversion for each channel is completed, the result is sequentially transferred to the a/d data register corresponding to each channel. 3. when conversion of all the selected channels is completed, the adf bit in adcsr is set to 1. if the adie bit is set to 1 at this time, an adi interrupt is requested after a/d conversion ends. 4. after a/d conversion ends, the adst bit is automatically cleared to 0 and the a/d converter enters the idle state. when the adst bit is cleared to 0 during a/d conversion, a/d conversion stops and the a/d converter enters the idle state. 19.4.4 input sampling and a/d conversion time the a/d converter has a built-in sample-and-hol d circuit for each module. the a/d converter samples the analog input when the a/d conversion start delay time (t d ) has passed after the adst bit in adcr is set to 1, then starts conversion. figure 19.2 shows the a/d conversion timing. table 19.4 shows the a/d conversion time. as indicated in figure 19.2, the a/d conversion time (t conv ) includes t d and the input sampling time (t spl ). the length of t d varies depending on the timing of the write access to adcr. the total conversion time therefore varies within the ranges indicated in table 19.4. in scan mode, the values given in table 19.4 apply to the first conversion time. the values given in table 19.5 apply to the second and subsequent conversions.
section 19 a/d converter (adc) page 970 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group p a/d converter a/d conversion a/d conversion start delay time(t d ) a/d conversion time (t conv ) analog input sampling time(t spl ) adst write timing end of a/d conversion adf address write cycle a/d synchronization time (up to 6 states) internal write signal analog input sampling signal idle state sample-and-hold (2 states) figure 19.2 a/d conversion timing
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 971 of 1560 mar 18, 2011 sh7080 group table 19.4 a/d conversion time (single mode) stc = 0 cksl1 = 0 cksl1 = 1 cksl0 = 0 cksl0 = 1 cksl0 = 0 cksl0 = 1 item symbol min. typ. m ax. min. typ. max. min. typ. max. min. typ. max. a/d conversion start delay time t d 2 ? 6 2 ? 5 2 ? 4 2 ? 3 input sampling time t spl ? 24 ? ? 18 ? ? 12 ? ? 6 ? a/d conversion time t conv 202 ? 206 152 ? 155 102 ? 104 52 ? 53 stc = 1 cksl1 = 0 cksl1 = 1 cksl0 = 0 cksl0 = 1 cksl0 = 0 cksl0 = 1 item symbol min. typ. max. min. ty p. max. min. typ. m ax. min. typ. max. a/d conversion start delay time t d 2 ? 6 2 ? 5 2 ? 4 2 ? 3 input sampling time t spl ? 36 ? ? 27 ? ? 18 ? ? 9 ? a/d conversion time t conv 258 ? 262 194 ? 197 130 ? 132 66 ? 67 note: all values represent the number of states for p . table 19.5 a/d conversion time (scan mode) conversion time calculation example stc cksl1 cksl0 conversion time (state) p = 25 mhz p = 40 mhz 0 200 (fixed) 8 s 5 s 0 1 150 (fixed) 6 s 3.8 s 0 100 (fixed) 4 s 2.5 s 0 1 1 50 (fixed) 2 s setting prohibited 1 0 256 (fixed) 10.2 s 6.4 s 0 1 192 (fixed) 7.7 s 4.8 s 1 0 128 (fixed) 5.1 s 3.2 s 1 64 (fixed) 2.6 s setting prohibited
section 19 a/d converter (adc) page 972 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 19.4.5 a/d converter activation by mtu2 or mtu2s the a/d converter can be independently activated by an a/d conversion request from the interval timer of the mtu2 or mtu2s. to activate the a/d converter by the mtu2 or mtu2s, first set the trge bit in the a/d control/status register (adcsr) to 1, and then set the a/d trigger select register (adtsr). after this register setting has been made, the adst bit in adcr is automatically set to 1 when an a/d conversion request from the interval timer of the mtu2 or mtu2s occurs. the timing from setting of the adst bit until the start of a/d conversion is the same as when 1 is written to the adst bit by software. 19.4.6 external trigger input timing a/d conversion can be externally triggered. when the trge bit in the a/d control/status register (adcsr) is set to 1 while the a/d trigger select registers_0 and _1 (adtsr_0 and adstr_1) are set to external trigger pin input, external trigger input is enabled at the adtrg pin. a falling edge of the adtrg pin sets the adst bit to 1 in adcr, starting a/d conversion. other operations, in both single and scan modes, are the same as when the adst bit has been set to 1 by software. figure 19.3 shows the timing. ck adtrg external trigger signal adst a/d conversion figure 19.3 external trigger input timing
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 973 of 1560 mar 18, 2011 sh7080 group 19.4.7 2-channel scanning in 2-channel scan mode, since the four channels of analog input are divided into groups 0 and 1, triggers for activation of groups 0 and 1 are in dependently specifiable. conversion end interrupts in 2-channel scan mode can be generated either on completion of group 0 or group 1 or on completion of group 0 and group 1. if conversion is to be started by triggers, the different sources for groups 0 and 1 are specified in adtsr. a request for conversion by group 1 generated during conversion by group 0 is ignored. figure 19.4 shows an example of operation when trg4an of the mtu2 has been specified as the a/d conversion start request by group 0 and trg4bn of the mtu2 has been specified as the a/d conversion start request by group 1. tadcora_4 tgra_3 tadcorb_4 h'0000 tcnt_4 a/d conversion start request conadf bit in adcsr = 0 conadf bit in adcsr = 1 a/d conversion end (adf) an0 conversion an1 conversion an2 conversion an3 conversion figure 19.4 example of 2-channel scanning
section 19 a/d converter (adc) page 974 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 19.5 interrupt sources and dmac and dtc transfer requests the a/d converter can generate an a/d conversion end interrupt request (adi). the adi interrupt can be enabled by setting the adie bit in the a/d control/status register (adcsr) to 1, or disabled by clearing the adie bit to 0. the dtc or dmac can be activated by an adi interrupt. in this case an interrupt request is not sent to the cpu. when the dtc or dmac is activated by an adi interrupt, the adf bit in adcsr is automatically cleared when data is transferred by the dtc or dmac. having the converted data read by the dtc or dmac in response to an adi interrupt enables continuous conversion to be achieved without imposing a load on software. table 19.6 a/d converter interrupt source name interrupt source interrupt source flag dtc activation dmac activation adi0 a/d_0 conversion completed adf in adcsr_0 possible impossible adi1 a/d_1 conversion completed adf in adcsr_1 possible possible adi2 a/d_2 conversion completed adf in adcsr_2 possible impossible
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 975 of 1560 mar 18, 2011 sh7080 group 19.6 definitions of a/d conversion accuracy this lsi's a/d conversion accuracy definitions are given below. ? resolution the number of a/d converter digital output codes ? quantization error the deviation inherent in the a/d converter, given by 1/2 lsb (see figure 19.5). ? offset error the deviation of the analog input voltage value from the ideal a/d conversion characteristic when the digital output changes from the minimum voltage value b'0000000000 (h'000) to b'0000000001 (h'001) (see figure 19.6). ? full-scale error the deviation of the analog input voltage value from the ideal a/d conversion characteristic when the digital output changes from b'1111111110 (h'3fe) to b'1111111111 (h'3ff) (see figure 19.6). ? nonlinearity error the error with respect to the ideal a/d conversion characteristic between zero voltage and full-scale voltage. does not include offset erro r, full-scale error, or quantization error (see figure 19.6). ? absolute accuracy the deviation between the digital value and the analog input value. includes offset error, full- scale error, quantization erro r, and nonlinearity error.
section 19 a/d converter (adc) page 976 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 111 110 101 100 011 010 001 000 1 1024 2 1024 1022 1024 1023 1024 fs quantization error digital output ideal a/d conversion characteristic analog input voltage figure 19.5 definitions of a/d conversio n accuracy
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 977 of 1560 mar 18, 2011 sh7080 group fs digital output ideal a/d conversion characteristic nonlinearity error analog input voltage offset error actual a/d conversion characteristic full-scale error figure 19.6 definitions of a/d conversio n accuracy
section 19 a/d converter (adc) page 978 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 19.7 usage notes 19.7.1 module standby mode setting operation of the a/d converter can be disabled or enabled using the standby control register. the initial setting is for operation of the a/d converter to be halted. register access is enabled by clearing module standby mode. for details, refer to section 26, power-down modes. 19.7.2 permissible signal source impedance this lsi's analog input is designed such that conversion accuracy is guaranteed for an input signal for which the signal source impedance is 1 k or less. this specification is provided to enable the a/d converter's sample-and-hold circuit input capacitance to be charged within the sampling time; if the sensor output impedance exceeds 1 k , charging may be insufficient and it may not be possible to guarantee a/d conversion accuracy. howe ver, for a/d conversion in single mode with a large capacitance provided externa lly, the input load will essentia lly comprise only the internal input resistance of 10 k , and the signal source impedance is ignored. however, as a low-pass filter effect is obtained in this case, it may not be possible to follow an analog signal with a large differential coefficient (e.g., 5 mv/ s or greater) (see figure 19.7). when converting a high-speed analog signal or converting in scan mode, a low-impedance buffer should be inserted. 19.7.3 influences on absolute accuracy adding capacitance results in coupling with gnd, and therefore noise in gnd may adversely affect absolute precision. be sure to make the connection to an electrically stable gnd such as avss. care is also required to insure that filter circuits do not interfere in the accuracy by the printed circuit digital signals on the mounting board (i.e. acting as antennas). 20 pf 10 k c in = 20 pf sensor output impedance of up to 3 k or up to 1 k this lsi low-pass filter c to 0.1 f sensor input a/d converter equivalent circuit figure 19.7 example of analog input circuit
section 19 a/d converter (adc) r01uh0198ej0500 rev. 5.00 page 979 of 1560 mar 18, 2011 sh7080 group 19.7.4 range of analog power supply and other pin settings if the conditions below are not met, the reliability of the device may be adversely affected. ? analog input voltage range the voltage applied to analog input pin ann during a/d conversion should be in the range avss van av ref . ? relationship between avcc, avss and vcc, vss set avss = vss for the relationship between avcc, avss and vcc, vss. if the a/d converter is not used, the avcc and avss pins must not be left open. ? av ref input voltage range the voltage applied to the av ref pin should be in the range av ref avcc. if the a/d converter is not used, set av ref = avcc. 19.7.5 notes on board design in board design, digital circuitry and analog circuitry should be as mutually isolated as possible, and layout in which digital circuit signal lines and analog circuit signal lines cross or are in close proximity should be avoided as far as possible. fa ilure to do so may result in incorrect operation of the analog circuitry due to inductance, adversely affecting a/d conversion values. also, digital circuitry must be isolated from the analog input signals (an0 to an15), and analog power supply (avcc) by the analog ground (avss). also, the analog ground (avss) should be connected at one point to a stable ground (vss) on the board.
section 19 a/d converter (adc) page 980 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 19.7.6 notes on noise countermeasures a protection circuit should be connected in order to prevent damage due to abnormal voltage, such as an excessive surge at the analog input pins (an0 to an15), between avcc and avss, as shown in figure 19.8. also, the bypass capacitors connect ed to avcc and the filte r capacitor connected to an0 to an15 must be connected to avss. if a filter capacitor is connected, th e input currents at the analog input pins (an0 to an15) are averaged, and so an error may arise. also, when a/d conversion is performed frequently, as in scan mode, if the current charged and discharged by the capacitance of the sample-and-hold circuit in the a/d converter exceeds the curr ent input via the input impedance (r in ), an error will arise in the analog input pin voltage. careful consideration is therefore required when deciding circuit constants. av cc * 1 an0 to an15 av ss av ref * 1 r in * 2 100 0.1 f 0.01 f 10 f notes: values are reference values. 1. 2. r in : input impedance figure 19.8 example of analog input protection circuit table 19.7 analog pin specifications item min. max. unit condition analog input capacitance ? 20 pf ? permissible signal source impedance ? 3 k p 20 mhz 1 p > 20 mhz
section 20 compare match timer (cmt) r01uh0198ej0500 rev. 5.00 page 981 of 1560 mar 18, 2011 sh7080 group section 20 compare match timer (cmt) this lsi has an on-chip compare match timer (cmt) consisting of a 2-channel 16-bit timer. the cmt has a16-bit counter, and can generate interrupts at set intervals. 20.1 features ? selection of four counter input clocks any of four internal clocks (p /8, p /32, p /128, and p /512) can be selected independently for each channel. ? interrupt request on compare match ? module standby mode can be set. figure 20.1 shows a block diagram of cmt. control circuit clock selection cmstr cmcsr_0 cmcor_0 cmcnt_0 channel 0 channel 1 cmt p /8 cmcsr_1 cmcor_1 cmcnt_1 p /32 p /128 p /512 p /8 p /32 p /128 p /512 clock selection control circuit comparator comparator [legend] cmstr: compare match timer start register cmcsr: compare match timer control/status register cmcor: compare match timer constant register cmcnt: compare match counter cmi: compare match interrupt module bus bus interface internal bus cmi0 cmi1 figure 20.1 block diagram of cmt
section 20 compare match timer (cmt) page 982 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 20.2 register descriptions the cmt has the following registers. for details on register addresses and register states during each processing, refer to section 27, list of regist ers. to distinguish registers in each channel, an underscore and the channel number are added as a suffix to the register name. table 20.1 register configuration register name abbrevia- tion r/w initial value address access size compare match timer start register cmstr r/w h'0000 h'ffffce00 8, 16, 32 compare match timer control/status register_1 cmcsr_0 r/w h'0000 h'ffffce02 8, 16 compare match counter_0 cmcnt_0 r/w h'0000 h'ffffce04 8, 16, 32 compare match constant register_0 cmcor_0 r/w h'ffff h'ffffce06 8, 16 compare match timer control/status register_0 cmcsr_1 r/w h'0000 h'ffffce08 8, 16, 32 compare match counter_1 cmcnt_1 r/w h'0000 h'ffffce0a 8, 16 compare match constant register_1 cmcor_1 r/w h'ffff h'ffffce0c 8, 16, 32
section 20 compare match timer (cmt) r01uh0198ej0500 rev. 5.00 page 983 of 1560 mar 18, 2011 sh7080 group 20.2.1 compare match timer start register (cmstr) cmstr is a 16-bit register that selects whether compare match counter (cmcnt) operates or is stopped. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrr/wr/w - - - - - - - - - - - - - - str1 str0 bit bit name initial value r/w description 15 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 str1 0 r/w count start 1 specifies whether compare match counter 1 operates or is stopped. 0: cmcnt_1 count is stopped 1: cmcnt_1 count is started 0 str0 0 r/w count start 0 specifies whether compare match counter 0 operates or is stopped. 0: cmcnt_0 count is stopped 1: cmcnt_0 count is started 20.2.2 compare match timer contro l/status register (cmcsr) cmcsr is a 16-bit register that indicates compare match generation, enables interrupts and selects the counter input clock. bit: initial value: r/w: 1514131211109876543210 0000000000000000 rrrrrrrr(r/w) * r/w r r r r r/w r/w writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. --------cmf cmie - - - - cks[1:0] note: *
section 20 compare match timer (cmt) page 984 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 cmf 0 r/(w) * 1 compare match flag indicates whether or not the values of cmcnt and cmcor match. 0: cmcnt and cmcor values do not match [clearing conditions] ? when 0 is written to this bit after reading cmf=1 * 2 ? when cmt registers are accessed when the value of the disel bit of mrb in the dtc is 0 after activating the dtc by cmi interrupts. [setting condition] 1: cmcnt and cmcor values match 6 cmie 0 r/w compare match interrupt enable enables or disables compare match interrupt (cmi) generation when cmcnt and cmcor values match (cmf=1). 0: compare match interrupt (cmi) disabled 1: compare match interrupt (cmi) enabled 5 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1, 0 cks[1:0] 00 r/w clock select 1 and 0 select the clock to be input to cmcnt from four internal clocks obtained by dividing the peripheral operating clock (p ). when the str bit in cmstr is set to 1, cmcnt starts counting on the clock selected with bits cks1 and cks0. 00: p /8 01: p /32 10: p /128 11: p /512 notes: 1. writing 0 to this bit after reading it as 1 clears the flag and is the only allowed way. 2. if the flag is set by another compare match before writing 0 to the bit after reading it as 1, the flag will not be cleared by writing 0 to it once. in this case, read the bit as 1 again and write 0 to it.
section 20 compare match timer (cmt) r01uh0198ej0500 rev. 5.00 page 985 of 1560 mar 18, 2011 sh7080 group 20.2.3 compare match counter (cmcnt) cmcnt is a 16-bit register used as an up-counter. when the counter input clock is selected with bits cks1 and cks0 in cmcsr and the str bit in cmstr is set to 1, cmcnt starts counting using the selected clock. when the value in cmcnt and the value in comp are match constant register (cmcor) match, cmcnt is cleared to h'0000 and the cmf flag in cmcsr is set to 1. the initial value of cmcnt is h'0000. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w 20.2.4 compare match constant register (cmcor) cmcor is a 16-bit register that sets the interval up to a compare match with cmcnt. the initial value of cmcor is h'ffff. bit: initial value: r/w: 151413121110987654321 0 1111111111111111 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w
section 20 compare match timer (cmt) page 986 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 20.3 operation 20.3.1 interval count operation when an internal clock is selected with bits cks1 and cks0 in cmcsr and the str bit in cmstr is set to 1, cmcnt starts incrementing us ing the selected clock. when the values in cmcnt and cmcor match, cmcnt is cleared to h'0000 and the cmf flag in cmcsr is set to 1. when the cmie bit in cmcsr is set to 1, a compare match interrupt (cmi) is requested. cmcnt then starts counting up again from h'0000. figure 20.2 shows the operation of the compare match counter. cmcor h'0000 cmcnt value time counter cleared by compare match with cmcor figure 20.2 counter operation 20.3.2 cmcnt count timing one of four internal clocks (p /8, p /32, p /128, and p /512) obtained by dividing the p clock can be selected with bits cks1 and cks0 in cmcsr. figure 20.3 shows the timing. peripheral operating clock (p ) nth clock (n + 1)th clock count clock cmcnt n n + 1 figure 20.3 count timing
section 20 compare match timer (cmt) r01uh0198ej0500 rev. 5.00 page 987 of 1560 mar 18, 2011 sh7080 group 20.4 interrupts 20.4.1 cmt interrupt sources and dtc activation the cmt has channels and each of them to which a different v ector address is allocated has compare match interrupt. when both the interrupt request flag (cmf) and interrupt enable bit (cmie) are set to 1, the corresponding interrupt request is output. when the interrupt is used to activate a cpu interrupt, the priority of channels can be changed by the interrupt controller settings. for details, see section 6, interrupt controller (intc). the data transfer controller (dtc) can be activat ed by an interrupt request. in this case, the priority between channels is fixed. see section 8, data transfer controller (dtc), for details. table 20.2 lists the cmt interrupt sources. table 20.2 interrupt source channel interrupt source interrupt enable bit interrupt flag bit dtc activation priority 0 cmi_0 cmie cmf possible high 1 cmi_1 cmie cmf possible low
section 20 compare match timer (cmt) page 988 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 20.4.2 timing of setting compare match flag when cmcor and cmcnt match, a compare match signal is generated and the cmf bit in cmcsr is set to 1. the compare match signal is generated in the last cycle in which the values match (when the cmcnt value is updated to h'0000). that is, after a match between cmcor and cmcnt, the compare match signal is not generated until the next cmcnt counter clock input. figure 20.4 shows the timing of cmf bit setting. n peripheral operating clock (p ) counter clock cmcnt cmcor compare match signal (n + 1)th clock n 0 figure 20.4 timing of cmf setting 20.4.3 timing of clearing compare match flag the cmf bit in cmcsr is cleared by reading 1 from this bit, then writing 0.
section 20 compare match timer (cmt) r01uh0198ej0500 rev. 5.00 page 989 of 1560 mar 18, 2011 sh7080 group 20.5 usage notes 20.5.1 module standby mode setting the cmt operation can be disabled or enabled using the standby control register. the initial setting is for cmt operation to be halted. access to a register is enabled by clearing module standby mode. for details, refer to section 26, power-down modes. 20.5.2 conflict between write and compa re-match processes of cmcnt when the compare match signal is generated in the t2 cycle while wr iting to cmcnt, clearing cmcnt has priority over writing to it. in this case, cmcnt is not written to. figure 20.5 shows the timing to clear the cmcnt counter. peripheral operating clock (p ) address internal write counter clear cmcnt t1 t2 n h'0000 cmcsr write cycle cmcnt figure 20.5 conflict between write a nd compare-match processes of cmcnt
section 20 compare match timer (cmt) page 990 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 20.5.3 conflict between word-write and count-up processes of cmcnt even when the count-up occurs in the t2 cycle while writing to cmcnt in words, the writing has priority over the count-up. in this case, the count-up is not performed. figure 20.6 shows the timing to write to cmcnt in words. m (cmcnt write data) cmcnt count-up enable peripheral operating clock (p ) address internal write cmcnt t1 t2 n cmcsr write cycle cmcnt figure 20.6 conflict between word-write and count-up processes of cmcnt
section 20 compare match timer (cmt) r01uh0198ej0500 rev. 5.00 page 991 of 1560 mar 18, 2011 sh7080 group 20.5.4 conflict between byte-write and count-up processes of cmcnt even when the count-up occurs in the t2 cycle while writing to cmcnt in bytes, the byte-writing has priority over the count-up. in this case, the count-up is not performed. the byte data on another side, which is not written to, is also not counted and the previous contents remain. figure 20.7 shows the timing when the count-up occurs in the t2 cycle while writing to cmcnt in bytes. m (cmcnt write data) xx cmcnth cmcnt count-up enable cmcnth cmcntl peripheral operating clock (p ) address internal write t1 t2 n cmcsr write cycle figure 20.7 conflict between byte-write and count-up processes of cmcnt 20.5.5 compare match between cmcnt and cmcor do not set the same value in cmcnt and cmcor while cmcnt is not counting. if set, the cmf bit in cmcsr is set to 1 and cmcnt is cleared to h'0000.
section 20 compare match timer (cmt) page 992 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 993 of 1560 mar 18, 2011 sh7080 group section 21 pin function controller (pfc) the pin function controller (pfc) is composed of registers that are used to select the functions of multiplexed pins and assign pins to be inputs or outputs. tables 21.1 to 21.16 list the multiplexed pins of this lsi. tables 21.17 to 21.20 list the pin functions in each operating mode. table 21.1 sh7083 multiplexed pins (port a) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) a pa3 i/o (port) a24 output (bsc) rxd1 input (sci) ? ? pa4 i/o (port) a23 output (bsc) txd1 output (sci) ? ? pa5 i/o (port) a22 output (bsc) dreq1 input (dmac) irq1 input (intc) sck1 i/o (sci) pa7 i/o (port) cs3 output (bsc) tclkb input (mtu2) ? ? pa8 i/o (port) rdwr output (bsc) irq2 input (intc) tclkc input (mtu2) ? pa9 i/o (port) cke output (bsc) irq3 input (intc) tclkd input (mtu2) ? pa10 i/o (port) cs0 output (bsc) poe4 input (poe) ? ? pa12 i/o (port) wrl /dqmll output (bsc) poe6 input (poe) ? ? pa13 i/o (port) wrh /dqmlu output (bsc) poe7 input (poe) ? ? pa14 i/o (port) rd output (bsc) ? ? ? pa15 i/o (port) ck output (cpg) ? ? ? table 21.2 sh7084 multiplexed pins (port a) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) a pa0 i/o (port) cs4 output (bsc) rxd0 input (sci) ? ? pa1 i/o (port) cs5 output (bsc) txd0 output (sci) ? ? pa2 i/o (port) a25 output (bsc) dreq0 input (dmac) irq0 input (intc) sck0 i/o (sci) pa3 i/o (port) a24 output (bsc) rxd1 input (sci) ? ? pa4 i/o (port) a23 output (bsc) txd1 output (sci) ? ? pa5 i/o (port) a22 output (bsc) dreq1 input (dmac) irq1 input (intc) sck1 i/o (sci) pa6 i/o (port) cs2 output (bsc) tclka input (mtu2) ? ? pa7 i/o (port) cs3 output (bsc) tclkb input (mtu2) ? ?
section 21 pin function controller (pfc) page 994 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) a pa8 i/o (port) rdwr output (bsc) irq2 input (intc) tclkc input (mtu2) ? pa9 i/o (port) cke output (bsc) irq3 input (intc) tclkd input (mtu2) ? pa10 i/o (port) cs0 output (bsc) poe4 input (poe) ? ? pa11 i/o (port) cs1 output (bsc) poe5 input (poe) ? ? pa12 i/o (port) wrl /dqmll output (bsc) poe6 input (poe) ? ? pa13 i/o (port) wrh /dqmlu output (bsc) poe7 input (poe) ? ? pa14 i/o (port) rd output (bsc) ? ? ? pa15 i/o (port) ck output (cpg) ? ? ? pa16 i/o (port) ah output (bsc) cke output (bsc) ? ? pa17 i/o (port) wait input (bsc) ? ? ? table 21.3 sh7085 multiplexed pins (port a) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) a pa0 i/o (port) cs4 output (bsc) rxd0 input (sci) ? ? pa1 i/o (port) cs5 / ce1a output (bsc) txd0 output (sci) ? ? pa2 i/o (port) a25 output (bsc) dreq0 input (dmac) irq0 input (intc) sck0 i/o (sci) pa3 i/o (port) a24 output (bsc) rxd1 input (sci) ? ? pa4 i/o (port) a23 output (bsc) txd1 output (sci) ? ? pa5 i/o (port) a22 output (bsc) dreq1 input (dmac) irq1 input (intc) sck1 i/o (sci) pa6 i/o (port) cs2 output (bsc) tclka input (mtu2) ? ? pa7 i/o (port) cs3 output (bsc) tclkb input (mtu2) ? ? pa8 i/o (port) rdwr output (bsc) irq2 input (intc) tclkc input (mtu2) ? pa9 i/o (port) frame output (bsc) cke output (bsc) irq3 input (intc) tclkd input (mtu2) pa10 i/o (port) cs0 output (bsc) poe4 input (poe) ? ? pa11 i/o (port) cs1 output (bsc) poe5 input (poe) ? ? pa12 i/o (port) wrl /dqmll output (bsc) poe6 input (poe) ? ? pa13 i/o (port) wrh / we /dqmlu output (bsc) poe7 input (poe) ? ? pa14 i/o (port) rd output (bsc) ? ? ? pa15 i/o (port) ck output (cpg) ? ? ?
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 995 of 1560 mar 18, 2011 sh7080 group port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) a pa16 i/o (port) wrhh / iciowr / ah / dqmuu output (bsc) cke output (bsc) dreq2 input (dmac) audsync output (aud) * pa17 i/o (port) wait input (bsc) dack2 output (dmac) ? ? pa18 i/o (port) breq input (bsc) tend0 output (dmac) ? ? pa19 i/o (port) back output (bsc) tend1 output (dmac) ? ? pa20 i/o (port) cs4 output (bsc) rasu output (bsc) ? ? pa21 i/o (port) cs5 / ce1a output (bsc) casu output (bsc) tic5u input (mtu2) ? pa22 i/o (port) wrhl / iciord /dqmul output (bsc) tic5v input (mtu2) ? ? pa23 i/o (port) wrhh / iciowr / ah / dqmuu output (bsc) tic5w input (mtu2) ? ? pa24 i/o (port) ce2a output (bsc) dreq3 input (dmac) ? ? pa25 i/o (port) ce2b output (bsc) dack3 output (dmac) poe8 input (poe) ? note: * only in f-ztat version supporting full functions of e10a. table 21.4 sh7086 multiplexed pins (port a) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) a pa0 i/o (port) cs4 output (bsc) rxd0 input (sci) ? ? pa1 i/o (port) cs5 / ce1a output (bsc) txd0 output (sci) ? ? pa2 i/o (port) a25 output (bsc) dreq0 input (dmac) irq0 input (intc) sck0 i/o (sci) pa3 i/o (port) a24 output (bsc) rxd1 input (sci) ? ? pa4 i/o (port) a23 output (bsc) txd1 output (sci) ? ? pa5 i/o (port) a22 output (bsc) dreq1 input (dmac) irq1 input (intc) sck1 i/o (sci) pa6 i/o (port) cs2 output (bsc) tclka input (mtu2) ? ? pa7 i/o (port) cs3 output (bsc) tclkb input (mtu2) ? ? pa8 i/o (port) rdwr output (bsc) irq2 input (intc) tclkc input (mtu2) ? pa9 i/o (port) frame output (bsc) cke output (bsc) irq3 input (intc) tclkd input (mtu2) pa10 i/o (port) cs0 output (bsc) poe4 input (poe) ? ? pa11 i/o (port) cs1 output (bsc) poe5 input (poe) ? ?
section 21 pin function controller (pfc) page 996 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) a pa12 i/o (port) wrl /dqmll output (bsc) poe6 input (poe) ? ? pa13 i/o (port) wrh /dqmlu/ we output (bsc) poe7 input (poe) ? ? pa14 i/o (port) rd output (bsc) ? ? ? pa15 i/o (port) ck output (cpg) ? ? ? pa16 i/o (port) wrhh / iciowr / ah / dqmuu output (bsc) cke output (bsc) dreq2 input (dmac) audsync output (aud) * pa17 i/o (port) wait input (bsc) dack2 output (dmac) ? ? pa18 i/o (port) breq input (bsc) tend0 output (dmac) ? ? pa19 i/o (port) back output (bsc) tend1 output (dmac) ? ? pa20 i/o (port) cs4 output (bsc) rasu output (bsc) ? ? pa21 i/o (port) cs5 / ce1a output (bsc) casu output (bsc) tic5u input (mtu2) ? pa22 i/o (port) wrhl / iciord /dqmul output (bsc) tic5v input (mtu2) ? ? pa23 i/o (port) wrhh / iciowr / ah / dqmuu output (bsc) tic5w input (mtu2) ? ? pa24 i/o (port) ce2a output (bsc) dreq3 input (dmac) ? ? pa25 i/o (port) ce2b output (bsc) dack3 output (dmac) poe8 input (poe) ? pa26 i/o (port) a26 output (bsc) irq0 input (intc) ? ? pa27 i/o (port) a27 output (bsc) irq1 input (intc) ? ? pa28 i/o (port) a28 output (bsc) irq2 input (intc) ? ? pa29 i/o (port) a29 output (bsc) irq3 input (intc) ? ? note: * only in f-ztat version supporting full functions of e10a.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 997 of 1560 mar 18, 2011 sh7080 group table 21.5 sh7083 multiplexed pins (port b) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) b pb0 i/o (port) a16 output (bsc) tic5ws input (mtu2s) ? ? pb1 i/o (port) a17 output (bsc) tic5w input (mtu2) ? ? pb2 i/o (port) irq0 input (intc) poe0 input (poe) ? ? pb4 i/o (port) rasl output (bsc) irq2 input (intc) poe2 input (poe) ? pb5 i/o (port) casl output (bsc) irq3 input (intc) poe3 input (poe) ? pb6 i/o (port) a18 output (bsc) back output (bsc) irq4 input (intc) rxd0 input (sci) pb7 i/o (port) a19 output (bsc) breq input (bsc) irq5 input (intc) txd0 output (sci) pb8 i/o (port) a20 output (bsc) wait input (bsc) irq6 input (intc) sck0 i/o (sci) pb9 i/o (port) a21 output (bsc) irq7 input (intc) adtrg input (a/d) poe8 input (poe) table 21.6 sh7084/sh7085/sh7086 multiplexed pins (port b) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) b pb0 i/o (port) a16 output (bsc) tic5ws input (mtu2s) ? ? pb1 i/o (port) a17 output (bsc) tic5w input (mtu2) ? ? pb2 i/o (port) irq0 input (intc) poe0 input (poe) scl i/o (i 2 c2) ? pb3 i/o (port) irq1 input (intc) poe1 input (poe) sda i/o (i 2 c2) ? pb4 i/o (port) rasl output (bsc) irq2 input (intc) poe2 input (poe) ? pb5 i/o (port) casl output (bsc) irq3 input (intc) poe3 input (poe) ? pb6 i/o (port) a18 output (bsc) back output (bsc) irq4 input (intc) rxd0 input (sci) pb7 i/o (port) a19 output (bsc) breq input (bsc) irq5 input (intc) txd0 output (sci) pb8 i/o (port) a20 output (bsc) wait input (bsc) irq6 input (intc) sck0 i/o (sci) pb9 i/o (port) a21 output (bsc) irq7 input (intc) adtrg input (a/d) poe8 input (poe)
section 21 pin function controller (pfc) page 998 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.7 sh7083/sh7084/sh7085 multiplexed pins (port c) port function 1 (related module) function 2 (related module) c pc0 i/o (port) a0 output (bsc) pc1 i/o (port) a1 output (bsc) pc2 i/o (port) a2 output (bsc) pc3 i/o (port) a3 output (bsc) pc4 i/o (port) a4 output (bsc) pc5 i/o (port) a5 output (bsc) pc6 i/o (port) a6 output (bsc) pc7 i/o (port) a7 output (bsc) pc8 i/o (port) a8 output (bsc) pc9 i/o (port) a9 output (bsc) pc10 i/o (port) a10 output (bsc) pc11 i/o (port) a11 output (bsc) pc12 i/o (port) a12 output (bsc) pc13 i/o (port) a13 output (bsc) pc14 i/o (port) a14 output (bsc) pc15 i/o (port) a15 output (bsc) table 21.8 sh7086 multiplexed pins (port c) port function 1 (related module) function 2 (related module) c pc0 i/o (port) a0 output (bsc) pc1 i/o (port) a1 output (bsc) pc2 i/o (port) a2 output (bsc) pc3 i/o (port) a3 output (bsc) pc4 i/o (port) a4 output (bsc) pc5 i/o (port) a5 output (bsc) pc6 i/o (port) a6 output (bsc) pc7 i/o (port) a7 output (bsc) pc8 i/o (port) a8 output (bsc) pc9 i/o (port) a9 output (bsc) pc10 i/o (port) a10 output (bsc) pc11 i/o (port) a11 output (bsc)
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 999 of 1560 mar 18, 2011 sh7080 group port function 1 (related module) function 2 (related module) c pc12 i/o (port) a12 output (bsc) pc13 i/o (port) a13 output (bsc) pc14 i/o (port) a14 output (bsc) pc15 i/o (port) a15 output (bsc) pc18 i/o (port) a18 output (bsc) pc19 i/o (port) a19 output (bsc) pc20 i/o (port) a20 output (bsc) pc21 i/o (port) a21 output (bsc) pc22 i/o (port) a22 output (bsc) pc23 i/o (port) a23 output (bsc) pc24 i/o (port) a24 output (bsc) pc25 i/o (port) a25 output (bsc) table 21.9 sh7083/sh7084 multiplexed pins (port d) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) d pd0 i/o (port) d0 i/o (bsc) ? ? pd1 i/o (port) d1 i/o (bsc) ? ? pd2 i/o (port) d2 i/o (bsc) tic5u input (mtu2) ? pd3 i/o (port) d3 i/o (bsc) tic5v input (mtu2) ? pd4 i/o (port) d4 i/o (bsc) tic5w input (mtu2) ? pd5 i/o (port) d5 i/o (bsc) tic5us input (mtu2s) ? pd6 i/o (port) d6 i/o (bsc) tic5vs input (mtu2s) ? pd7 i/o (port) d7 i/o (bsc) tic5ws input (mtu2s) ? pd8 i/o (port) d8 i/o (bsc) tioc3as i/o (mtu2s) audata0 output (aud) * pd9 i/o (port) d9 i/o (bsc) tioc3bs i/o (mtu2s) audata1 output (aud) * pd10 i/o (port) d10 i/o (bsc) tioc3cs i/o (mtu2s) audata2 output (aud) * pd11 i/o (port) d11 i/o (bsc) tioc3ds i/o (mtu2s) audata3 output (aud) * pd12 i/o (port) d12 i/o (bsc) tioc4as i/o (mtu2s) ? pd13 i/o (port) d13 i/o (bsc) tioc4bs i/o (mtu2s) ? pd14 i/o (port) d14 i/o (bsc) tioc4cs i/o (mtu2s) audck output (aud) * pd15 i/o (port) d15 i/o (bsc) tioc4ds i/o (mtu2s) audsync output (aud) * note: * only in f-ztat version supporting full functions of e10a.
section 21 pin function controller (pfc) page 1000 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.10 sh7085/sh7086 multiplexed pins (port d) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) d pd0 i/o (port) d0 i/o (bsc) ? ? ? pd1 i/o (port) d1 i/o (bsc) ? ? ? pd2 i/o (port) d2 i/o (bsc) tic5u input (mtu2) ? ? pd3 i/o (port) d3 i/o (bsc) tic5v input (mtu2) ? ? pd4 i/o (port) d4 i/o (bsc) tic5w input (mtu2) ? ? pd5 i/o (port) d5 i/o (bsc) tic5us input (mtu2s) ? ? pd6 i/o (port) d6 i/o (bsc) tic5vs input (mtu2s) ? ? pd7 i/o (port) d7 i/o (bsc) tic5ws input (mtu2s) ? ? pd8 i/o (port) d8 i/o (bsc) tioc3as i/o (mtu2s) ? ? pd9 i/o (port) d9 i/o (bsc) tioc3bs i/o (mtu2s) ? ? pd10 i/o (port) d10 i/o (bsc) tioc3cs i/o (mtu2s) ? ? pd11 i/o (port) d11 i/o (bsc) tioc3ds i/o (mtu2s) ? ? pd12 i/o (port) d12 i/o (bsc) tioc4as i/o (mtu2s) ? ? pd13 i/o (port) d13 i/o (bsc) tioc4bs i/o (mtu2s) ? ? pd14 i/o (port) d14 i/o (bsc) tioc4cs i/o (mtu2s) ? ? pd15 i/o (port) d15 i/o (bsc) tioc4ds i/o (mtu2s) ? ? pd16 i/o (port) d16 i/o (bsc) irq0 input (intc) poe4 input (poe) audata0 output (aud) * pd17 i/o (port) d17 i/o (bsc) irq1 input (intc) poe5 input (poe) audata1 output (aud) * pd18 i/o (port) d18 i/o (bsc) irq2 input (intc) poe6 input (poe) audata2 output (aud) * pd19 i/o (port) d19 i/o (bsc) irq3 input (intc) poe7 input (poe) audata3 output (aud) *
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1001 of 1560 mar 18, 2011 sh7080 group port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) d pd20 i/o (port) d20 i/o (bsc) irq4 input (intc) tic5ws input (mtu2s) ? pd21 i/o (port) d21 i/o (bsc) irq5 input (intc) tic5vs input (mtu2s) ? pd22 i/o (port) d22 i/o (bsc) irq6 input (intc) tic5us input (mtu2s) audck output (aud) * pd23 i/o (port) d23 i/o (bsc) irq7 input (intc) audsync output (aud) * ? pd24 i/o (port) d24 i/o (bsc) dreq0 input (dmac) tioc4ds i/o (mtu2s) ? pd25 i/o (port) d25 i/o (bsc) dreq1 input (dmac) tioc4cs i/o (mtu2s) ? pd26 i/o (port) d26 i/o (bsc) dack0 output (dmac) tioc4bs i/o (mtu2s) ? pd27 i/o (port) d27 i/o (bsc) dack1 output (dmac) tioc4as i/o (mtu2s) ? pd28 i/o (port) d28 i/o (bsc) cs2 output (bsc) tioc3ds i/o (mtu2s) ? pd29 i/o (port) d29 i/o (bsc) cs3 output (bsc) tioc3bs i/o (mtu2s) ? pd30 i/o (port) d30 i/o (bsc) tioc3cs i/o (mtu2s) irqout output (intc) ? pd31 i/o (port) d31 i/o (bsc) tioc3as i/o (mtu2s) adtrg input (a/d) ? note: * only in f-ztat version supporting full functions of e10a.
section 21 pin function controller (pfc) page 1002 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.11 sh7083 multiplexed pins (port e) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) function 6 (related module) e pe0 i/o (port) dreq0 input (dmac) tioc0a i/o (mtu2) tms input (h-udi) * ? ? pe1 i/o (port) tend0 output (dmac) tioc0b i/o (mtu2) trst input (h-udi) * ? ? pe2 i/o (port) dreq1 input (dmac) tioc0c i/o (mtu2) tdi input (h-udi) * ? ? pe3 i/o (port) tend1 output (dmac) tioc0d i/o (mtu2) tdo output (h-udi) * ? ? pe4 i/o (port) tioc1a i/o (mtu2) rx d3 input (scif) tck input (h-udi) * ? ? pe6 i/o (port) cs7 output (bsc) tioc2a i/o (mtu2) sck3 i/o (scif) ? ? pe7 i/o (port) bs output (bsc) tioc2b i/o (mtu2) ubctrg output (ubc) rxd2 input (sci) ssi i/o (ssu) pe8 i/o (port) tioc3a i/o (mtu2) sck2 i/o (sci) ssck i/o (ssu) ? ? pe10 i/o (port) tioc3c i/o (mtu2) txd2 output (sci) sso i/o (ssu) ? ? pe12 i/o (port) tioc4a i/o (mtu2) txd3 output (scif) scs i/o (ssu) ? ? pe13 i/o (port) tioc4b i/o (mtu2) mres input (intc) asebrkak output (e10a) * asebrk input (e10a) * ? pe14 i/o (port) dack0 output (dmac) tioc4c i/o (mtu2) ? ? ? pe15 i/o (port) cke output (bsc) dack1 output (dmac) tioc4d i/o (mtu2) irqout output (intc) ? note: * only in f-ztat version.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1003 of 1560 mar 18, 2011 sh7080 group table 21.12 sh7084 multiplexed pins (port e) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) function 6 (related module) e pe0 i/o (port) dreq0 input (dmac) tioc0a i/o (mtu2) tms input (h-udi) * ? ? pe1 i/o (port) tend0 output (dmac) tioc0b i/o (mtu2) trst input (h-udi) * ? ? pe2 i/o (port) dreq1 input (dmac) tioc0c i/o (mtu2) tdi input (h-udi) * ? ? pe3 i/o (port) tend1 output (dmac) tioc0d i/o (mtu2) tdo output (h-udi) * ? ? pe4 i/o (port) tioc1a i/o (mtu2) rx d3 input (scif) tck input (h-udi) * ? ? pe5 i/o (port) cs6 output (bsc) tioc1b i/o (mtu2) txd3 output (scif) asebrkak output (e10a) * asebrk input (e10a) * pe6 i/o (port) cs7 output (bsc) tioc2a i/o (mtu2) sck3 i/o (scif) ? ? pe7 i/o (port) bs output (bsc) tioc2b i/o (mtu2) ubctrg output (ubc) rxd2 input (sci) ssi i/o (ssu) pe8 i/o (port) tioc3a i/o (mtu2) sck2 i/o (sci) ssck i/o (ssu) ? ? pe9 i/o (port) tioc3b i/o (mtu2) sck3 i/o (scif) rts3 output (scif) ? ? pe10 i/o (port) tioc3c i/o (mtu2) txd2 output (sci) sso i/o (ssu) ? ? pe11 i/o (port) tioc3d i/o (mtu2) rxd3 input (scif) cts3 input (scif) ? ? pe12 i/o (port) tioc4a i/o (mtu2) txd3 output (scif) scs i/o (ssu) ? ? pe13 i/o (port) tioc4b i/o (mtu2) mres input (intc) ? ? ? pe14 i/o (port) ah output (bsc) dack0 output (dmac) tioc4c i/o (mtu2) ? ? pe15 i/o (port) cke output (bsc) dack1 output (dmac) tioc4d i/o (mtu2) irqout output (intc) ? note: * only in f-ztat version.
section 21 pin function controller (pfc) page 1004 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.13 sh7085 multiplexed pins (port e) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) function 6 (related module) e pe0 i/o (port) dreq0 input (dmac) tioc0a i/o (mtu2) audck output (aud) * 1 ? ? pe1 i/o (port) tend0 output (dmac) tioc0b i/o (mtu2) ? ? ? pe2 i/o (port) dreq1 input (dmac) tioc0c i/o (mtu2) ? ? ? pe3 i/o (port) tend1 output (dmac) tioc0d i/o (mtu2) audata3 output (aud) * 1 ? ? pe4 i/o (port) iois16 input (bsc) tioc1a i/o (mtu2) rxd3 input (scif) audata2 output (aud) * 1 ? pe5 i/o (port) cs6 / ce1b output (bsc) tioc1b i/o (mtu2) txd3 output (scif) audata1 output (aud) * 1 ? pe6 i/o (port) cs7 output (bsc) tioc2a i/o (mtu2) sck3 i/o (scif) audata0 output (aud) * 1 ? pe7 i/o (port) bs output (bsc) tioc2b i/o (mtu2) ubctrg output (ubc) rxd2 input (sci) ssi i/o (ssu) pe8 i/o (port) tioc3a i/o (mtu2) sck2 i/o (sci) ssck i/o (ssu) tms input (h-udi) * 2 ? pe9 i/o (port) tioc3b i/o (mtu2) sck3 i/o (scif) rts3 output (scif) trst input (h-udi) * 2 ? pe10 i/o (port) tioc3c i/o (mtu2) txd2 out put (sci) sso i/o (ssu) tdi input (h-udi) * 2 ? pe11 i/o (port) tioc3d i/o (mtu2) rxd3 input (scif) cts3 input (scif) tdo output (h-udi) * 2 ? pe12 i/o (port) tioc4a i/o (mtu2) txd3 output (scif) scs i/o (ssu) tck input (h-udi) * 2 ? pe13 i/o (port) tioc4b i/o (mtu2) mres input (intc) asebrkak output (e10a) * 2 asebrk input (e10a) * 2 ? pe14 i/o (port) wrhh / iciowr / ah /dqmuu output (bsc) dack0 output (dmac) tioc4c i/o (mtu2) ? ? pe15 i/o (port) cke output (bsc) dack1 output (dmac) tioc4d i/o (mtu2) irqout output (intc) ? notes: 1. only in f-ztat version supporting full functions of e10a. 2. only in f-ztat version.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1005 of 1560 mar 18, 2011 sh7080 group table 21.14 sh7086 multiplexed pins (port e) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) function 6 (related module) e pe0 i/o (port) dreq0 input (dmac) tioc0a i/o (mtu2) audck output (aud) * 1 ? ? pe1 i/o (port) tend0 output (dmac) tioc0b i/o (mtu2) ? ? ? pe2 i/o (port) dreq1 input (dmac) tioc0c i/o (mtu2) ? ? ? pe3 i/o (port) tend1 output (dmac) tioc0d i/o (mtu2) audata3 output (aud) * 1 ? ? pe4 i/o (port) iois16 input (bsc) tioc1a i/o (mtu2) rxd3 input (scif) audata2 output (aud) * 1 ? pe5 i/o (port) cs6 / ce1b output (bsc) tioc1b i/o (mtu2) txd3 output (scif) audata1 output (aud) * 1 ? pe6 i/o (port) cs7 output (bsc) tioc2a i/o (mtu2) sck3 i/o (scif) audata0 output (aud) * 1 ? pe7 i/o (port) bs output (bsc) tioc2b i/o (mtu2) ubctrg output (ubc) rxd2 input (sci) ssi i/o (ssu) pe8 i/o (port) tioc3a i/o (mtu2) sck2 i/o (sci) ssck i/o (ssu) tms input (h-udi) * 2 ? pe9 i/o (port) tioc3b i/o (mtu2) sck3 i/o (scif) rts3 output (scif) trst input (h-udi) * 2 ? pe10 i/o (port) tioc3c i/o (mtu2) txd2 out put (sci) sso i/o (ssu) tdi input (h-udi) * 2 ? pe11 i/o (port) tioc3d i/o (mtu2) rxd3 input (scif) cts3 input (scif) tdo output (h-udi) * 2 ? pe12 i/o (port) tioc4a i/o (mtu2) txd3 output (scif) scs i/o (ssu) tck input (h-udi) * 2 ? pe13 i/o (port) tioc4b i/o (mtu2) mres input (intc) asebrkak output (e10a) * 2 asebrk input (e10a) * 2 ? pe14 i/o (port) wrhh / iciowr / ah /dqmuu output (bsc) dack0 output (dmac) tioc4c i/o (mtu2) ? ? pe15 i/o (port) cke output (bsc) dack1 output (dmac) tioc4d i/o (mtu2) irqout output (intc) ? pe16 i/o (port) cs8 output (bsc) tioc3bs i/o (mtu2s) ? ? ? pe17 i/o (port) tioc3ds i/o (mtu2s) ? ? ? ?
section 21 pin function controller (pfc) page 1006 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) function 5 (related module) function 6 (related module) e pe18 i/o (port) tioc4as i/o (mtu2s) ? ? ? ? pe19 i/o (port) tioc4bs i/o (mtu2s) ? ? ? ? pe20 i/o (port) tioc4cs i/o (mtu2s) ? ? ? ? pe21 i/o (port) tioc4ds i/o (mtu2s) ? ? ? ? notes: 1. only in f-ztat version supporting full functions of e10a. 2. only in f-ztat version. table 21.15 sh7083/sh7084/sh7085 multiplexed pins (port f) port function 1 (related module) function 2 (related module) f pf0 input (port) an0 input (a/d) pf1 input (port) an1 input (a/d) pf2 input (port) an2 input (a/d) pf3 input (port) an3 input (a/d) pf4 input (port) an4 input (a/d) pf5 input (port) an5 input (a/d) pf6 input (port) an6 input (a/d) pf7 input (port) an7 input (a/d) note: during a/d conversion, the an input function is enabled.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1007 of 1560 mar 18, 2011 sh7080 group table 21.16 sh7086 multiplexed pins (port f) port function 1 (related module) function 2 (related module) f pf0 input (port) an0 input (a/d) pf1 input (port) an1 input (a/d) pf2 input (port) an2 input (a/d) pf3 input (port) an3 input (a/d) pf4 input (port) an4 input (a/d) pf5 input (port) an5 input (a/d) pf6 input (port) an6 input (a/d) pf7 input (port) an7 input (a/d) pf8 input (port) an8 input (a/d) pf9 input (port) an9 input (a/d) pf10 input (port) an10 input (a/d) pf11 input (port) an11 input (a/d) pf12input (port) an12 input (a/d) pf13 input (port) an13 input (a/d) pf14 input (port) an14 input (a/d) pf15 input (port) an15 input (a/d) note: during a/d conversion, the an input function is enabled.
section 21 pin function controller (pfc) page 1008 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.17 sh7083 pin functions in each operating mode (1) pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 19, 32, 55, 71, 94 vcc vcc vcc vcc 3, 24, 33, 52, 62, 81, 93 vss vss vss vss 20, 72 v cl v cl v cl v cl 92 avcc avcc avcc avcc 88 avss avss avss avss 91 avref avref avref avref 73 pllvss pllvss pllvss pllvss 65 extal extal extal extal 63 xtal xtal xtal xtal 66 md0 md0 md0 md0 64 md1 md1 md1 md1 68 fwe fwe fwe fwe 75 res res res res 29 wdtovf wdtovf wdtovf wdtovf 67 nmi nmi nmi nmi 27 asemd0 asemd0 asemd0 asemd0 40 pa3 pa3/a24/rxd1 pa3 pa3/a24/rxd1 39 pa4 pa4/a23/txd1 pa4 pa4/a23/txd1 38 pa5 pa5/a22/dreq1/irq1/sck1 pa5 pa5/a22/dreq1/irq1/sck1 37 pa7 pa7/ cs3 /tclkb pa7 pa7/ cs3 /tclkb 36 pa8 pa8/rdwr/irq2/tclkc pa8 pa8/rdwr/irq2/tclkc 35 pa9 pa9/cke/irq3/tclkd pa9 pa9/cke/irq3/tclkd 34 cs0 pa10/ cs0 / poe4 cs0 pa10/ cs0 / poe4 31 wrl pa12/ wrl /dqmll/ poe6 wrl pa12/ wrl /dqmll/ poe6 30 wrh pa13/ wrh /dqmlu/ poe7 wrh pa13/ wrh /dqmlu/ poe7 28 rd pa14/ rd rd pa14/ rd
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1009 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 74 ck pa15/ck ck pa15/ck 22 a16 pb0/a16/tic5ws a16 pb0/a16/tic5ws 23 a17 pb1/a17/tic5w a17 pb1/a17/tic5w 25 pb2 pb2/irq0/ poe0 pb2 pb2/irq0/ poe0 70 pb4 pb4/ rasl /irq2/ poe2 pb4 pb4/ rasl /irq2/ poe2 69 pb5 pb5/ casl /irq3/ poe3 pb5 pb5/ casl /irq3/ poe3 43 pb6 pb6/a18/ back /irq4/rxd0 pb6 pb6/a18/ back /irq4/rxd0 42 pb7 pb7/a19/ breq /irq5/txd0 pb7 pb7/a19/ breq /irq5/txd0 41 pb8 pb8/a20/ wait /irq6/sck0 pb8 pb8/a20/ wait /irq6/sck0 26 pb9 pb9/a21/irq7/ adtrg / poe8 pb9 pb9/a21/irq7/ adtrg / poe8 4 a0 pc0/a0 a0 pc0/a0 5 a1 pc1/a1 a1 pc1/a1 6 a2 pc2/a2 a2 pc2/a2 7 a3 pc3/a3 a3 pc3/a3 8 a4 pc4/a4 a4 pc4/a4 9 a5 pc5/a5 a5 pc5/a5 10 a6 pc6/a6 a6 pc6/a6 11 a7 pc7/a7 a7 pc7/a7 12 a8 pc8/a8 a8 pc8/a8 13 a9 pc9/a9 a9 pc9/a9 14 a10 pc10/a10 a10 pc10/a10 15 a11 pc11/a11 a11 pc11/a11 16 a12 pc12/a12 a12 pc12/a12 17 a13 pc13/a13 a13 pc13/a13 18 a14 pc14/a14 a14 pc14/a14 21 a15 pc15/a15 a15 pc15/a15 61 d0 pd0/d0 d0 pd0/d0 60 d1 pd1/d1 d1 pd1/d1 59 d2 pd2/d2/tic5u d2 pd2/d2/tic5u
section 21 pin function controller (pfc) page 1010 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 58 d3 pd3/d3/tic5v d3 pd3/d3/tic5v 57 d4 pd4/d4/tic5w d4 pd4/d4/tic5w 56 d5 pd5/d5/tic5us d5 pd5/d5/tic5us 54 d6 pd6/d6/tic5vs d6 pd6/d6/tic5vs 53 d7 pd7/d7/tic5ws d7 pd7/d7/tic5ws 51 pd8/(audata0 * 2 ) pd8/d8/tioc3as d8/(audata0 * 2 ) pd8/d8/tioc3as 50 pd9/(audata1 * 2 ) pd9/d9/tioc3bs d9/(audata1 * 2 ) pd9/d9/tioc3bs 49 pd10 /(audata2 * 2 ) pd10/d10/tioc3cs d10/(audata2 * 2 ) pd10/d10/tioc3cs 48 pd11 /(audata3 * 2 ) pd11/d11/tioc3ds d11/(audata3 * 2 ) pd11/d11/tioc3ds 47 pd12 pd12/d12/tioc4as d12 pd12/d12/tioc4as 46 pd13 pd13/d13/tioc4bs d13 pd13/d13/tioc4bs 45 pd14/(audck * 2 ) pd14/d14/tioc4cs d14/(audck * 2 ) pd14/d14/tioc4cs 44 pd15 /( audsync * 2 ) pd15/d15/tioc4ds d15/( audsync * 2 ) pd15/d15/tioc4ds 76 pe0/(tms * 1 ) pe0/dreq0/tioc0a pe0/(tms * 1 ) pe0/dreq0/tioc0a 77 pe1/( trst * 1 ) pe1/tend0/tioc0b pe1/( trst * 1 ) pe1/tend0/tioc0b 78 pe2/(tdi * 1 ) pe2/dreq1/tioc0c pe2/(tdi * 1 ) pe2/dreq1/tioc0c 79 pe3/(tdo * 1 ) pe3/tend1/tioc0d pe3/(tdo * 1 ) pe3/tend1/tioc0d 80 pe4/(tck * 1 ) pe4/tioc1a/rxd3 pe4/(tck * 1 ) pe4/tioc1a/rxd3 95 pe6 pe6/ cs7 /tioc2a/sck3 pe6 pe6/ cs7 /tioc2a/sck3 96 pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi 97 pe8 pe8/tioc3a/sck2/ssck pe8 pe8/tioc3a/sck2/ssck 98 pe10 pe10/tioc3c/txd2/sso pe10 pe10/tioc3c/txd2/sso 99 pe12 pe12/tioc4a/txd3/ scs pe12 pe12/tioc4a/txd3/ scs 100 pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres 1 pe14 pe14/dack0/tioc4c pe14 pe14/dack0/tioc4c
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1011 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 2 pe15 pe15/cke/dack1/tioc4d / irqout pe15 pe15/cke/dack1/tioc4d / irqout 82 pf0/an0 pf0/an0 pf0/an0 pf0/an0 83 pf1/an1 pf1/an1 pf1/an1 pf1/an1 84 pf2/an2 pf2/an2 pf2/an2 pf2/an2 85 pf3/an3 pf3/an3 pf3/an3 pf3/an3 86 pf4/an4 pf4/an4 pf4/an4 pf4/an4 87 pf5/an5 pf5/an5 pf5/an5 pf5/an5 89 pf6/an6 pf6/an6 pf6/an6 pf6/an6 90 pf7/an7 pf7/an7 pf7/an7 pf7/an7 notes: 1. fixed to tms, trst , tdi, tdo, tck, and asebrkak / asebrk when using the e10a (in asemd0 = low). 2. only in f-ztat version supporting full functions of e10a. fixed as aud pins when using the aud function of the e10a.
section 21 pin function controller (pfc) page 1012 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.17 sh7083 pin functions in each operating mode (2) pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 19, 32, 55, 71, 94 vcc vcc vcc vcc 3, 24, 33, 52, 62, 81, 93 vss vss vss vss 20, 72 v cl v cl v cl v cl 92 avcc avcc avcc avcc 88 avss avss avss avss 91 avref avref avref avref 73 pllvss pllvss pllvss pllvss 65 extal extal extal extal 63 xtal xtal xtal xtal 66 md0 md0 md0 md0 64 md1 md1 md1 md1 68 fwe fwe fwe fwe 75 res res res res 29 wdtovf wdtovf wdtovf wdtovf 67 nmi nmi nmi nmi 27 asemd0 asemd0 asemd0 asemd0 40 pa3 pa3/a24/rxd1 pa3 pa3/rxd1 39 pa4 pa4/a23/txd1 pa4 pa4/txd1 38 pa5 pa5/a22/dreq1/irq1/sck1 pa5 pa5/dreq1/irq1/sck1 37 pa7 pa7/ cs3 /tclkb pa7 pa7/tclkb 36 pa8 pa8/rdwr/irq2/tclkc pa8 pa8/irq2/tclkc 35 pa9 pa9/cke/irq3/tclkd pa9 pa9/irq3/tclkd 34 pa10 pa10/ cs0 / poe4 pa10 pa10/ poe4 31 pa12 pa12/ wrl /dqmll/ poe6 pa12 pa12/ poe6 30 pa13 pa13/ wrh /dqmlu/ poe7 pa13 pa13/ poe7 28 pa14 pa14/ rd pa14 pa14
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1013 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 74 ck pa15/ck pa15 pa15 22 pb0 pb0/a16/tic5ws pb0 pb0/tic5ws 23 pb1 pb1/a17/tic5w pb1 pb1/tic5w 25 pb2 pb2/irq0/ poe0 pb2 pb2/irq0/ poe0 70 pb4 pb4/ rasl /irq2/ poe2 pb4 pb4/irq2/ poe2 69 pb5 pb5/ casl /irq3/ poe3 pb5 pb5/irq3/ poe3 43 pb6 pb6/a18/ back /irq4/rxd0 pb6 pb6/irq4/rxd0 42 pb7 pb7/a19/ breq /irq5/txd0 pb7 pb7/irq5/txd0 41 pb8 pb8/a20/ wait /irq6/sck0 pb8 pb8/irq6/sck0 26 pb9 pb9/a21/irq7/ adtrg / poe8 pb9 pb9/irq7/ adtrg / poe8 4 pc0 pc0/a0 pc0 pc0 5 pc1 pc1/a1 pc1 pc1 6 pc2 pc2/a2 pc2 pc2 7 pc3 pc3/a3 pc3 pc3 8 pc4 pc4/a4 pc4 pc4 9 pc5 pc5/a5 pc5 pc5 10 pc6 pc6/a6 pc6 pc6 11 pc7 pc7/a7 pc7 pc7 12 pc8 pc8/a8 pc8 pc8 13 pc9 pc9/a9 pc9 pc9 14 pc10 pc10/a10 pc10 pc10 15 pc11 pc11/a11 pc11 pc11 16 pc12 pc12/a12 pc12 pc12 17 pc13 pc13/a13 pc13 pc13 18 pc14 pc14/a14 pc14 pc14 21 pc15 pc15/a15 pc15 pc15 61 pd0 pd0/d0 pd0 pd0 60 pd1 pd1/d1 pd1 pd1 59 pd2 pd2/d2/tic5u pd2 pd2/tic5u
section 21 pin function controller (pfc) page 1014 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 58 pd3 pd3/d3/tic5v pd3 pd3/tic5v 57 pd4 pd4/d4/tic5w pd4 pd4/tic5w 56 pd5 pd5/d5/tic5us pd5 pd5/tic5us 54 pd6 pd6/d6/tic5vs pd6 pd6/tic5vs 53 pd7 pd7/d7/tic5ws pd7 pd7/tic5ws 51 pd8/(audata0 * 2 ) pd8/d8/tioc3as d8/(audata0 * 2 ) pd8/tioc3as 50 pd9/(audata1 * 2 ) pd9/d9/tioc3bs d9/(audata1 * 2 ) pd9/tioc3bs 49 pd10 /(audata2 * 2 ) pd10/d10/tioc3cs d10/(audata2 * 2 ) pd10/tioc3cs 48 pd11 /(audata3 * 2 ) pd11/d11/tioc3ds d11/(audata3 * 2 ) pd11/tioc3ds 47 pd12 pd12/d12/tioc4as d12 pd12/tioc4as 46 pd13 pd13/d13/tioc4bs d13 pd13/tioc4bs 45 pd14/(audck * 2 ) pd14/d14/tioc4cs d14/(audck * 2 ) pd14/tioc4cs 44 pd15 /( audsync * 2 ) pd15/d15/tioc4ds d15/( audsync * 2 ) pd15/tioc4ds 76 pe0/(tms * 1 ) pe0/dreq0/tioc0a pe0/(tms * 1 ) pe0/dreq0/tioc0a 77 pe1/( trst * 1 ) pe1/tend0/tioc0b pe1/( trst * 1 ) pe1/tioc0b 78 pe2/(tdi * 1 ) pe2/dreq1/tioc0c pe2/(tdi * 1 ) pe2/dreq1/tioc0c 79 pe3/(tdo * 1 ) pe3/tend1/tioc0d pe3/(tdo * 1 ) pe3/tioc0d 80 pe4/(tck * 1 ) pe4/tioc1a/rxd3 pe4/(tck * 1 ) pe4/tioc1a/rxd3 95 pe6 pe6/ cs7 /tioc2a/sck3 pe6 pe6/tioc2a/sck3 96 pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe7 pe7/tioc2b/ ubctrg /rxd2/ssi 97 pe8 pe8/tioc3a/sck2/ssck pe8 pe8/tioc3a/sck2/ssck 98 pe10 pe10/tioc3c/txd2/sso pe10 pe10/tioc3c/txd2/sso 99 pe12 pe12/tioc4a/txd3/ scs pe12 pe12/tioc4a/txd3/ scs 100 pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres 1 pe14 pe14/dack0/tioc4c pe14 pe14/tioc4c
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1015 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 2 pe15 pe15/cke/dack1/tioc4d / irqout pe15 pe15/tioc4d/ irqout 82 pf0/an0 pf0/an0 pf0/an0 pf0/an0 83 pf1/an1 pf1/an1 pf1/an1 pf1/an1 84 pf2/an2 pf2/an2 pf2/an2 pf2/an2 85 pf3/an3 pf3/an3 pf3/an3 pf3/an3 86 pf4/an4 pf4/an4 pf4/an4 pf4/an4 87 pf5/an5 pf5/an5 pf5/an5 pf5/an5 89 pf6/an6 pf6/an6 pf6/an6 pf6/an6 90 pf7/an7 pf7/an7 pf7/an7 pf7/an7 notes: 1. fixed to tms, trst , tdi, tdo, tck, and asebrkak / asebrk when using the e10a (in asemd0 = low). 2. only in f-ztat version supporting full functions of e10a. fixed as aud pins when using the aud function of the e10a.
section 21 pin function controller (pfc) page 1016 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.18 sh7084 pin functions in each operating mode (1) pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 21, 37, 65, 80, 103 vcc vcc vcc vcc 3, 27, 39, 55, 61, 71, 90, 101 vss vss vss vss 23, 81, 109 v cl v cl v cl v cl 100 avcc avcc avcc avcc 97 avss avss avss avss 82 pllvss pllvss pllvss pllvss 74 extal extal extal extal 72 xtal xtal xtal xtal 75 md0 md0 md0 md0 73 md1 md1 md1 md1 77 fwe fwe fwe fwe 84 res res res res 35 wdtovf wdtovf wdtovf wdtovf 76 nmi nmi nmi nmi 33 asemd0 asemd0 asemd0 asemd0 51 pa0 pa0/ cs4 /rxd0 pa0 pa0/ cs4 /rxd0 50 pa1 pa1/ cs5 /txd0 pa1 pa1/ cs5 /txd0 49 pa2 pa2/a25/dreq0/irq0/sck0 pa2 pa2/a25/dreq0/irq0/sck0 48 pa3 pa3/a24/rxd1 pa3 pa3/a24/rxd1 47 pa4 pa4/a23/txd1 pa4 pa4/a23/txd1 46 pa5 pa5/a22/dreq1/irq1/sck1 pa5 pa5/a22/dreq1/irq1/sck1 45 pa6 pa6/ cs2 /tclka pa6 pa6/ cs2 /tclka 44 pa7 pa7/ cs3 /tclkb pa7 pa7/ cs3 /tclkb 43 pa8 pa8/rdwr/irq2/tclkc pa8 pa8/rdwr/irq2/tclkc 42 pa9 pa9/cke/irq3/tclkd pa9 pa9/cke/irq3/tclkd 41 cs0 pa10/ cs0 / poe4 cs0 pa10/ cs0 / poe4
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1017 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 40 cs1 pa11/ cs1 / poe5 cs1 pa11/ cs1 / poe5 38 wrl pa12/ wrl /dqmll/ poe6 wrl pa12/ wrl /dqmll/ poe6 36 wrh pa13/ wrh /dqmlu/ poe7 wrh pa13/ wrh /dqmlu/ poe7 34 rd pa14/ rd rd pa14/ rd 83 ck pa15/ck ck pa15/ck 78 pa16 pa16/ ah /cke pa16 pa16/ ah /cke 79 pa17 pa17/ wait pa17 pa17/ wait 20 a16 pb0/a16/tic5ws a16 pb0/a16/tic5ws 22 a17 pb1/a17/tic5w a17 pb1/a17/tic5w 24 pb2 pb2/irq0/ poe0 /scl pb2 pb2/irq0/ poe0 /scl 25 pb3 pb3/irq1/ poe1 /sda pb3 pb3/irq1/ poe1 /sda 26 pb4 pb4/ rasl /irq2/ poe2 pb4 pb4/ rasl /irq2/ poe2 28 pb5 pb5/ casl /irq3/ poe3 pb5 pb5/ casl /irq3/ poe3 29 pb6 pb6/a18/ back /irq4/rxd0 pb6 pb6/a18/ back /irq4/rxd0 30 pb7 pb7/a19/ breq /irq5/txd0 pb7 pb7/a19/ breq /irq5/txd0 31 pb8 pb8/a20/ wait /irq6/sck0 pb8 pb8/a20/ wait /irq6/sck0 32 pb9 pb9/a21/irq7/ adtrg / poe8 pb9 pb9/a21/irq7/ adtrg / poe8 4 a0 pc0/a0 a0 pc0/a0 5 a1 pc1/a1 a1 pc1/a1 6 a2 pc2/a2 a2 pc2/a2 7 a3 pc3/a3 a3 pc3/a3 8 a4 pc4/a4 a4 pc4/a4 9 a5 pc5/a5 a5 pc5/a5 10 a6 pc6/a6 a6 pc6/a6 11 a7 pc7/a7 a7 pc7/a7 12 a8 pc8/a8 a8 pc8/a8 13 a9 pc9/a9 a9 pc9/a9 14 a10 pc10/a10 a10 pc10/a10 15 a11 pc11/a11 a11 pc11/a11
section 21 pin function controller (pfc) page 1018 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 16 a12 pc12/a12 a12 pc12/a12 17 a13 pc13/a13 a13 pc13/a13 18 a14 pc14/a14 a14 pc14/a14 19 a15 pc15/a15 a15 pc15/a15 70 d0 pd0/d0 d0 pd0/d0 69 d1 pd1/d1 d1 pd1/d1 68 d2 pd2/d2/tic5u d2 pd2/d2/tic5u 67 d3 pd3/d3/tic5v d3 pd3/d3/tic5v 66 d4 pd4/d4/tic5w d4 pd4/d4/tic5w 64 d5 pd5/d5/tic5us d5 pd5/d5/tic5us 63 d6 pd6/d6/tic5vs d6 pd6/d6/tic5vs 62 d7 pd7/d7/tic5ws d7 pd7/d7/tic5ws 60 pd8/(audata0 * 2 ) pd8/d8/tioc3as d8/(audata0 * 2 ) pd8/d8/tioc3as 59 pd9/(audata1 * 2 ) pd9/d9/tioc3bs d9/(audata1 * 2 ) pd9/d9/tioc3bs 58 pd10 /(audata2 * 2 ) pd10/d10/tioc3cs d10/(audata2 * 2 ) pd10/d10/tioc3cs 57 pd11 /(audata3 * 2 ) pd11/d11/tioc3ds d11/(audata3 * 2 ) pd11/d11/tioc3ds 56 pd12 pd12/d12/tioc4as d12 pd12/d12/tioc4as 54 pd13 pd13/d13/tioc4bs d13 pd13/d13/tioc4bs 53 pd14/(audck * 2 ) pd14/d14/tioc4cs d14/(audck * 2 ) pd14/d14/tioc4cs 52 pd15 /( audsync * 2 ) pd15/d15/tioc4ds d15/( audsync * 2 ) pd15/d15/tioc4ds 85 pe0/(tms * 1 ) pe0/dreq0/tioc0a pe0/(tms * 1 ) pe0/dreq0/tioc0a 86 pe1/( trst * 1 ) pe1/tend0/tioc0b pe1/( trst * 1 ) pe1/tend0/tioc0b 87 pe2/(tdi * 1 ) pe2/dreq1/tioc0c pe2/(tdi * 1 ) pe2/dreq1/tioc0c 88 pe3/(tdo * 1 ) pe3/tend1/tioc0d pe3/(tdo * 1 ) pe3/tend1/tioc0d 89 pe4/(tck * 1 ) pe4/tioc1a/rxd3 pe4/(tck * 1 ) pe4/tioc1a/rxd3 102 pe5/( asebrkak / asebrk * 1 ) pe5/ cs6 /tioc1b/txd3 pe5/( asebrkak / asebrk * 1 ) pe5/ cs6 /tioc1b/txd3
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1019 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 104 pe6 pe6/ cs7 /tioc2a/sck3 pe6 pe6/ cs7 /tioc2a/sck3 105 pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi 106 pe8 pe8/tioc3a/sck2/ssck pe8 pe8/tioc3a/sck2/ssck 107 pe9 pe9/tioc3b/sck3/ rts3 pe9 pe9/tioc3b/sck3/ rts3 108 pe10 pe10/tioc3c/txd2/sso pe10 pe10/tioc3c/txd2/sso 110 pe11 pe11/tioc3d/rxd3/ cts3 pe11 pe11/tioc3d/rxd3/ cts3 111 pe12 pe12/tioc4a/txd3/ scs pe12 pe12/tioc4a/txd3/ scs 112 pe13 pe13/tioc4b/ mres pe13 pe13/tioc4b/ mres 1 pe14 pe14/ ah /dack0/tioc4c pe14 pe14/ ah /dack0/tioc4c 2 pe15 pe15/cke/dack1/tioc4d / irqout pe15 pe15/cke/dack1/tioc4d / irqout 91 pf0/an0 pf0/an0 pf0/an0 pf0/an0 92 pf1/an1 pf1/an1 pf1/an1 pf1/an1 93 pf2/an2 pf2/an2 pf2/an2 pf2/an2 94 pf3/an3 pf3/an3 pf3/an3 pf3/an3 95 pf4/an4 pf4/an4 pf4/an4 pf4/an4 96 pf5/an5 pf5/an5 pf5/an5 pf5/an5 98 pf6/an6 pf6/an6 pf6/an6 pf6/an6 99 pf7/an7 pf7/an7 pf7/an7 pf7/an7 notes: 1. fixed to tms, trst , tdi, tdo, tck, and asebrkak / asebrk when using the e10a (in asemd0 = low). 2. only in f-ztat version supporting full functions of e10a. fixed as aud pins when using the aud function of the e10a.
section 21 pin function controller (pfc) page 1020 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.18 sh7084 pin functions in each operating mode (2) pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 21, 37, 65, 80, 103 vcc vcc vcc vcc 3, 27, 39, 55, 61, 71, 90, 101 vss vss vss vss 23, 81, 109 v cl v cl v cl v cl 100 avcc avcc avcc avcc 97 avss avss avss avss 82 pllvss pllvss pllvss pllvss 74 extal extal extal extal 72 xtal xtal xtal xtal 75 md0 md0 md0 md0 73 md1 md1 md1 md1 77 fwe fwe fwe fwe 84 res res res res 35 wdtovf wdtovf wdtovf wdtovf 76 nmi nmi nmi nmi 33 asemd0 asemd0 asemd0 asemd0 51 pa0 pa0/ cs4 /rxd0 pa0 pa0/rxd0 50 pa1 pa1/ cs5 /txd0 pa1 pa1/txd0 49 pa2 pa2/a25/dreq0/irq0/sck0 pa2 pa2/dreq0/irq0/sck0 48 pa3 pa3/a24/rxd1 pa3 pa3/rxd1 47 pa4 pa4/a23/txd1 pa4 pa4/txd1 46 pa5 pa5/a22/dreq1/irq1/sck1 pa5 pa5/irq1/sck1 45 pa6 pa6/ cs2 /tclka pa6 pa6/tclka 44 pa7 pa7/ cs3 /tclkb pa7 pa7/tclkb 43 pa8 pa8/rdwr/irq2/tclkc pa8 pa8/irq2/tclkc 42 pa9 pa9/cke/irq3/tclkd pa9 pa9/irq3/tclkd 41 pa10 pa10/ cs0 / poe4 pa10 pa10/ poe4
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1021 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 40 pa11 pa11/ cs1 / poe5 pa11 pa11/ poe5 38 pa12 pa12/ wrl /dqmll/ poe6 pa12 pa12/ poe6 36 pa13 pa13/ wrh /dqmlu/ poe7 pa13 pa13/ poe7 34 pa14 pa14/ rd pa14 pa14 83 ck pa15/ck pa15 pa15 78 pa16 pa16/ ah /cke pa16 pa16 79 pa17 pa17/ wait pa17 pa17 20 pb0 pb0/a16/tic5ws pb0 pb0/tic5ws 22 pb1 pb1/a17/tic5w pb1 pb1/tic5w 24 pb2 pb2/irq0/ poe0 /scl pb2 pb2/irq0/ poe0 /scl 25 pb3 pb3/irq1/ poe1 /sda pb3 pb3/irq1/ poe1 /sda 26 pb4 pb4/ rasl /irq2/ poe2 pb4 pb4/irq2/ poe2 28 pb5 pb5/ casl /irq3/ poe3 pb5 pb5/irq3/ poe3 29 pb6 pb6/a18/ back /irq4/rxd0 pb6 pb6/irq4/rxd0 30 pb7 pb7/a19/ breq /irq5/txd0 pb7 pb7/irq5/txd0 31 pb8 pb8/a20/ wait /irq6/sck0 pb8 pb8/irq6/sck0 32 pb9 pb9/a21/irq7/ adtrg / poe8 pb9 pb9/irq7/ adtrg / poe8 4 pc0 pc0/a0 pc0 pc0 5 pc1 pc1/a1 pc1 pc1 6 pc2 pc2/a2 pc2 pc2 7 pc3 pc3/a3 pc3 pc3 8 pc4 pc4/a4 pc4 pc4 9 pc5 pc5/a5 pc5 pc5 10 pc6 pc6/a6 pc6 pc6 11 pc7 pc7/a7 pc7 pc7 12 pc8 pc8/a8 pc8 pc8/ 13 pc9 pc9/a9 pc9 pc9 14 pc10 pc10/a10 pc10 pc10 15 pc11 pc11/a11 pc11 pc11
section 21 pin function controller (pfc) page 1022 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 16 pc12 pc12/a12 pc12 pc12 17 pc13 pc13/a13 pc13 pc13 18 pc14 pc14/a14 pc14 pc14 19 pc15 pc15/a15 pc15 pc15 70 pd0 pd0/d0 pd0 pd0 69 pd1 pd1/d1 pd1 pd1 68 pd2 pd2/d2/tic5u pd2 pd2/tic5u 67 pd3 pd3/d3/tic5v pd3 pd3/tic5v 66 pd4 pd4/d4/tic5w pd4 pd4/tic5w 64 pd5 pd5/d5/tic5us pd5 pd5/tic5us 63 pd6 pd6/d6/tic5vs pd6 pd6/tic5vs 62 pd7 pd7/d7/tic5ws pd7 pd7/tic5ws 60 pd8/(audata0 * 2 ) pd8/d8/tioc3as d8/(audata0 * 2 ) pd8/tioc3as 59 pd9/(audata1 * 2 ) pd9/d9/tioc3bs d9/(audata1 * 2 ) pd9/tioc3bs 58 pd10 /(audata2 * 2 ) pd10/d10/tioc3cs d10/(audata2 * 2 ) pd10/tioc3cs 57 pd11 /(audata3 * 2 ) pd11/d11/tioc3ds d11/(audata3 * 2 ) pd11/tioc3ds 56 pd12 pd12/d12/tioc4as d12 pd12/tioc4as 54 pd13 pd13/d13/tioc4bs d13 pd13/tioc4bs 53 pd14/(audck * 2 ) pd14/d14/tioc4cs d14/(audck * 2 ) pd14/tioc4cs 52 pd15 /( audsync * 2 ) pd15/d15/tioc4ds d15/( audsync * 2 ) pd15/tioc4ds 85 pe0/(tms * 1 ) pe0/dreq0/tioc0a pe0/(tms * 1 ) pe0/dreq0/tioc0a 86 pe1/( trst * 1 ) pe1/tend0/tioc0b pe1/( trst * 1 ) pe1/tioc0b 87 pe2/(tdi * 1 ) pe2/dreq1/tioc0c pe2/(tdi * 1 ) pe2/dreq1/tioc0c 88 pe3/(tdo * 1 ) pe3/tend1/tioc0d pe3/(tdo * 1 ) pe3/tioc0d 89 pe4/(tck * 1 ) pe4/tioc1a/rxd3 pe4/(tck * 1 ) pe4/tioc1a/rxd3 102 pe5/( asebrkak / asebrk * 1 ) pe5/ cs6 /tioc1b/txd3 pe5/( asebrkak / asebrk * 1 ) pe5/tioc1b/txd3
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1023 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 104 pe6 pe6/ cs7 /tioc2a/sck3 pe6 pe6/tioc2a/sck3 105 pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe7 pe7/tioc2b/ ubctrg /rxd2/ssi 106 pe8 pe8/tioc3a/sck2/ssck pe8 pe8/tioc3a/sck2/ssck 107 pe9 pe9/tioc3b/sck3/ rts3 pe9 pe9/tioc3b/sck3/ rts3 108 pe10 pe10/tioc3c/txd2/sso pe10 pe10/tioc3c/txd2/sso 110 pe11 pe11/tioc3d/rxd3/ cts3 pe11 pe11/tioc3d/rxd3/ cts3 111 pe12 pe12/tioc4a/txd3/ scs pe12 pe12/tioc4a/txd3/ scs 112 pe13 pe13/tioc4b/ mres pe13 pe13/tioc4b/ mres 1 pe14 pe14/ ah /dack0/tioc4c pe14 pe14/tioc4c 2 pe15 pe15/cke/dack1/tioc4d / irqout pe15 pe15/tioc4d/ irqout 91 pf0/an0 pf0/an0 pf0/an0 pf0/an0 92 pf1/an1 pf1/an1 pf1/an1 pf1/an1 93 pf2/an2 pf2/an2 pf2/an2 pf2/an2 94 pf3/an3 pf3/an3 pf3/an3 pf3/an3 95 pf4/an4 pf4/an4 pf4/an4 pf4/an4 96 pf5/an5 pf5/an5 pf5/an5 pf5/an5 98 pf6/an6 pf6/an6 pf6/an6 pf6/an6 99 pf7/an7 pf7/an7 pf7/an7 pf7/an7 notes: 1. fixed to tms, trst , tdi, tdo, tck, and asebrkak / asebrk when using the e10a (in asemd0 = low). 2. only in f-ztat version supporting full functions of e10a. fixed as aud pins when using the aud function of the e10a.
section 21 pin function controller (pfc) page 1024 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.19 sh7085 pin functions in each operating mode (1) pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 12, 26, 40, 63, 77, 85, 104, 112, 135 vcc vcc vcc vcc 6, 14, 28, 35, 55, 71, 79, 87, 93, 117, 129 vss vss vss vss 61, 105, 141 v cl v cl v cl v cl 128 avcc avcc avcc avcc 124 avss avss avss avss 127 avref avref avref avref 106 pllvss pllvss pllvss pllvss 96 extal extal extal extal 94 xtal xtal xtal xtal 97 md0 md0 md0 md0 95 md1 md1 md1 md1 99 fwe fwe fwe fwe 108 res res res res 44 wdtovf wdtovf wdtovf wdtovf 98 nmi nmi nmi nmi 42 asemd0 asemd0 asemd0 asemd0 130 pa0 pa0/ cs4 /rxd0 pa0 pa0/ cs4 /rxd0 131 pa1 pa1/ cs5 / ce1a /txd0 pa1 pa1/ cs5 / ce1a /txd0 132 pa2 pa2/a25/dreq0/irq0/sck0 pa2 pa2/a25/dreq0/irq0/sck0 133 pa3 pa3/a24/rxd1 pa3 pa3/a24/rxd1 134 pa4 pa4/a23/txd1 pa4 pa4/a23/txd1 136 pa5 pa5/a22/dreq1/irq1/sck1 pa5 pa5/a22/dreq1/irq1/sck1 54 pa6 pa6/ cs2 /tclka pa6 pa6/ cs2 /tclka 53 pa7 pa7/ cs3 /tclkb pa7 pa7/ cs3 /tclkb
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1025 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 52 pa8 pa8/rdwr/irq2/tclkc pa8 pa8/rdwr/irq2/tclkc 51 pa9 pa9/ frame /cke/irq3/tclkd pa9 pa9/ frame /cke/irq3/tclkd 50 cs0 pa10/ cs0 / poe4 cs0 pa10/ cs0 / poe4 49 cs1 pa11/ cs1 / poe5 cs1 pa11/ cs1 / poe5 48 wrl pa12/ wrl /dqmll/ poe6 wrl pa12/ wrl /dqmll/ poe6 47 wrh pa13/ wrh / we /dqmlu/ poe7 wrh pa13/ wrh / we /dqmlu/ poe7 43 rd pa14/ rd rd pa14/ rd 107 ck pa15/ck ck pa15/ck 100 pa16 /( audsync * 2 ) pa16/ wrhh / iciowr / ah /dqmuu/cke/dreq2 pa16 /( audsync * 2 ) pa16/ wrhh / iciowr / ah /dqmuu/cke/dreq2 101 pa17 pa17/ wait /dack2 pa17 pa17/ wait /dack2 33 pa18 pa18/ breq /tend0 pa18 pa18/ breq /tend0 30 pa19 pa19/ back /tend1 pa19 pa19/ back /tend1 29 pa20 pa20/ cs4 / rasu pa20 pa20/ cs4 / rasu 4 pa21 pa21/ cs5 / ce1a / casu /tic5u pa21 pa21/ cs5 / ce1a / casu /tic5u 3 pa22 pa22/ wrhl / iciord /dqmul /tic5v wrhl pa22/ wrhl / iciord /dqmul /tic5v 1 pa23 pa23/ wrhh / iciowr / ah /dqmuu/tic5w wrhh pa23/ wrhh / iciowr / ah /dqmuu/tic5w 102 pa24 pa24/ ce2a /dreq3 pa24 pa24/ ce2a /dreq3 103 pa25 pa25/ ce2b /dack3/ poe8 pa25 pa25/ ce2b /dack3/ poe8 25 a16 pb0/a16/tic5ws a16 pb0/a16/tic5ws 27 a17 pb1/a17/tic5w a17 pb1/a17/tic5w 31 pb2 pb2/irq0/ poe0 /scl pb2 pb2/irq0/ poe0 /scl 32 pb3 pb3/irq1/ poe1 /sda pb3 pb3/irq1/ poe1 /sda 34 pb4 pb4/ rasl /irq2/ poe2 pb4 pb4/ rasl /irq2/ poe2 36 pb5 pb5/ casl /irq3/ poe3 pb5 pb5/ casl /irq3/ poe3 37 pb6 pb6/a18/ back /irq4/rxd0 pb6 pb6/a18/ back /irq4/rxd0 38 pb7 pb7/a19/ breq /irq5/txd0 pb7 pb7/a19/ breq /irq5/txd0
section 21 pin function controller (pfc) page 1026 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 39 pb8 pb8/a20/ wait /irq6/sck0 pb8 pb8/a20/ wait /irq6/sck0 41 pb9 pb9/a21/irq7/ adtrg / poe8 pb9 pb9/a21/irq7/ adtrg / poe8 7 a0 pc0/a0 a0 pc0/a0 8 a1 pc1/a1 a1 pc1/a1 9 a2 pc2/a2 a2 pc2/a2 10 a3 pc3/a3 a3 pc3/a3 11 a4 pc4/a4 a4 pc4/a4 13 a5 pc5/a5 a5 pc5/a5 15 a6 pc6/a6 a6 pc6/a6 16 a7 pc7/a7 a7 pc7/a7 17 a8 pc8/a8 a8 pc8/a8 18 a9 pc9/a9 a9 pc9/a9 19 a10 pc10/a10 a10 pc10/a10 20 a11 pc11/a11 a11 pc11/a11 21 a12 pc12/a12 a12 pc12/a12 22 a13 pc13/a13 a13 pc13/a13 23 a14 pc14/a14 a14 pc14/a14 24 a15 pc15/a15 a15 pc15/a15 92 d0 pd0/d0 d0 pd0/d0 91 d1 pd1/d1 d1 pd1/d1 90 d2 pd2/d2/tic5u d2 pd2/d2/tic5u 89 d3 pd3/d3/tic5v d3 pd3/d3/tic5v 88 d4 pd4/d4/tic5w d4 pd4/d4/tic5w 86 d5 pd5/d5/tic5us d5 pd5/d5/tic5us 84 d6 pd6/d6/tic5vs d6 pd6/d6/tic5vs 83 d7 pd7/d7/tic5ws d7 pd7/d7/tic5ws 82 d8 pd8/d8/tioc3as d8 pd8/d8/tioc3as 81 d9 pd9/d9/tioc3bs d9 pd9/d9/tioc3bs 80 d10 pd10/d10/tioc3cs d10 pd10/d10/tioc3cs
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1027 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 78 d11 pd11/d11/tioc3ds d11 pd11/d11/tioc3ds 76 d12 pd12/d12/tioc4as d12 pd12/d12/tioc4as 75 d13 pd13/d13/tioc4bs d13 pd13/d13/tioc4bs 74 d14 pd14/d14/tioc4cs d14 pd14/d14/tioc4cs 73 d15 pd15/d15/tioc4ds d15 pd15/d15/tioc4ds 72 pd16 /(audata0 * 2 ) pd16/d16/irq0/ poe4 d16 /(audata0 * 2 ) pd16/d16/irq0/ poe4 70 pd17 /(audata1 * 2 ) pd17/d17/irq1/ poe5 d17 /(audata1 * 2 ) pd17/d17/irq1/ poe5 69 pd18 /(audata2 * 2 ) pd18/d18/irq2/ poe6 d18 /(audata2 * 2 ) pd18/d18/irq2/ poe6 68 pd19 /(audata3 * 2 ) pd19/d19/irq3/ poe7 d19 /(audata3 * 2 ) pd19/d19/irq3/ poe7 67 pd20 pd20/d20/irq4/tic5ws d20 pd20/d20/irq4/tic5ws 66 pd21 pd21/d21/irq5/tic5vs d21 pd21/d21/irq5/tic5vs 65 pd22/(audck * 2 ) pd22/d22/irq6/tic5us d22/(audck * 2 ) pd22/d22/irq6/tic5us 64 pd23 /( audsync * 2 ) pd23/d23/irq7 d23/( audsync * 2 ) pd23/d23/irq7 62 pd24 pd24/d24/dreq0/tioc4ds d24 pd24/d24/dreq0/tioc4ds 60 pd25 pd25/d25/dreq1/tioc4cs d25 pd25/d25/dreq1/tioc4cs 59 pd26 pd26/d26/dack0/tioc4bs d26 pd26/d26/dack0/tioc4bs 58 pd27 pd27/d27/dack1/tioc4as d27 pd27/d27/dack1/tioc4as 57 pd28 pd28/d28/ cs2 /tioc3ds d28 pd28/d28/ cs2 /tioc3ds 56 pd29 pd29/d29/ cs3 /tioc3bs d29 pd29/d29/ cs3 /tioc3bs 46 pd30 pd30/d30/tioc3cs/ irqout d30 pd30/d30/tioc3cs/ irqout 45 pd31 pd31/d31/tioc3as/ adtrg d31 pd31/d31/tioc3as/ adtrg 109 pe0/(audck * 2 ) pe0/dreq0/tioc0a pe0/(audck * 2 ) pe0/dreq0/tioc0a 110 pe1 pe1/tend0/tioc0b pe1 pe1/tend0/tioc0b 111 pe2 pe2/dreq1/tioc0c pe2 pe2/dreq1/tioc0c
section 21 pin function controller (pfc) page 1028 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 113 pe3/(audata3 * 2 ) pe3/tend1/tioc0d pe3/(audata3 * 2 ) pe3/tend1/tioc0d 114 pe4/(audata2 * 2 ) pe4/ iois16 /tioc1a/rxd3 pe4/(audata2 * 2 ) pe4/ iois16 /tioc1a/rxd3 115 pe5/(audata1 * 2 ) pe5/ cs6 / ce1b /tioc1b/txd3 pe5/(audata1 * 2 ) pe5/ cs6 / ce1b /tioc1b/txd3 116 pe6/(audata0 * 2 ) pe6/ cs7 /tioc2a/sck3 pe6/(audata0 * 2 ) pe6/ cs7 /tioc2a/sck3 137 pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi 138 pe8/(tms * 1 ) pe8/tioc3a/sck2/ssck pe8/(tms * 1 ) pe8/tioc3a/sck2/ssck 139 pe9/( trst * 1 ) pe9/tioc3b/sck3/ rts3 pe9/( trst * 1 ) pe9/tioc3b/sck3/ rts3 140 pe10/(tdi * 1 ) pe10/tioc3c/txd2/sso pe10/(tdi * 1 ) pe10/tioc3c/txd2/sso 142 pe11/(tdo * 1 ) pe11/tioc3d/rxd3/ cts3 pe11/(tdo * 1 ) pe11/tioc3d/rxd3/ cts3 143 pe12/(tck * 1 ) pe12/tioc4a/txd3/ scs pe12/(tck * 1 ) pe12/tioc4a/txd3/ scs 144 pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres 2 pe14 pe14/ wrhh / iciowr / ah /dqmuu/dack0/tioc4c pe14 pe14/ wrhh / iciowr / ah /dqmuu/dack0/tioc4c 5 pe15 pe15/cke/dack1/tioc4d / irqout pe15 pe15/cke/dack1/tioc4d / irqout 118 pf0/an0 pf0/an0 pf0/an0 pf0/an0 119 pf1/an1 pf1/an1 pf1/an1 pf1/an1 120 pf2/an2 pf2/an2 pf2/an2 pf2/an2 121 pf3/an3 pf3/an3 pf3/an3 pf3/an3 122 pf4/an4 pf4/an4 pf4/an4 pf4/an4 123 pf5/an5 pf5/an5 pf5/an5 pf5/an5 125 pf6/an6 pf6/an6 pf6/an6 pf6/an6 126 pf7/an7 pf7/an7 pf7/an7 pf7/an7 notes: 1. fixed to tms, trst , tdi, tdo, tck, and asebrkak / asebrk when using the e10a (in asemd0 = low). 2. only in f-ztat version supporting full functions of e10a. fixed as aud pins when using the aud function of the e10a.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1029 of 1560 mar 18, 2011 sh7080 group table 21.19 sh7085 pin functions in each operating mode (2) pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 12, 26, 40, 63, 77, 85, 104, 112, 135 vcc vcc vcc vcc 6, 14, 28, 35, 55, 71, 79, 87, 93, 117, 129 vss vss vss vss 61, 105, 141 v cl v cl v cl v cl 128 avcc avcc avcc avcc 124 avss avss avss avss 127 avref avref avref avref 106 pllvss pllvss pllvss pllvss 96 extal extal extal extal 94 xtal xtal xtal xtal 97 md0 md0 md0 md0 95 md1 md1 md1 md1 99 fwe fwe fwe fwe 108 res res res res 44 wdtovf wdtovf wdtovf wdtovf 98 nmi nmi nmi nmi 42 asemd0 asemd0 asemd0 asemd0 130 pa0 pa0/ cs4 /rxd0 pa0 pa0/rxd0 131 pa1 pa1/ cs5 / ce1a /txd0 pa1 pa1/txd0 132 pa2 pa2/a25/dreq0/irq0/sck0 pa2 pa2/dreq0/irq0/sck0 133 pa3 pa3/a24/rxd1 pa3 pa3/rxd1 134 pa4 pa4/a23/txd1 pa4 pa4/txd1 136 pa5 pa5/a22/dreq1/irq1/sck1 pa5 pa5/dreq1/irq1/sck1 54 pa6 pa6/ cs2 /tclka pa6 pa6/tclka 53 pa7 pa7/ cs3 /tclkb pa7 pa7/tclkb
section 21 pin function controller (pfc) page 1030 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 52 pa8 pa8/rdwr/irq2/tclkc pa8 pa8/irq2/tclkc 51 pa9 pa9/ frame /cke/irq3/tclkd pa9 pa9/irq3/tclkd 50 pa10 pa10/ cs0 / poe4 pa10 pa10/ poe4 49 pa11 pa11/ cs1 / poe5 pa11 pa11/ poe5 48 pa12 pa12/ wrl /dqmll/ poe6 pa12 pa12/ poe6 47 pa13 pa13/ wrh / we /dqmlu/ poe7 pa13 pa13/ poe7 43 pa14 pa14/ rd pa14 pa14 107 ck pa15/ck pa15 pa15 100 pa16 /( audsync * 2 ) pa16/ wrhh / iciowr / ah /dqmuu/cke/dreq2 pa16 /( audsync * 2 ) pa16/dreq2 101 pa17 pa17/ wait /dack2 pa17 pa17 33 pa18 pa18/ breq /tend0 pa18 pa18 30 pa19 pa19/ back /tend1 pa19 pa19 29 pa20 pa20/ cs4 / rasu pa20 pa20 4 pa21 pa21/ cs5 / ce1a / casu /tic5u pa21 pa21/tic5u 3 pa22 pa22/ wrhl / iciord /dqmul /tic5v pa22 pa22/tic5v 1 pa23 pa23/ wrhh / iciowr / ah /dqmuu/tic5w pa23 pa23/tic5w 102 pa24 pa24/ ce2a /dreq3 pa24 pa24/dreq3 103 pa25 pa25/ ce2b /dack3/ poe8 pa25 pa25/ poe8 25 pb0 pb0/a16/tic5ws pb0 pb0/tic5ws 27 pb1 pb1/a17/tic5w pb1 pb1/tic5w 31 pb2 pb2/irq0/ poe0 /scl pb2 pb2/irq0/ poe0 /scl 32 pb3 pb3/irq1/ poe1 /sda pb3 pb3/irq1/ poe1 /sda 34 pb4 pb4/ rasl /irq2/ poe2 pb4 pb4/irq2/ poe2 36 pb5 pb5/ casl /irq3/ poe3 pb5 pb5/irq3/ poe3 37 pb6 pb6/a18/ back /irq4/rxd0 pb6 pb6/irq4/rxd0 38 pb7 pb7/a19/ breq /irq5/txd0 pb7 pb7/irq5/txd0
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1031 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 39 pb8 pb8/a20/ wait /irq6/sck0 pb8 pb8/irq6/sck0 41 pb9 pb9/a21/irq7/ adtrg / poe8 pb9 pb9/irq7/ adtrg / poe8 7 pc0 pc0/a0 pc0 pc0 8 pc1 pc1/a1 pc1 pc1 9 pc2 pc2/a2 pc2 pc2 10 pc3 pc3/a3 pc3 pc3 11 pc4 pc4/a4 pc4 pc4 13 pc5 pc5/a5 pc5 pc5 15 pc6 pc6/a6 pc6 pc6 16 pc7 pc7/a7 pc7 pc7 17 pc8 pc8/a8 pc8 pc8 18 pc9 pc9/a9 pc9 pc9 19 pc10 pc10/a10 pc10 pc10 20 pc11 pc11/a11 pc11 pc11 21 pc12 pc12/a12 pc12 pc12 22 pc13 pc13/a13 pc13 pc13 23 pc14 pc14/a14 pc14 pc14 24 pc15 pc15/a15 pc15 pc15 92 pd0 pd0/d0 pd0 pd0 91 pd1 pd1/d1 pd1 pd1 90 pd2 pd2/d2/tic5u pd2 pd2/tic5u 89 pd3 pd3/d3/tic5v pd3 pd3/tic5v 88 pd4 pd4/d4/tic5w pd4 pd4/tic5w 86 pd5 pd5/d5/tic5us pd5 pd5/tic5us 84 pd6 pd6/d6/tic5vs pd6 pd6/tic5vs 83 pd7 pd7/d7/tic5ws pd7 pd7/tic5ws 82 pd8 pd8/d8/tioc3as pd8 pd8/tioc3as 81 pd9 pd9/d9/tioc3bs pd9 pd9/tioc3bs 80 pd10 pd10/d10/tioc3cs pd10 pd10/tioc3cs
section 21 pin function controller (pfc) page 1032 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 78 pd11 pd11/d11/tioc3ds pd11 pd11/tioc3ds 76 pd12 pd12/d12/tioc4as pd12 pd12/tioc4as 75 pd13 pd13/d13/tioc4bs pd13 pd13/tioc4bs 74 pd14 pd14/d14/tioc4cs pd14 pd14/tioc4cs 73 pd15 pd15/d15/tioc4ds pd15 pd15/tioc4ds 72 pd16 /(audata0 * 2 ) pd16/d16/irq0/ poe4 pd16 /(audata0 * 2 ) pd16/irq0/ poe4 70 pd17 /(audata1 * 2 ) pd17/d17/irq1/ poe5 pd17 /(audata1 * 2 ) pd17/irq1/ poe5 69 pd18 /(audata2 * 2 ) pd18/d18/irq2/ poe6 pd18 /(audata2 * 2 ) pd18/irq2/ poe6 68 pd19 /(audata3 * 2 ) pd19/d19/irq3/ poe7 pd19 /(audata3 * 2 ) pd19/irq3/ poe7 67 pd20 pd20/d20/irq4/tic5ws pd20 pd20/irq4/tic5ws 66 pd21 pd21/d21/irq5/tic5vs pd21 pd21/irq5/tic5vs 65 pd22 /(audck * 2 ) pd22/d22/irq6/tic5us pd22 /(audck * 2 ) pd22/irq6/tic5us 64 pd23 /( audsync * 2 ) pd23/d23/irq7 pd23 /( audsync * 2 ) pd23/irq7 62 pd24 pd24/d24/dreq0/tioc4ds pd24 pd24/dreq0 60 pd25 pd25/d25/dreq1/tioc4cs pd25 pd25/dreq1 59 pd26 pd26/d26/dack0/tioc4bs pd26 pd26/tioc4bs 58 pd27 pd27/d27/dack1/tioc4as pd27 pd27/tioc4as 57 pd28 pd28/d28/ cs2 /tioc3ds pd28 pd28/tioc3ds 56 pd29 pd29/d29/ cs3 /tioc3bs pd29 pd29/tioc3bs 46 pd30 pd30/d30/tioc3cs/ irqout pd30 pd30/tioc3cs/ irqout 45 pd31 pd31/d31/tioc3as/ adtrg d31 pd31/tioc3as/ adtrg 109 pe0/(audck * 2 ) pe0/dreq0/tioc0a pe0/(audck * 2 ) pe0/dreq0/tioc0a 110 pe1 pe1/tend0/tioc0b pe1 pe1/tioc0b
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1033 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 111 pe2 pe2/dreq1/tioc0c pe2 pe2/dreq1/tioc0c 113 pe3/(audata3 * 2 ) pe3/tend1/tioc0d pe3/(audata3 * 2 ) pe3/tioc0d 114 pe4/(audata2 * 2 ) pe4/ iois16 /tioc1a/rxd3 pe4/(audata2 * 2 ) pe4/tioc1a/rxd3 115 pe5/(audata1 * 2 ) pe5/ cs6 / ce1b /tioc1b/txd3 pe5/(audata1 * 2 ) pe5/tioc1b/txd3 116 pe6/(audata0 * 2 ) pe6/ cs7 /tioc2a/sck3 pe6/(audata0 * 2 ) pe6/tioc2a/sck3 137 pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe7 pe7/tioc2b/ ubctrg /rxd2/ssi 138 pe8/(tms * 1 ) pe8/tioc3a/sck2/ssck pe8/(tms * 1 ) pe8/tioc3a/sck2/ssck 139 pe9/( trst * 1 ) pe9/tioc3b/sck3/ rts3 pe9/( trst * 1 ) pe9/tioc3b/sck3/ rts3 140 pe10/(tdi * 1 ) pe10/tioc3c/txd2/sso pe10/(tdi * 1 ) pe10/tioc3c/txd2/sso 142 pe11/(tdo * 1 ) pe11/tioc3d/rxd3/ cts3 pe11/(tdo * 1 ) pe11/tioc3d/rxd3/ cts3 143 pe12/(tck * 1 ) pe12/tioc4a/txd3/ scs pe12/(tck * 1 ) pe12/tioc4a/txd3/ scs 144 pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres 2 pe14 pe14/ wrhh / iciowr / ah /dqmuu/dack0/tioc4c pe14 pe14/tioc4c 5 pe15 pe15/cke/dack1/tioc4d / irqout pe15 pe15/tioc4d/ irqout 118 pf0/an0 pf0/an0 pf0/an0 pf0/an0 119 pf1/an1 pf1/an1 pf1/an1 pf1/an1 120 pf2/an2 pf2/an2 pf2/an2 pf2/an2 121 pf3/an3 pf3/an3 pf3/an3 pf3/an3 122 pf4/an4 pf4/an4 pf4/an4 pf4/an4 123 pf5/an5 pf5/an5 pf5/an5 pf5/an5 125 pf6/an6 pf6/an6 pf6/an6 pf6/an6 126 pf7/an7 pf7/an7 pf7/an7 pf7/an7 notes: 1. fixed to tms, trst , tdi, tdo, tck, and asebrkak / asebrk when using the e10a (in asemd0 = low). 2. only in f-ztat version supporting full functions of e10a. fixed as aud pins when using the aud function of the e10a.
section 21 pin function controller (pfc) page 1034 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.20 sh7086 pin functions in each operating mode (1) pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 11, 21, 35, 48, 66, 74, 94, 102, 109, 128, 136, 168 vcc vcc vcc vcc 8, 23, 44, 57, 64, 86, 96, 104, 117, 141, 163 vss vss vss vss 37, 71, 129, 173 v cl v cl v cl v cl 151, 162 avcc avcc avcc avcc 142, 156 avss avss avss avss 161 avref avref avref avref 130 pllvss pllvss pllvss pllvss 120 extal extal extal extal 118 xtal xtal xtal xtal 121 md0 md0 md0 md0 119 md1 md1 md1 md1 123 fwe fwe fwe fwe 132 res res res res 53 wdtovf wdtovf wdtovf wdtovf 122 nmi nmi nmi nmi 51 asemd0 asemd0 asemd0 asemd0 164 pa0 pa0/ cs4 /rxd0 pa0 pa0/ cs4 /rxd0 165 pa1 pa1/ cs5 / ce1a /txd0 pa1 pa1/ cs5 / ce1a /txd0 166 pa2 pa2/a25/dreq0/irq0/sck0 pa2 pa2/a25/dreq0/irq0/sck0 167 pa3 pa3/a24/rxd1 pa3 pa3/a24/rxd1 169 pa4 pa4/a23/txd1 pa4 pa4/a23/txd1
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1035 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 170 pa5 pa5/a22/dreq1/irq1/sck1 pa5 pa5/a22/dreq1/irq1/sck1 80 pa6 pa6/ cs2 /tclka pa6 pa6/ cs2 /tclka 79 pa7 pa7/ cs3 /tclkb pa7 pa7/ cs3 /tclkb 78 pa8 pa8/rdwr/irq2/tclkc pa8 pa8/rdwr/irq2/tclkc 77 pa9 pa9/ frame /cke/irq3/tclkd pa9 pa9/ frame /cke/irq3/tclkd 76 cs0 pa10/ cs0 / poe4 cs0 pa10/ cs0 / poe4 75 cs1 pa11/ cs1 / poe5 cs1 pa11/ cs1 / poe5 73 wrl pa12/ wrl /dqmll/ poe6 wrl pa12/ wrl /dqmll/ poe6 72 wrh pa13/ wrh /dqmlu/ we / poe7 wrh pa13/ wrh /dqmlu/ we / poe7 52 rd pa14/ rd rd pa14/ rd 131 ck pa15/ck ck pa15/ck 124 pa16 /( audsync * 2 ) pa16/ wrhh / iciowr / ah /dqmuu/cke/dreq2 pa16 /( audsync * 2 ) pa16/ wrhh / iciowr / ah /dqmuu/cke/dreq2 125 pa17 pa17/ wait /dack2 pa17 pa17/ wait /dack2 42 pa18 pa18/ breq /tend0 pa18 pa18/ breq /tend0 39 pa19 pa19/ back /tend1 pa19 pa19/ back /tend1 38 pa20 pa20/ cs4 / rasu pa20 pa20/ cs4 / rasu 6 pa21 pa21/ cs5 / ce1a / casu /tic5u pa21 pa21/ cs5 / ce1a / casu /tic5u 5 pa22 pa22/ wrhl / iciord /dqmul /tic5v wrhl pa22/ wrhl / iciord /dqmul /tic5v 3 pa23 pa23/ wrhh / iciowr / ah /dqmuu/tic5w wrhh pa23/ wrhh / iciowr / ah /dqmuu/tic5w 126 pa24 pa24/ ce2a /dreq3 pa24 pa24/ ce2a /dreq3 127 pa25 pa25/ ce2b /dack3/ poe8 pa25 pa25/ ce2b /dack3/ poe8 63 pa26 pa26/a26/irq0 pa26 pa26/a26/irq0 65 pa27 pa27/a27/irq1 pa27 pa27/a27/irq1 67 pa28 pa28/a28/irq2 pa28 pa28/a28/irq2 68 pa29 pa29/a29/irq3 pa29 pa29/a29/irq3 34 a16 pb0/a16/tic5ws a16 pb0/a16/tic5ws 36 a17 pb1/a17/tic5w a17 pb1/a17/tic5w
section 21 pin function controller (pfc) page 1036 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 40 pb2 pb2/irq0/ poe0 /scl pb2 pb2/irq0/ poe0 /scl 41 pb3 pb3/irq1/ poe1 /sda pb3 pb3/irq1/ poe1 /sda 43 pb4 pb4/ rasl /irq2/ poe2 pb4 pb4/ rasl /irq2/ poe2 45 pb5 pb5/ casl /irq3/ poe3 pb5 pb5/ casl /irq3/ poe3 46 pb6 pb6/a18/ back /irq4/rxd0 pb6 pb6/a18/ back /irq4/rxd0 47 pb7 pb7/a19/ breq /irq5/txd0 pb7 pb7/a19/ breq /irq5/txd0 49 pb8 pb8/a20/ wait /irq6/sck0 pb8 pb8/a20/ wait /irq6/sck0 50 pb9 pb9/a21/irq7/ adtrg / poe8 pb9 pb9/a21/irq7/ adtrg / poe8 16 a0 pc0/a0 a0 pc0/a0 17 a1 pc1/a1 a1 pc1/a1 18 a2 pc2/a2 a2 pc2/a2 19 a3 pc3/a3 a3 pc3/a3 20 a4 pc4/a4 a4 pc4/a4 22 a5 pc5/a5 a5 pc5/a5 24 a6 pc6/a6 a6 pc6/a6 25 a7 pc7/a7 a7 pc7/a7 26 a8 pc8/a8 a8 pc8/a8 27 a9 pc9/a9 a9 pc9/a9 28 a10 pc10/a10 a10 pc10/a10 29 a11 pc11/a11 a11 pc11/a11 30 a12 pc12/a12 a12 pc12/a12 31 a13 pc13/a13 a13 pc13/a13 32 a14 pc14/a14 a14 pc14/a14 33 a15 pc15/a15 a15 pc15/a15 54 a18 pc18/a18 a18 pc18/a18 55 a19 pc19/a19 a19 pc19/a19 56 a20 pc20/a20 a20 pc20/a20 58 a21 pc21/a21 a21 pc21/a21
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1037 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 59 a22 pc22/a22 a22 pc22/a22 60 a23 pc23/a23 a23 pc23/a23 61 a24 pc24/a24 a24 pc24/a24 62 a25 pc25/a25 a25 pc25/a25 116 d0 pd0/d0 d0 pd0/d0 115 d1 pd1/d1 d1 pd1/d1 114 d2 pd2/d2/tic5u d2 pd2/d2/tic5u 113 d3 pd3/d3/tic5v d3 pd3/d3/tic5v 112 d4 pd4/d4/tic5w d4 pd4/d4/tic5w 111 d5 pd5/d5/tic5us d5 pd5/d5/tic5us 110 d6 pd6/d6/tic5vs d6 pd6/d6/tic5vs 108 d7 pd7/d7/tic5ws d7 pd7/d7/tic5ws 107 d8 pd8/d8/tioc3as d8 pd8/d8/tioc3as 106 d9 pd9/d9/tioc3bs d9 pd9/d9/tioc3bs 105 d10 pd10/d10/tioc3cs d10 pd10/d10/tioc3cs 103 d11 pd11/d11/tioc3ds d11 pd11/d11/tioc3ds 101 d12 pd12/d12/tioc4as d12 pd12/d12/tioc4as 100 d13 pd13/d13/tioc4bs d13 pd13/d13/tioc4bs 99 d14 pd14/d14/tioc4cs d14 pd14/d14/tioc4cs 98 d15 pd15/d15/tioc4ds d15 pd15/d15/tioc4ds 97 pd16 /(audata0 * 2 ) pd16/d16/irq0/ poe4 d16/(audata0 * 2 ) pd16/d16/irq0/ poe4 95 pd17 /(audata1 * 2 ) pd17/d17/irq1/ poe5 d17/(audata1 * 2 ) pd17/d17/irq1/ poe5 93 pd18 /(audata2 * 2 ) pd18/d18/irq2/ poe6 d18/(audata2 * 2 ) pd18/d18/irq2/ poe6 92 pd19 /(audata3 * 2 ) pd19/d19/irq3/ poe7 d19/(audata3 * 2 ) pd19/d19/irq3/ poe7 91 pd20 pd20/d20/irq4/tic5ws d20 pd20/d20/irq4/tic5ws
section 21 pin function controller (pfc) page 1038 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 90 pd21 pd21/d21/irq5/tic5vs d21 pd21/d21/irq5/tic5vs 89 pd22/(audck * 2 ) pd22/d22/irq6/tic5us d22/(audck * 2 ) pd22/d22/irq6/tic5us 88 pd23 /( audsync * 2 ) pd23/d23/irq7 d23/( audsync * 2 ) pd23/d23/irq7 87 pd24 pd24/d24/dreq0/tioc4ds d24 pd24/d24/dreq0/tioc4ds 85 pd25 pd25/d25/dreq1/tioc4cs d25 pd25/d25/dreq1/tioc4cs 84 pd26 pd26/d26/dack0/tioc4bs d26 pd26/d26/dack0/tioc4bs 83 pd27 pd27/d27/dack1/tioc4as d27 pd27/d27/dack1/tioc4as 82 pd28 pd28/d28/ cs2 /tioc3ds d28 pd28/d28/ cs2 /tioc3ds 81 pd29 pd29/d29/ cs3 /tioc3bs d29 pd29/d29/ cs3 /tioc3bs 70 pd30 pd30/d30/tioc3cs/ irqout d30 pd30/d30/tioc3cs/ irqout 69 pd31 pd31/d31/tioc3as/ adtrg d31 pd31/d31/tioc3as/ adtrg 133 pe0/(audck * 2 ) pe0/dreq0/tioc0a pe0/(audck * 2 ) pe0/dreq0/tioc0a 134 pe1 pe1/tend0/tioc0b pe1 pe1/tend0/tioc0b 135 pe2 pe2/dreq1/tioc0c pe2 pe2/dreq1/tioc0c 137 pe3/(audata3 * 2 ) pe3/tend1/tioc0d pe3/(audata3 * 2 ) pe3/tend1/tioc0d 138 pe4/(audata2 * 2 ) pe4/ iois16 /tioc1a/rxd3 pe4/(audata2 * 2 ) pe4/ iois16 /tioc1a/rxd3 139 pe5/(audata1 * 2 ) pe5/ cs6 / ce1b /tioc1b/txd3 pe5/(audata1 * 2 ) pe5/ cs6 / ce1b /tioc1b/txd3 140 pe6/(audata0 * 2 ) pe6/ cs7 /tioc2a/sck3 pe6/(audata0 * 2 ) pe6/ cs7 /tioc2a/sck3 171 pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi 172 pe8/(tms * 1 ) pe8/tioc3a/sck2/ssck pe8/(tms * 1 ) pe8/tioc3a/sck2/ssck 174 pe9/( trst * 1 ) pe9/tioc3b/sck3/ rts3 pe9/( trst * 1 ) pe9/tioc3b/sck3/ rts3 175 pe10/(tdi * 1 ) pe10/tioc3c/txd2/sso pe10/(tdi * 1 ) pe10/tioc3c/txd2/sso 176 pe11/(tdo * 1 ) pe11/tioc3d/rxd3/ cts3 pe11/(tdo * 1 ) pe11/tioc3d/rxd3/ cts3 1 pe12/(tck * 1 ) pe12/tioc4a/txd3/ scs pe12/(tck * 1 ) pe12/tioc4a/txd3/ scs 2 pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres 4 pe14 pe14/ wrhh / iciowr / ah /dqmuu/dack0/tioc4c pe14 pe14/ wrhh / iciowr / ah /dqmuu/dack0/tioc4c
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1039 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom disabled (mcu mode 0) on-chip rom disabled (mcu mode 1) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 7 pe15 pe15/cke/dack1/tioc4d / irqout pe15 pe15/cke/dack1/tioc4d / irqout 9 pe16 pe16/ cs8 /tioc3bs pe16 pe16/ cs8 /tioc3bs 10 pe17 pe17/tioc3ds pe17 pe17/tioc3ds 12 pe18 pe18/tioc4as pe18 pe18/tioc4as 13 pe19 pe19/tioc4bs pe19 pe19/tioc4bs 14 pe20 pe20/tioc4cs pe20 pe20/tioc4cs 15 pe21 pe21/tioc4ds pe21 pe21/tioc4ds 143 pf0/an0 pf0/an0 pf0/an0 pf0/an0 144 pf1/an1 pf1/an1 pf1/an1 pf1/an1 147 pf2/an2 pf2/an2 pf2/an2 pf2/an2 148 pf3/an3 pf3/an3 pf3/an3 pf3/an3 152 pf4/an4 pf4/an4 pf4/an4 pf4/an4 153 pf5/an5 pf5/an5 pf5/an5 pf5/an5 157 pf6/an6 pf6/an6 pf6/an6 pf6/an6 158 pf7/an7 pf7/an7 pf7/an7 pf7/an7 145 pf8/an8 pf8/an8 pf8/an8 pf8/an8 146 pf9/an9 pf9/an9 pf9/an9 pf9/an9 149 pf10/an10 pf10/an10 pf10/an10 pf10/an10 150 pf11/an11 pf11/an11 pf11/an11 pf11/an11 154 pf12/an12 pf12/an12 pf12/an12 pf12/an12 155 pf13/an13 pf13/an13 pf13/an13 pf13/an13 159 pf14/an14 pf14/an14 pf14/an14 pf14/an14 160 pf15/an15 pf15/an15 pf15/an15 pf15/an15 notes: 1. fixed to tms, trst , tdi, tdo, tck, and asebrkak / asebrk when using the e10a (in asemd0 = low). 2. only in f-ztat version supporting full functions of e10a. fixed as aud pins when using the aud function of the e10a.
section 21 pin function controller (pfc) page 1040 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 21.20 sh7086 pin functions in each operating mode (2) pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 11, 21, 35, 48, 66, 74, 94, 102, 109, 128, 136, 168 vcc vcc vcc vcc 8, 23, 44, 57, 64, 86, 96, 104, 117, 141, 163 vss vss vss vss 37, 71, 129, 173 v cl v cl v cl v cl 151, 162 avcc avcc avcc avcc 142, 156 avss avss avss avss 161 avref avref avref avref 130 pllvss pllvss pllvss pllvss 120 extal extal extal extal 118 xtal xtal xtal xtal 121 md0 md0 md0 md0 119 md1 md1 md1 md1 123 fwe fwe fwe fwe 132 res res res res 53 wdtovf wdtovf wdtovf wdtovf 122 nmi nmi nmi nmi 51 asemd0 asemd0 asemd0 asemd0 164 pa0 pa0/ cs4 /rxd0 pa0 pa0/rxd0 165 pa1 pa1/ cs5 / ce1a /txd0 pa1 pa1/txd0 166 pa2 pa2/a25/dreq0/irq0/sck0 pa2 pa2/dreq0/irq0/sck0 167 pa3 pa3/a24/rxd1 pa3 pa3/rxd1 169 pa4 pa4/a23/txd1 pa4 pa4/txd1
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1041 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 170 pa5 pa5/a22/dreq1/irq1/sck1 pa5 pa5/dreq1/irq1/sck1 80 pa6 pa6/ cs2 /tclka pa6 pa6/tclka 79 pa7 pa7/ cs3 /tclkb pa7 pa7/tclkb 78 pa8 pa8/rdwr/irq2/tclkc pa8 pa8/irq2/tclkc 77 pa9 pa9/ frame /cke/irq3/tclkd pa9 pa9/irq3/tclkd 76 pa10 pa10/ cs0 / poe4 pa10 pa10/ poe4 75 pa11 pa11/ cs1 / poe5 pa11 pa11/ poe5 73 pa12 pa12/ wrl /dqmll/ poe6 pa12 pa12/ poe6 72 pa13 pa13/ wrh /dqmlu/ we / poe7 pa13 pa13/ poe7 52 pa14 pa14/ rd pa14 pa14 131 ck pa15/ck pa15 pa15 124 pa16 /( audsync * 2 ) pa16/ wrhh / iciowr / ah /dqmuu/cke/dreq2 pa16 /( audsync * 2 ) pa16/dreq2 125 pa17 pa17/ wait /dack2 pa17 pa17 42 pa18 pa18/ breq /tend0 pa18 pa18 39 pa19 pa19/ back /tend1 pa19 pa19 38 pa20 pa20/ cs4 / rasu pa20 pa20 6 pa21 pa21/ cs5 / ce1a / casu /tic5u pa21 pa21/tic5u 5 pa22 pa22/ wrhl / iciord /dqmul /tic5v pa22 pa22/tic5v 3 pa23 pa23/ wrhh / iciowr / ah /dqmuu/tic5w pa23 pa23/tic5w 126 pa24 pa24/ ce2a /dreq3 pa24 pa24/dreq3 127 pa25 pa25/ ce2b /dack3/ poe8 pa25 pa25/ poe8 63 pa26 pa26/a26/irq0 pa26 pa26/irq0 65 pa27 pa27/a27/irq1 pa27 pa27/irq1 67 pa28 pa28/a28/irq2 pa28 pa28/irq2 68 pa29 pa29/a29/irq3 pa29 pa29/irq3 34 pb0 pb0/a16/tic5ws pb0 pb0/tic5ws
section 21 pin function controller (pfc) page 1042 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 36 pb1 pb1/a17/tic5w pb1 pb1/tic5w 40 pb2 pb2/irq0/ poe0 /scl pb2 pb2/irq0/ poe0 /scl 41 pb3 pb3/irq1/ poe1 /sda pb3 pb3/irq1/ poe1 /sda 43 pb4 pb4/ rasl /irq2/ poe2 pb4 pb4/irq2/ poe2 45 pb5 pb5/ casl /irq3/ poe3 pb5 pb5/irq3/ poe3 46 pb6 pb6/a18/ back /irq4/rxd0 pb6 pb6/irq4/rxd0 47 pb7 pb7/a19/ breq /irq5/txd0 pb7 pb7/irq5/txd0 49 pb8 pb8/a20/ wait /irq6/sck0 pb8 pb8/irq6/sck0 50 pb9 pb9/a21/irq7/ adtrg / poe8 pb9 pb9/irq7/ adtrg / poe8 16 pc0 pc0/a0 pc0 pc0 17 pc1 pc1/a1 pc1 pc1 18 pc2 pc2/a2 pc2 pc2 19 pc3 pc3/a3 pc3 pc3 20 pc4 pc4/a4 pc4 pc4 22 pc5 pc5/a5 pc5 pc5 24 pc6 pc6/a6 pc6 pc6 25 pc7 pc7/a7 pc7 pc7 26 pc8 pc8/a8 pc8 pc8 27 pc9 pc9/a9 pc9 pc9 28 pc10 pc10/a10 pc10 pc10 29 pc11 pc11/a11 pc11 pc11 30 pc12 pc12/a12 pc12 pc12 31 pc13 pc13/a13 pc13 pc13 32 pc14 pc14/a14 pc14 pc14 33 pc15 pc15/a15 pc15 pc15 54 pc18 pc18/a18 pc18 pc18 55 pc19 pc19/a19 pc19 pc19 56 pc20 pc20/a20 pc20 pc20 58 pc21 pc21/a21 pc21 pc21
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1043 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 59 pc22 pc22/a22 pc22 pc22 60 pc23 pc23/a23 pc23 pc23 61 pc24 pc24/a24 pc24 pc24 62 pc25 pc25/a25 pc25 pc25 116 pd0 pd0/d0 pd0 pd0 115 pd1 pd1/d1 pd1 pd1 114 pd2 pd2/d2/tic5u pd2 pd2/tic5u 113 pd3 pd3/d3/tic5v pd3 pd3/tic5v 112 pd4 pd4/d4/tic5w pd4 pd4/tic5w 111 pd5 pd5/d5/tic5us pd5 pd5/tic5us 110 pd6 pd6/d6/tic5vs pd6 pd6/tic5vs 108 pd7 pd7/d7/tic5ws pd7 pd7/tic5ws 107 pd8 pd8/d8/tioc3as pd8 pd8/tioc3as 106 pd9 pd9/d9/tioc3bs pd9 pd9/tioc3bs 105 pd10 pd10/d10/tioc3cs pd10 pd10/tioc3cs 103 pd11 pd11/d11/tioc3ds pd11 pd11/tioc3ds 101 pd12 pd12/d12/tioc4as pd12 pd12/tioc4as 100 pd13 pd13/d13/tioc4bs pd13 pd13/tioc4bs 99 pd14 pd14/d14/tioc4cs pd14 pd14/tioc4cs 98 pd15 pd15/d15/tioc4ds pd15 pd15/tioc4ds 97 pd16 /(audata0 * 2 ) pd16/d16/irq0/ poe4 pd16 /(audata0 * 2 ) pd16/irq0/ poe4 95 pd17 /(audata1 * 2 ) pd17/d17/irq1/ poe5 pd17 /(audata1 * 2 ) pd17/irq1/ poe5 93 pd18 /(audata2 * 2 ) pd18/d18/irq2/ poe6 pd18 /(audata2 * 2 ) pd18/irq2/ poe6 92 pd19 /(audata3 * 2 ) pd19/d19/irq3/ poe7 pd19 /(audata3 * 2 ) pd19/irq3/ poe7 91 pd20 pd20/d20/irq4/tic5ws pd20 pd20/irq4/tic5ws
section 21 pin function controller (pfc) page 1044 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 90 pd21 pd21/d21/irq5/tic5vs pd21 pd21/irq5/tic5vs 89 pd22 /(audck * 2 ) pd22/d22/irq6/tic5us pd22 /(audck * 2 ) pd22/irq6/tic5us 88 pd23 /( audsync * 2 ) pd23/d23/irq7 pd23 /( audsync * 2 ) pd23/irq7 87 pd24 pd24/d24/dreq0/tioc4ds pd24 pd24/dreq0/tioc4ds 85 pd25 pd25/d25/dreq1/tioc4cs pd25 pd25/dreq1/tioc4cs 84 pd26 pd26/d26/dack0/tioc4bs pd26 pd26/tioc4bs 83 pd27 pd27/d27/dack1/tioc4as pd27 pd27/tioc4as 82 pd28 pd28/d28/ cs2 /tioc3ds pd28 pd28/tioc3ds 81 pd29 pd29/d29/ cs3 /tioc3bs pd29 pd29/tioc3bs 70 pd30 pd30/d30/tioc3cs/ irqout pd30 pd30/tioc3cs/ irqout 69 pd31 pd31/d31/tioc3as/ adtrg pd31 pd31/tioc3as/ adtrg 133 pe0/(audck * 2 ) pe0/dreq0/tioc0a pe0/(audck * 2 ) pe0/dreq0/tioc0a 134 pe1 pe1/tend0/tioc0b pe1 pe1/tioc0b 135 pe2 pe2/dreq1/tioc0c pe2 pe2/dreq1/tioc0c 137 pe3/(audata3 * 2 ) pe3/tend1/tioc0d pe3/(audata3 * 2 ) pe3/tioc0d 138 pe4/(audata2 * 2 ) pe4/ iois16 /tioc1a/rxd3 pe4/(audata2 * 2 ) pe4/tioc1a/rxd3 139 pe5/(audata1 * 2 ) pe5/ cs6 / ce1b /tioc1b/txd3 pe5/(audata1 * 2 ) pe5/tioc1b/txd3 140 pe6/(audata0 * 2 ) pe6/ cs7 /tioc2a/sck3 pe6/(audata0 * 2 ) pe6/tioc2a/sck3 171 pe7 pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pe7 pe7/tioc2b/ ubctrg /rxd2/ssi 172 pe8/(tms * 1 ) pe8/tioc3a/sck2/ssck pe8/(tms * 1 ) pe8/tioc3a/sck2/ssck 174 pe9/( trst * 1 ) pe9/tioc3b/sck3/ rts3 pe9/( trst * 1 ) pe9/tioc3b/sck3/ rts3 175 pe10/(tdi * 1 ) pe10/tioc3c/txd2/sso pe10/(tdi * 1 ) pe10/tioc3c/txd2/sso 176 pe11/(tdo * 1 ) pe11/tioc3d/rxd3/ cts3 pe11/(tdo * 1 ) pe11/tioc3d/rxd3/ cts3 1 pe12/(tck * 1 ) pe12/tioc4a/txd3/ scs pe12/(tck * 1 ) pe12/tioc4a/txd3/ scs 2 pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres pe13/( asebrkak / asebrk * 1 ) pe13/tioc4b/ mres
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1045 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom enabled (mcu mode 2) single-chip mode (mcu mode 3) pin no. initial function pfc selected function possibilities initial function pfc selected function possibilities 4 pe14 pe14/ wrhh / iciowr / ah /dqmuu/dack0/tioc4c pe14 pe14/tioc4c 7 pe15 pe15/cke/dack1/tioc4d / irqout pe15 pe15/tioc4d/ irqout 9 pe16 pe16/ cs8 /tioc3bs pe16 pe16/tioc3bs 10 pe17 pe17/tioc3ds pe17 pe17/tioc3ds 12 pe18 pe18/tioc4as pe18 pe18/tioc4as 13 pe19 pe19/tioc4bs pe19 pe19/tioc4bs 14 pe20 pe20/tioc4cs pe20 pe20/tioc4cs 15 pe21 pe21/tioc4ds pe21 pe21/tioc4ds 143 pf0/an0 pf0/an0 pf0/an0 pf0/an0 144 pf1/an1 pf1/an1 pf1/an1 pf1/an1 147 pf2/an2 pf2/an2 pf2/an2 pf2/an2 148 pf3/an3 pf3/an3 pf3/an3 pf3/an3 152 pf4/an4 pf4/an4 pf4/an4 pf4/an4 153 pf5/an5 pf5/an5 pf5/an5 pf5/an5 157 pf6/an6 pf6/an6 pf6/an6 pf6/an6 158 pf7/an7 pf7/an7 pf7/an7 pf7/an7 145 pf8/an8 pf8/an8 pf8/an8 pf8/an8 146 pf9/an9 pf9/an9 pf9/an9 pf9/an9 149 pf10/an10 pf10/an10 pf10/an10 pf10/an10 150 pf11/an11 pf11/an11 pf11/an11 pf11/an11 154 pf12/an12 pf12/an12 pf12/an12 pf12/an12 155 pf13/an13 pf13/an13 pf13/an13 pf13/an13 159 pf14/an14 pf14/an14 pf14/an14 pf14/an14 160 pf15/an15 pf15/an15 pf15/an15 pf15/an15 notes: 1. fixed to tms, trst , tdi, tdo, tck, and asebrkak / asebrk when using the e10a (in asemd0 = low). 2. only in f-ztat version supporting full functions of e10a. fixed as aud pins when using the aud function of the e10a.
section 21 pin function controller (pfc) page 1046 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 21.1 register descriptions the pfc has the following registers. for details on register addresses and register states in each processing state, refer to section 27, list of registers. table 21.21 register configuration register name abbreviation r/w initial value address access size port a i/o register h paiorh r/w h'0000 h'ffffd104 8, 16, 32 port a i/o register l paiorl r/w h'0000 h'ffffd106 8, 16 port a control register h4 pacrh4 r/w h'0000 h'ffffd108 8, 16, 32 port a control register h3 pacrh3 r/w h'0000 h'ffffd10a 8, 16 port a control register h2 pacrh2 r/w h'0000 * h'ffffd10c 8, 16, 32 port a control register h1 pacrh1 r/w h'0000 h'ffffd10e 8, 16 port a control register l4 pacrl4 r/w h'0000 * h?ffffd110 8, 16, 32 port a control register l3 pacrl3 r/w h'0000 * h?ffffd112 8, 16 port a control register l2 pacrl2 r/w h'0000 h?ffffd114 8, 16, 32 port a control register l1 pacrl1 r/w h'0000 h?ffffd116 8, 16 port b i/o register l pbiorl r/w h'0000 h'ffffd186 8, 16 port b control register l3 pbcrl3 r/w h'0000 h'ffffd192 8, 16 port b control register l2 pbcrl2 r/w h'0000 h'ffffd194 8, 16, 32 port b control register l1 pbcrl1 r/w h'0000 * h'ffffd196 8, 16 port c i/o register h pciorh r/w h'0000 h'ffffd204 8, 16, 32 port c i/o register l pciorl r/w h'0000 h'ffffd206 8, 16 port c control register h3 pccrh3 r/w h'0000 * h'ffffd20a 8, 16 port c control register h2 pccrh2 r/w h'0000 * h'ffffd20c 8, 16, 32 port c control register h1 pccrh1 r/w h'0000 * h'ffffd20e 8, 16 port c control register l4 pccrl4 r/w h'0000 * h'ffffd210 8, 16, 32 port c control register l3 pccrl3 r/w h'0000 * h'ffffd212 8, 16 port c control register l2 pccrl2 r/w h'0000 * h'ffffd214 8, 16, 32 port c control register l1 pccrl1 r/w h'0000 * h'ffffd216 8, 16 port d i/o register h pdiorh r/w h'0000 h'ffffd284 8, 16, 32 port d i/o register l pdiorl r/w h'0000 h'ffffd286 8, 16
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1047 of 1560 mar 18, 2011 sh7080 group register name abbreviation r/w initial value address access size port d control register h4 pdcrh4 r/w h'0000 * h'ffffd288 8, 16, 32 port d control register h3 pdcrh3 r/w h'0000 * h'ffffd28a 8, 16 port d control register h2 pdcrh2 r/w h'0000 * h'ffffd28c 8, 16, 32 port d control register h1 pdcrh1 r/w h'0000 * h'ffffd28e 8, 16 port d control register l4 pdcrl4 r/w h'0000 * h'ffffd290 8, 16, 32 port d control register l3 pdcrl3 r/w h'0000 * h'ffffd292 8, 16 port d control register l2 pdcrl2 r/w h'0000 * h'ffffd294 8, 16, 32 port d control register l1 pdcrl1 r/w h'0000 * h'ffffd296 8, 16 port e i/o register h peiorh r/w h'0000 h'ffffd304 8, 16, 32 port e i/o register l peiorl r/w h'0000 h'ffffd306 8, 16 port e control register h2 pecrh2 r/w h'0000 h'ffffd30c 8, 16, 32 port e control register h1 pecrh1 r/w h'0000 h'ffffd30e 8, 16 port e control register l4 pecrl4 r/w h'0000 h'ffffd310 8, 16, 32 port e control register l3 pecrl3 r/w h'0000 h'ffffd312 8, 16 port e control register l2 pecrl2 r/w h'0000 h'ffffd314 8, 16, 32 port e control register l1 pecrl1 r/w h'0000 h'ffffd316 8, 16 high-current port control register hcpcr r/w h'000f h'ffffd320 8, 16, 32 irqout function control register ifcr r/w h'0000 h'ffffd322 8, 16 note: * the initial values of registers differ depending on the operating mode and the product type in use. for details, refer to register descriptions in this section.
section 21 pin function controller (pfc) page 1048 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 21.1.1 port a i/o register l, h (paiorl, paiorh) paiorl and paiorh are 16-bit readable/writable regi sters that are used to set the pins on port a as inputs or outputs. bits pa29ior to pa0ior correspond to pins pa29 to pa0 (names of multiplexed pins are here given as port names and pin numbers alone). paiorl is enabled when the port a pins are functioning as general-purpose inputs/outputs (pa15 to pa0). in other states, paiorl is disabled. paiorh is enabled when the port a pins are functioning as general-purpose input/output (pa29 to pa16). in other states, paiorh is disabled. a given pin on port a will be an output pin if the corresponding bit in paiorh or paiorl is set to 1, and an input pin if the bit is cleared to 0. however, bits 13 to 0 of paiorh, and bits 11, 6, and 2 to 0 of paiorl are disabled in sh7083. bits 13 to 2 of paiorh are disabled in sh7084. bits 13 to 10 of paiorh are disabled in sh7085. bits 15 and 14 of paiorh are reserved. these bits are always read as 0. the write value should always be 0. the initial values of paiorl and paiorh are h'0000, respectively. ? port a i/o register h (paiorh) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w -- pa29 ior pa28 ior pa27 ior pa26 ior pa25 ior pa 2 4 ior pa23 ior pa22 ior pa 2 1 ior pa20 ior pa19 ior pa18 ior pa17 ior pa16 ior ? port a i/o register l (paiorl) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pa15 ior pa14 ior pa13 ior pa12 ior pa11 ior pa10 ior pa 9 ior pa 8 ior pa 7 ior pa 6 ior pa 5 ior pa 4 ior pa 3 ior pa 2 ior pa 1 ior pa 0 ior
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1049 of 1560 mar 18, 2011 sh7080 group 21.1.2 port a control registers l1 to l4, h1 to h4 (pacrl1 to pacrl4, pacrh1 to pacrh4) pacrl1 to pacrl4 and pacrh1 to pacrh4 are 16- bit readable/writable registers that are used to select the functions of the multiplexed pins on port a. sh7083: ? port a control registers h4 to h1 (pacrh4 to pacrh1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? port a control register l4 (pacrl4) bit: initial value: r/w: 151413121110987654321 0 0000 * 1 0000 * 2 0000 * 2 0000 * 2 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w notes: the initial value is 1 in the on-chip rom enabled/disabled external-extension mode. the initial value is 1 in the on-chip rom disabled external-extension mode. 1. 2. - pa15 md2 pa15 md1 pa15 md0 - pa14 md2 pa14 md1 pa 1 4 md0 - pa13 md2 pa 1 3 md1 pa13 md0 - pa12 md2 pa12 md1 pa12 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa15md2 pa15md1 pa15md0 0 0 0 * 1 r/w r/w r/w pa15 mode select the function of the pa15/ck pin. 000: pa15 i/o (port) 001: ck output (cpg) * 3 other than above: setting prohibited
section 21 pin function controller (pfc) page 1050 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa14md2 pa14md1 pa14md0 0 0 0 * 2 r/w r/w r/w pa14 mode select the function of the pa14/ rd pin. 000: pa14 i/o (port) 001: rd output (bsc) * 3 other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pa13md2 pa13md1 pa13md0 0 0 0 * 2 r/w r/w r/w pa13 mode select the function of the pa13/ wrh /dqmlu/ poe7 pin. 000: pa13 i/o (port) 001: wrh /dqmlu output (bsc) * 3 011: poe7 input (poe) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa12md2 pa12md1 pa12md0 0 0 0 * 2 r/w r/w r/w pa12 mode select the function of the pa12/ wrl /dqmll/ poe6 pin. 000: pa12 i/o (port) 001: wrl /dqmll output (bsc) * 3 011: poe6 input (poe) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom enabled/disabled external-extension mode. 2. the initial value is 1 in the on-chip rom disabled external-extension mode. 3. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1051 of 1560 mar 18, 2011 sh7080 group ? port a control register l3 (pacrl3) bit: initial value: r/w: 1514131211109876543210 00000000 * 00000000 rrrrrr/wr/wr/wrr/wr/wr/wrr/wr/wr/w the initial value is 1 in the on-chip rom disabled external-extension mode. ----- pa10 md2 pa10 md1 pa 1 0 md0 - pa 9 md2 pa 9 md1 pa 9 md0 - pa 8 md2 pa 8 md1 pa 8 md0 note: * bit bit name initial value r/w description 15 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 9 8 pa10md2 pa10md1 pa10md0 0 0 0 * 1 r/w r/w r/w pa10 mode select the function of the pa10/ cs0 / poe4 pin. 000: pa10 i/o (port) 001: cs0 output (bsc) * 2 011: poe4 input (poe) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pa9md2 pa9md1 pa9md0 0 0 0 r/w r/w r/w pa9 mode select the function of the pa9/cke/irq3/tclkd pin. 000: pa9 i/o (port) 001: tclkd input (mtu2) 010: irq3 input (intc) 101: cke output (bsc) * 2 other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1052 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pa8md2 pa8md1 pa8md0 0 0 0 r/w r/w r/w pa8 mode select the function of the pa8/rdwr/irq2/tclkc pin. 000: pa8 i/o (port) 001: tclkc input (mtu2) 010: irq2 input (intc) 101: rdwr output (bsc) * 2 other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register l2 (pacrl2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r r r r r/w r/w r/w r r/w r/w r/w - pa 7 md2 pa 7 md1 pa 7 md0 ----- pa 5 md2 pa 5 md1 pa 5 md0 - pa 4 md2 pa 4 md1 pa 4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa7md2 pa7md1 pa7md0 0 0 0 r/w r/w r/w pa7 mode select the function of the pa7/ cs3 /tclkb pin. 000: pa7 i/o (port) 001: tclkb input (mtu2) 010: cs3 output (bsc) * other than above: setting prohibited 11 to 7 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1053 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pa5md2 pa5md1 pa5md0 0 0 0 r/w r/w r/w pa5 mode select the function of the pa5/a22/dreq1/irq1/sck1 pin. 000: pa5 i/o (port) 001: sck1 i/o (sci) 010: dreq1 input (dmac) 011: irq1 input (intc) 101: a22 output (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa4md2 pa4md1 pa4md0 0 0 0 r/w r/w r/w pa4 mode select the function of the pa4/a23/txd1 pin. 000: pa4 i/o (port) 001: txd1 output (sci) 101: a23 output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register l1 (pacrl1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rr/wr/wr/wrrrrrrrrrrrr - pa 3 md2 pa 3 md1 pa 3 md0 ------------ bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1054 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pa3md2 pa3md1 pa3md0 0 0 0 r/w r/w r/w pa3 mode select the function of the pa3/a24/rxd1 pin. 000: pa3 i/o (port) 001: rxd1 output (sci) 101: a24 output (bsc) * other than above: setting prohibited 11 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. sh7084: ? port a control registers h4 to h2 (pacrh4 to pacrh2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1055 of 1560 mar 18, 2011 sh7080 group ? port a control register h1 (pacrh1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrr/wr/wrr/wr/wr/w ---------- pa 1 7 md1 pa17 md0 - pa16 md2 pa16 md1 pa16 md0 bit bit name initial value r/w description 15 to 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pa17md1 pa17md0 0 0 r/w r/w pa17 mode select the function of the pa17/ wait pin. 00: pa17 i/o (port) 01: wait input (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa16md2 pa16md1 pa16md0 0 0 0 r/w r/w r/w pa16 mode select the function of the pa16/ ah /cke pin. 000: pa16 i/o (port) 001: ah output (bsc) * 011: cke output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1056 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? port a control register l4 (pacrl4) bit: initial value: r/w: 1514131211109876543210 0000 * 1 0000 * 2 0000 * 2 0000 * 2 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w notes: the initial value is 1 in the on-chip rom enabled/disabled external-extension mode. the initial value is 1 in the on-chip rom disabled external-extension mode. 1. 2. - pa15 md2 pa15 md1 pa15 md0 - pa14 md2 pa14 md1 pa 1 4 md0 - pa13 md2 pa 1 3 md1 pa13 md0 - pa12 md2 pa12 md1 pa12 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa15md2 pa15md1 pa15md0 0 0 0 * 1 r/w r/w r/w pa15 mode select the function of the pa15/ck pin. 000: pa15 i/o (port) 001: ck output (cpg) * 3 other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa14md2 pa14md1 pa14md0 0 0 0 * 2 r/w r/w r/w pa14 mode select the function of the pa14/ rd pin. 000: pa14 i/o (port) 001: rd output (bsc) * 3 other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pa13md2 pa13md1 pa13md0 0 0 0 * 2 r/w r/w r/w pa13 mode select the function of the pa13/ wrh /dqmlu/ poe7 pin. 000: pa13 i/o (port) 001: wrh /dqmlu output (bsc) * 3 011: poe7 input (poe) other than above: setting prohibited
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1057 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa12md2 pa12md1 pa12md0 0 0 0 * 2 r/w r/w r/w pa12 mode select the function of the pa12/ wrl /dqmll/ poe6 pin. 000: pa12 i/o (port) 001: wrl /dqmll output (bsc) * 3 011: poe6 input (poe) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom enabled/disabled external-extension mode. 2. the initial value is 1 in the on-chip rom disabled external-extension mode. 3. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register l3 (pacrl3) bit: initial value: r/w: 151413121110987654321 0 0000 * 0000 * 00000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: the initial value is 1 in the on-chip rom disabled external-extension mode. * - pa11 md2 pa11 md1 pa11 md0 - pa10 md2 pa10 md1 pa 1 0 md0 - pa 9 md2 pa 9 md1 pa 9 md0 - pa 8 md2 pa 8 md1 pa 8 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa11md2 pa11md1 pa11md0 0 0 0 * 1 r/w r/w r/w pa11 mode select the function of the pa11/ cs1 / poe5 pin. 000: pa11 i/o (port) 001: cs1 output (bsc) * 3 011: poe5 input (poe) * 2 other than above: setting prohibited
section 21 pin function controller (pfc) page 1058 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa10md2 pa10md1 pa10md0 0 0 0 * 1 r/w r/w r/w pa10 mode select the function of the pa10/ cs0 / poe4 pin. 000: pa10 i/o (port) 001: cs0 output (bsc) * 3 011: poe4 input (poe) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pa9md2 pa9md1 pa9md0 0 0 0 r/w r/w r/w pa9 mode select the function of the pa9/cke/irq3/tclkd pin. 000: pa9 i/o (port) 001: tclkd input (mtu2) 010: irq3 input (intc) 101: cke output (bsc) * 3 other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa8md2 pa8md1 pa8md0 0 0 0 r/w r/w r/w pa8 mode select the function of the pa8/rdwr/irq2/tclkc pin. 000: pa8 i/o (port) 001: tclkc input (mtu2) 010: irq2 input (intc) 101: rdwr output (bsc) * 3 other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. when the poe5 input is selected, this setting cannot be changed. 3. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1059 of 1560 mar 18, 2011 sh7080 group ? port a control register l2 (pacrl2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pa 7 md2 pa 7 md1 pa 7 md0 - pa 6 md2 pa 6 md1 pa 6 md0 - pa 5 md2 pa 5 md1 pa 5 md0 - pa 4 md2 pa 4 md1 pa 4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa7md2 pa7md1 pa7md0 0 0 0 r/w r/w r/w pa7 mode select the function of the pa7/ cs3 /tclkb pin. 000: pa7 i/o (port) 001: tclkb input (mtu2) 010: cs3 output (bsc) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa6md2 pa6md1 pa6md0 0 0 0 r/w r/w r/w pa6 mode select the function of the pa6/ cs2 /tclka pin. 000: pa6 i/o (port) 001: tclka input (mtu2) 010: cs2 output (bsc) * other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1060 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pa5md2 pa5md1 pa5md0 0 0 0 r/w r/w r/w pa5 mode select the function of the pa5/a22/dreq1/irq1/sck1 pin. 000: pa5 i/o (port) 001: sck1 i/o (sci) 010: dreq1 input (dmac) 011: irq1 input (intc) 101: a22 output (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa4md2 pa4md1 pa4md0 0 0 0 r/w r/w r/w pa4 mode select the function of the pa4/a23/txd1 pin. 000: pa4 i/o (port) 001: txd1 output (sci) 101: a23 output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register l1 (pacrl1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pa 3 md2 pa 3 md1 pa 3 md0 - pa 2 md2 pa 2 md1 pa 2 md0 - pa 1 md2 pa 1 md1 pa 1 md0 - pa 0 md2 pa 0 md1 pa 0 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1061 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pa3md2 pa3md1 pa3md0 0 0 0 r/w r/w r/w pa3 mode select the function of the pa3/a24/rxd1 pin. 000: pa3 i/o (port) 001: rxd1 input (sci) 101: a24 output (bsc) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa2md2 pa2md1 pa2md0 0 0 0 r/w r/w r/w pa2 mode select the function of the pa2/a25/dreq0/irq0/sck0 pin. 000: pa2 i/o (port) 001: sck0 i/o (sci) 010: dreq0 input (dmac) 011: irq0 input (intc) 101: a25 output (bsc) * other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pa1md2 pa1md1 pa1md0 0 0 0 r/w r/w r/w pa1 mode select the function of the pa1/ cs5 /txd0 pin. 000: pa1 i/o (port) 001: txd0 output (sci) 101: cs5 output (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1062 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pa0md2 pa0md1 pa0md0 0 0 0 r/w r/w r/w pa0 mode select the function of the pa0/ cs4 /rxd0 pin. 000: pa0 i/o (port) 001: rxd0 input (sci) 101: cs4 output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. sh7085: ? port a control register h4 (pacrh4) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? port a control register h3 (pacrh3) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrr/wr/wrrr/wr/w ---------- pa 2 5 md1 pa25 md0 -- pa24 md1 pa24 md0 bit bit name initial value r/w description 15 to 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1063 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 4 pa25md1 pa25md0 0 0 r/w r/w pa25 mode select the function of the pa25/ ce2b /dack3/ poe8 pin. 00: pa25 i/o (port) 01: ce2b output (bsc) * 10: dack3 output (dmac) * 11: poe8 input (poe) 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 pa24md1 pa24md0 0 0 r/w r/w pa24 mode select the function of the pa24/ ce2a /dreq3 pin. 00: pa24 i/o (port) 01: ce2a output (bsc) * 10: dreq3 input (dmac) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register h2 (pacrh2) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 00000000 rrr/wr/wrrr/wr/wrrr/wr/wrrr/wr/w the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. -- pa23 md1 pa23 md0 -- pa22 md1 pa 2 2 md0 -- pa 2 1 md1 pa21 md0 -- pa20 md1 pa20 md0 note: * bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1064 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 13 12 pa23md1 pa23md0 0 0 * 1 r/w r/w pa23 mode select the function of the pa23/ wrhh / iciowr / ah /dqmuu/tic5w pin. 00: pa23 i/o (port) 01: wrhh / iciowr / ah /dqmuu output (bsc) * 2 11: tic5w input (mtu2) other than above: setting prohibited 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 8 pa22md1 pa22md0 0 0 * 1 r/w r/w pa22 mode select the function of the pa22/ wrhl / iciord /dqmul/tic5v pin. 00: pa22 i/o (port) 01: wrhl / iciord /dqmul output (bsc) * 2 11: tic5v input (mtu2) other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pa21md1 pa21md0 0 0 r/w r/w pa21 mode select the function of the pa21/ cs5 / ce1a / casu /tic5u pin. 00: pa21 i/o (port) 01: cs5 / ce1a output (bsc) * 2 10: casu output (bsc) * 2 11: tic5u input (mtu2) 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1065 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 0 pa20md1 pa20md0 0 0 r/w r/w pa20 mode select the function of the pa20/ cs4 / rasu pin. 00: pa20 i/o (port) 01: cs4 output (bsc) * 2 10: rasu output (bsc) * 2 other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register h1 (pacrh1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r r/w r/w r r r/w r/w r r r/w r/w r r/w r/w r/w -- pa19 md1 pa19 md0 -- pa18 md1 pa 1 8 md0 -- pa 1 7 md1 pa17 md0 - pa16 md2 pa16 md1 pa16 md0 bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 12 pa19md1 pa19md0 0 0 r/w r/w pa19 mode select the function of the pa19/ back /tend1 pin. 00: pa19 i/o (port) 01: back output (bsc) * 10: tend1 output (dmac) * other than above: setting prohibited 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1066 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 9 8 pa18md1 pa18md0 0 0 r/w r/w pa18 mode select the function of the pa18/ breq /tend0 pin. 00: pa18 i/o (port) 01: breq input (bsc) * 10: tend0 output (dmac) * other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pa17md1 pa17md0 0 0 r/w r/w pa17 mode select the function of the pa17/ wait /dack2 pin. 00: pa17 i/o (port) 01: wait input (bsc) * 10: dack2 output (dmac) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa16md2 pa16md1 pa16md0 0 0 0 r/w r/w r/w pa16 mode select the function of the pa16/ wrhh / iciowr / ah /dqmuu/cke/dreq2 / audsync pin. fixed to audsync output when using the aud function of the e10a. 000: pa16 i/o (port) 001: wrhh / iciowr / ah /dqmuu output (bsc) * 010: dreq2 input (dmac) 101: cke output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1067 of 1560 mar 18, 2011 sh7080 group ? port a control register l4 (pacrl4) bit: initial value: r/w: 1514131211109876543210 0000 * 1 0000 * 2 0000 * 2 0000 * 2 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w notes: the initial value is 1 in the on-chip rom enabled/disabled external-extension mode. the initial value is 1 in the on-chip rom disabled external-extension mode. 1. 2. - pa15 md2 pa15 md1 pa15 md0 - pa14 md2 pa14 md1 pa 1 4 md0 - pa13 md2 pa 1 3 md1 pa13 md0 - pa12 md2 pa12 md1 pa12 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa15md2 pa15md1 pa15md0 0 0 0 * 1 r/w r/w r/w pa15 mode select the function of the pa15/ck pin. 000: pa15 i/o (port) 001: ck output (cpg) * 3 other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa14md2 pa14md1 pa14md0 0 0 0 * 2 r/w r/w r/w pa14 mode select the function of the pa14/ rd pin. 000: pa14 i/o (port) 001: rd output (bsc) * 3 other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1068 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pa13md2 pa13md1 pa13md0 0 0 0 * 2 r/w r/w r/w pa13 mode select the function of the pa13/ wrh / we /dqmlu/ poe7 pin. 000: pa13 i/o (port) 001: wrh / we /dqmlu output (bsc) * 3 011: poe7 input (poe) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa12md2 pa12md1 pa12md0 0 0 0 * 2 r/w r/w r/w pa12 mode select the function of the pa12/ wrl /dqmll/ poe6 pin. 000: pa12 i/o (port) 001: wrl /dqmll output (bsc) * 3 011: poe6 input (poe) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom enabled/disabled external-extension mode. 2. the initial value is 1 in the on-chip rom disabled external-extension mode. 3. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register l3 (pacrl3) bit: initial value: r/w: 151413121110987654321 0 0000 * 0000 * 00000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: the initial value is 1 in the on-chip rom disabled external-extension mode. * - pa11 md2 pa11 md1 pa11 md0 - pa10 md2 pa10 md1 pa 1 0 md0 - pa 9 md2 pa 9 md1 pa 9 md0 - pa 8 md2 pa 8 md1 pa 8 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1069 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pa11md2 pa11md1 pa11md0 0 0 0 * 1 r/w r/w r/w pa11 mode select the function of the pa11/ cs1 / poe5 pin. 000: pa11 i/o (port) 001: cs1 output (bsc) * 3 011: poe5 input (poe) * 2 other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa10md2 pa10md1 pa10md0 0 0 0 * 1 r/w r/w r/w pa10 mode select the function of the pa10/ cs0 / poe4 pin. 000: pa10 i/o (port) 001: cs0 output (bsc) * 3 011: poe4 input (poe) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pa9md2 pa9md1 pa9md0 0 0 0 r/w r/w r/w pa9 mode select the function of the pa9/ frame /cke/irq3/tclkd pin. 000: pa9 i/o (port) 001: tclkd input (mtu2) 010: irq3 input (intc) 011: frame output (bsc) * 3 101: cke output (bsc) * 3 other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1070 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pa8md2 pa8md1 pa8md0 0 0 0 r/w r/w r/w pa8 mode select the function of the pa8/rdwr/irq2/tclkc pin. 000: pa8 i/o (port) 001: tclkc input (mtu2) 010: irq2 input (intc) 101: rdwr output (bsc) * 3 other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. when the poe5 input is selected, this setting cannot be changed. 3. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register l2 (pacrl2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pa 7 md2 pa 7 md1 pa 7 md0 - pa 6 md2 pa 6 md1 pa 6 md0 - pa 5 md2 pa 5 md1 pa 5 md0 - pa 4 md2 pa 4 md1 pa 4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa7md2 pa7md1 pa7md0 0 0 0 r/w r/w r/w pa7 mode select the function of the pa7/ cs3 /tclkb pin. 000: pa7 i/o (port) 001: tclkb input (mtu2) 010: cs3 output (bsc) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1071 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pa6md2 pa6md1 pa6md0 0 0 0 r/w r/w r/w pa6 mode select the function of the pa6/ cs2 /tclka pin. 000: pa6 i/o (port) 001: tclka input (mtu2) 010: cs2 output (bsc) * other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pa5md2 pa5md1 pa5md0 0 0 0 r/w r/w r/w pa5 mode select the function of the pa5/a22/dreq1/irq1/sck1 pin. 000: pa5 i/o (port) 001: sck1 i/o (sci) 010: dreq1 input (dmac) 011: irq1 input (intc) 101: a22 output (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa4md2 pa4md1 pa4md0 0 0 0 r/w r/w r/w pa4 mode select the function of the pa4/a23/txd1 pin. 000: pa4 i/o (port) 001: txd1 output (sci) 101: a23 output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1072 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? port a control register l1 (pacrl1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pa 3 md2 pa 3 md1 pa 3 md0 - pa 2 md2 pa 2 md1 pa 2 md0 - pa 1 md2 pa 1 md1 pa 1 md0 - pa 0 md2 pa 0 md1 pa 0 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa3md2 pa3md1 pa3md0 0 0 0 r/w r/w r/w pa3 mode select the function of the pa3/a24/rxd1 pin. 000: pa3 i/o (port) 001: rxd1 input (sci) 101: a24 output (bsc) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa2md2 pa2md1 pa2md0 0 0 0 r/w r/w r/w pa2 mode select the function of the pa2/a25/dreq0/irq0/sck0 pin. 000: pa2 i/o (port) 001: sck0 i/o (sci) 010: dreq0 input (dmac) 011: irq0 input (intc) 101: a25 output (bsc) * other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1073 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pa1md2 pa1md1 pa1md0 0 0 0 r/w r/w r/w pa1 mode select the function of the pa1/ cs5 / ce1a /txd0 pin. 000: pa1 i/o (port) 001: txd0 output (sci) 101: cs5 / ce1a output (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa0md2 pa0md1 pa0md0 0 0 0 r/w r/w r/w pa0 mode select the function of the pa0/ cs4 /rxd0 pin. 000: pa0 i/o (port) 001: rxd0 input (sci) 101: cs4 output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. sh7086: ? port a control register h4 (pacrh4) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrr/wr/wrrr/wr/w ---------- pa 2 9 md1 pa29 md0 -- pa28 md1 pa28 md0 bit bit name initial value r/w description 15 to 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1074 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 4 pa29md1 pa29md0 0 0 r/w r/w pa29 mode select the function of the pa29/a29/irq3 pin. 00: pa29 i/o (port) 01: a29 output (bsc) * 11: irq3 input (intc) other than above: setting prohibited 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 pa28md1 pa28md0 0 0 r/w r/w pa28 mode select the function of the pa28/a28/irq2 pin. 00: pa28 i/o (port) 01: a28 output (bsc) * 11: irq2 input (intc) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register h3 (pacrh3) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrr/wr/wrrr/wr/wrrr/wr/wrrr/wr/w -- pa27 md1 pa27 md0 -- pa26 md1 pa 2 6 md0 -- pa 2 5 md1 pa25 md0 -- pa24 md1 pa24 md0 bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1075 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 13 12 pa27md1 pa27md0 0 0 r/w r/w pa27 mode select the function of the pa27/a27/irq1 pin. 00: pa27 i/o (port) 01: a27 output (bsc) * 11: irq1 input (intc) other than above: setting prohibited 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 8 pa26md1 pa26md0 0 0 r/w r/w pa26 mode select the function of the pa26/a26/irq0 pin. 00: pa26 i/o (port) 01: a26 output (bsc) * 11: irq0 input (intc) other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pa25md1 pa25md0 0 0 r/w r/w pa25 mode select the function of the pa25/ ce2b /dack3/ poe8 pin. 00: pa25 i/o (port) 01: ce2b output (bsc) * 10: dack3 output (dmac) * 11: poe8 input (poe) 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1076 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 0 pa24md1 pa24md0 0 0 r/w r/w pa24 mode select the function of the pa24/ ce2a /dreq3 pin. 00: pa24 i/o (port) 01: ce2a output (bsc) * 10: dreq3 input (dmac) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register h2 (pacrh2) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 00000000 rrr/wr/wrrr/wr/wrrr/wr/wrrr/wr/w the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. -- pa23 md1 pa23 md0 -- pa22 md1 pa 2 2 md0 -- pa 2 1 md1 pa21 md0 -- pa20 md1 pa20 md0 note: * bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 12 pa23md1 pa23md0 0 0 * 1 r/w r/w pa23 mode select the function of the pa23/ wrhh / iciowr / ah /dqmuu/tic5w pin. 00: pa23 i/o (port) 01: wrhh / iciowr / ah /dqmuu output (bsc) * 2 11: tic5w input (mtu2) other than above: setting prohibited 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1077 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 9 8 pa22md1 pa22md0 0 0 * 1 r/w r/w pa22 mode select the function of the pa22/ wrhl / iciord /dqmul/tic5v pin. 00: pa22 i/o (port) 01: wrhl / iciord /dqmul output (bsc) * 2 11: tic5v input (mtu2) other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pa21md1 pa21md0 0 0 r/w r/w pa21 mode select the function of the pa21/ cs5 / ce1a / casu /tic5u pin. 00: pa21 i/o (port) 01: cs5 / ce1a output (bsc) * 2 10: casu output (bsc) * 2 11: tic5u input (mtu2) 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 pa20md1 pa20md0 0 0 r/w r/w pa20 mode select the function of the pa20/ cs4 / rasu pin. 00: pa20 i/o (port) 01: cs4 output (bsc) * 2 10: rasu output (bsc) * 2 other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1078 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? port a control register h1 (pacrh1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r r/w r/w r r r/w r/w r r r/w r/w r r/w r/w r/w -- pa19 md1 pa19 md0 -- pa18 md1 pa 1 8 md0 -- pa 1 7 md1 pa17 md0 - pa16 md2 pa16 md1 pa16 md0 bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 12 pa19md1 pa19md0 0 0 r/w r/w pa19 mode select the function of the pa19/ back /tend1 pin. 00: pa19 i/o (port) 01: back output (bsc) * 10: tend1 output (dmac) * other than above: setting prohibited 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 8 pa18md1 pa18md0 0 0 r/w r/w pa18 mode select the function of the pa18/ breq /tend0 pin. 00: pa18 i/o (port) 01: breq input (bsc) * 10: tend0 output (dmac) * other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pa17md1 pa17md0 0 0 r/w r/w pa17 mode select the function of the pa17/ wait /dack2 pin. 00: pa17 i/o (port) 01: wait input (bsc) * 10: dack2 output (dmac) * other than above: setting prohibited
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1079 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa16md2 pa16md1 pa16md0 0 0 0 r/w r/w r/w pa16 mode select the function of the pa16/ wrhh / iciowr / ah /dqmuu/cke/dreq2 / audsync pin. fixed to audsync output when using the aud function of the e10a. 000: pa16 i/o (port) 001: wrhh / iciowr / ah /dqmuu output (bsc) * 010: dreq2 input (dmac) 101: cke output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register l4 (pacrl4) bit: initial value: r/w: 1514131211109876543210 0000 * 1 0000 * 2 0000 * 2 0000 * 2 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w notes: the initial value is 1 in the on-chip rom enabled/disabled external-extension mode. the initial value is 1 in the on-chip rom disabled external-extension mode. 1. 2. - pa15 md2 pa15 md1 pa15 md0 - pa14 md2 pa14 md1 pa 1 4 md0 - pa13 md2 pa 1 3 md1 pa13 md0 - pa12 md2 pa12 md1 pa12 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa15md2 pa15md1 pa15md0 0 0 0 * 1 r/w r/w r/w pa15 mode select the function of the pa15/ck pin. 000: pa15 i/o (port) 001: ck output (cpg) * 3 other than above: setting prohibited
section 21 pin function controller (pfc) page 1080 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa14md2 pa14md1 pa14md0 0 0 0 * 2 r/w r/w r/w pa14 mode select the function of the pa14/ rd pin. 000: pa14 i/o (port) 001: rd output (bsc) * 3 other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pa13md2 pa13md1 pa13md0 0 0 0 * 2 r/w r/w r/w pa13 mode select the function of the pa13/ wrh /dqmlu/ we / poe7 pin. 000: pa13 i/o (port) 001: wrh /dqmlu/ we output (bsc) * 3 011: poe7 input (poe) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa12md2 pa12md1 pa12md0 0 0 0 * 2 r/w r/w r/w pa12 mode select the function of the pa12/ wrl /dqmll/ poe6 pin. 000: pa12 i/o (port) 001: wrl /dqmll output (bsc) * 3 011: poe6 input (poe) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom enabled/disabled external-extension mode. 2. the initial value is 1 in the on-chip rom disabled external-extension mode. 3. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1081 of 1560 mar 18, 2011 sh7080 group ? port a control register l3 (pacrl3) bit: initial value: r/w: 151413121110987654321 0 0000 * 0000 * 00000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: the initial value is 1 in the on-chip rom disabled external-extension mode. * - pa11 md2 pa11 md1 pa11 md0 - pa10 md2 pa10 md1 pa 1 0 md0 - pa 9 md2 pa 9 md1 pa 9 md0 - pa 8 md2 pa 8 md1 pa 8 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa11md2 pa11md1 pa11md0 0 0 0 * 1 r/w r/w r/w pa11 mode select the function of the pa11/ cs1 / poe5 pin. 000: pa11 i/o (port) 001: cs1 output (bsc) * 3 011: poe5 input (poe) * 2 other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa10md2 pa10md1 pa10md0 0 0 0 * 1 r/w r/w r/w pa10 mode select the function of the pa10/ cs0 / poe4 pin. 000: pa10 i/o (port) 001: cs0 output (bsc) * 3 011: poe4 input (poe) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1082 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pa9md2 pa9md1 pa9md0 0 0 0 r/w r/w r/w pa9 mode select the function of the pa9/ frame /cke/irq3/tclkd pin. 000: pa9 i/o (port) 001: tclkd input (mtu2) 010: irq3 input (intc) 011: frame output (bsc) * 3 101: cke output (bsc) * 3 other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa8md2 pa8md1 pa8md0 0 0 0 r/w r/w r/w pa8 mode select the function of the pa8/rdwr/irq2/tclkc pin. 000: pa8 i/o (port) 001: tclkc input (mtu2) 010: irq2 input (intc) 101: rdwr output (bsc) * 3 other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. when the poe5 input is selected, this setting cannot be changed. 3. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1083 of 1560 mar 18, 2011 sh7080 group ? port a control register l2 (pacrl2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pa 7 md2 pa 7 md1 pa 7 md0 - pa 6 md2 pa 6 md1 pa 6 md0 - pa 5 md2 pa 5 md1 pa 5 md0 - pa 4 md2 pa 4 md1 pa 4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pa7md2 pa7md1 pa7md0 0 0 0 r/w r/w r/w pa7 mode select the function of the pa7/ cs3 /tclkb pin. 000: pa7 i/o (port) 001: tclkb input (mtu2) 010: cs3 output (bsc) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa6md2 pa6md1 pa6md0 0 0 0 r/w r/w r/w pa6 mode select the function of the pa6/ cs2 /tclka pin. 000: pa6 i/o (port) 001: tclka input (mtu2) 010: cs2 output (bsc) * other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1084 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pa5md2 pa5md1 pa5md0 0 0 0 r/w r/w r/w pa5 mode select the function of the pa5/a22/dreq1/irq1/sck1 pin. 000: pa5 i/o (port) 001: sck1 i/o (sci) 010: dreq1 input (dmac) 011: irq1 input (intc) 101: a22 output (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pa4md2 pa4md1 pa4md0 0 0 0 r/w r/w r/w pa4 mode select the function of the pa4/a23/txd1 pin. 000: pa4 i/o (port) 001: txd1 output (sci) 101: a23 output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port a control register l1 (pacrl1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pa 3 md2 pa 3 md1 pa 3 md0 - pa 2 md2 pa 2 md1 pa 2 md0 - pa 1 md2 pa 1 md1 pa 1 md0 - pa 0 md2 pa 0 md1 pa 0 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1085 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pa3md2 pa3md1 pa3md0 0 0 0 r/w r/w r/w pa3 mode select the function of the pa3/a24/rxd1 pin. 000: pa3 i/o (port) 001: rxd1 input (sci) 101: a24 output (bsc) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pa2md2 pa2md1 pa2md0 0 0 0 r/w r/w r/w pa2 mode select the function of the pa2/a25/dreq0/irq0/sck0 pin. 000: pa2 i/o (port) 001: sck0 i/o (sci) 010: dreq0 input (dmac) 011: irq0 input (intc) 101: a25 output (bsc) * other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pa1md2 pa1md1 pa1md0 0 0 0 r/w r/w r/w pa1 mode select the function of the pa1/ cs5 / ce1a /txd0 pin. 000: pa1 i/o (port) 001: txd0 output (sci) 101: cs5 / ce1a output (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1086 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pa0md2 pa0md1 pa0md0 0 0 0 r/w r/w r/w pa0 mode select the function of the pa0/ cs4 /rxd0 pin. 000: pa0 i/o (port) 001: rxd0 input (sci) 101: cs4 output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1087 of 1560 mar 18, 2011 sh7080 group 21.1.3 port b i/o register l (pbiorl) pbiorl is a 16-bit readable/writable register that is used to set the pins on port b as inputs or outputs. bits pb9ior to pb0ior correspond to pi ns pb9 to pb0 (names of multiplexed pins are here given as port names and pin numbers alone). pbiorl is enabled when the port b pins are functioning as general-purpose inputs/outputs (pb9 to pb0). in other states, pbiorl is disabled. a given pin on port b will be an output pin if the corresponding bit in pbiorl is set to 1, and an input pin if the bit is cleared to 0. however, bit 3 of pbiorl is disabled in sh7083. bits 15 to 10 of pbiorl are reserved. these bits are always read as 0. the write value should always be 0. the initial value of pbiorl is h'0000. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrr/wr/wr/wr/wr/wr/wr/wr/wr/wr/w ------ pb9 ior pb8 ior pb7 ior pb6 ior pb5 ior pb4 ior pb3 ior pb2 ior pb1 ior pb0 ior 21.1.4 port b control registers l1 to l3 (pbcrl1 to pbcrl3 ) pbcrl1 to pbcrl3 are 16-bit readable/writable regi sters that are used to select the function of the multiplexed pins on port b. sh7083: ? port b control register l3 (pbcrl3) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrr/wr/wr/wrr/wr/wr/w --------- pb9 md2 pb9 md1 pb9 md0 - pb8 md2 pb8 md1 pb8 md0 bit bit name initial value r/w description 15 to 7 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1088 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pb9md2 pb9md1 pb9md0 0 0 0 r/w r/w r/w pb9 mode select the function of the pb9/a21/irq7/ adtrg / poe8 pin. 000: pb9 i/o (port) 001: irq7 input (intc) 010: a21 output (bsc) * 011: adtrg input (a/d) 110: poe8 input (poe) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pb8md2 pb8md1 pb8md0 0 0 0 r/w r/w r/w pb8 mode select the function of the pb8/a20/ wait /irq6/sck0 pin. 000: pb8 i/o (port) 001: irq6 input (intc) 010: a20 output (bsc) * 011: wait input (bsc) * 100: sck0 i/o (sci) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1089 of 1560 mar 18, 2011 sh7080 group ? port b control register l2 (pbcrl2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pb7 md2 pb7 md1 pb7 md0 - pb6 md2 pb6 md1 pb6 md0 - pb5 md2 pb5 md1 pb5 md0 - pb4 md2 pb4 md1 pb4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pb7md2 pb7md1 pb7md0 0 0 0 r/w r/w r/w pb7 mode select the function of the pb7/a19/ breq /irq5/txd0 pin. 000: pb7 i/o (port) 001: irq5 input (intc) 010: a19 output (bsc) * 1 011: breq input (bsc) * 1 100: txd0 output (sci) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pb6md2 pb6md1 pb6md0 0 0 0 r/w r/w r/w pb6 mode select the function of the pb6/a18/ back /irq4/rxd0 pin. 000: pb6 i/o (port) 001: irq4 input (intc) 010: a18 output (bsc) * 1 011: back output (bsc) * 1 100: rxd0 input (sci) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1090 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pb5md2 pb5md1 pb5md0 0 0 0 r/w r/w r/w pb5 mode select the function of the pb5/ casl /irq3/ poe3 pin. 000: pb5 i/o (port) 001: irq3 input (intc) 010: poe3 input (poe) * 2 100: casl output (bsc) * 1 other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pb4md2 pb4md1 pb4md0 0 0 0 r/w r/w r/w pb4 mode select the function of the pb4/ rasl /irq2/ poe2 pin. 000: pb4 i/o (port) 001: irq2 input (intc) 010: poe2 input (poe) 100: rasl output (bsc) * 1 other than above: setting prohibited notes: 1. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. 2. when the poe3 input is selected, this setting cannot be changed. ? port b control register l1 (pbcrl1) bit: initial value: r/w: 1514131211109876543210 000000000000 * 0000 * rrrrrr/wr/wr/wrr/wr/wr/wrr/wr/wr/w the initial value is 1 in the on-chip rom disabled external-extension mode. ----- pb2 md2 pb2 md1 pb2 md0 - pb1 md2 pb1 md1 pb1 md0 - pb0 md2 pb0 md1 pb0 md0 note: * bit bit name initial value r/w description 15 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1091 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pb2md2 pb2md1 pb2md0 0 0 0 r/w r/w r/w pb2 mode select the function of the pb2/irq0/ poe0 pin. 000: pb2 i/o (port) 001: irq0 input (intc) 010: poe0 input (poe) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pb1md2 pb1md1 pb1md0 0 0 0 * 1 r/w r/w r/w pb1 mode select the function of the pb1/a17/tic5w pin. 000: pb1 i/o (port) 001: a17 output (bsc) * 2 011: tic5w input (mtu2) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pb0md2 pb0md1 pb0md0 0 0 0 * 1 r/w r/w r/w pb0 mode select the function of the pb0/a16/tic5ws pin. 000: pb0 i/o (port) 001: a16 output (bsc) * 2 011: tic5ws input (mtu2s) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1092 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group sh7084/sh7085/sh7086: ? port b control register l3 (pbcrl3) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrr/wr/wr/wrr/wr/wr/w --------- pb9 md2 pb9 md1 pb9 md0 - pb8 md2 pb8 md1 pb8 md0 bit bit name initial value r/w description 15 to 7 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 6 5 4 pb9md2 pb9md1 pb9md0 0 0 0 r/w r/w r/w pb9 mode select the function of the pb9/a21/irq7/ adtrg / poe8 pin. 000: pb9 i/o (port) 001: irq7 input (intc) 010: a21 output (bsc) * 011: adtrg input (a/d) 110: poe8 input (poe) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pb8md2 pb8md1 pb8md0 0 0 0 r/w r/w r/w pb8 mode select the function of the pb8/a20/ wait /irq6/sck0 pin. 000: pb8 i/o (port) 001: irq6 input (intc) 010: a20 output (bsc) * 011: wait input (bsc) * 100: sck0 i/o (sci) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1093 of 1560 mar 18, 2011 sh7080 group ? port b control register l2 (pbcrl2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pb7 md2 pb7 md1 pb7 md0 - pb6 md2 pb6 md1 pb6 md0 - pb5 md2 pb5 md1 pb5 md0 - pb4 md2 pb4 md1 pb4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pb7md2 pb7md1 pb7md0 0 0 0 r/w r/w r/w pb7 mode select the function of the pb7/a19/ breq /irq5/txd0 pin. 000: pb7 i/o (port) 001: irq5 input (intc) 010: a19 output (bsc) * 2 011: breq input (bsc) * 2 100: txd0 output (sci) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pb6md2 pb6md1 pb6md0 0 0 0 r/w r/w r/w pb6 mode select the function of the pb6/a18/ back /irq4/rxd0 pin. 000: pb6 i/o (port) 001: irq4 input (intc) 010: a18 output (bsc) * 2 011: back output (bsc) * 2 100: rxd0 input (sci) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1094 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pb5md2 pb5md1 pb5md0 0 0 0 r/w r/w r/w pb5 mode select the function of the pb5/ casl /irq3/ poe3 pin. 000: pb5 i/o (port) 001: irq3 input (intc) 010: poe3 input (poe) * 1 100: casl output (bsc) * 2 other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pb4md2 pb4md1 pb4md0 0 0 0 r/w r/w r/w pb4 mode select the function of the pb4/ rasl /irq2/ poe2 pin. 000: pb4 i/o (port) 001: irq2 input (intc) 010: poe2 input (poe) 100: rasl output (bsc) * 2 other than above: setting prohibited notes: 1. when the poe3 input is selected, this setting cannot be changed. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port b control register l1 (pbcrl1) bit: initial value: r/w: 1514131211109876543210 000000000000 * 0000 * r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w the initial value is 1 in the on-chip rom disabled external-extension mode. - pb3 md2 pb3 md1 pb3 md0 - pb2 md2 pb2 md1 pb2 md0 - pb1 md2 pb1 md1 pb1 md0 - pb0 md2 pb0 md1 pb0 md0 note: * bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1095 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pb3md2 pb3md1 pb3md0 0 0 0 r/w r/w r/w pb3 mode select the function of the pb3/irq1/ poe1 /sda pin. 000: pb3 i/o (port) 001: irq1 input (intc) 010: poe1 input (poe) 100: sda i/o (i 2 c2) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pb2md2 pb2md1 pb2md0 0 0 0 r/w r/w r/w pb2 mode select the function of the pb2/irq0/ poe0 /scl pin. 000: pb2 i/o (port) 001: irq0 input (intc) 010: poe0 input (poe) 100: scl i/o (i 2 c2) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pb1md2 pb1md1 pb1md0 0 0 0 * 1 r/w r/w r/w pb1 mode select the function of the pb1/a17/tic5w pin. 000: pb1 i/o (port) 001: a17 output (bsc) * 2 011: tic5w input (mtu2) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1096 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pb0md2 pb0md1 pb0md0 0 0 0 * 1 r/w r/w r/w pb0 mode select the function of the pb0/a16/tic5ws pin. 000: pb0 i/o (port) 001: a16 output (bsc) * 2 011: tic5ws input (mtu2s) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1097 of 1560 mar 18, 2011 sh7080 group 21.1.5 port c i/o registers l, h (pciorl, pciorh) pciorl and pciorh are 16-bit readable/writable regi sters that are used to set the pins on port c as inputs or outputs. bits pc25ior to pc18ior and pc15ior to pc0ior correspond to pins pc25 to pc18 and pc15 to pc0, respectively (names of multiplexed pins are here given as port names and pin numbers alone). pciorl is enabled when the port c pins are functioning as general-purpose inputs/outputs (pc15 to pc0). in other states, pciorl is disabled. pciorh is enabled when the port c pins are functioning as general-purpose input/output (pc25 to pc18). in other states, pciorh is disabled. a given pin on port c will be an output pin if the corresponding bit in pciorh or pciorl is set to 1, and an input pin if the bit is cleared to 0. however, bits 9 to 2 of pciorh are disabled in sh7083/sh7084/sh7085. bits 15 to 10, 1 and 0 of pciorh are reserved. th ese bits are always read as 0. the write value should always be 0. the initial values of pciorl and pciorh are h'0000, respectively. ? port c i/o register h (pciorh) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrr/wr/wr/wr/wr/wr/wr/wr/wrr ------ pc25 ior pc24 ior pc23 ior pc22 ior pc21 ior pc20 ior pc19 ior pc18 ior -- ? port c i/o register l (pciorl) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pc15 ior pc14 ior pc13 ior pc12 ior pc11 ior pc10 ior pc9 ior pc8 ior pc7 ior pc6 ior pc5 ior pc4 ior pc3 ior pc2 ior pc1 ior pc0 ior
section 21 pin function controller (pfc) page 1098 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 21.1.6 port c control registers l1 to l4, h1 to h3 (pccrl1 to pccrl4, pccrh1 to pccrh3) pccrl1 to pccrl4 and pccrh1 to pccrh3 are 16-bit readable/writabl e registers that are used to select the functions of the multiplexed pins on port c. sh7083/sh7084/sh7085: ? port c control registers h3 to h1 (pccrh3 to pccrh1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? port c control register l4 (pccrl4) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrrr/wrrrr/wrrrr/wrrrr/w the initial value is 1 in the on-chip rom disabled external-extension mode. --- pc15 md0 --- pc14 md0 --- pc13 md0 --- pc12 md0 note: * bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 pc15md0 0 * 1 r/w pc15 mode select the function of the pc15/a15 pin. 0: pc15 i/o (port) 1: a15 output (bsc) * 2
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1099 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pc14md0 0 * 1 r/w pc14 mode select the function of the pc14/a14 pin. 0: pc14 i/o (port) 1: a14 output (bsc) * 2 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 pc13md0 0 * 1 r/w pc13 mode select the function of the pc13/a13 pin. 0: pc13 i/o (port) 1: a13 output (bsc) * 2 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 pc12md0 0 * 1 r/w pc12 mode select the function of the pc12/a12 pin. 0: pc12 i/o (port) 1: a12 output (bsc) * 2 notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1100 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? port c control register l3 (pccrl3) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrrr/wrrrr/wrrrr/wrrrr/w the initial value is 1 in the on-chip rom disabled external-extension mode. --- pc11 md0 --- pc10 md0 --- pc9 md0 --- pc8 md0 note: * bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 pc11md0 0 * 1 r/w pc11 mode select the function of the pc11/a11 pin. 0: pc11 i/o (port) 1: a11 output (bsc) * 2 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pc10md0 0 * 1 r/w pc10 mode select the function of the pc10/a10 pin. 0: pc10 i/o (port) 1: a10 output (bsc) * 2 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 pc9md0 0 * 1 r/w pc9 mode select the function of the pc9/a9 pin. 0: pc9 i/o (port) 1: a9 output (bsc) * 2 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1101 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 pc8md0 0 * 1 r/w pc8 mode select the function of the pc8/a8 pin. 0: pc8 i/o (port) 1: a8 output (bsc) * 2 notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port c control register l2 (pccrl2) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrrr/wrrrr/wrrrr/wrrrr/w the initial value is 1 in the on-chip rom disabled external-extension mode. --- pc7 md0 --- pc6 md0 --- pc5 md0 --- pc4 md0 note: * bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 pc7md0 0 * 1 r/w pc7 mode select the function of the pc7/a7 pin. 0: pc7 i/o (port) 1: a7 output (bsc) * 2 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pc6md0 0 * 1 r/w pc6 mode select the function of the pc6/a6 pin. 0: pc6 i/o (port) 1: a6 output (bsc) * 2 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1102 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 pc5md0 0 * 1 r/w pc5 mode select the function of the pc5/a5 pin. 0: pc5 i/o (port) 1: a5 output (bsc) * 2 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 pc4md0 0 * 1 r/w pc4 mode select the function of the pc4/a4 pin. 0: pc4 i/o (port) 1: a4 output (bsc) * 2 notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port c control register l1 (pccrl1) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrrr/wrrrr/wrrrr/wrrrr/w the initial value is 1 in the on-chip rom disabled external-extension mode. --- pc3 md0 --- pc2 md0 --- pc1 md0 --- pc0 md0 note: * bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 pc3md0 0 * 1 r/w pc3 mode select the function of the pc3/a3 pin. 0: pc3 i/o (port) 1: a3 output (bsc) * 2 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1103 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 8 pc2md0 0 * 1 r/w pc2 mode select the function of the pc2/a2 pin. 0: pc2 i/o (port) 1: a2 output (bsc) * 2 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 pc1md0 0 * 1 r/w pc1 mode select the function of the pc1/a1 pin. 0: pc1 i/o (port) 1: a1 output (bsc) * 2 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 pc0md0 0 * 1 r/w pc0 mode select the function of the pc0/a0 pin. 0: pc0 i/o (port) 1: a0 output (bsc) * 2 notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1104 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group sh7086: ? port c control register h3 (pccrh3) bit: initial value: r/w: 1514131211109876543210 000000000000 * 0000 * rrrrrrrrrrrr/wrrrr/w the initial value is 1 in the on-chip rom disabled external-extension mode. ----------- pc25 md0 --- pc24 md0 note: * bit bit name initial value r/w description 15 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 pc25md0 0 * 1 r/w pc25 mode select the function of the pc25/a25 pin. 0: pc25 i/o (port) 1: a25 output (bsc) * 2 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 pc24md0 0 * 1 r/w pc24 mode select the function of the pc24/a24 pin. 0: pc24 i/o (port) 1: a24 output (bsc) * 2 notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port c control register h2 (pccrh2) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrrr/wrrrr/wrrrr/wrrrr/w the initial value is 1 in the on-chip rom disabled external-extension mode. --- pc23 md0 --- pc22 md0 --- pc21 md0 --- pc20 md0 note: *
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1105 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 pc23md0 0 * 1 r/w pc23 mode select the function of the pc23/a23 pin. 0: pc23 i/o (port) 1: a23 output (bsc) * 2 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pc22md0 0 * 1 r/w pc22 mode select the function of the pc22/a22 pin. 0: pc22 i/o (port) 1: a22 output (bsc) * 2 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 pc21md0 0 * 1 r/w pc21 mode select the function of the pc21/a21 pin. 0: pc21 i/o (port) 1: a21 output (bsc) * 2 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 pc20md0 0 * 1 r/w pc20 mode select the function of the pc20/a20 pin. 0: pc20 i/o (port) 1: a20 output (bsc) * 2 notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1106 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? port c control register h1 (pccrh1) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 00000000 rrrr/wrrrr/wrrrrrrrr the initial value is 1 in the on-chip rom disabled external-extension mode. --- pc19 md0 --- pc18 md0 -------- note: * bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 pc19md0 0 * 1 r/w pc19 mode select the function of the pc19/a19 pin. 0: pc19 i/o (port) 1: a19 output (bsc) * 2 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pc18md0 0 * 1 r/w pc18 mode select the function of the pc18/a18 pin. 0: pc18 i/o (port) 1: a18 output (bsc) * 2 7 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port c control register l4 (pccrl4) bit: initial value: r/w: 151413121110987654321 0 0000 * 0000 * 0000 * 0000 * rrrr/wrrrr/wrrrr/wrrrr/w note: the initial value is 1 in the on-chip rom disabled external-extension mode. * --- pc15 md0 --- pc14 md0 --- pc13 md0 --- pc12 md0
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1107 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 pc15md0 0 * 1 r/w pc15 mode select the function of the pc15/a15 pin. 0: pc15 i/o (port) 1: a15 output (bsc) * 2 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pc14md0 0 * 1 r/w pc14 mode select the function of the pc14/a14 pin. 0: pc14 i/o (port) 1: a14 output (bsc) * 2 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 pc13md0 0 * 1 r/w pc13 mode select the function of the pc13/a13 pin. 0: pc13 i/o (port) 1: a13 output (bsc) * 2 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 pc12md0 0 * 1 r/w pc12 mode select the function of the pc12/a12 pin. 0: pc12 i/o (port) 1: a12 output (bsc) * 2 notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1108 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? port c control register l3 (pccrl3) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrrr/wrrrr/wrrrr/wrrrr/w note: the initial value is 1 in the on-chip rom disabled external-extension mode. --- pc11 md0 --- pc10 md0 --- pc9 md0 --- pc8 md0 * bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 pc11md0 0 * 1 r/w pc11 mode select the function of the pc11/a11 pin. 0: pc11 i/o (port) 1: a11 output (bsc) * 2 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pc10md0 0 * 1 r/w pc10 mode select the function of the pc10/a10 pin. 0: pc10 i/o (port) 1: a10 output (bsc) * 2 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 pc9md0 0 * 1 r/w pc9 mode select the function of the pc9/a9 pin. 0: pc9 i/o (port) 1: a9 output (bsc) * 2 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1109 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 pc8md0 0 * 1 r/w pc8 mode select the function of the pc8/a8 pin. 0: pc8 i/o (port) 1: a8 output (bsc) * 2 notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port c control register l2 (pccrl2) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrrr/wrrrr/wrrrr/wrrrr/w note: the initial value is 1 in the on-chip rom disabled external-extension mode. --- pc7 md0 --- pc6 md0 --- pc5 md0 --- pc4 md0 * bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 pc7md0 0 * 1 r/w pc7 mode select the function of the pc7/a7 pin. 0: pc7 i/o (port) 1: a7 output (bsc) * 2 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pc6md0 0 * 1 r/w pc6 mode select the function of the pc6/a6 pin. 0: pc6 i/o (port) 1: a6 output (bsc) * 2 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1110 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 pc5md0 0 * 1 r/w pc5 mode select the function of the pc5/a5 pin. 0: pc5 i/o (port) 1: a5 output (bsc) * 2 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 pc4md0 0 * 1 r/w pc4 mode select the function of the pc4/a4 pin. 0: pc4 i/o (port) 1: a4 output (bsc) * 2 notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port c control register l1 (pccrl1) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrrr/wrrrr/wrrrr/wrrrr/w note: * the initial value is 1 in the on-chip rom disabled external-extension mode. --- pc3 md0 --- pc2 md0 --- pc1 md0 --- pc0 md0 bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 pc3md0 0 * 1 r/w pc3 mode select the function of the pc3/a3 pin. 0: pc3 i/o (port) 1: a3 output (bsc) * 2 11 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1111 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 8 pc2md0 0 * 1 r/w pc2 mode select the function of the pc2/a2 pin. 0: pc2 i/o (port) 1: a2 output (bsc) * 2 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 pc1md0 0 * 1 r/w pc1 mode select the function of the pc1/a1 pin. 0: pc1 i/o (port) 1: a1 output (bsc) * 2 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 pc0md0 0 * 1 r/w pc0 mode select the function of the pc0/a0 pin. 0: pc0 i/o (port) 1: a0 output (bsc) * 2 notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1112 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 21.1.7 port d i/o registers l, h (pdiorl, pdiorh) pdiorl and pdiorh are 16-bit readable/writable regi sters that are used to set the pins on port d as inputs or outputs. bits pd31ior to pd0ior correspond to pins pd31 to pd0 (names of multiplexed pins are here given as port names and pin numbers alone). pdiorl is enabled when the port d pins are functioning as general-purpose inputs/outputs (pd15 to pd0), and the tioc pin is functioning as inputs/outputs of mtu2s. in other states, pdiorl is disabled. pdiorh is enabled when the port d pins are functioning as general-purpose inputs/outputs (pd31 to pd16), and the tioc pin is functioning as inputs/outputs of mtu2s. in other states, pdiorh is disabled. a given pin on port d will be an output pin if the corresponding bit in pdiorh or pdiorl is set to 1, and an input pin if the bit is cleared to 0. however, pdiorh is disabled in sh7083/sh7084. the initial values of pdiorl and pdiorh are h'0000, respectively. ? port d i/o register h (pdiorh) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pd31 ior pd30 ior pd29 ior pd28 ior pd27 ior pd26 ior pd25 ior pd24 ior pd23 ior pd22 ior pd21 ior pd20 ior pd19 ior pd18 ior pd17 ior pd16 ior ? port d i/o register l (pdiorl) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pd15 ior pd14 ior pd13 ior pd12 ior pd11 ior pd10 ior pd9 ior pd8 ior pd7 ior pd6 ior pd5 ior pd4 ior pd3 ior pd2 ior pd1 ior pd0 ior
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1113 of 1560 mar 18, 2011 sh7080 group 21.1.8 port d control registers l1 to l4, h1 to h4 (pdcrl1 to pdcrl4, pdcrh1 to pdcrh4) pdcrl1 to pdcrl4 and pdcrh1 to pdcrh4 are 16- bit readable/writable registers that are used to select the functions of the multiplexed pins on port d. sh7083/sh7084: ? port d control registers h4 to h1 (pdcrh4 to pdcrh1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? port d control register l4 (pdcrl4) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrr/wr/wrrr/wr/wrrr/wr/wrrr/wr/w note: * the initial value is 1 in the on-chip rom disabled 16-bit external-extension mode. -- pd15 md1 pd15 md0 -- pd14 md1 pd14 md0 -- pd13 md1 pd13 md0 -- pd12 md1 pd12 md0 bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1114 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 13 12 pd15md1 pd15md0 0 0 * 1 r/w r/w pd15 mode select the function of the pd15/d15/tioc4ds/ audsync pin. fixed to audsync output when using the aud function of the e10a. 00: pd15 i/o (port) 01: d15 i/o (bsc) * 2 11: tioc4ds i/o (mtu2s) other than above: setting prohibited 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 8 pd14md1 pd14md0 0 0 * 1 r/w r/w pd14 mode select the function of the pd14/d14/tioc4cs/audck pin. fixed to audck output when using the aud function of the e10a. 00: pd14 i/o (port) 01: d14 i/o (bsc) * 2 11: tioc4cs i/o (mtu2s) other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pd13md1 pd13md0 0 0 * 1 r/w r/w pd13 mode select the function of the pd13/d13/tioc4bs pin. 00: pd13 i/o (port) 01: d13 i/o (bsc) * 2 11: tioc4bs i/o (mtu2s) other than above: setting prohibited 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1115 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 0 pd12md1 pd12md0 0 0 * 1 r/w r/w pd12 mode select the function of the pd12/d12/tioc4as pin. 00: pd12 i/o (port) 01: d12 i/o (bsc) * 2 11: tioc4as i/o (mtu2s) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled 16-bit external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port d control register l3 (pdcrl3) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * r r r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: * the initial value is 1 in the on-chip rom disabled 16-bit external-extension mode. -- pd11 md1 pd11 md0 - pd10 md2 pd10 md1 pd10 md0 - pd9 md2 pd9 md1 pd9 md0 - pd8 md2 pd8 md1 pd8 md0 bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 12 pd11md1 pd11md0 0 0 * 1 r/w r/w pd11 mode select the function of the pd11/d11/tioc3ds/audata3 pin. fixed to audata3 output when using the aud function of the e10a. 00: pd11 i/o (port) 01: d11 i/o (bsc) * 2 11: tioc3ds i/o (mtu2s) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1116 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pd10md2 pd10md1 pd10md0 0 0 0 * 1 r/w r/w r/w pd10 mode select the function of the pd10/d10/tioc3cs/audata2 pin. fixed to audata2 output when using the aud function of the e10a. 000: pd10 i/o (port) 001: d10 i/o (bsc) * 2 011: tioc3cs i/o (mtu2s) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pd9md2 pd9md1 pd9md0 0 0 0 * 1 r/w r/w r/w pd9 mode select the function of the pd9/d9/tioc3bs/audata1 pin. fixed to audata1 output when using the aud function of the e10a. 000: pd9 i/o (port) 001: d9 i/o (bsc) * 2 011: tioc3bs i/o (mtu2s) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pd8md2 pd8md1 pd8md0 0 0 0 * 1 r/w r/w r/w pd8 mode select the function of the pd8/d8/tioc3as/audata0 pin. fixed to audata0 output when using the aud function of the e10a. 000: pd8 i/o (port) 001: d8 i/o (bsc) * 2 011: tioc3as i/o (mtu2s) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled 16-bit external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1117 of 1560 mar 18, 2011 sh7080 group ? port d control register l2 (pdcrl2) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: * the initial value is 1 in the on-chip rom disabled external-extension mode. - pd7 md2 pd7 md1 pd7 md0 - pd6 md2 pd6 md1 pd6 md0 - pd5 md2 pd5 md1 pd5 md0 - pd4 md2 pd4 md1 pd4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pd7md2 pd7md1 pd7md0 0 0 0 * 1 r/w r/w r/w pd7 mode select the function of the pd7/d7/tic5ws pin. 000: pd7 i/o (port) 001: d7 i/o (bsc) * 2 010: tic5ws input (mtu2s) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pd6md2 pd6md1 pd6md0 0 0 0 * 1 r/w r/w r/w pd6 mode select the function of the pd6/d6/tic5vs pin. 000: pd6 i/o (port) 001: d6 i/o (bsc) * 2 010: tic5vs input (mtu2s) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1118 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pd5md2 pd5md1 pd5md0 0 0 0 * 1 r/w r/w r/w pd5 mode select the function of the pd5/d5/tic5us pin. 000: pd5 i/o (port) 001: d5 i/o (bsc) * 2 010: tic5us input (mtu2s) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pd4md2 pd4md1 pd4md0 0 0 0 * 1 r/w r/w r/w pd4 mode select the function of the pd4/d4/tic5w pin. 000: pd4 i/o (port) 001: d4 i/o (bsc) * 2 010: tic5w input (mtu2) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port d control register l1 (pdcrl1) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: * the initial value is 1 in the on-chip rom disabled external-extension mode. - pd3 md2 pd3 md1 pd3 md0 - pd2 md2 pd2 md1 pd2 md0 - pd1 md2 pd1 md1 pd1 md0 - pd0 md2 pd0 md1 pd0 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1119 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pd3md2 pd3md1 pd3md0 0 0 0 * 1 r/w r/w r/w pd3 mode select the function of the pd3/d3/tic5v pin. 000: pd3 i/o (port) 001: d3 i/o (bsc) * 2 010: tic5v input (mtu2) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pd2md2 pd2md1 pd2md0 0 0 0 * 1 r/w r/w r/w pd2 mode select the function of the pd2/d2/tic5u pin. 000: pd2 i/o (port) 001: d2 i/o (bsc) * 2 010: tic5u input (mtu2) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pd1md2 pd1md1 pd1md0 0 0 0 * 1 r/w r/w r/w pd1 mode select the function of the pd1/d1 pin. 000: pd1 i/o (port) 001: d1 i/o (bsc) * 2 other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pd0md2 pd0md1 pd0md0 0 0 0 * 1 r/w r/w r/w pd0 mode select the function of the pd0/d0 pin. 000: pd0 i/o (port) 001: d0 i/o (bsc) * 2 other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1120 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group sh7085/sh7086: ? port d control register h4 (pdcrh4) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrr/wr/wrrr/wr/wrrr/wr/wrrr/wr/w note: * the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. -- pd31 md1 pd31 md0 -- pd30 md1 pd30 md0 -- pd29 md1 pd29 md0 -- pd28 md1 pd28 md0 bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 12 pd31md1 pd31md0 0 0 * 1 r/w r/w pd31 mode select the function of the pd31/d31/tioc3as/ adtrg pin. 00: pd31 i/o (port) 01: d31 i/o (bsc) * 2 10: adtrg input (a/d) 11: tioc3as i/o (mtu2s) 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 8 pd30md1 pd30md0 0 0 * 1 r/w r/w pd30 mode select the function of the pd30/d30/tioc3cs/ irqout pin. 00: pd30 i/o (port) 01: d30 i/o (bsc) * 2 10: irqout output (intc) 11: tioc3cs i/o (mtu2s) 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1121 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 4 pd29md1 pd29md0 0 0 * 1 r/w r/w pd29 mode select the function of the pd29/d29/ cs3 /tioc3bs pin. 00: pd29 i/o (port) 01: d29 i/o (bsc) * 2 10: cs3 output (bsc) * 2 11: tioc3bs i/o (mtu2s) 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 pd28md1 pd28md0 0 0 * 1 r/w r/w pd28 mode select the function of the pd28/d28/ cs2 /tioc3ds pin. 00: pd28 i/o (port) 01: d28 i/o (bsc) * 2 10: cs2 output (bsc) * 2 11: tioc3ds i/o (mtu2s) notes: 1. the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port d control register h3 (pdcrh3) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrr/wr/wrrr/wr/wrrr/wr/wrrr/wr/w note: the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. -- pd27 md1 pd27 md0 -- pd26 md1 pd26 md0 -- pd25 md1 pd25 md0 -- pd24 md1 pd24 md0 * bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1122 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 13 12 pd27md1 pd27md0 0 0 * 1 r/w r/w pd27 mode select the function of the pd27/d27/dack1/tioc4as pin. 00: pd27 i/o (port) 01: d27 i/o (bsc) * 2 10: dack1 output (dmac) * 2 11: tioc4as i/o (mtu2s) 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 8 pd26md1 pd26md0 0 0 * 1 r/w r/w pd26 mode select the function of the pd26/d26/dack0/tioc4bs pin. 00: pd26 i/o (port) 01: d26 i/o (bsc) * 2 10: dack0 output (dmac) * 2 11: tioc4bs i/o (mtu2s) 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pd25md1 pd25md0 0 0 * 1 r/w r/w pd25 mode select the function of the pd25/d25/dreq1/tioc4cs pin. 00: pd25 i/o (port) 01: d25 i/o (bsc) * 2 10: dreq1 input (dmac) 11: tioc4cs i/o (mtu2s) 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1123 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 0 pd24md1 pd24md0 0 0 * 1 r/w r/w pd24 mode select the function of the pd24/d24/dreq0/tioc4ds pin. 00: pd24 i/o (port) 01: d24 i/o (bsc) * 2 10: dreq0 input (dmac) 11: tioc4ds i/o (mtu2s) notes: 1. the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port d control register h2 (pdcrh2) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * r r r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. -- pd23 md1 pd23 md0 - pd22 md2 pd22 md1 pd22 md0 - pd21 md2 pd21 md1 pd21 md0 - pd20 md2 pd20 md1 pd20 md0 * bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 12 pd23md1 pd23md0 0 0 * 1 r/w r/w pd23 mode select the function of the pd23/d23/irq7/ audsync pin. fixed to audsync output when using the aud function of the e10a. 00: pd23 i/o (port) 01: d23 i/o (bsc) * 2 10: irq7 input (intc) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1124 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pd22md2 pd22md1 pd22md0 0 0 0 * 1 r/w r/w r/w pd22 mode select the function of the pd22/d22/irq6/tic5us/audck pin. fixed to audck output when using the aud function of the e10a. 000: pd22 i/o (port) 001: d22 i/o (bsc) * 2 010: irq6 input (intc) 100: tic5us i/o (mtu2s) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pd21md2 pd21md1 pd21md0 0 0 0 * 1 r/w r/w r/w pd21 mode select the function of the pd21/d21/irq5/tic5vs pin. 000: pd21 i/o (port) 001: d21 i/o (bsc) * 2 010: irq5 input (intc) 100: tic5vs i/o (mtu2s) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pd20md2 pd20md1 pd20md0 0 0 0 * 1 r/w r/w r/w pd20 mode select the function of the pd20/d20/irq4/tic5ws pin. 000: pd20 i/o (port) 001: d20 i/o (bsc) * 2 010: irq4 input (intc) 100: tic5ws i/o (mtu2s) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1125 of 1560 mar 18, 2011 sh7080 group ? port d control register h1 (pdcrh1) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: * the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. - pd19 md2 pd19 md1 pd19 md0 - pd18 md2 pd18 md1 pd18 md0 - pd17 md2 pd17 md1 pd17 md0 - pd16 md2 pd16 md1 pd16 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pd19md2 pd19md1 pd19md0 0 0 0 * 1 r/w r/w r/w pd19 mode select the function of the pd19/d19/irq3/ poe7 /audata3 pin. fixed to audata3 output when using the aud function of the e10a. 000: pd19 i/o (port) 001: d19 i/o (bsc) * 2 010: irq3 input (intc) 100: poe7 input (poe) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pd18md2 pd18md1 pd18md0 0 0 0 * 1 r/w r/w r/w pd18 mode select the function of the pd18/d18/irq2/ poe6 /audata2 pin. fixed to audata2 output when using the aud function of the e10a. 000: pd18 i/o (port) 001: d18 i/o (bsc) * 2 010: irq2 input (intc) 100: poe6 input (poe) other than above: setting prohibited
section 21 pin function controller (pfc) page 1126 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pd17md2 pd17md1 pd17md0 0 0 0 * 1 r/w r/w r/w pd17 mode select the function of the pd17/d17/irq1/ poe5 /audata1 pin. fixed to audata1 output when using the aud function of the e10a. 000: pd17 i/o (port) 001: d17 i/o (bsc) * 2 010: irq1 input (intc) 100: poe5 input (poe) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pd16md2 pd16md1 pd16md0 0 0 0 * 1 r/w r/w r/w pd16 mode select the function of the pd16/d16/irq0/ poe4 /audata0 pin. fixed to audata0 output when using the aud function of the e10a. 000: pd16 i/o (port) 001: d16 i/o (bsc) * 2 010: irq0 input (intc) 100: poe4 input (poe) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled 32-bit external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1127 of 1560 mar 18, 2011 sh7080 group ? port d control register l4 (pdcrl4) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * rrr/wr/wrrr/wr/wrrr/wr/wrrr/wr/w note: * the initial value is 1 in the on-chip rom disabled external-extension mode. -- pd15 md1 pd15 md0 -- pd14 md1 pd14 md0 -- pd13 md1 pd13 md0 -- pd12 md1 pd12 md0 bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 12 pd15md1 pd15md0 0 0 * 1 r/w r/w pd15 mode select the function of the pd15/d15/tioc4ds pin. 00: pd15 i/o (port) 01: d15 i/o (bsc) * 2 11: tioc4ds i/o (mtu2s) other than above: setting prohibited 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 8 pd14md1 pd14md0 0 0 * 1 r/w r/w pd14 mode select the function of the pd14/d14/tioc4cs pin. 00: pd14 i/o (port) 01: d14 i/o (bsc) * 2 11: tioc4cs i/o (mtu2s) other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pd13md1 pd13md0 0 0 * 1 r/w r/w pd13 mode select the function of the pd13/d13/tioc4bs pin. 00: pd13 i/o (port) 01: d13 i/o (bsc) * 2 11: tioc4bs i/o (mtu2s) other than above: setting prohibited
section 21 pin function controller (pfc) page 1128 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 pd12md1 pd12md0 0 0 * 1 r/w r/w pd12 mode select the function of the pd12/d12/tioc4as pin. 00: pd12 i/o (port) 01: d12 i/o (bsc) * 2 11: tioc4as i/o (mtu2s) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port d control register l3 (pdcrl3) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * r r r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: the initial value is 1 in the on-chip rom disabled external-extension mode. -- pd11 md1 pd11 md0 - pd10 md2 pd10 md1 pd10 md0 - pd9 md2 pd9 md1 pd9 md0 - pd8 md2 pd8 md1 pd8 md0 * bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 12 pd11md1 pd11md0 0 0 * 1 r/w r/w pd11 mode select the function of the pd11/d11/tioc3ds pin. 00: pd11 i/o (port) 01: d11 i/o (bsc) * 2 11: tioc3ds i/o (mtu2s) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1129 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pd10md2 pd10md1 pd10md0 0 0 0 * 1 r/w r/w r/w pd10 mode select the function of the pd10/d10/tioc3cs pin. 000: pd10 i/o (port) 001: d10 i/o (bsc) * 2 011: tioc3cs i/o (mtu2s) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pd9md2 pd9md1 pd9md0 0 0 0 * 1 r/w r/w r/w pd9 mode select the function of the pd9/d9/tioc3bs pin. 000: pd9 i/o (port) 001: d9 i/o (bsc) * 2 011: tioc3bs i/o (mtu2s) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pd8md2 pd8md1 pd8md0 0 0 0 * 1 r/w r/w r/w pd8 mode select the function of the pd8/d8/tioc3as pin. 000: pd8 i/o (port) 001: d8 i/o (bsc) * 2 011: tioc3as i/o (mtu2s) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) page 1130 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? port d control register l2 (pdcrl2) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: the initial value is 1 in the on-chip rom disabled external-extension mode. - pd7 md2 pd7 md1 pd7 md0 - pd6 md2 pd6 md1 pd6 md0 - pd5 md2 pd5 md1 pd5 md0 - pd4 md2 pd4 md1 pd4 md0 * bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pd7md2 pd7md1 pd7md0 0 0 0 * 1 r/w r/w r/w pd7 mode select the function of the pd7/d7/tic5ws pin. 000: pd7 i/o (port) 001: d7 i/o (bsc) * 2 010: tic5ws input (mtu2s) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pd6md2 pd6md1 pd6md0 0 0 0 * 1 r/w r/w r/w pd6 mode select the function of the pd6/d6/tic5vs pin. 000: pd6 i/o (port) 001: d6 i/o (bsc) * 2 010: tic5vs input (mtu2s) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pd5md2 pd5md1 pd5md0 0 0 0 * 1 r/w r/w r/w pd5 mode select the function of the pd5/d5/tic5us pin. 000: pd5 i/o (port) 001: d5 i/o (bsc) * 2 010: tic5us input (mtu2s) other than above: setting prohibited
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1131 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pd4md2 pd4md1 pd4md0 0 0 0 * 1 r/w r/w r/w pd4 mode select the function of the pd4/d4/tic5w pin. 000: pd4 i/o (port) 001: d4 i/o (bsc) * 2 010: tic5w input (mtu2) other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port d control register l1 (pdcrl1) bit: initial value: r/w: 1514131211109876543210 0000 * 0000 * 0000 * 0000 * r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w note: the initial value is 1 in the on-chip rom disabled external-extension mode. - pd3 md2 pd3 md1 pd3 md0 - pd2 md2 pd2 md1 pd2 md0 - pd1 md2 pd1 md1 pd1 md0 - pd0 md2 pd0 md1 pd0 md0 * bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pd3md2 pd3md1 pd3md0 0 0 0 * 1 r/w r/w r/w pd3 mode select the function of the pd3/d3/tic5v pin. 000: pd3 i/o (port) 001: d3 i/o (bsc) * 2 010: tic5v input (mtu2) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1132 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pd2md2 pd2md1 pd2md0 0 0 0 * 1 r/w r/w r/w pd2 mode select the function of the pd2/d2/tic5u pin. 000: pd2 i/o (port) 001: d2 i/o (bsc) * 2 010: tic5u input (mtu2) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pd1md2 pd1md1 pd1md0 0 0 0 * 1 r/w r/w r/w pd1 mode select the function of the pd1/d1 pin. 000: pd1 i/o (port) 001: d1 i/o (bsc) * 2 other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pd0md2 pd0md1 pd0md0 0 0 0 * 1 r/w r/w r/w pd0 mode select the function of the pd0/d0 pin. 000: pd0 i/o (port) 001: d0 i/o (bsc) * 2 other than above: setting prohibited notes: 1. the initial value is 1 in the on-chip rom disabled external-extension mode. 2. this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1133 of 1560 mar 18, 2011 sh7080 group 21.1.9 port e i/o registers l, h (peiorl, peiorh) peiorl and peiorh are 16-bit readable/writable regi sters that are used to set the pins on port e as inputs or outputs. pe21ior to pe0ior corres pond to pins pe21 to pe0 (names of multiplexed pins are here given as port names and pin numbers alone). peiorl is enabled when the port e pins are functioning as general-purpose inputs/outputs (pe15 to pe0) and the tioc pin is functioning as inputs/outputs of mtu2. in other states, peiorl is disabled. peiorh is enabled when the port e pins are functioning as general-purpose inputs/outputs (pe21 to pe16), and the tioc pin is functioning as inputs/outputs of mtu2s. in other states, peiorh is disabled. a given pin on port e will be an output pin if the corresponding bit in peiorh or peiorl is set to 1, and an input pin if the bit is cleared to 0. however, bits 11, 9, and 5 of peiorh and peiorl are disabled in sh7083. peiorh is disabled in sh7084/sh7085. bits 15 to 6 of peiorh are reserved. these bits are always read as 0. the write value should always be 0. the initial values of peiorl and peiorh are h'0000, respectively. ? port e i/o register h (peiorh) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrr/wr/wr/wr/wr/wr/w ---------- pe21 ior pe20 ior pe19 ior pe18 ior pe17 ior pe16 ior ? port e i/o register l (peiorl) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pe15 ior pe14 ior pe13 ior pe12 ior pe11 ior pe10 ior pe9 ior pe8 ior pe7 ior pe6 ior pe5 ior pe4 ior pe3 ior pe2 ior pe1 ior pe0 ior
section 21 pin function controller (pfc) page 1134 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 21.1.10 port e control registers l1 to l4, h1, h2 (pecrl1 to pecrl4, pecrh1, pecrh2) pecrl1 to pecrl4, pecrh1 and pecrh2 are 16-b it readable/writable regi sters that are used to select the functions of the multiplexed pins on port e. sh7083: ? port e control registers h2 and h1 (pecrh2 and pecrh1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? port e control register l4 (pecrl4) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r r/w r/w r r/w r/w r/w - pe15 md2 pe15 md1 pe15 md0 - pe14 md2 pe14 md1 pe14 md0 -- pe13 md1 pe13 md0 - pe12 md2 pe12 md1 pe12 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1135 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pe15md2 pe15md1 pe15md0 0 0 0 r/w r/w r/w pe15 mode select the function of the pe15/cke/dack1/tioc4d/ irqout pin. 000: pe15 i/o (port) 001: tioc4d i/o (mtu2) 010: dack1 output (dmac) * 011: irqout output (intc) 101: cke output (bsc) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pe14md2 pe14md1 pe14md0 0 0 0 r/w r/w r/w pe14 mode select the function of the pe14/dack0/tioc4c pin. 000: pe14 i/o (port) 001: tioc4c i/o (mtu2) 010: dack0 output (dmac) * other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pe13md1 pe13md0 0 0 r/w r/w pe13 mode select the function of the pe13/tioc4b/ mres / asebrkak / asebrk pin. fixed to asebrkak output/ asebrk input when using e10a (in asemd0 = low). 00: pe13 i/o (port) 01: tioc4b i/o (mtu2) 10: mres input (intc) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1136 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pe12md2 pe12md1 pe12md0 0 0 0 r/w r/w r/w pe12 mode select the function of the pe12/tioc4a/txd3/ scs pin. 000: pe12 i/o (port) 001: tioc4a i/o (mtu2) 011: txd3 output (scif) 101: scs i/o (ssu) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port e control register l3 (pecrl3) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrr/wr/wr/wrrrrrr/wr/wr/w ----- pe10 md2 pe10 md1 pe10 md0 ----- pe8 md2 pe8 md1 pe8 md0 bit bit name initial value r/w description 15 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 9 8 pe10md2 pe10md1 pe10md0 0 0 0 r/w r/w r/w pe10 mode select the function of the pe10/tioc3c/txd2/sso pin. 000: pe10 i/o (port) 001: tioc3c i/o (mtu2) 010: txd2 output (sci) 101: sso i/o (ssu) other than above: setting prohibited 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1137 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pe8md2 pe8md1 pe8md0 0 0 0 r/w r/w r/w pe8 mode select the function of the pe8/tioc3a/sck2/ssck pin. 000: pe8 i/o (port) 001: tioc3a i/o (mtu2) 010: sck2 i/o (sci) 101: ssck i/o (ssu) other than above: setting prohibited ? port e control register l2 (pecrl2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r r r r r/w r/w r/w - pe7 md2 pe7 md1 pe7 md0 - pe6 md2 pe6 md1 pe6 md0 ----- pe4 md2 pe4 md1 pe4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pe7md2 pe7md1 pe7md0 0 0 0 r/w r/w r/w pe7 mode select the function of the pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pin. 000: pe7 i/o (port) 001: tioc2b i/o (mtu2) 010: rxd2 input (sci) 011: bs output (bsc) * 101: ssi i/o (ssu) 111: ubctrg output (ubc) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1138 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pe6md2 pe6md1 pe6md0 0 0 0 r/w r/w r/w pe6 mode select the function of the pe6/ cs7 /tioc2a/sck3 pin. 000: pe6 i/o (port) 001: tioc2a i/o (mtu2) 010: sck3 i/o (scif) 101: cs7 output (bsc) * other than above: setting prohibited 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 1 0 pe4md2 pe4md1 pe4md0 0 0 0 r/w r/w r/w pe4 mode select the function of the pe4/tioc1a/rxd3/tck pin. fixed to tck input when using e10a (in asemd0 = low). 000: pe4 i/o (port) 001: tioc1a i/o (mtu2) 010: rxd3 input (scif) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port e control register l1 (pecrl1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r r/w r/w - pe3 md2 pe3 md1 pe3 md0 - pe2 md2 pe2 md1 pe2 md0 - pe1 md2 pe1 md1 pe1 md0 -- pe0 md1 pe0 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1139 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pe3md2 pe3md1 pe3md0 0 0 0 r/w r/w r/w pe3 mode select the function of the pe3/tend1/tioc0d/tdo pin. fixed to tdo output when using e10a (in asemd0 = low). 000: pe3 i/o (port) 001: tioc0d i/o (mtu2) 010: tend1 output (dmac) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pe2md2 pe2md1 pe2md0 0 0 0 r/w r/w r/w pe2 mode select the function of the pe2/dreq1/tioc0c/tdi pin. fixed to tdi input when using e10a (in asemd0 = low). 000: pe2 i/o (port) 001: tioc0c i/o (mtu2) 010: dreq1 input (dmac) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pe1md2 pe1md1 pe1md0 0 0 0 r/w r/w r/w pe1 mode select the function of the pe1/tend0/tioc0b/ trst pin. fixed to trst input when using e10a (in asemd0 = low). 000: pe1 i/o (port) 001: tioc0b i/o (mtu2) 010: tend0 output (dmac) * other than above: setting prohibited 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1140 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 0 pe0md1 pe0md0 0 0 r/w r/w pe0 mode select the function of the pe0/dreq0/tioc0a/tms pin. fixed to tms input when using e10a (in asemd0 = low). 00: pe0 i/o (port) 01: tioc0a i/o (mtu2) 10: dreq0 input (dmac) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. sh7084: ? port e control registers h2 and h1 (pecrh2 and pecrh1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? port e control register l4 (pecrl4) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r r/w r/w r r/w r/w r/w - pe15 md2 pe15 md1 pe15 md0 - pe14 md2 pe14 md1 pe14 md0 -- pe13 md1 pe13 md0 - pe12 md2 pe12 md1 pe12 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1141 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pe15md2 pe15md1 pe15md0 0 0 0 r/w r/w r/w pe15 mode select the function of the pe15/cke/dack1/tioc4d/ irqout pin. 000: pe15 i/o (port) 001: tioc4d i/o (mtu2) 010: dack1 output (dmac) * 011: irqout output (intc) 101: cke output (bsc) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pe14md2 pe14md1 pe14md0 0 0 0 r/w r/w r/w pe14 mode select the function of the pe14/ ah /dack0/tioc4c pin. 000: pe14 i/o (port) 001: tioc4c i/o (mtu2) 010: dack0 output (dmac) * 101: ah output (bsc) * other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pe13md1 pe13md0 0 0 r/w r/w pe13 mode select the function of the pe13/tioc4b/ mres pin. 00: pe13 i/o (port) 01: tioc4b i/o (mtu2) 10: mres input (intc) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1142 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pe12md2 pe12md1 pe12md0 0 0 0 r/w r/w r/w pe12 mode select the function of the pe12/tioc4a/txd3/ scs pin. 000: pe12 i/o (port) 001: tioc4a i/o (mtu2) 011: txd3 output (scif) 101: scs i/o (ssu) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port e control register l3 (pecrl3) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pe11 md2 pe11 md1 pe11 md0 - pe10 md2 pe10 md1 pe10 md0 - pe9 md2 pe9 md1 pe9 md0 - pe8 md2 pe8 md1 pe8 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pe11md2 pe11md1 pe11md0 0 0 0 r/w r/w r/w pe11 mode select the function of the pe11/tioc3d/rxd3/ cts3 pin. 000: pe11 i/o (port) 001: tioc3d i/o (mtu2) 011: rxd3 input (scif) 100: cts3 input (scif) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1143 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pe10md2 pe10md1 pe10md0 0 0 0 r/w r/w r/w pe10 mode select the function of the pe10/tioc3c/txd2/sso pin. 000: pe10 i/o (port) 001: tioc3c i/o (mtu2) 010: txd2 output (sci) 101: sso i/o (ssu) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pe9md2 pe9md1 pe9md0 0 0 0 r/w r/w r/w pe9 mode select the function of the pe9/tioc3b/sck3/ rts3 pin. 000: pe9 i/o (port) 001: tioc3b i/o (mtu2) 011: sck3 i/o (scif) 100: rts3 output (scif) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pe8md2 pe8md1 pe8md0 0 0 0 r/w r/w r/w pe8 mode select the function of the pe8/tioc3a/sck2/ssck pin. 000: pe8 i/o (port) 001: tioc3a i/o (mtu2) 010: sck2 i/o (sci) 101: ssck i/o (ssu) other than above: setting prohibited
section 21 pin function controller (pfc) page 1144 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? port e control register l2 (pecrl2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pe7 md2 pe7 md1 pe7 md0 - pe6 md2 pe6 md1 pe6 md0 - pe5 md2 pe5 md1 pe5 md0 - pe4 md2 pe4 md1 pe4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pe7md2 pe7md1 pe7md0 0 0 0 r/w r/w r/w pe7 mode select the function of the pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pin. 000: pe7 i/o (port) 001: tioc2b i/o (mtu2) 010: rxd2 input (sci) 011: bs output (bsc) * 101: ssi i/o (ssu) 111: ubctrg output (ubc) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pe6md2 pe6md1 pe6md0 0 0 0 r/w r/w r/w pe6 mode select the function of the pe6/ cs7 /tioc2a/sck3 pin. 000: pe6 i/o (port) 001: tioc2a i/o (mtu2) 010: sck3 i/o (scif) 101: cs7 output (bsc) * other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1145 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pe5md2 pe5md1 pe5md0 0 0 0 r/w r/w r/w pe5 mode select the function of the pe5/ cs6 /tioc1b/txd3/ asebrkak / asebrk pin. fixed to asebrkak output/ asebrk input when using e10a (in asemd0 = low). 000: pe5 i/o (port) 001: tioc1b i/o (mtu2) 010: txd3 output (scif) 101: cs6 output (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pe4md2 pe4md1 pe4md0 0 0 0 r/w r/w r/w pe4 mode select the function of the pe4/tioc1a/rxd3/tck pin. fixed to tck input when using e10a (in asemd0 = low). 000: pe4 i/o (port) 001: tioc1a i/o (mtu2) 010: rxd3 input (scif) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port e control register l1 (pecrl1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r r/w r/w - pe3 md2 pe3 md1 pe3 md0 - pe2 md2 pe2 md1 pe2 md0 - pe1 md2 pe1 md1 pe1 md0 -- pe0 md1 pe0 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1146 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pe3md2 pe3md1 pe3md0 0 0 0 r/w r/w r/w pe3 mode select the function of the pe3/tend1/tioc0d/tdo pin. fixed to tdo output when using e10a (in asemd0 = low). 000: pe3 i/o (port) 001: tioc0d i/o (mtu2) 010: tend1 output (dmac) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pe2md2 pe2md1 pe2md0 0 0 0 r/w r/w r/w pe2 mode select the function of the pe2/dreq1/tioc0c/tdi pin. fixed to tdi input when using e10a (in asemd0 = low). 000: pe2 i/o (port) 001: tioc0c i/o (mtu2) 010: dreq1 input (dmac) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pe1md2 pe1md1 pe1md0 0 0 0 r/w r/w r/w pe1 mode select the function of the pe1/tend0/tioc0b/ trst pin. fixed to trst input when using e10a (in asemd0 = low). 000: pe1 i/o (port) 001: tioc0b i/o (mtu2) 010: tend0 output (dmac) * other than above: setting prohibited 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1147 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 0 pe0md1 pe0md0 0 0 r/w r/w pe0 mode select the function of the pe0/dreq0/tioc0a/tms pin. fixed to tms input when using e10a (in asemd0 = low). 00: pe0 i/o (port) 01: tioc0a i/o (mtu2) 10: dreq0 input (dmac) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. sh7085: ? port e control registers h2 and h1 (pecrh2 and pecrh1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? port e control register l4 (pecrl4) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r r/w r/w r r/w r/w r/w - pe15 md2 pe15 md1 pe15 md0 - pe14 md2 pe14 md1 pe14 md0 -- pe13 md1 pe13 md0 - pe12 md2 pe12 md1 pe12 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1148 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pe15md2 pe15md1 pe15md0 0 0 0 r/w r/w r/w pe15 mode select the function of the pe15/cke/dack1/tioc4d/ irqout pin. 000: pe15 i/o (port) 001: tioc4d i/o (mtu2) 010: dack1 output (dmac) * 011: irqout output (intc) 101: cke output (bsc) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pe14md2 pe14md1 pe14md0 0 0 0 r/w r/w r/w pe14 mode select the function of the pe14/ wrhh / iciowr / ah /dqmuu/dack0/tioc4c pin. 000: pe14 i/o (port) 001: tioc4c i/o (mtu2) 010: dack0 output (dmac) * 101: wrhh / iciowr / ah /dqmuu output (bsc) * other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pe13md1 pe13md0 0 0 r/w r/w pe13 mode select the function of the pe13/tioc4b/ mres / asebrkak / asebrk pin. fixed to asebrkak output/ asebrk input when using e10a (in asemd0 = low). 00: pe13 i/o (port) 01: tioc4b i/o (mtu2) 10: mres input (intc) other than above: setting prohibited
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1149 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pe12md2 pe12md1 pe12md0 0 0 0 r/w r/w r/w pe12 mode select the function of the pe12/tioc4a/txd3/ scs /tck pin. fixed to tck input when using e10a (in asemd0 = low). 000: pe12 i/o (port) 001: tioc4a i/o (mtu2) 011: txd3 output (scif) 101: scs i/o (ssu) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port e control register l3 (pecrl3) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pe11 md2 pe11 md1 pe11 md0 - pe10 md2 pe10 md1 pe10 md0 - pe9 md2 pe9 md1 pe9 md0 - pe8 md2 pe8 md1 pe8 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pe11md2 pe11md1 pe11md0 0 0 0 r/w r/w r/w pe11 mode select the function of the pe11/tioc3d/rxd3/ cts3 /tdo pin. fixed to tdo output when using e10a (in asemd0 = low). 000: pe11 i/o (port) 001: tioc3d i/o (mtu2) 011: rxd3 input (scif) 100: cts3 input (scif) other than above: setting prohibited
section 21 pin function controller (pfc) page 1150 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pe10md2 pe10md1 pe10md0 0 0 0 r/w r/w r/w pe10 mode select the function of the pe10/tioc3c/txd2/sso/tdi pin. fixed to tdi input when using e10a (in asemd0 = low). 000: pe10 i/o (port) 001: tioc3c i/o (mtu2) 010: txd2 output (sci) 101: sso i/o (ssu) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pe9md2 pe9md1 pe9md0 0 0 0 r/w r/w r/w pe9 mode select the function of the pe9/tioc3b/sck3/ rts3 / trst pin. fixed to trst input when using e10a (in asemd0 = low). 000: pe9 i/o (port) 001: tioc3b i/o (mtu2) 011: sck3 i/o (scif) 100: rts3 output (scif) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1151 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pe8md2 pe8md1 pe8md0 0 0 0 r/w r/w r/w pe8 mode select the function of the pe8/tioc3a/sck2/ssck/tms pin. fixed to tms input when using e10a (in asemd0 = low). 000: pe8 i/o (port) 001: tioc3a i/o (mtu2) 010: sck2 i/o (sci) 101: ssck i/o (ssu) other than above: setting prohibited ? port e control register l2 (pecrl2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pe7 md2 pe7 md1 pe7 md0 - pe6 md2 pe6 md1 pe6 md0 - pe5 md2 pe5 md1 pe5 md0 - pe4 md2 pe4 md1 pe4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pe7md2 pe7md1 pe7md0 0 0 0 r/w r/w r/w pe7 mode select the function of the pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pin. 000: pe7 i/o (port) 001: tioc2b i/o (mtu2) 010: rxd2 input (sci) 011: bs output (bsc) * 101: ssi i/o (ssu) 111: ubctrg output (ubc) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1152 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pe6md2 pe6md1 pe6md0 0 0 0 r/w r/w r/w pe6 mode select the function of the pe6/ cs7 /tioc2a/sck3/audata0 pin. fixed to audata0 output when using the aud function of the e10a. 000: pe6 i/o (port) 001: tioc2a i/o (mtu2) 010: sck3 i/o (scif) 101: cs7 output (bsc) * other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pe5md2 pe5md1 pe5md0 0 0 0 r/w r/w r/w pe5 mode select the function of the pe5/ cs6 / ce1b /tioc1b/txd3/audata1 pin. fixed to audata1 output when using the aud function of the e10a. 000: pe5 i/o (port) 001: tioc1b i/o (mtu2) 010: txd3 output (scif) 101: cs6 / ce1b output (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1153 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pe4md2 pe4md1 pe4md0 0 0 0 r/w r/w r/w pe4 mode select the function of the pe4/ iois16 /tioc1a/rxd3/audata2 pin. fixed to audata2 output when using the aud function of the e10a. 000: pe4 i/o (port) 001: tioc1a i/o (mtu2) 010: rxd3 input (scif) 101: iois16 input (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port e control register l1 (pecrl1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r r/w r/w - pe3 md2 pe3 md1 pe3 md0 - pe2 md2 pe2 md1 pe2 md0 - pe1 md2 pe1 md1 pe1 md0 -- pe0 md1 pe0 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pe3md2 pe3md1 pe3md0 0 0 0 r/w r/w r/w pe3 mode select the function of the pe3/tend1/tioc0d/audata3 pin. fixed to audata3 output when using the aud function of the e10a. 000: pe3 i/o (port) 001: tioc0d i/o (mtu2) 010: tend1 output (dmac) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1154 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pe2md2 pe2md1 pe2md0 0 0 0 r/w r/w r/w pe2 mode select the function of the pe2/dreq1/tioc0c pin. 000: pe2 i/o (port) 001: tioc0c i/o (mtu2) 010: dreq1 input (dmac) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 5 4 pe1md2 pe1md1 pe1md0 0 0 0 r/w r/w r/w pe1 mode select the function of the pe1/tend0/tioc0b pin. 000: pe1 i/o (port) 001: tioc0b i/o (mtu2) 010: tend0 output (dmac) * other than above: setting prohibited 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 pe0md1 pe0md0 0 0 r/w r/w pe0 mode select the function of the pe0/dreq0/tioc0a/audck pin. fixed to audck output when using the aud function of the e10a. 00: pe0 i/o (port) 01: tioc0a i/o (mtu2) 10: dreq0 input (dmac) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1155 of 1560 mar 18, 2011 sh7080 group sh7086: ? port e control register h2 (pecrh2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrr/wr/wrrr/wr/w ---------- pe21 md1 pe21 md0 -- pe20 md1 pe20 md0 bit bit name initial value r/w description 15 to 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pe21md1 pe21md0 0 0 r/w r/w pe21 mode select the function of the pe21/tioc4ds pin. 00: pe21 i/o (port) 01: tioc4ds i/o (mtu2s) other than above: setting prohibited 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 pe20md1 pe20md0 0 0 r/w r/w pe20 mode select the function of the pe20/tioc4cs pin. 00: pe20 i/o (port) 01: tioc4cs i/o (mtu2s) other than above: setting prohibited
section 21 pin function controller (pfc) page 1156 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? port e control register h1 (pecrh1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r r/w r/w r r r/w r/w r r r/w r/w r r/w r/w r/w -- pe19 md1 pe19 md0 -- pe18 md1 pe18 md0 -- pe17 md1 pe17 md0 - pe16 md2 pe16 md1 pe16 md0 bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 12 pe19md1 pe19md0 0 0 r/w r/w pe19 mode select the function of the pe19/tioc4bs pin. 00: pe19 i/o (port) 01: tioc4bs i/o (mtu2s) other than above: setting prohibited 11, 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 8 pe18md1 pe18md0 0 0 r/w r/w pe18 mode select the function of the pe18/tioc4as pin. 00: pe18 i/o (port) 01: tioc4as i/o (mtu2s) other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pe17md1 pe17md0 0 0 r/w r/w pe17 mode select the function of the pe17/tioc3ds pin. 00: pe17 i/o (port) 01: tioc3ds i/o (mtu2s) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1157 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 2 1 0 pe16md2 pe16md1 pe16md0 0 0 0 r/w r/w r/w pe16 mode select the function of the pe16/ cs8 /tioc3bs pin. 000: pe16 i/o (port) 001: tioc3bs i/o (mtu2s) 101: cs8 output (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode. ? port e control register l4 (pecrl4) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r r/w r/w r r/w r/w r/w - pe15 md2 pe15 md1 pe15 md0 - pe14 md2 pe14 md1 pe14 md0 -- pe13 md1 pe13 md0 - pe12 md2 pe12 md1 pe12 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pe15md2 pe15md1 pe15md0 0 0 0 r/w r/w r/w pe15 mode select the function of the pe15/cke/dack1/tioc4d/ irqout pin. 000: pe15 i/o (port) 001: tioc4d i/o (mtu2) 010: dack1 output (dmac) * 011: irqout output (intc) 101: cke output (bsc) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1158 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 10 9 8 pe14md2 pe14md1 pe14md0 0 0 0 r/w r/w r/w pe14 mode select the function of the pe14/ wrhh / iciowr / ah /dqmuu/dack0/tioc4c pin. 000: pe14 i/o (port) 001: tioc4c i/o (mtu2) 010: dack0 output (dmac) * 101: wrhh / iciowr / ah /dqmuu output (bsc) * other than above: setting prohibited 7, 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 4 pe13md1 pe13md0 0 0 r/w r/w pe13 mode select the function of the pe13/tioc4b/ mres / asebrkak / asebrk pin. fixed to asebrkak output/ asebrk input when using e10a (in asemd0 = low). 00: pe13 i/o (port) 01: tioc4b i/o (mtu2) 10: mres input (intc) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pe12md2 pe12md1 pe12md0 0 0 0 r/w r/w r/w pe12 mode select the function of the pe12/tioc4a/txd3/ scs /tck pin. fixed to tck input when using e10a (in asemd0 = low). 000: pe12 i/o (port) 001: tioc4a i/o (mtu2) 011: txd3 output (scif) 101: scs i/o (ssu) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1159 of 1560 mar 18, 2011 sh7080 group ? port e control register l3 (pecrl3) ? bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pe11 md2 pe11 md1 pe11 md0 - pe10 md2 pe10 md1 pe10 md0 - pe9 md2 pe9 md1 pe9 md0 - pe8 md2 pe8 md1 pe8 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pe11md2 pe11md1 pe11md0 0 0 0 r/w r/w r/w pe11 mode select the function of the pe11/tioc3d/rxd3/ cts3 /tdo pin. fixed to tdo output when using e10a (in asemd0 = low). 000: pe11 i/o (port) 001: tioc3d i/o (mtu2) 011: rxd3 input (scif) 100: cts3 input (scif) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pe10md2 pe10md1 pe10md0 0 0 0 r/w r/w r/w pe10 mode select the function of the pe10/tioc3c/txd2/sso/tdi pin. fixed to tdi input when using e10a (in asemd0 = low). 000: pe10 i/o (port) 001: tioc3c i/o (mtu2) 010: txd2 output (sci) 101: sso i/o (ssu) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1160 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pe9md2 pe9md1 pe9md0 0 0 0 r/w r/w r/w pe9 mode select the function of the pe9/tioc3b/sck3/ rts3 / trst pin. fixed to trst input when using e10a (in asemd0 = low). 000: pe9 i/o (port) 001: tioc3b i/o (mtu2) 011: sck3 i/o (scif) 100: rts3 output (scif) other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pe8md2 pe8md1 pe8md0 0 0 0 r/w r/w r/w pe8 mode select the function of the pe8/tioc3a/sck2/ssck/tms pin. fixed to tms input when using e10a (in asemd0 = low). 000: pe8 i/o (port) 001: tioc3a i/o (mtu2) 010: sck2 i/o (sci) 101: ssck i/o (ssu) other than above: setting prohibited ? port e control register l2 (pecrl2) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w - pe7 md2 pe7 md1 pe7 md0 - pe6 md2 pe6 md1 pe6 md0 - pe5 md2 pe5 md1 pe5 md0 - pe4 md2 pe4 md1 pe4 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1161 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 14 13 12 pe7md2 pe7md1 pe7md0 0 0 0 r/w r/w r/w pe7 mode select the function of the pe7/ bs /tioc2b/ ubctrg /rxd2/ssi pin. 000: pe7 i/o (port) 001: tioc2b i/o (mtu2) 010: rxd2 input (sci) 011: bs output (bsc) * 101: ssi i/o (ssu) 111: ubctrg output (ubc) other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pe6md2 pe6md1 pe6md0 0 0 0 r/w r/w r/w pe6 mode select the function of the pe6/ cs7 /tioc2a/sck3/audata0 pin. fixed to audata0 output when using the aud function of the e10a. 000: pe6 i/o (port) 001: tioc2a i/o (mtu2) 010: sck3 i/o (scif) 101: cs7 output (bsc) * other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1162 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pe5md2 pe5md1 pe5md0 0 0 0 r/w r/w r/w pe5 mode select the function of the pe5/ cs6 / ce1b /tioc1b/txd3/audata1 pin. fixed to audata1 output when using the aud function of the e10a. 000: pe5 i/o (port) 001: tioc1b i/o (mtu2) 010: txd3 output (scif) 101: cs6 / ce1b output (bsc) * other than above: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 1 0 pe4md2 pe4md1 pe4md0 0 0 0 r/w r/w r/w pe4 mode select the function of the pe4/ iois16 /tioc1a/rxd3/audata2 pin. fixed to audata2 output when using the aud function of the e10a. 000: pe4 i/o (port) 001: tioc1a i/o (mtu2) 010: rxd3 input (scif) 101: iois16 input (bsc) * other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1163 of 1560 mar 18, 2011 sh7080 group ? port e control register l1 (pecrl1) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r/w r/w r/w r r/w r/w r/w r r/w r/w r/w r r r/w r/w - pe3 md2 pe3 md1 pe3 md0 - pe2 md2 pe2 md1 pe2 md0 - pe1 md2 pe1 md1 pe1 md0 -- pe0 md1 pe0 md0 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 13 12 pe3md2 pe3md1 pe3md0 0 0 0 r/w r/w r/w pe3 mode select the function of the pe3/tend1/tioc0d/audata3 pin. fixed to audata3 output when using the aud function of the e10a. 000: pe3 i/o (port) 001: tioc0d i/o (mtu2) 010: tend1 output (dmac) * other than above: setting prohibited 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 pe2md2 pe2md1 pe2md0 0 0 0 r/w r/w r/w pe2 mode select the function of the pe2/dreq1/tioc0c pin. 000: pe2 i/o (port) 001: tioc0c i/o (mtu2) 010: dreq1 input (dmac) other than above: setting prohibited 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 21 pin function controller (pfc) page 1164 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 5 4 pe1md2 pe1md1 pe1md0 0 0 0 r/w r/w r/w pe1 mode select the function of the pe1/tend0/tioc0b pin. 000: pe1 i/o (port) 001: tioc0b i/o (mtu2) 010: tend0 output (dmac) * other than above: setting prohibited 3, 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 pe0md1 pe0md0 0 0 r/w r/w pe0 mode select the function of the pe0/dreq0/tioc0a/audck pin. fixed to audck output when using the aud function of the e10a. 00: pe0 i/o (port) 01: tioc0a i/o (mtu2) 10: dreq0 input (dmac) other than above: setting prohibited note: * this function is enabled only in the on-chip rom enabled/disabled external-extension mode. do not set 1 in single-chip mode.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1165 of 1560 mar 18, 2011 sh7080 group 21.1.11 high-current port control register (hcpcr ) hcpcr is a 16-bit readable/writable register that is used to control the high-current ports (10 pins (pd9, pd11 to pd15, and pe12 to pe15) in the sh7083, 12 pins (pd9, pd11 to pd15, pe9, and pe11 to pe15) in the sh7084, 18 pins (pd9, pd11 to pd15, pd24 to pd29, pe9, and pe11 to pe15) in the sh7085, and 24 pins (pd9, pd11 to pd15, pd24 to pd29, pe9, and pe11 to pe21) in the sh7086). bit: initial value: r/w: 151413121110987654321 0 0000000000001111 rrrrrrrrrrrrr/wr/wr/wr/w ------------ mzi zdh mzi zdl mzi zeh mzi zel bit bit name initial value r/w description 15 to 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 3 mzizdh 1 r/w port d high-current port high-impedance h selects whether or not the high-current ports pd24 to pd29 are set to high-impedance regardless of the pfc setting when detecting oscillation halt or in software standby mode. 0: set to high-impedance 1: not set to high-impedance if this bit is set to 1, the pin state is retained when detecting oscillation halt. for the pin state in software standby mode, refer to appendix a, pin states. 2 mzizdl 1 r/w port d high-current port high-impedance l selects whether or not the high-current ports pd9 and pd11 to pd15 are set to high-impedance regardless of the pfc setting when detecting oscillation halt or in software standby mode. 0: set to high-impedance 1: not set to high-impedance if this bit is set to 1, the pin state is retained when detecting oscillation halt. for the pin state in software standby mode, refer to appendix a, pin states.
section 21 pin function controller (pfc) page 1166 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 mzizeh 1 r/w port e high-current port high-impedance h selects whether or not the high-current ports pe16 to pe21 are set to high-impedance regardless of the pfc setting when detecting oscillation halt or in software standby mode. 0: set to high-impedance 1: not set to high-impedance if this bit is set to 1, the pin state is retained when detecting oscillation halt. for the pin state in software standby mode, refer to appendix a, pin states. 0 mzizel 1 r/w port e high-current port high-impedance l selects whether or not the high-current ports pe9 and pe11 to pe15 are set to high-impedance regardless of the pfc setting when detecting oscillation halt or in software standby mode. 0: set to high-impedance 1: not set to high-impedance if this bit is set to 1, the pin state is retained when detecting oscillation halt. for the pin state in software standby mode, refer to appendix a, pin states.
section 21 pin function controller (pfc) r01uh0198ej0500 rev. 5.00 page 1167 of 1560 mar 18, 2011 sh7080 group 21.1.12 irqout function control register (ifcr) ifcr is a 16-bit readable/writable register that is used to control the irqout pin output when it is selected as the multiplexed pin function by port d control register h4 (pdcrh4) and port e control register l4 (pecrl4). when pdcrh4 or pecrl4 selects another function, the ifcr setting does not affect the pin function. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrr/wr/wr/wr/w ------------ irq md3 irq md2 irq md1 irq md0 bit bit name initial value r/w description 15 to 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 3 2 irqmd3 irqmd2 0 0 r/w r/w port d irqout pin function select select the irqout pin function when bits 9 and 8 (pd30md1 and pd30md0) in pdcrh4 are set to b'10. 00: interrupt request accept signal output 01: refresh signal output 10: interrupt request accept signal output or refresh signal output (depends on the operating state) 11: always high-level output 1 0 irqmd1 irqmd0 0 0 r/w r/w port e irqout pin function select select the irqout pin function when bits 14 to 12 (pe15md2 to pe15md0) in pecrl4 are set to b'011. 00: interrupt request accept signal output 01: refresh signal output 10: interrupt request accept signal output or refresh signal output (depends on the operating state) 11: always high-level output
section 21 pin function controller (pfc) page 1168 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 21.2 usage notes 1. in this lsi, the same function is availabl e as a multiplexed function on multiple pins. this approach is intended to increase the number of selectable pin functions and to allow the easier design of boards. if two or more pins are specified for one function, however, there are two cautions shown below. ? when the pin function is input signals input to several pins are formed as one signal through or or and logic and the signal is transmitted into the lsi. therefore, a signal that differs from the input signals may be transmitted to the lsi depending on the input signals in other pins that have the same functions. table 21.22 shows the transmit forms of input functions allocated to several pins. when using one of the functions shown below in multiple pins, use it with care of signal polarity considering the transmit forms. table 21.22 transmit forms of input functions allocated to multiple pins or type and type sck0, sck3, rxd0, rxd3, tioc3as to tioc3ds, tioc4as to tioc4ds, tic5u, tic5v, tic5w, tic5us, tic5vs, tic5ws irq0 to irq7, dreq0, dreq1, breq , wait , adtrg , poe4 to poe8 or type: signals input to several pins are formed as one signal through or logic and the signal is transmitted into the lsi. and type: signals input to several pins are formed as one signal through and logic and the signal is transmitted into the lsi. ? when the pin function is output each selected pin can output the same function. 2. when the port input is switched from a low level to the dreq or the irq edge for the pins that are multiplexed with input/output and dreq or irq, the corresponding edge is detected. 3. do not set functions other than those specified in tables 21.17 to 21.20. otherwise, correct operation cannot be guaranteed. 4. pfc setting in single-chip mode (mcu operating mode 3) in single-chip mode, do not set the pfc to select address bus, data bus, bus control, or the breq , back , ck, dack, or tend signals. if they are selected, address bus signals function as high- or low-level outputs, data bus signals function as high-impedance outputs, and the other output signals function as high-level outputs. as breq and wait function as inputs, do not leave them open. however, the bus-mastership-request inputs and external waits are disabled.
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1169 of 1560 mar 18, 2011 sh7080 group section 22 i/o ports the sh7083 has six ports: a to f. port a is an 11-bit port, port b is a 9-bit port, ports c and d are 16-bit ports, and port e is a 13-bit port. port f is an 8-bit input-only port. the sh7084 has six ports: a to f. port a is an 18-bit port, port b is a 10-bit port, and ports c, d, and e are 16-bit ports. port f is an 8-bit input-only port. the sh7085 has six ports: a to f. port a is a 26-bit port, port b is a 10-bit port, port c is a 16-bit port, port d is a 32-bit port, and port e is a 16-bit port. port f is an 8-bit input-only port. the sh7086 has six ports: a to f. port a is a 30-bit port, port b is a 10-bit port, port c is a 24-bit port, port d is a 32-bit port, and port e is a 22-bit port. port f is a 16-bit input-only port. all the port pins are multiplexed as general input/output pins and special function pins. the functions of the multiplex pins are selected by means of the pin function controller (pfc). each port is provided with a data register for storing the pin data.
section 22 i/o ports page 1170 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 22.1 port a port a in the sh7083 is an input/output port with the 11 pins shown in figure 22.1. pa15 (i/o)/ ck (output) pa14 (i/o)/ rd (output) pa13 (i/o)/ wrh (output)/ dqmlu (output)/ poe7 (input) pa12 (i/o)/ wrl (output)/ dqmll (output)/ poe6 (input) pa10 (i/o)/ cs0 (output)/ poe4 (input) pa9 (i/o)/ cke (output)/ irq3 (input)/ tclkd (input) pa8 (i/o)/ rdwr (output)/ irq2 (input)/ tclkc (input) pa7 (i/o)/ cs3 (output)/ tclkb (input) pa5 (i/o)/ a22 (output)/ dreq1 (input)/ irq1 (input)/ sck1 (i/o) pa4 (i/o)/ a23 (output)/ txd1 (output) pa3 (i/o)/ a24 (output)/ rxd1 (input) port a figure 22.1 port a (sh7083)
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1171 of 1560 mar 18, 2011 sh7080 group port a in the sh7084 is an input/output port with the 18 pins shown in figure 22.2. pa15 (i/o)/ ck (output) pa16 (i/o)/ ah (output)/ cke (output) pa17 (i/o)/ wait (input) pa14 (i/o)/ rd (output) pa13 (i/o)/ wrh (output)/ dqmlu (output)/ poe7 (input) pa12 (i/o)/ wrl (output)/ dqmll (output)/ poe6 (input) pa11 (i/o)/ cs1 (output)/ poe5 (input) pa10 (i/o)/ cs0 (output)/ poe4 (input) pa9 (i/o)/ cke (output)/ irq3 (input)/ tclkd (input) pa8 (i/o)/ rdwr (output)/ irq2 (input)/ tclkc (input) pa7 (i/o)/ cs3 (output)/ tclkb (input) pa6 (i/o)/ cs2 (output)/ tclka (input) pa5 (i/o)/ a22 (output)/ dreq1 (input)/ irq1 (input)/ sck1 (i/o) pa4 (i/o)/ a23 (output)/ txd1 (output) pa3 (i/o)/ a24 (output)/ rxd1 (input) pa2 (i/o)/ a25 (output)/ dreq0 (input)/ irq0 (input)/ sck0 (i/o) pa1 (i/o)/ cs5 (output)/ txd0 (output) pa0 (i/o)/ cs4 (output)/ rxd0 (input) port a figure 22.2 port a (sh7084)
section 22 i/o ports page 1172 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group port a in the sh7085 is an input/output port with the 26 pins shown in figure 22.3. note: * only in f-ztat version supporting full functions of e10a. pa15 (i/o)/ ck (output) pa16 (i/o)/ wrhh (output)/ iciowr (output)/ ah (output)/ dqmuu (output)/ cke (output) /dreq2 (input) / audsync (output) * pa17 (i/o)/ wait (input)/ dack2 (output) pa18 (i/o)/ breq (input)/ tend0 (output) pa19 (i/o)/ back (output)/ tend1 (output) pa20 (i/o)/ cs4 (output)/ rasu (output) pa21 (i/o)/ cs5 (output)/ ce1a (output)/ casu (output)/ tic5u (input) pa22 (i/o)/ wrhl (output)/ iciord (output)/ dqmul (output)/ tic5v (input) pa23 (i/o)/ wrhh (output)/ iciowr (output)/ ah (output)/ dqmuu (output)/ tic5w (input) pa14 (i/o)/ rd (output) pa13 (i/o)/ wrh (output)/ we (output)/ dqmlu (output)/ poe7 (input) pa12 (i/o)/ wrl (output)/ dqmll (output)/ poe6 (input) pa11 (i/o)/ cs1 (output)/ poe5 (input) pa10 (i/o)/ cs0 (output)/ poe4 (input) pa9 (i/o)/ frame (output)/ cke (output)/ irq3 (input)/ tclkd (input) pa8 (i/o)/ rdwr (output)/ irq2 (input)/ tclkc (input) pa7 (i/o)/ cs3 (output)/ tclkb (input) pa6 (i/o)/ cs2 (output)/ tclka (input) pa5 (i/o)/ a22 (output)/ dreq1 (input)/ irq1 (input)/ sck1 (i/o) pa4 (i/o)/ a23 (output)/ txd1 (output) pa3 (i/o)/ a24 (output)/ rxd1 (input) pa2 (i/o)/ a25 (output)/ dreq0 (input)/ irq0 (input)/ sck0 (i/o) pa1 (i/o)/ cs5 (output)/ ce1a (output)/ txd0 (output) pa0 (i/o)/ cs4 (output)/ rxd0 (input) pa24 (i/o)/ ce2a (output)/ dreq3 (input) pa25 (i/o)/ ce2b (output)/ dack3 (output)/ poe8 (input) port a figure 22.3 port a (sh7085)
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1173 of 1560 mar 18, 2011 sh7080 group port a in the sh7086 is an input/output port with the 30 pins shown in figure 22.4. note: * only in f-ztat version supporting full functions of e10a. pa15 (i/o)/ ck (output) pa16 (i/o)/ wrhh (output)/ iciowr (output)/ ah (output)/ dqmuu (output)/ cke (output)/ dreq2 (input) / audsync (output) * pa17 (i/o)/ wait (input)/ dack2 (output) pa18 (i/o)/ breq (input)/ tend0 (output) pa19 (i/o)/ back (output)/ tend1 (output) pa20 (i/o)/ cs4 (output)/ rasu (output) pa21 (i/o)/ cs5 (output)/ ce1a (output)/ casu (output)/ tic5u (input) pa22 (i/o)/ wrhl (output)/ iciord (output)/ dqmul (output)/ tic5v (input) pa23 (i/o)/ wrhh (output)/ iciowr (output)/ ah (output)/ dqmuu (output)/ tic5w (input) pa14 (i/o)/ rd (output) pa13 (i/o)/ wrh (output)/ dqmlu (output)/ we (output)/ poe7 (input) pa12 (i/o)/ wrl (output)/ dqmll (output)/ poe6 (input) pa11 (i/o)/ cs1 (output)/ poe5 (input) pa10 (i/o)/ cs0 (output)/ poe4 (input) pa9 (i/o)/ frame (output)/ cke (output)/ irq3 (input)/ tclkd (input) pa8 (i/o)/ rdwr (output)/ irq2 (input)/ tclkc (input) pa7 (i/o)/ cs3 (output)/ tclkb (input) pa6 (i/o)/ cs2 (output)/ tclka (input) pa5 (i/o)/ a22 (output)/ dreq1 (input)/ irq1 (input)/ sck1 (i/o) pa4 (i/o)/ a23 (output)/ txd1 (output) pa3 (i/o)/ a24 (output)/ rxd1 (input) pa2 (i/o)/ a25 (output)/ dreq0 (input)/ irq0 (input)/ sck0 (i/o) pa1 (i/o)/ cs5 (output)/ ce1a (output)/ txd0 (output) pa0 (i/o)/ cs4 (output)/ rxd0 (input) port a pa24 (i/o)/ ce2a (output)/ dreq3 (input) pa27 (i/o)/ a27 (output)/ irq1 (input) pa28 (i/o)/ a28 (output)/ irq2 (input) pa29 (i/o)/ a29 (output)/ irq3 (input) pa26 (i/o)/ a26 (output)/ irq0 (input) pa25 (i/o)/ ce2b (output)/ dack3 (output)/ poe8 (input) figure 22.4 port a (sh7086)
section 22 i/o ports page 1174 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 22.1.1 register descriptions port a is an 11-bit input/output port in the sh7083; an 18-bit input/output port in the sh7084; a 26-bit input/output port in the sh7085; a 30-bit input/output port in the sh7086. port a has the following registers. for details on register addre sses and register states during each processing, refer to section 27, list of registers. table 22.1 register configuration register name abbrevia- tion r/w initial value address access size port a data register h padrh r/w h'0000 h'ffffd100 8, 16, 32 port a data register l padrl r/w h'0000 h'ffffd102 8, 16 port a port register h paprh r ? h'ffffd11c 8, 16, 32 port a port register l paprl r ? h'ffffd11e 8 16 22.1.2 port a data registers h and l (padrh and padrl) the port a data registers h and l (padrh and padrl) are 16-bit readable/writable registers that store port a data. bits pa15dr to pa12dr, pa10dr to pa7dr, and pa5dr to pa3dr correspond to pins pa15 to pa12, pa10 to pa7, and pa5 to pa3, respectively (multiplexed functions omitted here) in the sh7083. bits pa17d r to pa0dr correspond to pins pa17 to pa0 (multiplexed functions omitted here) in the sh70 84. bits pa25dr to pa0dr correspond to pins pa25 to pa0 (multiplexed functions omitted he re) in the sh7085. bits pa29dr to pa0dr correspond to pins pa29 to pa0 (multiplexe d functions omitted here) in the sh7086. when a pin function is general output, if a value is written to padrh or padrl, that value is output directly from the pin, and if padrh or padrl is read, the register value is returned directly regardless of the pin state. when a pin function is general input, if padrh or padrl is read, the pin state, not the register value, is returned directly. if a value is written to padrh or padrl, although that value is written into padrh or padrl, it does not affect the pin state. table 22.2 summarizes port a data register read/write operations.
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1175 of 1560 mar 18, 2011 sh7080 group ? padrh (sh7083) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? padrh (sh7084) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrr/wr/w -------------- pa17 dr pa16 dr bit bit name initial value r/w description 15 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 pa17dr 0 r/w see table 22.2. 0 pa16dr 0 r/w
section 22 i/o ports page 1176 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? padrh (sh7085) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrr/wr/wr/wr/wr/wr/wr/wr/wr/wr/w ------ pa25 dr pa 2 4 dr pa23 dr pa22 dr pa 2 1 dr pa20 dr pa19 dr pa18 dr pa17 dr pa16 dr bit bit name initial value r/w description 15 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 pa25dr 0 r/w see table 22.2. 8 pa24dr 0 r/w 7 pa23dr 0 r/w 6 pa22dr 0 r/w 5 pa21dr 0 r/w 4 pa20dr 0 r/w 3 pa19dr 0 r/w 2 pa18dr 0 r/w 1 pa17dr 0 r/w 0 pa16dr 0 r/w
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1177 of 1560 mar 18, 2011 sh7080 group ? padrh (sh7086) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r r r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w -- pa29 dr pa28 dr pa27 dr pa26 dr pa25 dr pa 2 4 dr pa23 dr pa22 dr pa 2 1 dr pa20 dr pa19 dr pa18 dr pa17 dr pa16 dr bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 pa29dr 0 r/w see table 22.2. 12 pa28dr 0 r/w 11 pa27dr 0 r/w 10 pa26dr 0 r/w 9 pa25dr 0 r/w 8 pa24dr 0 r/w 7 pa23dr 0 r/w 6 pa22dr 0 r/w 5 pa21dr 0 r/w 4 pa20dr 0 r/w 3 pa19dr 0 r/w 2 pa18dr 0 r/w 1 pa17dr 0 r/w 0 pa16dr 0 r/w
section 22 i/o ports page 1178 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? padrl (sh7083) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r r/w r/w r/w r/w r r/w r/w r/w r r r - pa15 dr pa14 dr pa13 dr pa12 dr - pa10 dr pa 9 dr pa 8 dr pa 7 dr - pa 5 dr pa 4 dr pa 3 dr -- bit bit name initial value r/w description 15 pa15dr 0 r/w see table 22.2. 14 pa14dr 0 r/w 13 pa13dr 0 r/w 12 pa12dr 0 r/w 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 pa10dr 0 r/w see table 22.2. 9 pa9dr 0 r/w 8 pa8dr 0 r/w 7 pa7dr 0 r/w 6 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 5 pa5dr 0 r/w see table 22.2. 4 pa4dr 0 r/w 3 pa3dr 0 r/w 2 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1179 of 1560 mar 18, 2011 sh7080 group ? padrl (sh7084, sh7085, sh7086) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pa15 dr pa14 dr pa13 dr pa12 dr pa11 dr pa10 dr pa 9 dr pa 8 dr pa 7 dr pa 6 dr pa 5 dr pa 4 dr pa 3 dr pa 2 dr pa 1 dr pa 0 dr bit bit name initial value r/w description 15 pa15dr 0 r/w see table 22.2. 14 pa14dr 0 r/w 13 pa13dr 0 r/w 12 pa12dr 0 r/w 11 pa11dr 0 r/w 10 pa10dr 0 r/w 9 pa9dr 0 r/w 8 pa8dr 0 r/w 7 pa7dr 0 r/w 6 pa6dr 0 r/w 5 pa5dr 0 r/w 4 pa4dr 0 r/w 3 pa3dr 0 r/w 2 pa2dr 0 r/w 1 pa1dr 0 r/w 0 pa0dr 0 r/w
section 22 i/o ports page 1180 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 22.2 port a data register (padr) read/write operations ? padrh bits 13 to 0 and padrl bits 15 to 0 paior pin function read write 0 general input pin state can write to padrh and padrl, but it has no effect on pin state other than general input pin state can write to padrh and padrl, but it has no effect on pin state 1 general output padrh or padrl value value written is output from pin other than general output padrh or padrl value can write to padrh and padrl, but it has no effect on pin state 22.1.3 port a port registers h and l (paprh and paprl) the port a port registers h and l (paprh and paprl) are 16-bit read-only registers that always return the states of the pins regardless of the pfc setting. bits pa15pr to pa12pr, pa10pr to pa7pr, and pa5pr to pa3pr correspond to pins pa15 to pa12, pa10 to pa7, and pa5 to pa3, respectively (multiplexed functions omitted he re) in the sh7083. bits pa17pr to pa0pr correspond to pins pa17 to pa0 (multiplexed functions omitted here) in the sh7084. bits pa25pr to pa0pr correspond to pins pa25 to pa 0 (multiplexed functions omitted here) in the sh7085. bits pa29pr to pa0pr correspond to pins pa29 to pa0 (multiplexed functions omitted here) in the sh7086. ? paprh (sh7083) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1181 of 1560 mar 18, 2011 sh7080 group ? paprh (sh7084) bit: initial value: r/w: 151413121110987654321 0 00000000000000 ** rrrrrrrrrrrrrrrr -------------- pa17 pr pa16 pr bit bit name initial value r/w description 15 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 pa17pr pin state r 0 pa16pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. ? paprh (sh7085) bit: initial value: r/w: 151413121110987654321 0 000000 ********** rrrrrrrrrrrrrrrr ------ pa25 pr pa 2 4 pr pa23 pr pa22 pr pa 2 1 pr pa20 pr pa19 pr pa18 pr pa17 pr pa16 pr bit bit name initial value r/w description 15 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 pa25pr pin state r 8 pa24pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 7 pa23pr pin state r 6 pa22pr pin state r 5 pa21pr pin state r 4 pa20pr pin state r 3 pa19pr pin state r 2 pa18pr pin state r 1 pa17pr pin state r 0 pa16pr pin state r
section 22 i/o ports page 1182 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? paprh (sh7086) bit: initial value: r/w: 151413121110987654321 0 00 ************** rrrrrrrrrrrrrrrr -- pa29 pr pa28 pr pa27 pr pa26 pr pa25 pr pa 2 4 pr pa23 pr pa22 pr pa 2 1 pr pa20 pr pa19 pr pa18 pr pa17 pr pa16 pr bit bit name initial value r/w description 15, 14 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 13 pa29pr pin state r 12 pa28pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 11 pa27pr pin state r 10 pa26pr pin state r 9 pa25pr pin state r 8 pa24pr pin state r 7 pa23pr pin state r 6 pa22pr pin state r 5 pa21pr pin state r 4 pa20pr pin state r 3 pa19pr pin state r 2 pa18pr pin state r 1 pa17pr pin state r 0 pa16pr pin state r
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1183 of 1560 mar 18, 2011 sh7080 group ? paprl (sh7083) bit: initial value: r/w: 151413121110987654321 0 **** 0 **** 0 *** 000 rrrrrrrrrrrrrrrr - pa15 pr pa14 pr pa13 pr pa12 pr - pa10 pr pa 9 pr pa 8 pr pa 7 pr - pa 5 pr pa 4 pr pa 3 pr -- bit bit name initial value r/w description 15 pa15pr pin state r 14 pa14pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 13 pa13pr pin state r 12 pa12pr pin state r 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 pa10pr pin state r 9 pa9pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 8 pa8pr pin state r 7 pa7pr pin state r 6 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 5 pa5pr pin state r 4 pa4pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 3 pa3pr pin state r 2 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 22 i/o ports page 1184 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? paprl (sh7084, sh7085, sh7086) bit: initial value: r/w: 151413121110987654321 0 **************** rrrrrrrrrrrrrrrr pa15 pr pa14 pr pa13 pr pa12 pr pa11 pr pa10 pr pa 9 pr pa 8 pr pa 7 pr pa 6 pr pa 5 pr pa 4 pr pa 3 pr pa 2 pr pa 1 pr pa 0 pr bit bit name initial value r/w description 15 pa15pr pin state r 14 pa14pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 13 pa13pr pin state r 12 pa12pr pin state r 11 pa11pr pin state r 10 pa10pr pin state r 9 pa9pr pin state r 8 pa8pr pin state r 7 pa7pr pin state r 6 pa6pr pin state r 5 pa5pr pin state r 4 pa4pr pin state r 3 pa3pr pin state r 2 pa2pr pin state r 1 pa1pr pin state r 0 pa0pr pin state r
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1185 of 1560 mar 18, 2011 sh7080 group 22.2 port b port b in the sh7083 is an input/output port with the nine pins shown in figure 22.5. pb9 (i/o)/ a21 (output)/ irq7 (input)/ adtrg (input)/ poe8 (input) pb8 (i/o)/ a20 (output)/ wait (input)/ irq6 (input)/ sck0 (i/o) pb7 (i/o)/ a19 (output)/ breq (input)/ irq5 (input)/ txd0 (output) pb6 (i/o)/ a18 (output)/ back (output)/ irq4 (input)/ rxd0 (input) pb5 (i/o)/ casl (output)/ irq3 (input)/ poe3 (input) pb4 (i/o)/ rasl (output)/ irq2 (input)/ poe2 (input) pb2 (i/o)/ irq0 (input)/ poe0 (input) pb1 (i/o)/ a17 (output)/ tic5w (input) pb0 (i/o)/ a16 (output)/ tic5ws (input) port b figure 22.5 port b (sh7083) port b in the sh7084, sh7085, and sh7086 is an input/output port with the 10 pins shown in figure 22.6. pb9 (i/o)/ a21 (output)/ irq7 (input)/ adtrg (input)/ poe8 (input) pb8 (i/o)/ a20 (output)/ wait (input)/ irq6 (input)/ sck0 (i/o) pb7 (i/o)/ a19 (output)/ breq (input)/ irq5 (input)/ txd0 (output) pb6 (i/o)/ a18 (output)/ back (output)/ irq4 (input)/ rxd0 (input) pb5 (i/o)/ casl (output)/ irq3 (input)/ poe3 (input) pb4 (i/o)/ rasl (output)/ irq2 (input)/ poe2 (input) pb3 (i/o)/ irq1 (input)/ poe1 (input)/ sda (i/o) pb2 (i/o)/ irq0 (input)/ poe0 (input)/ scl (i/o) pb1 (i/o)/ a17 (output)/ tic5w (input) pb0 (i/o)/ a16 (output)/ tic5ws (input) port b figure 22.6 port b (sh7084, sh7085, sh7086)
section 22 i/o ports page 1186 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 22.2.1 register descriptions port b is a 9-bit input/output port in the sh7083; a 10-bit input/output port in the sh7084, sh7085, and sh7086. port b has the following register. for details on register addresses and register states during each processing, re fer to section 27, list of registers. table 22.3 register configuration register name abbrevia- tion r/w initial value address access size port b data register l pbdrl r/w h'0000 h'ffffd182 8, 16 port b port register l pbprl r h'0xxx h'ffffd19e 8, 16 22.2.2 port b data register l (pbdrl) the port b data register l (pbdrl) is a 16-bit readable/writable register that stores port b data. bits pb9dr to pb4dr and pb2dr to pb0dr correspond to pins pb9 to pb4 and pb2 to pb0, respectively (multiplexed functions omitted he re) in the sh7083. bits pb9dr to pb0dr correspond to pins pb9 to pb0 (multiplexed functions omitted here) in the sh7084, sh7085, and sh7086. when a pin function is general output, if a value is written to pbdrl, that value is output directly from the pin, and if pbdrl is read, the register value is returned directly regardless of the pin state. when a pin function is general input, if pbdrl is read, the pin state, not the register value, is returned directly. if a value is written to pbdrl, a lthough that valu e is written into pbdrl, it does not affect the pin state. table 22.4 summarizes port b data register read/write operations.
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1187 of 1560 mar 18, 2011 sh7080 group ? pbdrl (sh7083) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrr/wr/wr/wr/wr/wr/wrr/wr/wr/w ------ pb9 dr pb8 dr pb7 dr pb6 dr pb5 dr pb4 dr - pb2 dr pb1 dr pb0 dr bit bit name initial value r/w description 15 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 pb9dr 0 r/w see table 22.4. 8 pb8dr 0 r/w 7 pb7dr 0 r/w 6 pb6dr 0 r/w 5 pb5dr 0 r/w 4 pb4dr 0 r/w 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 pb2dr 0 r/w see table 22.4. 1 pb1dr 0 r/w 0 pb0dr 0 r/w
section 22 i/o ports page 1188 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? pbdrl (sh7084, sh7085, sh7086) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrr/wr/wr/wr/wr/wr/wr/wr/wr/wr/w ------ pb9 dr pb8 dr pb7 dr pb6 dr pb5 dr pb4 dr pb3 dr pb2 dr pb1 dr pb0 dr bit bit name initial value r/w description 15 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 pb9dr 0 r/w see table 22.4. 8 pb8dr 0 r/w 7 pb7dr 0 r/w 6 pb6dr 0 r/w 5 pb5dr 0 r/w 4 pb4dr 0 r/w 3 pb3dr 0 r/w 2 pb2dr 0 r/w 1 pb1dr 0 r/w 0 pb0dr 0 r/w table 22.4 port b data register l (pbdrl) read/write operations ? pbdrl bits 9 to 0 pbior pin function read write 0 general input pin state can write to pbdrl, but it has no effect on pin state other than general input pin state can write to pbdrl, but it has no effect on pin state 1 general output pbdrl value value written is output from pin other than general output pbdrl value can write to pbdrl, but it has no effect on pin state
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1189 of 1560 mar 18, 2011 sh7080 group 22.2.3 port b port register l (pbprl) the port b port register l (pbprl) is a 16-bit read- only register that always returns the states of the pins regardless of the pfc setting. bits pb9pr to pb4pr and pb2pr to pb0pr correspond to pins pb9 to pb4 and pb2 to pb0, respectively (multiplexed functions omitted here) in the sh7083. bits pb9pr to pb0pr correspond to pins pb9 to pb0 (multiplexed functions omitted here) in the sh7084, sh7085, and sh7086 ? pbprl (sh7083) bit: initial value: r/w: 151413121110987654321 0 000000 ****** 0 *** rrrrrrrrrrrrrrrr ------ pb9 pr pb8 pr pb7 pr pb6 pr pb5 pr pb4 pr - pb2 pr pb1 pr pb0 pr bit bit name initial value r/w description 15 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 pb9pr pin state r 8 pb8pr pin state r 7 pb7pr pin state r 6 pb6pr pin state r 5 pb5pr pin state r 4 pb4pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 pb2pr pin state r 1 pb1pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 0 pb0pr pin state r
section 22 i/o ports page 1190 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? pbprl (sh7084, sh7085, sh7086) bit: initial value: r/w: 151413121110987654321 0 000000 ********** rrrrrrrrrrrrrrrr ------ pb9 pr pb8 pr pb7 pr pb6 pr pb5 pr pb4 pr pb3 pr pb2 pr pb1 pr pb0 pr bit bit name initial value r/w description 15 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 pb9pr pin state r 8 pb8pr pin state r 7 pb7pr pin state r 6 pb6pr pin state r 5 pb5pr pin state r 4 pb4pr pin state r 3 pb3pr pin state r 2 pb2pr pin state r 1 pb1pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 0 pb0pr pin state r
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1191 of 1560 mar 18, 2011 sh7080 group 22.3 port c port c in the sh7083, sh7084, and sh7085 is an input/output port with the 16 pins shown in figure 22.7. pc15 (i/o)/a15 (output) pc14 (i/o)/a14 (output) pc13 (i/o)/a13 (output) pc12 (i/o)/a12 (output) pc11 (i/o)/a11 (output) pc10 (i/o)/a10 (output) pc9 (i/o)/a9 (output) pc8 (i/o)/a8 (output) pc7 (i/o)/a7 (output) pc6 (i/o)/a6 (output) pc5 (i/o)/a5 (output) pc4 (i/o)/a4 (output) pc3 (i/o)/a3 (output) pc2 (i/o)/a2 (output) pc1 (i/o)/a1 (output) pc0 (i/o)/a0 (output) port c figure 22.7 port c (sh7083, sh7084, sh7085)
section 22 i/o ports page 1192 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group port c in the sh7086 is an input/output port with the 24 pins shown in figure 22.8. pc15 (i/o)/a15 (output) pc14 (i/o)/a14 (output) pc13 (i/o)/a13 (output) pc12 (i/o)/a12 (output) pc11 (i/o)/a11 (output) pc10 (i/o)/a10 (output) pc9 (i/o)/a9 (output) pc8 (i/o)/a8 (output) pc7 (i/o)/a7 (output) pc6 (i/o)/a6 (output) pc25 (i/o)/a25 (output) pc24 (i/o)/a24 (output) pc23 (i/o)/a23 (output) pc22 (i/o)/a22 (output) pc21 (i/o)/a21 (output) pc20 (i/o)/a20 (output) pc19 (i/o)/a19 (output) pc18 (i/o)/a18 (output) pc5 (i/o)/a5 (output) pc4 (i/o)/a4 (output) pc3 (i/o)/a3 (output) pc2 (i/o)/a2 (output) pc1 (i/o)/a1 (output) pc0 (i/o)/a0 (output) port c figure 22.8 port c (sh7086)
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1193 of 1560 mar 18, 2011 sh7080 group 22.3.1 register descriptions port c is a 16-bit input/output port in the sh7083, sh7084, and sh7085; a 24-bit input/output port in the sh7086. port c has the following registers. for details on register addresses and register states during each processing, re fer to section 27, list of registers. table 22.5 register configuration register name abbrevia- tion r/w initial value address access size port c data register h pcdrh r/w h'0000 h'ffffd200 8, 16, 32 port c data register l pcdrl r/w h'0000 h'ffffd202 8, 16 port c port register h pcprh r h'xxxx h'ffffd21c 8, 16, 32 port c port register l pcprl r h'xxxx h'ffffd21e 8, 16 22.3.2 port c data registers h and l (pcdrh and pcdrl) the port c data registers h and l (pcdrh and pcdrl) are 16-bit readable/writable registers that store port c data. bits pc15dr to pc0dr corres pond to pins pc15 to pc0 (multiplexed functions omitted here) in the sh7083, sh7084, and sh7085. bits pc25dr to pc18dr and pc15dr to pc0dr correspond to pins pc25 to pc18 and pc15 to pc0, respectively (multiplexed functions omitted here) in the sh7086. when a pin function is general output, if a value is written to pcdrh or pcdrl, that value is output directly from the pin, and if pcdrh or pcdrl is read, the register value is returned directly regardless of the pin state. when a pin function is general input, if pcdrh or pcdrl is read, the pin state, not the register value, is returned directly. if a value is written to pcdrh or pcdrl, although that value is written into pcdrh or pcdrl, it does not affect the pin state. table 22.6 summarizes port c data register read/write operations.
section 22 i/o ports page 1194 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? pcdrh (sh7083, sh7084, sh7085) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? pcdrh (sh7086) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrr/wr/wr/wr/wr/wr/wr/wr/wrr ------ pc25 dr pc24 dr pc23 dr pc22 dr pc21 dr pc20 dr pc19 dr pc18 dr -- bit bit name initial value r/w description 15 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 pc25dr 0 r/w see table 22.6. 8 pc24dr 0 r/w 7 pc23dr 0 r/w 6 pc22dr 0 r/w 5 pc21dr 0 r/w 4 pc20dr 0 r/w 3 pc19dr 0 r/w 2 pc18dr 0 r/w 1, 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1195 of 1560 mar 18, 2011 sh7080 group ? pcdrl bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pc15 dr pc14 dr pc13 dr pc12 dr pc11 dr pc10 dr pc9 dr pc8 dr pc7 dr pc6 dr pc5 dr pc4 dr pc3 dr pc2 dr pc1 dr pc0 dr bit bit name initial value r/w description 15 pc15dr 0 r/w see table 22.6. 14 pc14dr 0 r/w 13 pc13dr 0 r/w 12 pc12dr 0 r/w 11 pc11dr 0 r/w 10 pc10dr 0 r/w 9 pc9dr 0 r/w 8 pc8dr 0 r/w 7 pc7dr 0 r/w 6 pc6dr 0 r/w 5 pc5dr 0 r/w 4 pc4dr 0 r/w 3 pc3dr 0 r/w 2 pc2dr 0 r/w 1 pc1dr 0 r/w 0 pc0dr 0 r/w
section 22 i/o ports page 1196 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 22.6 port c data register (pcdr) read/write operations ? pcdrh bits 9 to 2 and pcdrl bits 15 to 0 pcior pin function read write 0 general input pin state can writ e to pcdrh and pcdrl, but it has no effect on pin state other than general input pin state can write to pcdrh and pcdrl, but it has no effect on pin state 1 general output pcdrh or pcdrl value value written is output from pin other than general output pcdrh or pcdrl value can write to pcdrh and pcdrl, but it has no effect on pin state 22.3.3 port c port registers h and l (pcprh and pcprl) the port c port registers h and l (pcprh and pcprl) are 16-bit read-only registers that always return the states of the pins regardless of the pfc setting. bits pc15pr to pc0pr correspond to pins pc15 to pc0 (multiplexed functions omitted here) in the sh7083, sh7084, and sh7085. bits pc25pr to pc18pr and pc15pr to pc0pr correspond to pins pc25 to pc18 and pc15 to pc0, respectively (multiplexed functions omitted here) in the sh7086. ? pcprh (sh7083, sh7084, sh7085) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1197 of 1560 mar 18, 2011 sh7080 group ? pcprh (sh7086) bit: initial value: r/w: 151413121110987654321 0 000000 ******** 00 rrrrrrrrrrrrrrrr ------ pc25 pr pc24 pr pc23 pr pc22 pr pc21 pr pc20 pr pc19 pr pc18 pr -- bit bit name initial value r/w description 15 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 pc25pr pin state r 8 pc24pr pin state r 7 pc23pr pin state r 6 pc22pr pin state r 5 pc21pr pin state r 4 pc20pr pin state r 3 pc19pr pin state r 2 pc18pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 1, 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 22 i/o ports page 1198 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? pcprl bit: initial value: r/w: 151413121110987654321 0 **************** rrrrrrrrrrrrrrrr pc15 pr pc14 pr pc13 pr pc12 pr pc11 pr pc10 pr pc9 pr pc8 pr pc7 pr pc6 pr pc5 pr pc4 pr pc3 pr pc2 pr pc1 pr pc0 pr bit bit name initial value r/w description 15 pc15pr pin state r 14 pc14pr pin state r 13 pc13pr pin state r 12 pc12pr pin state r 11 pc11pr pin state r 10 pc10pr pin state r 9 pc9pr pin state r 8 pc8pr pin state r 7 pc7pr pin state r 6 pc6pr pin state r 5 pc5pr pin state r 4 pc4pr pin state r 3 pc3pr pin state r 2 pc2pr pin state r 1 pc1pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 0 pc0pr pin state r
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1199 of 1560 mar 18, 2011 sh7080 group 22.4 port d port d in the sh7083 and sh7084 is an input/output port with the 16 pins shown in figure 22.9. note: * only in f-ztat version supporting full functions of e10a. pd15 (i/o)/d15 (i/o)/tioc4ds (i/o)/ audsync (output) * pd14 (i/o)/d14 (i/o)/tioc4cs (i/o)/audck (output) * pd13 (i/o)/d13 (i/o)/tioc4bs (i/o) pd12 (i/o)/d12 (i/o)/tioc4as (i/o) pd11 (i/o)/d11 (i/o)/tioc3ds (i/o)/audata3 (output) * pd10 (i/o)/d10 (i/o)/tioc3cs (i/o)/audata2 (output) * pd9 (i/o)/d9 (i/o)/tioc3bs (i/o)/audata1 (output) * pd8 (i/o)/d8 (i/o)/tioc3as (i/o)/audata0 (output) * pd7 (i/o)/d7 (i/o)/tic5ws (input) pd6 (i/o)/d6 (i/o)/tic5vs (input) pd5 (i/o)/d5 (i/o)/tic5us (input) pd4 (i/o)/d4 (i/o)/tic5w (input) pd3 (i/o)/d3 (i/o)/tic5v (input) pd2 (i/o)/d2 (i/o)/tic5u (input) pd1 (i/o)/d1 (i/o) pd0 (i/o)/d0 (i/o) port d figure 22.9 port d (sh7083, sh7084)
section 22 i/o ports page 1200 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group port d in the sh7085 and sh7086 is an input/output port with the 32 pins shown in figure 22.10. note: * only in f-ztat version supporting full functions of e10a. pd25 (i/o)/d25 (i/o)/dreq1 (input)/tioc4cs (i/o) pd24 (i/o)/d24 (i/o)/dreq0 (input)/tioc4ds (i/o) pd23 (i/o)/d23 (i/o)/irq7 (input)/ audsync (output) * pd22 (i/o)/d22 (i/o)/irq6 (input)/tic5us (input)/audck (output) * pd21 (i/o)/d21 (i/o)/irq5 (input)/tic5vs (input) pd20 (i/o)/d20 (i/o)/irq4 (input)/tic5ws (input) pd19 (i/o)/d19 (i/o)/irq3 (input)/ poe7 (input)/audata3 (output) * pd31 (i/o)/d31 (i/o)/tioc3as (i/o)/ adtrg (input) pd30 (i/o)/d30 (i/o)/tioc3cs (i/o)/ irqout (output) pd29 (i/o)/d29 (i/o)/ cs3 (output)/tioc3bs (i/o) pd28 (i/o)/d28 (i/o)/ cs2 (output)/tioc3ds (i/o) pd27 (i/o)/d27 (i/o)/dack1 (output)/tioc4as (i/o) pd26 (i/o)/d26 (i/o)/dack0 (output)/tioc4bs (i/o) pd18 (i/o)/d18 (i/o)/irq2 (input)/ poe6 (input)/audata2 (output) * pd17 (i/o)/d17 (i/o)/irq1 (input)/ poe5 (input)/audata1 (output) * pd16 (i/o)/d16 (i/o)/irq0 (input)/ poe4 (input)/audata0 (output) * pd15 (i/o)/d15 (i/o)/tioc4ds (i/o) pd14 (i/o)/d14 (i/o)/tioc4cs (i/o) pd13 (i/o)/d13 (i/o)/tioc4bs (i/o) pd12 (i/o)/d12 (i/o)/tioc4as (i/o) pd11 (i/o)/d11 (i/o)/tioc3ds (i/o) pd10 (i/o)/d10 (i/o)/tioc3cs (i/o) pd9 (i/o)/d9 (i/o)/tioc3bs (i/o) pd8 (i/o)/d8 (i/o)/tioc3as (i/o) pd7 (i/o)/d7 (i/o)/tic5ws (input) pd6 (i/o)/d6 (i/o)/tic5vs (input) pd5 (i/o)/d5 (i/o)/tic5us (input) pd4 (i/o)/d4 (i/o)/tic5w (input) pd3 (i/o)/d3 (i/o)/tic5v (input) pd2 (i/o)/d2 (i/o)/tic5u (input) pd1 (i/o)/d1 (i/o) pd0 (i/o)/d0 (i/o) port d figure 22.10 port d (sh7085, sh7086)
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1201 of 1560 mar 18, 2011 sh7080 group 22.4.1 register descriptions port d is a 16-bit input/output port in the sh7083 and sh7084; a 32-bit input/output port in the sh7085 and sh7086. port d has the following registers. for details on register addresses and register states during each processing, re fer to section 27, list of registers. table 22.7 register configuration register name abbrevia- tion r/w initial value address access size port d data register h pddrh r/w h'0000 h'ffffd280 8, 16, 32 port d data register l pddrl r/w h'0000 h'ffffd282 8, 16 port d port register h pdprh r h'xxxx h'ffffd29c 8, 16, 32 port d port register l pdprl r h'xxxx h'ffffd29e 8, 16 22.4.2 port d data registers h and l (pddrh and pddrl) the port d data registers h and l (pddrh and pddrl) are 16-bit readable/writable registers that store port d data. bits pd15dr to pd0dr correspond to pins pd15 to pd0 (multiplexed functions omitted here) in the sh7083 and sh7084. bits pd31dr to pd0dr correspond to pins pd31 to pd0 (multiplexed functions omitted here) in the sh7085 and sh7086. when a pin function is general output, if a value is written to pddrh or pddrl, that value is output directly from the pin, and if pddrh or pddrl is read, the register value is returned directly regardless of the pin state. when a pin function is general input, if pddrh or pddrl is read, the pin state, not the register value, is returned directly. if a value is wr itten to pddrh or pddrl, although that value is written into pddrh or pddrl, it does not affect the pin state. table 22.8 summarizes port d data register read/write operations.
section 22 i/o ports page 1202 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? pddrh (sh7083, sh7084) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? pddrh (sh7085, sh7086) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pd31 dr pd30 dr pd29 dr pd28 dr pd27 dr pd26 dr pd25 dr pd24 dr pd23 dr pd22 dr pd21 dr pd20 dr pd19 dr pd18 dr pd17 dr pd16 dr bit bit name initial value r/w description 15 pd31dr 0 r/w see table 22.8. 14 pd30dr 0 r/w 13 pd29dr 0 r/w 12 pd28dr 0 r/w 11 pd27dr 0 r/w 10 pd26dr 0 r/w 9 pd25dr 0 r/w 8 pd24dr 0 r/w 7 pd23dr 0 r/w 6 pd22dr 0 r/w 5 pd21dr 0 r/w 4 pd20dr 0 r/w 3 pd19dr 0 r/w 2 pd18dr 0 r/w 1 pd17dr 0 r/w 0 pd16dr 0 r/w
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1203 of 1560 mar 18, 2011 sh7080 group ? pddrl bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pd15 dr pd14 dr pd13 dr pd12 dr pd11 dr pd10 dr pd9 dr pd8 dr pd7 dr pd6 dr pd5 dr pd4 dr pd3 dr pd2 dr pd1 dr pd0 dr bit bit name initial value r/w description 15 pd15dr 0 r/w see table 22.8. 14 pd14dr 0 r/w 13 pd13dr 0 r/w 12 pd12dr 0 r/w 11 pd11dr 0 r/w 10 pd10dr 0 r/w 9 pd9dr 0 r/w 8 pd8dr 0 r/w 7 pd7dr 0 r/w 6 pd6dr 0 r/w 5 pd5dr 0 r/w 4 pd4dr 0 r/w 3 pd3dr 0 r/w 2 pd2dr 0 r/w 1 pd1dr 0 r/w 0 pd0dr 0 r/w
section 22 i/o ports page 1204 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 22.8 port d data register (pddr) read/write operations ? pddrh bits 15 to 0 and pddrl bits 15 to 0 pdiorh pin function read write 0 general input pin state can writ e to pddrh or pddrl, but it has no effect on pin state other than general input pin state can write to pddrh or pddrl, but it has no effect on pin state 1 general output pddrh or pddrl value value written is output from pin other than general output pddrh or pddrl value can write to pddrh or pddrl, but it has no effect on pin state 22.4.3 port d port registers h and l (pdprh and pdprl) the port d port registers h and l (pdprh and pdprl) are 16-bit read-only registers that always return the states of the pins regardless of the pfc setting. bits pd15pr to pd0pr correspond to pins pd15 to pd0 (multiplexed functions omitte d here) in the sh7083 and sh7084. bits pd31pr to pd0pr correspond to pins pd31 to pd0 (mu ltiplexed functions omitted here) in the sh7085 and sh7086. ? pdprh (sh7083, sh7084) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1205 of 1560 mar 18, 2011 sh7080 group ? pdprh (sh7085, sh7086) bit: initial value: r/w: 151413121110987654321 0 **************** rrrrrrrrrrrrrrrr pd31 pr pd30 pr pd29 pr pd28 pr pd27 pr pd26 pr pd25 pr pd24 pr pd23 pr pd22 pr pd21 pr pd20 pr pd19 pr pd18 pr pd17 pr pd16 pr bit bit name initial value r/w description 15 pd31pr pin state r 14 pd30pr pin state r 13 pd29pr pin state r 12 pd28pr pin state r 11 pd27pr pin state r 10 pd26pr pin state r 9 pd25pr pin state r 8 pd24pr pin state r 7 pd23pr pin state r 6 pd22pr pin state r 5 pd21pr pin state r 4 pd20pr pin state r 3 pd19pr pin state r 2 pd18pr pin state r 1 pd17pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 0 pd16pr pin state r
section 22 i/o ports page 1206 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? pdprl bit: initial value: r/w: 151413121110987654321 0 **************** rrrrrrrrrrrrrrrr pd15 pr pd14 pr pd13 pr pd12 pr pd11 pr pd10 pr pd9 pr pd8 pr pd7 pr pd6 pr pd5 pr pd4 pr pd3 pr pd2 pr pd1 pr pd0 pr bit bit name initial value r/w description 15 pd15pr pin state r 14 pd14pr pin state r 13 pd13pr pin state r 12 pd12pr pin state r 11 pd11pr pin state r 10 pd10pr pin state r 9 pd9pr pin state r 8 pd8pr pin state r 7 pd7pr pin state r 6 pd6pr pin state r 5 pd5pr pin state r 4 pd4pr pin state r 3 pd3pr pin state r 2 pd2pr pin state r 1 pd1pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 0 pd0pr pin state r
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1207 of 1560 mar 18, 2011 sh7080 group 22.5 port e port e in the sh7083 is an input/output port with the 13 pins shown in figure 22.11. note: * only in f-ztat version. pe15 (i/o)/ cke (output)/ dack1 (output)/ tioc4d (i/o)/ irqout (output) pe14 (i/o)/ dack0 (output)/ tioc4c (i/o) pe13 (i/o)/ tioc4b (i/o)/ mres (input)/ asebrkak (output) * / asebrk (input) * pe12 (i/o)/ tioc4a (i/o)/ txd3 (output)/ scs (i/o) pe10 (i/o)/ tioc3c (i/o)/ txd2 (output)/ sso (i/o) pe8 (i/o)/ tioc3a (i/o)/ sck2 (i/o)/ ssck (i/o) pe7 (i/o)/ bs (output)/ tioc2b (i/o)/ ubctrg (output)/ rxd2 (input)/ ssi (i/o) pe6 (i/o)/ cs7 (output)/ tioc2a (i/o)/ sck3 (i/o) pe4 (i/o)/ tioc1a (i/o)/ rxd3 (input)/ tck (input) * pe3 (i/o)/ tend1 (output)/ tioc0d (i/o)/ tdo (output) * pe2 (i/o)/ dreq1 (input)/ tioc0c (i/o)/ tdi (input) * pe1 (i/o)/ tend0 (output)/ tioc0b (i/o)/ trst (input) * pe0 (i/o)/ dreq0 (input)/ tioc0a (i/o)/ tms (input) * port e figure 22.11 port e (sh7083)
section 22 i/o ports page 1208 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group port e in the sh7084 is an input/output port with the 16 pins shown in figure 22.12. note: * only in f-ztat version. pe15 (i/o)/ cke (output)/ dack1 (output)/ tioc4d (i/o)/ irqout (output) pe14 (i/o)/ ah (output)/ dack0 (output)/ tioc4c (i/o) pe13 (i/o)/ tioc4b (i/o)/ mres (input) pe12 (i/o)/ tioc4a (i/o)/ txd3 (output)/ scs (i/o) pe11 (i/o)/ tioc3d (i/o)/ rxd3 (input)/ cts3 (input) pe10 (i/o)/ tioc3c (i/o)/ txd2 (output)/ sso (i/o) pe9 (i/o)/ tioc3b (i/o)/ sck3 (i/o)/ rts3 (output) pe8 (i/o)/ tioc3a (i/o)/ sck2 (i/o)/ ssck (i/o) pe7 (i/o)/ bs (output)/ tioc2b (i/o)/ ubctrg (output)/ rxd2 (input)/ ssi (i/o) pe6 (i/o)/ cs7 (output)/ tioc2a (i/o)/ sck3 (i/o) pe5 (i/o)/ cs6 (output)/ tioc1b (i/o)/ txd3 (output)/ asebrkak (output) * / asebrk (input) * pe4 (i/o)/ tioc1a (i/o)/ rxd3 (input)/ tck (input) * pe3 (i/o)/ tend1 (output)/ tioc0d (i/o)/ tdo (output) * pe2 (i/o)/ dreq1 (input)/ tioc0c (i/o)/ tdi (input) * pe1 (i/o)/ tend0 (output)/ tioc0b (i/o)/ trst (input) * pe0 (i/o)/ dreq0 (input)/ tioc0a (i/o)/ tms (input) * port e figure 22.12 port e (sh7084)
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1209 of 1560 mar 18, 2011 sh7080 group port e in the sh7085 is an input/output port with the 16 pins shown in figure 22.13. notes: 1. only in f-ztat version supporting full functions of e10a. 2. only in f-ztat version. pe15 (i/o)/ cke (output)/ dack1 (output)/ tioc4d (i/o)/ irqout (output) pe14 (i/o)/ wrhh (output)/ iciowr (output)/ ah (output)/ dqmuu (output)/ dack0 (output) / tioc4c (i/o) pe13 (i/o)/ tioc4b (i/o)/ mres (input)/ asebrkak (output) * 2 / asebrk (input) * 2 pe12 (i/o)/ tioc4a (i/o)/ txd3 (output)/ scs (i/o)/ tck (input) * 2 pe11 (i/o)/ tioc3d (i/o)/ rxd3 (input)/ cts3 (input)/ tdo (output) * 2 pe10 (i/o)/ tioc3c (i/o)/ txd2 (output)/ sso (i/o)/ tdi (input) * 2 pe9 (i/o)/ tioc3b (i/o)/ sck3 (i/o)/ rts3 (output)/ trst (input) * 2 pe8 (i/o)/ tioc3a (i/o)/ sck2 (i/o)/ ssck (i/o)/ tms (input) * 2 pe7 (i/o)/ bs (output)/ tioc2b (i/o)/ ubctrg (output)/ rxd2 (input)/ ssi (i/o) pe6 (i/o)/ cs7 (output)/ tioc2a (i/o)/ sck3 (i/o)/ audata0 (output) * 1 pe5 (i/o)/ cs6 (output)/ ce1b (output)/ tioc1b (i/o)/ txd3 (output) / audata1 (output) * 1 pe4 (i/o)/ i ois16 (input)/ tioc1a (i/o)/ rxd3 (input)/ audata2 (output) * 1 pe3 (i/o)/ tend1 (output)/ tioc0d (i/o)/ audata3 (output) * 1 pe2 (i/o)/ dreq1 (input)/ tioc0c (i/o) pe1 (i/o)/ tend0 (output)/ tioc0b (i/o) pe0 (i/o)/ dreq0 (input)/ tioc0a (i/o)/ audck (output) * 1 port e figure 22.13 port e (sh7085)
section 22 i/o ports page 1210 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group port e in the sh7086 is an input/output port with the 22 pins shown in figure 22.14. notes: 1. only in f-ztat version supporting full functions of e10a. 2. only in f-ztat version. pe15 (i/o)/ cke (output)/ dack1 (output)/ tioc4d (i/o)/ irqout (output) pe14 (i/o)/ wrhh (output)/ iciowr (output)/ ah (output)/ dqmuu (output)/ dack0 (output) / tioc4c (i/o) pe13 (i/o)/ tioc4b (i/o)/ mres (input)/ asebrkak (output) * 2 / asebrk (input) * 2 pe12 (i/o)/ tioc4a (i/o)/ txd3 (output)/ scs (i/o)/ tck (input) * 2 pe11 (i/o)/ tioc3d (i/o)/ rxd3 (input)/ cts3 (input)/ tdo (output) * 2 pe10 (i/o)/ tioc3c (i/o)/ txd2 (output)/ sso (i/o)/ tdi (input) * 2 pe9 (i/o)/ tioc3b (i/o)/ sck3 (i/o)/ rts3 (output)/ trst (input) * 2 pe8 (i/o)/ tioc3a (i/o)/ sck2 (i/o)/ ssck (i/o)/ tms (input) * 2 pe7 (i/o)/ bs (output)/ tioc2b (i/o)/ ubctrg (output)/ rxd2 (input)/ ssi (i/o) pe6 (i/o)/ cs7 (output)/ tioc2a (i/o)/ sck3 (i/o)/ audata0 (output) * 1 pe21 (i/o)/ tioc4ds (i/o) pe20 (i/o)/ tioc4cs (i/o) pe19 (i/o)/ tioc4bs (i/o) pe18 (i/o)/ tioc4as (i/o) pe17 (i/o)/ tioc3ds (i/o) pe16 (i/o)/ cs8 (output)/ tioc3bs (i/o) pe5 (i/o)/ cs6 (output)/ ce1b (output)/ tioc1b (i/o)/ txd3 (output) / audata1 (output) * 1 pe4 (i/o)/ iois16 (input)/ tioc1a (i/o)/ rxd3 (input)/ audata2 (output) * 1 pe3 (i/o)/ tend1 (output)/ tioc0d (i/o)/ audata3 (output) * 1 pe2 (i/o)/ dreq1 (input)/ tioc0c (i/o) pe1 (i/o)/ tend0 (output)/ tioc0b (i/o) pe0 (i/o)/ dreq0 (input)/ tioc0a (i/o)/ audck (output) * 1 port e figure 22.14 port e (sh7086)
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1211 of 1560 mar 18, 2011 sh7080 group 22.5.1 register descriptions port e is a 13-bit input/output port in the sh7083; a 16-bit input/output port in the sh7084 and sh7085; a 22-bit input/output port in the sh7086. port e has the following registers. for details on register addresses and register states during each processing, refer to section 27, list of registers. table 22.9 register configuration register name abbrevia- tion r/w initial value address access size port e data register h pedrh r/w h'0000 h'ffffd300 8, 16, 32 port e data register l pedrl r/w h'0000 h'ffffd302 8, 16 port e port register h peprh r h'xxxx h'ffffd31c 8, 16, 32 port e port register l peprl r h'xxxx h'ffffd31e 8, 16 22.5.2 port e data registers h and l (pedrh and pedrl) the port e data registers h and l (pedrh and pedrl) are 16-bit readable/writable registers that store port e data. bits pe15dr to pe12dr, pe10dr, pe8dr to pe6dr, and pe4dr to pe0dr correspond to pins pe15 to pe12, pe10, pe8 to pe6, and pe4 to pe0, respectively (multiplexed functions omitted here) in the sh7083. bits pe 15dr to pe0dr correspond to pins pe15 to pe0 (multiplexed functions omitted here) in th e sh7084 and sh7085. bits pe21dr to pe0dr correspond to pins pe21 to pe0, respectively (m ultiplexed functions omitted here) in the sh7086. when a pin function is general output, if a value is written to pedrh or pedrl, that value is output directly from the pin, and if pedrh or pedrl is read, the register value is returned directly regardless of the pin state. when a pin function is general input, if pedrh or pedrl is read, the pin state, not the register value, is returned directly. if a value is written to pedrh or pedrl, although that value is written into pedrh or pedrl, it does not affect the pin state. table 22.10 summarizes port e data register read/write operations.
section 22 i/o ports page 1212 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? pedrh (sh7083, sh7084, sh7085) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? pedrh (sh7086) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrr/wr/wr/wr/wr/wr/w ---------- pe21 dr pe20 dr pe19 dr pe18 dr pe17 dr pe16 dr bit bit name initial value r/w description 15 to 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 pe21dr 0 r/w see table 22.10. 4 pe20dr 0 r/w 3 pe19dr 0 r/w 2 pe18dr 0 r/w 1 pe17dr 0 r/w 0 pe16dr 0 r/w
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1213 of 1560 mar 18, 2011 sh7080 group ? pedrl (sh7083) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r r/w r r/w r/w r/w r r/w r/w r/w r/w r/w pe15 dr pe14 dr pe13 dr pe12 dr - pe10 dr - pe8 dr pe7 dr pe6 dr - pe4 dr pe3 dr pe2 dr pe1 dr pe0 dr bit bit name initial value r/w description 15 pe15dr 0 r/w see table 22.10. 14 pe14dr 0 r/w 13 pe13dr 0 r/w 12 pe12dr 0 r/w 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 pe10dr 0 r/w see table 22.10. 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 8 pe8dr 0 r/w see table 22.10. 7 pe7dr 0 r/w 6 pe6dr 0 r/w 5 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 4 pe4dr 0 r/w see table 22.10. 3 pe3dr 0 r/w 2 pe2dr 0 r/w 1 pe1dr 0 r/w 0 pe0dr 0 r/w
section 22 i/o ports page 1214 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? pedrl (sh7084, sh7085, sh7086) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w pe15 dr pe14 dr pe13 dr pe12 dr pe11 dr pe10 dr pe9 dr pe8 dr pe7 dr pe6 dr pe5 dr pe4 dr pe3 dr pe2 dr pe1 dr pe0 dr bit bit name initial value r/w description 15 pe15dr 0 r/w see table 22.10. 14 pe14dr 0 r/w 13 pe13dr 0 r/w 12 pe12dr 0 r/w 11 pe11dr 0 r/w 10 pe10dr 0 r/w 9 pe9dr 0 r/w 8 pe8dr 0 r/w 7 pe7dr 0 r/w 6 pe6dr 0 r/w 5 pe5dr 0 r/w 4 pe4dr 0 r/w 3 pe3dr 0 r/w 2 pe2dr 0 r/w 1 pe1dr 0 r/w 0 pe0dr 0 r/w
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1215 of 1560 mar 18, 2011 sh7080 group table 22.10 port e data regist er (pedr) read/write operations ? pedrh bits 5 to 0 and pedrl bits 15 to 0 peior pin function read write 0 general input pin state can write to pedrh and pedrl, but it has no effect on pin state other than general input pin state can write to pedrh and pedrl, but it has no effect on pin state 1 general output pedrh or pedrl value value written is output from pin other than general output pedrh or pedrl value can write to pedrh and pedrl, but it has no effect on pin state 22.5.3 port e port registers h and l (peprh and peprl) the port e port registers h and l (peprh and peprl) are 16-bit read-only registers that always return the states of the pins regardless of the pfc setting. bits pe15pr to pe12pr, pe10pr, pe8pr to pe6pr, and pe4pr to pe0pr correspond to pins pe15 to pe12, pe10, pe8 to pe6, and pe4 to pe0, respectively (multiplexed functions omitted here) in the sh7083. bits pe15pr to pe0pr correspond to pins pe15 to pe0 (multiple xed functions omitted here) in the sh7084 and sh7085. bits pe21pr to pe0pr correspond to pi ns pe21 to pe0, respectively (multiplexed functions omitted here) in the sh7086. ? peprh (sh7083, sh7084, sh7085) bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrrrrr ---------------- bit bit name initial value r/w description 15 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 22 i/o ports page 1216 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? peprh (sh7086) bit: initial value: r/w: 151413121110987654321 0 0000000000 ****** rrrrrrrrrrrrrrrr ---------- pe21 pr pe20 pr pe19 pr pe18 pr pe17 pr pe16 pr bit bit name initial value r/w description 15 to 6 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 5 pe21pr pin state r 4 pe20pr pin state r 3 pe19pr pin state r 2 pe18pr pin state r 1 pe17pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 0 pe16pr pin state r
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1217 of 1560 mar 18, 2011 sh7080 group ? peprl (sh7083) bit: initial value: r/w: 151413121110987654321 0 **** 0 * 0 *** 0 ***** rrrrrrrrrrrrrrrr pe15 pr pe14 pr pe13 pr pe12 pr - pe10 pr - pe8 pr pe7 pr pe6 pr - pe4 pr pe3 pr pe2 pr pe1 pr pe0 pr bit bit name initial value r/w description 15 pe15pr pin state r 14 pe14pr pin state r 13 pe13pr pin state r 12 pe12pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 pe10pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 8 pe8pr pin state r 7 pe7pr pin state r 6 pe6pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 5 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 4 pe4pr pin state r 3 pe3pr pin state r 2 pe2pr pin state r 1 pe1pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 0 pe0pr pin state r
section 22 i/o ports page 1218 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? peprl (sh7084, sh7085, sh7086) bit: initial value: r/w: 151413121110987654321 0 **************** rrrrrrrrrrrrrrrr pe15 pr pe14 pr pe13 pr pe12 pr pe11 pr pe10 pr pe9 pr pe8 pr pe7 pr pe6 pr pe5 pr pe4 pr pe3 pr pe2 pr pe1 pr pe0 pr bit bit name initial value r/w description 15 pe15pr pin state r 14 pe14pr pin state r 13 pe13pr pin state r 12 pe12pr pin state r 11 pe11pr pin state r 10 pe10pr pin state r 9 pe9pr pin state r 8 pe8pr pin state r 7 pe7pr pin state r 6 pe6pr pin state r 5 pe5pr pin state r 4 pe4pr pin state r 3 pe3pr pin state r 2 pe2pr pin state r 1 pe1pr pin state r the pin state is returned regardless of the pfc setting. these bits cannot be modified. 0 pe0pr pin state r
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1219 of 1560 mar 18, 2011 sh7080 group 22.6 port f port f in the sh7083, sh7084, and sh7085 is an input-only port with the 8 pins shown in figure 22.15. pf7 (input)/an7 (input) pf6 (input)/an6 (input) pf5 (input)/an5 (input) pf4 (input)/an4 (input) pf3 (input)/an3 (input) pf2 (input)/an2 (input) pf1 (input)/an1 (input) pf0 (input)/an0 (input) port f figure 22.15 port f (sh7083, sh7084, sh7085) port f in the sh7086 is an input-only port with the 16 pins shown in figure 22.16. pf15 (input)/an15 (input) pf14 (input)/an14 (input) pf13 (input)/an13 (input) pf12 (input)/an12 (input) pf11 (input)/an11 (input) pf10 (input)/an10 (input) pf9 (input)/an9 (input) pf8 (input)/an8 (input) pf7 (input)/an7 (input) pf6 (input)/an6 (input) pf5 (input)/an5 (input) pf4 (input)/an4 (input) pf3 (input)/an3 (input) pf2 (input)/an2 (input) pf1 (input)/an1 (input) pf0 (input)/an0 (input) port f figure 22.16 port f (sh7086)
section 22 i/o ports page 1220 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 22.6.1 register descriptions port f is an 8-bit input-only port in the sh7083, sh7084, and sh7085; a 16-bit input-only port in the sh7086. port f has the following register. for details on register addresses and register states during each processing, refer to section 27, list of registers. table 22.11 register configuration register name abbrevia- tion r/w initial value address access size port f data register l pfdrl r h'xxxx h'ffffd382 8, 16 22.6.2 port f data register l (pfdrl) the port f data register l (pfdrl) is a 16-bit read-only register that stores port f data. bits pf7dr to pf0dr correspond to pi ns pf7 to pf0 (multiplexed f unctions omitted here) in the sh7083, sh7084, and sh7085. bits pf15dr to pf0dr correspond to pins pf15 to pf0 (multiplexed functions omitted here) in the sh7086. any value written into these bits is ignored, and there is no effect on the state of the pins. when any of the bits are read, the pin st ate rather than the bit value is read directly. however, when an a/d converter analog input is being sampled, values of 1 are read out. table 22.12 summarizes port f data register l read/write operations.
section 22 i/o ports r01uh0198ej0500 rev. 5.00 page 1221 of 1560 mar 18, 2011 sh7080 group ? pfdrl (sh7083, sh7084, sh7085) bit: initial value: r/w: 151413121110987654321 0 ******** rrrrrrrrrrrrrrrr 00000000 -------- pf7 dr pf6 dr pf5 dr pf4 dr pf3 dr pf2 dr pf1 dr pf0 dr bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 pf7dr pin state r/w see table 22.12. 6 pf6dr pin state r/w 5 pf5dr pin state r/w 4 pf4dr pin state r/w 3 pf3dr pin state r/w 2 pf2dr pin state r/w 1 pf1dr pin state r/w 0 pf0dr pin state r/w
section 22 i/o ports page 1222 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? pfdrl (sh7086) bit: initial value: r/w: 151413121110987654321 0 **************** rrrrrrrrrrrrrrrr pf15 dr pf14 dr pf13 dr pf12 dr pf11 dr pf10 dr pf9 dr pf8 dr pf7 dr pf6 dr pf5 dr pf4 dr pf3 dr pf2 dr pf1 dr pf0 dr bit bit name initial value r/w description 15 pf15dr pin state r 14 pf14dr pin state r 13 pf13dr pin state r 12 pf12dr pin state r 11 pf11dr pin state r 10 pf10dr pin state r 9 pf9dr pin state r 8 pf8dr pin state r 7 pf7dr pin state r 6 pf6dr pin state r 5 pf5dr pin state r 4 pf4dr pin state r 3 pf3dr pin state r 2 pf2dr pin state r 1 pf1dr pin state r see table 22.12. 0 pf0dr pin state r table 22.12 port f data register l (pfdrl) read/write operations ? pfdrl bits 15 to 0 pin function read write general input pin state ignored (no effect on pin state) ann input (analog input) 1 ignored (no effect on pin state)
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1223 of 1560 mar 18, 2011 sh7080 group section 23 flash memory this lsi has 512-kbyte or 256-kbyte on-chip flash memory. the flash memory has the following features. 23.1 features ? two flash-memory mats, with one selected by the mode in which the lsi starts up the on-chip flash memory has two memory sp aces in the same address space (hereafter referred to as memory mats). the mode setting when the lsi starts up determines the memory mat that is currently mapped. the mat can be switched by bank-switching after the lsi has started up. ? size of the user mat, from which booting- up proceeds after a power-on reset in user mode: 512 kbytes or 256 kbytes ? size of the user boot mat, from which booting-up proceeds after a power-on reset in user boot mode: 12 kbytes ? three on-board programming modes and one off-board programming mode on-board programming modes boot mode : the on-chip sci interface is used for pr ogramming in this mode. either the user mat or user-boot mat can be programmed, and the bit rate for data transfer between the host and this lsi are auto matically adjusted. user program mode : this mode allows programming of the user mat via any desired interface. user boot mode : this mode allows writing of a user boot program via any desired interface and programming of the user mat. off-board programming mode programmer mode: this mode allows programming of the user mat and user boot mat with the aid of a prom programmer. ? downloading of an on-chip program to pr ovide an interface for programming/erasure this lsi has a dedicated programming/erasing program. after this program has been downloaded to the on-chip ram, programming or erasing can be performed by setting parameters as arguments. ?user branching? is also supported.
section 23 flash memory page 1224 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? user branching programming is performed in 128-byte units. each round of programming consists of application of the programming pulse, reading for verification, and several other steps. erasing is performed in block units and each round of erasing consists of several steps. a user- processing routine can be exec uted between each round of eras ing, and making the setting for this is called the addition of a user branch. ? using on-chip ram to emulate flash memory by laying on-chip ram over part of the flash memory, flash-memory programming can be emulated in real time. ? protection modes there are two modes of protection: software protection is applied by register settings and hardware protection is applied by the level on the fwe pin. protection of the flash memory from programming or erasure can be selected. when an abnormal state is de tected, such as runaway execution of programming/erasing, the protection modes initiate the transition to the error protection state and suspend programming/erasing processing. ? programming/erasing time the time taken to program 128 bytes of flash memory in a single round is t p ms (typ.), which is equivalent to t p /128 ms per byte. the erasing time is t e s (typ.) per block. ? number of programming operations the flash memory can be programmed up to n wec times. ? operating frequency for programming/erasing the operating frequency for programming/erasing is a maximum of 40 mhz (p ).
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1225 of 1560 mar 18, 2011 sh7080 group 23.2 overview 23.2.1 block diagram fccs fpcs fecs fkey fmats ftdar ramer control unit memory mat unit flash memory user mat: 512 kbytes or 256 kbytes user boot mat: 12 kbytes operating mode module bus fwe pin mode pins internal address bus internal data bus (32 bits) [legend] fccs: flash code control and status register fpcs: flash program code select register fecs: flash erase code select register fkey: flash key code register fmats: flash mat select register ftdar: flash transfer destination address register ramer: ram emulation register figure 23.1 block diagram of flash memory
section 23 flash memory page 1226 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 23.2.2 operating mode when each mode pin and the fwe pin are set in the reset state and the reset signal is released, the microcomputer enters each operati ng mode as shown in figure 23.2. for the setting of each mode pin and the fwe pin, see table 23.1. ? flash memory cannot be read, programmed, or erased in rom invalid mode. the programming/erasing interface re gisters cannot be written to. when these registers are read, h'00 is always read. ? flash memory can be read in user mode, but cannot be programmed or erased. ? flash memory can be read, programmed, or erased on the board only in user program mode, user boot mode, and boot mode. ? flash memory can be read, programmed, or erased by means of the prom programmer in programmer mode. programmer mode reset state rom invalid mode user mode user program mode user boot mode boot mode on-board programming mode fwe=0 ram emulation is enabled fwe=1 res =0 rom invalid mode setting res =0 user mode setting res =0 user program mode setting user boot mode s etting res =0 boot mode setting res =0 res =0 programmer mode setting figure 23.2 mode transition of flash memory
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1227 of 1560 mar 18, 2011 sh7080 group table 23.1 (1) relationship between fwe and md pins and operating modes (sh7083 and sh7084) pin reset state rom invalid mode rom valid mode user program mode user boot mode boot mode programmer mode res 0 1 1 1 1 1 fwe 0/1 0 0 1 1 1 md0 0/1 0/1 * 1 0/1 * 2 0/1 * 2 1 0 md1 0/1 0 1 1 0 0 setting value depends on the condition of the specialized prom programmer. notes: 1. md0 = 0: 8-bit external bus, md0 = 1: 16-bit external bus 2. md0 = 0: external bus can be used, md0 = 1: single-chip mode (external bus cannot be used) table 23.1 (2) relationship between fwe and md pins and operating modes (sh7085 and sh7086) pin reset state rom invalid mode rom valid mode user program mode user boot mode boot mode programmer mode res 0 1 1 1 1 1 fwe 0/1 0 0 1 1 1 md0 0/1 0/1 * 1 0/1 * 2 0/1 * 2 1 0 md1 0/1 0 1 1 0 0 setting value depends on the condition of the specialized prom programmer. notes: 1. md0 = 0: 16-bit external bus, md0 = 1: 32-bit external bus 2. md0 = 0: external bus can be used, md0 = 1: single-chip mode (external bus cannot be used)
section 23 flash memory page 1228 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 23.2.3 mode comparison the comparison table of programming and erasing related items about boot mode, user program mode, user boot mode, and programmer mode is shown in table 23.2. table 23.2 comparison of programming modes boot mode user program mode user boot mode programmer mode programming/ erasing environment on-board programming on-board programming on-board programming off-board programming programming/ erasing enable mat user mat user boot mat user mat user mat user mat user boot mat programming/ erasing control command method programming/ erasing interface programming/ erasing interface ? all erasure possible (automatic) possible possible possible (automatic) block division erasure possible * 1 possible possible not possible program data transfer from host via sci from optional device via ram from optional device via ram via programmer user branch function not possible possible possible not possible ram emulation not possible possible not possible not possible reset initiation mat embedded program storage mat user mat user boot mat * 2 embedded program storage mat transition to user mode mode setting change and reset fwe setting change mode setting change and reset ? notes: 1. all-erasure is performed. after that, the specified block can be erased. 2. initiation starts from the embedded program storage mat. after checking the flash- memory related registers, initiation starts from the reset vector of the user mat. ? the user boot mat can be programmed or erased only in boot mode and programmer mode. ? the user mat and user boot mat are all erased in boot mode. then, the user mat and user boot mat can be programmed by means of the command method. however, the contents of the mat cannot be read until this state. only user boot mat is programmed and the user mat is programmed in user boot mode or only user mat is programmed because user boot mode is not used. ? in user boot mode, the boot operation of the optional interface can be performed by a mode pin setting different from user program mode.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1229 of 1560 mar 18, 2011 sh7080 group 23.2.4 flash memory configuration this lsi's flash memory is configured by the 512-kbyte or 256-kbyte user mat and 12-kbyte user boot mat. the start address is allocated to the same address in the user mat and user boot mat. therefore, when the program execution or data access is pe rformed between the two mats, the mat must be switched by using fmats. the user mat or user boot mat can be read in all modes if it is in rom valid mode. however, the user boot mat can be programmed only in boot mode and programmer mode. address h'00000000 address h'0007ffff (when the size of the user mat is 512 kbytes) address h'0003ffff (when the size of the user mat is 256 kbytes) address h'00000000 address h'00002fff 512 kbytes or 256 kbytes 12 kbytes figure 23.3 flash memory configuration the user mat and user boot mat have differen t memory sizes. do not access a user boot mat that is 12 kbytes or more. when a user boot mat exceeding 12 kbytes is read from, an undefined value is read.
section 23 flash memory page 1230 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 23.2.5 block division the user mat is divided into 64 kbytes (512-kbyte version: seven blocks, 256-kbyte version: three blocks), 32 kbytes (one block), and 4 kbytes (eight blocks) as shown in figure 23.4. the user mat can be erased in this divided-block units and the erase-block number of eb0 to eb15 is specified when erasing. the ram emulation can be performed in the eight blocks of 4 kbytes. address h'00000000 last address of 512-kbyte version h'0007ffff 64 kbytes 512kb 256kb 32 kbytes 64 kbytes 64 kbytes note: * ram emulation can be performed in the eight 4-kbyte blocks. eb0 eb7 eb8 eb9 eb10 eb11 * 4 kbytes 8 < user mat > erase bloc k 64 kbytes 64 kbytes 64 kbytes 64 kbytes eb12 eb13 eb14 eb15 last address of 256-kbyte version h'0003ffff to figure 23.4 block division of user mat
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1231 of 1560 mar 18, 2011 sh7080 group 23.2.6 programming/erasi ng interface programming/erasing is executed by downloading the on-chip program to the on-chip ram and specifying the program address/data and erase bl ock by using the interface registers/parameters. the procedure program is made by the user in user program mode and user boot mode. the overview of the procedure is as follows. for de tails, see section 23.5.2, user program mode. download on-chip program by setting vbr, fkey, and sco bits. initialization execution (on-chip program execution) select on-chip program to be downloaded and set download destination programming (in 128-byte units) or erasing (in one-block units) (on-chip program execution) start user procedure program for programming/erasing. end user procedure program programming/ erasing completed? no yes figure 23.5 overview of user procedure program (1) selection of on-chip program to be downloaded and setting of download destination this lsi has programming/erasing programs and they can be downloaded to the on-chip ram. the on-chip program to be downloaded is selected by setting the corresponding bits in the programming/erasing interface registers. the download destination can be specified by ftdar.
section 23 flash memory page 1232 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (2) download of on-chip program the on-chip program is automatically downloaded by clearing vbr of the cpu to h'84000000 and then setting the sco bit in the flas h code control and stat us register (fccs) and the flash key code register (fkey), which are programming/erasing interface registers. the user mat is replaced to the embedded pr ogram storage area when downloading. since the flash memory cannot be read when programming/erasing, the procedure program, which is working from download to completion of programming/erasing, must be executed in a space other than the flash memory to be progr ammed/erased (for example, on-chip ram). since the result of download is returned to the programming/erasing interface parameters, whether the normal download is ex ecuted or not can be confirmed. note that vbr can be changed after download is completed. (3) initialization of programming/erasing the operating frequency and user branch are set before execution of programming/erasing. the user branch destination must be in an area other than the user mat area which is in the middle of programming and the area where the on-chip program is downloaded. these settings are performed by using the programmi ng/erasing interface parameters. (4) programming/erasing execution to program or erase, the fwe pin must be brought high and user program mode must be entered. the program data/programming destination address is specified in 128-byte units when programming. the block to be erased is specified in erase-block units when erasing. these specifications are set by using the prog ramming/erasing interface parameters and the on- chip program is initiated. the on-chip program is executed by using the jsr or bsr instruction to perform the subroutine call of th e specified address in the on-chip ram. the execution result is returned to the pr ogramming/erasing interface parameters. the area to be programmed must be erased in advance when programming flash memory. there are limitations and notes on the interrupt processing during programming/erasing. for details, see section 23.8.2, interrupts during programming/erasing. (5) when programming/erasing is executed consecutively when the processing is not ended by the 128-byte programming or one-block erasure, the program address/data and erase-block number must be updated and consecutive programming/erasing is required. since the downloaded on-chip program is left in the on-chip ram after the processing, download and initialization are not required when the same processing is executed consecutively.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1233 of 1560 mar 18, 2011 sh7080 group 23.3 input/output pins flash memory is controlled by the pins as shown in table 23.3. table 23.3 pin configuration pin name symbol input/output function power-on reset res input reset flash programming enable fwe input hardware protection when programming flash memory mode 1 md1 input sets operating mode of this lsi mode 0 md0 input sets operating mode of this lsi transmit data txd1 (pa4) output serial transmit data output (used in boot mode) receive data rxd1 (pa3) input serial receive data input (used in boot mode) 23.4 register descriptions 23.4.1 registers the registers/parameters which control flash memory when the on-chip flash memory is valid are shown in table 23.4. there are several operating modes for accessing flas h memory, for example, read mode/program mode. there are two memory mats: user mat and user boot mat. the dedicated registers/parameters are allocated for each operating mode and mat se lection. the correspondence of operating modes and registers/parameters for use is shown in table 23.5.
section 23 flash memory page 1234 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 23.4 (1) register configuration register name abbreviation * 4 r/w initial value address access size flash code control and status register fccs r, w * 1 h'00 * 2 h'80 * 2 h'ffffcc00 8 flash program code select register fpcs r/w h'00 h'ffffcc01 8 flash erase code select register fecs r/w h'00 h'ffffcc02 8 flash key code register fkey r/w h'00 h'ffffcc04 8 flash mat select register fmats r/w h'00 * 3 h'aa * 3 h'ffffcc05 8 flash transfer destination address register ftdar r/w h'00 h'ffffcc06 8 ram emulation register ramer r/w h'0000 h'fffff108 16 notes: 1. the bits except the sco bit are read-only bits. the sco bit is a programming-only bit. (the value which can be read is always 0.) 2. the initial value of the fwe bit is 0 when the fwe pin goes low. the initial value of the fwe bit is 1 when the fwe pin goes high. 3. the initial value at initiation in user mode or user program mode is h'00. the initial value at initiation in user boot mode is h'aa. 4. all registers except for ramer can be accessed only in bytes. ramer can be accessed in bytes or words. table 23.4 (2) parameter configuration name abbreviation r/w initial value address access size download pass/fail result dpfr r/w undefined on-chip ram * 8, 16, 32 flash pass/fail result fpfr r/w undefined r0 of cpu 8, 16, 32 flash multipurpose address area fmpar r/w undefined r5 of cpu 8, 16, 32 flash multipurpose data destination area fmpdr r/w undefined r4 of cpu 8, 16, 32 flash erase block select febs r/w undefined r4 of cpu 8, 16, 32 flash program and erase frequency control fpefeq r/w undefined r4 of cpu 8, 16, 32 flash user branch address set parameter fubra r/w undefined r5 of cpu 8, 16, 32 note: * one byte of the start address in the on-chip ram area specified by ftdar is valid.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1235 of 1560 mar 18, 2011 sh7080 group table 23.5 register/parame ter and target mode download initiali- zation program- ming erasure read ram emulation fccs ? ? ? ? ? fpcs ? ? ? ? ? pecs ? ? ? ? ? fkey ? ? ? fmats ? ? * 1 * 1 * 2 ? programming/ erasing interface registers ftdar ? ? ? ? ? dpfr ? ? ? ? ? fpfr ? ? ? fpefeq ? ? ? ? ? fubra ? ? ? ? ? fmpar ? ? ? ? ? fmpdr ? ? ? ? ? programming/ erasing interface parameters febs ? ? ? ? ? ram emulation ramer ? ? ? ? ? notes: 1. the setting is required when programming or erasing user mat in user boot mode. 2. the setting may be required according to the combination of initiation mode and read target mat.
section 23 flash memory page 1236 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 23.4.2 programming/erasing interface registers the programming/erasing interface registers are as described below. they are all 8-bit registers that can be accessed in bytes. (1) flash code control and status register (fccs) fccs is configured by bits which request the monitor of the fwe pin state and error occurrence during programming or erasing flash memory and the download of the on-chip program. bit: initial value: r/w: 7654321 0 1/0 1/0 0 0 0 0 0 0 rrrrrrr(r)/w fwe mat - fler - - - sco bit bit name initial value r/w description 7 fwe 1/0 r flash programming enable monitors the level which is input to the fwe pin that performs hardware protection of the flash memory programming or erasing. the initial value is 0 or 1 according to the fwe pin state. 0: when the fwe pin goes low (in hardware protection state) 1: when the fwe pin goes high 6 mat 1/0 r mat bit indicates whether the user mat or user boot mat is selected. 0: user mat is selected 1: user boot mat is selected 5 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1237 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 4 fler 0 r flash memory error indicates an error occurs during programming and erasing flash memory. when fler is set to 1, flash memory enters the error protection state. when fler is set to 1, high voltage is applied to the internal flash memory. to reduce the damage to flash memory, the reset signal must be released after the reset period of 100 s which is longer than normal. 0: flash memory operates normally programming/erasing protection for flash memory (error protection) is invalid. [clearing condition] at a power-on reset 1: indicates an error occurs during programming/erasing flash memory. programming/erasing protection for flash memory (error protection) is valid. [setting condition] see section 23.6.3, error protection. 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 23 flash memory page 1238 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 sco 0 (r)/w source program copy operation requests the on-chip programming/erasing program to be downloaded to the on-chip ram. when this bit is set to 1, the on-chip program which is selected by fpcs/fecs is automatically downloaded in the on-chip ram area specified by ftdar. in order to set this bit to 1, ram emulation state must be canceled, h'a5 must be written to fkey, and this operation must be in the on-chip ram. four nop instructions must be executed immediately after setting this bit to 1. for interrupts during download, see section 23.8.2, interrupts during programming/erasing. for the download time, see section 23.8.3, other notes. since this bit is cleared to 0 when download is completed, this bit cannot be read as 1. download by setting the sco bit to 1 requires a special interrupt processing that performs bank switching to the on-chip program storage area. therefore, before issuing a download request (sco = 1), set vbr to h'84000000. otherwise, the cpu gets out of control. once download end is confirmed, vbr can be changed to any other value. the mode in which the fwe pin is high must be used when using the sco function. 0: download of the on-chip programming/erasing program to the on-chip ram is not executed. [clearing condition] when download is completed 1: request that the on-chip programming/erasing program is downloaded to the on-chip ram is generated [setting conditions] when all of the following conditions are satisfied and 1 is written to this bit ? fkey is written to h'a5 ? during execution in the on-chip ram ? not in ram emulation mode (rams in ramcr = 0)
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1239 of 1560 mar 18, 2011 sh7080 group (2) flash program code select register (fpcs) fpcs selects the on-chip programming program to be downloaded. bit: initial value: r/w: 7654321 0 00000000 rrrrrrrr/w ------- ppvs bit bit name initial value r/w description 7 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 ppvs 0 r/w program pulse single selects the programming program. 0: on-chip programming program is not selected [clearing condition] when transfer is completed 1: on-chip programming program is selected (3) flash erase code select register (fecs) fecs selects download of the on-chip erasing program. bit: initial value: r/w: 7654321 0 00000000 rrrrrrrr/w -------epvb bit bit name initial value r/w description 7 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 23 flash memory page 1240 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 0 epvb 0 r/w erase pulse verify block selects the erasing program. 0: on-chip erasing program is not selected [clearing condition] when transfer is completed 1: on-chip erasing program is selected (4) flash key code register (fkey) fkey is a register for software protection that enables download of the on-chip program and programming/erasing of flash memory. before setting the sco bit to 1 in order to download the on-chip program or executing the downloaded programming/erasing program, these processings cannot be executed if the key code is not written. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w k[7:0] bit bit name initial value r/w description 7 to 0 k[7:0] all 0 r/w key code only when h'a5 is written, writing to the sco bit is valid. when a value other than h'a5 is written to fkey, 1 cannot be written to the sco bit. therefore downloading to the on-chip ram cannot be executed. only when h'5a is written, programming/erasing of flash memory can be executed. even if the on-chip programming/erasing program is executed, flash memory cannot be programmed or erased when a value other than h'5a is written to fkey. h'a5: writing to the sco bit is enabled (the sco bit cannot be set by a value other than h'a5.) h'5a: programming/erasing is enabled (a value other than h'5a enables software protection state.) h'00: initial value
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1241 of 1560 mar 18, 2011 sh7080 group (5) flash mat select register (fmats) fmats specifies whether user mat or user boot mat is selected. bit: initial value: r/w: 7654321 0 0/1 0 0/1 0 0/1 0 0/1 0 r/w r/w r/w r/w r/w r/w r/w r/w ms7 ms6 ms5 ms4 ms3 ms2 ms1 ms0 bit bit name initial value r/w description 7 6 5 4 3 2 1 0 ms7 ms6 ms5 ms4 ms3 ms2 ms1 ms0 0/1 0 0/1 0 0/1 0 0/1 0 r/w r/w r/w r/w r/w r/w r/w r/w mat select these bits are in user-mat selection state when a value other than h'aa is written and in user-boot-mat selection state when h'aa is written. the mat is switched by writing a value in fmats with the on-chip ram instrunction. when the mat is switched, follow section 23.8.1, switching between user mat and user boot mat. (the user boot mat cannot be programmed in user program mode if user boot mat is selected by fmats. the user boot mat must be programmed in boot mode or in programmer mode.) h'aa: the user boot mat is selected (in user-mat selection state when the value of these bits are other than h'aa) initial value when these bits are initiated in user boot mode. h'00: initial value when these bits are initiated in a mode except for user boot mode (in user-mat selection state) [programmable condition] these bits are in the execution state in the on-chip ram.
section 23 flash memory page 1242 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (6) flash transfer destinati on address register (ftdar) ftdar specifies the on-chip ram address to which the on-chip program is downloaded. make settings for ftdar before writing 1 to the sco bit in fccs. the initial value is h'00 which points to the start address (h'ffff9000) in on-chip ram. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r/w r/w r/w r/w r/w r/w tder tda[6:0] bit bit name initial value r/w description 7 tder 0 r/w transfer destination address setting error this bit is set to 1 when there is an error in the download start address set by bits 6 to 0 (tda6 to tda0). whether the address setting is erroneous or not is tested by checking whether the setting of tda6 to tda0 is in the range of h'00 to h'04 after setting the sco bit in fccs to 1 and performing download. before setting the sco bit to 1 be sure to set the ftdar value between h'00 to h'04 as well as clearing this bit to 0. 0: setting of tda6 to tda0 is normal 1: setting of tder and tda6 to tda0 is h'05 to h'ff and download has been aborted 6 to 0 tda[6:0] all 0 r/w transfer destination address these bits specify the download start address. a value from h'00 to h'04 can be set to specify the download start address in on-chip ram in 2-kbyte units. a value from h'05 to h'7f cannot be set. if such a value is set, the tder bit (bit 7) in this register is set to 1 to prevent download from being executed. h'00: download start address is set to h'ffff9000 h'01: download start address is set to h'ffff9800 h'02: download start address is set to h'ffffa000 h'03: download start address is set to h'ffffa800 h'04: download start address is set to h'ffffb000 h'05 to h'7f: setting prohibited. if this value is set, the tder bit (bit 7) is set to 1 to abort the download processing.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1243 of 1560 mar 18, 2011 sh7080 group 23.4.3 programming/erasing in terface parameters the programming/erasing interface parameters speci fy the operating frequency, user branch destination address, storage place for program da ta, programming destination address, and erase block and exchanges the processing result for the downloaded on-chip program. this parameter uses the general registers of the cpu (r4, r5, a nd r0) or the on-chip ram area. the initial value is undefined. at download all cpu registers are stored, and at initialization or when the on-chip program is executed, cpu registers except for r0 are stored . the return value of the processing result is written in r0. since the stack area is used for storing the registers or as a work area, the stack area must be saved at the processing start. (the maximum size of a stack area to be used is 128 bytes.) the programming/erasing interface parameters are used in the following four items. 1. download control 2. initialization before programming or erasing 3. programming 4. erasing these items use different parameters. the correspondence table is shown in table 23.6. the processing results of initialization, programming, and erasing are returned, but the bit contents have different meanings according to the processing program. see the description of fpfr for each processing.
section 23 flash memory page 1244 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 23.6 usable parameters and target modes name of parameter abbrevia- tion down- load initiali- zation pro- gram- ming erasure r/w initial value allocation download pass/fail result dpfr ? ? ? r/w undefined on-chip ram * flash pass/fail result fpfr ? r/w undefined r0 of cpu flash programming/ erasing frequency control fpefeq ? ? ? r/w undefined r4 of cpu flash user branch address set fubra ? ? ? r/w undefined r5 of cpu flash multipurpose address area fmpar ? ? ? r/w undefined r5 of cpu flash multipurpose data destination area fmpdr ? ? ? r/w undefined r4 of cpu flash erase block select febs ? ? ? r/w undefined r4 of cpu note: * one byte of start address of download destination specified by ftdar (1) download control the on-chip program is automatically downloaded by setting the sco bit to 1. the on-chip ram area to be downloaded is the area as much as 3 kbytes starting from the start address specified by ftdar. for the address map of the on-chip ram, see figure 23.10. the download control is set by using the prog ramming/erasing interface registers. the return value is given by the dpfr parameter. (a) download pass/fail result parameter (dpfr: one byte of start address of on-chip ram specified by ftdar) this parameter indicates the return value of the download result. the value of this parameter can be used to determine if downloading is executed or not. since the confirmation whether the sco bit is set to 1 is difficult, the certain determination must be performed by setting one byte of the start ad dress of the on-chip ram area specified by ftdar to a value other than the return value of download (for example, h'ff) before the download start (before setting the sco bit to 1). for the checking method of download results, see section 23.5.2 (2), programming procedure in user program mode.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1245 of 1560 mar 18, 2011 sh7080 group bit: initial value: r/w: 7654321 0 -------- r/w r/w r/w r/w r/w r/w r/w r/w -----ssfksf bit bit name initial value r/w description 7 to 3 ? undefined r/w unused return 0. 2 ss undefined r/w source select error detect the on-chip program which can be downloaded can be specified as only one type. when more than two types of the program are selected, the program is not selected, or the program is selected without mapping, an error occurs. 0: download program can be selected normally 1: download error occurs (multi-selection or program which is not mapped is selected) 1 fk undefined r/w flash key register error detect returns the check result whether the value of fkey is set to h'a5. 0: fkey setting is normal (fkey = h'a5) 1: fkey setting is abnormal (fkey = value other than h'a5) 0 sf undefined r/w success/fail returns the result whether download has ended normally or not. 0: downloading on-chip program has ended normally (no error) 1: downloading on-chip program has ended abnormally (error occurs)
section 23 flash memory page 1246 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (2) programming/erasing initialization the on-chip programming/erasing program to be downloaded includes the initialization program. the specified period pulse must be applied when programming or erasing. the specified pulse width is made by the method in which wait loop is configured by the cpu instruction. the operating frequency of the cpu must be set. since the user branch function is supported, the user branch destination address must be set. the initial program is set as a parameter of the programming/erasing program which has downloaded these settings. (2.1) flash programming/erasing frequency parameter (fpefeq: general register r4 of cpu) this parameter sets the operating frequency of the cpu. for the range of the operating frequency of this lsi, see table 28.5, maximum operating frequency. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- f15 f14 f13 f12 f11 f10 f9 f8 f7 f6 f5 f4 f3 f2 f1 f0
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1247 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 31 to 16 ? undefined r/w unused return 0. 15 to 0 f15 to f0 undefined r/w frequency set set the operating frequency of the cpu. the setting value must be calculated as the following methods. 1. the operating frequency which is shown in mhz units must be rounded in a number to three decimal places and be shown in a number of two decimal places. 2. the centuplicated value is converted to the binary digit and is written to the fpefeq parameter (general register r4). for example, when the operating frequency of the cpu is 28.882 mhz, the value is as follows. ? the number to three decimal places of 28.882 is rounded and the value is thus 28.88. ? the formula that 28.88 100 = 2888 is converted to the binary digit and b'0000, b'1011, b'0100, b'1000 (h'0b48) is set to b'r4. (2.2) flash user branch address setting parameter (fubra: general register r5 of cpu) this parameter sets the user branch destination address. the user program which has been set can be executed in specified processi ng units when programming and erasing. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ua31 ua30 ua29 ua28 ua27 ua26 ua25 ua24 ua23 ua22 ua21 ua20 ua19 ua18 ua17 ua16 ua15 ua14 ua13 ua12 ua11 ua10 ua9 ua8 ua7 ua6 ua5 ua4 ua3 ua2 ua1 ua0
section 23 flash memory page 1248 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 31 to 0 ua31 to ua0 undefined r/w user branch destination address when the user branch is not required, address 0 (h'00000000) must be set. the user branch destination must be an area other than the flash memory, an area other than the ram area in which on-chip program has been transferred, or the external bus space. note that the cpu must not branch to an area without the execution code and get out of control. the on-chip program download area and stack area must not be overwritten. if cpu runaway occurs or the download area or stack area is overwritten, the value of flash memory cannot be guaranteed. the download of the on-chip program, initialization, initiation of the programming/erasing program must not be executed in the processing of the user branch destination. programming or erasing cannot be guaranteed when returning from the user branch destination. the program data which has already been prepared must not be programmed. store general registers r8 to r15. general registers r0 to r7 are available without storing them. moreover, the programming/erasing interface registers must not be written to or ram emulation mode must not be entered in the processing of the user branch destination. after the processing of the user branch has ended, the programming/erasing program must be returned to by using the rts instruction. for the execution intervals of the user branch processing, see note 2 (user branch processing intervals) in section 23.8.3, other notes.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1249 of 1560 mar 18, 2011 sh7080 group (2.3) flash pass/fail result parameter (fpfr: general register r0 of cpu) this parameter indicates the return value of the initialization result. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- -------------brfqsf bit bit name initial value r/w description 31 to 3 ? undefined r/w unused return 0. 2 br undefined r/w user branch error detect returns the check result whether the specified user branch destination address is in the area other than the storage area of the programming/erasing program which has been downloaded. 0: user branch address setting is normal 1: user branch address setting is abnormal 1 fq undefined r/w frequency error detect returns the check result whether the specified operating frequency of the cpu is in the range of the supported operating frequency. 0: setting of operating frequency is normal 1: setting of operating frequency is abnormal 0 sf undefined r/w success/fail indicates whether initialization is completed normally. 0: initialization has ended normally (no error) 1: initialization has ended abnormally (error occurs)
section 23 flash memory page 1250 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (3) programming execution when flash memory is programmed, the programming destination address and programming data on the user mat must be passed to the programming program in which the program data is downloaded. 1. the start address of the programming destination on the user mat is set in general register r5 of the cpu. this parameter is called fmpar (flash multipurpose address area parameter). since the program data is always in 128-byte units, the lower eight bits (moa7 to moa0) must be h'00 or h'80 as the boundary of the programming start address on the user mat. 2. the program data for the user mat must be prepared in the consecutive area. the program data must be in the consecutive space which can be accessed by using the mov.b instruction of the cpu and is not the flash memory space. when data to be programmed does not satisfy 128 bytes, the 128-byte program data must be prepared by embedding the dummy code (h'ff). the start address of the area in which the prepared program data is stored must be set in general register r4. this parameter is calle d fmpdr (flash multipurpose data destination area parameter). for details on the programming procedure, see section 23.5.2, user program mode. (3.1) flash multipurpose address area parameter (fmpar: general register r5 of cpu) this parameter indicates the start address of the programming destination on the user mat. when an address in an area other than the fl ash memory space is set, an error occurs. the start address of the programming destination must be at the 128-byte boundary. if this boundary condition is not satisfied, an error o ccurs. the error occurrence is indicated by the wa bit (bit 1) in fpfr. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w moa31 moa30 moa29 moa28 moa27 moa26 moa25 moa24 moa23 moa22 moa21 moa20 moa19 moa18 moa17 moa16 moa15 moa14 moa13 moa12 moa11 moa10 moa9 moa8 moa7 moa6 moa5 moa4 moa3 moa2 moa1 moa0
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1251 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 31 to 0 moa31 to moa0 undefined r/w moa31 to moa0 store the start address of the programming destination on the user mat. the consecutive 128-byte programming is executed starting from the specified start address of the user mat. the moa6 to moa0 bits are always 0 because the start address of the programming destination is at the 128-byte boundary. (3.2) flash multipurpose data destination area parameter (fmpdr: general register r4 of cpu) this parameter indicates the start address in th e area which stores the data to be programmed in the user mat. when the storage destination of the program data is in flash memory, an error occurs. the error occurrence is indicated by the wd bit (bit 2) in fpfr. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w mod31 mod30 mod29 mod28 mod27 mod26 mod25 mod24 mod23 mod22 mod21 mod20 mod19 mod18 mod17 mod16 mod15 mod14 mod13 mod12 mod11 mod10 mod9 mod8 mod7 mod6 mod5 mod4 mod3 mod2 mod1 mod0 bit bit name initial value r/w description 31 to 0 mod31 to mod0 undefined r/w mod31 to mod0 store the start address of the area which stores the program data for the user mat. the consecutive 128- byte data is programmed to the user mat starting from the specified start address.
section 23 flash memory page 1252 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (3.3) flash pass/fail result parameter (fpfr: general register r0 of cpu) this parameter indicates the return value of the program processing result. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- ---------mdeefk-wdwasf bit bit name initial value r/w description 31 to 7 ? undefined r/w unused return 0. 6 md undefined r/w programming mode related setting error detect returns the check result of whether the signal input to the fwe pin is high and whether the error protection state is not entered. when a low-level signal is input to the fwe pin or the error protection state is entered, 1 is written to this bit. the input level to the fwe pin and the error protection state can be confirmed with the fwe bit (bit 7) and the fler bit (bit 4) in fccs, respectively. for conditions to enter the error protection state, see section 23.6.3, error protection. 0: fwe and fler settings are normal (fwe = 1, fler = 0) 1: fwe = 0 or fler = 1, and programming cannot be performed
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1253 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 ee undefined r/w programming execution error detect 1 is returned to this bit when the specified data could not be written because the user mat was not erased or when flash-memory related register settings are partially changed on returning from the user branch processing. if this bit is set to 1, there is a high possibility that the user mat is partially rewritten. in this case, after removing the error factor, erase the user mat. if fmats is set to h'aa and the user boot mat is selected, an error occurs when programming is performed. in this case, both the user mat and user boot mat are not rewritten. programming of the user boot mat must be executed in boot mode or programmer mode. 0: programming has ended normally 1: programming has ended abnormally (programming result is not guaranteed) 4 fk undefined r/w flash key register error detect returns the check result of the value of fkey before the start of the programming processing. 0: fkey setting is normal (fkey = h'5a) 1: fkey setting is error (fkey = value other than h'5a) 3 ? undefined r/w unused return 0. 2 wd undefined r/w write data address error detect when an address in the flash memory area is specified as the start address of the storage destination of the program data, an error occurs. 0: setting of write data address is normal 1: setting of write data address is abnormal
section 23 flash memory page 1254 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 1 wa undefined r/w write address error detect when the following items are specified as the start address of the programming destination, an error occurs. ? the programming destination address is an area other than flash memory ? the specified address is not at the 128-byte boundary (a6 to a0 are not 0) 0: setting of programming destination address is normal 1: setting of programming destination address is abnormal 0 sf undefined r/w success/fail indicates whether the program processing has ended normally or not. 0: programming has ended normally (no error) 1: programming has ended abnormally (error occurs)
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1255 of 1560 mar 18, 2011 sh7080 group (4) erasure execution when flash memory is erased, the erase-block number on the user mat must be passed to the erasing program which is downloaded. this is set to the febs parameter (general register r4). one block is specified from the block number 0 to 15. for details on the erasing procedure, see section 23.5.2, user program mode. (4.1) flash erase block select parameter (febs: general register r4 of cpu) this parameter specifies the erase-block number. several block numbers cannot be specified. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- - - - - - - - - ebs[7:0] bit bit name initial value r/w description 31 to 8 ? undefined r/w unused return 0. 7 to 0 ebs[7:0] undefined r/w ? 512-kbyte flash memory set the erase-block number in the range from 0 to 15. 0 corresponds to the eb0 block and 15 corresponds to the eb15 block. an error occurs when a number other than 0 to 15 (h'00 to h'0f) is set. ? 256-kbyte flash memory set the erase-block number in the range from 0 to 11. 0 corresponds to the eb0 block and 11 corresponds to the eb11 block. an error occurs when a number other than 0 to 11 (h'00 to h'0b) is set.
section 23 flash memory page 1256 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (4.2) flash pass/fail result parameter (fpfr: general register r0 of cpu) this parameter returns the value of the erasing processing result. bit: initial value: r/w: bit: initial value: r/w: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 151413121110987654321 0 ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w r/w ---------------- ---------mdeefkeb--sf bit bit name initial value r/w description 31 to 7 ? undefined r/w unused return 0. 6 md undefined r/w erasure mode related setting error detect returns the check result of whether the signal input to the fwe pin is high and whether the error protection state is not entered. when a low-level signal is input to the fwe pin or the error protection state is entered, 1 is written to this bit. the input level to the fwe pin and the error protection state can be confirmed with the fwe bit (bit 7) and the fler bit (bit 4) in fccs, respectively. for conditions to enter the error protection state, see section 23.6.3, error protection. 0: fwe and fler settings are normal (fwe = 1, fler = 0) 1: fwe = 0 or fler = 1, and erasure cannot be performed
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1257 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 ee undefined r/w erasure execution error detect 1 is returned to this bit when the user mat could not be erased or when flash-memory related register settings are partially changed on returning from the user branch processing. if this bit is set to 1, there is a high possibility that the user mat is partially erased. in this case, after removing the error factor, erase the user mat. if fmats is set to h'aa and the user boot mat is selected, an error occurs when erasure is performed. in this case, both the user mat and user boot mat are not erased. erasure of the user boot mat must be executed in boot mode or programmer mode. 0: erasure has ended normally 1: erasure has ended abnormally (erasure result is not guaranteed) 4 fk undefined r/w flash key register error detect returns the check result of fkey value before start of the erasing processing. 0: fkey setting is normal (fkey = h'5a) 1: fkey setting is error (fkey = value other than h'5a) 3 eb undefined r/w erase block select error detect returns the check result whether the specified erase- block number is in the block range of the user mat. 0: setting of erase-block number is normal 1: setting of erase-block number is abnormal 2, 1 ? undefined r/w unused return 0. 0 sf undefined r/w success/fail indicates whether the erasing processing has ended normally or not. 0: erasure has ended normally (no error) 1: erasure has ended abnormally (error occurs)
section 23 flash memory page 1258 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 23.4.4 ram emulation register (ramer) when the realtime programming of the user mat is emulated, ramer sets the area of the user mat which is overlapped with a part of the on-chip ram. the ram emulation must be executed in user mode or in user program mode. for the division method of the user-mat area, see table 23.7. in order to operate the emulation function certainly, the target mat of the ram emulation must not be accessed i mmediately after ramer is programmed. if it is accessed, the normal access is not guaranteed. bit: initial value: r/w: 151413121110987654321 0 0000000000000000 rrrrrrrrrrrrr/wr/wr/wr/w - - - - - - - - - - - - rams ram[2:0] bit bit name initial value r/w description 15 to 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 3 rams 0 r/w ram select sets whether the user mat is emulated or not. when rams = 1, all blocks of the user mat are in the programming/erasing protection state. 0: emulation is not selected programming/erasing protection of all user-mat blocks is invalid 1: emulation is selected programming/erasing protection of all user-mat blocks is valid 2 to 0 ram[2:0] 000 r/w user mat area select these bits are used with bit 3 to select the user-mat area to be overlapped with the on-chip ram. (see table 23.7.)
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1259 of 1560 mar 18, 2011 sh7080 group table 23.7 overlapping of ram area and user mat area ram area block name rams ram2 ram1 ram0 h'ffffa000 to h'ffffafff ram area (4 kbytes) 0 x x x h'00000000 to h'00000fff eb0 (4 kbytes) 1 0 0 0 h'00001000 to h'00001fff eb1 (4 kbytes) 1 0 0 1 h'00002000 to h'00002fff eb2 (4 kbytes) 1 0 1 0 h'00003000 to h'00003fff eb3 (4 kbytes) 1 0 1 1 h'00004000 to h'00004fff eb4 (4 kbytes) 1 1 0 0 h'00005000 to h'00005fff eb5 (4 kbytes) 1 1 0 1 h'00006000 to h'00006fff eb6 (4 kbytes) 1 1 1 0 h'00007000 to h'00007fff eb7 (4 kbytes) 1 1 1 1 note: x: don't care.
section 23 flash memory page 1260 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 23.5 on-board programming mode when the pin is set in on-board programming mode and the reset start is executed, the on-board programming state that can program/erase the on-chip flash memory is entered. on-board programming mode has three operating modes: us er program mode, user boot mode, and boot mode. for details on the pin setting for entering each mode, see table 23.1. for details on the state transition of each mode for flash memory, see figure 23.2. 23.5.1 boot mode boot mode executes programming/erasing user mat and user boot mat by means of the control command and program data transmitted from the host using the on-chip sci. the tool for transmitting the control command and program data must be prepared in the host. the sci communication mode is set to asynchronous mode. when reset start is executed after this lsi's pin is set in boot mode, the boot program in the micr ocomputer is initiated. after the sci bit rate is automatically adjusted, the communication with the host is executed by means of the control command method. the system configuration diagram in boot mode is shown in figure 23.6. for details on the pin setting in boot mode, see table 23.1. interrupts are ignored in boot mode, so do not generate them. note that the aud cannot be used during boot mode operation. host rxd1 t xd1 control command, analysis execution software (on-chip) flash memory on-chip ram on-chip sci1 this lsi boot programming tool and program data control command, program data reply response figure 23.6 system configuration in boot mode
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1261 of 1560 mar 18, 2011 sh7080 group (1) sci interface setting by host when boot mode is initiated, this lsi measures the low period of asynchronous sci- communication data (h'00), which is transmitted consecutively by the host. the sci transmit/receive format is set to 8-bit data, 1 st op bit, and no parity. this lsi calculates the bit rate of transmission by the host by means of the measured low period and transmits the bit adjustment end sign (1 byte of h'00) to the host. the host must confirm that this bit adjustment end sign (h'00) has been received normally and transmits 1 byte of h'55 to this lsi. when reception is not executed normally, boot mode is initiated again (reset) and the operation described above must be executed. the bit rate between the host and this lsi is not matched because of the bit rate of transmission by the host and system clock frequency of this lsi. to operate the sci normally, the transfer bit rate of the host must be set to 9,600 bps or 19,200 bps. the system clock frequency which can automatically adjust the transfer bit rate of the host and the bit rate of this lsi is shown in table 23.8. boot mode must be initiated in the range of this system clock. note that the internal clock division ratio of 1/3 is not supported in boot mode. d0 d1 d2 d3 d4 d5 d6 d7 start bit stop bit measure low period (9 bits) (data is h'00) high period of at least 1 bit figure 23.7 automatic adjustment operation of sci bit rate table 23.8 peripheral clock (p ) frequency that can automatically adjust bit rate of this lsi host bit rate peripheral clock (p ) frequency which can automatically adjust lsi's bit rate 9,600 bps 10 to 40 mhz 19,200 bps 10 to 40 mhz note: the internal clock division ratio of 1/3 is not supported in boot mode.
section 23 flash memory page 1262 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (2) state transition diagram figure 23.8 gives an overview of the state transitions after the chip has been started up in boot mode. for details on boot mode, see section 23.9.1, specifications of the standard serial communications interface in boot mode. 1. bit-rate matching after the chip has been started up in boot mode, bit-rate matching between the sci and the host proceeds. 2. waiting for inquiry and selection commands the chip sends the requested information to the host in response to inquiries regarding the size and configuration of the user mat, start addresses of the mats, information on supported devices, etc. 3. automatic erasure of the entire user mat and user boot mat after all necessary inquiries a nd selections have been made and the command for transition to the programming/erasure state is sent by th e host, the entire user mat and user boot mat are automatically erased. 4. waiting for programming/erasure command ? on receiving the programming selection command, the chip waits for data to be programmed. to program data, the host transmits the programming command code followed by the address where programming should start and the data to be programmed. this is repeated as required while the chip is in the programming-selected state. to terminate programming, h'ffffffff should be transmitted as the first address of the area for programming. this makes the chip return to the programming/erasure command waiting state from the programming data waiting state. ? on receiving the erasure select command, the ch ip waits for the block number of a block to be erased. to erase a block, the host transm its the erasure command code followed by the number of the block to be erased. this is rep eated as required while the chip is in the erasure-selected state. to terminate eras ure, h'ff should be transmitted as the block number. this makes the chip return to the programming/erasure command waiting state from the erasure block number waiting state. erasure should only be executed when a specific block is to be reprogrammed without executing a reset-start of the chip after the flash memory has been programmed in boot m ode. if all desired programming is done in a single operation, such erasure processing is not necessary because all blocks are erased before the chip enters the programming/erasure/other command waiting state. ? in addition to the programming and erasure commands, commands for sum checking and blank checking (checking for erasure) of the user mat and user boot mat, reading data from the user mat/user boot mat, and acquiring current state information are provided. note that the command for reading from the user mat/user boot mat can only read data that has been programmed after automatic erasure of the entire user mat and user boot mat.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1263 of 1560 mar 18, 2011 sh7080 group start in boot mode (reset in boot mode) erasure of entire user mat and user boot mat bit rate matching wait for inquiry/selection command wait for programming/erasure command execute processing in response to inquiry/ selection command execute processing in response to read/ check command wait for erasure block number wait for programming data transmission of programming data by the host erasure block specification reception of inquiry/selection command response to inquiry/selection command reception of read/check command response to command programming complete reception of programming select command erasure complete reception of erasure select command 1. 2. 3. 4. (bit rate matching) reception of h'00, ?, h'00 reception of h'55 figure 23.8 state transitions in boot mode
section 23 flash memory page 1264 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 23.5.2 user program mode the user mat can be programmed/erased in user program mode. (the user boot mat cannot be programmed/erased.) programming/erasing is executed by downloading the program in the microcomputer. the overview flow is shown in figure 23.9. high voltage is applied to internal flash memory during the programming/erasing processing. therefore, transition to reset must not be executed. doing so may cause damage or destroy flash memory. if reset is executed accidentally, the reset signal must be released after the reset input period, which is longer than the normal 100 s. for details on the programming procedure, see the description in section 23.5.2 (2), programming procedure in user program mode. for details on the erasing procedure, see the description in section 23.5.2 (3), erasing procedure in user program mode. for the overview of a processing that repeats erasing and programming by downloading the programming program and the erasing program in separate on-chip rom areas using ftdar, see the description in section 23.5.2 (4), erasing and programming procedure in user program mode. when programming, program data is prepared fwe=1 ? programming/erasing procedure program is transferred to the on-chip ram and executed yes no programming/erasing start programming/erasing end 1. ram emulation mode must be canceled in advance. download cannot be executed in emulation mode. 2. when the program data is made by means of emulation, the download destination must be changed by ftdar. 3. inputting high level to the fwe pin sets the fwe bit to 1. 4. programming/erasing is executed only in the on-chip ram. however, if the program data is in a consecutive area and can be accessed by the mov.b instruction of the cpu like sram/rom, the program data can be in an external space. 5. after programming/erasing is finished, low level must be input to the fwe pin for protection. figure 23.9 programming/erasing overview flow
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1265 of 1560 mar 18, 2011 sh7080 group (1) on-chip ram address map when programming/erasing is executed parts of the procedure program that are made by the user, like download request, programming/erasing procedure, and decision of the result, must be executed in the on-chip ram. all of the on-chip program that is to be downloaded is in on-chip ram. note that on- chip ram must be controlled so that these parts do not overlap. figure 23.10 shows the program area to be downloaded. system use area (15 bytes) ramtop (h'ffff8000 * ) ftdar setting programming/ erasing entry dpfr (return value: 1 byte) area that can be used by user ram emulation area ftdar setting+16 < on-chip ram > address initialization process entry ftdar setting+32 ftdar setting+3072 initialization + programming program or initialization + erasing program area that can be used by user h'ffffa000 h'ffffafff area that can be used by user ramend (h'ffffbfff) area to be downloaded (size: 3 kbytes) unusable area in programming/erasing processing period note: * ramtop address is h'ffff4000 in sh7085 and sh7086. figure 23.10 ram map after download
section 23 flash memory page 1266 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (2) programming procedure in user program mode the procedures for download, initialization, and programming are shown in figure 23.11. select on-chip program to be downloaded and set download destination by ftdar set fkey to h'a5 after clearing vbr, set sco to 1 and execute download dpfr=0? yes no download error processing set the fpefeq and fubra parameters initialization jsr ftdar setting+32 yes end programming procedure program fpfr=0? no initialization error processing clear fkey to 0 set parameter to r4 and r5 (fmpar and fmpdr) programming jsr ftdar setting+16 yes fpfr=0? no clear fkey and programming error processing yes required data programming is completed? no set fkey to h'5a clear fkey to 0 (2.1) (2.2) (2.4) (2.5) (2.6) (2.7) (2.8) (2.9) (2.10) (2.11) (2.12) (2.13) (2.14) 1 1 (2.3) download initialization programming start programming procedure program figure 23.11 programming procedure the details of the programming procedure are described below. the procedure program must be executed in an area other than the flash me mory to be programmed. especially the part where the sco bit in fccs is set to 1 for downloading must be executed in the on-chip ram. specify 1/4 (initial value) as the frequency division ratios of an internal clock (i ), a bus clock (b ), and a peripheral clock (p ) through the frequency control register (frqcr). after the programming/erasing program has been downloaded and the sco bit is cleared to 0, the setting of the frequency control register (frqcr) can be changed to the desired value. the area that can be executed in the steps of the user procedure program (on-chip ram, user mat, and external space) is shown in section 23.9.2, areas for storage of the procedural program and data for programming.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1267 of 1560 mar 18, 2011 sh7080 group the following description assumes the area to be programmed on the user mat is erased and program data is prepared in the consecutive ar ea. when erasing has not been executed, carry out erasing before writing. 128-byte programming is performed in one program processing. when more than 128-byte programming is performed, programming destin ation address/program data parameter is updated in 128-byte units and programming is repeated. when less than 128-byte programming is performed, data must total 128 bytes by adding the invalid data. if the invalid data to be added is h'ff, the program processing period can be shortened. (2.1) select the on-chip program to be downloaded when the ppvs bit of fpcs is set to 1, the programming program is selected. several programming/erasing programs cannot be se lected at one time. if several programs are set, download is not performed and a download error is returned to the source select error detect (ss) bit in the dpfr parameter. specify the start address of the download destination by ftdar. (2.2) write h'a5 in fkey if h'a5 is not written to fkey for protection, 1 cannot be written to the sco bit for a download request. (2.3) vbr is set to 0 and 1 is written to the sco bit of fccs, and then download is executed. vbr must always be set to h'84000000 before setting the sco bit to 1. to write 1 to the sco bit, the following conditions must be satisfied. ? ram emulation mode is canceled. ? h'a5 is written to fkey. ? the sco bit writing is executed in the on-chip ram. when the sco bit is set to 1, download is started automatically. when execution returns to the user procedure program, the sco bit is cleared to 0. therefore, the sco bit cannot be confirmed to be 1 in the user procedure program. the download result can be confirmed only by the re turn value of the dpfr parameter. before the sco bit is set to 1, incorrect decision must be prevented by setting the dpfr parameter, that is one byte of the start address of the on-chip ram area specified by ftdar, to a value other than the return value (h'ff). when download is executed, particular interr upt processing, which is accompanied by the bank switch as described below, is performed as an internal microcomputer processing, so vbr need to be set to h'84000000. four nop instructions are executed immediately after the instructions that set the sco bit to 1. ? the user mat space is switched to the on-chip program storage area.
section 23 flash memory page 1268 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? after the selection condition of the download program and the address set in ftdar are checked, the transfer processing is ex ecuted starting to the on-chip ram address specified by ftdar. ? the sco bits in fccs, fpcs, and fecs are cleared to 0. ? the return value is set to the dpfr parameter. ? after the on-chip program storage area is returned to the user mat space, execution returns to the user procedure program. after download is completed and the user proc edure program is running, the vbr setting can be changed. the notes on download are as follows. in the download processing, the values of th e general registers of the cpu are retained. during the download processing, interrupts must not be generated. for details on the relationship between download and interrupts, see section 23.8.2, interrupts during programming/erasing. since a stack area of maximum 128 bytes is used, an area of at least 128 bytes must be saved before setting the sco bit to 1. if flash memory is accessed by the dmac or dtc during downloading, operation cannot be guaranteed. therefore, access by the dmac or dtc must not be executed. (2.4) fkey is cleared to h'00 for protection. (2.5) the value of the dpfr parameter must be checked to confirm the download result. a recommended procedure for confirming the download result is shown below. ? check the value of the dpfr parameter (one byte of start address of the download destination specified by ftdar). if the value is h'00, download has been performed normally. if the value is not h'00, the source that caused download to fail can be investigated by the description below. ? if the value of the dpfr parameter is the same as before downloading (e.g. h'ff), the address setting of the download destination in ftdar may be abnormal. in this case, confirm the setting of the tder bit (bit 7) in ftdar. ? if the value of the dpfr parameter is different from before downloading, check the ss bit (bit 2) and the fk bit (bit 1) in the dpfr parameter to ensure that the download program selection and fkey register setting were normal, respectively. (2.6) the operating frequency is set to the fpefe q parameter and the user branch destination is set to the fubra parameter for initialization.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1269 of 1560 mar 18, 2011 sh7080 group ? the current frequency of the cpu clock is set to the fpefeq parameter (general register r4). for the settable range of the fpefeq parameter, see section 28.3.1, clock timing. when the frequency is set out of this range, an error is returned to the fpfr parameter of the initialization program and initialization is not performed. for details on the frequency setting, see the description in section 23.4.3 (2.1), flash programming/erasing frequency parameter (fpefeq: general register r4 of cpu). ? the start address in the user branch destination is set to the (fubra: cpu general register r5) parameter. when the user branch processing is not required, 0 must be set to fubra. when the user branch is executed, the bran ch destination is executed in flash memory other than the one that is to be programmed. the area of the on-chip program that is downloaded cannot be set. the program processing must be returned from the user branch processing by the rts instruction. see the description in section 23.4.3 (2.2), flash user branch address setting parameter (fubra: general register r5 of cpu). (2.7) initialization when a programming program is downloaded, the initialization program is also downloaded to on-chip ram. there is an entry point of the initialization program in the area from (download start address set by ftdar) + 32 bytes. the subroutine is called and initialization is executed by using the following steps. mov.l #dltop+32,r1 ; set entry address to r1 jsr @r1 ; call initialization routine nop ? the general registers other than r0 are saved in the initialization program. ? r0 is a return value of the fpfr parameter. ? since the stack area is used in the initialization program, a stack area of maximum 128 bytes must be reserved in ram. ? interrupts can be accepted during the execution of the initialization program. however, the program storage area and stack area in on -chip ram and register values must not be destroyed. (2.8) the return value of the initialization progr am, fpfr (general register r0) is checked. (2.9) fkey must be set to h'5a and the user mat must be prepared for programming. (2.10) the parameter which is required for programming is set.
section 23 flash memory page 1270 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group the start address of the programming destination of the user mat (fmpar) is set to general register r5. the start address of the program data storage area (fmpdr) is set to general register r4. ? fmpar setting fmpar specifies the programming destination start address. when an address other than one in the user mat area is speci fied, even if the programming program is executed, programming is not executed and an error is returned to the return value parameter fpfr. since the unit is 128 bytes, the lower eight bits (moa7 to moa0) must be in the 128-byte boundary of h'00 or h'80. ? fmpdr setting if the storage destination of the program data is flash memory, even when the program execution routine is executed, programming is not executed and an er ror is returned to the fpfr parameter. in this case, the program data must be transferred to on-chip ram and then programming must be executed. (2.11) programming there is an entry point of the programming program in the area from (download start address set by ftdar) + 16 bytes of on-chip ram. the subroutine is called and programming is executed by using the following steps. mov.l #dltop+16,r1 ; set entry address to r1 jsr @r1 ; call programming routine nop ? the general registers other than r0 are saved in the programming program. ? r0 is a return value of the fpfr parameter. ? since the stack area is used in the programming program, a stack area of maximum 128 bytes must be reserved in ram. (2.12) the return value in the programming program, fpfr (general register r0) is checked. (2.13) determine whether programming of the necessary data has finished. if more than 128 bytes of data are to be programmed, specify fmpar and fmpdr in 128- byte units, and repeat steps (2.10) to (2.13). increment the programming destination address by 128 bytes and update the programming data pointer correctly. if an address which has already been programmed is written to again, not only will a programming error occur, but also flash memory will be damaged. (2.14) after programming finishes, clear fkey and specify software protection. if this lsi is restarted by a power-on reset immediately after user mat programming has finished, secure a reset period (period of res = 0) that is at least as long as the normal 100 s.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1271 of 1560 mar 18, 2011 sh7080 group (3) erasing procedure in user program mode the procedures for download, initialization, and erasing are shown in figure 23.12. start erasing procedure program select on-chip program to be downloaded and set download destination by ftdar set fkey to h'a5 after clearing vbr, set sco to 1 and execute download dpfr = 0? yes no download error processing set the fpefeq and fubra parameters initialization jsr ftdar setting +32 yes end erasing procedure program fpfr=0 ? no initialization error processing clear fkey to 0 set febs parameter erasing jsr ftdar setting +16 yes fpfr=0 ? no clear fkey and erasing error processing yes required block erasing is completed? no set fkey to h'5a clear fkey to 0 (3.1) (3.2) (3.3) (3.4) (3.5) (3.6) 1 1 download initialization erasing figure 23.12 erasing procedure the details of the erasing procedure are described below. the procedure program must be executed in an area other than the user mat to be erased. especially the part where the sco bit in fccs is set to 1 for downloading must be executed in on-chip ram. the area that can be executed in the steps of the user procedure program (on-chip ram, user mat, and external space) is shown in section 23.9.2, areas for storage of the procedural program and data for programming. the frequency division ratio of an internal clock (i ), a bus clock (b ), and a peripheral clock (p ) is specified as 1/4 (initial value) by the frequency control register (frqcr).
section 23 flash memory page 1272 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group after the programming/erasing program has been downloaded and the sco bit is cleared to 0, the setting of the frequency control register (frqcr) can be changed to the desired value. for the downloaded on-chip program area, see the ram map for programming/erasing in figure 23.10. a single divided block is erased by one erasing processing. for block divisions, see figure 23.4. to erase two or more blocks, update the erase block number and perform the erasing processing for each block. (3.1) select the on-chip program to be downloaded set the epvb bit in fecs to 1. several programming/erasing programs cannot be se lected at one time. if several programs are set, download is not performed and a download error is returned to the source select error detect (ss) bit in the dpfr parameter. specify the start address of the download destination by ftdar. the procedures to be carried out after setting fkey, e.g. download and initialization, are the same as those in the programming procedure. for details, see the description in section 23.5.2 (2), programming procedure in user program mode. (3.2) set the febs parame ter necessary for erasure set the erase block number of the user mat in the flash erase block se lect parameter (febs: general register r4). if a value other than an erase block number of the user mat is set, no block is erased even though the erasing program is executed, and an error is returned to the return value parameter fpfr. (3.3) erasure similar to as in programming, there is an entr y point of the erasing program in the area from (download start address set by ftdar) + 16 bytes of on-chip ram. the subroutine is called and erasing is executed by using the following steps. mov.l #dltop+16,r1 ; set entry address to r1 jsr @r1 ; call erasing routine nop ? the general registers other than r0 are saved in the erasing program. ? r0 is a return value of the fpfr parameter. ? since the stack area is used in the erasing program, a stack area of maximum 128 bytes must be reserved in ram.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1273 of 1560 mar 18, 2011 sh7080 group (3.4) the return value in the erasing program, fpfr (general register r0) is checked. (3.5) determine whether erasure of the necessary blocks has finished. if more than one block is to be erased, update the febs parameter and repeat steps (3.2) to (3.5). blocks that have already b een erased can be erased again. (3.6) after erasure finishes, clear fk ey and specify software protection. if this lsi is restarted by a power-on reset immediately after user mat erasing has finished, secure a reset period (period of res = 0) that is at least as long as the normal 100 s. (4) erasing and programming procedure in user program mode by changing the on-chip ram address of the download destination in ftdar, the erasing program and programming program can be downloaded to separate on-chip ram areas. figure 23.13 shows an example of repetitively executing ram emulation, erasing, and programming. 1 1 start procedure program set ftdar to h'00 (specify h'ffff9000 as download destination) initialize erasing program download erasing program set ftdar to h'04 (specify h'ffffb000 as download destination) initialize programming program download programming program end? end procedure program enter ram emulation mode and tune data in on-chip ram confirm operation set fmpdr to h'ffffa000 to program relevant block (execute programming program) cancel ram emulation mode erase relevant block (execute erasing program) programming program download erasing program download emulation/erasing/programming yes no figure 23.13 sample procedure of repeating ram emulation, erasing, and programming (overview)
section 23 flash memory page 1274 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group in the above example, the erasing program and programming program are downloaded to areas excluding addresses (h'ffffa000 to h' ffffafff) to execute ram emulation. download and initialization are performed only once at the beginning. in this kind of operation, note the following: ? be careful not to destroy on-chip ram with overlapped settings. in addition to the ram emulation area, erasing program area, and programming program area, areas for the user procedure programs, work area, and stack area are reserved in on-chip ram. do not make settings that will overwrite data in these areas. ? be sure to initialize both the erasing program and programming program. initialization by setting the fpefeq and fubra parameters must be performed for both the erasing program and the programming program. initialization must be executed for both entry addresses: (download start address for erasing program) + 32 bytes (h'ffff9020 in this example) and (download start address for programming program) + 32 bytes (h'ffffb020 in this example). 23.5.3 user boot mode this lsi has user boot mode which is initiated with different mode pin settings than those in user program mode or boot mode. user boot mode is a user-arbitrary boot mode, unlike boot mode that uses the on-chip sci. only the user mat can be programmed/erased in user boot mode. programming/erasing of the user boot mat is only enabled in boot mode or programmer mode. (1) user boot mode initiation for the mode pin settings to start up user boot mode, see table 23.1. when the reset start is executed in user boot mode, the check routine for flash-memory related registers runs. the ram area about 1.2 kbytes from h'ffff9800 and 4 bytes from h'ffffaffc (a stack area) is used by the rou tine. while the check routine is running, nmi and all other interrupts cannot be accepted. neither can the aud be used in this period. this period is 100 s while operating at an internal frequency of 40 mhz. next, processing starts from the execution start address of the reset vector in the user boot mat. at this point, h'aa is set to the flas h mat select register (fmats) because the execution mat is the user boot mat.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1275 of 1560 mar 18, 2011 sh7080 group (2) user mat programming in user boot mode for programming the user mat in user boot mode, additional processings made by setting fmats are required: switching from user-boot-mat selection state to user-mat selection state, and switching back to user-boot-mat selection state after programming completes. figure 23.14 shows the procedure for programming the user mat in user boot mode. select on-chip program to be downloaded and set download destination by ftdar set fkey to h'a5 dpfr=0 ? yes no download error processing set the fpefeq and fubra parameters initialization jsr ftdar setting +32 yes end programming procedure program fpfr=0 ? no initialization error processing clear fkey to 0 set parameter to r4 and r5 (fmpar and fmpdr) programming jsr ftdar setting +16 yes fpfr=0 ? no yes required data programming is completed? no set fkey to h'5a clear fkey to 0 1 1 download initialization programming mat switchover mat switchover set fmats to value other than h'aa to select user mat after clearing vbr, set sco to 1 and execute download clear fkey and programming error processing * set fmats to h'aa to select user boot mat user-boot-mat selection state user-mat selection state user-boot-mat selection state note: * the mat must be switched by fmats to perform the programming error processing in the user boot mat. start programming procedure program figure 23.14 procedure for programming user mat in user boot mode
section 23 flash memory page 1276 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group the difference between the programming procedures in user program mode and user boot mode is whether the mat is switched or not as shown in figure 23.14. in user boot mode, the user boot mat can be s een in the flash memory space with the user mat hidden in the background. the user mat and user boot mat are switched only while the user mat is being programmed. because th e user boot mat is hidden while the user mat is being programmed, the procedure program must be located in an area other than flash memory. after programming finishes, switch the mats again to return to the first state. mat switchover is enabled by writing a specific value to fmats. however note that while the mats are being switched, the lsi is in an unstable state, e.g. access to a mat is not allowed until mat switching is completely finished, and if an interrupt occurs, from which mat the interrupt vector is read from is undetermined. perform mat switching in accordance with the description in section 23.8.1, switching between user mat and user boot mat. except for mat switching, the programming procedure is the same as that in user program mode. the area that can be executed in the steps of the user procedure program (on-chip ram, user mat, and external space) is shown in section 23.9.2, areas for storage of the procedural program and data for programming.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1277 of 1560 mar 18, 2011 sh7080 group (3) user mat erasing in user boot mode for erasing the user mat in user boot mode , additional processings made by setting fmats are required: switching from user-boot-mat selection state to user-mat selection state, and switching back to user-boot-mat selec tion state after erasing completes. figure 23.15 shows the procedure for erasing the user mat in user boot mode. start erasing procedure program select on-chip program to be downloaded and set download destination by ftdar set fkey to h'a5 dpfr=0 ? yes no download error processing set the fpefeq and fubra parameters initialization jsr ftdar setting +32 yes end erasing procedure program fpfr=0 ? no initialization error processing clear fkey to 0 set febs parameter programming jsr ftdar setting +16 yes fpfr=0 ? no clear fkey and erasing error processing * yes required block erasing is completed? no set fkey to h'5a clear fkey to 0 1 1 download initialization erasing set fmats to value other than h'aa to select user mat after clearing vbr, set sco to 1 and execute download set fmats to h'aa to select user boot mat user-boot-mat selection state user-mat selection state user-boot-mat selection state note: * the mat must be switched by fmats to perform the erasing error processing in the user boot mat. mat switchover mat switchover figure 23.15 procedure for erasing user mat in user boot mode
section 23 flash memory page 1278 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group the difference between the erasing procedures in user program mode and user boot mode depends on whether the mat is switched or not as shown in figure 23.15. mat switching is enabled by writing a specific value to fmats. however note that while the mats are being switched, the lsi is in an unstabl e state, e.g. access to a mat is not allowed until mat switching is completed finished, and if an interrupt occurs, from which mat the interrupt vector is read from is undetermined. perform mat switching in accordance with the description in section 23.8.1, switching between user mat and user boot mat. except for mat switching, the erasing procedure is the same as that in user program mode. the area that can be executed in the steps of the user procedure program (on-chip ram, user mat, and external space) is shown in section 23.9. 2, areas for storage of the procedural program and data for programming.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1279 of 1560 mar 18, 2011 sh7080 group 23.6 protection there are three kinds of flash memory program/ erase protection: hardwa re, software, and error protection. 23.6.1 hardware protection programming and erasing of flash memory is forcibly disabled or suspended by hardware protection. in this state, the downloading of an on-chip program and initialization of the flash memory are possible. however, an activated program for programming or erasure cannot program or erase locations in a user mat, and the error in programming/erasing is reported in the fpfr parameter. table 23.9 hardware protection function to be protected item description download programming/ erasure fwe-pin protection the input of a low-level signal on the fwe pin clears the fwe bit of fccs and the lsi enters a programming/erasing-protected state. ? reset/standby protection ? a power-on reset (including a power-on reset by the wdt) and entry to standby mode initializes the programming/erasing interface registers and the lsi enters a programming/erasing-protected state. ? resetting by means of the res pin after power is initially supplied will not make the lsi enter the reset state unless the res pin is held low until oscillation has stabilized. in the case of a reset during operation, hold the res pin low for the res pulse width that is specified in the section on ac characteristics. if the lsi is reset during programming or erasure, data in the flash memory is not guaranteed. in this case, execute erasure and then execute programming again.
section 23 flash memory page 1280 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 23.6.2 software protection software protection is set up in any of three ways: by disabling the downloading of on-chip programs for programming and erasing, by means of a key code, and by the ram emulation register (ramer). table 23.10 software protection function to be protected item description download programming/ erasure protection by the sco bit clearing the sco bit in fccs disables downloading of the programming/erasing program, thus making the lsi enter a programming/erasing-protected state. protection by fkey downloading and programming/erasing are disabled unless the required key code is written in fkey. different key codes are used for downloading and for programming/erasing. emulation protection setting the rams bit in ramer to 1 makes the lsi enter a programming/erasing-protected state. 23.6.3 error protection error protection is a mechanism for aborting program ming or erasure when an error occurs, in the form of the microcomputer getting out of control during programming/erasing of the flash memory or operations that are not in accord ance with the established procedures for programming/erasing. aborting programming or eras ure in such cases prevents damage to the flash memory due to excessive programming or erasing. if the microcomputer malfunctions during programming/erasing of the flash memory, the fler bit in fccs is set to 1 and the lsi enters the error protection state, thus aborting programming or erasure.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1281 of 1560 mar 18, 2011 sh7080 group the fler bit is set to 1 in the following conditions: ? when the relevant bank area of flash memory is read during programming/erasing (including a vector read or an instruction fetch) ? when a sleep instruction (including soft ware standby mode) is executed during programming/erasing error protection is cancelled (fler bit is cleared) only by a power-on reset. note that the reset signal should only be released after providing a reset input over a period longer than the normal 100 s. since high voltages are applied during programming/erasing of the flash memory, some voltage may still remain even after the error protection state has been entered. for this reason, it is necessary to reduce the risk of damage to the flash memory by extending the reset period so that the charge is released. the state-transition diagram in figure 23.16 shows transitions to and from the error protection state. reset (hardware protection) program mode erase mode error protection mode error protection mode (software standby) read disabled programming/erasing enabled fler=0 read enabled programming/erasing disabled fler=0 read enabled programming/erasing disabled fler=1 read disabled programming/erasing disabled fler=1 res = 0 error occurred error occ urred (softw are stand by) res =0 software standby mode cancel software standby mode res =0 programming/erasing interface register is in its initial state. programming/erasing interface register is in its initial state. figure 23.16 transitions to and from error protection state
section 23 flash memory page 1282 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 23.7 flash memory emulation in ram to provide real-time emulation in ram of data that is to be written to the flash memory, a part of the ram can be overlaid on an area of flash memo ry (user mat) that has been specified by the ram emulation register (ramer). after the ra mer setting is made, the ram is accessible in both the user mat area and as the ram area that has been overlaid on the user mat area. such emulation is possible in user mode and user program mode. figure 23.17 shows an example of the emulation of realtime programming of the user mat area. start of emulation program set ramer write the data for tuning to the overlapped ram area execute application program tuning ok? cancel ramer setting program the emulation block in the user mat end of emulation program yes no figure 23.17 emulation of flash memory in ram
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1283 of 1560 mar 18, 2011 sh7080 group eb0 h'00000 eb1 h'01000 eb2 h'02000 eb3 h'03000 eb4 h'04000 eb5 h'05000 eb6 h'06000 eb7 h'07000 h'08000 h'3ffff flash memory (user mat) eb8 to eb11 h'ffffa000 h'ffffafff h'ffffbfff on-chip ram h'ffff8000 h'ffff9fff on-chip ram this area is accessible as both a ram area and as a flash memory area. figure 23.18 example of overlapped ram operation (sh7083: 256-kbyte flash memory version) figure 23.18 shows an example of an overlap on block area eb0 of the flash memory. emulation is possible for a single area selected from among the eight areas, from eb0 to eb7, of the user mat. the area is selected by the setting of the ram2 to ram0 bits in ramer. 1. to overlap a part of the ram on area eb0, to allow realtime programming of the data for this area, set the rams bit in ramer to 1, and each of the ram2 to ram0 bits to 0. 2. realtime programming is carried out using the overlaid area of ram. in programming or erasing the user mat, it is necessary to run a program that implements a series of procedural steps, including the downloading of an on-chip program. in this process, set the download area with ftdar so that the overla id ram area and the area where the on-chip program is to be downloaded do not overlap. figure 23.19 shows an example of programming data that has been emulated to the eb0 area in the user mat.
section 23 flash memory page 1284 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group eb0 h'00000 eb1 h'01000 eb2 h'02000 eb3 h'03000 eb4 h'04000 eb5 h'05000 eb6 h'06000 eb7 h'07000 h'08000 h'3ffff flash memory (user mat) eb8 to eb11 h'ffffa000 h'ffffafff ftdar setting h'ffffbfff download area programming/erasing procedure program area (1) cancel the emulation mode. (2) transfer the user programming/erasing procedure program. (3) download the on-chip programming/ erasing program to the destination set by ftdar without overlapping the tuned data area. (4) execute programming after erasing. tuned data area figure 23.19 programming of tuned data (sh7083: 256-kbyte flash memory version) 1. after the data to be programmed has fixed values, clear the rams bit to 0 to cancel the overlap of ram. emulation mode is canceled and emulation protection is also cleared. 2. transfer the user programming/erasing procedure program to ram. 3. run the programming/erasing procedure program in ram and download the on-chip programming/erasing program. specify the download st art address with ftdar so that the tuned data area does not overlap with the download area. 4. when the eb0 area of the user mat has not been erased, erasing must be performed before programming. set the parameters fmpar and fmpdr so that the tuned data is designated, and execute programming. note: setting the rams bit to 1 puts all the blocks in flash memory in the programming/erasing-protected state regardless of the values of the ram2 to ram0 bits (emulation protection). clear the rams bit to 0 before actual programming or erasure. though ram emulation can also be carried out with the user boot mat selected, the user boot mat can be erased or programmed only in boot mode or programmer mode.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1285 of 1560 mar 18, 2011 sh7080 group 23.8 usage notes 23.8.1 switching between user mat and user boot mat it is possible to switch between the user mat and user boot mat. however, the following procedure is required because these mats are allocated to address 0. (switching to the user boot mat disables programming and erasing. programming of the user boot mat must take place in boot mode or programmer mode.) 1. mat switching by fmats should always be executed from the on-chip ram. the sh microcomputer prefetches execution instructions. therefore, a switchover during program execution in the user mat causes an instruction c ode in the user mat to be prefetched or an instruction in the newly selected user boot mat to be prefetched, thus resulting in unstable operation. 2. to ensure that the mat that has been switche d to is accessible, execute four nop instructions in on-chip ram immediately after writing to fm ats of on-chip ram (this prevents access to the flash memory during mat switching). 3. if an interrupt occurs during switching, there is no guarantee of which memory mat is being accessed. always mask the maskable interrupts before switching mats. in addition, configuring the system so that nmi interrupts do not occur during mat switching is recommended. 4. after the mats have been switched, take care because the interrupt vector table will also have been switched. if the same interrupt processings are to be executed before and after mat switching or interrupt requests cannot be disabled, transfer the interrupt processing routine to on-chip ram, and use the vbr setting to place the interrupt vector table in on chip ram. in this case, make sure the vbr setting change does not conflict with the interrupt occurrence. 5. memory sizes of the user mat and user boot mat are different. when accessing the user boot mat, do not access addresses exceedi ng the 12-kbyte memory space. if access goes beyond the 12-kbyte space, the values read are undefined.
section 23 flash memory page 1286 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group < user mat >< on-chip ram >< user boot mat > procedure for switching to the user boot mat procedure for switching to the user mat procedure for switching to the user boot mat (1) mask interrupts. (2) write h'aa to fmats. (3) execute four nop instructions before accessing the user boot mat. procedure for switching to the user mat (1) mask interrupts. (2) write a value other than h'aa to fmats. (3) execute four nop instructions before accessing the user mat. figure 23.20 switching between user mat and user boot mat 23.8.2 interrupts during programming/erasing (1) download of on-chip program (1.1) vbr setting change before downloading the on-chip program, vbr must be set to h'84000000. if vbr is set to a value other than h'84000000, the interrupt vector table is placed in the user mat (fmats is not h'aa) or the user boot mat (fmats is h'aa) on setting h'84000000 to vbr. when vbr setting change conflicts with interrupt occurrence, whether the vector table before or after vbr is changed is referenced may cause an error. therefore, for cases where vbr setting change ma y conflict with interrupt occurrence, prepare a vector table to be referenced when vbr is h'00000000 (in itial value) at the start of the user mat or user boot mat. (1.2) sco download request and interrupt request download of the on-chip programming/erasing program that is initiated by setting the sco bit in fccs to 1 generates a particular inte rrupt processing accompanied by mat switchover. operation when the sco download request and inte rrupt request conflicts is described below. 1. contention between sco download request and interrupt request figure 23.21 shows the timing of contention between execution of the instruction that sets the sco bit in fccs to 1 and interrupt acceptance.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1287 of 1560 mar 18, 2011 sh7080 group n n+1 n+2 n+3 n+4 fetch decoding execution execution execution (a) (b) cpu cycle cpu operation for instruction that sets sco bit to 1 (a) when the interrupt is accepted at the (n + 1) cycle or before after the interrupt processing completes, the sco bit is set to 1 and download is executed. (b) when the interrupt is accepted at the (n + 2) cycle or later the interrupt will conflicts with the sco download request. ensure that no interrupt is generated. interrupt acceptance figure 23.21 timing of contention between sco download request and interrupt request 2. generation of interrupt requests during downloading ensure that interrupts are not generated during downloading that is initiated by the sco bit.
section 23 flash memory page 1288 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (2) interrupts during programming/erasing though an interrupt processing can be execute d at realtime during programming/erasing of the downloaded on-chip program, the following limitations and notes are applied. 1. when flash memory is being programmed or erased, both the user mat and user boot mat cannot be accessed. prepare the interrupt vector table and interrupt processing routine in on-chip ram or external memory. make sure the flash memory being programmed or erased is not accessed by the interrupt processing routine. if flash memory is read, the read values are not guaranteed. if the relevant bank in flash memory that is being programmed or erased is accessed, th e error protection state is entered, and programming or erasing is aborted. if a bank other than the relevant bank is accessed, the error protection state is not entered but the read values are not guaranteed. 2. do not rewrite the program data specified by the fmpdr parameter. if new program data is to provided by the interrupt processing, temporarily save the new program data in another area. after confirming the completion of programming, save the new program data in the area specified by fmpdr or change th e setting in fmpdr to indicated the other area in which the new program data was temporarily saved. 3. make sure the interrupt processing routine does not rewrite the contents of the flash- memory related registers or data in the downloaded on-chip program area. during the interrupt processing, do not simultaneously perform ram emulation, download of the on- chip program by an sco request, or programming/erasing. 4. at the beginning of the interrupt processing routine, save the cpu register contents. before returning from the interrupt processing, write the saved contents in the cpu registers again. 5. when a transition is made to sleep mode or software standby mode in the interrupt processing routine, the error protection state is entered and programming/erasing is aborted. if a transition is made to the reset state, the reset signal should only be released after providing a reset input over a period longer than the normal 100 s to reduce the damage to flash memory.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1289 of 1560 mar 18, 2011 sh7080 group 23.8.3 other notes 1. download time of on-chip program the programming program that includes the initialization routine and the erasing program that includes the initialization routine are each 3 kbytes or less. accordingly, when the cpu clock frequency is 20 mhz, the download for each progra m takes approximately 10 ms at maximum. 2. user branch processing intervals the intervals for executing the us er branch processing differs in programming and erasing. the processing phase also differs. table 23.11 lists the maximum intervals for initiating the user branch processing when the cpu clock frequency is 80 mhz. table 23.11 initiation intervals of user branch processing processing name maximum interval programming approximately 2 ms erasing approximately 15 ms however, when operation is done with cpu clock of 80 mhz, maximum values of the time until first user branch processing are as shown in table 23.12. table 23.12 initial user branch processing time processing name max. programming approximately 2 ms erasing approximately 15 ms 3. write to flash-memory related registers by dmac or dtc while an instruction in on-chip ram is being executed, the dmac or dtc can write to the sco bit in fccs that is used for a download request or fmats that is used for mat switching. make sure that these registers are not accidentally written to, otherwise an on-chip program may be downloaded and destroy ram or a mat switchover may occur and the cpu get out of control. 4. state in which interrupts are ignored in the following modes or period, interrupt requests are ignored; they are not executed and the interrupt sources are not retained. ? boot mode ? programmer mode
section 23 flash memory page 1290 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 5. note on programming the product having a 256-kbyte user mat if an attempt is made to program the product having a 256-kbyte user mat with more than 256 kbytes, data programmed after the first 256 kbytes are not guaranteed. 6. compatibility with programming/erasing program of conventional f-ztat sh microcomputer a programming/erasing program for flash memory used in the conventional f-ztat sh microcomputer which does not support download of the on-chip program by a sco transfer request cannot run in this lsi. be sure to download the on-chip program to execute programming/erasing of flash memory in this lsi. 7. monitoring runaway by wdt unlike the conventional f-ztat sh microcomputer, no countermeasures are available for a runaway by wdt during programming/erasing by the downloaded on-chip program. prepare countermeasures (e.g. use of the user br anch routine and periodic timer interrupts) for wdt while taking the programming/erasing time into consideration as required.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1291 of 1560 mar 18, 2011 sh7080 group 23.9 supplementary information 23.9.1 specifications of the standa rd serial communications interface in boot mode the boot program activated in boot mode communicates with the host via the on-chip sci of the lsi. the specifications of the serial communications interface be tween the host and the boot program are described below. ? states of the boot program the boot program has three states. 1. bit-rate matching state in this state, the boot program adjusts the bit rate to match that of the host. when the chip starts up in boot mode, the boot program is activated and enters the bit-rate matching state, in which it receives commands from the host and adju sts the bit rate accordin gly. after bit-rate matching is complete, the boot program pro ceeds to the inquiry-and-selection state. 2. inquiry-and-selection state in this state, the boot program responds to inquiry commands from the host. the device, clock mode, and bit rate are selected in this state. after making these selections, the boot program enters the programming/erasure state in res ponse to the transition-to-programming/erasure state command. the boot program transfers the erasure program to ram and executes erasure of the user mat and user boot mat before it enters the programming/erasure state. 3. programming/erasure state in this state, programming/erasure are executed. the boot program transfers the program for programming/erasure to ram in line with the co mmand received from the host and executes programming/erasure. it also performs sum ch ecking and blank checking as directed by the respective commands. figure 23.22 shows the flow of processing by the boot program.
section 23 flash memory page 1292 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group wait for programming/erasure selection erase user mat/use boot mat bit rate matching wait for inquiry and selection selection processing inquiry processing programming processing erasure processing checking processing programming erasure checking reset inquiry enter programming/erasure state selection bit rate matching state inquiry-and-selection state programming/erasure state figure 23.22 flow of processing by the boot program ? bit-rate matching state in bit-rate matching, the boot program measures the low-level intervals in a signal carrying h'00 data that is transmitted by the host, and calculates the bit rate from this. the bit rate can be changed by the new-bit-rate selection command. on completion of bit-rate matching, the boot program goes to the inquiry and selection state. the sequence of processing in bit-rate matching is shown in figure 23.23.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1293 of 1560 mar 18, 2011 sh7080 group host boot program h'00 (max. 30 times) h'00 (bit rate matching complete) h'55 h'e6 (response) h'ff (error) measures the length of one bit figure 23.23 sequence of bit-rate matching ? communications protocol formats in the communications protocol between the host and boot program after completion of the bit-rate matching are as follows. 1. one-character command or one-character response a command or response consisting of a single character used for an inquiry or the ack code indicating normal completion. 2. n-character command or n-character response a command or response that requires n bytes of data, which is used as a selection command or response to an inquiry. the length of programming data is treated separately below. 3. error response response to a command in case of an error: two bytes, consisting of the error response and error code. 4. 128-byte programming command the command itself does not include data-size information. the data length is known from the response to the command for inquiring about the programming size. 5. response to a memory reading command this response includes four bytes of size information.
section 23 flash memory page 1294 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group command or response data data (n bytes) address size checksum command or response command error code error response checksum data data size response checksum one-character command or one-character response n-character command or n-character response error response 128-byte programming command response to memory read command figure 23.24 formats in the communications protocol ? command (1 byte): inquiry, selection, programming, erasure, checking, etc. ? response (1 byte): response to an inquiry ? size (one or two bytes): the length of data for transfer, excluding the command/response code, size, and checksum. ? data (n bytes): particular data for the command or response ? checksum (1 byte): set so that the total sum of byte values from the command code to the checksum is h'00 in the lower-order 1 byte. ? error response (1 byte): error response to a command ? error code (1 byte): indicates the type of error. ? address (4 bytes): address for programming ? data (n bytes): data to be programmed. "n" is known from the response to the command used to inquire about the programming size. ? data size (4 bytes): four-byte field incl uded in the response to a memory reading command.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1295 of 1560 mar 18, 2011 sh7080 group ? inquiry-and-selection state in this state, the boot program returns information on the flash rom in response to inquiry commands sent from the host, and selects the device, clock mode, and bit rate in response to the respective selection commands. the inquiry and selection commands are listed in table 23.13. table 23.13 inquiry and selection commands command command name function h'20 inquiry on supported devices requests the device codes and their respective boot program names. h'10 device selection selects a device code. h'21 inquiry on clock modes requests the number of available clock modes and their respective values. h'11 clock-mode selection selects a clock mode. h'22 inquiry on frequency multipliers requests the number of clock signals for which frequency multipliers and divisors are selectable, the number of multiplier and divisor settings for the respective clocks, and the values of the multipliers and divisors. h'23 inquiry on operating frequency requests the minimum and maximum values for operating frequency of the main clock and peripheral clock. h'24 inquiry on user boot mats requests the number of user boot mat areas along with their start and end addresses. h'25 inquiry on user mats requests the number of user mat areas along with their start and end addresses. h'26 inquiry on erasure blocks requests the number of erasure blocks along with their start and end addresses. h'27 inquiry on programming size requests the unit of data for programming. h'3f new bit rate selection selects a new bit rate. h'40 transition to programming/erasure state on receiving this command, the boot program erases the user mat and user boot mat and enters the programming/erasure state. h'4f inquiry on boot program state requests information on the current state of boot processing. the selection commands should be sent by the host in this order: device selection (h'10), clock- mode selection (h'11), new bit rate selection (h'3f). these commands are mandatory. if the same selection command is sent two or more times, th e command that is sent last is effective.
section 23 flash memory page 1296 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group all commands in the above table, except for the boot program state inquiry command (h'4f), are valid until the boot program accepts the transiti on-to-programming/erasure state command (h'40). that is, until the transition command is accepted, th e host can continue to send commands listed in the above table until it has made the necessary in quiries and selections. the host can send the boot program state inquiry command (h'4f) even after acceptance of the transition-to- programming/erasure state command (h'40) by the boot program. (1) inquiry on supported devices in response to the inquiry on supported devices, the boot program returns the device codes of the devices it supports and the product names of their respective boot programs. command h'20 ? command h'20 (1 byte): inquiry on supported devices response h'30 size no. of devices number of characters device code product name ? sum ? response h'30 (1 byte): response to the inquiry on supported devices ? size (1 byte): the length of data for transfer excluding the command code, this field (size), and the checksum. here, it is the total number of bytes taken up by the number of devices, number of characters, device code, and product name fields. ? number of devices (1 byte): the number of device models supported by the boot program embedded in the microcomputer. ? number of characters (1 byte): the number of characters in the device code and product name fields. ? device code (4 bytes): device code of a supported device (ascii encoded) ? product name (n bytes): product code of the boot program (ascii encoded) ? sum (1 byte): checksum this is set so that the total sum of all bytes from the command code to the checksum is h'00.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1297 of 1560 mar 18, 2011 sh7080 group (2) device selection in response to the device selection command, the boot program sets the specified device as the selected device. the boot program will return the information on the selected device in response to subsequent inquiries. command h'10 size device code sum ? command h'10 (1 byte): device selection ? size (1 byte): number of characters in the device code (fixed at 4) ? device code (4 bytes): a device code that was returned in response to an inquiry on supported devices (ascii encoded) ? sum (1 byte): checksum response h'06 ? response h'06 (1 byte): response to device selection the ack code is returned when the specified device code matches one of the supported devices. error response h'90 error ? error response h'90 (1 byte): error response to device selection ? error (1 byte): error code h'11: sum-check error h'21: non-matching device code (3) inquiry on clock modes in response to the inquiry on clock modes, the boot program returns the number of available clock modes. command h'21 ? command h'21 (1 byte): inquiry on clock modes response h'31 size mode ? sum
section 23 flash memory page 1298 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? response h'31 (1 byte): response to the inquiry on clock modes ? size (1 byte): the total length of the number of modes and mode data fields. ? mode (1 byte): selectable clock mode (example: h'01 denotes clock mode 1) ? sum (1 byte): checksum (4) clock-mode selection in response to the clock-mode selection comma nd, the boot program sets the specified clock mode. the boot program will return the information on the selected clock mode in response to subsequent inquiries. command h'11 size mode sum ? command h'11 (1 byte): clock mode selection ? size (1 byte): number of characters in the clock-m ode field (fixed at 1) ? mode (1 byte): a clock mode returned in response to the inquiry on clock modes ? sum (1 byte): checksum response h'06 ? response h'06 (1 byte): response to clock mode selection the ack code is returned when the specified clock-mode matches one of the available clock modes. error response h'91 error ? error response h'91 (1 byte): error response to clock mode selection ? error (1 byte): error code h'11: sum-check error h'22: non-matching clock mode
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1299 of 1560 mar 18, 2011 sh7080 group (5) inquiry on frequency multipliers in response to the inquiry on frequency multiplie rs, the boot program returns information on the settable frequency multipliers or divisors. command h'22 ? command h'22 (1 byte): inquiry on frequency multipliers response h'32 size no. of operating clocks no. of multipliers multiplier ? ? sum ? response h'32 (1 byte): response to the inquiry on frequency multipliers ? size (1 byte): the total length of the number of operating clocks, number of multipliers, and multiplier fields. ? number of operating clocks (1 byte): the number of operating clocks for which multipliers can be selected (for example, if frequency multiplier settings can be made for the frequencies of the main and peripheral operating clocks, the value should be h'02). ? number of multipliers (1 byte): the number of multipliers selectable for the operating frequency of the main or peripheral modules ? multiplier (1 byte): multiplier: numerical value in the case of frequency multiplication (e.g. h'04 for 4) divisor: two?s complement negative numerical value in the case of frequency division (e.g. h'fe [-2] for 1/2) as many multiplier fields are included as there are multipliers or divisors, and combinations of the number of multipliers and multiplier fields are repeated as many times as there are operating clocks. ? sum (1 byte): checksum
section 23 flash memory page 1300 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group (6) inquiry on operating frequency in response to the inquiry on operating frequency, the boot program returns the number of operating frequencies and the maximum and minimum values. command h'23 ? command h'23 (1 byte): inquiry on operating frequency response h'33 size no. of operating clocks operating freq. (min) operating freq. (max) ? sum ? response h'33 (1 byte): response to the inquiry on operating frequency ? size (1 byte): the total length of the number of operating clocks, and maximum and minimum values of operating frequency fields. ? number of operating clocks (1 byte): the num ber of operating clock frequencies required within the device. for example, the value two indicates main and peripheral operating clock frequencies. ? minimum value of operating frequency (2 bytes): the minimum frequency of a frequency- multiplied or -divided clock signal. the value in this field and in the maximum value field is the frequency in mhz to two decimal places, multiplied by 100 (for example, if the frequency is 20.00 mhz, the value multiplied by 100 is 2000, so h'07d0 is returned here). ? maximum value of operating frequency (2 byt es): the maximum frequency of a frequency- multiplied or -divided clock signal. as many pairs of minimum/maximum values are included as there are operating clocks. ? sum (1 byte): checksum
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1301 of 1560 mar 18, 2011 sh7080 group (7) inquiry on user boot mats in response to the inquiry on user boot mats, the boot program returns the number of user boot mat areas and their addresses. command h'24 ? command h'24 (1 byte): inquiry on user boot mat information response h'34 size no. of areas first address of the area last address of the area ? sum ? response h'34 (1 byte): response to the inquiry on user boot mats ? size (1 byte): the total length of the number of areas and first and last address fields. ? number of areas (1 byte): the number of user boot mat areas. h'01 is returned if the entire user boot mat area is continuous. ? first address of the area (4 bytes) ? last address of the area (4 bytes) as many pairs of first and last addre ss field are included as there are areas. ? sum (1 byte): checksum (8) inquiry on user mats in response to the inquiry on user mats, the boot program returns the number of user mat areas and their addresses. command h'25 ? command h'25 (1 byte): inquiry on user mat information response h'35 size no. of areas first address of the area last address of the area ? sum
section 23 flash memory page 1302 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? response h'35 (1 byte): response to the inquiry on user mats ? size (1 byte): the total length of the number of areas and first and last address fields. ? number of areas (1 byte): the number of user mat areas. h'01 is returned if the entire user mat area is continuous. ? first address of the area (4 bytes) ? last address of the area (4 bytes) as many pairs of first and last addre ss field are included as there are areas. ? sum (1 byte): checksum (9) inquiry on erasure blocks in response to the inquiry on erasure blocks, the boot program returns the number of erasure blocks in the user mat and the addresses where each block starts and ends. command h'26 ? command h'26 (1 byte): inquiry on erasure blocks response h'36 size no. of blocks first address of the block last address of the block ? sum ? response h'36 (1 byte): response to the inquiry on erasure blocks ? size (2 bytes): the total length of the number of blocks and first and last address fields. ? number of blocks (1 byte): the number of erasure blocks in flash memory ? first address of the block (4 bytes) ? last address of the block (4 bytes) as many pairs of first and last address data are included as there are blocks. ? sum (1 byte): checksum
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1303 of 1560 mar 18, 2011 sh7080 group (10) inquiry on programming size in response to the inquiry on programming size, the boot program returns the size, in bytes, of the unit for programming. command h'27 ? command h'27 (1 byte): inquiry on programming size response h'37 size programming size sum ? response h'37 (1 byte): response to the inquiry on programming size ? size (1 byte): the number of characters in the programming size field (fixed at 2) ? programming size (2 bytes): the size of the unit for programming this is the unit for the reception of data to be programmed. ? sum (1 byte): checksum (11) new bit rate selection in response to the new-bit-rate selection command, the boot program changes the bit rate setting to the new bit rate and, if the setting was successful, responds to the ack sent by the host by returning another ack at the new bit rate. the new-bit-rate selection command should be sent after clock-mode selection. command h'3f size bit rate input frequency no. of multipliers multiplier 1 multiplier 2 sum ? command h'3f (1 byte): new bit rate selection ? size (1 byte): the total length of the bit ra te, input frequency, number of multipliers, and multiplier fields ? bit rate (2 bytes): new bit rate the bit rate value divided by 100 should be set here (for example, to select 19200 bps, the set h'00c0, which is 192 in decimal notation). ? input frequency (2 bytes): the frequency of the clock signal fed to the boot program this should be the frequency in mhz to the second decimal place, multiplied by 100 (for example, if the frequency is 28.882 mhz, the values is truncated to the second decimal place and multiplied by 100, making 2888; so h'0b48 should be set in this field).
section 23 flash memory page 1304 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? number of multipliers (1 byte): the number of selectable frequency multipliers and divisors for the device. this is normally 2, which indicates the main operating frequency and the operating frequency of the peripheral modules. ? multiplier 1 (1 byte): multiplier or divisor for the main operating frequency multiplier: numerical value of the frequency multiplier (e.g. h'04 for 4) divisor: two?s complement negative numerical value in the case of frequency division (e.g. h'fe [-2] for 1/2) ? multiplier 2 (1 byte): multiplier or divisor for the peripheral operating frequency multiplier: numerical value of the frequency multiplier (e.g. h'04 for 4) divisor: two?s complement negative numerical value in the case of frequency division (e.g. h'fe [-2] for 1/2) ? sum (1 byte): checksum response h'06 ? response h'06 (1 byte): response to the new-bit-rate selection command the ack code is returned if the specified bit rate was selectable. error response h'bf error ? error response h'bf (1 byte): error response to new bit rate selection ? error (1 byte): error code h'11: sum-check error h'24: bit rate selection error (the specified bit rate is not selectable). h'25: input frequency error (the specified input frequency is not within the range from the minimum to the maximum value). h'26: frequency multiplier error (the specified multiplier does not match an available one). h'27: operating frequency error (the specified operating frequency is not within the range from the minimum to the maximum value).
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1305 of 1560 mar 18, 2011 sh7080 group the received data are checked in the following ways. 1. input frequency the value of the received input frequency is check ed to see if it is w ithin the range of the minimum and maximum values of input frequency for the selected clock mode of the selected device. a value outside the range generates an input frequency error. 2. multiplier the value of the received multiplier is checked to see if it matches a multiplier or divisor that is available for the selected clock mode of the selected device. a value that does not match an available ratio generates a frequency multiplier error. 3. operating frequency the operating frequency is calculated from th e received input frequency and the frequency multiplier or divisor. the input frequency is the frequency of the clock signal supplied to the lsi, while the operating frequency is the frequency at which the lsi is actually driven. the following formulae are used for this calculation. operating frequency = input frequency multiplier, or operating frequency = input frequency / divisor the calculated operating frequency is checked to see if it is within the range of the minimum and maximum values of the operating frequency for the selected clock mode of the selected device. a value outside the range gene rates an operating frequency error. 4. bit rate from the peripheral operating frequency (p ) and the bit rate (b), the value (= n) of the clock select bits (cks) in the serial mode register (scsmr) and the value (= n) of the bit rate register (scbrr) are calculated, after which the error in the bit rate is calculated. this error is checked to see if it is smaller than 4%. a result greater than or equal to 4% generates a bit rate selection error. the following formula is use to calculate the error. error (%) = [ ] - 1 100 (n + 1) b 64 2 2n-1 p 10 6
section 23 flash memory page 1306 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group when the new bit rate is selectable, the boot program returns an ack code to the host and then makes the register setting to select the new bit rate. the host then sends an ack code at the new bit rate, and the boot program responds to this with another ack code, this time at the new bit rate. acknowledge h'06 ? acknowledge h'06 (1 byte): the ack code sent by the host to acknowledge the new bit rate. response h'06 ? response h'06 (1 byte): the ack code transferred in response to acknowledgement of the new bit rate the sequence of new bit rate selection is shown in figure 23.25. host boot program new bit rate setting h'06 (ack) h'06 (ack) at the new bit rate h'06 (ack) at the new bit rate new bit rate setting wait for one-bit period at the current bit rate setting setting the new bit rate figure 23.25 sequence of new bit rate selection
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1307 of 1560 mar 18, 2011 sh7080 group (12) transition to the programming/erasure state in response to the transition to the programming/erasure state command, the boot program transfers the erasing program and runs it to erase any data in the user mat and then the user boot mat. on completion of this erasure, the boot program returns the ack code and enters the programming/erasure state. before sending the programming selection command and data for programming, the host must select the device, clock mode, and new bit rate for the lsi by issuing the device selection command, clock-mode selection command, new-bit-rate selection command, and then initiate the transition to the programming/erasure state by sending the corresponding command to the boot program. command h'40 ? command h'40 (1 byte): transition to programming/erasure state response h'06 ? response h'06 (1 byte): response to the tran sition-to-programming/erasure state command this is returned as ack when erasure of the user boot mat and user mat has succeeded after transfer of the erasure program. error response h'c0 h'51 ? error response h'c0 (1 byte): error response to the transition-to-programming/erasure state command ? error (1 byte): error code h'51: erasure error (erasure did not succeed because of an error.)
section 23 flash memory page 1308 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? command error command errors are generated by undefined commands, commands sent in an incorrect order, and the inability to accept a command. for example, sending the clock-mode selection command before device selection or an inquiry command after the transiti on-to-programming/erasure state command generates a command error. error response h'80 h'xx ? error response h'80 (1 byte): command error ? command h'xx (1 byte): received command ? order of commands in the inquiry-and-selection state, commands should be sent in the following order. 1. send the inquiry on supported devices command (h'20) to get the list of supported devices. 2. select a device from the returned device information, and send the device selection command (h'10) to select that device. 3. send the inquiry on clock mode command (h'21) to get the available clock modes. 4. select a clock mode from among the returned clock modes, and send the clock-mode selection command (h'11). 5. after selection of the device and clock mode, send the commands to inquire about frequency multipliers (h'22) and operating frequencies (h'23) to get the information required to select a new bit rate. 6. taking into account the returned information on the frequency multipliers and operating frequencies, send a new-bit-rate selection command (h'3f). 7. after the device and clock mode have been selected, get the information required for programming and erasure of the user boot mat and user mat by sending the commands to inquire about the user boot mat (h'24), user mat (h'25), erasure block (h'26), and programming size (h'27). 8. after making all necessary inquiries and the new bit rate selection, send the transition-to- programming/erasure state command (h'40) to place the boot program in the programming/erasure state.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1309 of 1560 mar 18, 2011 sh7080 group ? programming/erasure state in this state, the boot program must select the form of programming corresponding to the programming-selection command and then write data in response to 128-byte programming commands, or perform erasure in block units in response to the erasure-selection and block- erasure commands. the programming and erasure commands are listed in table 23.14. table 23.14 programming and erasure commands command command name function h'42 selection of user boot mat programming selects transfer of the program for user boot mat programming. h'43 selection of user mat programming selects transfer of the program for user mat programming. h'50 128-byte programming executes 128-byte programming. h'48 erasure selection selects transfer of the erasure program. h'58 block erasure executes erasure of the specified block. h'52 memory read reads from memory. h'4a sum checking of user boot mat executes sum checking of the user boot mat. h'4b sum checking of user mat executes sum checking of the user mat. h'4c blank checking of user boot mat executes blank checking of the user boot mat. h'4d blank checking of user mat executes blank checking of the user mat. h'4f inquiry on boot program state requests information on the state of boot processing.
section 23 flash memory page 1310 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? programming programming is performed by issuing a programming-selection command and the 128-byte programming command. firstly, the host issues the programming-selection command to select the mat to be programmed. two programming-selection commands are provided for the selection of either of the two target areas. 1. selection of user boot mat programming 2. selection of user mat programming next, the host issues a 128-byte programming command. 128 bytes of data for programming by the method selected by the preceding programming selection command are expected to follow the command. to program more than 128 bytes, repeatedly issue 128-byte programming commands. to terminate programming, the host should send another 128-byte programming command with the address h'ffffffff. on completion of programming, the boot program waits for the next programming/erasure selection command. to then program the other mat, start by sending the programming select command. the sequence of programming by programming-selection and 128-byte programming commands is shown in figure 23.26. host boot program programming selection (h'42, h'43) ack 128-byte programming (address and data) ack 128-byte programming (h'ffffffff) ack transfer the program that performs programming programming repeat figure 23.26 sequence of programming
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1311 of 1560 mar 18, 2011 sh7080 group (1) selection of user boot mat programming in response to the command for selecting programming of the user boot mat, the boot program transfers the corresponding flash-writing program, i.e. the program for writing to the user boot mat. command h'42 ? command h'42 (1 byte): selects programming of the user boot mat. response h'06 ? response h'06 (1 byte): response to selection of user boot mat programming this ack code is returned after transfer of the program that performs writing to the user boot mat. error response h'c2 error ? error response h'c2 (1 byte): error response to selection of user boot mat programming ? error (1 byte): error code h'54: error in selection processing (processi ng was not completed because of a transfer error) (2) selection of user mat programming in response to the command for selecting programming of the user mat, the boot program transfers the corresponding flash-writing program, i.e. the program for writing to the user mat. command h'43 ? command h'43 (1 byte): selects programming of the user mat. response h'06 ? response h'06 (1 byte): response to selection of user mat programming this ack code is returned after transfer of the program that performs writing to the user mat.
section 23 flash memory page 1312 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group error response h'c3 error ? error response h'c3 (1 byte): error response to selection of user mat programming ? error (1 byte): error code h'54: error in selection processing (processi ng was not completed because of a transfer error) (3) 128-byte programming in response to the 128-byte programming command, the boot program executes the flash-writing program transferred in response to the command to select programming of the user boot mat or user mat. command h'50 address for programming data ? ? sum ? command h'50 (1 byte): 128-byte programming ? address for programming (4 bytes): address where programming starts this should be the address of a 128-byte boundary. [example] h'00, h01, h'00, h'00: h'00010000 ? programming data (n bytes): data for programming the length of the programming data is the size returned in response to the programming size inquiry command. ? sum (1 byte): checksum response h'06 ? response h'06 (1 byte): response to 128-byte programming the ack code is returned on completion of the requested programming. error response h'd0 error
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1313 of 1560 mar 18, 2011 sh7080 group ? error response h'd0 (1 byte): error response to 128-byte programming ? error (1 byte): error code h'11: sum-check error h'2a: address error (the address is not within the range for the selected mat) h'53: programming error (programming failed because of an error in programming) the specified address should be on a boundary corresponding to the unit of programming (programming size). for example, when programming 128 bytes of data, the lowest byte of the address should be either h'00 or h'80. when less than 128 bytes of data are to be programmed, the host should transmit the data after padding the vacant bytes with h'ff. to terminate programming of a given mat, send a 128-byte programming command with the address field h'ffffffff. this informs the boot program that all data for the selected mat have been sent; the boot program then waits for the next programming/erasure selection command. command h'50 address for programming sum ? command h'50 (1 byte): 128-byte programming ? address for programming (4 bytes): terminating code (h'ff, h'ff, h'ff, h'ff) ? sum (1 byte): checksum response h'06 ? response h'06 (1 byte): response to 128-byte programming this ack code is returned on completion of the requested programming. error response h'd0 error ? error response h'd0 (1 byte): error response to 128-byte programming ? error (1 byte): error code h'11: sum-check error h'53: programming error
section 23 flash memory page 1314 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? erasure erasure is performed by issuing the erasure selection command and then one or more block erasure commands. firstly, the host sends the erasure selection command to select erasure; after that, it sends a block erasure command to actually erase a specific block. to erase multiple blocks, send further block erasure commands. to terminate erasure, the host should send a block erasure command with the block number h'ff. after this, the boot program waits for the next programming/erasure selection command. the sequence of erasure by the erasure selection command and block erasure command is shown in figure 23.27. ack erasure (h'ff) erasure selection (h'48) erasure (block number) ack ack erasure transfer the program that performs erasure boot program host repeat figure 23.27 sequence of erasure
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1315 of 1560 mar 18, 2011 sh7080 group (1) select erasure in response to the erasure selection command, the boot program transfers the program that performs erasure, i.e. erases data in the user mat. command h'48 ? command h'48 (1 byte): selects erasure. response h'06 ? response h'06 (1 byte): response to selection of erasure this ack code is returned after transfer of the program that performs erasure. error response h'c8 error ? error response h'c8 (1 byte): error response to selection of erasure ? error (1 byte): error code h'54: error in selection processing (processi ng was not completed because of a transfer error.) (2) block erasure in response to the block erasure command, the boot program erases the data in a specified block of the user mat. command h'58 size block number sum ? command h'58 (1 byte): erasure of a block ? size (1 byte): the number of characters in the block number field (fixed at 1) ? block number (1 byte): block number of the block to be erased ? sum (1 byte): checksum response h'06 ? response h'06 (1 byte): response to the block erasure command this ack code is returned when the block has been erased.
section 23 flash memory page 1316 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group error response h'd8 error ? error response h'd8 (1 byte): error response to the block erasure command ? error (1 byte): error code h'11: sum-check error h'29: block number error (the specified block number is incorrect.) h'51: erasure error (an error occurred during erasure.) on receiving the command with h'ff as the bl ock number, the boot program stops erasure processing and waits for the next programming/erasure selection command. command h'58 size block number sum ? command h'58 (1 byte): erasure of a block ? size (1 byte): the number of characters in the block number field (fixed at 1) ? block number (1 byte): h'ff (erasure terminating code) ? sum (1 byte): checksum response h'06 ? response h'06 (1 byte): ack code to indicate response to the request for termination of erasure to perform erasure again after having issued the command with the block number specified as h'ff, execute the process from the selection of erasure. ? memory read in response to the memory read command, the boot program returns the data from the specified address. command h'52 size area first address for reading amount to read sum ? command h'52 (1 byte): memory read ? size (1 byte): the total length of the area, address for reading, and amount to read fields (fixed value of 9)
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1317 of 1560 mar 18, 2011 sh7080 group ? area (1 byte): h'00: user boot mat h'01: user mat an incorrect area specification will produce an address error. ? address where reading starts (4 bytes) ? amount to read (4 bytes): the amount of data to be read ? sum (1 byte): checksum response h'52 amount to read data ? sum ? response h'52 (1 byte): response to the memory read command ? amount to read (4 bytes): the amount to read as specified in the memory read command ? data (n bytes): the specified amount of data read out from the specified address ? sum (1 byte): checksum error response h'd2 error ? error response h'd2 (1 byte): error response to memory read command ? error (1 byte): error code h'11: sum-check error h'2a: address error (the address specified for reading is beyond the range of the mat) h'2b: size error (the specified amount is greater than the size of the mat, the last address for reading as calculated from the specified address for the start of reading and the amount to read is beyond the mat area, or "0" was specified as the amount to read)
section 23 flash memory page 1318 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? sum checking of the user boot mat in response to the command for sum checking of the user boot mat, the boot program adds all bytes of data in the user boot mat and returns the result. command h'4a ? command h'4a (1 byte): sum checking of the user boot mat response h'5a size checksum for the mat sum ? response h'5a (1 byte): response to sum checking of the user boot mat ? size (1 byte): the number of characters in the checksum for the mat (fixed at 4) ? checksum for the mat (4 bytes): result of ch ecksum calculation for the user boot mat: the total of all data in the mat, in byte units. ? sum (1 byte): checksum (for the transmitted data) ? sum checking of the user mat in response to the command for sum checking of the user mat, the boot program adds all bytes of data in the user mat and returns the result. command h'4b ? command h'4b (1 byte): sum checking of the user mat response h'5b size checksum for the mat sum ? response h'5b (1 byte): response to sum checking of the user mat ? size (1 byte): the number of characters in the checksum for the mat (fixed at 4) ? checksum for the mat (4 bytes): result of checksum calculation for the user mat: the total of all data in the mat, in byte units. ? sum (1 byte): checksum (for the transmitted data)
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1319 of 1560 mar 18, 2011 sh7080 group ? blank checking of the user boot mat in response to the command for blank checking of the user boot mat, the boot program checks to see if the whole of the user boot mat is bl ank; the value returned indicates the result. command h'4c ? command h'4c (1 byte): blank checking of the user boot mat response h'06 ? response h'06 (1 byte): response to blank checking of the user boot mat this ack code is returned when the whole area is blank (all bytes are h'ff). error response h'cc h'52 ? error response h'cc (1 byte): error response to blank checking of the user boot mat ? error code h'52 (1 byte): non-erased error ? blank checking of the user mat in response to the command for blank checking of the user mat, the boot program checks to see if the whole of the user mat is blank; the value returned indicates the result. command h'4d ? command h'4d (1 byte): blank checking of the user boot mat response h'06 ? response h'06 (1 byte): response to blank checking of the user mat the ack code is returned when the w hole area is blank (all bytes are h'ff). error response h'cd h'52 ? error response h'cd (1 byte): error response to blank checking of the user mat ? error code h'52 (1 byte): non-erased error
section 23 flash memory page 1320 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ? inquiry on boot program state in response to the command for inquiry on the state of the boot program, the boot program returns an indicator of its current state and error information. this inquiry can be made in the inquiry-and- selection state or the pr ogramming/erasure state. command h'4f ? command h'4f (1 byte): inquiry on boot program state response h'5f size status error sum ? response h'5f (1 byte): response to the inquiry regarding boot-program state ? size (1 byte): the number of characters in status and error (fixed at 2) ? status (1 byte): state of the standard boot program see table 23.15, status codes. ? error (1 byte): error state (indicates whether the program is in normal operation or an error has occurred) error = 0: normal error 0: error see table 23.16, error codes. ? sum (1 byte): checksum table 23.15 status codes code description h'11 waiting for device selection h'12 waiting for clock-mode selection h'13 waiting for bit-rate selection h'1f waiting for transition to programming/erasure status (bit-rate selection complete) h'31 erasing the user mat or user boot mat h'3f waiting for programming/erasure selection (erasure complete) h'4f waiting to receive data for programming (programming complete) h'5f waiting for erasure block specification (erasure complete)
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1321 of 1560 mar 18, 2011 sh7080 group table 23.16 error codes code description h'00 no error h'11 sum check error h'21 non-matching device code error h'22 non-matching clock mode error h'24 bit-rate selection failure h'25 input frequency error h'26 frequency multiplier error h'27 operating frequency error h'29 block number error h'2a address error h'2b data length error (size error) h'51 erasure error h'52 non-erased error h'53 programming error h'54 selection processing error h'80 command error h'ff bit-rate matching acknowledge error 23.9.2 areas for storage of the procedural program and data for programming in the descriptions in the previous section, storable areas for the programming/erasing procedure programs and program data are assumed to be in on-chip ram. however, the procedure programs and data can be stored in and executed from other areas (e.g. external address space) as long as the following conditions are satisfied. 1. the on-chip programming/erasing program is downloaded from the address set by ftdar in on-chip ram, therefore, this area is not available for use. 2. the on-chip programming/erasing program will use 128 bytes or more as a stack. make sure this area is reserved. 3. since download by setting the sco bit to 1 will cause the mats to be switched, it should be executed in on-chip ram. 4. the flash memory is accessible until the start of programming or erasing, that is, until the result of downloading has been decided. when in a mode in which the external address space
section 23 flash memory page 1322 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group is not accessible, such as single-chip mode, th e required procedure programs, interrupt vector table, interrupt processing routine, and user br anch program should be transferred to on-chip ram before programming/erasing of the flash memory starts. 5. the flash memory is not accessible during programming/erasing operations. therefore, the programming/erasing program must be downloaded to on-chip ram in advance. areas for executing each procedure program for initiating programming/erasing, the user program at the user branch destination for programming/erasing, the interrupt vector table, and the interrupt processing routine must be located in on-chip memory other than flash memory or the external address space. 6. after programming/erasing, access to flash memory is inhibited until fkey is cleared. a reset state ( res = 0) for more than at least 100 s must be taken when the lsi mode is changed to reset on completion of a programming/erasing operation. transitions to the reset state during programming/erasing are inhibited. when the reset signal is accidentally input to the lsi, a longer period in the reset state than usual (100 s) is needed before the reset signal is released. 7. switching of the mats by fmats is needed for programming/erasing of the user mat in user boot mode. the program which switches the mats should be executed from the on-chip ram. for details, see section 23.8.1, switching between user mat and user boot mat. please make sure you know which mat is selected when switching the mats. 8. when the program data storage area indicated by the fmpdr parameter in the programming processing is within the flash memory area, an error will occur. therefore, temporarily transfer the program data to on-chip ram to change the address set in fmpdr to an address other than flash memory. based on these conditions, tables 23.17 and 23.18 show the areas in which the program data can be stored and executed according to the operation type and mode. table 23.17 executable mat initiated mode operation user program mode user boot mode * programming table 23.18 (1) table 23.18 (3) erasing table 23.18 (2) table 23.18 (4) note: * programming/erasing is possible to user mats.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1323 of 1560 mar 18, 2011 sh7080 group table 23.18 (1) usable area for programming in user program mode storable/executable area selected mat item on- chip ram user mat external space user mat embedded program storage mat program data storage area x * ? ? selecting on-chip program to be downloaded writing h'a5 to key register writing 1 to sco in fccs (download) x x key register clearing judging download result download error processing setting initialization parameters initialization x x judging initialization result initialization error processing pro- gram- ming proce- dure interrupt processing routine x writing h'5a to key register setting programming parameters x programming x x judging programming result x programming error processing x key register clearing x note: * if the data has been transferred to on-chip ram in advance, this area can be used.
section 23 flash memory page 1324 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 23.18 (2) usable area for erasure in user program mode storable/executable area selected mat item on- chip ram user mat external space user mat embedded program storage mat selecting on-chip program to be downloaded writing h'a5 to key register writing 1 to sco in fccs (download) x x key register clearing judging download result download error processing setting initialization parameters initialization x x judging initialization result initialization error processing interrupt processing routine x erasing proce- dure writing h'5a to key register setting erasure parameters x erasure x x judging erasure result x erasing error processing x key register clearing x
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1325 of 1560 mar 18, 2011 sh7080 group table 23.18 (3) usable area for programming in user boot mode storable/executable area selected mat item on- chip ram user boot mat external space user mat user boot mat embedded program storage area program data storage area x * 1 ? ? ? selecting on-chip program to be downloaded writing h'a5 to key register writing 1 to sco in fccs (download) x x key register clearing judging download result download error processing pro- gram- ming proce- dure setting initialization parameters initialization x x judging initialization result initialization error processing interrupt processing routine x switching mats by fmats x x writing h'5a to key register x
section 23 flash memory page 1326 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 23.18 (3) usable area for programming in user boot mode (cont) storable/executable area selected mat item on- chip ram user boot mat external space user mat user boot mat embedded program storage area setting programming parameters x programming x x judging programming result x programming error processing x * 2 pro- gram- ming proce- dure key register clearing x switching mats by fmats x x notes: 1. if the data has been transferred to on-chip ram in advance, this area can be used. 2. if the mats have been switched by fmats in on-chip ram, this mat can be used.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1327 of 1560 mar 18, 2011 sh7080 group table 23.18 (4) usable area for erasure in user boot mode storable/executable area selected mat item on- chip ram user boot mat external space user mat user boot mat embedded program storage area selecting on-chip program to be downloaded writing h'a5 to key register writing 1 to sco in fccs (download) x x key register clearing judging download result download error processing setting initialization parameters initialization x x erasing proce- dure judging initialization result initialization error processing interrupt processing routine x switching mats by fmats x x writing h'5a to key register x setting erasure parameters x
section 23 flash memory page 1328 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 23.18 (4) usable area for erasure in user boot mode (cont) storable/executable area selected mat item on- chip ram user boot mat external space user mat user boot mat embedded program storage area erasure x x judging erasure result x erasing error processing x * erasing proce- dure key register clearing x switching mats by fmats x x note: * if the mats have been switched by fmats in on-chip ram, this mat can be used.
section 23 flash memory r01uh0198ej0500 rev. 5.00 page 1329 of 1560 mar 18, 2011 sh7080 group 23.10 programmer mode in programmer mode, a prom programmer can be used to perform programming/erasing via a socket adapter, just as for a discrete flash memory. use a prom programmer that supports the renesas 256 or 512-kbyte flash memory on-chip mcu device type (f-ztatxxxx).
section 23 flash memory page 1330 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 24 mask rom r01uh0198ej0500 rev. 5.00 page 1331 of 1560 mar 18, 2011 sh7080 group section 24 mask rom this lsi is available with 256 kbytes of on-chip mask rom. the on-chip rom is connected to the cpu, direct memory access controller (dmac) , and data transfer controller (dtc) through a 32-bit data bus (figure 24.1). the cpu, dmac, and dtc can access the on-chip rom in 8, 16 and 32-bit widths. data in the on-chip rom can always be accessed in one cycle. internal data bus (32 bits) h'00000000 h'00000004 h'00000001 h'00000005 h'00000002 h'00000006 h'00000003 h'00000007 h'0003fffc h'0003fffd h'0003fffe h'0003ffff on-chip rom figure 24.1 mask rom block diagram the operating mode determines whether the on-chi p rom is valid or not. the operating mode is selected using mode-setting pins fwe, md1, and md0. if you are using the on-chip rom, select mode 2 or mode 3; if you are not, select mode 0 or 1. the on-chip rom is allocated to addresses h'00000000 to h' 0003ffff of memory area 0.
section 24 mask rom page 1332 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 24.1 usage notes 24.1.1 module standby mode setting access to the mask rom can be enabled/disabled by the standby control register. the initial value enables the mask rom access. the mask rom access is disabled by setting the module standby mode. for details, see section 26, power-down modes.
section 25 ram r01uh0198ej0500 rev. 5.00 page 1333 of 1560 mar 18, 2011 sh7080 group section 25 ram this lsi has an on-chip high-speed static ram. the on-chip ram is connected to the cpu by a 32-bit data bus (l bus), and to the direct me mory access controller (dmac), and data transfer controller (dtc) by a 32-bit data bus (i bus), enab ling 8, 16, or 32-bit width access to data in the on-chip ram. the on-chip ram is allocated to different addresses according to each product as shown in figure 25.1, and the on-chip ram is divided into page 0 and page 1 based on the addresses. the on-chip ram can be accessed from the cpu (via the l bus ) and the dmac/dtc (via the i bus). when different buses request to access the same page simultaneously, the priority becomes i bus (dmac/dtc) > l bus (cpu). since such kind of conf lict degrades the ram access performance, software should be created so as to avoid conflicts. for example, conflict does not occur when the buses access different pages. an access from the l bus (cpu) is a 1-cycle access as long as page conflict does not occur. the number of bus cycl es in accesses from the i bus (dmac/dtc) differ depending on the ratio between the internal clock (i ) and bus clock (b ), and the operating state of the dmac/dtc. the contents of the on-chip ram are retained in sleep mode or software standby mode, and at a power-on reset or manual reset. however, the contents of the on-chip ram are not retained in deep software standby mode. the on-chip ram can be enabled or disabled by means of the rame bit in the ram control register (ramcr). for details on the ram contro l register (ramcr), refer to section 26.3.7, ram control register (ramcr). h'ffffbfff h'ffffa000 h'ffff9fff h'ffff8000 page 1 8 kbytes page 0 8 kbytes sh7083/sh7084/sh7085 (256-kbyte flash memory version) (16 kbytes) h'ffffbfff h'ffffa000 h'ffff9fff h'ffff4000 page 1 8 kbytes page 0 24 kbytes sh7083/sh7084/sh7085 (512-kbyte flash memory version) / sh7086 (32 kbytes) figure 25.1 on-chip ram addresses
section 25 ram page 1334 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 25.1 usage notes 25.1.1 module standby mode setting ram can be enabled/disabled by the standby control register. the initial value enables ram operation. ram access is disabled by setting the module standby mode. for details, see section 26, power-down modes. 25.1.2 address error when an address error in write access to the on-chip ram occurs , the contents of the on-chip ram may be corrupted. 25.1.3 initial values in ram after power has been supplied, initial values in ram remain undefined until ram is written.
section 26 power-down modes r01uh0198ej0500 rev. 5.00 page 1335 of 1560 mar 18, 2011 sh7080 group section 26 power-down modes this lsi supports the following power-down modes: sleep mode, software standby mode, deep software standby mode, and module standby mode. 26.1 features ? supports sleep mode, software standby mode, module standby mode, and deep software standby mode. 26.1.1 types of power-down modes this lsi has the following power-down modes. ? sleep mode ? software standby mode ? deep software standby mode ? module standby mode table 26.1 shows the methods to make a transition from the program execution state, as well as the cpu and peripheral module states in each m ode and the procedures for canceling each mode.
section 26 power-down modes page 1336 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 26.1 states of power-down modes state mode transition method cpg cpu cpu register on-chip memory on-chip peripheral modules canceling procedure sleep execute sleep instruction with stby bit in stbcr1 cleared to 0. runs halts held runs run ? reset software standby execute sleep instruction with stby bit in stbcr1 and stbymd bit in stbcr6 set to 1. halts halts held halts (contents retained) halt ? interrupt by nmi or irq ? power-on reset by the res pin ? manual reset by the mres pin deep software standby execute sleep instruction with stby bit in stbcr1 set to 1 and stbymd bit in stbcr6 cleared to 0. halts halts undefined halts (contents undefined) halt ? power-on reset by the res pin module standby set mstp bits in stbcr2 to stbcr5 to 1. runs runs held specified module halts (contents retained) specified module halts ? clear mstp bit to 0 ? power-on reset (for modules whose mstp bit has an initial value of 0) note: for details on the states of on-chip peripheral module registers in each mode, refer to section 27.3, register states in each operating mode. for details on the pin states in each mode, refer to appendix a, pin states.
section 26 power-down modes r01uh0198ej0500 rev. 5.00 page 1337 of 1560 mar 18, 2011 sh7080 group 26.2 input/output pins table 26.2 lists the pins used for the power-down modes. table 26.2 pin configuration pin name symbol i/o description power-on reset res input power-on reset input signal. power-on reset by low level. manual reset mres input manual reset input signal. manual reset by low level.
section 26 power-down modes page 1338 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 26.3 register descriptions there are following registers used for the power-down modes. for details on the addresses of these registers and the states of these registers in each processing state, see section 27, list of registers. table 26.3 register configuration register name abbrevia- tion r/w initial value address access size standby control register 1 stbcr1 r/w h'00 h'ffffe802 8 standby control register 2 stbcr2 r/w h'38 h'ffffe804 8 standby control register 3 stbcr3 r/w h'ff h'ffffe806 8 standby control register 4 stbcr4 r/w h'ff h'ffffe808 8 standby control register 5 stbcr5 r/w h'03 h'ffffe80a 8 standby control register 6 stbcr6 r/w h'00 h'ffffe80c 8 ram control register ramcr r/w h'10 h'ffffe880 8 26.3.1 standby control register 1 (stbcr1) stbcr1 is an 8-bit readable/wr itable register that specifies th e state of the power-down mode. bit: initial value: r/w: 7654321 0 00000000 r/wrrrrrrr stby------- bit bit name initial value r/w description 7 stby 0 r/w standby specifies transition to software standby mode. 0: executing sleep instruction makes this lsi sleep mode 1: executing sleep instruction makes this lsi software standby mode or deep software standby mode
section 26 power-down modes r01uh0198ej0500 rev. 5.00 page 1339 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 6 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 26.3.2 standby control register 2 (stbcr2) stbcr2 is an 8-bit readable/writable register that controls the operation of modules in power- down mode. bit: initial value: r/w: 7654321 0 00111000 r/w r/w r r/w r/w r r r mstp 7 mstp 6 - mstp 4 mstp 3 --- bit bit name initial value r/w description 7 mstp7 0 r/w module stop bit 7 when this bit is set to 1, the supply of the clock to the ram is halted. 0: ram operates 1: clock supply to ram halted 6 mstp6 0 r/w module stop bit 6 when this bit is set to 1, the supply of the clock to the rom is halted. 0: rom operates 1: clock supply to rom halted 5 ? 1 r reserved this bit is always read as 1. the write value should always be 1. 4 mstp4 1 r/w module stop bit 4 when this bit is set to 1, the supply of the clock to the dtc is halted. 0: dtc operates 1: clock supply to the dtc halted
section 26 power-down modes page 1340 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 3 mstp3 1 r/w module stop bit 3 when this bit is set to 1, the supply of the clock to the dmac is halted. 0: dmac operates 1: clock supply to the dmac halted 2 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 26.3.3 standby control register 3 (stbcr3) stbcr3 is an 8-bit readable/writable register that controls the operation of modules in power- down mode. bit: initial value: r/w: 7654321 0 11111111 r/w r/w r/w r/w r/w r/w r r mstp 15 mstp 14 mstp 13 mstp 12 mstp 11 mstp 10 -- bit bit name initial value r/w description 7 mstp15 1 r/w module stop bit 15 when this bit is set to 1, the supply of the clock to the i 2 c2 is halted. 0: i 2 c2 operates 1: clock supply to i 2 c2 halted 6 mstp14 1 r/w module stop bit 14 when this bit is set to 1, the supply of the clock to the scif is halted. 0: scif operates 1: clock supply to scif halted
section 26 power-down modes r01uh0198ej0500 rev. 5.00 page 1341 of 1560 mar 18, 2011 sh7080 group bit bit name initial value r/w description 5 mstp13 1 r/w module stop bit 13 when this bit is set to 1, the supply of the clock to the sci_2 is halted. 0: sci_2 operates 1: clock supply to sci_2 halted 4 mstp12 1 r/w module stop bit 12 when this bit is set to 1, the supply of the clock to the sci_1 is halted. 0: sci_1 operates 1: clock supply to sci_1 halted 3 mstp11 1 r/w module stop bit 11 when this bit is set to 1, the supply of the clock to the sci_0 is halted. 0: sci_0 operates 1: clock supply to sci_0 halted 2 mstp10 1 r/w module stop bit 10 when this bit is set to 1, the supply of the clock to the ssu is halted. 0: ssu operates 1: clock supply to ssu halted 1, 0 ? all 1 r reserved these bits are always read as 1. the write value should always be 1. 26.3.4 standby control register 4 (stbcr4) stbcr4 is an 8-bit readable/writable register that controls the operation of modules in power- down mode. bit: initial value: r/w: 7654321 0 11111111 r/w r/w r/w r r r/w r/w r/w mstp 23 mstp 22 mstp 21 -- mstp 18 mstp 17 mstp 16
section 26 power-down modes page 1342 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group bit bit name initial value r/w description 7 mstp23 1 r/w module stop bit 23 when this bit is set to 1, the supply of the clock to the mtu2s is halted. 0: mtu2s operates 1: clock supply to mtu2s halted 6 mstp22 1 r/w module stop bit 22 when this bit is set to 1, the supply of the clock to the mtu2 is halted. 0: mtu2 operates 1: clock supply to mtu2 halted 5 mstp21 1 r/w module stop bit 21 when this bit is set to 1, the supply of the clock to the cmt is halted. 0: cmt operates 1: clock supply to cmt halted 4, 3 ? all 1 r reserved these bits are always read as 1. the write value should always be 1. 2 mstp18 1 r/w module stop bit 18 when this bit is set to 1, the supply of the clock to the a/d_2 is halted. 0: a/d_2 operates 1: clock supply to a/d_2 halted 1 mstp17 1 r/w module stop bit 17 when this bit is set to 1, the supply of the clock to the a/d_1 is halted. 0: a/d_1 operates 1: clock supply to a/d_1 halted 0 mstp16 1 r/w module stop bit 16 when this bit is set to 1, the supply of the clock to the a/d_0 is halted. 0: a/d_0 operates 1: clock supply to a/d_0 halted
section 26 power-down modes r01uh0198ej0500 rev. 5.00 page 1343 of 1560 mar 18, 2011 sh7080 group 26.3.5 standby control register 5 (stbcr5) stbcr5 is an 8-bit readable/writable register that controls the operation of modules in power- down mode. bit: initial value: r/w: 7654321 0 00000011 rrrrrrr/wr/w -- -- -- mstp 25 mstp 24 bit bit name initial value r/w description 7 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 mstp25 1 r/w module stop bit 25 when this bit is set to 1, the supply of the clock to the aud is halted. 0: aud operates 1: clock supply to aud halted 0 mstp24 1 r/w module stop bit 24 when this bit is set to 1, the supply of the clock to the ubc is halted. 0: ubc operates 1: clock supply to ubc halted
section 26 power-down modes page 1344 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 26.3.6 standby control register 6 (stbcr6) stbcr6 is an 8-bit readable/writable register th at specifies the state of the power-down modes. bit: initial value: r/w: 7654321 0 00000000 r/w r/w r r r r r/w r -- hiz - aud srst - stby md - bit bit name initial value r/w description 7 audsrst 0 r/w aud software reset this bit controls the aud reset by software. when 0 is written to audsrst, the aud module shifts to the power-on reset state. 0: shifts to the aud reset state 1: clears the aud reset when setting this bit to 1, the mstp25 bit in stbcr5 should be 0. 6 hiz 0 r/w port high-impedance in software standby mode, this bit selects whether the pin state is retained or changed to high-impedance. 0: in software standby mode, the pin state is retained 1: in software standby mode, the pin state is changed to high-impedance 5 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 stbymd 0 r/w software standby mode select this bit selects a transition to software standby mode or deep software standby mode by executing the sleep instruction when the stby bit is 1 in stbcr1. 0: transition to deep software standby mode 1: transition to software standby mode 0 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 26 power-down modes r01uh0198ej0500 rev. 5.00 page 1345 of 1560 mar 18, 2011 sh7080 group 26.3.7 ram control register (ramcr) ramcr is an 8-bit readable/wr itable register that enables/di sables the access to the on-chip ram. bit: initial value: r/w: 76543210 0001000 - rrrr/wrrrr rame - -- - --- bit bit name initial value r/w description 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 rame 1 r/w ram enable this bit enables/disables the on-chip ram. 0: on-chip ram disabled 1: on-chip ram enabled when this bit is cleared to 0, the access to the on-chip ram is disabled. in this case, an undefined value is returned when reading or fetching the data or instruction from the on-chip ram, and writing to the on- chip ram is ignored. when rame is cleared to 0 to disable the on-chip ram, an instruction to access the on-chip ram should not be set next to the instruction to write ramcr. if such an instruction is set, normal access is not guaranteed. when rame is set to 1 to enable the on-chip ram, an instruction to read ramcr should be set next to the instruction to write to ramcr. if an instruction to access the on-chip ram is set next to the instruction to write to ramcr, normal access is not guaranteed. 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 ? undefined r reserved the read value is undefined. the write value should always be 0.
section 26 power-down modes page 1346 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 26.4 sleep mode 26.4.1 transition to sleep mode executing the sleep instruction when the stby bit in stbcr1 is 0 causes a transition from the program execution state to sleep mode. however, sleep mode cannot be entered when the bus is released (low-level input to breq pin). although the cpu halts immediately after executing the sleep instruction, the contents of its internal registers remain unchanged. the on-chip peripheral modules continue to operate. 26.4.2 canceling sleep mode sleep mode is canceled by a reset. do not cancel sleep mode with an interrupt. (1) canceling with reset sleep mode is canceled by a power-on reset with the res pin, a manual reset with the mres pin, or an internal power-on/manual reset by wdt.
section 26 power-down modes r01uh0198ej0500 rev. 5.00 page 1347 of 1560 mar 18, 2011 sh7080 group 26.5 software standby mode 26.5.1 transition to software standby mode this lsi switches from a program execution state to software standby mode by executing the sleep instruction when the stby bit in stbcr1 and the stbymd bit in stbcr6 are set to 1. however, software standby mode cannot be entered when the bus is released (low-level input to breq pin). execute the sleep instruction after halting the dmac and dtc. in software standby mode, not only the cpu but also the clock and on-chip peripheral modules halt. the contents of the cpu registers and the data of the on-chip ram remain unchanged. some registers of on-chip peripheral modules are, however, initialized. for details on the states of on- chip peripheral module registers in software standby mode, refer to section 27.3, register states in each operating mode. for details on the pin states in software standby mode, refer to appendix a, pin states. the procedure for switching to software standby mode is as follows: 1. clear the tme bit in the timer control register (wtcsr) of the wdt to 0 to stop the wdt. 2. set the timer counter (wtcnt) of the wdt to 0 and bits cks2 to cks0 in wtcsr to appropriate values to secure the specified oscillation settling time. 3. if the dmac and dtc are operating, stop their operation. 4. if the bus is released (low-level input to breq pin), acquire the bus mastership (high-level input to breq pin). 5. after setting the stby bit in stbcr1 and th e stbymd bit in stbcr6 to 1, execute the sleep instruction. 6. software standby mode is entered and the clocks within this lsi are halted.
section 26 power-down modes page 1348 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 26.5.2 canceling software standby mode software standby mode is canceled by interrupts (nmi, irq) or a reset. (1) canceling with interrupt the wdt can be used for hot starts. when an nmi or irq interrupt (edge detection) is detected, the clock will be supplied to the entire lsi and so ftware standby mode will be canceled after the time set in the timer control/status register of the wdt has elapsed. interrupt exception handling is then executed. when the priority level of an irq interrupt is lower than the interrupt mask level set in the status register (sr) of the cpu, an interrupt request is not accepted preventing software standby mode from being canceled. when falling-edge detection is selected for the nmi pin, drive the nmi pin high before making a transition to software standby mode. when rising-edge detection is selected for the nmi pin, drive the nmi pin low before making a transition to software standby mode. similarly, when falling-edge detection is selected for the irq pin, drive the irq pin high before making a transition to software standby mode. when rising-edge detection is selected for the irq pin, drive the irq pin low before making a transition to software standby mode. (2) canceling with power-on reset software standby mode is canceled by a power-on reset with the res pin. keep the res pin low until the clock oscillation settles. (3) canceling with manual reset software standby mode is canceled by a manual reset with the mres pin. keep the mres pin low until the clock oscillation settles.
section 26 power-down modes r01uh0198ej0500 rev. 5.00 page 1349 of 1560 mar 18, 2011 sh7080 group 26.6 deep software standby mode 26.6.1 transition to deep software standby mode this lsi shifts from a program execution state to deep software standby mode by executing the sleep instruction when the stby bit in stbcr1 is 1 and the stbymd bit in stbcr6 is 0. however, deep software standby mode cannot be entered when the bus is released (low-level input to breq pin). execute the sleep instruction after halting the dmac and dtc. in deep software standby mode, not only the cpu but also the clock and on-chip peripheral modules halt. furthermore, the internal power supply of this lsi is turned off. the contents of the cpu registers and the data of the on-chip ram become undefined. the registers of on-chip peripheral modules are initia lized. for details on the pin states in deep software standby mode, refer to appendix a, pin states. the procedure for a transition to deep software standby mode is as follows: 1. clear the tme bit in the timer control register (wtcsr) of the wdt to 0 to stop the wdt. 2. if the dmac and dtc are operating, stop their operation. 3. if the bus is released (low-level input to breq pin), acquire the bus mastership (high-level input to breq pin). 4. after setting the stby bit in stbcr1 to 1 and clearing the stbymd bit in stbcr6 to 0, execute the sleep instruction. 5. deep software standby mode is entered, the clocks within this lsi are halted, and the internal power supply of this lsi is turned off. 26.6.2 canceling deep software standby mode deep software standby mode is canceled by a power-on reset with the res pin. keep the res pin low until the clock oscillation settles.
section 26 power-down modes page 1350 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 26.7 module standby mode 26.7.1 transition to module standby mode setting the mstp bits in the standby control registers (stbcr2 to stbcr5) to 1 halts the supply of clocks to the corresponding on-chip peripheral modules. this function can be used to reduce the power consumption in normal mode. do not access registers of an on -chip peripheral module which has been set to enter module standby mode. for details on the states of on-chip peripheral module registers in module standby mode, refer to section 27.3, register states in each operating mode. 26.7.2 canceling module standby function the module standby function can be canceled by clearing the mstp bits in stbcr2 to stbcr5 to 0. the module standby function can be canceled by a power-on reset for modules whose mstp bit has an initial value of 0.
section 26 power-down modes r01uh0198ej0500 rev. 5.00 page 1351 of 1560 mar 18, 2011 sh7080 group 26.8 usage note 26.8.1 current consumption while waiting fo r oscillation to be stabilized the current consumption while waiting for oscillation to be stabilized is higher than that while oscillation is stabilized. 26.8.2 executing the sleep instruction apply either of the following m easures before executing the sleep instruction to initiate the transition to sleep mode or software standby mode. measure a: stop the operation of the dmac and dtc and the generation of interrupts from on- chip peripheral modules, irq interrupts, and the nmi interrupt before executing the sleep instruction. measure b: change the value in frqcr to the initial value, h'36db, and then dummy-read frqcr twice before executin g the sleep instruction.
section 26 power-down modes page 1352 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1353 of 1560 mar 18, 2011 sh7080 group section 27 list of registers this section gives information on internal i/o regist ers. the contents of this section are as follows: 1. register address table (in the order from a lower address) ? registers are listed in the order from lower allocated addresses. ? as for reserved addresses, the register name column is indicated with ? . do not access reserved addresses. ? as for 16- or 32-bit address, the msb addresses are shown. ? the list is classified acco rding to module names. ? the numbers of access cycles are given. 2. register bit table ? bit configurations are shown in the order of the register address table. ? as for reserved bits, the bit name column is indicated with ? . ? as for the blank column of the bit names, the whole register is allocated to the counter or data. ? as for 16- or 32-bit registers, bits are indicated from the msb. 3. register state in each operating mode ? register states are listed in the or der of the register address table. ? register states in the basic operating mode are shown. as for modules including their specific states such as reset, see the sections of those modules.
section 27 list of registers page 1354 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 27.1 register address table (in the order from lower addresses) access sizes are indicated with the number of bits. access states ar e indicated with the number of specified reference clock states. these values ar e those at 8-bit access (b), 16-bit access (w), or 32-bit access (l). note: access to undefined or reserved addresse s is prohibited. correct operation cannot be guaranteed if these addresses are accessed. register name abbreviation no. of bits address module access size no. of access states connected bus width serial mode register_0 scsmr_0 8 h'ffffc000 sci 8 p reference 16 bits bit rate register_0 scbrr_0 8 h'ffffc002 (channel 0) 8 b:2 serial control register_0 scscr_0 8 h'ffffc004 8 transmit data register_0 sctdr_0 8 h'ffffc006 8 serial status register_0 scssr_0 8 h'ffffc008 8 receive data register_0 scrdr_0 8 h'ffffc00a 8 serial direction control register_0 scsdcr_0 8 h'ffffc00c 8 serial port register_0 scsptr_0 8 h'ffffc00e 8 serial mode register_1 scsmr_1 8 h'ffffc080 sci 8 bit rate register_1 scbrr_1 8 h'ffffc082 (channel 1) 8 serial control register_1 scscr_1 8 h'ffffc084 8 transmit data register_1 sctdr_1 8 h'ffffc086 8 serial status register_1 scssr_1 8 h'ffffc088 8 receive data register_1 scrdr_1 8 h'ffffc08a 8 serial direction control register_1 scsdcr_1 8 h'ffffc08c 8 serial port register_1 scsptr_1 8 h'ffffc08e 8 serial mode register_2 scsmr_2 8 h'ffffc100 sci 8 bit rate register_2 scbrr_2 8 h'ffffc102 (channel 2) 8 serial control register_2 scscr_2 8 h'ffffc104 8 transmit data register_2 sctdr_2 8 h'ffffc106 8 serial status register_2 scssr_2 8 h'ffffc108 8 receive data register_2 scrdr_2 8 h'ffffc10a 8 serial direction control register_2 scsdcr_2 8 h'ffffc10c 8 serial port register_2 scsptr_2 8 h'ffffc10e 8
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1355 of 1560 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width serial mode register_3 scsmr_3 16 h'ffffc180 scif 16 bit rate register_3 scbrr_3 8 h'ffffc182 (channel 3) 8 serial control register_3 scscr_3 16 h'ffffc184 16 p reference b:2 w:2 16 bits transmit fifo data register_3 scftdr_3 8 h'ffffc186 8 serial status register_3 scfsr_3 16 h'ffffc188 16 receive fifo data register_3 scfrdr_3 8 h'ffffc18a 8 fifo control register_3 scfcr_3 16 h'ffffc18c 16 fifo data count register_3 scfdr_3 16 h'ffffc18e 16 serial port register_3 scsptr_3 16 h'ffffc190 16 line status register_3 sclsr_3 16 h'ffffc192 16 timer control register_3 tcr_3 8 h'ffffc200 mtu2 8, 16, 32 mp reference 16 bits timer control register_4 tcr_4 8 h'ffffc201 8 b:2 timer mode register_3 tmdr_3 8 h'ffffc202 8, 16 w:2 timer mode register_4 tmdr_4 8 h'ffffc203 8 l:4 timer i/o control register h_3 tiorh_3 8 h'ffffc204 8, 16, 32 timer i/o control register l_3 tiorl_3 8 h'ffffc205 8 timer i/o control register h_4 tiorh_4 8 h'ffffc206 8, 16 timer i/o control register l_4 tiorl_4 8 h'ffffc207 8 timer interrupt enable register_3 tier_3 8 h'ffffc208 8, 16 timer interrupt enable register_4 tier_4 8 h'ffffc209 8 timer output master enable register toer 8 h'ffffc20a 8 timer gate control register tgcr 8 h'ffffc20d 8 timer output control register 1 tocr1 8 h'ffffc20e 8, 16 timer output control register 2 tocr2 8 h'ffffc20f 8 timer counter_3 tcnt_3 16 h'ffffc210 16, 32 timer counter_4 tcnt_4 16 h'ffffc212 16 timer cycle data register tcdr 16 h'ffffc214 16, 32 timer dead time data register tddr 16 h'ffffc216 16 timer general register a_3 tgra_3 16 h'ffffc218 16, 32 timer general register b_3 tgrb_3 16 h'ffffc21a 16 timer general register a_4 tgra_4 16 h'ffffc21c 16, 32
section 27 list of registers page 1356 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width timer general register b_4 tgrb_4 16 h'ffffc21e mtu2 16 mp reference 16 bits timer sub-counter tcnts 16 h'ffffc220 16, 32 b:2 timer cycle buffer register tcbr 16 h'ffffc222 16 w:2 timer general register c_3 tgrc_3 16 h'ffffc224 16, 32 l:4 timer general register d_3 tgrd_3 16 h'ffffc226 16 timer general register c_4 tgrc_4 16 h'ffffc228 16, 32 timer general register d_4 tgrd_4 16 h'ffffc22a 16 timer status register_3 tsr_3 8 h'ffffc22c 8, 16 timer status register_4 tsr_4 8 h'ffffc22d 8 timer interrupt skipping set register titcr 8 h'ffffc230 8, 16 timer interrupt skipping counter titcnt 8 h'ffffc231 8 timer buffer transfer set register tbter 8 h'ffffc232 8 timer dead time enable register tder 8 h'ffffc234 8 timer output level buffer register tolbr 8 h'ffffc236 8 timer buffer operation transfer mode register_3 tbtm_3 8 h'ffffc238 8, 16 timer buffer operation transfer mode register_4 tbtm_4 8 h'ffffc239 8 timer a/d converter start request control register tadcr 16 h'ffffc240 16 timer a/d converter start request cycle set register a_4 tadcora_4 16 h'ffffc244 16, 32 timer a/d converter start request cycle set register b_4 tadcorb_4 16 h'ffffc246 16 timer a/d converter start request cycle set buffer register a_4 tadcobra_4 16 h'ffffc248 16, 32 timer a/d converter start request cycle set buffer register b_4 tadcobrb_4 16 h'ffffc24a 16 timer waveform control register twcr 8 h'ffffc260 8 timer start register tstr 8 h'ffffc280 8, 16 timer synchronous register tsyr 8 h'ffffc281 8 timer counter synchronous start register tcsystr 8 h'ffffc282 8
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1357 of 1560 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width timer read/write enable register trwer 8 h'ffffc284 mtu2 8 mp reference 16 bits timer control register_0 tcr_0 8 h'ffffc300 8, 16, 32 b:2 timer mode register_0 tmdr_0 8 h'ffffc301 8 w:2 timer i/o control register h_0 tiorh_0 8 h'ffffc302 8, 16 l:4 timer i/o control register l_0 tiorl_0 8 h'ffffc303 8 timer interrupt enable register_0 tier_0 8 h'ffffc304 8, 16, 32 timer status register_0 tsr_0 8 h'ffffc305 8 timer counter_0 tcnt_0 16 h'ffffc306 16 timer general register a_0 tgra_0 16 h'ffffc308 16, 32 timer general register b_0 tgrb_0 16 h'ffffc30a 16 timer general register c_0 tgrc_0 16 h'ffffc30c 16, 32 timer general register d_0 tgrd_0 16 h'ffffc30e 16 timer general register e_0 tgre_0 16 h'ffffc320 16, 32 timer general register f_0 tgrf_0 16 h'ffffc322 16 timer interrupt enable register 2_0 tier2_0 8 h'ffffc324 8, 16 timer status register 2_0 tsr2_0 8 h'ffffc325 8 timer buffer operation transfer mode register_0 tbtm_0 8 h'ffffc326 8 timer control register_1 tcr_1 8 h'ffffc380 8, 16 timer mode register_1 tmdr_1 8 h'ffffc381 8 timer i/o control register_1 tior_1 8 h'ffffc382 8 timer interrupt enable register_1 tier_1 8 h'ffffc384 8, 16, 32 timer status register_1 tsr_1 8 h'ffffc385 8 timer counter_1 tcnt_1 16 h'ffffc386 16 timer general register a_1 tgra_1 16 h'ffffc388 16, 32 timer general register b_1 tgrb_1 16 h'ffffc38a 16 timer input capture control register ticcr 8 h'ffffc390 8 timer control register_2 tcr_2 8 h'ffffc400 8, 16 timer mode register_2 tmdr_2 8 h'ffffc401 8 timer i/o control register_2 tior_2 8 h'ffffc402 8 timer interrupt enable register_2 tier_2 8 h'ffffc404 8, 16, 32
section 27 list of registers page 1358 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width timer status register_2 tsr_2 8 h'ffffc405 mtu2 8 mp reference 16 bits timer counter_2 tcnt_2 16 h'ffffc406 16 b:2 timer general register a_2 tgra_2 16 h'ffffc408 16, 32 w:2 timer general register b_2 tgrb_2 16 h'ffffc40a 16 l:4 timer counter u_5 tcntu_5 16 h'ffffc480 16, 32 timer general register u_5 tgru_5 16 h'ffffc482 16 timer control register u_5 tcru_5 8 h'ffffc484 8 timer i/o control register u_5 tioru_5 8 h'ffffc486 8 timer counter v_5 tcntv_5 16 h'ffffc490 16, 32 timer general register v_5 tgrv_5 16 h'ffffc492 16 timer control register v_5 tcrv_5 8 h'ffffc494 8 timer i/o control register v_5 tiorv_5 8 h'ffffc496 8 timer counter w_5 tcntw_5 16 h'ffffc4a0 16, 32 timer general register w_5 tgrw_5 16 h'ffffc4a2 16 timer control register w_5 tcrw_5 8 h'ffffc4a4 8 timer i/o control register w_5 tiorw_5 8 h'ffffc4a6 8 timer status register_5 tsr_5 8 h'ffffc4b0 8 timer interrupt enable register_5 tier_5 8 h'ffffc4b2 8 timer start register_5 tstr_5 8 h'ffffc4b4 8 timer compare match clear register tcntcmpclr 8 h'ffffc4b6 8 timer control register_3s tcr_3s 8 h'ffffc600 mtu2s 8, 16, 32 mi reference 16 bits timer control register_4s tcr_4s 8 h'ffffc601 8 b:2 timer mode register_3s tmdr_3s 8 h'ffffc602 8, 16 w:2 timer mode register_4s tmdr_4s 8 h'ffffc603 8 l:4 timer i/o control register h_3s tiorh_3s 8 h'ffffc604 8, 16, 32 timer i/o control register l_3s tiorl_3s 8 h'ffffc605 8 timer i/o control register h_4s tiorh_4s 8 h'ffffc606 8, 16 timer i/o control register l_4s tiorl_4s 8 h'ffffc607 8 timer interrupt enable register_3s tier_3s 8 h'ffffc608 8, 16 timer interrupt enable register_4s tier_4s 8 h'ffffc609 8 timer output master enable register s toers 8 h'ffffc60a 8
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1359 of 1560 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width timer gate control register s tgcrs 8 h'ffffc60d mtu2s 8 mi reference 16 bits timer output control register 1s tocr1s 8 h'ffffc60e 8, 16 b:2 timer output control register 2s tocr2s 8 h'ffffc60f 8 w:2 timer counter_3s tcnt_3s 16 h'ffffc610 16, 32 l:4 timer counter_4s tcnt_4s 16 h'ffffc612 16 timer cycle data register s tcdrs 16 h'ffffc614 16, 32 timer dead time data register s tddrs 16 h'ffffc616 16 timer general register a_3s tgra_3s 16 h'ffffc618 16, 32 timer general register b_3s tgrb_3s 16 h'ffffc61a 16 timer general register a_4s tgra_4s 16 h'ffffc61c 16, 32 timer general register b_4s tgrb_4s 16 h'ffffc61e 16 timer sub-counter s tcntss 16 h'ffffc620 16, 32 timer cycle buffer register s tcbrs 16 h'ffffc622 16 timer general register c_3s tgrc_3s 16 h'ffffc624 16, 32 timer general register d_3s tgrd_3s 16 h'ffffc626 16 timer general register c_4s tgrc_4s 16 h'ffffc628 16, 32 timer general register d_4s tgrd_4s 16 h'ffffc62a 16 timer status register_3s tsr_3s 8 h'ffffc62c 8, 16 timer status register_4s tsr_4s 8 h'ffffc62d 8 timer interrupt skipping set register s titcrs 8 h'ffffc630 8, 16 timer interrupt skipping counter s titcnts 8 h'ffffc631 8 timer buffer transfer set register s tbters 8 h'ffffc632 8 timer dead time enable register s tders 8 h'ffffc634 8 timer output level buffer register s tolbrs 8 h'ffffc636 8 timer buffer operation transfer mode register_3s tbtm_3s 8 h'ffffc638 8, 16 timer buffer operation transfer mode register_4s tbtm_4s 8 h'ffffc639 8 timer a/d converter start request control register s tadcrs 16 h'ffffc640 16 timer a/d converter start request cycle set register a_4s tadcora_4s 16 h'ffffc644 16, 32
section 27 list of registers page 1360 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width timer a/d converter start request cycle set register b_4s tadcorb_4s 16 h'ffffc646 mtu2s 16 16 bits timer a/d converter start request cycle set buffer register a_4s tadcobra_4s 16 h'ffffc648 16, 32 mi reference b:2 w:2 l:4 timer a/d converter start request cycle set buffer register b_4s tadcobrb_4s 16 h'ffffc64a 16 timer synchronous clear register s tsycrs 8 h'ffffc650 8 timer waveform control register s twcrs 8 h'ffffc660 8 timer start register s tstrs 8 h'ffffc680 8, 16 timer synchronous register s tsyrs 8 h'ffffc681 8 timer read/write enable register s trwers 8 h'ffffc684 8 timer counter u_5s tcntu_5s 16 h'ffffc880 16, 32 timer general register u_5s tgru_5s 16 h'ffffc882 16 timer control register u_5s tcru_5s 8 h'ffffc884 8 timer i/o control register u_5s tioru_5s 8 h'ffffc886 8 timer counter v_5s tcntv_5s 16 h'ffffc890 16, 32 timer general register v_5s tgrv_5s 16 h'ffffc892 16 timer control register v_5s tcrv_5s 8 h'ffffc894 8 timer i/o control register v_5s tiorv_5s 8 h'ffffc896 8 timer counter w_5s tcntw_5s 16 h'ffffc8a0 16, 32 timer general register w_5s tgrw_5s 16 h'ffffc8a2 16 timer control register w_5s tcrw_5s 8 h'ffffc8a4 8 timer i/o control register w_5s tiorw_5s 8 h'ffffc8a6 8 timer status register_5s tsr_5s 8 h'ffffc8b0 8 timer interrupt enable register_5s tier_5s 8 h'ffffc8b2 8 timer start register_5s tstr_5s 8 h'ffffc8b4 8 timer compare match clear register s tcntcmpclrs 8 h'ffffc8b6 8 a/d data register 0 addr0 16 h'ffffc900 a/d 16 p reference 16 bits a/d data register 1 addr1 16 h'ffffc902 (channel 0) 16 b:2 a/d data register 2 addr2 16 h'ffffc904 16 w:2 a/d data register 3 addr3 16 h'ffffc906 16
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1361 of 1560 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width a/d control/status register_0 adcsr_0 16 h'ffffc910 a/d 16 p reference 16 bits a/d control register_0 adcr_0 16 h'ffffc912 (channel 0) 16 b:2 a/d data register 4 addr4 16 h'ffffc980 a/d 16 w:2 a/d data register 5 addr5 16 h'ffffc982 (channel 1) 16 a/d data register 6 addr6 16 h'ffffc984 16 a/d data register 7 addr7 16 h'ffffc986 16 a/d control/status register_1 adcs r_1 16 h'ffffc990 16, 8, 32 a/d control register_1 adcr_1 16 h'ffffc992 16 a/d data register 8 addr8 16 h'ffffca00 a/d 16 a/d data register 9 addr9 16 h'ffffca02 (channel 2) 16 a/d data register 10 addr10 16 h'ffffca04 16 a/d data register 11 addr11 16 h'ffffca06 16 a/d data register 12 addr12 16 h'ffffca08 16 a/d data register 13 addr13 16 h'ffffca0a 16 a/d data register 14 addr14 16 h'ffffca0c 16 a/d data register 15 addr15 16 h'ffffca0e 16 a/d control/status register_2 adcsr_2 16 h'ffffca10 16 a/d control register_2 adcr_2 16 h'ffffca12 16 flash code control/status regist er fccs 8 h'ffffcc00 flash 8 p reference 16 bits flash program code select register fpcs 8 h'ffffcc01 8 b:5 flash erase code select register fecs 8 h'ffffcc02 8 flash key code register fkey 8 h'ffffcc04 8 flash mat select register fmats 8 h'ffffcc05 8 flash transfer destination address register ftdar 8 h'ffffcc06 8 dtc enable register a dtcera 16 h'ffffcc80 dtc 8, 16 p reference 16 bits dtc enable register b dtcerb 16 h'ffffcc82 8, 16 b:2 dtc enable register c dtcerc 16 h'ffffcc84 8, 16 w:2 dtc enable register d dtcerd 16 h'ffffcc86 8, 16 l:4 dtc enable register e dtcere 16 h'ffffcc88 8, 16 dtc control register dtccr 8 h'ffffcc90 8 dtc vector base register dtcvbr 32 h'ffffcc94 8, 16, 32
section 27 list of registers page 1362 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width i 2 c bus control register 1 iccr1 8 h'ffffcd80 i 2 c2 8 p reference 8 bits i 2 c bus control register 2 iccr2 8 h'ffffcd81 8 b:2 i 2 c bus mode register icmr 8 h'ffffcd82 8 i 2 c bus interrupt enable register icier 8 h'ffffcd83 8 i 2 c bus status register icsr 8 h'ffffcd84 8 slave address register sar 8 h'ffffcd85 8 i 2 c bus transmit data register icdrt 8 h'ffffcd86 8 i 2 c bus receive data register icdrr 8 h'ffffcd87 8 nf2cyc register nf2cyc 8 h'ffffcd88 8 ss control register h sscrh 8 h'ffffcd00 ssu 8, 16 p reference 16 bits ss control register l sscrl 8 h'ffffcd01 8 b:2 ss mode register ssmr 8 h'ffffcd02 8, 16 w:2 ss enable register sser 8 h'ffffcd03 8 ss status register sssr 8 h'ffffcd04 8, 16 ss control register 2 sscr2 8 h'ffffcd05 8 ss transmit data register 0 sstdr0 8 h'ffffcd06 8, 16 ss transmit data register 1 sstdr1 8 h'ffffcd07 8 ss transmit data register 2 sstdr2 8 h'ffffcd08 8, 16 ss transmit data register 3 sstdr3 8 h'ffffcd09 8 ss receive data register 0 ssrdr0 8 h'ffffcd0a 8, 16 ss receive data register 1 ssrdr1 8 h'ffffcd0b 8 ss receive data register 2 ssrdr2 8 h'ffffcd0c 8, 16 ss receive data register 3 ssrdr3 8 h'ffffcd0d 8 compare match timer start register cmstr 16 h'ffffce00 cmt 8, 16, 32 p reference 16 bits compare match timer control/status register_0 cmcsr_0 16 h'ffffce02 8, 16 compare match counter_0 cmcnt_0 16 h'ffffce04 8, 16, 32 compare match constant register_0 cmcor_0 16 h'ffffce06 8, 16 b:2 w:2 l:4 compare match timer control/status register_1 cmcsr_1 16 h'ffffce08 8, 16, 32 compare match counter_1 cmcnt_1 16 h'ffffce0a 8, 16 compare match constant register_1 cmcor_1 16 h'ffffce0c 8, 16, 32
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1363 of 1560 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width input level control/status register 1 icsr1 16 h'ffffd000 poe 8, 16, 32 p reference 16 bits output level control/status register 1 ocsr1 16 h'ffffd002 8, 16 b:2 input level control/status register 2 icsr2 16 h'ffffd004 8, 16, 32 w:2 output level control/status register 2 ocsr2 16 h'ffffd006 8, 16 l:4 input level control/status register 3 icsr3 16 h'ffffd008 8, 16 software port output enable register spoer 8 h'ffffd00a 8 port output enable control register 1 poecr1 8 h'ffffd00b 8 port output enable control register 2 poecr2 16 h'ffffd00c 8, 16 port a data register h padrh 16 h'ffffd100 i/o 8, 16, 32 p reference 16 bits port a data register l padrl 16 h'ffffd102 8, 16 b:2 port a i/o register h paiorh 16 h'ffffd104 pfc 8, 16, 32 w:2 port a i/o register l paiorl 16 h'ffffd106 8, 16 l:4 port a control register h4 pacrh4 16 h'ffffd108 8, 16, 32 port a control register h3 pacrh3 16 h'ffffd10a 8, 16 port a control register h2 pacrh2 16 h'ffffd10c 8, 16, 32 port a control register h1 pacrh1 16 h'ffffd10e 8, 16 port a control register l4 pacrl4 16 h?ffffd110 8, 16, 32 port a control register l3 pacrl3 16 h?ffffd112 8, 16 port a control register l2 pacrl2 16 h?ffffd114 8, 16, 32 port a control register l1 pacrl1 16 h?ffffd116 8, 16 port a port register h paprh 16 h'ffffd11c i/o 8, 16, 32 port a port register l paprl 16 h'ffffd11e 8, 16 port b data register l pbdrl 16 h?ffffd182 8, 16 port b i/o register l pbiorl 16 h'ffffd186 pfc 8, 16 port b control register l3 pbcrl3 16 h'ffffd192 8, 16 port b control register l2 pbcrl2 16 h'ffffd194 8, 16, 32 port b control register l1 pbcrl1 16 h'ffffd196 8, 16 port b port register l pbpr l 16 h'ffffd19e i/o 8, 16 port c data register h pcdrh 16 h?ffffd200 8, 16, 32 port c data register l pcdrl 16 h?ffffd202 8, 16
section 27 list of registers page 1364 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width port c i/o register h pciorh 16 h'ffffd204 pfc 8, 16, 32 p reference 16 bits port c i/o register l pciorl 16 h'ffffd206 8, 16 b:2 port c control register h3 pccrh3 16 h'ffffd20a 8, 16 w:2 port c control register h2 pccrh2 16 h'ffffd20c 8, 16, 32 l:4 port c control register h1 pccrh1 16 h'ffffd20e 8, 16 port c control register l4 pccrl4 16 h'ffffd210 8, 16, 32 port c control register l3 pccrl3 16 h'ffffd212 8, 16 port c control register l2 pccrl2 16 h'ffffd214 8, 16, 32 port c control register l1 pccrl1 16 h'ffffd216 8, 16 port c port register h pcprh 16 h'ffffd21c i/o 8, 16, 32 port c port register l pcprl 16 h'ffffd21e 8, 16 port d data register h pddrh 16 h'ffffd280 8, 16, 32 port d data register l pddrl 16 h'ffffd282 8, 16 port d i/o register h pdiorh 16 h'ffffd284 pfc 8, 16, 32 port d i/o register l pdiorl 16 h'ffffd286 8, 16 port d control register h4 pdcrh4 16 h'ffffd288 8, 16, 32 port d control register h3 pdcrh3 16 h'ffffd28a 8, 16 port d control register h2 pdcrh2 16 h'ffffd28c 8, 16, 32 port d control register h1 pdcrh1 16 h'ffffd28e 8, 16 port d control register l4 pdcrl4 16 h'ffffd290 8, 16, 32 port d control register l3 pdcrl3 16 h'ffffd292 8, 16 port d control register l2 pdcrl2 16 h'ffffd294 8, 16, 32 port d control register l1 pdcrl1 16 h'ffffd296 8, 16 port d port register h pdprh 16 h'ffffd29c i/o 8, 16, 32 port d port register l pdprl 16 h'ffffd29e 8, 16 port e data register h pedrh 16 h'ffffd300 8, 16, 32 port e data register l pedrl 16 h'ffffd302 8, 16 port e i/o register h peiorh 16 h'ffffd304 pfc 8, 16, 32 port e i/o register l peiorl 16 h'ffffd306 8, 16 port e control register h2 pecrh2 16 h'ffffd30c 8, 16, 32 port e control register h1 pecrh1 16 h'ffffd30e 8, 16
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1365 of 1560 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width port e control register l4 pecrl4 16 h'ffffd310 pfc 8, 16, 32 p reference 16 bits port e control register l3 pecrl3 16 h'ffffd312 8, 16 b:2 port e control register l2 pecrl2 16 h'ffffd314 8, 16, 32 w:2 port e control register l1 pecrl1 16 h'ffffd316 8, 16 l:4 port e port register h peprh 16 h'ffffd31c i/o 8, 16, 32 port e port register l peprl 16 h'ffffd31e 8, 16 high-current port control register hcpcr 16 h'ffffd320 pfc 8, 16, 32 irqout function control register ifcr 16 h'ffffd322 8, 16 port f data register l pfdrl 16 h'ffffd382 i/o 8, 16 frequency control register frqcr 16 h'ffffe800 cpg 16 p reference w:2 16 bits standby control register 1 stbcr1 8 h'ffffe802 8 p reference 16 bits standby control register 2 stbcr2 8 h'ffffe804 power-down modes 8 b:2 standby control register 3 stbcr3 8 h'ffffe806 8 standby control register 4 stbcr4 8 h'ffffe808 8 standby control register 5 stbcr5 8 h'ffffe80a 8 standby control register 6 stbcr6 8 h'ffffe80c 8 watchdog timer counter wtcnt 8 h'ffffe810 8 * 1 , 16 * 2 watchdog timer control/status register wtcsr 8 h'ffffe812 wdt * 1: read * 2: write 8 * 1 , 16 * 2 p reference b:2 * 1 w:2 * 2 16 bits oscillation stop detection control register osccr 8 h'ffffe814 cpg 8 p reference b:2 16 bits ram control register ramcr 8 h'ffffe880 power-down modes 8 p reference b:2 16 bits a/d trigger select register 0 adtsr_0 16 h'ffffe890 a/d 8, 16 a/d trigger select register 1 adtsr_1 16 h'ffffe892 8, 16 p reference b:2 w:2 16 bits bus function extending register bscehr 16 h'ffffe89a bsc 8, 16 p reference b:2 w:2 16 bits
section 27 list of registers page 1366 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width interrupt control register 0 icr0 16 h'ffffe900 intc 8, 16 p reference 16 bits irq control register irqcr 16 h'ffffe902 8, 16 b:2 irq status register irqsr 16 h'ffffe904 8, 16 w:2 interrupt priority register a ipra 16 h'ffffe906 8, 16 interrupt priority register b iprb 16 h'ffffe908 8, 16 interrupt priority register c iprc 16 h'ffffe980 16 interrupt priority register d iprd 16 h'ffffe982 16 interrupt priority register e ipre 16 h'ffffe984 16 interrupt priority register f iprf 16 h'ffffe986 16 interrupt priority register h iprh 16 h'ffffe98a 16 interrupt priority register i ipri 16 h'ffffe98c 16 interrupt priority register j iprj 16 h'ffffe98e 16 interrupt priority register k iprk 16 h'ffffe990 16 interrupt priority register l iprl 16 h'ffffe992 16 interrupt priority register m iprm 16 h'ffffe994 16 dma source address register_0 sar_0 32 h'ffffeb20 dmac 16, 32 p reference 16 bits dma destination address register_0 dar_0 32 h'ffffeb24 16, 32 b:2 dma transfer count register_0 dmatcr_0 32 h'ffffeb28 16, 32 w:2 dma channel control register_0 chcr_0 32 h'ffffeb2c 8, 16, 32 l:4 dma source address register_1 sar_1 32 h'ffffeb30 16, 32 dma destination address register_1 dar_1 32 h'ffffeb34 16, 32 dma transfer count register_1 dmatcr_1 32 h'ffffeb38 16, 32 dma channel control register_1 chcr_1 32 h'ffffeb3c 8, 16, 32 dma source address register_2 sar_2 32 h'ffffeb40 16, 32 dma destination address register_2 dar_2 32 h'ffffeb44 16, 32 dma transfer count register_2 dmatcr_2 32 h'ffffeb48 16, 32 dma channel control register_2 chcr_2 32 h'ffffeb4c 8, 16, 32 dma source address register_3 sar_3 32 h'ffffeb50 16, 32 dma destination address register_3 dar_3 32 h'ffffeb54 16, 32 dma transfer count register_3 dmatcr_3 32 h'ffffeb58 16, 32 dma channel control register_3 chcr_3 32 h'ffffeb5c 8, 16, 32 dma operation register dmaor 16 h'ffffeb60 8, 16
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1367 of 1560 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width common control register cmncr 32 h'fffff000 bsc 32 b reference 16 bits cs0 space bus control register cs0bcr 32 h'fffff004 32 l:2 cs1 space bus control register cs1bcr 32 h'fffff008 32 cs2 space bus control register cs2bcr 32 h'fffff00c 32 cs3 space bus control register cs3bcr 32 h'fffff010 32 cs4 space bus control register cs4bcr 32 h'fffff014 32 cs5 space bus control register cs5bcr 32 h'fffff018 32 cs6 space bus control register cs6bcr 32 h'fffff01c 32 cs7 space bus control register cs7bcr 32 h'fffff020 32 cs8 space bus control register cs8bcr 32 h'fffff024 32 cs0 space wait control register cs0wcr 32 h'fffff028 32 cs1 space wait control register cs1wcr 32 h'fffff02c 32 cs2 space wait control register cs2wcr 32 h'fffff030 32 cs3 space wait control register cs3wcr 32 h'fffff034 32 cs4 space wait control register cs4wcr 32 h'fffff038 32 cs5 space wait control register cs5wcr 32 h'fffff03c 32 cs6 space wait control register cs6wcr 32 h'fffff040 32 cs7 space wait control register cs7wcr 32 h'fffff044 32 cs8 space wait control register cs8wcr 32 h'fffff048 32 sdram control register sdcr 32 h'fffff04c 32 refresh timer control/status register rtcsr 32 h'fffff050 32 refresh timer counter rtcnt 32 h'fffff054 32 refresh time constant register rtcor 32 h'fffff058 32 ram emulation register ramer 16 h'fffff108 flash 16 b reference w:2 16 bits break address register a bara 32 h'fffff300 ubc 32 b reference 16 bits break address mask register a bamra 32 h'fffff304 32 b:2 break bus cycle register a bbra 16 h'fffff308 16 w:2 break data register a bdra 32 h'fffff310 32 l:2 break data mask register a bdmra 32 h'fffff314 32
section 27 list of registers page 1368 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register name abbreviation no. of bits address module access size no. of access states connected bus width break address register b barb 32 h'fffff320 ubc 32 b reference 16 bits break address mask register b bamrb 32 h'fffff324 32 b:2 break bus cycle register b bbrb 16 h'fffff328 16 w:2 break data register b bdrb 32 h'fffff330 32 l:2 break data mask register b bdmrb 32 h'fffff334 32 break control register brcr 32 h'fffff3c0 32 branch source register brsr 32 h'fffff3d0 32 branch destination register brdr 32 h'fffff3d4 32 execution times break register betr 16 h'fffff3dc 16
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1369 of 1560 mar 18, 2011 sh7080 group 27.2 register bit list addresses and bit names of each on-chip peripheral module are shown below. as for 16-bit or 32-bit registers, they are shown in two or four rows. register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module scsmr_0 c/ a chr pe o/ e stop mp cks[1:0] scbrr_0 scscr_0 tie rie te re mpie teie cke[1:0] sctdr_0 scssr_0 tdre rdrf orer fer per tend mpb mpbt sci (channel 0) scrdr_0 scsdcr_0 ? ? ? ? dir ? ? ? scsptr_0 eio ? ? ? spb1io spb1dt spb0io spb0dt scsmr_1 c/ a chr pe o/ e stop mp cks[1:0] scbrr_1 scscr_1 tie rie te re mpie teie cke[1:0] sctdr_1 scssr_1 tdre rdrf orer fer per tend mpb mpbt sci (channel 1) scrdr_1 scsdcr_1 ? ? ? ? dir ? ? ? scsptr_1 eio ? ? ? spb1io spb1dt spb0io spb0dt scsmr_2 c/ a chr pe o/ e stop mp cks[1:0] scbrr_2 scscr_2 tie rie te re mpie teie cke[1:0] sctdr_2 scssr_2 tdre rdrf orer fer per tend mpb mpbt sci (channel 2) scrdr_2 scsdcr_2 ? ? ? ? dir ? ? ? scsptr_2 eio ? ? ? spb1io spb1dt spb0io spb0dt
section 27 list of registers page 1370 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module scsmr_3 ? ? ? ? ? ? ? ? c/ a chr pe o/ e stop ? cks[1:0] scbrr_3 scscr_3 ? ? ? ? ? ? ? ? tie rie te re reie ? cke[1:0] scftdr_3 scfsr_3 per[3:0] fer[3:0] er tend tdfe brk fer per rdf dr scfrdr_3 scfcr_3 ? ? ? ? ? rstrg[2:0] rtrg[1:0] ttrg[1:0] mce tfrst rfrst loop scfdr_3 ? ? ? t[4:0] ? ? ? r[4:0] scsptr_3 ? ? ? ? ? ? ? ? rtsio rtsdt ctsio ctsdt sckio sckdt spbio spbdt scif (channel 3) sclsr_3 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? orer tcr_3 cclr[2:0] ckeg[1:0] tpsc[2:0] tcr_4 cclr[2:0] ckeg[1:0] tpsc[2:0] tmdr_3 ? ? bfb bfa md[3:0] tmdr_4 ? ? bfb bfa md[3:0] mtu2 tiorh_3 iob[3:0] ioa[3:0] tiorl_3 iod[3:0] ioc[3:0] tiorh_4 iob[3:0] ioa[3:0] tiorl_4 iod[3:0] ioc[3:0] tier_3 ttge ? ? tciev tgied tgiec tgieb tgiea tier_4 ttge ttge2 ? tciev tgied tgiec tgieb tgiea toer ? ? oe4d oe4c oe3d oe4b oe4a oe3b tgcr ? bdc n p fb wf vf uf tocr1 ? psye ? ? tocl tocs olsn olsp tocr2 bf[1:0] ols3n ols3p ols2n ols2p ols1n ols1p
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1371 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module mtu2 tcnt_3 tcnt_4 tcdr tddr tgra_3 tgrb_3 tgra_4 tgrb_4 tcnts tcbr tgrc_3 tgrd_3 tgrc_4 tgrd_4 tsr_3 tcfd ? ? tcfv tgfd tgfc tgfb tgfa tsr_4 tcfd ? ? tcfv tgfd tgfc tgfb tgfa titcr t3aen 3acor[2:0] t4ven 4vcor[2:0]
section 27 list of registers page 1372 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module titcnt ? 3acnt[2:0] ? 4vcnt[2:0] tbter ? ? ? ? ? ? bte[1:0] mtu2 tder ? ? ? ? ? ? ? tder tolbr ? ? ols3n ols3p ols2n ols2p ols1n ols1p tbtm_3 ? ? ? ? ? ? ttsb ttsa tbtm_4 ? ? ? ? ? ? ttsb ttsa bf[1:0] ? ? ? ? ? ? tadcr ut4ae dt4ae ut4be dt4be ita3ae ita4ve itb3ae itb4ve tadcora_4 tadcorb_4 tadcobra_4 tadcobrb_4 twcr cce ? ? ? ? ? ? wre tstr cst4 cst3 ? ? ? cst2 cst1 cst0 tsyr sync4 sync3 ? ? ? sync2 sync1 sync0 tcsystr sch0 sch1 sch2 sch3 sch4 ? sch3s sch4s trwer ? ? ? ? ? ? ? rwe tcr_0 cclr[2:0] ckeg[1:0] tpsc[2:0] tmdr_0 ? bfe bfb bfa md[3:0] tiorh_0 iob[3:0] ioa[3:0] tiorl_0 iod[3:0] ioc[3:0] tier_0 ttge ? ? tciev tgied tgiec tgieb tgiea tsr_0 ? ? ? tcfv tgfd tgfc tgfb tgfa tcnt_0 tgra_0
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1373 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module mtu2 tgrb_0 tgrc_0 tgrd_0 tgre_0 tgrf_0 tier2_0 ttge2 ? ? ? ? ? tgief tgiee tsr2_0 ? ? ? ? ? ? tgff tgfe tbtm_0 ? ? ? ? ? ttse ttsb ttsa tcr_1 ? cclr[1:0] ckeg[1:0] tpsc[2:0] tmdr_1 ? ? ? ? md[3:0] tior_1 iob[3:0] ioa[3:0] tier_1 ttge ? tcieu tciev ? ? tgieb tgiea tsr_1 tcfd ? tcfu tcfv ? ? tgfb tgfa tcnt_1 tgra_1 tgrb_1 ticcr ? ? ? ? i2be i2ae i1be i1ae tcr_2 ? cclr[1:0] ckeg[1:0] tpsc[2:0] tmdr_2 ? ? ? ? md[3:0] tior_2 iob[3:0] ioa[3:0] tier_2 ttge ? tcieu tciev ? ? tgieb tgiea tsr_2 tcfd ? tcfu tcfv ? ? tgfb tgfa
section 27 list of registers page 1374 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module tcnt_2 tgra_2 tgrb_2 mtu2 tcntu_5 tgru_5 tcru_5 ? ? ? ? ? ? tpsc[1:0] tioru_5 ? ? ? ioc[4:0] tcntv_5 tgrv_5 tcrv_5 ? ? ? ? ? ? tpsc[1:0] tiorv_5 ? ? ? ioc[4:0] tcntw_5 tgrw_5 tcrw_5 ? ? ? ? ? ? tpsc[1:0] tiorw_5 ? ? ? ioc[4:0] tsr_5 ? ? ? ? ? cmfu5 cmfv5 cmfw5 tier_5 ? ? ? ? ? tgie5u tgie5v tgie5w tstr_5 ? ? ? ? ? cstu5 cstv5 cstw5 tcntcmpclr ? ? ? ? ? cmpclr5u cmpclr5v cmpclr5w
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1375 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module tcr_3s cclr[2:0] ckeg[1:0] tpsc[2:0] mtu2s tcr_4s cclr[2:0] ckeg[1:0] tpsc[2:0] tmdr_3s ? ? bfb bfa md[3:0] tmdr_4s ? ? bfb bfa md[3:0] tiorh_3s iob[3:0] ioa[3:0] tiorl_3s iod[3:0] ioc[3:0] tiorh_4s iob[3:0] ioa[3:0] tiorl_4s iod[3:0] ioc[3:0] tier_3s ttge ? ? tciev tgied tgiec tgieb tgiea tier_4s ttge ttge2 ? tciev tgied tgiec tgieb tgiea toers ? ? oe4d oe4c oe3d oe4b oe4a oe3b tgcrs ? bdc n p fb wf vf uf tocr1s ? psye ? ? tocl tocs olsn olsp tocr2s bf[1:0] ols3n ols3p ols2n ols2p ols1n ols1p tcnt_3s tcnt_4s tcdrs tddrs tgra_3s tgrb_3s tgra_4s tgrb_4s
section 27 list of registers page 1376 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module tcntss mtu2s tcbrs tgrc_3s tgrd_3s tgrc_4s tgrd_4s tsr_3s tcfd ? ? tcfv tgfd tgfc tgfb tgfa tsr_4s tcfd ? ? tcfv tgfd tgfc tgfb tgfa titcrs t3aen 3acor[2:0] t4ven 4vcor[2:0] titcnts ? 3acnt[2:0] ? 4vcnt[2:0] tbters ? ? ? ? ? ? bte[1:0] tders ? ? ? ? ? ? ? tder tolbrs ? ? ols3n ols3p ols2n ols2p ols1n ols1p tbtm_3s ? ? ? ? ? ? ttsb ttsa tbtm_4s ? ? ? ? ? ? ttsb ttsa bf[1:0] ? ? ? ? ? ? tadcrs ut4ae dt4ae ut4be dt4be ita3ae ita4ve itb3ae itb4ve tadcora_4s tadcorb_4s tadcobra_4s tadcobrb_4s
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1377 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module tsycrs ce0a ce0b ce0c ce0d ce1a ce1b ce2a ce2b mtu2s twcrs cce ? ? ? ? ? scc wre tstrs cst4 cst3 ? ? ? cst2 cst1 cst0 tsyrs sync4 sync3 ? ? ? sync2 sync1 sync0 trwers ? ? ? ? ? ? ? rwe tcntu_5s tgru_5s tcru_5s ? ? ? ? ? ? tpsc[1:0] tioru_5s ? ? ? ioc[4:0] tcntv_5s tgrv_5s tcrv_5s ? ? ? ? ? ? tpsc[1:0] tiorv_5s ? ? ? ioc[4:0] tcntw_5s tgrw_5s tcrw_5s ? ? ? ? ? ? tpsc[1:0] tiorw_5s ? ? ? ioc[4:0] tsr_5s ? ? ? ? ? cmfu5 cmfv5 cmfw5 tier_5s ? ? ? ? ? tgie5u tgie5v tgie5w tstr_5s ? ? ? ? ? cstu5 cstv5 cstw5 tcntcmpclrs ? ? ? ? ? cmpclr5u cmpclr5v cmpclr5w ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr0 ad1 ad0 ? ? ? ? ? ? a/d (channel 0) addr1 ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 ad1 ad0 ? ? ? ? ? ?
section 27 list of registers page 1378 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr2 ad1 ad0 ? ? ? ? ? ? a/d (channel 0) ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr3 ad1 ad0 ? ? ? ? ? ? adf adie ? ? trge ? conadf stc adcsr_0 cksl[1:0] adm[1:0] adcs ch[2:0] ? ? adst ? ? ? ? ? adcr_0 ? ? ? ? ? ? ? ? ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr4 ad1 ad0 ? ? ? ? ? ? a/d (channel 1) ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr5 ad1 ad0 ? ? ? ? ? ? ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr6 ad1 ad0 ? ? ? ? ? ? ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr7 ad1 ad0 ? ? ? ? ? ? adf adie ? ? trge ? conadf stc adcsr_1 cksl[1:0] adm[1:0] adcs ch[2:0] ? ? adst ? ? ? ? ? adcr_1 ? ? ? ? ? ? ? ? ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr8 ad1 ad0 ? ? ? ? ? ? a/d (channel 2) ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr9 ad1 ad0 ? ? ? ? ? ? ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr10 ad1 ad0 ? ? ? ? ? ? ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr11 ad1 ad0 ? ? ? ? ? ? addr12 ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 ad1 ad0 ? ? ? ? ? ?
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1379 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr13 ad1 ad0 ? ? ? ? ? ? a/d (channel 2) ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr14 ad1 ad0 ? ? ? ? ? ? ad9 ad8 ad7 ad6 ad5 ad4 ad3 ad2 addr15 ad1 ad0 ? ? ? ? ? ? adf adie ? ? trge ? conadf stc adcsr_2 cksl[1:0] adm[1:0] adcs ch[2:0] ? ? adst ? ? ? ? ? adcr_2 ? ? ? ? ? ? ? ? fccs fwe mat ? fler ? ? ? sco flash fpcs ? ? ? ? ? ? ? ppvs fecs ? ? ? ? ? ? ? epvb fkey k[7:0] fmats ms7 ms6 ms5 ms4 ms3 ms2 ms1 ms0 ftdar tder tda[6:0] dtcera15 dtcera14 dtcera 13 dtcera12 dtcera11 dtce ra10 dtcera9 dtcera8 dtcera ? ? ? ? ? ? ? ? dtc dtcerb15 dtcerb14 dtcerb 13 dtcerb12 dtcerb11 dtce rb10 dtcerb9 dtcerb8 dtcerb dtcerb7 dtcerb6 dtcerb 5 dtcerb4 dtcerb3 dtce rb2 dtcerb1 dtcerb0 dtcerc15 dtcerc14 dtcerc13 dtcerc12 ? ? ? ? dtcerc ? ? ? ? dtcerc3 dtcerc2 dtcerc1 dtcerc0 dtcerd15 dtcerd14 dtcerd13 dtcerd12 d tcerd11 dtcerd10 dtcerd9 dtcerd8 dtcerd dtcerd7 dtcerd6 dtce rd5 dtcerd4 dtcerd3 ? ? ? dtcere15 dtcere14 dtcere 13 dtcere12 dtcere11 dtce re10 dtcere9 dtcere8 dtcere dtcere7 dtcere6 dtcere5 dtcere4 ? ? ? ? dtccr ? ? ? rrs rchne ? ? err dtcvbr ? ? ? ? ? ? ? ? ? ? ? ?
section 27 list of registers page 1380 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module iccr1 ice rcvd mst trs cks[3:0] i 2 c2 iccr2 bbsy scp sdao sdaop sclo ? iicrst ? icmr mls wait ? ? bcwp bc[2:0] icier tie teie rie nakie stie acke ackbr ackbt icsr tdre tend rdrf nackf stop al/ove aas adz sar sva[6:0] fs icdrt icdrr nf2cyc ? ? ? ? ? ? ? nf2cyc sscrh mss bide ? sol solp ? css[1:0] ssu sscrl fclrm ssums sres ? ? ? dats[1:0] ssmr mls cpos cphs ? ? cks[2:0] sser te re ? ? teie tie rie ceie sssr ? orer ? ? tend tdre rdrf ce sscr2 ? ? ? tendsts scsats ssodts ? ? sstdr0 sstdr1 sstdr2 sstdr3 ssrdr0 ssrdr1 ssrdr2 ssrdr3 ? ? ? ? ? ? ? ? cmt cmstr ? ? ? ? ? ? str1 str0 ? ? ? ? ? ? ? ? cmcsr_0 cmf cmie ? ? ? ? cks[1:0] cmcnt_0 cmcor_0
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1381 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ? ? ? ? ? ? ? cmt cmcsr_1 cmf cmie ? ? ? ? cks[1:0] cmcnt_1 cmcor_1 poe3f poe2f poe1f poe0f ? ? ? pie1 poe icsr1 poe3m[1:0] poe2m[1:0] poe1m[1:0] poe0m[1:0] osf1 ? ? ? ? ? oce1 oie1 ocsr1 ? ? ? ? ? ? ? ? poe7f poe6f poe5f poe4f ? ? ? pie2 icsr2 poe7m[1:0] poe6m[1:0] poe5m[1:0] poe4m[1:0] osf2 ? ? ? ? ? oce2 oie2 ocsr2 ? ? ? ? ? ? ? ? ? ? ? poe8f ? ? poe8e pie3 icsr3 ? ? ? ? ? ? poe8m[1:0] spoer ? ? ? ? ? mtu2shiz mtu2ch0hiz mtu2ch34hiz poecr1 ? ? ? ? mtu2pe3ze mtu2pe2ze mtu2pe1ze mtu2pe0ze ? mtu2p1cze mtu2p2cze mtu2p3cze ? mtu2sp1cze mtu2sp2cze mtu2sp3cze poecr2 ? mtu2sp4cze mtu2sp5cze mtu2sp6cze ? mtu2sp7cze mtu2sp8cze mtu2sp9cze ? ? pa29dr pa28dr pa27dr pa26dr pa25dr pa24dr i/o padrh * 1 pa23dr pa22dr pa21dr pa20dr pa 19dr pa18dr pa17dr pa16dr pa15dr pa14dr pa13dr pa12dr pa11dr pa10dr pa9dr pa8dr padrl * 1 pa7dr pa6dr pa5dr pa4dr pa3dr pa2dr pa1dr pa0dr ? ? pa29ior pa28ior pa27ior pa 26ior pa25ior pa24ior pfc paiorh pa23ior pa22ior pa21ior pa20ior pa 19ior pa18ior pa17ior pa16ior paiorl pa15ior pa14ior pa13ior pa12 ior pa11ior pa10ior pa9ior pa8ior pa7ior pa6ior pa5ior pa4ior pa3ior pa2ior pa1ior pa0ior
section 27 list of registers page 1382 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ? ? ? ? ? ? ? pfc pacrh4 * 1 ? ? pa29md1 pa29md0 ? ? pa28md1 pa28md0 ? ? pa27md1 pa27md0 ? ? pa26md1 pa26md0 pacrh3 * 1 ? ? pa25md1 pa25md0 ? ? pa24md1 pa24md0 ? ? pa23md1 pa23md0 ? ? pa22md1 pa22md0 pacrh2 * 1 ? ? pa21md1 pa21md0 ? ? pa20md1 pa20md0 ? ? pa19md1 pa19md0 ? ? pa18md1 pa18md0 pacrh1 * 1 ? ? pa17md1 pa17md0 ? pa16md2 pa16md1 pa16md0 ? pa15md2 pa15md1 pa15md0 ? pa14md2 pa14md1 pa14md0 pacrl4 * 1 ? pa13md2 pa13md1 pa13md0 ? pa12md2 pa12md1 pa12md0 ? pa11md2 pa11md1 pa11md0 ? pa10md2 pa10md1 pa10md0 pacrl3 * 1 ? pa9md2 pa9md1 pa9md0 ? pa8md2 pa8md1 pa8md0 ? pa7md2 pa7md1 pa7md0 ? pa6md2 pa6md1 pa6md0 pacrl2 * 1 ? pa5md2 pa5md1 pa5md0 ? pa4md2 pa4md1 pa4md0 ? pa3md2 pa3md1 pa3md0 ? pa2md2 pa2md1 pa2md0 pacrl1 * 1 ? pa1md2 pa1md1 pa1md0 ? pa0md2 pa0md1 pa0md0 ? ? pa29pr pa28pr pa27pr pa26pr pa25pr pa24pr i/o paprh * 1 pa23pr pa22pr pa21pr pa20pr pa19pr pa18pr pa17pr pa16pr pa15pr pa14pr pa13pr pa12pr pa11pr pa10pr pa9pr pa8pr paprl * 1 pa7pr pa6pr pa5pr pa4pr pa3 pr pa2pr pa1pr pa0pr ? ? ? ? ? ? pb9dr pb8dr pbdrl * 1 pb7dr pb6dr pb5dr pb4dr pb3dr pb2dr pb1dr pb0dr ? ? ? ? ? ? pb9ior pb8ior pfc pbiorl pb7ior pb6ior pb5ior pb4ior pb3ior pb2ior pb1ior pb0ior ? ? ? ? ? ? ? ? pbcrl3 ? pb9md2 pb9md1 pb9md0 ? pb8md2 pb8md1 pb8md0 ? pb7md2 pb7md1 pb7md0 ? pb6md2 pb6md1 pb6md0 pbcrl2 ? pb5md2 pb5md1 pb5md0 ? pb4md2 pb4md1 pb4md0 pbcrl1 ? pb3md2 pb3md1 pb3md0 ? pb2md2 pb2md1 pb2md0 ? pb1md2 pb1md1 pb1md0 ? pb0md2 pb0md1 pb0md0
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1383 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ? ? ? ? ? pb9pr pb8pr i/o pbprl pb7pr pb6pr pb5pr pb4pr pb3 pr pb2pr pb1pr pb0pr ? ? ? ? ? ? pc25dr pc24dr pcdrh pc23dr pc22dr pc21dr pc20dr pc19dr pc18dr ? ? pc15dr pc14dr pc13dr pc12dr pc11dr pc10dr pc9dr pc8dr pcdrl pc7dr pc6dr pc5dr pc4dr pc3dr pc2dr pc1dr pc0dr ? ? ? ? ? ? pc25ior pc24ior pfc pciorh pc23ior pc22ior pc21ior pc20ior pc19ior pc18ior ? ? pc15ior pc14ior pc13ior pc12ior pc 11ior pc10ior pc9ior pc8ior pciorl pc7ior pc6 ior pc5ior pc4ior pc 3ior pc2ior pc1ior pc0ior ? ? ? ? ? ? ? ? pccrh3 * 1 ? ? ? pc25md0 ? ? ? pc24md0 ? ? ? pc23md0 ? ? ? pc22md0 pccrh2 * 1 ? ? ? pc21md0 ? ? ? pc20md0 ? ? ? pc19md0 ? ? ? pc18md0 pccrh1 * 1 ? ? ? ? ? ? ? ? ? ? ? pc15md0 ? ? ? pc14md0 pccrl4 ? ? ? pc13md0 ? ? ? pc12md0 ? ? ? pc11md0 ? ? ? pc10md0 pccrl3 ? ? ? pc9md0 ? ? ? pc8md0 ? ? ? pc7md0 ? ? ? pc6md0 pccrl2 ? ? ? pc5md0 ? ? ? pc4md0 ? ? ? pc3md0 ? ? ? pc2md0 pccrl1 ? ? ? pc1md0 ? ? ? pc0md0 ? ? ? ? ? ? pc25pr pc24pr i/o pcprh * 1 pc23pr pc22pr pc21pr pc20pr pc19pr pc18pr ? ? pcprl pc15pr pc14pr pc13pr pc12pr pc11pr pc10pr pc9pr pc8pr pc7pr pc6pr pc5pr pc4pr pc3pr pc2pr pc1pr pc0pr
section 27 list of registers page 1384 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module pd31dr pd30dr pd29dr pd28dr pd 27dr pd26dr pd25dr pd24dr i/o pddrh * 1 pd23dr pd22dr pd21dr pd20dr pd19dr pd18dr pd17dr pd16dr pd15dr pd14dr pd13dr pd12dr pd11dr pd10dr pd9dr pd8dr pddrl pd7dr pd6dr pd5dr pd4dr pd3dr pd2dr pd1dr pd0dr pd31ior pd30ior pd29ior pd28ior pd 27ior pd26ior pd25ior pd24ior pfc pdiorh pd23ior pd22ior pd21ior pd20ior pd 19ior pd18ior pd17ior pd16ior pd15ior pd14ior pd13ior pd12ior pd 11ior pd10ior pd9ior pd8ior pdiorl pd7ior pd6ior pd5ior pd4ior pd 3ior pd2ior pd1ior pd0ior ? ? pd31md1 pd31md0 ? ? pd30md1 pd30md0 pdcrh4 * 1 ? ? pd29md1 pd29md0 ? ? pd28md1 pd28md0 ? ? pd27md1 pd27md0 ? ? pd26md1 pd26md0 pdcrh3 * 1 ? ? pd25md1 pd25md0 ? ? pd24md1 pd24md0 ? ? pd23md1 pd23md0 ? pd22md2 pd22md1 pd22md0 pdcrh2 * 1 ? pd21md2 pd21md1 pd21md0 ? pd20md0 pd20md1 pd20md0 ? pd19md2 pd19md1 pd19md0 ? pd18md2 pd18md1 pd18md0 pdcrh1 * 1 ? pd17md2 pd17md1 pd17md0 ? pd16md2 pd16md1 pd16md0 ? ? pd15md1 pd15md0 ? ? pd14md1 pd14md0 pdcrl4 ? ? pd13md1 pd13md0 ? ? pd12md1 pd12md0 ? ? pd11md1 pd11md0 ? pd10md2 pd10md1 pd10md0 pdcrl3 ? pd9md2 pd9md1 pd9md0 ? pd8md2 pd8md1 pd8md0 ? pd7md2 pd7md1 pd7md0 ? pd6md2 pd6md1 pd6md0 pdcrl2 ? pd5md2 pd5md1 pd5md0 ? pd4md2 pd4md1 pd4md0 ? pd3md2 pd3md1 pd3md0 ? pd2md2 pd2md1 pd2md0 pdcrl1 ? pd1md2 pd1md1 pd1md0 ? pd0md2 pd0md1 pd0md0 pd31pr pd30pr pd29pr pd28pr pd27pr pd26pr pd25pr pd24pr i/o pdprh * 1 pd23pr pd22pr pd21pr pd20pr pd19pr pd18pr pd17pr pd16pr pdprl pd15pr pd14pr pd13pr pd12pr pd11pr pd10pr pd9pr pd8pr pd7pr pd6pr pd5pr pd4pr pd3pr pd2pr pd1pr pd0pr
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1385 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ? ? ? ? ? ? ? i/o pedrh * 1 ? ? pe21dr pe20dr pe19dr pe18dr pe17dr pe16dr pe15dr pe14dr pe13dr pe12dr pe11dr pe10dr pe9dr pe8dr pedrl * 1 pe7dr pe6dr pe5dr pe4dr pe3dr pe2dr pe1dr pe0dr ? ? ? ? ? ? ? ? pfc peiorh ? ? pe21ior pe20ior pe19ior pe18ior pe17ior pe16ior pe15ior pe14ior pe13ior pe12ior pe11ior pe10ior pe9ior pe8ior peiorl pe7ior pe6ior pe5ior pe4ior pe3ior pe2ior pe1ior pe0ior ? ? ? ? ? ? ? ? pecrh2 * 1 ? ? pe21md1 pe21md0 ? ? pe20md1 pe20md0 ? ? pe19md1 pe19md0 ? ? pe18md1 pe18md0 pecrh1 * 1 ? ? pe17md1 pe17md0 ? pe16md2 pe16md1 pe16md0 ? pe15md2 pe15md1 pe15md0 ? pe14md2 pe14md1 pe14md0 pecrl4 ? ? pe13md1 pe13md0 ? pe12md2 pe12md1 pe12md0 ? pe11md2 pe11md1 pe11md0 ? pe10md2 pe10md1 pe10md0 pecrl3 * 1 ? pe9md2 pe9md1 pe9md0 ? pe8md2 pe8md1 pe8md0 ? pe7md2 pe7md1 pe7md0 ? pe6md2 pe6md1 pe6md0 pecrl2 * 1 ? pe5md2 pe5md1 pe5md0 ? pe4md2 pe4md1 pe4md0 ? pe3md2 pe3md1 pe3md0 ? pe2md2 pe2md1 pe2md0 pecrl1 ? pe1md2 pe1md1 pe1md0 ? ? pe0md1 pe0md0 ? ? ? ? ? ? ? ? i/o peprh * 1 ? ? pe21pr pe20pr pe19pr pe18pr pe17pr pe16pr pe15pr pe14pr pe13pr pe12pr pe11pr pe10pr pe9pr pe8pr peprl * 1 pe7pr pe6pr pe5pr pe4pr pe3 pr pe2pr pe1pr pe0pr ? ? ? ? ? ? ? ? pfc hcpcr ? ? ? ? mzizdh mzizdl mzizeh mzizel ? ? ? ? ? ? ? ? ifcr ? ? ? ? irqmd3 irqmd2 irqmd1 irqmd0 pfdrl * 1 pf15dr pf14dr pf13dr pf12dr pf11dr pf10dr pf9dr pf8dr i/o pf7dr pf6dr pf5dr pf4dr pf3dr pf2dr pf1dr pf0dr
section 27 list of registers page 1386 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ifc[2:0] bfc[2:0] pfc[2] cpg frqcr pfc[1:0] mifc[2:0] mpfc[2:0] stbcr1 stby ? ? ? ? ? ? ? stbcr2 mstp7 mstp6 ? mstp4 mstp3 ? ? ? power-down modes stbcr3 mstp15 mstp14 mstp13 mstp12 mstp11 mstp10 ? ? stbcr4 mstp23 mstp22 mstp21 ? ? mstp18 mstp17 mstp16 stbcr5 ? ? ? ? ? ? mstp25 mstp24 stbcr6 audsrst hiz ? ? ? ? stbymd ? wtcnt wdt wtcsr tme wt/it rsts wovf iovf cks[2:0] osccr ? ? ? ? ? oscstop ? oscers cpg ramcr ? ? ? rame ? ? ? ? power-down modes trg11s[3:0] trg01s[3:0] a/d adtsr_0 trg1s[3:0] trg0s[3:0] trg2s[3:0] ? ? ? ? adtsr_1 ? ? ? ? ? ? ? ? dtlock csstp1 ? csstp2 dtbst dtsa csstp3 dtpr bscehr ? ? ? dmmtu4 dmmtu3 dmmtu2 dmmtu1 dmmtu0 bsc nmil ? ? ? ? ? ? nmie intc icr0 ? ? ? ? ? ? ? ? irq71s irq70s irq61s irq60s ir q51s irq50s irq41s irq40s irqcr irq31s irq30s irq21s irq20s ir q11s irq10s irq01s irq00s irq7l irq6l irq5l irq4l ir q3l irq2l irq1l irq0l irqsr irq7f irq6f irq5f irq4f ir q3f irq2f irq1f irq0f irq0 irq0 irq0 irq0 ir q1 irq1 irq1 irq1 ipra irq2 irq2 irq2 irq2 ir q3 irq3 irq3 irq3 irq4 irq4 irq4 irq4 ir q5 irq5 irq5 irq5 iprb irq6 irq6 irq6 irq6 ir q7 irq7 irq7 irq7 iprc dmac_0 dmac_0 dmac_0 dmac_0 dmac_1 dmac_1 dmac_1 dmac_1 dmac_2 dmac_2 dmac_2 dmac_2 dmac_3 dmac_3 dmac_3 dmac_3
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1387 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module mtu2_0 mtu2_0 mtu2_0 mtu2_0 mtu 2_0 mtu2_0 mtu2_0 mtu2_0 intc iprd mtu2_1 mtu2_1 mtu2_1 mtu2_1 mt u2_1 mtu2_1 mtu2_1 mtu2_1 mtu2_2 mtu2_2 mtu2_2 mtu2_2 mt u2_2 mtu2_2 mtu2_2 mtu2_2 ipre mtu2_3 mtu2_3 mtu2_3 mtu2_3 mt u2_3 mtu2_3 mtu2_3 mtu2_3 mtu2_4 mtu2_4 mtu2_4 mtu2_4 mt u2_4 mtu2_4 mtu2_4 mtu2_4 iprf mtu2_5 mtu2_5 mtu2_5 mtu2_5 poe(mt u2) poe(mtu2) poe(mtu2) poe(mtu2) ? ? ? ? i 2 c2 i 2 c2 i 2 c2 i 2 c2 iprh mtu2s_3 mtu2s_3 mtu2s_3 mtu2s_3 mt u2s_3 mtu2s_3 mtu2s_3 mtu2s_3 mtu2s_4 mtu2s_4 mtu2s_4 mtu2s_4 mt u2s_4 mtu2s_4 mtu2s_4 mtu2s_4 ipri mtu2s_5 mtu2s_5 mtu2s_5 mtu2s_5 poe(mtu2s) poe(mtu2s) poe(mtu2s) poe(mtu2s) cmt_0 cmt_0 cmt_0 cmt_0 cm t_1 cmt_1 cmt_1 cmt_1 iprj bsc bsc bsc bsc wdt wdt wdt wdt a/d_0,1 a/d_0,1 a/d_0,1 a/d_0,1 a/d_2 a/d_2 a/d_2 a/d_2 iprk ? ? ? ? ? ? ? ? sci_0 sci_0 sci_0 sci_0 sci_1 sci_1 sci_1 sci_1 iprl sci_2 sci_2 sci_2 sci_2 scif scif scif scif ssu ssu ssu ssu i 2 c2 i 2 c2 i 2 c2 i 2 c2 iprm ? ? ? ? ? ? ? ? dmac sar_0 dar_0 dmatcr_0
section 27 list of registers page 1388 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ? ? ? ? ? ? ? dmac do tl ? ? ? ? am al dm[1:0] sm[1:0] rs[3:0] chcr_0 dl ds tb ts[1:0] ie te de sar_1 dar_1 dmatcr_1 ? ? ? ? ? ? ? ? do tl ? ? ? ? am al dm[1:0] sm[1:0] rs[3:0] chcr_1 dl ds tb ts[1:0] ie te de sar_2 dar_2
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1389 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module dmac dmatcr_2 ? ? ? ? ? ? ? ? do tl ? ? ? ? am al dm[1:0] sm[1:0] rs[3:0] chcr_2 dl ds tb ts[1:0] ie te de sar_3 dar_3 dmatcr_3 ? ? ? ? ? ? ? ? do tl ? ? ? ? am al dm[1:0] sm[1:0] rs[3:0] chcr_3 dl ds tb ts[1:0] ie te de dmaor ? ? cms[1:0] ? ? pr[1:0] ? ? ? ? ? ae nmif dme
section 27 list of registers page 1390 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ? ? ? ? ? ? ? bsc ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmncr dmaiw[1:0] dmaiwa ? ? ? hizmem hizcnt ? ? iww[1:0] ? iwrwd[1:0] ? iwrws[1:0] ? iwrrd[1:0] ? iwrrs[1:0] ? type[2:0] ? bsz[1:0] ? cs0bcr ? ? ? ? ? ? ? ? ? ? iww[1:0] ? iwrwd[1:0] ? iwrws[1:0] ? iwrrd[1:0] ? iwrrs[1:0] ? type[2:0] ? bsz[1:0] ? cs1bcr ? ? ? ? ? ? ? ? ? ? iww[1:0] ? iwrwd[1:0] ? iwrws[1:0] ? iwrrd[1:0] ? iwrrs[1:0] ? type[2:0] ? bsz[1:0] ? cs2bcr ? ? ? ? ? ? ? ? ? ? iww[1:0] ? iwrwd[1:0] ? iwrws[1:0] ? iwrrd[1:0] ? iwrrs[1:0] ? type[2:0] ? bsz[1:0] ? cs3bcr ? ? ? ? ? ? ? ? ? ? iww[1:0] ? iwrwd[1:0] ? iwrws[1:0] ? iwrrd[1:0] ? iwrrs[1:0] ? type[2:0] ? bsz[1:0] ? cs4bcr ? ? ? ? ? ? ? ? cs5bcr ? ? iww[1:0] ? iwrwd[1:0] ? iwrws[1:0] ? iwrrd[1:0] ? iwrrs[1:0] ? type[2:0] ? bsz[1:0] ? ? ? ? ? ? ? ? ?
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1391 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ? iww[1:0] ? iwrwd[1:0] ? bsc iwrws[1:0] ? iwrrd[1:0] ? iwrrs[1:0] ? type[2:0] ? bsz[1:0] ? cs6bcr ? ? ? ? ? ? ? ? ? ? iww[1:0] ? iwrwd[1:0] ? iwrws[1:0] ? iwrrd[1:0] ? iwrrs[1:0] ? type[2:0] ? bsz[1:0] ? cs7bcr ? ? ? ? ? ? ? ? ? ? iww[1:0] ? iwrwd[1:0] ? iwrws[1:0] ? iwrrd[1:0] ? iwrrs[1:0] ? type[2:0] ? bsz[1:0] ? cs8bcr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bas ? ww[2:0] ? ? ? sw[1:0] wr[3:1] cs0wcr * 2 wr[0] wm ? ? ? ? hw[1:0] ? ? ? ? ? ? ? ? ? ? ? ben ? ? bw[1:0] ? ? ? sw[1:0] w[3:1] cs0wcr * 3 w[0] wm ? ? ? ? hw[1:0] ? ? ? ? ? ? ? ? ? ? ? ? ? ? bw[1:0] ? ? ? ? ? w[3:1] cs0wcr * 4 w[0] wm ? ? ? ? ? ? cs1wcr * 2 ? ? ? ? ? ? ? ? ? ? ? bas ? ww[2:0] ? ? ? sw[1:0] wr[3:1] wr[0] wm ? ? ? ? hw[1:0]
section 27 list of registers page 1392 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ? ? ? ? ? ? ? bsc ? ? ? bas ? ww[2:0] ? ? ? sw[1:0] wr[3:1] cs2wcr * 2 wr[0] wm ? ? ? ? hw[1:0] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? a2cl[1] cs2wcr * 5 a2cl[0] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bas ? ww[2:0] ? ? ? sw[1:0] wr[3:1] cs3wcr * 2 wr[0] wm ? ? ? ? hw[1:0] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? wtrp[1:0] ? wtrcd[1:0] ? a3cl[1] cs3wcr * 5 a3cl[0] ? ? trwl[1:0] ? wtrc[1:0] ? ? ? ? ? ? ? ? ? ? ? bas ? ww[2:0] ? ? ? sw[1:0] wr[3:1] cs4wcr * 2 wr[0] wm ? ? ? ? hw[1:0] ? ? ? ? ? ? ? ? ? ? ? ben ? ? bw[1:0] ? ? ? sw[1:0] w[3:1] cs4wcr * 3 w[0] wm ? ? ? ? hw[1:0] cs5wcr * 2 ? ? ? ? ? ? ? ? ? ? ? bas ? ww[2:0] ? ? ? sw[1:0] wr[3:1] wr[0] wm ? ? ? ? hw[1:0]
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1393 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ? ? ? ? ? ? ? bsc ? ? szsel mpxw ? ww[2:0] ? ? ? sw[1:0] wr[3:1] cs5wcr * 6 wr[0] wm ? ? ? ? hw[1:0] ? ? ? ? ? ? ? ? ? ? sa[1:0] ? ? ? ? ? ted[3:0] pcw[3:1] cs5wcr * 7 pcw[0] wm ? ? teh[3:0] ? ? ? ? ? ? ? ? ? ? ? bas ww[2:0] ? ? ? sw[1:0] wr[3:1] cs6wcr * 2 wr[0] wm ? ? ? ? hw[1:0] ? ? ? ? ? ? ? ? ? ? sa[1:0] ? ? ? ? ? ted[3:0] pcw[3:1] cs6wcr * 7 pcw[0] wm ? ? teh[3:0] ? ? ? ? ? ? ? ? ? ? mpxaw[1:0] mpxmd ? bw[1:0] ? ? ? ? ? w[3:1] cs6wcr * 8 w[0] wm ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bas ? ww[2:0] ? ? ? sw[1:0] wr[3:1] cs7wcr * 2 wr[0] wm ? ? ? ? hw[1:0] cs8wcr * 2 ? ? ? ? ? ? ? ? ? ? ? bas ? ww[2:0] ? ? ? sw[1:0] wr[3:1] wr[0] wm ? ? ? ? hw[1:0]
section 27 list of registers page 1394 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ? ? ? ? ? ? ? ? bsc ? ? ? a2row[1:0] ? a2col[1:0] ? ? ? ? rfsh rmode ? bactv sdcr ? ? ? a3row[1:0] ? a3col[1:0] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? rtcsr cmf cmie cks[2:0] rrc[2:0] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? rtcnt ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? rtcor ? ? ? ? ? ? ? ? flash ramer ? ? ? ? rams ram[2:0] baa31 baa30 baa29 baa28 baa27 baa26 baa25 baa24 ubc baa23 baa22 baa21 baa20 baa19 baa18 baa17 baa16 baa15 baa14 baa13 baa12 baa11 baa10 baa9 baa8 bara baa7 baa6 baa5 baa4 baa3 baa2 baa1 baa0 bama31 bama30 bama29 bama28 bama27 bama26 bama25 bama24 bama23 bama22 bama21 bama20 bama19 bama18 bama17 bama16 bama15 bama14 bama13 bama12 bama11 bama10 bama9 bama8 bamra bama7 bama6 bama5 bama4 bama3 bama2 bama1 bama0 bbra ? ? ? ? ? cpa[2:0] cda[1:0] ida[1:0] rwa[1:0] sza[1:0]
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1395 of 1560 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module bda31 bda30 bda29 bda28 bd a27 bda26 bda25 bda24 ubc bda23 bda22 bda21 bda20 bd a19 bda18 bda17 bda16 bda15 bda14 bda13 bda12 bd a11 bda10 bda9 bda8 bdra bda7 bda6 bda5 bda4 bd a3 bda2 bda1 bda0 bdma31 bdma30 bdma29 bdma28 bdma27 bdma26 bdma25 bdma24 bdma23 bdma22 bdma21 bdma20 bdma19 bdma18 bdma17 bdma16 bdma15 bdma14 bdma13 bdma12 bdma11 bdma10 bdma9 bdma8 bdmra bdma7 bdma6 bdma5 bdma4 bdma3 bdma2 bdma1 bdma0 bab31 bab30 bab29 bab28 bab27 bab26 bab25 bab24 bab23 bab22 bab21 bab20 bab19 bab18 bab17 bab16 bab15 bab14 bab13 bab12 bab11 bab10 bab9 bab8 barb bab7 bab6 bab5 bab4 bab3 bab2 bab1 bab0 bamb31 bamb30 bamb29 bamb28 bamb27 bamb26 bamb25 bamb24 bamb23 bamb22 bamb21 bamb20 bamb19 bamb18 bamb17 bamb16 bamb15 bamb14 bamb13 bamb12 bamb11 bamb10 bamb9 bamb8 bamrb bamb7 bamb6 bamb5 bamb4 bamb3 bamb2 bamb1 bamb0 ? ? ? ? ? cpb[2:0] bbrb cdb[1:0] idb[1:0] rwb[1:0] szb[1:0] bdb31 bdb30 bdb29 bdb28 bd b27 bdb26 bdb25 bdb24 bdb23 bdb22 bdb21 bdb20 bd b19 bdb18 bdb17 bdb16 bdb15 bdb14 bdb13 bdb12 bd b11 bdb10 bdb9 bdb8 bdrb bdb7 bdb6 bdb5 bdb4 bd b3 bdb2 bdb1 bdb0 bdmb31 bdmb30 bdmb29 bdmb28 bdmb27 bdmb26 bdmb25 bdmb24 bdmb23 bdmb22 bdmb21 bdmb20 bdmb19 bdmb18 bdmb17 bdmb16 bdmb15 bdmb14 bdmb13 bdmb12 bdmb11 bdmb10 bdmb9 bdmb8 bdmrb bdmb7 bdmb6 bdmb5 bdmb4 bdmb3 bdmb2 bdmb1 bdmb0 brcr ? ? ? ? ? ? ? ? ? ? utrgw[1:0] ubidb ? ubida ? scmfca scmfcb scmfda scmfdb pcte pcba ? ? dbea pcbb dbeb ? seq ? ? etbe
section 27 list of registers page 1396 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module svf ? ? ? bsa27 bsa26 bsa25 bsa24 ubc bsa23 bsa22 bsa21 bsa20 bsa19 bsa18 bsa17 bsa16 bsa15 bsa14 bsa13 bsa12 bsa11 bsa10 bsa9 bsa8 brsr bsa7 bsa6 bsa5 bsa4 bsa3 bsa2 bsa1 bsa0 dvf ? ? ? bda27 bda26 bda25 bda24 bda23 bda22 bda21 bda20 bd a19 bda18 bda17 bda16 bda15 bda14 bda13 bda12 bd a11 bda10 bda9 bda8 brdr bda7 bda6 bda5 bda4 bd a3 bda2 bda1 bda0 betr ? ? ? ? bet[11:8] bet[7:0] notes: 1. the bit value in the register depends on the individual product. for details, see the description of each register. 2. when the memory type of the normal space or sram with byte selection is set. 3. when the memory type of the burst rom (clock asynchronous) is set. 4. when the memory type of the burst rom (clock synchronous) is set. 5. when the memory type of the sdram is set. 6. when the memory type of the mpx-i/o is set. 7. when the memory type of the pcmcia is set. 8. when the memory type of the burst mpx-i/o is set.
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1397 of 1560 mar 18, 2011 sh7080 group 27.3 register states in each operating mode register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module scsmr_0 initialized retained initialized initialized initialized retained scbrr_0 initialized retained initialized initialized initialized retained scscr_0 initialized retained initialized initialized initialized retained sctdr_0 initialized retained initialized initialized initialized retained scssr_0 initialized retained initialized initialized initialized retained scrdr_0 initialized retained initializ ed initialized initialized retained scsdcr_0 initialized retained initialized initialized initialized retained scsptr_0 initialized retained initialized initialized initialized retained sci (channel 0) scsmr_1 initialized retained initialized initialized initialized retained scbrr_1 initialized retained initialized initialized initialized retained scscr_1 initialized retained initialized initialized initialized retained sctdr_1 initialized retained initialized initialized initialized retained scssr_1 initialized retained initialized initialized initialized retained scrdr_1 initialized retained initializ ed initialized initialized retained scsdcr_1 initialized retained initialized initialized initialized retained scsptr_1 initialized retained initialized initialized initialized retained sci (channel 1) scsmr_2 initialized retained initialized initialized initialized retained scbrr_2 initialized retained initialized initialized initialized retained scscr_2 initialized retained initialized initialized initialized retained sctdr_2 initialized retained initialized initialized initialized retained scssr_2 initialized retained initialized initialized initialized retained scrdr_2 initialized retained initializ ed initialized initialized retained scsdcr_2 initialized retained initialized initialized initialized retained scsptr_2 initialized retained initialized initialized initialized retained sci (channel 2) scsmr_3 initialized retained initialized initialized initialized retained scbrr_3 initialized retained initialized initialized initialized retained scscr_3 initialized retained initialized initialized initialized retained scftdr_3 initialized retained initialized initialized initialized retained scif (channel 3) scfsr_3 initialized retained initialized initialized initialized retained
section 27 list of registers page 1398 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module scfrdr_3 initialized retained initialized initialized initialized retained scfcr_3 initialized retained initialized initialized initialized retained scfdr_3 initialized retained initialized initialized initialized retained scsptr_3 initialized retained initialized initialized initialized retained sclsr_3 initialized retained initialized initialized initialized retained scif (channel 3) tcr_3 initialized retained initialized initialized initialized retained mtu2 tcr_4 initialized retained initialized initialized initialized retained tmdr_3 initialized retained initialized initialized initialized retained tmdr_4 initialized retained initialized initialized initialized retained tiorh_3 initialized retained initialized initialized initialized retained tiorl_3 initialized retained initialized initialized initialized retained tiorh_4 initialized retained initialized initialized initialized retained tiorl_4 initialized retained initialized initialized initialized retained tier_3 initialized retained initialized initialized initialized retained tier_4 initialized retained initialized initialized initialized retained toer initialized retained initialized initialized initialized retained tgcr initialized retained initialized initialized initialized retained tocr1 initialized retained initialized initialized initialized retained tocr2 initialized retained initialized initialized initialized retained tcnt_3 initialized retained initialized initialized initialized retained tcnt_4 initialized retained initialized initialized initialized retained tcdr initialized retained initialized initialized initialized retained tddr initialized retained initialized initialized initialized retained tgra_3 initialized retained initialized initialized initialized retained tgrb_3 initialized retained initialized initialized initialized retained tgra_4 initialized retained initialized initialized initialized retained tgrb_4 initialized retained initialized initialized initialized retained tcnts initialized retained initialized initialized initialized retained tcbr initialized retained initialized initialized initialized retained tgrc_3 initialized retained initialized initialized initialized retained tgrd_3 initialized retained initialized initialized initialized retained
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1399 of 1560 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module tgrc_4 initialized retained initialized initialized initialized retained mtu2 tgrd_4 initialized retained initialized initialized initialized retained tsr_3 initialized retained initialized initialized initialized retained tsr_4 initialized retained initialized initialized initialized retained titcr initialized retained initialized initialized initialized retained titcnt initialized retained initialized initialized initialized retained tbter initialized retained initialized initialized initialized retained tder initialized retained initialized initialized initialized retained tolbr initialized retained initialized initialized initialized retained tbtm_3 initialized retained initialized initialized initialized retained tbtm_4 initialized retained initialized initialized initialized retained tadcr initialized retained initialized initialized initialized retained tadcora_4 initialized retained initialized initialized initialized retained tadcorb_4 initialized retained initialized initialized initialized retained tadcobra_4 initialized retained initialized initialized initialized retained tadcobrb_4 initialized retained initialized initialized initialized retained twcr initialized retained initialized initialized initialized retained tstr initialized retained initialized initialized initialized retained tsyr initialized retained initialized initialized initialized retained tcsystr initialized retai ned initialized initialized initialized retained trwer initialized retained initialized initialized initialized retained tcr_0 initialized retained initialized initialized initialized retained tmdr_0 initialized retained initialized initialized initialized retained tiorh_0 initialized retained initialized initialized initialized retained tiorl_0 initialized retained initialized initialized initialized retained tier_0 initialized retained initialized initialized initialized retained tsr_0 initialized retained initialized initialized initialized retained tcnt_0 initialized retained initialized initialized initialized retained tgra_0 initialized retained initialized initialized initialized retained tgrb_0 initialized retained initialized initialized initialized retained tgrc_0 initialized retained initialized initialized initialized retained
section 27 list of registers page 1400 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module tgrd_0 initialized retained initialized initialized initialized retained mtu2 tgre_0 initialized retained initialized initialized initialized retained tgrf_0 initialized retained initialized initialized initialized retained tier2_0 initialized retained initialized initialized initialized retained tsr2_0 initialized retained initialized initialized initialized retained tbtm_0 initialized retained initialized initialized initialized retained tcr_1 initialized retained initialized initialized initialized retained tmdr_1 initialized retained initialized initialized initialized retained tior_1 initialized retained initialized initialized initialized retained tier_1 initialized retained initialized initialized initialized retained tsr_1 initialized retained initialized initialized initialized retained tcnt_1 initialized retained initialized initialized initialized retained tgra_1 initialized retained initialized initialized initialized retained tgrb_1 initialized retained initialized initialized initialized retained ticcr initialized retained initialized initialized initialized retained tcr_2 initialized retained initialized initialized initialized retained tmdr_2 initialized retained initialized initialized initialized retained tior_2 initialized retained initialized initialized initialized retained tier_2 initialized retained initialized initialized initialized retained tsr_2 initialized retained initialized initialized initialized retained tcnt_2 initialized retained initialized initialized initialized retained tgra_2 initialized retained initialized initialized initialized retained tgrb_2 initialized retained initialized initialized initialized retained tcntu_5 initialized retained initialized initialized initialized retained tgru_5 initialized retained initialized initialized initialized retained tcru_5 initialized retained initialized initialized initialized retained tioru_5 initialized retained initialized initialized initialized retained tcntv_5 initialized retained initialized initialized initialized retained tgrv_5 initialized retained initialized initialized initialized retained tcrv_5 initialized retained initialized initialized initialized retained tiorv_5 initialized retained initialized initialized initialized retained
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1401 of 1560 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module tcntw_5 initialized retained initialized initialized initialized retained mtu2 tgrw_5 initialized retained initialized initialized initialized retained tcrw_5 initialized retained initialized initialized initialized retained tiorw_5 initialized retained initialized initialized initialized retained tsr_5 initialized retained initialized initialized initialized retained tier_5 initialized retained initialized initialized initialized retained tstr5 initialized retained initialized initialized initialized retained tcntcmpclr initialized retained initialized initialized initialized retained tcr_3s initialized retained initialized initialized initialized retained mtu2s tcr_4s initialized retained initialized initialized initialized retained tmdr_3s initialized retained initialized initialized initialized retained tmdr_4s initialized retained initialized initialized initialized retained tiorh_3s initialized retained initialized initialized initialized retained tiorl_3s initialized retained initialized initialized initialized retained tiorh_4s initialized retained initialized initialized initialized retained tiorl_4s initialized retained initialized initialized initialized retained tier_3s initialized retained initialized initialized initialized retained tier_4s initialized retained initialized initialized initialized retained toers initialized retained initialized initialized initialized retained tgcrs initialized retained initialized initialized initialized retained tocr1s initialized retained initialized initialized initialized retained tocr2s initialized retained initialized initialized initialized retained tcnt_3s initialized retained initialized initialized initialized retained tcnt_4s initialized retained initialized initialized initialized retained tcdrs initialized retai ned initialized initialized initialized retained tddrs initialized retai ned initialized initialized initialized retained tgra_3s initialized retained initialized initialized initialized retained tgrb_3s initialized retained initialized initialized initialized retained tgra_4s initialized retained initialized initialized initialized retained tgrb_4s initialized retained initialized initialized initialized retained tcntss initialized retained initialized initialized initialized retained
section 27 list of registers page 1402 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module tcbrs initialized retained initialized initialized initialized retained mtu2s tgrc_3s initialized retained initialized initialized initialized retained tgrd_3s initialized retained initialized initialized initialized retained tgrc_4s initialized retained initialized initialized initialized retained tgrd_4s initialized retained initialized initialized initialized retained tsr_3s initialized retained initialized initialized initialized retained tsr_4s initialized retained initialized initialized initialized retained titcrs initialized retained initialized initialized initialized retained titcnts initialized retained initialized initialized initialized retained tbters initialized retained initialized initialized initialized retained tders initialized retained initialized initialized initialized retained tolbrs initialized retained initialized initialized initialized retained tbtm_3s initialized retained initialized initialized initialized retained tbtm_4s initialized retained initialized initialized initialized retained tadcrs initialized retai ned initialized initialized initialized retained tadcora_4s initialized retained initialized initialized initialized retained tadcorb_4s initialized retained initialized initialized initialized retained tadcobra_4s initialized retained initialized initialized initialized retained tadcobrb_4s initialized retained initialized initialized initialized retained tsycrs initialized retained initialized initialized initialized retained twcrs initialized retained initialized initialized initialized retained tstrs initialized retained initialized initialized initialized retained tsyrs initialized retained initialized initialized initialized retained trwers initialized retained initialized initialized initialized retained tcntu_5s initialized retained initialized initialized initialized retained tgru_5s initialized retained initialized initialized initialized retained tcru_5s initialized retained initialized initialized initialized retained tioru_5s initialized retained initialized initialized initialized retained tcntv_5s initialized retained initialized initialized initialized retained tgrv_5s initialized retained initialized initialized initialized retained tcrv_5s initialized retained initialized initialized initialized retained
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1403 of 1560 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module tiorv_5s initialized retained initialized initialized initialized retained mtu2s tcntw_5s initialized retained initialized initialized initialized retained tgrw_5s initialized retained initialized initialized initialized retained tcrw_5s initialized retained initialized initialized initialized retained tiorw_5s initialized retained initialized initialized initialized retained tsr_5s initialized retained initialized initialized initialized retained tier_5s initialized retained initialized initialized initialized retained tstr_5s initialized retained initialized initialized initialized retained tcntcmpclrs initialized retained initialized initialized initialized retained addr0 initialized retained in itialized initialized initialized retained a/d (channel 0) addr1 initialized retai ned initialized initialized initialized retained addr2 initialized retai ned initialized initialized initialized retained addr3 initialized retai ned initialized initialized initialized retained adcsr_0 initialized retained initialized initialized initialized retained adcr_0 initialized retained initialized initialized initialized retained addr4 initialized retained in itialized initialized initialized retained a/d (channel 1) addr5 initialized retai ned initialized initialized initialized retained addr6 initialized retai ned initialized initialized initialized retained addr7 initialized retai ned initialized initialized initialized retained adcsr_1 initialized retained initialized initialized initialized retained adcr_1 initialized retained initialized initialized initialized retained addr8 initialized retained in itialized initialized initialized retained a/d (channel 2) addr9 initialized retai ned initialized initialized initialized retained addr10 initialized retained initialized initialized initialized retained addr11 initialized retained initialized initialized initialized retained addr12 initialized retained initialized initialized initialized retained addr13 initialized retained initialized initialized initialized retained addr14 initialized retained initialized initialized initialized retained addr15 initialized retained initialized initialized initialized retained adcsr_2 initialized retained initialized initialized initialized retained adcr_2 initialized retained initialized initialized initialized retained
section 27 list of registers page 1404 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module fccs initialized retained initialized initialized initialized retained flash fpcs initialized retained initialized initialized initialized retained fecs initialized retained initialized initialized initialized retained fkey initialized retai ned initialized initialized initialized retained fmats initialized retained initialized initialized initialized retained ftdar initialized retained initialized initialized initialized retained dtcera initialized retained retained initialized retained retained dtc dtcerb initialized retained retained initialized retained retained dtcerc initialized retained retained initialized retained retained dtcerd initialized retained retained initialized retained retained dtcere initialized retained retained initialized retained retained dtccr initialized retained retained initialized retained retained dtcvbr initialized retained retained initialized retained retained iccr1 initialized retained retai ned initialized retained retained i 2 c2 iccr2 initialized retained retai ned initialized retained retained icmr initialized retained retained initialized retained retained icier initialized retained retained initialized retained retained icsr initialized retained retained initialized retained retained sar initialized retained retained initialized retained retained icdrt initialized retained retai ned initialized retained retained icdrr initialized retained retained initialized retained retained nf2cyc initialized retained retained initialized retained retained sscrh initialized retained initialized initialized initialized retained ssu sscrl initialized retained initialized initialized initialized retained ssmr initialized retained initialized initialized initialized retained sser initialized retai ned initialized initialized initialized retained sssr initialized retai ned initialized initialized initialized retained sscr2 initialized retained initialized initialized initialized retained sstdr0 initialized retained initialized initialized initialized retained sstdr1 initialized retained initialized initialized initialized retained sstdr2 initialized retained initialized initialized initialized retained
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1405 of 1560 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module sstdr3 initialized retained initialized initialized initialized retained ssu ssrdr0 initialized retai ned initialized initialized initialized retained ssrdr1 initialized retai ned initialized initialized initialized retained ssrdr2 initialized retai ned initialized initialized initialized retained ssrdr3 initialized retai ned initialized initialized initialized retained cmstr initialized retained initialized initialized initialized retained cmt cmcsr_0 initialized retained initialized initialized initialized retained cmcnt_0 initialized retained initialized initialized initialized retained cmcor_0 initialized retained initialized initialized initialized retained cmcsr_1 initialized retained initialized initialized initialized retained cmcnt_1 initialized retained initialized initialized initialized retained cmcor_1 initialized retained initialized initialized initialized retained icsr1 initialized retained retained initialized ? retained poe ocsr1 initialized retained retained initialized ? retained icsr2 initialized retained retained initialized ? retained ocsr2 initialized retained retained initialized ? retained icsr3 initialized retained retained initialized ? retained spoer initialized retained retained initialized ? retained poecr1 initialized retained retained initialized ? retained poecr2 initialized retained retained initialized ? retained padrh initialized retai ned retained initialized ? retained i/o padrl initialized retained retained initialized ? retained paiorh initialized retained retained initialized ? retained pfc paiorl initialized retained retained initialized ? retained pacrh4 initialized retai ned retained initialized ? retained pacrh3 initialized retai ned retained initialized ? retained pacrh2 initialized retai ned retained initialized ? retained pacrh1 initialized retai ned retained initialized ? retained pacrl4 initialized retained retained initialized ? retained pacrl3 initialized retained retained initialized ? retained
section 27 list of registers page 1406 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module pacrl2 initialized retained retained initialized ? retained pfc pacrl1 initialized retained retained initialized ? retained paprh initialized retained retained initialized ? retained i/o paprl initialized retai ned retained initialized ? retained pbdrl initialized retained retained initialized ? retained pbiorl initialized retained retained initialized ? retained pfc pbcrl3 initialized retained retained initialized ? retained pbcrl2 initialized retained retained initialized ? retained pbcrl1 initialized retained retained initialized ? retained pbprl initialized retai ned retained initialized ? retained i/o pcdrh initialized retai ned retained initialized ? retained pcdrl initialized retai ned retained initialized ? retained pciorh initialized retained retained initialized ? retained pfc pciorl initialized retained retained initialized ? retained pccrh3 initialized retai ned retained initialized ? retained pccrh2 initialized retai ned retained initialized ? retained pccrh1 initialized retai ned retained initialized ? retained pccrl4 initialized retained retained initialized ? retained pccrl3 initialized retained retained initialized ? retained pccrl2 initialized retained retained initialized ? retained pccrl1 initialized retained retained initialized ? retained pcprh initialized retained retained initialized ? retained i/o pcprl initialized retained retained initialized ? retained pddrh initialized retai ned retained initialized ? retained pddrl initialized retai ned retained initialized ? retained pdiorh initialized retained retained initialized ? retained pfc pdiorl initialized retained retained initialized ? retained pdcrh4 initialized retai ned retained initialized ? retained pdcrh3 initialized retai ned retained initialized ? retained pdcrh2 initialized retai ned retained initialized ? retained pdcrh1 initialized retai ned retained initialized ? retained
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1407 of 1560 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module pdcrl4 initialized retained retained initialized ? retained pfc pdcrl3 initialized retained retained initialized ? retained pdcrl2 initialized retained retained initialized ? retained pdcrl1 initialized retained retained initialized ? retained pdprl initialized retained retained initialized ? retained i/o pedrh initialized retai ned retained initialized ? retained pedrl initialized retained retained initialized ? retained peiorh initialized retained retained initialized ? retained pfc peiorl initialized retained retained initialized ? retained pecrh2 initialized retai ned retained initialized ? retained pecrh1 initialized retai ned retained initialized ? retained pecrl4 initialized retained retained initialized ? retained pecrl3 initialized retained retained initialized ? retained pecrl2 initialized retained retained initialized ? retained pecrl1 initialized retained retained initialized ? retained peprh initialized retained retained initialized ? retained i/o peprl initialized retai ned retained initialized ? retained hcpcr initialized retained retained initialized ? retained pfc ifcr initialized retained retained initialized ? retained pfdrl initialized retained retained initialized ? retained i/o frqcr initialized * 1 retained retained initialized ? retained cpg stbcr1 initialized retained retained initialized ? retained stbcr2 initialized retained retained initialized ? retained power-down modes stbcr3 initialized retained retained initialized ? retained stbcr4 initialized retained retained initialized ? retained stbcr5 initialized retained retained initialized ? retained stbcr6 initialized retained retained initialized ? retained wtcnt initialized * 1 retained retained initialized ? retained wdt wtcsr initialized * 1 retained retained initialized ? retained osccr initialized * 2 retained retained * 3 initialized ? retained cpg
section 27 list of registers page 1408 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module ramcr initialized retained retained initialized ? retained power-down modes adtsr_0 initialized retained retained initialized retained retained a/d adtsr_1 initialized retained retained initialized retained retained bscehr initialized retained retained initialized ? retained bsc icr0 initialized initialized retained initialized ? retained intc irqcr initialized initialized retained initialized ? retained irqsr initialized initialized retained initialized ? retained ipra initialized initialized retained initialized ? retained iprb initialized initialized retained initialized ? retained iprc initialized initialized retained initialized ? retained iprd initialized initialized retained initialized ? retained ipre initialized initialized retained initialized ? retained iprf initialized initialized retained initialized ? retained iprh initialized initialized retained initialized ? retained ipri initialized initialized retained initialized ? retained iprj initialized initialized retained initialized ? retained iprk initialized initialized retained initialized ? retained iprl initialized initialized retained initialized ? retained iprm initialized initialized retained initialized ? retained sar_0 initialized retained retained initialized retained retained dmac dar_0 initialized retained retained initialized retained retained dmatcr_0 initialized retained retained initialized retained retained chcr_0 initialized retained retained initialized retained retained sar_1 initialized retained retained initialized retained retained dar_1 initialized retained retained initialized retained retained dmatcr_1 initialized retained retained initialized retained retained chcr_1 initialized retained retained initialized retained retained sar_2 initialized retained retained initialized retained retained dar_2 initialized retained retained initialized retained retained dmatcr_2 initialized retained retained initialized retained retained
section 27 list of registers r01uh0198ej0500 rev. 5.00 page 1409 of 1560 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module chcr_2 initialized retained retained in itialized retained retained dmac sar_3 initialized retained retained initialized retained retained dar_3 initialized retained retained initialized retained retained dmatcr_3 initialized retained retained initialized retained retained chcr_3 initialized retained retained initialized retained retained dmaor initialized retained retained initialized retained retained cmncr initialized retai ned retained initialized ? retained bsc cs0bcr initialized retained retained initialized ? retained cs1bcr initialized retained retained initialized ? retained cs2bcr initialized retained retained initialized ? retained cs3bcr initialized retained retained initialized ? retained cs4bcr initialized retained retained initialized ? retained cs5bcr initialized retained retained initialized ? retained cs6bcr initialized retained retained initialized ? retained cs7bcr initialized retained retained initialized ? retained cs8bcr initialized retained retained initialized ? retained cs0wcr initialized retained retained initialized ? retained cs1wcr initialized retained retained initialized ? retained cs2wcr initialized retained retained initialized ? retained cs3wcr initialized retained retained initialized ? retained cs4wcr initialized retained retained initialized ? retained cs5wcr initialized retained retained initialized ? retained cs6wcr initialized retained retained initialized ? retained cs7wcr initialized retained retained initialized ? retained cs8wcr initialized retained retained initialized ? retained sdcr initialized retai ned retained initialized ? retained rtcsr initialized retained retained initialized ? retained rtcnt initialized retained retained initialized ? retained rtcor initialized retained retained initialized ? retained ramer initialized initialized retained initialized retained retained flash
section 27 list of registers page 1410 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group register abbreviation power-on reset manual reset software standby deep software standby module standby sleep module bara initialized retained retained initialized initialized retained ubc bamra initialized retained retained initialized initialized retained bbra initialized retained retained initialized initialized retained bdra * 4 initialized retained retained initialized initialized retained bdmra * 4 initialized retained retained initialized initialized retained barb initialized retained retained initialized initialized retained bamrb initialized retained retained initialized initialized retained bbrb initialized retained retained initialized initialized retained bdrb * 4 initialized retained retained initialized initialized retained bdmrb * 4 initialized retained retained initialized initialized retained brcr initialized retained retained initialized initialized retained brsr * 4 initialized initialized retained initialized initialized retained brdr * 4 initialized initialized retained initialized initialized retained betr * 4 initialized retained retained initialized initialized retained notes: 1. not initialized by a wdt power-on reset. 2. the oscstop bit is not initialized by a wdt power-on reset. 3. the oscstop bit is initialized. 4. only in f-ztat version.
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1411 of 1560 mar 18, 2011 sh7080 group section 28 electrical characteristics 28.1 absolute maximum ratings table 28.1 lists the absolute maximum ratings. table 28.1 absolute maximum ratings item symbol value unit power supply voltage v cc ? 0.3 to + 7.0 v input voltage (except analog input pins and scl and sda pins) v in ? 0.3 to v cc + 0.3 v input voltage (scl and sda pins) v in ? 0.3 to + 7.0 v analog power supply voltage av cc ? 0.3 to + 7.0 v analog reference voltage av ref ? 0.3 to av cc + 0.3 v analog input voltage v an ? 0.3 to av cc + 0.3 v operating temperature consumer applications t opr ? 20 to + 85 c industrial applications ? 40 to + 85 c storage temperature t stg ? 55 to + 125 c [operating precautions] operating the lsi in excess of the absolute maximum ratings may result in permanent damage.
section 28 electrical characteristics page 1412 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 28.2 dc characteristics tables 28.2 and 28.3 list dc characteristics. table 28.2 dc characteristics conditions: v cc = 3.0 v to 3.6 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. typ. max. unit test conditions res , mres , nmi, fwe, md1, md0, asemd0 , extal v cc ? 0.5 ? v cc +0.3 v analog ports 2.2 ? av cc +0.3 v input high-level voltage (except schmitt trigger input voltage) other input pins v ih 2.2 ? v cc +0.3 v res , mres , nmi, fwe, md1, md0, asemd0 , extal ? 0.3 ? 0.5 v input low-level voltage (except schmitt trigger input voltage) other input pins v il ? 0.3 ? 0.8 v v t+ v cc ? 0.5 ? ? v v t? ? ? 0.5 v schmitt trigger input voltage irq7 to irq0, poe8 to poe0 , tclka to tclkd, tioc0a to tioc0d, tioc1a, tioc1b, tioc2a, tioc2b, tioc3a to tioc3d, tioc4a to tioc4d, tic5u, tic5v, tic5w, tioc3as to tioc3ds, tioc4as to tioc4ds, tic5us, tic5vs, tic5ws, sck0 to sck3, rxd0 to rxd3, cts3 , ssck, scs , ssi, sso, scl, sda v t+ ?v t? 0.2 ? ? v input leak current all input pins (except asemd0 ) | i in | ? ? 1.0 a
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1413 of 1560 mar 18, 2011 sh7080 group item symbol min. typ. max. unit test conditions input pull-up mos current asemd0 ?i pu ? ? 350 a v in = 0 v three-state leak current (off state) ports a, b, c, d, e | i tsi | ? ? 1.0 a v cc ? 0.5 ? ? v i oh = ?200 a all output pins (expect pb2, pb3 in sh7084/ sh7085/sh7086) v cc ? 1.0 ? ? v i oh = ?1 ma pb2, pb3 (only sh7084/sh7085/ sh7086) 1.0 ? ? v i oh = ?200 a tioc3b, tioc3d, tioc4a to tioc4d, tioc3bs, tioc3ds, tioc4as to tioc4ds v cc ? 1.0 ? ? v i oh = ?5 ma output high- level voltage pd9, pd11 to pd15, pd24 to pd29, pe9, pe11 to pe21 v oh v cc ? 2.0 ? ? v i oh = ?5 ma all output pins ? ? 0.4 v i ol = 1.6 ma ? ? 0.4 v i ol = 3 ma scl, sda ? ? 0.5 v i ol = 8 ma tioc3b, tioc3d, tioc4a to tioc4d, tioc3bs, tioc3ds, tioc4as to tioc4ds ? ? 0.9 v i ol = 15 ma output low- level voltage pd9, pd11 to pd15, pd24 to pd29, pe9, pe11 to pe21 v ol ? ? 2.0 v i ol = 15 ma input capacitance all input pins c in ? ? 20 pf v in = 0 v f = 1 mhz ta = 25 c supply current normal operation i cc ? 100 (150) * 135 (165) * ma i = 80 mhz b = 40 mhz p = 40 mhz mp = 40 mhz mi = 80 mhz
section 28 electrical characteristics page 1414 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group item symbol min. typ. max. unit test conditions sleep ? 65 (140) * 110 (150) * ma b = 40 mhz p = 40 mhz mp = 40 mhz mi = 80 mhz ? 10 (20) * 40 (60) * ma t a 50 c software standby ? ? 80 (120) * ma 50 c < t a ? 5 (20) * 30 (50) * a t a 50 c supply current deep software standby i cc ? ? 80 (120) * a 50 c < t a during a/d conversion ? 2 3.5 ma waiting for a/d conversion ? ? 1 ma analog power supply current (except sh7084) standby ai cc ? ? 10 a the value per a/d converter module. during a/d conversion ? ? 2.5 ma waiting for a/d conversion ? ? 2.5 ma reference power supply current (except sh7084) standby ai ref ? ? 10 a the value per a/d converter module. during a/d conversion ? 3 6 ma waiting for a/d conversion ? ? 3.5 ma analog power supply current (sh7084) standby ai cc ? ? 10 a the value per a/d converter module. ram standby voltage vram 2.0 ? ? v v cc [operating precautions] 1. when the a/d converter is not used, do not leave the av cc , av ss and av ref pins open. 2. the supply current was measured when v ih (min.) = v cc ? 0.5 v, v il (max.) = 0.5 v, with all output pins unloaded. note: * f-ztat version supporting full functions of e10a.
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1415 of 1560 mar 18, 2011 sh7080 group table 28.3 dc characteristics conditions: v cc = 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. typ. max. unit test conditions res , mres , nmi, fwe, md1, md0, asemd0 , extal v ih v cc ? 0.7 ? v cc +0.3 v analog ports 2.2 ? av cc +0.3 v input high-level voltage (except schmitt trigger input voltage) other input pins 2.2 ? v cc +0.3 v res , mres , nmi, fwe, md1, md0, asemd0 , extal ? 0.3 ? 0.5 v input low-level voltage (except schmitt trigger input voltage) other input pins v il ? 0.3 ? 0.8 v v t+ v cc ? 0.5 ? ? v v t? ? ? 1.0 v schmitt trigger input voltage irq7 to irq0, poe8 to poe0 , tclka to tclkd, tioc0a to tioc0d, tioc1a, tioc1b, tioc2a, tioc2b, tioc3a to tioc3d, tioc4a to tioc4d, tic5u, tic5v, tic5w, tioc3as to tioc3ds, tioc4as to tioc4ds, tic5us, tic5vs, tic5ws, sck0 to sck3, rxd0 to rxd3, cts3 , ssck, scs , ssi, sso, scl, sda v t+ ?v t? 0.4 ? ? v input leak current all input pins (except asemd0 ) | i in | ? ? 1.0 a input pull-up mos current asemd0 ?i pu ? ? 800 a v in = 0 v
section 28 electrical characteristics page 1416 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group item symbol min. typ. max. unit test conditions three-state leak current (off state) ports a, b, c, d, e | i tsi | ? ? 1.0 a v cc ? 0.5 ? ? v i oh = ?200 a all output pins (expect pb2, pb3 in sh7084/ sh7085/sh7086) v cc ? 1.0 ? ? v i oh = ?1 ma pb2, pb3 (only sh7084/sh7085/ sh7086) 1.0 ? ? v i oh = ?200 a tioc3b, tioc3d, tioc4a to tioc4d, tioc3bs, tioc3ds, tioc4as to tioc4ds v cc ? 1.0 ? ? v i oh = ?5 ma output high- level voltage pd9, pd11 to pd15, pd24 to pd29, pe9, pe11 to pe21 v oh v cc ? 2.0 ? ? v i oh = ?5 ma all output pins ? ? 0.4 v i ol = 1.6 ma ? ? 0.4 v i ol = 3 ma scl, sda ? ? 0.5 v i ol = 8 ma tioc3b, tioc3d, tioc4a to tioc4d, tioc3bs, tioc3ds, tioc4as to tioc4ds ? ? 1.4 v i ol = 15 ma output low- level voltage pd9, pd11 to pd15, pd24 to pd29, pe9, pe11 to pe21 v ol ? ? 1.5 v i ol = 15 ma input capacitance all input pins c in ? ? 20 pf v in = 0 v f = 1 mhz ta = 25 c supply current normal operation i cc ? 100 (150) * 135 (165) * ma i = 80 mhz b = 40 mhz p = 40 mhz mp = 40 mhz mi = 80 mhz
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1417 of 1560 mar 18, 2011 sh7080 group item symbol min. typ. max. unit measurement conditions sleep ? 65 (140) * 110 (150) * ma b = 40 mhz p = 40 mhz mp = 40 mhz mi = 80 mhz software standby ? 10 (20) * 40 (60) * ma t a 50 c ? ? 80 (120) * ma 50 c < t a ? 5 (20) * 30 (50) * a t a 50 c supply current deep software standby i cc ? ? 80 (120) * a 50 c < t a during a/d conversion ? 2 3.5 ma waiting for a/d conversion ? ? 1 ma analog power supply current (except sh7084) standby ai cc ? ? 10 a the value per a/d converter module. during a/d conversion ? ? 2.5 ma waiting for a/d conversion ? ? 2.5 ma reference power supply current (except sh7084) standby ai ref ? ? 10 a the value per a/d converter module. during a/d conversion ? 3 6 ma waiting for a/d conversion ? ? 3.5 ma analog power supply current (sh7084) standby ai cc ? ? 10 a the value per a/d converter module. ram standby voltage vram 2.0 ? ? v v cc [operating precautions] 1. when the a/d converter is not used, do not leave the av cc , av ss and av ref pins open. 2. the supply current was measured when v ih (min.) = v cc ? 0.5 v, v il (max.) = 0.5 v, with all output pins unloaded. note: * f-ztat version supporting full functions of e10a.
section 28 electrical characteristics page 1418 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table 28.4 permitted output current values conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. typ. max. unit output low-level permissible current (per pin) i ol ? ? 2.0 * ma output low-level permissible current (total) i ol ? ? 80 ma output high-level permissible current (per pin) ?i oh ? ? 2.0 * ma output high-level permissible current (total) ?i oh ? ? 25 ma [operating precautions] to assure lsi reliability, do not exceed the output values listed in table 28.4. note: * i ol = 15 ma (max.)/?i oh = 5 ma (max.) about pins pd9, pd11 to pd15, pd24 to pd29, pe9, and pe11 to pe21. i ol = 8 ma (max.) about pins scl and sda. however, at most three pins are permitted to have simultaneously i ol /?i oh > 2.0 ma among these pins.
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1419 of 1560 mar 18, 2011 sh7080 group 28.3 ac characteristics signals input to this lsi are basically handled as signals in synchronization with a clock. the setup and hold times for input pins must be followed. table 28.5 maximum operating frequency conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. typ. max. unit remarks cpu (i ) 10 ? 80 external bus (b ) 10 ? 40 operating frequency peripheral module (p ) f 10 ? 40 mhz mtu2 (mp ) 10 ? 40 mtu2s (mi ) 10 ? 80
section 28 electrical characteristics page 1420 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 28.3.1 clock timing table 28.6 clock timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure extal clock input frequency f ex 5 12.5 mhz extal clock input cycle time t excyc 80 200 ns extal clock input low pulse width t exl 20 ? ns extal clock input high pulse width t exh 20 ? ns extal clock input rise time t exr ? 5 ns extal clock input fall time t exf ? 5 ns figure 28.1 ck clock output frequency f op 10 40 mhz ck clock output cycle time t cyc 25 100 ns ck clock output low pulse width t ckl 1/2t cyc ? 7.5 ? ns ck clock output high pulse width t ckh 1/2t cyc ? 7.5 ? ns ck clock output rise time t ckr ? 5 ns ck clock output fall time t ckf ? 5 ns figure 28.2 power-on oscillation settling time t osc1 10 ? ms figure 28.3 standby return oscillation settling time 1 t osc2 10 ? ms figure 28.4 standby return oscillation settling time 2 t osc3 10 ? ms figure 28.5 t exh t exf t exr t exl t excyc v ih v ih v ih 1/2 v cc 1/2 v cc v il v il extal (input) figure 28.1 extal clock input timing
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1421 of 1560 mar 18, 2011 sh7080 group t cyc t ckl t ckh v oh 1/2v cc ck (output) 1/2v cc t ckr t ckf v oh v ol v ol v oh figure 28.2 ck clock output timing v cc (min.) t resw t ress t osc1 v cc res ck, internal clock oscillation settling time note: oscillation settling time when on-chip oscillator is used. figure 28.3 power-on oscillation settling timing standby period t osc2 t resw , t mresw res , mres ck, internal clock oscillation settling time note: oscillation settling time when on-chip oscillator is used. figure 28.4 oscillation settling timing on return from standby (return by reset)
section 28 electrical characteristics page 1422 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group standby period ck, internal clock oscillation settling time note: oscillation settling time when on-chip oscillator is used. t osc3 nmi, irq figure 28.5 oscillation settling timing on return from standby (return by nmi or irq)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1423 of 1560 mar 18, 2011 sh7080 group 28.3.2 control signal timing table 28.7 control signal timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure res pulse width t resw 20 * 2 ? t bcyc * 4 figures 28.3, 28.4, res setup time * 1 t ress 65 ? ns 28.6, 28.7 res hold time t resh 15 ? ns mres pulse width t mresw 20 * 3 ? t bcyc * 4 mres setup time * 1 t mress 25 ? ns mres hold time t mresh 15 ? ns md1, md0, fwe setup time t mds 20 ? t bcyc * 4 figure 28.6 breq setup time t breqs 1/2t bcyc + 15 ? ns figure 28.9 breq hold time t breqh 1/2t bcyc + 10 ? ns nmi setup time * 1 t nmis 60 ? ns figure 28.7 nmi hold time t nmih 10 ? ns irq7 to irq0 setup time * 1 t irqs 35 ? ns irq7 to irq0 hold time t irqh 35 ? ns irqout output delay time t irqod ? 100 ns figure 28.8 back delay time t backd ? 1/2t bcyc + 20 ns figures 28.9, 28.10 bus tri-state delay time t boff 0 100 ns bus buffer on time t bon 0 100 ns notes: 1. the res , mres , nmi, breq , and irq7 to irq0 signals are asynchronous signals. when the setup time is satisfied, change of signal level is detected at the rising edge of the clock. if not, the detection is delayed until the next rising edge of the clock. 2. in standby mode, t resw = t osc2 (10 ms). 3. in standby mode, t mresw = t osc2 (10 ms). 4. t bcyc indicates external bus clock cycle time (b = ck).
section 28 electrical characteristics page 1424 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group t ress t mds t ress t resw ck md1, md0, fwe res mres t mresw t mress t mress figure 28.6 reset input timing ck res t resh t ress v ih v il mres t mresh t mress v ih v il nmi t nmih t nmis v ih v il irq7 to irq0 t irqh t irqs v ih v il figure 28.7 interrupt signal input timing
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1425 of 1560 mar 18, 2011 sh7080 group t irqod t irqod ck i rqout figure 28.8 interrupt signal output timing ck breq back a29 to a0 , d31 to d0 rasx , casx , cke breqh t breqs t backd t backd t breqh t breqs t bon t boff t boff t bon t when hizcnt = 1 when hizcnt = 0 figure 28.9 bus release timing ck t boff t boff t bon t bon normal mode standby mode normal mode a29 to a0, d31 to d0 r asx , casx , cke figure 28.10 pin driving timing in standby mode
section 28 electrical characteristics page 1426 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 28.3.3 ac bus timing table 28.8 bus timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure address delay time 1 t ad1 1 18 ns figures 28.11 to 28.44 address delay time 2 t ad2 1/2t bcyc + 1 1/2t bcyc +18 ns figure 28.23 address setup time t as 0 ? ns figures 28.11 to 28.14, 28.18 address hold time t ah 0 ? ns figures 28.11 to 28.14, 28.18 bs delay time t bsd ? 18 ns figures 28.11 to 28.37, 28.41 to 28.44 cs delay time t csd 1 18 ns figures 28.11 to 28.44 cs setup time t css 0 ? ns figures 28.11 to 28.14 cs hold time t csh 0 ? ns figures 28.11 to 28.14 read write delay time t rwd 1 18 ns figures 28.11 to 28.44 read strobe delay time t rsd 1/2t bcyc + 1 1/2t bcyc + 18 ns figures 28.11 to 28.18, 28.23, 28.41, 28.42 read data setup time 1 t rds1 1/2t bcyc + 18 ? ns figures 28.11 to 28.18, 28.41 to 28.44 read data setup time 2 t rds2 19 ? ns figures 28.20 to 28.22, 28.24 to 28.27, 28.32 to 28.34 read data setup time 3 t rds3 1/2t bcyc + 18 ? ns figure 28.23
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1427 of 1560 mar 18, 2011 sh7080 group item symbol min. max. unit reference figure read data hold time 1 t rdh1 0 ? ns figures 28.11 to 28.18, 28.41 to 28.44 read data hold time 2 t rdh2 2 ? ns figures 28.20 to 28.22, 28.24 to 28.27, 28.32 to 28.34 read data hold time 3 t rdh3 0 ? ns figure 28.23 read data access time t acc * 2 t bcyc (n +1.5) ? 33 * 1 ? ns figures 28.11 to 28.17 access time from read strobe t oe * 2 t bcyc (n + 1) ? 31 * 1 ? ns figures 28.11 to 28.17 write strobe delay time 1 t wsd1 1/2t bcyc + 1 1/2t bcyc + 18 ns figures 28.11 to 28.16, 28.41, 28.42 write strobe delay time 2 t wsd2 ? 18 ns figure 28.17 write data delay time 1 t wdd1 ? 18 ns figures 28.11 to 28.22, 28.41 to 28.44 write data delay time 2 t wdd2 ? 18 ns figures 28.28 to 28.31, 28.35 to 28.37 write data hold time 1 t wdh1 1 11 ns figures 28.11 to 28.22, 28.41 to 28.44 write data hold time 2 t wdh2 1 ? ns figures 28.28 to 28.31, 28.35 to 28.37 write data hold time t wrh 0 ? ns figures 28.11 to 28.14, 28.18 wait setup time t wts 1/2t bcyc + 17 ? ns figures 28.12 to 28.23, 28.42, 28.44 wait hold time t wth 1/2t bcyc + 7 ? ns figures 28.12 to 28.23, 28.42, 28.44 ras delay time t rasd 1 18 ns figures 28.24 to 28.35, 28.37 to 28.40
section 28 electrical characteristics page 1428 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group item symbol min. max. unit reference figure cas delay time t casd 1 18 ns figures 28.24 to 28.40 dqm delay time t dqmd 1 18 ns figures 28.24 to 28.37 cke delay time t cked 1 18 ns figure 28.39 ah delay time t ahd 1/2t bcyc + 1 1/2t bcyc + 18 ns figure 28.18 multiplexed address delay time t mad ? 18 ns figure 28.18 multiplexed address hold time t mah 1 ? ns figure 28.18 dack, tend delay time t dacd 1 18 ns figures 28.11 to 28.35 frame delay time t fmd 1 18 ns figure 28.19 to 28.22 iciord delay time t icrsd 1/2t bcyc + 1 1/2t bcyc + 18 ns figures 28.43, 28.44 iciowr delay time t icwsd 1/2t bcyc + 1 1/2t bcyc + 18 ns figures 28.43, 28.44 iois16 setup time t io16s 1/2t bcyc + 13 ? ns figure 28.44 iois16 hold time t io16h 1/2t bcyc + 10 ? ns figure 28.44 notes: t bcyc indicates external bus clock period (b = ck). 1. n denotes the number of wait cycles. 2. if the access time conditions are satisfied, the t rds1 condition does not need to be satisfied.
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1429 of 1560 mar 18, 2011 sh7080 group t1 t ad1 t as t csd t css t2 t ad1 t rwd t rwd t csd t rsd t rsd t ah t rdh1 t csh t csh t rds1 t oe t acc t wsd1 t wsd1 t ah t bsd t bsd t dacd t dacd t wrh t wdh1 t wdd1 ck csn rdwr bs read note: * the waveform for dackn and tendn is when active low is specified. write a29 to a0 rd d31 to d0 wrxx dackn * , tendn * d31 to d0 figure 28.11 basic bus timi ng for normal space (no wait)
section 28 electrical characteristics page 1430 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group t css t csh t csh t oe t acc t1 t ad1 t as t csd tw t2 t ad1 t rwd t rwd t csd t rsd t rsd t ah t rdh1 t rds1 t wsd1 t wsd1 t ah t bsd t bsd t wth t wts t dacd t dacd t wdh1 t wdd1 t wrh ck csn rdwr rd wrxx bs wait read note: * the waveform for dackn and tendn is when active low is specified. write a29 to a0 d31 to d0 dackn * , tendn * d31 to d0 figure 28.12 basic bus timing for no rmal space (one softw are wait cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1431 of 1560 mar 18, 2011 sh7080 group t css t csh t csh t oe t acc t1 t ad1 t as t csd tw x t2 t ad1 t rwd t rwd t csd t rsd t rsd t ah t rdh1 t rds1 t wsd1 t wsd1 t ah t bsd t bsd t wth t wts t wth t wts t dacd t dacd t wdh1 t wdd1 t wrh ck csn rdwr rd wrxx wait read note: * the waveform for dackn and tendn is when active low is specified. write a29 to a0 d31 to d0 bs dackn * , tendn * d31 to d0 figure 28.13 basic bus timing for no rmal space (one ext ernal wait cycle)
section 28 electrical characteristics page 1432 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group t ad1 t ad1 t1 t rwd t rsd t wsd1 t wsd1 t wsd1 t rds1 t oe t acc t oe t acc t rds1 t rdh1 t rdh1 t as t css t css t rsd t rsd t ah t csh t csh t csh t csh t rsd t ah t wsd1 t ah t ah t csd t wdd1 t wdh1 t wdh1 t wrh t wrh t wdd1 t bsd t bsd t dacd t dacd t dacd t dacd t bsd t bsd t rwd t rwd t rwd t csd t csd t csd t as t ad1 t ad1 tw t2 ta w t1 tw t2 taw csn rdwr rd wait wrxx bs ck t wth t wts t wth t wts note: * the waveform for dackn and tendn is when active low is specified. read write dackn * , tendn * a29 to a0 d31 to d0 d31 to d0 figure 28.14 basic bus timing for normal space (one software wait cycle, ex ternal wait cycle valid (wm bit = 0), no idle cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1433 of 1560 mar 18, 2011 sh7080 group th t ad1 t rsd t rsd t rds1 t oe t acc t csd t rwd t1 twx t2 tf t wdd1 t bsd t wdh1 t rdh1 t ad1 t csd t dacd t dacd t bsd t wts t wts t rwd t wsd1 t wsd1 t wth t wth ck a29 to a0 csn wrxx rd d31 to d0 d31 to d0 read rdwr bs wait dackn * tendn * note: * the waveform for dackn and tendn is when active low is specified. write figure 28.15 cs extended bus cycle for normal space (sw = 1 cycle, hw = 1 cycle, one external wait cycle)
section 28 electrical characteristics page 1434 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group t rds1 t oe t acc th t ad1 t rsd t rsd t csd t rwd t1 twx t2 tf t wdd1 t bsd t wdh1 t rdh1 t ad1 t csd ck a29 to a0 csn wrxx rd d31 to d0 d31 to d0 read rdwr rdwr bs wait dackn * tendn * note: * the waveform for dackn and tendn is when active low is specified. write t dacd t dacd t bsd t wts t wts t rwd t rwd t rwd t wsd1 t wsd1 t wth t wth figure 28.16 bus cycle of sram with byte selection (sw = 1 cycle, hw = 1 cycle, one external wait cycle, bas = 0 ( ub / lb in write cycle controlled))
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1435 of 1560 mar 18, 2011 sh7080 group t acc t oe th t ad1 t rsd t rsd t rds1 t csd t1 twx t2 tf t rwd t wdd1 t bsd t rwd t rwd t wdh1 t rdh1 t ad1 t csd ck a29 to a0 csn wrxx rd d31 to d0 d31 to d0 read rdwr rdwr bs wait dackn * tendn * note: * the waveform for dackn and tendn is when active low is specified. write t dacd t dacd t bsd t wts t wts t wsd2 t wsd2 t rwd t wth t wth figure 28.17 bus cycle of sram with byte selection (sw = 1 cycle, hw = 1 cycle, one external wait cycle, bas = 1 ( we in write cycl e controlled))
section 28 electrical characteristics page 1436 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ta 1 ta 2 ta 3 t1 tw tw t 2 t ad1 t csd t ad1 t rwd t rwd t csd t rsd t rsd t rdh1 t rds1 t wsd1 t wsd1 data data t bsd t bsd t wth t wts t ahd t ahd t wth t wts t dacd t dacd t wrh address t wdh1 t wdd1 t mah t mad ck a25 to a0 csn rdwr rd ah d15 to d0 read wrxx bs wait dackn * tendn * note: * the waveform for dackn and tendn is when active low is specified. d15 to d0 write address t mah t mad t ahd t ahd figure 28.18 mpx-i/o interface bus cycle (three address cycles, one software wait cycle, one external wait cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1437 of 1560 mar 18, 2011 sh7080 group tm1 t ad1 t csd tmd1w tmd1 t ad1 t rwd t fmd t wdd1 t fmd t fmd t rwd t csd ck a25 to a0 csn rdwr d31 to d0 d31 to d0 read bs frame wait wrxx rd note: * the waveform for dackn and tendn is when active low is specified. dackn * tendn * write t wdh1 t wdd1 t rds2 t wdd1 t bsd t dacd t dacd t wth t wts t bsd t wdh1 t wdh1 t rdh2 address address data data figure 28.19 burst mpx-i/o interface bus cycle single read write (one address cycle, on e software wait cycle)
section 28 electrical characteristics page 1438 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tm1 t ad1 t csd tmd1w tmd1w t ad1 t rwd t fmd t wdd1 t fmd t fmd t rwd t csd ck a25 to a0 csn rdwr d31 to d0 d31 to d0 read bs frame wait wrxx rd note: * the waveform for dackn and tendn is when active low is specified. dackn * tendn * write t wdh1 t wdd1 t rds2 tmd1 t wdd1 t bsd t dacd t dacd t wth t wts t wth t wts t bsd t wdh1 t wdh1 t rdh2 address address data data figure 28.20 burst mpx-i/o interface bus cycle single read write (one address cycle, one software wait cycle, one external wait cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1439 of 1560 mar 18, 2011 sh7080 group tm1 tmd1w tmd1 tmd2 tmd3 tmd4 t ad1 t csd t ad1 t rwd t rwd t csd t rds2 data data t bsd t bsd t wth t wts t fmd t fmd t wth t dacd t dacd address t wdh1 t wdd1 t rdh2 t wdd1 t wdh1 t wdd1 ck a25 to a0 csn rdwr rd frame d31 to d0 read wrxx bs wait dackn * tendn * note: * the waveform for dackn and tendn is when active low is specified. d31 to d0 write address t wdh1 t wdd1 t fmd t rds2 data t rdh2 t rds2 data t rdh2 t rds2 data t rdh2 data t wdh1 t wdd1 data t wdh1 t wdd1 data t wdh1 t wth t wth t wts t wts t wts figure 28.21 burst mpx-i/o interface bus cycle burst read write (one address cycle, on e software wait cycle)
section 28 electrical characteristics page 1440 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tm1 tmd1w tmd1 tmd2w tmd2 tmd3 tmd4 tmd4w t ad1 t csd t ad1 t rwd t rwd t csd t rds2 data data t bsd t bsd t wth t wts t wts t fmd t fmd t wth t dacd t dacd address t wdh1 t wdd1 t wdd1 t wdh1 t wdd1 ck a25 to a0 csn rdwr rd frame d31 to d0 read wrxx bs wait dackn * tendn * note: * the waveform for dackn and tendn is when active low is specified. d31 to d0 write address t wdh1 t rdh2 t wdd1 t fmd t rds2 data t rdh2 t rds2 data t rdh2 t rds2 data t rdh2 data t wdh1 t wdd1 data t wdh1 t wdd1 data t wdh1 t wts t wth t wth t wts t wth t wts t wth t wts figure 28.22 burst mpx-i/o interface bus cycle burst read write (one address cycle, one software wa it cycle, extern al wait cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1441 of 1560 mar 18, 2011 sh7080 group t1 t ad1 t rsd t rds3 t rsd t csd t as tw tw x t 2 b tw b t2b t ad2 t ad2 t csd ck a25 to a0 csn rdwr d31 to d0 wrxx bs rd wait note: * the waveform for dackn and tendn is when active low is specified. dackn * tendn * t ad1 t bsd t dacd t dacd t bsd t rwd t wts t wts t rwd t rdh3 t rdh3 t wth t wth t rds3 figure 28.23 burst rom read cycle (one software wait cycle, one external wait cycle, one burst wait cycle, two bursts)
section 28 electrical characteristics page 1442 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tc1 tr tcw td1 tde t ad1 t ad1 t csd t ad1 t rwd t rwd t csd t ad1 t ad1 t ad1 t rdh2 t rds2 ck a25 to a0 csn rdwr a12/a11 * 1 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. d31 to d0 t rasd t rasd rasx row address reada command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 figure 28.24 synchronous dram single read bus cycle (auto precharge, cas latency 2, wtrcd = 0 cycle, wtrp = 0 cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1443 of 1560 mar 18, 2011 sh7080 group tr w tr tc1 tcw td1 tde tap t ad1 t ad1 t csd t ad1 t rwd t rwd t csd t ad1 t ad1 t ad1 t rdh2 t rds2 ck a25 to a0 csn rdwr a12/a11 * 1 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. d31 to d0 t rasd t rasd rasx row address reada command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 figure 28.25 synchronous dram single read bus cycle (auto precharge, cas latency 2, wtrcd = 1 cycle, wtrp = 1 cycle)
section 28 electrical characteristics page 1444 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tc1 tc2 td1 td2 td3 td4 tr tc3 tc4 tde t ad1 t ad1 t csd t ad1 t ad1 t ad1 t ad1 t rwd t rwd t csd t ad1 t ad1 t ad1 t ad1 t rdh2 t rds2 ck a25 to a0 csn rdwr a12/a11 * 1 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. d31 to d0 t rasd t rasd rasx row address reada command read command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 t rdh2 t rds2 figure 28.26 synchronous dram burst read bus cycle (four read cycles) (auto precharge, cas latency 2, wtrcd = 0 cycle, wtrp = 1 cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1445 of 1560 mar 18, 2011 sh7080 group tc1 tc2 td1 td2 td3 td4 tr trw tc3 tc4 tde t ad1 t ad1 t csd t ad1 t ad1 t ad1 t ad1 t rwd t rwd t csd t ad1 t ad1 t ad1 t ad1 t rdh2 t rds2 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 t rasd t rasd rasx row address read command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 t rdh2 t rds2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. reada command figure 28.27 synchronous dram burst read bus cycle (four read cycles) (auto precharge, cas latency 2, wtrcd = 1 cycle, wtrp = 0 cycle)
section 28 electrical characteristics page 1446 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tr w l tr tc1 t ad1 t csd t ad1 t ad1 t rwd t rwd t rwd t csd t ad1 t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 t rasd t rasd rasx row address writa command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 t wdh2 t wdd2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. figure 28.28 synchronous dram single write bus cycle (auto precharge, trwl = 1 cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1447 of 1560 mar 18, 2011 sh7080 group trw tc1 trwl tr tr w t ad1 t csd t ad1 t ad1 t rwd t rwd t rwd t csd t ad1 t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 t rasd t rasd rasx row address writa command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 t wdh2 t wdd2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. figure 28.29 synchronous dram single write bus cycle (auto precharge, wtrcd = 2 cycles, trwl = 1 cycle)
section 28 electrical characteristics page 1448 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tc2 tc3 tc4 trwl tr tc1 t ad1 t csd t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t csd t ad1 t ad1 t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 t rasd t rasd rasx row address writa command writ command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 t wdh2 t wdd2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. t wdh2 t wdd2 figure 28.30 synchronous dram burst write bus cycle (four write cycles) (auto precharge, wtrcd = 0 cycle, trwl = 1 cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1449 of 1560 mar 18, 2011 sh7080 group tc2 tc3 tc4 trwl tr tc1 tr w t ad1 t csd t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t csd t ad1 t ad1 t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 t rasd t rasd rasx row address writa command writ command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 t wdh2 t wdd2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. t wdh2 t wdd2 figure 28.31 synchronous dram burst write bus cycle (four write cycles) (auto precharge, wtrcd = 1 cycle, trwl = 1 cycle)
section 28 electrical characteristics page 1450 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tc3 tc4 tde tr t c 2 td1 td2 td3 td4 tc1 t csd t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t csd t ad1 t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 t rasd t rasd rasx row address read command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. t rdh2 t rds2 t rdh2 t rds2 figure 28.32 synchronous dram burst read bus cycle (four read cycles) (bank active mode: act + read commands, cas latency 2, wtrcd = 0 cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1451 of 1560 mar 18, 2011 sh7080 group tc2 tc4 tde tc1 tc3 td1 td2 td3 td4 t csd t ad1 t ad1 t ad1 t rwd t rwd t csd t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 t rasd rasx read command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. t rdh2 t rds2 t rdh2 t rds2 figure 28.33 synchronous dram burst read bus cycle (four read cycles) (bank active mode: read command, same row address, cas latency 2, wtrcd = 0 cycle)
section 28 electrical characteristics page 1452 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tc3 tc4 tde tc2 td1 td2 td3 td4 tc1 tr tr w tp t csd t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t csd t ad1 t ad1 t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 t rasd t rasd t rasd t rasd rasx read command column address row address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. t rdh2 t rds2 t rdh2 t rds2 figure 28.34 synchronous dram burst read bus cycle (four read cycles) (bank active mode: pre + act + read commands, different row addresses, cas latency 2, wtrcd = 0 cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1453 of 1560 mar 18, 2011 sh7080 group tc2 tc3 tc4 tr tc1 t ad1 t csd t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t csd t ad1 t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 t rasd t rasd rasx row address writ command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 t wdh2 t wdd2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. t wdh2 t wdd2 figure 28.35 synchronous dram burst write bus cycle (four write cycles) (bank active mode: act + write commands, wtrcd = 0 cycle, trwl = 0 cycle)
section 28 electrical characteristics page 1454 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tc2 tc3 tc4 tnop tc1 t ad1 t csd t ad1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t csd t ad1 t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 rasx writ command column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 t wdh2 t wdd2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. t wdh2 t wdd2 figure 28.36 synchronous dram burst write bus cycle (four write cycles) (bank active mode: write command, same row address, wtrcd = 0 cycle, trwl = 0 cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1455 of 1560 mar 18, 2011 sh7080 group tc2 tc3 tc4 tr tpw tp tc1 t ad1 t csd t ad1 t ad1 t ad1 t rwd t rwd t rwd t rwd t csd t rasd t rasd t rasd t rasd t ad1 t ad1 t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 rasx writ command row address t ad1 t ad1 column address t casd t casd casx t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t dacd t dacd dackn * 2 tendn * 2 t wdh2 t wdd2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. t wdh2 t wdd2 figure 28.37 synchronous dram burst write bus cycle (four write cycles) (bank active mode: pre + act + write commands, different row addresses, wtrcd = 0 cycle, trwl = 0 cycle)
section 28 electrical characteristics page 1456 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group tr c tr c tr r tpw tp tr c t csd t ad1 t ad1 t rwd t rwd t rwd t csd t csd t csd t rasd t rasd t rasd t rasd t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 rasx t casd t casd casx (high) (hi-z) bs cke dqmxx dackn * 2 tendn * 2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. figure 28.38 synchronous dram auto-refreshing timing (wtrp = 1 cycle, wtrc = 3 cycles)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1457 of 1560 mar 18, 2011 sh7080 group tr c tr c tr c tr r tpw tp t csd t ad1 t ad1 t rwd t rwd t rwd t csd t csd t csd t rasd t rasd t rasd t rasd t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 rasx t casd t casd casx (hi-z) bs cke dqmxx dackn * 2 tendn * 2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. t cked t cked figure 28.39 synchronous dram self-refreshing timing (wtrp = 1 cycle, wtrc = 3 cycles)
section 28 electrical characteristics page 1458 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group trc trc trc tmw tde tr r tr r tpw tp tr c t csd t ad1 t ad1 t ad1 pall ref ref mrs t rwd t rwd t rwd t csd t csd t csd t rasd t rasd t rasd t rasd t ad1 t ad1 ck a25 to a0 csn rdwr a12/a11 * 1 d31 to d0 rasx t casd t casd casx (hi-z) bs cke dqmxx dackn * 2 tendn * 2 notes: 1. an address pin to be connected to pin a10 of sdram. 2. the waveform for dackn and tendn is when active low is specified. t csd t csd t rasd t rasd t casd t casd t csd t csd t rwd t rwd t rasd t rasd t casd t casd figure 28.40 synchronous dram mode register write timing (wtrp = 1 cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1459 of 1560 mar 18, 2011 sh7080 group ck a25 to a0 cexx rdwr rd d15 to d0 we d15 to d0 bs read write t ad1 t csd t rwd t ad1 t csd t rwd t wdd1 t wdh1 t bsd t bsd t rsd t wsd1 t wsd1 t rsd t rdh1 t rds1 tpcm1w tpcm2 tpcm1 tpcm1w tpcm1w figure 28.41 pcmcia memory card interface bus timing
section 28 electrical characteristics page 1460 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ck a25 to a0 cexx rdwr rd d15 to d0 we d15 to d0 bs read write wait t wts t ad1 t csd t rwd t ad1 t csd t rwd t bsd t bsd t wdh1 t wdd1 t wsd1 t wsd1 t rsd t rsd t rdh1 t rds1 t wth t wth t wts tpcm1w tpcm2 tpcm0 tpcm1 tpcm1w tpcm0w tpcm2w tpcm1w tpcm1w figure 28.42 pcmcia memory card interface bus timing (ted = 2.5 cycles, teh = 1.5 cycl es, one external wait cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1461 of 1560 mar 18, 2011 sh7080 group ck a25 to a0 cexx rdwr iciord d15 to d0 iciowr d15 to d0 bs read write t ad1 t csd t rwd t ad1 t csd t rwd t bsd t bsd t wdh1 t wdd1 t icwsd t icwsd t icrsd t icrsd t rdh1 t rds1 tpci1w tpci2 tpci1 tpci1w tpci1w figure 28.43 pcmcia i/o card interface bus timing
section 28 electrical characteristics page 1462 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ck a25 to a0 cexx rdwr iciord d15 to d0 iciowr iois16 d15 to d0 bs read write wait t ad1 t csd t rwd t ad1 t csd t rwd t bsd t io16s t io16h t bsd t wdh1 t wdd1 t icwsd t icwsd t icrsd t icrsd t rdh1 t rds1 t wth t wth t wts t wts tpci1w tpci2 tpci0 tpci1 tpci1w tpci0w tpci2w tpci1w tpci1w figure 28.44 pcmcia i/o card interface bus timing (ted = 2.5 cycles, teh = 1.5 cycl es, one external wait cycle)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1463 of 1560 mar 18, 2011 sh7080 group 28.3.4 direct memory access cont roller (dmac) timing table 28.9 direct memory acce ss controller (dmac) timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure dreq setup time t drqs 20 ? ns figure 28.45 dreq hold time t drqh 20 ? ns t drqs t drqh ck dreqn figure 28.45 dreq input timing
section 28 electrical characteristics page 1464 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 28.3.5 multi function timer pulse unit 2 (mtu2) timing table 28.10 multi function timer pulse unit 2 (mtu2) timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure output compare output delay time t tocd ? 50 ns figure 28.46 input capture input setup time t tics 20 ? ns input capture input pulse width (single edge) t ticw 1.5 ? t mpcyc input capture input pulse width (both edges) t ticw 2.5 ? t mpcyc timer input setup time t tcks 20 ? ns figure 28.47 timer clock pulse width (single edge) t tckwh/l 1.5 ? t mpcyc timer clock pulse width (both edges) t tckwh/l 2.5 ? t mpcyc timer clock pulse width (phase counting mode) t tckwh/l 2.5 ? t mpcyc note: t mpcyc indicates the mtu2 clock (mp ) cycle. output compare output input capture input ck t tocd t tics t ticw figure 28.46 mtu2 input/output timing
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1465 of 1560 mar 18, 2011 sh7080 group ck tclka to tclkd t tcks t tcks t tckwh t tckwl figure 28.47 mtu2 clock input timing
section 28 electrical characteristics page 1466 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 28.3.6 multi function timer pulse unit 2s (mtu2s) timing table 28.11 multi function timer pulse unit 2s (mtu2s) timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure output compare output delay time t tocd ? 50 ns figure 28.48 input capture input setup time t tics 20 ? ns input capture input pulse width (single edge) t ticw 1.5 ? t micyc input capture input pulse width (both edges) t ticw 2.5 ? t micyc note: t micyc indicates the mtu2s clock (mi ) cycle. output compare output input capture input note: * when the mi frequency is higher than the b frequency, mi is used instead of ck. ck * t tocd t tics t ticw figure 28.48 mtu2s input/output timing
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1467 of 1560 mar 18, 2011 sh7080 group 28.3.7 i/o port timing table 28.12 i/o port timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure port output data delay time t pwd ? 50 ns figure 28.49 port input hold time t prh 20 ? ns port input setup time t prs 20 ? ns t prs t prh t pwd ck port (read) port (write) figure 28.49 i/o port input/output timing
section 28 electrical characteristics page 1468 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 28.3.8 watchdog timer (wdt) timing table 28.13 watchdog timer (wdt) timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure wdtovf delay time t wovd ? 50 ns figure 28.50 t wovd t wovd v oh v oh ck w dtovf figure 28.50 wdt timing
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1469 of 1560 mar 18, 2011 sh7080 group 28.3.9 serial communication in terface (sci) timing table 28.14 serial communication interface (sci) timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure input clock cycle (asynchronous) t scyc 4 ? t pcyc input clock cycle (clock synchronous) t scyc 6 ? t pcyc figure 28.51 input clock pulse width t sckw 0.4 0.6 t scyc input clock rise time t sckr ? 1.5 t pcyc input clock fall time t sckf ? 1.5 t pcyc transmit data delay time t txd ? 4 t pcyc + 10 ns receive data setup time t rxs 4 t pcyc ? ns receive data hold time asynchronous t rxh 4 t pcyc ? ns transmit data delay time t txd ? 3 t pcyc + 10 ns receive data setup time clock synchronous t rxs 2 t pcyc + 50 ? ns figure 28.52 receive data hold time t rxh 2 t pcyc ? ns note: t pcyc indicates the peripheral clock (p ) cycle. t sckw v ih v ih v ih v ih v il v il v il sck0 to sck2 t sckr t sckf t scyc figure 28.51 input clock timing
section 28 electrical characteristics page 1470 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group t scyc sck0 to sck2 (input/output) txd0 to txd2 (transmit data) rxd0 to rxd2 (receive data) sci input/output timing (clock synchronous mode) t txd t rxs t rxh v oh v oh t1 ck txd0 to txd2 (transmit data) rxd0 to rxd2 (receive data) sci input/output timing (asynchronous mode) tn t txd t rxs t rxh figure 28.52 sci input/output timing
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1471 of 1560 mar 18, 2011 sh7080 group 28.3.10 serial communication interfa ce with fifo (scif) timing table 28.15 serial communication interface with fifo (scif) timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure input clock cycle (asynchronous) t scyc 4 ? t pcyc input clock cycle (clock synchronous) t scyc 6 ? t pcyc figure 28.53 input clock pulse width t sckw 0.4 0.6 t scyc input clock rise time t sckr ? 1.5 t pcyc input clock fall time t sckf ? 1.5 t pcyc transmit data delay time t txd ? 4 t pcyc + 10 ns receive data setup time t rxs 4 t pcyc ? ns receive data hold time asynchronous t rxh 4 t pcyc ? ns transmit data delay time t txd ? 3 t pcyc + 10 ns receive data setup time t rxs 2 t pcyc + 50 ? ns receive data hold time clock synchronous t rxh 2 t pcyc ? ns rts delay time asynchronous t rtsd ? 4 t pcyc + 10 ns cts setup time t ctss 4 t pcyc ? ns figure 28.54 cts hold time t ctsh 4 t pcyc ? ns note: t pcyc indicates the peripheral clock (p ) cycle. t sckw v ih v ih v ih v ih v il v il v il sck3 t sckr t sckf t scyc figure 28.53 input clock timing
section 28 electrical characteristics page 1472 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group t scyc sck3 (input/output) txd3 (transmit data) rxd3 (receive data) scif input/output timing (clock synchronous mode) t txd t rxs t rxh v oh v oh t1 ck txd3 (transmit data) rxd3 (receive data) scif input/output timing (asynchronous mode) tn t txd t rxs t rxh rts3 cts3 t rtsd t ctss t ctsh figure 28.54 scif input/output timing
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1473 of 1560 mar 18, 2011 sh7080 group 28.3.11 synchronous serial communication unit (ssu) timing table 28.16 synchronous serial communication unit (ssu) timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure master 4 256 clock cycle slave t sucyc 4 256 t pcyc master 60 ? clock high pulse width slave t hi 60 ? ns master 60 ? clock low pulse width slave t lo 60 ? ns clock rise time t rise ? 20 ns clock fall time t fall ? 20 ns master 25 ? data input setup time slave t su 30 ? ns master 10 ? data input hold time slave t h 10 ? ns master 1.5 ? scs setup time slave t lead 1.5 ? t pcyc master 1.5 ? scs hold time slave t lag 1.5 ? t pcyc master ? 40 data output delay time slave t od ? 40 ns master 30 ? data output hold time slave t oh 30 ? ns master 1.5 ? continuous transmission delay time slave t td 1.5 ? t pcyc figures 28.55 to 28.58 slave access time t sa ? 1 t pcyc slave out release time t rel ? 1 t pcyc figures 28.57, 28.58 note: t pcyc indicates the peripheral clock (p ) cycle.
section 28 electrical characteristics page 1474 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group ssck (output) cpos = 0 scs (output) ssck (output) cpos = 1 sso (output) ssi (input) t lead t su t h t od t fall t rise t sucyc t lag t oh t lo t hi t hi t lo t td figure 28.55 ssu timing (master, cphs = 1) ssck (output) cpos = 0 scs (output) ssck (output) cpos = 1 sso (output) ssi (input) t lead t su t h t od t fall t rise t sucyc t lag t oh t lo t hi t hi t lo t td figure 28.56 ssu timing (master, cphs = 0)
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1475 of 1560 mar 18, 2011 sh7080 group ssck (input) cpos = 0 scs (input) ssck (input) cpos = 1 sso (input) ssi (output) t lead t fall t rise t sucyc t lag t td t rel t oh t od t su t sa t lo t hi t hi t lo t h figure 28.57 ssu timing (slave, cphs = 1) ssck (input) cpos = 0 scs (input) ssck (input) cpos = 1 sso (input) ssi (output) t lead t fall t rise t sucyc t lag t td t rel t oh t od t su t sa t lo t hi t hi t lo t h figure 28.58 ssu timing (slave, cphs = 0)
section 28 electrical characteristics page 1476 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 28.3.12 port output enable (poe) timing table 28.17 port output enable (poe) timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure poe input setup time t poes 50 ? ns figure 28.59 poe input pulse width t poew 1.5 ? t pcyc note: t pcyc indicates the peripheral clock (p ) cycle. ck p oen input t poes t poew figure 28.59 poe input timing
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1477 of 1560 mar 18, 2011 sh7080 group 28.3.13 i 2 c bus interface 2 (i 2 c2) timing table 28.18 i 2 c bus interface 2 (i 2 c2) timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. typ. max. unit reference figure scl input cycle time t scl 12 t pcyc + 600 ? ? ns figure 28.60 scl input high pulse width t sclh 3 t pcyc + 300 ? ? ns scl input low pulse width t scll 5 t pcyc + 300 ? ? ns scl and sda input fall time t sf ? ? 300 ns scl and sda input spike pulse removal time t sp ? ? 1 t pcyc ns sda input bus free time t buf 5 ? ? t pcyc start condition input hold time t stah 3 ? ? t pcyc repeated start condition input setup time t stas 3 ? ? t pcyc halt condition input setup time t stos 3 ? ? t pcyc data input setup time t sdas 1 t pcyc + 20 ? ? ns data input hold time t sdah 0 ? ? ns scl and sda capacity load c b 0 ? 400 pf scl and sda output fall time t sf ? ? 250 ns note: t pcyc indicates the peripheral clock (p ) cycle.
section 28 electrical characteristics page 1478 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group scl v ih v il t stah t buf p * s * t sf t sr t scl t sdah t sclh t scll sda sr * t stas t sp t stos t sdas p * [legend] s: start condition p: stop condition sr: repeated start condition figure 28.60 i 2 c2 input/output timing
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1479 of 1560 mar 18, 2011 sh7080 group 28.3.14 ubc trigger timing table 28.19 ubc trigger timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. max. unit reference figure ubctrg delay time t ubctgd ? 150 ns figure 28.61 v oh ck ubctrg t ubctgd figure 28.61 ubc trigger timing
section 28 electrical characteristics page 1480 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 28.3.15 a/d converter timing table 28.20 a/d converter timing conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. typ. max. unit figure external trigger input start delay time t trgs 25 ? ? ns figure 28.62 ck adtrg input t trgs v oh 4t pcyc adcrn register (set adst = 1) figure 28.62 external trigger input timing
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1481 of 1560 mar 18, 2011 sh7080 group 28.3.16 ac characteristics measurement conditions ? input signal level: v il (max.)/v ih (min.) ? output signal reference level: high level: 2.0 v, low level: 0.8 v i ol i oh c l v ref lsi output pin dut output notes: c l is the total value that includes the capacitance of measurement tools. each pin is set as follows: 20pf: ck 30pf: all other output pins test conditions include i ol = 1.6 ma and i oh = -200 a. 1. 2. v figure 28.63 output load circuit
section 28 electrical characteristics page 1482 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 28.4 a/d converter characteristics table 28.21 a/d converter characteristics conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item min. typ. max. unit resolution 10 10 10 bit a/d conversion time 2.0 ? ? s analog input capacitance ? ? 20 pf permitted analog signal source impedance ? ? 1 * 1 /3 * 2 k non-linear error ? ? 3.0 * 1 / 5.0 * 2 lsb offset error ? ? 3.0 * 1 / 5.0 * 2 lsb full-scale error ? ? 3.0 * 1 / 5.0 * 2 lsb quantization error ? ? 0.5 lsb absolute error ? ? 4.0 * 1 / 6.0 * 2 lsb notes: 1. it is assumed that a/d conversion time 4.0 s. 2. it is assumed that a/d conversion time < 4.0 s.
section 28 electrical characteristics r01uh0198ej0500 rev. 5.00 page 1483 of 1560 mar 18, 2011 sh7080 group 28.5 flash memory characteristics table 28.22 flash memory characteristics conditions: v cc = 3.0 v to 3.6 v or 4.0 v to 5.5 v, av cc = 4.0 v to 5.5 v, av ref = 4.0 v to av cc , v ss = pllv ss = av ss = 0 v, t a = ?20 c to +85 c (consumer applications), t a = ?40 c to +85 c (industrial applications) item symbol min. typ. max. unit programming time * 1 * 2 * 4 t p ? 1 20 ms/128 bytes ? 40 280 ms/4-kbyte block ? 300 1500 ms/32-kbyte block erase time * 1 * 2 * 4 t e ? 600 3000 ms/64-kbyte block ? 4.6 24 s/512 kbytes programming time (total) * 1 * 2 * 4 t p ? 2.3 12 s/256 kbytes ? 4.6 24 s/512 kbytes erase time (total) * 1 * 2 * 4 t e ? 2.3 12 s/256 kbytes ? 9.2 48 s/512 kbytes programming and erase time (total) * 1 * 2 * 4 t pe ? 4.6 24 s/256 kbytes reprogramming count n wec 500 * 3 ? ? times notes: 1. programming and erase time vary depending on the data. 2. programming and erase time do not include data transfer time. 3. the minimum number of times for which all characteristics are guaranteed after reprogramming (guaranteed for once to the minimum number of reprogramming times). 4. these characteristics only apply when reprogramming is performed within the range of minimum number of times.
section 28 electrical characteristics page 1484 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 28.6 usage note 28.6.1 notes on connecting v cl capacitor this lsi includes an internal step-down circuit to automatically reduce the internal power supply voltage to an appropriate level. between this internal stepped-down power supply (v cl pin) and the v ss pin, a capacitor (0.47 f) for stabilizing the internal voltage needs to be connected. connection of the external capacitor is shown in figure 28.64. the external capacitor should be located near the pin. do not apply any power supply voltage to the v cl pin. one 0.47-f capacitor v cl v ss one 0.47-f capacitor one 0.47-f capacitor v cl v ss v cl v ss external power-supply stabilizing capacitor do not apply any power supply voltage to the v cl pin. use multilayer ceramic capacitors (one 0.47-f capacitor for each v cl pin), which should be located near the pin. note: figure 28.64 connection of v cl capacitor
appendix r01uh0198ej0500 rev. 5.00 page 1485 of 1560 mar 18, 2011 sh7080 group appendix a. pin states pin initial states differ according to mcu operating modes. refer to section 21, pin function controller (pfc), for details. table a.1 pin states (sh7083) pin function pin state reset state power-down state power-on expansion without rom type pin name 8 bits 16 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used ck o z o z h * 1 o o o o xtal o o l l o o o o clock extal i i z i i i i i res i i i i i i i i mres z i z i * 5 i i i * 5 i wdtovf o * 6 o o o o o o o breq z i z z i i i i system control back z o z z o l o o md0, md1 i i i i i i i i asemd0 i * 7 i * 7 i * 7 i * 7 i * 7 i * 7 i * 7 i * 7 operating mode control fwe i i i i i i i i interrupt nmi i i i i i i i i irq0 to irq7 z i z i i i i i irqout z o z z (mzizel in hcpcr = 0) h * 1 (mzizel in hcpcr = 1) o o o * 5 o
appendix page 1486 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 8 bits 16 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used a0 to a17 o z o z z * 3 o z o o address bus a18 to a24 z o z z * 3 o z o o d0 to d8, d10 z i/o z z i/o z i/o i/o data bus d9, d11 to d15 z i/o z z i/o z i/o * 4 i/o bus control wait z i z z i z i i cs0 h z o z z * 3 o z o o cs3 , cs7 z o z z * 3 o z o o bs z o z z * 3 o z o o rasl z o z z * 2 o z * 2 o o casl z o z z * 2 o z * 2 o o dqmlu, dqmll z o z z * 3 o z o o rdwr z o z z * 3 o z o o rd h z o z z * 3 o z o o wrh , wrl h z o z z * 3 o z o o cke (pe15) z o z z (mzizel in hcpcr = 0) z * 2 (mzizel in hcpcr = 1) o z * 2 o * 5 o cke (pa9) z o z z * 2 o z * 2 o o dmac dreq0, dreq1 z i z z i i i i dack0, dack1 z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 5 o
appendix r01uh0198ej0500 rev. 5.00 page 1487 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 8 bits 16 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used dmac tend0, tend1 z o z o * 1 o o o o mtu2 tclkb to tclkd z i z z i i i i tioc0a to tioc0d z i/o z k * 1 i/o i/o i/o z tioc1a z i/o z k * 1 i/o i/o i/o i/o tioc2a, tioc2b z i/o z k * 1 i/o i/o i/o i/o tioc3a, tioc3c z i/o z k * 1 i/o i/o i/o i/o tioc4a to tioc4d z i/o z z (mzizel in hcpcr = 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 5 z tic5u, tic5v, tic5w z i z z i i i i mtu2s tioc3as, tioc3cs z i/o z k * 1 i/o i/o i/o i/o tioc3bs, tioc3ds z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 4 z tioc4as to tioc4ds z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 4 z
appendix page 1488 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 8 bits 16 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used mtu2s tic5us, tic5vs, tic5ws z i z z i i i i poe poe0 , poe2 to poe4 , poe6 to poe8 z i z z i i i i sci sck0 to sck2 z i/o z z i/o i/o i/o i/o rxd0 to rxd2 z i z z i i i i txd0 to txd2 z o z o * 1 o o o o scif sck3 z i/o z z i/o i/o i/o i/o rxd3 z i z z i i i i txd3 z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 5 o ssu ssck z i/o z z i/o i/o i/o i/o scs z i/o z z i/o i/o i/o * 5 i/o ssi z i/o z z i/o i/o i/o i/o sso z i/o z z i/o i/o i/o i/o ubc ubctrg z o z o * 1 o o o o an0 to an7 z i z z i i i i a/d converter adtrg z i z z i i i i i/o port pa3 to pa5, pa7 to pa10, pa12 to pa15 z i/o z k * 1 i/o i/o i/o i/o pb0 to pb2, pb4 to pb9 z i/o z k * 1 i/o i/o i/o i/o pc0 to pc15 z i/o z k * 1 i/o i/o i/o i/o
appendix r01uh0198ej0500 rev. 5.00 page 1489 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 8 bits 16 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used i/o port pd0 to pd8, pd10 z i/o z k * 1 i/o i/o i/o i/o pd9, pd11 to pd15 z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 4 z pe0 to pe3 z i/o z k * 1 i/o i/o i/o z pe4, pe6 to pe8, pe10 z i/o z k * 1 i/o i/o i/o i/o pe12 to pe15 z i/o z z (mzizel in hcpcr = 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 5 z pf0 to pf7 z i z z i i i i [legend] i: input o: output h: high-level output l: low-level output z: high-impedance k: input pins become high-impedance, and output pins retain their state. notes: 1. output pins become high-impedance when the hiz bit in standby control register 6 (stbcr6) is set to 1. 2. becomes output when the hizcnt bit in the common control register (cmncr) is set to 1. 3. becomes output when the hizmem bit in the common control register (cmncr) is set to 1. 4. becomes high-impedance when the mzizdl bit in the high-current port control register (hcpcr) is cleared to 0.
appendix page 1490 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group 5. becomes high-impedance when the mzizel bit in the high-current port control register (hcpcr) is cleared to 0. 6. becomes input during a power-on reset. pull-up to prevent erroneous operation. pull- down with a resistance of at least 1 m as required. 7. pulled-up inside the lsi when there is no input.
appendix r01uh0198ej0500 rev. 5.00 page 1491 of 1560 mar 18, 2011 sh7080 group table a.2 pin states (sh7084) pin function pin state reset state power-down state power-on expansion without rom type pin name 8 bits 16 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used ck o z o z h * 1 o o o o xtal o o l l o o o o clock extal i i z i i i i i res i i i i i i i i mres z i z i * 5 i i i * 5 i wdtovf o * 6 o o o o o o o breq z i z z i i i i system control back z o z z o l o o md0, md1 i i i i i i i i asemd0 i * 7 i * 7 i * 7 i * 7 i * 7 i * 7 i * 7 i * 7 operating mode control fwe i i i i i i i i nmi i i i i i i i i irq0 to irq7 z i z i i i i i interrupt irqout z o z z (mzizel in hcpcr = 0) h * 1 (mzizel in hcpcr = 1) o o o * 5 o a0 to a17 o z o z z * 3 o z o o address bus a18 to a25 z o z z * 3 o z o o d0 to d8, d10 z i/o z z i/o z i/o i/o data bus d9, d11 to d15 z i/o z z i/o z i/o * 4 i/o bus control wait z i z z i z i i cs0 , cs1 h z o z z * 3 o z o o cs2 to cs7 z o z z * 3 o z o o bs z o z z * 3 o z o o
appendix page 1492 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 8 bits 16 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used bus control rasl z o z z * 2 o z * 2 o o casl z o z z * 2 o z * 2 o o dqmlu, dqmll z o z z * 3 o z o o ah (pa16) z o z z * 3 o z o o ah (pe14) z o z z (mzizel in hcpcr = 0) z * 3 (mzizel in hcpcr = 1) o z o * 5 o rdwr z o z z * 3 o z o o rd h z o z z * 3 o z o o wrh , wrl h z o z z * 3 o z o o cke (pe15) z o z z (mzizel in hcpcr = 0) z * 2 (mzizel in hcpcr = 1) o z * 2 o * 5 o cke (pa9/pa16) z o z z * 2 o z * 2 o o dmac dreq0, dreq1 z i z z i i i i dack0, dack1 z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 5 o tend0, tend1 z o z o * 1 o o o o
appendix r01uh0198ej0500 rev. 5.00 page 1493 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 8 bits 16 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used mtu2 tclka to tclkd z i z z i i i i tioc0a to tioc0d z i/o z k * 1 i/o i/o i/o z tioc1a, tioc1b z i/o z k * 1 i/o i/o i/o i/o tioc2a, tioc2b z i/o z k * 1 i/o i/o i/o i/o tioc3a, tioc3c z i/o z k * 1 i/o i/o i/o i/o tioc3b, tioc3d z i/o z z (mzizel in hcpcr = 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 5 z tioc4a to tioc4d z i/o z z (mzizel in hcpcr = 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 5 z tic5u, tic5v, tic5w z i z z i i i i mtu2s tioc3as, tioc3cs z i/o z k * 1 i/o i/o i/o i/o tioc3bs, tioc3ds z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 4 z
appendix page 1494 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 8 bits 16 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used mtu2s tioc4as to tioc4ds z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 4 z tic5us, tic5vs, tic5ws z i z z i i i i poe poe0 to poe8 z i z z i i i i sci sck0 to sck2 z i/o z z i/o i/o i/o i/o rxd0 to rxd2 z i z z i i i i txd0 to txd2 z o z o * 1 o o o o scif sck3 (pe6) z i/o z z i/o i/o i/o i/o sck3 (pe9) z i/o z z i/o i/o i/o * 5 i/o rxd3 (pe4) z i z z i i i i rxd3 (pe11) z i z z i i i * 5 i txd3 (pe5) z o z o * 1 o o o o txd3 (pe12) z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 5 o rts3 z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 5 o cts3 z i z z i i i * 5 i
appendix r01uh0198ej0500 rev. 5.00 page 1495 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 8 bits 16 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used ssu ssck z i/o z z i/o i/o i/o i/o scs z i/o z z i/o i/o i/o * 5 i/o ssi z i/o z z i/o i/o i/o i/o sso z i/o z z i/o i/o i/o i/o i 2 c2 scl z i/o z z i/o i/o i/o i/o sda z i/o z z i/o i/o i/o i/o ubc ubctrg z o z o * 1 o o o o an0 to an7 z i z z i i i i a/d converter adtrg z i z z i i i i i/o port pa0 to pa17 z i/o z k * 1 i/o i/o i/o i/o pb0 to pb9 z i/o z k * 1 i/o i/o i/o i/o pc0 to pc15 z i/o z k * 1 i/o i/o i/o i/o pd0 to pd8, pd10 z i/o z k * 1 i/o i/o i/o i/o pd9, pd11 to pd15 z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 4 z pe0 to pe3 z i/o z k * 1 i/o i/o i/o z pe4 to pe8, pe10 z i/o z k * 1 i/o i/o i/o i/o pe9, pe11 to pe15 z i/o z z (mzizel in hcpcr= 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 5 z pf0 to pf7 z i z z i i i i
appendix page 1496 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group [legend] i: input o: output h: high-level output l: low-level output z: high-impedance k: input pins become high-impedance, and output pins retain their state. notes: 1. output pins become high-impedance when the hiz bit in standby control register 6 (stbcr6) is set to 1. 2. becomes output when the hizcnt bit in the common control register (cmncr) is set to 1. 3. becomes output when the hizmem bit in the common control register (cmncr) is set to 1. 4. becomes high-impedance when the mzizdl bit in the high-current port control register (hcpcr) is cleared to 0. 5. becomes high-impedance when the mzizel bit in the high-current port control register (hcpcr) is cleared to 0. 6. becomes input during a power-on reset. pull-up to prevent erroneous operation. pull- down with a resistance of at least 1 m as required. 7. pulled-up inside the lsi when there is no input.
appendix r01uh0198ej0500 rev. 5.00 page 1497 of 1560 mar 18, 2011 sh7080 group table a.3 pin states (sh7085) pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used ck o z o z h * 1 o o o o xtal o o l l o o o o clock extal i i z i i i i i res i i i i i i i i mres z i z i * 6 i i i * 6 i wdtovf o * 7 o o o o o o o breq z i z z i i i i system control back z o z z o l o o md0, md1 i i i i i i i i asemd0 i * 8 i * 8 i * 8 i * 8 i * 8 i * 8 i * 8 i * 8 operating mode control fwe i i i i i i i i nmi i i i i i i i i irq0 to irq7 z i z i i i i i interrupt irqout (pe15) z o z z (mzizel in hcpcr = 0) h * 1 (mzizel in hcpcr = 1) o o o * 6 o irqout (pd30) z o z h * 1 o o o o a0 to a17 o z o z z * 3 o z o o address bus a18 to a25 z o z z * 3 o z o o d0 to d8, d10, d16 to d23, d30, d31 z i/o z z i/o z i/o i/o data bus d9, d11 to d15 z i/o z z i/o z i/o * 5 i/o d24 to d29 z i/o z z i/o z i/o * 4 i/o
appendix page 1498 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used bus control wait z i z z i z i i cs0 , cs1 h z o z z * 3 o z o o cs2 (pa6), cs3 (pa7), cs4 to cs7 z o z z * 3 o z o o cs2 (pd28), cs3 (pd29) z o z z (mzizdh in hcpcr = 0) z * 3 (mzizdh in hcpcr = 1) o z o * 4 o ce1a , ce1b , ce2a , ce2b z o z z * 3 o z o o bs z o z z * 3 o z o o rasu , rasl z o z z * 2 o z * 2 o o casu , casl z o z z * 2 o z * 2 o o dqmuu (pa23/pa16), dqmul, dqmlu, dqmll z o z z * 3 o z o o dqmuu (pe14) z o z z (mzizel in hcpcr = 0) z * 3 (mzizel in hcpcr = 1) o z o * 6 o ah (pa23/pa16) z o z z * 3 o z o o
appendix r01uh0198ej0500 rev. 5.00 page 1499 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used bus control ah (pe14) z o z z (mzizel in hcpcr = 0) z * 3 (mzizel in hcpcr = 1) o z o * 6 o frame z o z z * 3 o z o o rdwr z o z z * 3 o z o o rd h z o z z * 3 o z o o iciord z o z z * 3 o z o o wrhh (pa23), wrhl z h z o z z * 3 o z o o wrhh (pe14) z o z z (mzizel in hcpcr = 0) z * 3 (mzizel in hcpcr = 1) o z o * 6 o wrhh (pa16) z o z z * 3 o z o o wrh , wrl h z o z z * 3 o z o o we z o z z * 3 o z o o iciowr (pa23/pa16) z o z z * 3 o z o o iciowr (pe14) z o z z (mzizel in hcpcr = 0) z * 3 (mzizel in hcpcr = 1) o z o * 6 o iois16 z i z z i i i i
appendix page 1500 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used bus control cke (pe15) z o z z (mzizel in hcpcr = 0) z * 2 (mzizel in hcpcr = 1) o z * 2 o * 6 o cke (pa9/pa16) z o z z * 2 o z * 2 o o dmac dreq0 (pd24), dreq1 (pd25) z i z z i i i * 4 i dreq0 (pa2/pe0), dreq1 (pa5/pe2), dreq2, dreq3 z i z z i i i i dack0 (pd26), dack1 (pd27) z o z z (mzizdh in hcpcr = 0) o * 1 (mzizdh in hcpcr = 1) o o o * 4 o dack0 (pe14), dack1 (pe15) z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 6 o dack2, dack3 z o z o * 1 o o o o tend0, tend1 z o z o * 1 o o o o
appendix r01uh0198ej0500 rev. 5.00 page 1501 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used mtu2 tclka to tclkd z i z z i i i i tioc0a to tioc0d z i/o z k * 1 i/o i/o i/o z tioc1a, tioc1b z i/o z k * 1 i/o i/o i/o i/o tioc2a, tioc2b z i/o z k * 1 i/o i/o i/o i/o tioc3a, tioc3c z i/o z k * 1 i/o i/o i/o i/o tioc3b, tioc3d z i/o z z (mzizel in hcpcr = 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 6 z tioc4a to tioc4d z i/o z z (mzizel in hcpcr = 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 6 z tic5u, tic5v, tic5w z i z z i i i i mtu2s tioc3as, tioc3cs z i/o z k * 1 i/o i/o i/o i/o tioc3bs (pd9), tioc3ds (pd11) z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 5 z
appendix page 1502 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used mtu2s tioc3bs (pd29), tioc3ds (pd28) z i/o z z (mzizdh in hcpcr = 0) k * 1 (mzizdh in hcpcr = 1) i/o i/o i/o * 4 z tioc4as (pd12), tioc4bs (pd13), tioc4cs (pd14), tioc4ds (pd15) z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 5 z tioc4as (pd27), tioc4bs (pd26), tioc4cs (pd25), tioc4ds (pd24) z i/o z z (mzizdh in hcpcr = 0) k * 1 (mzizdh in hcpcr = 1) i/o i/o i/o * 4 z tic5us, tic5vs, tic5ws z i z z i i i i poe poe0 to poe8 z i z z i i i i sci sck0 to sck2 z i/o z z i/o i/o i/o i/o rxd0 to rxd2 z i z z i i i i txd0 to txd2 z o z o * 1 o o o o scif sck3 (pe6) z i/o z z i/o i/o i/o i/o sck3 (pe9) z i/o z z i/o i/o i/o * 6 i/o rxd3 (pe4) z i z z i i i i rxd3 (pe11) z i z z i i i * 6 i
appendix r01uh0198ej0500 rev. 5.00 page 1503 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used scif txd3 (pe5) z o z o * 1 o o o o txd3 (pe12) z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 6 o rts3 z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 6 o cts3 z i z z i i i * 6 i ssu ssck z i/o z z i/o i/o i/o i/o scs z i/o z z i/o i/o i/o * 6 i/o ssi z i/o z z i/o i/o i/o i/o sso z i/o z z i/o i/o i/o i/o i 2 c2 scl z i/o z z i/o i/o i/o i/o sda z i/o z z i/o i/o i/o i/o ubc ubctrg z o z o * 1 o o o o an0 to an7 z i z z i i i i a/d converter adtrg z i z z i i i i i/o port pa0 to pa25 z i/o z k * 1 i/o i/o i/o i/o pb0 to pb9 z i/o z k * 1 i/o i/o i/o i/o pc0 to pc15 z i/o z k * 1 i/o i/o i/o i/o pd0 to pd8, pd10, pd16 to pd23, pd30, pd31 z i/o z k * 1 i/o i/o i/o i/o
appendix page 1504 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used i/o port pd9, pd11 to pd15 z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 5 z pd24 to pd29 z i/o z z (mzizdh in hcpcr = 0) k * 1 (mzizdh in hcpcr = 1) i/o i/o i/o * 4 z pe0 to pe3 z i/o z k * 1 i/o i/o i/o z pe4 to pe8, pe10 z i/o z k * 1 i/o i/o i/o i/o pe9, pe11 to pe15 z i/o z z (mzizel in hcpcr = 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 6 z pf0 to pf7 z i z z i i i i [legend] i: input o: output h: high-level output l: low-level output z: high-impedance k: input pins become high-impedance, and output pins retain their state.
appendix r01uh0198ej0500 rev. 5.00 page 1505 of 1560 mar 18, 2011 sh7080 group notes: 1. output pins become high-impedance when the hiz bit in standby control register 6 (stbcr6) is set to 1. 2. becomes output when the hizcnt bit in the common control register (cmncr) is set to 1. 3. becomes output when the hizmem bit in the common control register (cmncr) is set to 1. 4. becomes high-impedance when the mzizdh bit in the high-current port control register (hcpcr) is cleared to 0. 5. becomes high-impedance when the mzizdl bit in the high-current port control register (hcpcr) is cleared to 0. 6. becomes high-impedance when the mzizel bit in the high-current port control register (hcpcr) is cleared to 0. 7. becomes input during a power-on reset. pull-up to prevent erroneous operation. pull- down with a resistance of at least 1 m as required. 8. pulled-up inside the lsi when there is no input.
appendix page 1506 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table a.4 pin states (sh7086) pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used ck o z o z h * 1 o o o o xtal o o l l o o o o clock extal i i z i i i i i res i i i i i i i i mres z i z i * 7 i i i * 7 i wdtovf o * 8 o o o o o o o breq z i z z i i i i system control back z o z z o l o o md0, md1 i i i i i i i i asemd0 i * 9 i * 9 i * 9 i * 9 i * 9 i * 9 i * 9 i * 9 operating mode control fwe i i i i i i i i nmi i i i i i i i i irq0 to irq7 z i z i i i i i interrupt irqout (pe15) z o z z (mzizel in hcpcr = 0) h * 1 (mzizel in hcpcr = 1) o o o * 7 o irqout (pd30) z o z h * 1 o o o o a0 to a25 o z o z z * 3 o z o o address bus a26 to a29 z o z z * 3 o z o o d0 to d8, d10, d16 to d23, d30, d31 z i/o z z i/o z i/o i/o data bus d9, d11 to d15 z i/o z z i/o z i/o * 5 i/o d24 to d29 z i/o z z i/o z i/o * 4 i/o
appendix r01uh0198ej0500 rev. 5.00 page 1507 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used bus control wait z i z z i z i i cs0 , cs1 h z o z z * 3 o z o o cs2 (pa6), cs3 (pa7), cs4 to cs7 z o z z * 3 o z o o cs2 (pd28), cs3 (pd29) z o z z (mzizdh in hcpcr = 0) z * 3 (mzizdh in hcpcr = 1) o z o * 4 o cs8 z o z z (mzizeh in hcpcr = 0) z * 3 (mzizeh in hcpcr = 1) o z o * 6 o ce1a , ce1b , ce2a , ce2b z o z z * 3 o z o o bs z o z z * 3 o z o o rasu , rasl z o z z * 2 o z * 2 o o casu , casl z o z z * 2 o z * 2 o o dqmuu (pa23/pa16), dqmul, dqmlu, dqmll z o z z * 3 o z o o dqmuu (pe14) z o z z (mzizel in hcpcr = 0) z * 3 (mzizel in hcpcr = 1) o z o * 7 o
appendix page 1508 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used bus control ah (pa23/pa16) z o z z * 3 o z o o ah (pe14) z o z z (mzizel in hcpcr = 0) z * 3 (mzizel in hcpcr = 1) o z o * 7 o frame z o z z * 3 o z o o rdwr z o z z * 3 o z o o rd h z o z z * 3 o z o o iciord z o z z * 3 o z o o wrhh (pa23), wrhl z h z o z z * 3 o z o o wrhh (pe14) z o z z (mzizel in hcpcr = 0) z * 3 (mzizel in hcpcr = 1) o z o * 7 o wrhh (pa16) z o z z * 3 o z o o wrh , wrl h z o z z * 3 o z o o we z o z z * 3 o z o o iciowr (pa23/pa16) z o z z * 3 o z o o iciowr (pe14) z o z z (mzizel in hcpcr = 0) z * 3 (mzizel in hcpcr = 1) o z o * 7 o iois16 z i z z i i i i
appendix r01uh0198ej0500 rev. 5.00 page 1509 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used bus control cke (pe15) z o z z (mzizel in hcpcr = 0) z * 2 (mzizel in hcpcr = 1) o z * 2 o * 7 o cke (pa9/pa16) z o z z * 2 o z * 2 o o dmac dreq0 (pd24), dreq1 (pd25) z i z z i i i * 4 i dreq0 (pa2/pe0), dreq1 (pa5/pe2), dreq2, dreq3 z i z z i i i i dack0 (pd26), dack1 (pd27) z o z z (mzizdh in hcpcr = 0) o * 1 (mzizdh in hcpcr = 1) o o o * 4 o dack0 (pe14), dack1 (pe15) z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 7 o dack2, dack3 z o z o * 1 o o o o tend0, tend1 z o z o * 1 o o o o
appendix page 1510 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used mtu2 tclka to tclkd z i z z i i i i tioc0a to tioc0d z i/o z k * 1 i/o i/o i/o z tioc1a, tioc1b z i/o z k * 1 i/o i/o i/o i/o tioc2a, tioc2b z i/o z k * 1 i/o i/o i/o i/o tioc3a, tioc3c z i/o z k * 1 i/o i/o i/o i/o tioc3b, tioc3d z i/o z z (mzizel in hcpcr = 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 7 z tioc4a to tioc4d z i/o z z (mzizel in hcpcr = 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 7 z tic5u, tic5v, tic5w z i z z i i i i mtu2s tioc3as, tioc3cs z i/o z k * 1 i/o i/o i/o i/o tioc3bs (pd9), tioc3ds (pd11) z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 5 z
appendix r01uh0198ej0500 rev. 5.00 page 1511 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used mtu2s tioc3bs (pd29), tioc3ds (pd28) z i/o z z (mzizdh in hcpcr = 0) k * 1 (mzizdh in hcpcr = 1) i/o i/o i/o * 4 z tioc3bs (pe16), tioc3ds (pe17) z i/o z z (mzizeh in hcpcr = 0) k * 1 (mzizeh in hcpcr = 1) i/o i/o i/o * 6 z tioc4as (pd12), tioc4bs (pd13), tioc4cs (pd14), tioc4ds (pd15) z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 5 z tioc4as (pd27), tioc4bs (pd26), tioc4cs (pd25), tioc4ds (pd24) z i/o z z (mzizdh in hcpcr = 0) k * 1 (mzizdh in hcpcr = 1) i/o i/o i/o * 4 z tioc4as (pe18), tioc4bs (pe19), tioc4cs (pe20), tioc4ds (pe21) z i/o z z (mzizeh in hcpcr = 0) k * 1 (mzizeh in hcpcr = 1) i/o i/o i/o * 6 z
appendix page 1512 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used mtu2s tic5us, tic5vs, tic5ws z i z z i i i i poe poe0 to poe8 z i z z i i i i sci sck0 to sck2 z i/o z z i/o i/o i/o i/o rxd0 to rxd2 z i z z i i i i txd0 to txd2 z o z o * 1 o o o o scif sck3 (pe6) z i/o z z i/o i/o i/o i/o sck3 (pe9) z i/o z z i/o i/o i/o * 7 i/o rxd3 (pe4) z i z z i i i i rxd3 (pe11) z i z z i i i * 7 i txd3 (pe5) z o z o * 1 o o o o txd3 (pe12) z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 7 o rts3 z o z z (mzizel in hcpcr = 0) o * 1 (mzizel in hcpcr = 1) o o o * 7 o cts3 z i z z i i i * 7 i ssu ssck z i/o z z i/o i/o i/o i/o scs z i/o z z i/o i/o i/o * 7 i/o ssi z i/o z z i/o i/o i/o i/o sso z i/o z z i/o i/o i/o i/o i 2 c2 scl z i/o z z i/o i/o i/o i/o sda z i/o z z i/o i/o i/o i/o
appendix r01uh0198ej0500 rev. 5.00 page 1513 of 1560 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used ubc ubctrg z o z o * 1 o o o o an0 to an15 z i z z i i i i a/d converter adtrg z i z z i i i i i/o port pa0 to pa29 z i/o z k * 1 i/o i/o i/o i/o pb0 to pb9 z i/o z k * 1 i/o i/o i/o i/o pc0 to pc15, pc18 to pc25 z i/o z k * 1 i/o i/o i/o i/o pd0 to pd8, pd10, pd16 to pd23, pd30, pd31 z i/o z k * 1 i/o i/o i/o i/o pd9, pd11 to pd15 z i/o z z (mzizdl in hcpcr = 0) k * 1 (mzizdl in hcpcr = 1) i/o i/o i/o * 5 z pd24 to pd29 z i/o z z (mzizdh in hcpcr = 0) k * 1 (mzizdh in hcpcr = 1) i/o i/o i/o * 4 z pe0 to pe3 z i/o z k * 1 i/o i/o i/o z pe4 to pe8, pe10 z i/o z k * 1 i/o i/o i/o i/o pe9, pe11 to pe15 z i/o z z (mzizel in hcpcr = 0) k * 1 (mzizel in hcpcr = 1) i/o i/o i/o * 7 z
appendix page 1514 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group pin function pin state reset state power-down state power-on expansion without rom type pin name 16 bits 32 bits expansion with rom single- chip manual deep software standby software standby sleep bus master- ship release oscillation stop detected poe function used i/o port pe16 to pe21 z i/o z z (mzizeh in hcpcr = 0) k * 1 (mzizeh in hcpcr = 1) i/o i/o i/o * 6 z pf0 to pf15 z i z z i i i i [legend] i: input o: output h: high-level output l: low-level output z: high-impedance k: input pins become high-impedance, and output pins retain their state. notes: 1. output pins become high-impedance when the hiz bit in standby control register 6 (stbcr6) is set to 1. 2. becomes output when the hizcnt bit in the common control register (cmncr) is set to 1. 3. becomes output when the hizmem bit in the common control register (cmncr) is set to 1. 4. becomes high-impedance when the mzizdh bit in the high-current port control register (hcpcr) is cleared to 0. 5. becomes high-impedance when the mzizdl bit in the high-current port control register (hcpcr) is cleared to 0. 6. becomes high-impedance when the mzizeh bit in the high-current port control register (hcpcr) is cleared to 0. 7. becomes high-impedance when the mzizel bit in the high-current port control register (hcpcr) is cleared to 0. 8. becomes input during a power-on reset. pull-up to prevent erroneous operation. pull- down with a resistance of at least 1 m as required. 9. pulled-up inside the lsi when there is no input.
appendix r01uh0198ej0500 rev. 5.00 page 1515 of 1560 mar 18, 2011 sh7080 group b. processing of unused pins table b.1 processing of unused pins pin processing nmi fixed high-level (pull-up) wdtovf open (if pull-down is necessary, use a resistor rated at 1 or greater.) avref avref = avcc avcc, avss avcc = vcc, avss = vss asemd0 fixed high-level (pull-up) pf0 to pf7 (pf0 to pf15 in sh7086) connect to avcc or avss via a resistor. input-only pins other than the above fixed (pull-up/pull-down) i/o pins other than the above fixed at input pin setting (pull-up/pull-down) or set to output and left open output-only pins open notes: 1. for pull-up or pull-down, connect to vcc or gnd via a resistor. 2. when using the h-udi, pin processing is according to the specifications of the emulator.
appendix page 1516 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group c. pin states of bus related signals table c.1 pin states of bus related signals (1) pin name on-chip rom space on-chip ram space on-chip peripheral module space cs0 to cs8 h h h ce1a , ce1b , ce2a , ce2b h h h bs h h h rasu , rasl h h h casu , casl h h h dqmuu h h h dqmul h h h dqmlu h h h dqmll h h h ah l l l frame h h h r h h h rdwr w ? h h r h h h rd w ? h h r h h h iciord w ? h h r h h h wrhh w ? h h r h h h wrhl w ? h h r h h h wrh w ? h h r h h h wrl w ? h h we r h h h w ? h h
appendix r01uh0198ej0500 rev. 5.00 page 1517 of 1560 mar 18, 2011 sh7080 group pin name on-chip rom space on-chip ram space on-chip peripheral module space r h h h iciowr w ? h h a29 to a0 address * address * address * d31 to d24 hi-z hi-z hi-z d23 to d16 hi-z hi-z hi-z d15 to d8 hi-z hi-z hi-z d7 to d0 hi-z hi-z hi-z [legend] r: read w: write note: * value of external space address that was previously accessed table c.1 pin states of bus related signals (2) external space (normal space) 16-bit space pin name 8-bit space upper byte lower byte word/longword cs0 to cs8 enabled enabled enabled enabled ce1a , ce1b , ce2a , ce2b h h h h bs l l l l rasu , rasl h h h h casu , casl h h h h dqmuu h h h h dqmul h h h h dqmlu h h h h dqmll h h h h ah l l l l frame h h h h rdwr r h h h h w l l l l
appendix page 1518 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group external space (normal space) 16-bit space pin name 8-bit space upper byte lower byte word/longword r l l l l rd w h h h h r h h h h iciord w h h h h r h h h h wrhh w h h h h r h h h h wrhl w h h h h r h h h h wrh w h l h l r h h h h wrl w l h l l r h h h h we w h h h h r h h h h iciowr w h h h h a29 to a0 address a ddress address address d31 to d24 hi-z hi-z hi-z hi-z d23 to d16 hi-z hi-z hi-z hi-z d15 to d8 hi-z data hi-z data d7 to d0 data hi-z data data [legend] r: read w: write enabled: chip select signals corresponding to accessed areas = low. the other chip select signals = high.
appendix r01uh0198ej0500 rev. 5.00 page 1519 of 1560 mar 18, 2011 sh7080 group table c.1 pin states of bus related signals (3) external space (normal space) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword cs0 to cs8 enabled enabled enabled e nabled enabled enabled enabled ce1a , ce1b , ce2a , ce2b h h h h h h h bs l l l l l l l rasu , rasl h h h h h h h casu , casl h h h h h h h dqmuu h h h h h h h dqmul h h h h h h h dqmlu h h h h h h h dqmll h h h h h h h ah l l l l l l l frame h h h h h h h r h h h h h h h rdwr w l l l l l l l r l l l l l l l rd w h h h h h h h r h h h h h h h iciord w h h h h h h h r h h h h h h h wrhh w l h h h l h l r h h h h h h h wrhl w h l h h l h l r h h h h h h h wrh w h h l h h l l wrl r h h h h h h h w h h h l h l l
appendix page 1520 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group external space (normal space) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword r h h h h h h h we w h h h h h h h r h h h h h h h iciowr w h h h h h h h a29 to a0 address addr ess address address a ddress address address d31 to d24 data hi-z hi-z hi-z data hi-z data d23 to d16 hi-z data hi-z hi-z data hi-z data d15 to d8 hi-z hi-z data hi-z hi-z data data d7 to d0 hi-z hi-z hi-z data hi-z data data [legend] r: read w: write enabled: chip select signals corresponding to accessed areas = low. the other chip select signals = high. table c.1 pin states of bus related signals (4) external space (sram with byte selection) 16-bit space pin name upper byte lower byte word/longword cs0 to cs8 enabled enabled enabled ce1a , ce1b , ce2a , ce2b h h h bs l l l rasu , rasl h h h casu , casl h h h dqmuu h h h dqmul h h h dqmlu h h h dqmll h h h
appendix r01uh0198ej0500 rev. 5.00 page 1521 of 1560 mar 18, 2011 sh7080 group external space (sram with byte selection) 16-bit space pin name upper byte lower byte word/longword ah l l l frame h h h r h h h rdwr w l l l r l l l rd w h h h r h h h iciord w h h h r h h h wrhh w h h h r h h h wrhl w h h h r l h l wrh w l h l r h l l wrl w h l l r h h h we w h h h r h h h iciowr w h h h a29 to a0 addres s address address d31 to d24 hi-z hi-z hi-z d23 to d16 hi-z hi-z hi-z d15 to d8 data hi-z data d7 to d0 hi-z data data [legend] r: read w: write enabled: chip select signals corresponding to accessed areas = low. the other chip select signals = high.
appendix page 1522 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table c.1 pin states of bus related signals (5) external space (sram with byte selection) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword cs0 to cs8 enabled enabled enabled e nabled enabled enabled enabled ce1a , ce1b , ce2a , ce2b h h h h h h h bs l l l l l l l rasu , rasl h h h h h h h casu , casl h h h h h h h dqmuu h h h h h h h dqmul h h h h h h h dqmlu h h h h h h h dqmll h h h h h h h ah l l l l l l l frame h h h h h h h r h h h h h h h rdwr w l l l l l l l r l l l l l l l rd w h h h h h h h r h h h h h h h iciord w h h h h h h h r l h h h l h l wrhh w l h h h l h l r h l h h l h l wrhl w h l h h l h l r h h l h h l l wrh w h h l h h l l wrl r h h h l h l l w h h h l h l l
appendix r01uh0198ej0500 rev. 5.00 page 1523 of 1560 mar 18, 2011 sh7080 group external space (normal space) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword r h h h h h h h we w h h h h h h h r h h h h h h h iciowr w h h h h h h h a29 to a0 address addr ess address address a ddress address address d31 to d24 data hi-z hi-z hi-z data hi-z data d23 to d16 hi-z data hi-z hi-z data hi-z data d15 to d8 hi-z hi-z data hi-z hi-z data data d7 to d0 hi-z hi-z hi-z data hi-z data data [legend] r: read w: write enabled: chip select signals corresponding to accessed areas = low. the other chip select signals = high. table c.1 pin states of bus related signals (6) external space (burst rom (clock asynchronous)) 16-bit space pin name 8-bit space upper byte lower byte word/longword cs0 to cs8 enabled enabled enabled enabled ce1a , ce1b , ce2a , ce2b h h h h bs l l l l rasu , rasl h h h h casu , casl h h h h dqmuu h h h h dqmul h h h h dqmlu h h h h dqmll h h h h
appendix page 1524 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group external space (burst rom (clock asynchronous)) 16-bit space pin name 8-bit space upper byte lower byte word/longword ah l l l l frame h h h h r h h h h rdwr w ? ? ? ? r l l l l rd w ? ? ? ? r h h h h iciord w ? ? ? ? r h h h h wrhh w ? ? ? ? r h h h h wrhl w ? ? ? ? r h h h h wrh w ? ? ? ? r h h h h wrl w ? ? ? ? r h h h h we w ? ? ? ? r h h h h iciowr w ? ? ? ? a29 to a0 address a ddress address address d31 to d24 hi-z hi-z hi-z hi-z d23 to d16 hi-z hi-z hi-z hi-z d15 to d8 hi-z data hi-z data d7 to d0 data hi-z data data [legend] r: read w: write enabled: chip select signals corresponding to accessed areas = low. the other chip select signals = high.
appendix r01uh0198ej0500 rev. 5.00 page 1525 of 1560 mar 18, 2011 sh7080 group table c.1 pin states of bus related signals (7) external space (burst rom (clock asynchronous)) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword cs0 to cs8 enabled enabled enabled e nabled enabled enabled enabled ce1a , ce1b , ce2a , ce2b h h h h h h h bs l l l l l l l rasu , rasl h h h h h h h casu , casl h h h h h h h dqmuu h h h h h h h dqmul h h h h h h h dqmlu h h h h h h h dqmll h h h h h h h ah l l l l l l l frame h h h h h h h r h h h h h h h rdwr w ? ? ? ? ? ? ? r l l l l l l l rd w ? ? ? ? ? ? ? r h h h h h h h iciord w ? ? ? ? ? ? ? r h h h h h h h wrhh w ? ? ? ? ? ? ? r h h h h h h h wrhl w ? ? ? ? ? ? ? r h h h h h h h wrh w ? ? ? ? ? ? ? wrl r h h h h h h h w ? ? ? ? ? ? ?
appendix page 1526 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group external space (burst rom (clock asynchronous)) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword r h h h h h h h we w ? ? ? ? ? ? ? r h h h h h h h iciowr w ? ? ? ? ? ? ? a29 to a0 address addr ess address address a ddress address address d31 to d24 data hi-z hi-z hi-z data hi-z data d23 to d16 hi-z data hi-z hi-z data hi-z data d15 to d8 hi-z hi-z data hi-z hi-z data data d7 to d0 hi-z hi-z hi-z data hi-z data data [legend] r: read w: write enabled: chip select signals corresponding to accessed areas = low. the other chip select signals = high. table c.1 pin states of bus related signals (8) external space (burst rom (clock synchronous)) 16-bit space pin name upper byte lower byte word/longword cs0 to cs8 enabled enabled enabled ce1a , ce1b , ce2a , ce2b h h h bs l l l rasu , rasl h h h casu , casl h h h dqmuu h h h dqmul h h h dqmlu h h h dqmll h h h
appendix r01uh0198ej0500 rev. 5.00 page 1527 of 1560 mar 18, 2011 sh7080 group external space (burst rom (clock synchronous)) 16-bit space pin name upper byte lower byte word/longword ah l l l frame h h h r h h h rdwr w ? ? ? r l l l rd w ? ? ? r h h h iciord w ? ? ? r h h h wrhh w ? ? ? r h h h wrhl w ? ? ? r h h h wrh w ? ? ? r h h h wrl w ? ? ? r h h h we w ? ? ? r h h h iciowr w ? ? ? a29 to a0 addres s address address d31 to d24 hi-z hi-z hi-z d23 to d16 hi-z hi-z hi-z d15 to d8 data hi-z data d7 to d0 hi-z data data [legend] r: read w: write enabled: chip select signals corresponding to accessed areas = low. the other chip select signals = high.
appendix page 1528 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table c.1 pin states of bus related signals (9) external space (burst rom (clock synchronous)) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword cs0 to cs8 enabled enabled enabled e nabled enabled enabled enabled ce1a , ce1b , ce2a , ce2b h h h h h h h bs l l l l l l l rasu , rasl h h h h h h h casu , casl h h h h h h h dqmuu h h h h h h h dqmul h h h h h h h dqmlu h h h h h h h dqmll h h h h h h h ah l l l l l l l frame h h h h h h h r h h h h h h h rdwr w ? ? ? ? ? ? ? r l l l l l l l rd w ? ? ? ? ? ? ? r h h h h h h h iciord w ? ? ? ? ? ? ? r h h h h h h h wrhh w ? ? ? ? ? ? ? r h h h h h h h wrhl w ? ? ? ? ? ? ? r h h h h h h h wrh w ? ? ? ? ? ? ? wrl r h h h h h h h w ? ? ? ? ? ? ?
appendix r01uh0198ej0500 rev. 5.00 page 1529 of 1560 mar 18, 2011 sh7080 group external space (burst rom (clock synchronous)) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword r h h h h h h h we w ? ? ? ? ? ? ? r h h h h h h h iciowr w ? ? ? ? ? ? ? a29 to a0 address addr ess address address a ddress address address d31 to d24 data hi-z hi-z hi-z data hi-z data d23 to d16 hi-z data hi-z hi-z data hi-z data d15 to d8 hi-z hi-z data hi-z hi-z data data d7 to d0 hi-z hi-z hi-z data hi-z data data [legend] r: read w: write enabled: chip select signals corresponding to accessed areas = low. the other chip select signals = high. table c.1 pin states of bus related signals (10) external space (sdram) 16-bit space pin name upper byte lower byte word/longword cs0 to cs8 enabled * 1 enabled * 1 enabled * 1 ce1a , ce1b , ce2a , ce2b h h h bs l l l rasu , rasl enabled * 2 enabled * 2 enabled * 2 casu , casl enabled * 2 enabled * 2 enabled * 2 dqmuu h h h dqmul h h h dqmlu l h l dqmll h l l
appendix page 1530 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group external space (sdram) 16-bit space pin name upper byte lower byte word/longword ah l l l frame h h h r h h h rdwr w l l l r h h h rd w h h h r h h h iciord w h h h r h h h wrhh w h h h r h h h wrhl w h h h r h h h wrh w h h h r h h h wrl w h h h r h h h we w h h h r h h h iciowr w h h h a29 to a0 addres s address address d31 to d24 hi-z hi-z hi-z d23 to d16 hi-z hi-z hi-z d15 to d8 data hi-z data d7 to d0 hi-z data data [legend] r: read w: write notes: 1. chip select signals corresponding to accessed areas = low. the other chip select signals = high. 2. rasl / casl = low when address wherein a25 = 0 is accessed. rasu / casu = low when address wherein a25 = 1 is accessed.
appendix r01uh0198ej0500 rev. 5.00 page 1531 of 1560 mar 18, 2011 sh7080 group table c.1 pin states of bus related signals (11) external space (sdram) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword cs0 to cs8 enabled * 1 enabled * 1 enabled * 1 enabled * 1 enabled * 1 enabled * 1 enabled * 1 ce1a , ce1b , ce2a , ce2b h h h h h h h bs l l l l l l l rasu , rasl enabled * 2 enabled * 2 enabled * 2 enabled * 2 enabled * 2 enabled * 2 enabled * 2 casu , casl enabled * 2 enabled * 2 enabled * 2 enabled * 2 enabled * 2 enabled * 2 enabled * 2 dqmuu l h h h l h l dqmul h l h h l h l dqmlu h h l h h l l dqmll h h h l h l l ah l l l l l l l frame h h h h h h h r h h h h h h h rdwr w l l l l l l l r h h h h h h h rd w h h h h h h h r h h h h h h h iciord w h h h h h h h r h h h h h h h wrhh w h h h h h h h r h h h h h h h wrhl w h h h h h h h r h h h h h h h wrh w h h h h h h h wrl r h h h h h h h w h h h h h h h
appendix page 1532 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group external space (normal space) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword r h h h h h h h we w h h h h h h h r h h h h h h h iciowr w h h h h h h h a29 to a0 address addr ess address address a ddress address address d31 to d24 data hi-z hi-z hi-z data hi-z data d23 to d16 hi-z data hi-z hi-z data hi-z data d15 to d8 hi-z hi-z data hi-z hi-z data data d7 to d0 hi-z hi-z hi-z data hi-z data data [legend] r: read w: write notes: 1. chip select signals corresponding to accessed areas = low. the other chip select signals = high. 2. rasl / casl = low when address wherein a25 = 0 is accessed. rasu / casu = low when address wherein a25 = 1 is accessed.
appendix r01uh0198ej0500 rev. 5.00 page 1533 of 1560 mar 18, 2011 sh7080 group table c.1 pin states of bus related signals (12) external space (mpx-i/o) 16-bit space pin name 8-bit space upper byte lower byte word/longword cs0 to cs8 enabled enabled enabled enabled ce1a , ce1b , ce2a , ce2b h h h h bs l l l l rasu , rasl h h h h casu , casl h h h h dqmuu h h h h dqmul h h h h dqmlu h h h h dqmll h h h h ah h h h h frame h h h h r h h h h rdwr w l l l l r l l l l rd w h h h h r h h h h iciord w h h h h r h h h h wrhh w h h h h r h h h h wrhl w h h h h r h h h h wrh w h l h l r h h h h wrl w l h l l we r h h h h w h h h h
appendix page 1534 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group external space (mpx-i/o) 16-bit space pin name 8-bit space upper byte lower byte word/longword r h h h h iciowr w h h h h a29 to a0 address a ddress address address d31 to d24 hi-z hi-z hi-z hi-z d23 to d16 hi-z hi-z hi-z hi-z d15 to d8 hi-z address/da ta address address/data d7 to d0 address/data addres s address/data address/data [legend] r: read w: write enabled: chip select signals corresponding to accessed areas = low. the other chip select signals = high. table c.1 pin states of bus related signals (13) external space (burst mpx-i/o) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword cs0 to cs8 enabled enabled enabled e nabled enabled enabled enabled ce1a , ce1b , ce2a , ce2b h h h h h h h bs l l l l l l l rasu , rasl h h h h h h h casu , casl h h h h h h h dqmuu h h h h h h h dqmul h h h h h h h dqmlu h h h h h h h dqmll h h h h h h h
appendix r01uh0198ej0500 rev. 5.00 page 1535 of 1560 mar 18, 2011 sh7080 group external space (burst mpx-i/o) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword ah l l l l l l l frame l l l l l l l r h h h h h h h rdwr w l l l l l l l r l l l l l l l rd w h h h h h h h r h h h h h h h iciord w h h h h h h h r h h h h h h h wrhh w l h h h l h l r h h h h h h h wrhl w h l h h l h l r h h h h h h h wrh w h h l h h l l r h h h h h h h wrl w h h h l h l l r h h h h h h h we w h h h h h h h r h h h h h h h iciowr w h h h h h h h a29 to a0 address addr ess address address a ddress address address d31 to d24 address/ data address address a ddress address/ data address address/ data d23 to d16 address address/ data address addres s address/ data address address/ data
appendix page 1536 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group external space (burst mpx-i/o) 32-bit space pin name most significant byte second byte third byte least significant byte upper word lower word longword d15 to d8 address address address/ data address addres s address/ data address/ data d7 to d0 address addr ess address address/ data address address/ data address/ data [legend] r: read w: write enabled: chip select signals corresponding to accessed areas = low. the other chip select signals = high. table c.1 pin states of bus related signals (14) external space (pcmcia memory card interface) 16-bit space pin name 8-bit space upper byte lower byte word/longword cs0 to cs8 h h h h ce1a , ce1b , ce2a , ce2b enabled enabled enabled enabled bs l l l l rasu , rasl h h h h casu , casl h h h h dqmuu h h h h dqmul h h h h dqmlu h h h h dqmll h h h h ah l l l l frame h h h h rdwr r h h h h w l l l l
appendix r01uh0198ej0500 rev. 5.00 page 1537 of 1560 mar 18, 2011 sh7080 group external space (pcmcia memory card interface) 16-bit space pin name 8-bit space upper byte lower byte word/longword r l l l l rd w h h h h r h h h h iciord w h h h h r h h h h wrhh w h h h h r h h h h wrhl w h h h h r h h h h wrh w h h h h r h h h h wrl w h h h h r h h h h we w l l l l r h h h h iciowr w h h h h a29 to a0 address a ddress address address d31 to d24 hi-z hi-z hi-z hi-z d23 to d16 hi-z hi-z hi-z hi-z d15 to d8 hi-z data hi-z data d7 to d0 data hi-z data data [legend] r: read w: write enabled: card enable signals corresponding to accessed areas = low. the other card enable signals = high.
appendix page 1538 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group table c.1 pin states of bus related signals (15) external space (pcmcia i/o card interface) 16-bit space pin name 8-bit space upper byte lower byte word/longword cs0 to cs8 h h h h ce1a , ce1b , ce2a , ce2b enabled enabled enabled enabled bs l l l l rasu , rasl h h h h casu , casl h h h h dqmuu h h h h dqmul h h h h dqmlu h h h h dqmll h h h h ah l l l l frame h h h h r h h h h rdwr w l l l l r h h h h rd w h h h h r l l l l iciord w h h h h r h h h h wrhh w h h h h r h h h h wrhl w h h h h r h h h h wrh w h h h h r h h h h wrl w h h h h we r h h h h w h h h h
appendix r01uh0198ej0500 rev. 5.00 page 1539 of 1560 mar 18, 2011 sh7080 group external space (pcmcia i/o card interface) 16-bit space pin name 8-bit space upper byte lower byte word/longword r h h h h iciowr w l l l l a29 to a0 address a ddress address address d31 to d24 hi-z hi-z hi-z hi-z d23 to d16 hi-z hi-z hi-z hi-z d15 to d8 hi-z data hi-z data d7 to d0 data hi-z data data [legend] r: read w: write enabled: card enable signals corresponding to accessed areas = low. the other card enable signals = high.
appendix page 1540 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group d. product code lineup table d.1 product code lineup product type product name classification rom capacity ram capacity application operating temperature product code package (package code) consumer application ? 20 to + 85c r5f70834an80ftv 256 kbytes 16 kbytes industrial application ? 40 to + 85c r5f70834ad80ftv consumer application ? 20 to + 85c r5f70835an80ftv 512 kbytes 32 kbytes industrial application ? 40 to + 85c r5f70835ad80ftv tqfp1414-100 (tfp-100bv) consumer application ? 20 to + 85c r5f70834an80bgv 256 kbytes 16 kbytes industrial application ? 40 to + 85c r5f70834ad80bgv consumer application ? 20 to + 85c r5f70835an80bgv f-ztat version 512 kbytes 32 kbytes industrial application ? 40 to + 85c r5f70835ad80bgv p-lfbga-112 (bp-112v) consumer application ? 20 to + 85c r5m70834an xxxftv * 2 256 kbytes 16 kbytes industrial application ? 40 to + 85c r5m70834ad xxxftv * 2 tqfp1414-100 (tfp-100bv) consumer application ? 20 to + 85c r5m70834an xxxbgv * 2 mask rom version 256 kbytes 16 kbytes industrial application ? 40 to + 85c r5m70834ad xxxbgv * 2 p-lfbga-112 (bp-112v) consumer application ? 20 to + 85c r5s70830an80ftv 0 kbyte 16 kbytes industrial application ? 40 to + 85c r5s70830ad80ftv tqfp1414-100 (tfp-100bv) consumer application ? 20 to + 85c r5s70830an80bgv rom-less version 0 kbyte 16 kbytes industrial application ? 40 to + 85c r5s70830ad80bgv p-lfbga-112 (bp-112v) sh7083 f-ztat version supporting full functions of e10a * 1 512 kbytes 32 kbytes for system development only * 1 0 to + 50c r5e70835rn80ftv tqfp1414-100 (tfp-100bv) consumer application ? 20 to + 85c r5f70844an80fpv 256 kbytes 16 kbytes industrial application ? 40 to + 85c r5f70844ad80fpv consumer application ? 20 to + 85c r5f70845an80fpv f-ztat version 512 kbytes 32 kbytes industrial application ? 40 to + 85c r5f70845ad80fpv consumer application ? 20 to + 85c r5m70844an xxxfpv * 2 mask rom version 256 kbytes 16 kbytes industrial application ? 40 to + 85c r5m70844ad xxxfpv * 2 consumer application ? 20 to + 85c r5s70840an80fpv sh7084 rom-less version 0 kbyte 16 kbytes industrial application ? 40 to + 85c r5s70840ad80fpv lqfp2020-112 (fp-112ev) f-ztat version supporting full functions of e10a * 1 512 kbytes 32 kbytes for system development only * 1 0 to + 50c r5e70845rn80fpv
appendix r01uh0198ej0500 rev. 5.00 page 1541 of 1560 mar 18, 2011 sh7080 group product type product name classification rom capacity ram capacity application operating temperature product code package (package code) consumer application ? 20 to + 85c r5f70854an80fpv 256 kbytes 16 kbytes industrial application ? 40 to + 85c r5f70854ad80fpv consumer application ? 20 to + 85c r5f70855an80fpv f-ztat version 512 kbytes 32 kbytes industrial application ? 40 to + 85c r5f70855ad80fpv consumer application ? 20 to + 85c r5m70854an xxxfpv * 2 mask rom version 256 kbytes 16 kbytes industrial application ? 40 to + 85c r5m70854ad xxxfpv * 2 consumer application ? 20 to + 85c r5s70850an80fpv rom-less version 0 kbyte 16 kbytes industrial application ? 40 to + 85c r5s70850ad80fpv sh7085 f-ztat version supporting full functions of e10a * 1 512 kbytes 32 kbytes for system development only * 1 0 to + 50c r5e70855rn80fpv lqfp2020-144 (fp-144lv) sh7086 consumer application ? 20 to + 85c r5f70865an80fpv f-ztat version 512 kbytes 32 kbytes industrial application ? 40 to + 85c r5f70865ad80fpv lqfp2424-176 (fp-176ev) f-ztat version supporting full functions of e10a * 1 for system development only * 1 0 to + 50c r5e70865rn80fpv notes: 1. these products are only used for system development by the customer, and e10a internal bus trace function and aud functi on are available. however, normal f-ztat version or mask rom version must be used in mass production. in normal f-ztat version, the e10a internal bus trace function and aud function are not available. the reliability is not is not guaranteed in the f-ztat version supporting full functions of e10a. 2. xxx indicates the rom code.
appendix page 1542 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group e. package dimensions the package dimension that is shown in the renesas semiconductor package data book has priority. note) 1. dimensions" * 1"and" * 2" do not include mold flash 2. dimension" * 3"does not include trim offset. 1.00 1.00 0.08 0.10 0.5 8 0 15.8 16.0 16.2 0.15 0.20 1.20 0.20 0.10 0.00 0.27 0.22 0.17 0.22 0.17 0.12 e h e l a 1 d e a 2 h d a b p b 1 c x y z d z e l 1 c 1 0.6 0.5 0.4 max nom min dimension in millimeters symbol reference 14 1.00 16.2 16.0 15.8 1.0 14 previous code jeita package code renesas code ptqp0100ka-a tfp-100b/tfp-100bv mass[typ.] 0.5g p-tqfp100-14x14-0.50 detail f c l a terminal cross section c s s y index mark * 1 * 2 * 3 100 1 f xm 26 25 76 75 50 51 e d e b 1 c 1 b p a 1 a 2 l 1 h d z d b p h e z e figure e.1 tfp-100bv
appendix r01uh0198ej0500 rev. 5.00 page 1543 of 1560 mar 18, 2011 sh7080 group detail f a l c terminal cross section b p c 1 b 1 c s s e y index mark 1 28 29 56 57 84 85 112 f * 3 * 1 * 2 e z d z e h d d h e b p 2. 1. dimensions " * 1" and " * 2" do not include mold flash. note) dimension " * 3" does not include trim offset. l 1 z e z d c 1 b 1 b p a 1 h e h d y 0.10 e 8 0 0.65 c x l 0.35 0.5 0.65 0.05 0.1 0.15 a 1.7 21.8 22.0 22.2 21.8 22.0 22.2 a 2 1.4 e 19.9 20.0 20.1 d 19.9 20.0 20.1 reference symbol dimension in millimeters min nom max 0.27 0.32 0.37 0.09 0.145 0.20 0.13 1.225 1.225 0.30 0.125 1.0 p-lqfp112-20x20-0.65 1.2g mass[typ.] fp-112e/fp-112ev plqp0112ja-a renesas code jeita package code previous code m a 1 a 2 l 1 figure e.2 fp-112ev
appendix page 1544 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group terminal cross section b 1 c 1 b p c 1.0 0.125 0.20 1.25 1.25 0.08 0.20 0.145 0.09 0.27 0.22 0.17 max nom min dimension in millimeters symbol reference 20.1 20.0 19.9 d 20.1 20.0 19.9 e 1.4 a 2 22.2 22.0 21.8 22.2 22.0 21.8 1.7 a 0.15 0.1 0.05 0.65 0.5 0.35 l x 8 0 c 0.5 e 0.10 y h d h e a 1 b p b 1 c 1 z d z e l 1 p-lqfp144-20x20-0.50 1.2g mass[typ.] 144p6q-a / fp-144l / fp-144lv plqp0144ka-a renesas code jeita package code previous code f 1 36 37 72 73 108 109 144 * 1 * 2 * 3 x index mark h e e d h d b p z d z e detail f c a l a 1 a 2 l 1 2. 1. dimensions " * 1" and " * 2" do not include mold flash. note) dimension " * 3" does not include trim offset. e y s s figure e.3 fp-144lv
appendix r01uh0198ej0500 rev. 5.00 page 1545 of 1560 mar 18, 2011 sh7080 group note) 1. dimensions " * 1" and " * 2" do not include mold flash. 2. dimension " * 3" does not include trim offset. dimension in millimeters reference symbol min nom max b p b 1 c 1 c * 2 e h e * 1 d h d terminal cross section detail f c l f m s s y e l 1 a 1 a 2 a x b p * 3 index mark z d z e 1 176 133 132 89 88 45 44 23.9 24.0 24.1 23.9 24.0 1.4 24.1 25.8 26.0 26.2 25.8 26.0 26.2 0.05 0.1 0.18 0.15 0.15 0.20 0.25 0.09 0.145 0.125 0.5 1.0 1.25 1.25 0 8 0.20 0.35 0.5 0.65 0.08 0.10 1.7 jeita package code renesas code previous code mass[typ.] p-lqfp176-24x24-0.50 plqp0176kb-a 176p6q-a/fp-176e/fp-176ev 1.8g l 1 c 1 b 1 a 1 a 2 a b p h e e d h d z e z d l y x e c figure e.4 fp-176ev
appendix page 1546 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group l k j h g f e d c b 11 10 9 8 7 6 5 4 3 2 1 ys v b w s a w s ys s b a a 1 1 a a p l b g 0112 g a - a p -lf b g a112 - 10x10 - 0 . 80 d e s d s e z d z e z d z e mass [t yp .] 0 . 3g bp - 112 / bp - 112v r ene sas code j eit a package code prev i ous code 0 . 15 0 . 20 0 . 2 y 1 1 . 00 1 . 00 w v 0 . 08 10 . 00 1 .4 0 0 .4 5 0 .4 0 0 . 35 0 . 55 0 . 50 0 .4 5 0 . 80 0 . 10 10 . 00 y x b a reference symbo l d i mens i on i n m illi meters m i n n om max a 1 e e e b a s b m 4 d e figure e.5 bp-112v
main revisions for this edition r01uh0198ej0500 rev. 5.00 page 1547 of 1560 mar 18, 2011 sh7080 group main revisions for this edition item page revision (see manual for details) 5.7 stack states after exception handling ends table 5.11 stack status after exception handling ends 101 table amended sp sr 32 bits 32 bits start address of general illegal instruction 11.3.32 timer waveform control register (twcr) 516 table amended bit bit name initial value r/w description 0 wre 0 r/(w) initial output suppression enable selects the waveform output when synchronous counter clearing occurs in complementary pwm mode. the initial output is suppressed only when synchronous clearing occurs within the tb interval at the trough in complementary pwm mode. when synchronous clearing occurs outside this interval, the initial value specified in tocr is output regardless of the wre bit setting. the initial value is also output when synchronous clearing occurs in the tb interval at the trough immediately after tcnt_3 and tcnt_4 start operation. for the tb interval at the trough in complementary pwm mode, see figure 11.40. 0: outputs the initial value specified in tocr 1: suppresses initial output [setting condition] ? when 1 is written to wre after reading wre = 0 11.4.8 complementary pwm mode outline of complementary pwm mode operation: 571 description added 14. output waveform control at synchronous counter clearing in complementary pwm mode ??.. when using the initial output suppression function, make sure to set compare registers tgrb_3, tgra_4, and tgrb_4 to a value twice or more the setting of dead time data register tddr. if synchronous clearing occurs with the compare registers set to a value less than twice the setting of tddr, the pwm output dead time may be too short (or nonexistent) or illegal active- level pwm negative-phase output may occur during the initial output suppression interval. for details, see 11.7.23, notes on output waveform control during synchronous counter clearing in complementary pwm mode.
main revisions for this edition page 1548 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group item page revision (see manual for details) 11.4.11 external pulse width measurement figure 11.88 example of external pulse width measurement (measuring high pulse width) 603 figure amended 0000 tic5u tcntu_5 mp 11.7.23 notes on output waveform control during synchronous counter clearing in complementary pwm mode 640, 641 newly added 14.5 interrupt source 726 newly added 15.4.5 multiprocessor serial data transmission figure 15.16 sample multiprocessor serial transmission flowchart 781 description amended for an id transmission cycle, set the mpbt bit in scssr to 1 before transmission. maintain the mpbt value at 1 until the id transmission actually completes. for a data transmission cycle, clear the mpbt bit in scssr to 0 before transmission. all other sci operations are the same as those in asynchronous mode. figure 15.16 sample multiprocessor serial transmission flowchart 781 figure amended no [1] yes initialization start transmission read tdre flag in scssr [2] no yes read tend flag in scssr [3] tdre = 1? all data transmitted? clear tdre flag to 0 [1] sci initialization: set the txd pin using the pfc. after the te bit is set to 1, 1 is output for one frame, and transmission is enabled. however, data is not transmitted. [2] sci status check and transmit data write: read scssr and check that the tdre flag is set to 1, then write transmit data to sctdr. set the mpbt bit in scssr to 0 or 1. finally, clear the tdre flag to 0. to transmit an id after the sci is initialized, write the id to sctdr. the data is immediately transferred to sctsr and the tdre flag is set to 1. at this point the id has not yet been transmitted from the txd pin, so it is necessary to maintain the mpbt value at 1. clear the mpbt bit to 0 after the next data to be transmitted is written to sctdr and the tdre flag is set to 1. write transmit data to sctdr and set mpbt bit in scssr
main revisions for this edition r01uh0198ej0500 rev. 5.00 page 1549 of 1560 mar 18, 2011 sh7080 group item page revision (see manual for details) 17.3.5 ss status register (sssr) 874 table amended bit bit name initial value r/w description 3 tend 0 r/w transmit end [setting conditions] ? when the last bit of transmit data is transmitted while the tendsts bit in sscr2 is cleared to 0 and the tdre bit is set to 1 ? after the last bit of transmit data is transmitted while the tendsts bit in sscr2 is set to 1 and the tdre bit is set to 1 [clearing conditions] ? when writing 0 after reading tend 1 ? when writing data to sstdr with fclrm = 1 2 tdre 1 r/w transmit data empty indicates whether or not sstdr contains transmit data. [setting conditions] ? when the te bit in sser is 0 ? when data is transferred from sstdr to sstrsr and sstdr is ready to be written to. [clearing conditions] ? when writing 0 after reading tdre 1 ? when writing data to sstdr with te = 1 and fclrm = 1 ? when the dtc is activated by an sstxi interrupt and transmit data is written to sstdr while the disel bit in mrb of the dtc is 0 (except when dtc transfer counter value is h'0000) 1 rdrf 0 r/w receive data register full indicates whether or not ssrdr contains receive data. [setting condition] ? when receive data is transferred from sstrsr to ssrdr after successful serial data reception [clearing conditions] ? when writing 0 after reading rdrf 1 ? when reading receive data from ssrdr with fclrm = 1 ? when the dtc is activated by an ssrxi interrupt and receive data is read into ssrdr while the disel bit in mrb of the dtc is 0 (except when dtc transfer counter value is h'0000)
main revisions for this edition page 1550 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group item page revision (see manual for details) 17.4.5 ssu mode (2) data transmission figure 17.6 flowchart example of data transmission (ssu mode) 889 figure amended yes start [1] [2] initial setting read tdre in sssr tdre = 1? no write transmit data to sstdr (4) data transmission/reception figure 17.9 flowchart example of simultaneous transmission/reception (ssu mode) 893 figure amended yes start initial setting [1] [2] read tdre in sssr. tdre = 1? no write transmit data to sstdr 17.4.7 clock synchronous communication mode (2) data transmission figure 17.14 flowchart example of transmission operation (clock synchronous communication mode) 898 figure amended yes start [1] [2] initial setting read tdre in sssr tdre = 1? no write transmit data to sstdr (4) data transmission/reception figure 17.17 flowchart example of simultaneous transmission/reception (clock synchronous communication mode) 901 figure amended yes start initial setting [1] [2] read tdre in sssr. tdre = 1? no write transmit data to sstdr
main revisions for this edition r01uh0198ej0500 rev. 5.00 page 1551 of 1560 mar 18, 2011 sh7080 group item page revision (see manual for details) 18.3.1 i 2 c bus control register 1 (iccr1) 909 table amended bit bit name initial value r/w description 7 ice 0 r/w i 2 c bus interface 2 enable 0: scl and sda output is disabled. (input to scl and sda is enabled) 1: this bit is enabled for transfer operations. (scl and sda pins are bus drive state.) 18.3.2 i 2 c bus control register 2 (iccr2) 913 table amended bit bit name initial value r/w description 3 sclo 1 r scl output level this bit monitors scl output level. when sclo is 1, scl pin outputs high. when sclo is 0, scl pin outputs low. 18.4.8 using the iicrst bit to reset i 2 c bus interface 2 939 newly added 18.8.2 issuance of stop condition and repeated start condition 947 description deleted a stop condition or repeated start condition should be issued after the fall of the ninth clock pulse is recognized. the fall of the ninth clock pulse can be recognized by checking the sclo bit in the i 2 c bus control register 2 (iccr2). 18.8.6 access to ice and iicrst bits during i 2 c bus operations 948 newly added 18.8.7 using the iicrst bit to initialize the registers 949 newly added 18.8.8 operation of i 2 c bus interface 2 while ice = 0 949 newly added 20.4.1 cmt interrupt sources and dtc activation table 20.2 interrupt source 987 newly added
main revisions for this edition page 1552 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 sh7080 group item page revision (see manual for details) 23.4.3 programming/erasing interface parameters (2) programming/erasing initialization 1246 description amended (2.1) flash programming/erasing frequency parameter (fpefeq: general register r4 of cpu) this parameter sets the operating frequency of the cpu. for the range of the operating frequency of this lsi, see table 28.5, maximum operating frequency. 28.5 flash memory characteristics table 28.22 flash memory characteristics 1483 table amended item symbol min. typ. max. unit programming time * 1 * 2 * 4 t p ? 1 20 ms/128 bytes ? 40 280 ms/4-kbyte block ? 300 1500 ms/32-kbyte block erase time * 1 * 2 * 4 t e ? 600 3000 ms/64-kbyte block ? 4.6 24 s/512 kbytes programming time (total) * 1 * 2 * 4 t p ? 2.3 12 s/256 kbytes ? 4.6 24 s/512 kbytes erase time (total) * 1 * 2 * 4 t e ? 2.3 12 s/256 kbytes ? 9 .2 48 s/512 kbytes programming and erase time (total) * 1 * 2 * 4 t pe ? 4.6 24 s/256 kbytes reprogramming count n wec 500 * 3 ?? times
mar 18, 2011 page 1553 of 1560 r01uh0198ej0500 rev. 5.00 index a a/d conversion time............................... 971 a/d converter (adc) ............................. 951 a/d converter activation......................... 610 a/d converter characteristics................ 1482 a/d converter interrupt source ............... 974 a/d converter start request delaying function................................................... 593 absolute accuracy................................... 975 absolute maximum ratings................... 1411 ac bus timing....................................... 1426 ac characteristics................................. 1419 ac characteristics measurement conditions.............................................. 1481 access in view of lsi internal bus master ............................................... 376 access size and data alignment .............. 285 access wait control................................. 294 address error .......................... 93, 102, 1334 address map ........................................... 222 address multiplexing.............................. 305 addressing modes..................................... 32 arithmetic operation instructions ............. 45 asynchronous mode ............... 727, 760, 835 auto-refreshing....................................... 331 auto-request mode.................................. 399 b bank active ............................................. 323 basic timing for i/o card interface ......... 349 basic timing for ic memory card interface .................................................. 345 bit synchronou s circuit ........................... 948 block transf er mode................................ 198 boot m ode............................................. 1260 branch instructions ................................... 49 break comparison conditions.................. 135 break detection and processing............... 789 break on data access cycle...................... 161 break on instruction fetch cycle.............. 160 burst m ode .............................................. 412 burst mpx-i/o interface......................... 351 burst rom (clock asynchronous) interface .................................................. 337 burst rom (clock synchronous) interface .................................................. 356 burst write............................................... 321 bus arbitr ation......................................... 370 bus clock (b ) .......................................... 67 bus mode and channel priority ............... 414 bus release state ........................................ 53 bus state controller (bsc) ...................... 217 c calculating exception handling vector table addresses................................ 90 chain transfer.......................................... 199 changing frequency .................................. 81 clock (mi ) for the mtu2s module ........ 67 clock (mp ) for the mtu2 module ......... 67 clock frequency control circuit................. 69 clock operating mode ............................... 72 clock pulse generator (cpg) .................... 67 clock synchronous mode ........ 727, 770, 846 clock synchronous serial format (i 2 c2).. 934 clock ti ming ......................................... 1420 cmt interrupt sources .................. 987, 1551 compare match timer (cmt) ................. 981 complementary pwm mode .................. 549 conflict between nmi interrupt and dmac activation.................................... 422 conflict between nmi interrupt and dtc activation........................................ 215 connecting crystal resonator..................... 82
page 1554 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 continuous scan mode............................ 968 control signal timing ............................ 1423 cpu .......................................................... 23 crystal oscillator....................................... 69 csn assert period extension.................... 296 cycle-steal mode .................................... 410 d data transfer controller (dtc) ............... 171 data transfer instructions.......................... 43 dc characteristics................................. 1412 dead time compensation ........................ 604 deep software standby mode................ 1349 direct memory access controller (dmac) ................................................. 383 divider...................................................... 69 dma transfer by peripheral modules ..... 421 dma transfer requests............................ 399 dma transfer types ................................ 406 dtc activation by interrupt.................... 210 dtc activation sources .......................... 184 dtc bus release timing .......................... 206 dtc execution status.............................. 204 dtc vector address ................................ 186 dtc/dmac activation .......................... 609 dual address mode.................................. 407 e error prot ection .................................... 1280 exception handling ................................... 87 exception handling state........................... 53 external clock input method ..................... 83 external pulse width measurement ......... 603 external request mode ............................ 399 external trigger input timing .................. 972 f features of instructions............................. 29 fixed m ode ............................................. 402 flash memory ....................................... 1223 flash memory characteristics................ 1483 flash memory configuration ................. 1229 flash memory emulation in ram ........ 1282 flow of the user break operation............. 159 full-scale error........................................ 975 function for detecting oscillator stop........ 84 g general illegal instructions ....................... 98 general registers ....................................... 25 global-base register (gbr) ...................... 26 h hardware protection.............................. 1279 i i/o ports ................................................ 1169 i 2 c bus format ......................................... 924 i 2 c bus interface 2 (i 2 c2)........................ 905 illegal slot instructions.............................. 98 immediate data formats............................. 29 influences on absolute accuracy ............. 978 initial user branch processing time ....... 1289 initial values of control register ................ 27 initial values of general register................ 27 initial values of system register ................ 27 initiation intervals of user branch processing ............................................. 1289 instruction formats .................................... 35 instruction set............................................ 39 interrupt controller (intc) ..................... 105 interrupt exception handling vector table......................................................... 123 interrupt priority ....................................... 96 interrupt response time ........................... 131 interrupt se quence................................... 127 interrupts................................................... 95 irq interrupts ......................................... 121
r01uh0198ej0500 rev. 5.00 page 1555 of 1560 mar 18, 2011 l list of re gisters ..................................... 1353 location of transfer information and dtc vector table .................................... 184 logic operation instructions ..................... 47 m manual reset ............................................. 92 mask rom ........................................... 1331 mcu extension mode ............................... 57 mcu operating modes.............................. 55 module stan dby m ode........................... 1350 module standby mode setting ........ 213, 791, .......................861, 903, 947, 978, 989, 1334 mpx-i/o interface .................................. 297 mtu2 functions ..................................... 428 mtu2 interrupts ..................................... 608 mtu2 output pin initialization ............... 642 mtu2?mtu2s synchronous operation ................................................. 597 mtu2s functions ................................... 676 multi-function timer pulse unit 2 (mtu2)................................................... 427 multi-function timer pulse unit 2s (mtu2s) ................................................ 675 multiply and accumulate registers (mach and macl) ................................ 27 multiprocessor communication function................................................... 779 n nmi interrupt.......................................... 121 noise filter .............................................. 938 nonlinearity error ................................... 975 normal space interface ........................... 288 normal transf er mode ............................. 195 note on changing operating mode ............ 65 note on crystal resonator .......................... 85 notes on board design ...................... 85, 979 notes on connecting v cl capacitor....... 1484 notes on noise countermeasures ............. 980 notes on output from dack pin ............ 421 notes on register access (wdt) ............. 723 notes on slot illegal instruction exception handling .................................. 103 o offset error.............................................. 975 on-board progra mming mode............... 1260 on-chip peripheral module interrupts ..... 122 on-chip peripheral module request mode........................................................ 401 operating clock for each module .............. 70 p package dimensions .............................. 1542 pc trace................................................... 163 pcmcia interface .................................. 344 peripheral clock (p )................................. 67 permissible signal source impedance...... 978 pin function controller (pfc).................. 993 pin states of bus related signals............. 1516 pin states of this lsi in each processing state ..................................... 1485 port output enable (poe) ........................ 683 power-down modes............................... 1335 power-down state...................................... 53 power-on reset .......................................... 91 power-on sequence ................................. 334 procedure register (pr)............................. 27 product code lineup............................... 1540 program counter (pc) ............................... 27 program execution state ............................ 53 programmer mode................................. 1329 q quantization error ................................... 975 r ram ..................................................... 1333
page 1556 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 range of analog power supply and other pin se ttings..................................... 979 register adcr ................................................. 959 adcsr............................................... 956 addr0 to addr15 .......................... 955 adtsr ............................................... 962 bamra ............................................. 140 bamrb.............................................. 146 bara ................................................. 140 barb ................................................. 145 bbra ................................................. 141 bbrb ................................................. 149 bdmra ............................................. 144 bdmrb.............................................. 148 bdra ................................................. 143 bdrb ................................................. 147 betr.................................................. 156 brcr ................................................. 151 brdr ................................................. 158 brsr.................................................. 157 bscehr............................. 183, 279, 396 chcr ................................................. 389 cmcnt .............................................. 985 cmcor.............................................. 985 cmcsr .............................................. 983 cmncr.............................................. 242 cmstr............................................... 983 cra.................................................... 178 crb .................................................... 179 cs0bcr to cs8bcr ......................... 244 cs0wcr to cs8wcr ....................... 249 dar (dmac) .................................... 388 dar (dtc) ........................................ 177 dmaor ............................................. 394 dmatcr ........................................... 388 dpfr ................................................ 1244 dtccr............................................... 181 dtcera to dtcere........................ 180 dtcvbr............................................ 183 fccs................................................. 1236 febs................................................. 1255 fecs................................................. 1239 fkey ................................................ 1240 fmats ............................................. 1241 fmpar............................................. 1250 fmpdr............................................. 1251 fpcs ................................................. 1239 fpefeq .................................. 1246, 1552 fpfr ............................. 1249, 1252, 1256 frqcr ................................................. 77 ftdar ............................................. 1242 fubra ............................................. 1247 hcpcr ............................................. 1165 iccr1 ....................................... 909, 1551 iccr2 ....................................... 912, 1551 icdrr ................................................ 922 icdrs................................................. 922 icdrt ................................................ 922 icier .................................................. 916 icmr .................................................. 914 icr0.................................................... 109 icsr ................................................... 918 icsr1 ................................................. 688 icsr2 ................................................. 693 icsr3 ................................................. 698 ifcr ................................................. 1167 ipra to iprf and iprh to iprm ...... 118 irqcr ................................................ 110 irqsr................................................. 113 mra ................................................... 174 mrb ................................................... 175 nf2cyc ............................................. 923 ocsr1 ................................................ 692 ocsr2 ................................................ 697 osccr ................................................. 80 pacrh1 ........................................... 1049 pacrh2 ........................................... 1049 pacrh3 ........................................... 1049 pacrh4 ........................................... 1049
r01uh0198ej0500 rev. 5.00 page 1557 of 1560 mar 18, 2011 pacrl1 ........................................... 1049 pacrl2 ........................................... 1049 pacrl3 ........................................... 1049 pacrl4 ........................................... 1049 padrh............................................. 1174 padrl ............................................. 1174 paiorh ........................................... 1048 paiorl............................................ 1048 paprh ............................................. 1180 paprl.............................................. 1180 pbcrl1............................................ 1087 pbcrl2............................................ 1087 pbcrl3............................................ 1087 pbdrl ............................................. 1186 pbiorl ............................................ 1087 pbprl .............................................. 1189 pccrh 1 ........................................... 1098 pccrh 2 ........................................... 1098 pccrh 3 ........................................... 1098 pccrl1............................................ 1098 pccrl2............................................ 1098 pccrl3............................................ 1098 pccrl4............................................ 1098 pcdrh............................................. 1193 pcdrl ............................................. 1193 pciorh............................................ 1097 pciorl ............................................ 1097 pcprh.............................................. 1196 pcprl .............................................. 1196 pdcrh1........................................... 1113 pdcrh2........................................... 1113 pdcrh3........................................... 1113 pdcrh4........................................... 1113 pdcrl1 ........................................... 1113 pdcrl2 ........................................... 1113 pdcrl3 ........................................... 1113 pdcrl4 ........................................... 1113 pddrh............................................. 1201 pddrl ............................................. 1201 pdiorh ........................................... 1112 pdiorl ............................................ 1112 pdprh.............................................. 1204 pdprl .............................................. 1204 pecrh1............................................ 1134 pecrh2............................................ 1134 pecrl1 ............................................ 1134 pecrl2 ............................................ 1134 pecrl3 ............................................ 1134 pecrl4 ............................................ 1134 pedrh ............................................. 1211 pedrl.............................................. 1211 peiorh ............................................ 1133 peiorl ............................................ 1133 peprh .............................................. 1215 peprl .............................................. 1215 pfdrl .............................................. 1220 poecr1.............................................. 701 poecr2.............................................. 703 ramcr ............................................ 1345 ramer ............................................ 1258 rtcnt ............................................... 277 rtcor ............................................... 278 rtcsr................................................ 275 sar (dmac) ..................................... 387 sar (dtc) ......................................... 177 sar (i 2 c2).......................................... 921 scbrr (s ci)...................................... 747 scbrr (s cif).................................... 814 scfcr ................................................ 825 scfdr................................................ 828 scfrdr ............................................. 797 scfsr ................................................ 806 scftdr ............................................. 798 sclsr ................................................ 832 scrdr ............................................... 731 scrsr (sci) ...................................... 731 scrsr (scif) .................................... 796 scscr (sci) ...................................... 735 scscr (scif) .................................... 801 scsdcr ............................................. 746
page 1558 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011 scsmr (sci) ..................................... 732 scsmr (scif)................................... 798 scsptr (sci).................................... 744 scsptr (scif).................................. 829 scssr ................................................ 738 sctdr ............................................... 732 sctsr (sci) ...................................... 731 sctsr (scif).................................... 797 sdcr.................................................. 272 spoer................................................ 700 sscr2 ................................................ 876 sscrh ............................................... 867 sscrl ................................................ 869 sser................................................... 871 ssmr ................................................. 870 ssrdr0 to ssrdr3.......................... 878 sssr......................................... 873, 1549 sstdr0 to sstdr3 .......................... 877 sstrsr.............................................. 879 stbcr1 ........................................... 1338 stbcr2 ........................................... 1339 stbcr3 ........................................... 1340 stbcr4 ........................................... 1341 stbcr5 ........................................... 1343 stbcr6 ........................................... 1344 tadcobra_4 .................................. 486 tadcobrb_4 .................................. 486 tadcora_4..................................... 486 tadcorb_4 ..................................... 486 tadcr............................................... 483 tbter ............................................... 511 tbtm ................................................. 478 tcbr.................................................. 508 tcdr ................................................. 507 tcnt.................................................. 487 tcntcmpclr.................................. 464 tcnts ............................................... 506 tcr .................................................... 438 tcsystr........................................... 492 tddr ................................................. 507 tder.................................................. 513 tgcr.................................................. 504 tgr .................................................... 487 ticcr................................................. 479 tier ................................................... 465 tior ................................................... 445 titcnt .............................................. 510 titcr................................................. 508 tmdr................................................. 442 tocr1................................................ 497 tocr2................................................ 500 toer.................................................. 496 tolbr ............................................... 503 trwer .............................................. 495 tsr ..................................................... 470 tstr................................................... 488 tsycr ............................................... 481 tsyr .................................................. 490 twcr....................................... 514, 1547 wtcnt .............................................. 720 wtcsr............................................... 721 register address table (in the order from lower addresses) ...... 1354 register bit list ...................................... 1369 register data format.................................. 28 register states in each operating mode ..................................................... 1397 relationship between refresh requests and bus cycles ......................................... 334 repeat transfer mode .............................. 196 reset state ................................................. 53 reset-synchronized pwm mode............. 546 risc-type ................................................. 29 round-robi n mode .................................. 402 s sci interrupt sources............................... 786 scif interrupt sources ............................ 854 scsptr and sci pins ............................ 786 scsptr and scif pins .......................... 855
r01uh0198ej0500 rev. 5.00 page 1559 of 1560 mar 18, 2011 self-refreshing ........................................ 332 sending a break signal ............................ 789 sequential break ..................................... 162 serial communication interface (sci) .... 727 serial communication interface with fifo (scif) ................................... 793 shift instructions....................................... 48 single addr ess mode ............................... 409 single chip mode ...................................... 57 single mode ............................................ 968 single read .............................................. 320 single write............................................. 323 single-cycle scan mode .......................... 969 sleep m ode ........................................... 1346 software protection............................... 1280 software standby mode......................... 1347 sram interface with byte selection ....... 339 ssu interrupt sources ............................. 902 ssu mode ............................................... 885 stack after interrupt exception handling .................................................. 130 stack states after exception handling ends .......................................... 100 status register (sr) ................................... 25 synchronous serial communication unit (ssu) ............................................... 863 system control instructions....................... 50 t target pins and conditions for high- impedance control ................................... 709 the address map for the operating modes ........................................................ 58 transfer clock ......................................... 880 transfer information read skip function . 194 transfer information writeback skip function ................................................... 195 trap instructions ....................................... 97 u user boot mode ..................................... 1274 user break controller (ubc)................... 135 user break interrupt ................................ 122 user mat ............................................. 1230 user progra m mode............................... 1264 using interval timer mode....................... 725 using watchdog timer mode ................... 724 v vector numbers and vector table address offsets........................................................ 89 vector-base register (vbr) ...................... 26 w wait between access cycles .................... 357 watchdog timer (wdt) .......................... 717
page 1560 of 1560 r01uh0198ej0500 rev. 5.00 mar 18, 2011
renesas 32-bit risc microcomputer sh7080 group user's manual: hardware publication date: rev.1.00, march 29, 2005 rev.5.00, march 18, 2011 published by: renesas electronics corporation
http://www.renesas.com refer to "http://www.renesas.com/" for the latest and detailed information. renesas electronics america inc. 2880 scott boulevard santa clara, ca 95050-2554, u.s.a. tel: +1-408-588-6000, fax: +1-408-588-6130 renesas electronics canada limited 1101 nicholson road, newmarket, ontario l3y 9c3, canada tel: +1-905-898-5441, fax: +1-905-898-3220 renesas electronics europe limited dukes meadow, millboard road, bourne end, buckinghamshire, sl8 5fh, u.k tel: +44-1628-585-100, fax: +44-1628-585-900 renesas electronics europe gmbh arcadiastrasse 10, 40472 dsseldorf, germany tel: +49-211-65030, fax: +49-211-6503-1327 renesas electronics (china) co., ltd. 7th floor, quantum plaza, no.27 zhichunlu haidian district, beijing 100083, p.r.china tel: +86-10-8235-1155, fax: +86-10-8235-7679 renesas electronics (shanghai) co., ltd. unit 204, 205, azia center, no.1233 lujiazui ring rd., pudong district, shanghai 200120, china tel: +86-21-5877-1818, fax: +86-21-6887-7858 / -7898 renesas electronics hong kong limited unit 1601-1613, 16/f., tower 2, grand century place, 193 prince edward road west, mongkok, kowloon, hong kong tel: +852-2886-9318, fax: +852 2886-9022/9044 renesas electronics taiwan co., ltd. 7f, no. 363 fu shing north road taipei, taiwan tel: +886-2-8175-9600, fax: +886 2-8175-9670 renesas electronics singapore pte. ltd. 1 harbourfront avenue, #06-10, keppel bay tower, singapore 098632 tel: +65-6213-0200, fax: +65-6278-8001 renesas electronics malaysia sdn.bhd. unit 906, block b, menara amcorp, amcorp trade centre, no. 18, jln persiaran barat, 46050 petaling jaya, selangor darul ehsan, malaysia tel: +60-3-7955-9390, fax: +60-3-7955-9510 renesas electronics korea co., ltd. 11f., samik lavied' or bldg., 720-2 yeoksam-dong, kangnam-ku, seoul 135-080, korea tel: +82-2-558-3737, fax: +82-2-558-5141 sales offices ? 2011 renesas electronics corporation. all rights reserved. colophon 1.0

sh7080 group user's manual: hardware r01uh0198ej0500 (previous number: rej09b0181-0400)


▲Up To Search▲   

 
Price & Availability of DF70854AD80FPV

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X