0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
TMP92CA25FG

TMP92CA25FG

  • 厂商:

    TOSHIBA(东芝)

  • 封装:

  • 描述:

    TMP92CA25FG - Original CMOS 32-Bit Microcontroller - Toshiba Semiconductor

  • 数据手册
  • 价格&库存
TMP92CA25FG 数据手册
TOSHIBA Original CMOS 32-Bit Microcontroller TLCS-900/H1 Series TMP92CA25FG Semiconductor Company Preface Thank you very much for making use of Toshiba microcomputer LSIs. Before use this LSI, refer the section, “Points of Note and Restrictions”. TMP92CA25 CMOS 32-bit Microcontroller TMP92CA25FG/JTMP92CA25 1. Outline and Device Characteristics The TMP92CA25 is a high-speed advanced 32-bit Microcontroller developed for controlling equipment which processes mass data. The TMP92CA25 has a high-performance CPU (900/H1 CPU) and various built-in I/Os. The TMP92CA25FG is housed in a 144-pin flat package. The JTMP92CA25 is a chip form product. Device characteristics are as follows: (1) CPU: 32-bit CPU (900/H1 CPU) • • • • Compatible with TLCS-900/L1 instruction code 16 Mbytes of linear address space General-purpose register and register banks Micro DMA: 8 channels (250 ns/4 bytes at fSYS = 20 MHz, best case) (2) Minimum instruction execution time: 50 ns (at fSYS = 20 MHz) RESTRICTIONS ON PRODUCT USE • The information contained herein is subject to change without notice. 021023_D 070208EBP • TOSHIBA is continually working to improve the quality and reliability of its products. Nevertheless, semiconductor devices in general can malfunction or fail due to their inherent electrical sensitivity and vulnerability to physical stress. It is the responsibility of the buyer, when utilizing TOSHIBA products, to comply with the standards of safety in making a safe design for the entire system, and to avoid situations in which a malfunction or failure of such TOSHIBA products could cause loss of human life, bodily injury or damage to property. In developing your designs, please ensure that TOSHIBA products are used within specified operating ranges as set forth in the most recent TOSHIBA products specifications. Also, please keep in mind the precautions and conditions set forth in the “Handling Guide for Semiconductor Devices,” or “TOSHIBA Semiconductor Reliability Handbook” etc. 021023_A • The TOSHIBA products listed in this document are intended for usage in general electronics applications (computer, personal equipment, office equipment, measuring equipment, industrial robotics, domestic appliances, etc.). These TOSHIBA products are neither intended nor warranted for usage in equipment that requires extraordinarily high quality and/or reliability or a malfunction or failure of which may cause loss of human life or bodily injury (“Unintended Usage”). Unintended Usage include atomic energy control instruments, airplane or spaceship instruments, transportation instruments, traffic signal instruments, combustion control instruments, medical instruments, all types of safety devices, etc. Unintended Usage of TOSHIBA products listed in this document shall be made at the customer’s own risk. 021023_B • The products described in this document shall not be used or embedded to any downstream products of which manufacture, use and/or sale are prohibited under any applicable laws and regulations. 060106_Q • The information contained herein is presented only as a guide for the applications of our products. No responsibility is assumed by TOSHIBA for any infringements of patents or other rights of the third parties which may result from its use. No license is granted by implication or otherwise under any patents or other rights of TOSHIBA or the third parties. 021023_C • The products described in this document are subject to foreign exchange and foreign trade control laws. 060925_E • For a discussion of how the reliability of microcontrollers can be predicted, please refer to Section 1.3 of the chapter entitled Quality and Reliability Assurance/Handling Precautions. 030619_S 92CA25-1 2007-02-28 TMP92CA25 (3) Internal memory • • • • Internal RAM: 10 Kbytes (can be used for program, data and display memory) Internal ROM: 0 Kbytes (used as boot program) Expandable up to 512 Mbytes (shared program/data area) Can simultaneously support 8,- 16- or 32-bit width external data bus ... dynamic data bus sizing Chip select output: 4 channels (4) External memory expansion (5) Memory controller • (6) 8-bit timers: 4 channels (7) 16-bit timer/event counter: 1 channel (8) General-purpose serial interface: 1 channels • • • • • • • • • • UART/synchronous mode IrDA ver.1.0 (115 kbps) mode selectable I2C bus mode only I2S bus mode/SIO mode selectable (Master, transmission only) 32-byte FIFO buffer Supports monochrome for STN Built-in RAM LCD driver Supported only SPI mode for SD card Supports 16 M, 64 M, 128 M, 256 M, and up to 512-Mbit SDR (Single Data Rate)-SDRAM Supported not only operate as RAM and Data for LCD display but also programming directly from SDRAM Based on TC8521A (9) Serial bus interface: 1 channel: 1 channel (10) I2S (Inter-IC sound) interface: 1 channel (11) LCD controller (12) SPI controller (13) SDRAM controller: 1 channel (14) Timer for real-time clock (RTC) • (15) Key-on wakeup (Interrupt key input) (16) 10-bit AD converter (Built-in Sample Hold circuit): 4 channels (17) Touch screen interface • Available to reduce external components (18) Watchdog timer (19) Melody/alarm generator • • Melody: Output of clock 4 to 5461 Hz Alarm: Output of 8 kinds of alarm pattern and 5 kinds of interval interrupt 92CA25-2 2007-02-28 TMP92CA25 (20) MMU • • • • • Expandable up to 512 Mbytes (3 local area/8 bank method) Independent bank for each program, read data, write data and LCD display data 9 CPU interrupts: Software interrupt instruction and illegal instruction (21) Interrupts: 49 interrupt 34 internal interrupts: Seven selectable priority levels 7 external interrupts: Seven selectable priority levels (6-edge selectable) RD (21) Input/output ports: 84 pins (Except Data bus (16bit), Address bus (24bit) and (22) NAND flash interface: 2 channels • • • • • • • • • • • Direct NAND flash connection capability ECC (error detection) calculation (for SLC- type) Three HALT modes: IDLE2 (programmable), IDLE1, STOP Each pin status programmable for stand-by mode pin) (23) Stand-by function (24) Triple-clock controller Clock doubler (PLL) supplies 40 system-clock from external 10MHz oscillator to CPU Clock gear function: Select high-frequency clock fc to fc/16 RTC (fs = 32.768 kHz) VCC = 3.0 V to 3.6 V (fc max = 40 MHz) VCC = 2.7 V to 3.6 V (fc max = 27 MHz) 144-pin QFP (P-LQFP144 -1616-0.40C) 144-pin chip form is also available. For details, contact your local Toshiba sales representative. (25) Operating voltage: (26) Package: 92CA25-3 2007-02-28 TMP92CA25 PG0 to PG1 (AN0 to AN1) AN2/MX (PG2) AN3/MY/ ADTRG (PG3) AVCC, AVSS VREFH, VREFL (PX, INT4) P96 (PY, INT5) P97 (TXD0) PF0 (RXD0) PF1 (SCLK0) PF2 (I2SCKO, TXD0) P90 (I2SDO, RXD0) P91 (I2SWS, SCLK0) P92 (SDA) P93 (SCL) P94 (CLK32KO) P95 10-bit 4-channel AD converter Touch screen I/F (TSI) Serial I/O SIO0 900/H1 CPU XWA XBC XDE XHL XIX XIY XIZ XSP WA BC DE HL IX IY IZ SP 32 bits SR PC F PLL H-OSC Clock gear L-OSC RTCVCC DVCC [3] DVSS [3] X1 X2 BE XT1 XT2 RESET AM0 AM1 Interrupt controller D0 to D7 Port 1 P10 to P17 (D8 to D15) A0 to A7 A8 to A15 Port 6 P60 to P67 (A16 to A23) P70 ( RD ) P71 ( WRLL , NDRE ) P72 ( WRLU , NDWE ) P73 (EA24) P74 (EA25) P75 (R/ W , NDR/ B ) P76 ( WAIT ) IS 2 SBI (I Cbus) 2 Watchdog timer MMU 8-bit timer (TIMERA0) (TA1OUT, INT0) PC0 8-bit timer (TIMERA1) 8-bit timer (TIMERA2) (TA3OUT, INT1) PC1 8-bit timer (TIMERA3) 16-bit timer (TIMERB0) Port 7 (TB0OUT0, INT2) PC2 (INT3) PC3 (SPDI) PK4 (SPDO) PK5 ( SPCS ) PK6 (SPCLK) PK7 PC4 PC5 PF3 PF4 PF5 PF6 (LCP0) PK0 (LLP) PK1 (LFR) PK2 (LBCD) PK3 PL0 to PL5 (LD0 to LD5) (LD6, BUSRQ ) PL6 (LD7, BUSAK ) PL7 ( SDRAS , SRLLB ) PJ0 ( SDCAS , SRLUB ) PJ1 ( SDWE , SRWR ) PJ2 (SDLLDQM) PJ3 (SDLUDQM) PJ4 (NDALE) PJ5 (NDCLE) PJ6 (SDCKE) PJ7 (SDCLK) PF7 NAND flash I/F (2 channel) SPI controller P80 ( CS0 ) P81 ( CS1 , SDCS ) P82 ( CS2 , CSZA ) P83 ( CS3 ) P84 ( CSZB , ND0CE ) P85 ( CSZC , ND1CE ) P86 ( CSZD ) P87 ( CSZE ) PC7 ( CSZF , EA25) PA0 to PA7 (KI0 to KI7) PC6 (KO8,EA24) PN0 to PN7 (KO0 to KO7) PM2 ( ALARM , MLDALM ) Port C Port F Port 8 LCD controller Keyboard I/F 10-KB RAM Port N Port L RTC SDRAM controller Melody/ Alarm out PM1 (MLDALM) Figure 1.1 TMP92CA25 Block Diagram 92CA25-4 2007-02-28 TMP92CA25 2. Pin Assignment and Functions The assignment of input/output pins for the TMP92CA25FG, their names and functions are as follows: 2.1 Pin Assignment Figure 2.1.1 shows the pin assignment of the TMP92CA25FG. 140 135 130 125 120 115 VREFL VREFH PG0, AN0 PG1, AN1 PG2, AN2, MX PG3, AN3, ADTRG , MY P96, PX, INT4 P97, PY, INT5 PA3, KI3 PA4, KI4 PA5, KI5 PA6, KI6 PA7, KI7 P90, TXD0, I2SCKO P91, RXD0, I2SDO P92, SCLK0, CTS0 , I2SWS P93, SDA P94, SCL P95, CLK32KO PC2, TB0OUT0, INT2 PL0, LD0 PL1, LD1 PL2, LD2 PL3, LD3 PL4, LD4 PL5, LD5 PL6, LD6 PL7, LD7 PK0, LCP0 PK1, LLP PK2, LFR PK3, LBCD PM2, ALARM , MLDALM PM1, MLDALM XT1 XT2 1 110 AVCC AVSS PA2, KI2 PA1, KI1 PA0, KI0 PJ7, SDCKE PJ6, NDCLE PJ5, NDALE PJ4, SDLUDQM PJ3, SDLLDQM PJ2, SDWE, SRWR PJ1, SDCAS, SRLUB PJ0, SDRAS, SRLLB PF7, SDCLK PC1, TA3OUT, INT1 PC0, TA1OUT, INT0 PF2, SCLK0, CTS0 PF1, RXD0 PF0, TXD0 PC7, CSZF, EA25 P87, CSZE P86, CSZD P85, CSZC, ND1CE P84, CSZB, ND0CE P83, CS3 P82, CS2, CSZA P81, CS1, SDCS PC6, KO8, EA24 P80, CS0 P76, WAIT P75, RW, NDR/B P74, EA25 P73, EA24 P72, WRLU, NDWE P71, WRLL, NDRE P70, RD 105 5 100 10 15 TMP92CA25FG QFP144 95 90 20 Top View 85 25 80 30 75 35 40 45 50 55 60 65 70 P67, A23 P66, A22 P65, A21 P64, A20 DVCC3 P63, A19 P62, A18 P61, A17 P60, A16 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 PF6 PF5 DVSS3 PF4 PF3 PK7, SPCLK PK6, SPCS PK5, SPDO PK4, SPDI PN7, KO7 PN6, KO6 Figure 2.1.1 Pin Assignment Diagram (144-pin QFP) PC3, INT3 DVSS2 DVCC2 D0 D1 D2 D3 D4 D5 D6 D7 P10, D8 P11, D9 P12, D10 P13, D11 P14, D12 P15, D13 P16, D14 P17, D15 PN0, KO0 PN1, KO1 PN2, KO2 PN3, KO3 PN4, KO4 PN5, KO5 RTCVCC PC4 PC5 DVCC1 X1 DVSS1 X2 AM0 AM1 RESET BE 92CA25-5 2007-02-28 TMP92CA25 2.2 PAD Assignment (Chip size 4.98 mm × 5.61 mm) Table 2.2.1 Pad Assignment Diagram (144-pin chip) Unit: μm Pin No. 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 Name VREFL VREFH PG0 PG1 PG2 PG3 P96 P97 PA3 PA4 PA5 PA6 PA7 P90 P91 P92 P93 P94 P95 PC2 PL0 PL1 PL2 PL3 PL4 PL5 PL6 PL7 PK0 PK1 PK2 PK3 PM2 PM1 XT1 XT2 RTCVCC X point −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −2363 −1986 −1853 −1732 −1612 −1499 −1386 −1261 −972 −872 −772 −672 −572 Y point 2309 2189 1934 1593 1493 1393 1293 1192 1088 988 888 788 688 587 487 387 287 187 87 −13 −113 −213 −313 −413 −514 −614 −714 −814 −914 −1014 −1114 −1215 −1473 −1594 −1935 −2313 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 Pin No. 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 Name DVSS2 DVCC2 D0 D1 D2 D3 D4 D5 D6 D7 P10 P11 P12 P13 P14 P15 P16 P17 PN0 PN1 PN2 PN3 PN4 PN5 PN6 PN7 PK4 PK5 PK6 PK7 PF3 PF4 DVSS3 PF5 PF6 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 X point −447 −297 −172 −72 28 128 228 328 429 529 629 729 829 929 1029 1129 1229 1329 1429 1529 1630 1753 1873 1994 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 Y point −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2678 −2313 −2049 −1708 −1587 −1472 −1359 −1243 −1131 −1012 −885 −749 −639 −530 −420 −311 −199 −88 23 134 245 356 473 589 705 Pin No. 97 98 99 100 101 102 103 104 105 106 107 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 133 134 135 136 137 138 139 140 141 142 143 144 Name A13 A14 A15 P60 P61 P62 P63 DVCC3 P64 P65 P66 P67 P70 P71 P72 P73 P74 P75 P76 P80 PC6 P81 P82 P83 P84 P85 P86 P87 PC7 PF0 PF1 PF2 PC0 PC1 PF7 PJ0 PJ1 PJ2 PJ3 PJ4 PJ5 PJ6 PJ7 PA0 PA1 PA2 AVSS AVCC X point 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 2359 1994 1874 1753 1633 1527 1420 1316 1211 1104 999 893 787 682 574 468 363 259 154 50 −55 −158 −261 −364 −467 −568 −669 −771 −872 −972 −1074 −1175 −1278 −1379 −1499 −1860 −1985 Y point 822 939 1055 1171 1288 1400 1514 1643 1779 1902 2027 2309 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 2675 BE PC4 PC5 DVCC1 X1 DVSS1 X2 AM0 AM1 RESET PC3 92CA25-6 2007-02-28 TMP92CA25 2.3 Pin Names and Functions The following table shows the names and functions of the input/output pins Table 2.3.1 Pin Names and Functions (1/5) Pin Name D0 to D7 P10 to P17 D8 to D15 A0 to A7 A8 to A15 P60 to P67 A16 to A23 P70 RD Number of Pins 8 8 8 8 8 1 I/O I/O I/O I/O Output Output I/O Output Output Output I/O Output Output I/O Data: Data bus 0 to 7 Function Port 1: I/O port input or output specifiable in units of bits Data: Data bus 8 to 15 Address: Address bus 0 to 7 Address: Address bus 8 to 15 Port 6: I/O port input or output specifiable in units of bits Address: Address bus 16 to 23 Port70: Output port Read: Outputs strobe signal to read external memory Port 71: I/O port Write: Output strobe signal for writing data on pins D0 to D7 NAND flash read: Outputs strobe signal to read external NAND flash Port 72: I/O port Write: Output strobe signal for writing data on pins D8 to D15 Write Enable for NAND flash Port 73: Output port Extended Address 24 Port 74: Output port Extended Address 25 Port 75: I/O port Read/Write: 1 represents read or dummy cycle; 0 represents write cycle NAND flash ready (1)/Busy (0) input Port 76: I/O port Wait: Signal used to request CPU bus wait P71 WRLL NDRE 1 P72 WRLU NDWE 1 Output Output Output Output Output Output I/O Output Input I/O Input P73 EA24 P74 EA25 P75 R/ W 1 1 1 NDR/ B P76 WAIT 1 92CA25-7 2007-02-28 TMP92CA25 Table 2.3.2 Pin Names and Functions (2/5) Pin Name P80 CS0 Number of Pins 1 I/O Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output I/O Output Output I/O Input Output I/O I/O Input Output I/O I/O I/O I/O Output Output Input Input Output Input Input Output Input Input Function Port80: Output port Chip select 0: Outputs “low” when address is within specified address area Port81: Output port Chip select 1: Outputs “low” when address is within specified address area Chip select for SDRAM: Outputs “0” when address is within SDRAM address area Port82: Output port Chip select 2: Outputs “Low” when address is within specified address area Expand chip select: ZA: Outputs “0” when address is within specified address area Port83: Output port Chip select 3: Outputs “low” when address is within specified address area Port84: Output port Expand chip select: ZB: Outputs “0” when address is within specified address area Chip select for NAND flash 0: Outputs “0” when NAND flash 0 is enabled Port85: Output port Expand chip select: ZC: Outputs “0” when address is within specified address area Chip select for NAND flash 1: Outputs “0” when NAND flash 1 is enabled Port86: Output port Expand chip select: ZD: outputs “0” when address is within specified address area Port87: Output port Expand chip select: ZE: Outputs “0” when address is within specified address area Port90: I/O port Serial 0 send data: Open-drain output programmable 2 I S clock output Port91: I/O port (Schmitt-input) Serial 0 receive data 2 I S data output Port92: I/O port (Schmitt-input) Serial 0 clock I/O Serial 0 data send enable (Clear to send) 2 I S word select output Port 93: I/O port I C data I/O Port 94: I/O port I C clock I/O Port95: Output port Output fs (32.768 kHz) clock Port 96: Input port (Schmitt-input) Interrupt request pin4: Interrupt request with programmable rising/falling edge X-Plus: Pin connectted to X+ for touch screen panel Port 97: Input port (Schmitt-input) Interrupt request pin5: Interrupt request with programmable rising/falling edge Y-Plus: Pin connectted to Y+ for touch screen panel Port: A0 to A7 port: Pin used to input ports (Schmitt input, with pull-up resistor) Key input 0 to 7: Pin used for key-on wakeup 0 to 7 2 2 P81 CS1 SDCS 1 P82 CS2 CSZA 1 P83 CS3 1 P84 CSZB ND0CE 1 P85 CSZC ND1CE 1 P86 CSZD 1 1 P87 CSZE P90 TXD0 I2SCKO P91 RXD0 I2SDO P92 SCLK0 CTS0 1 1 1 I2SWS P93 SDA P94 SCL P95 CLK32KO P96 INT4 PX P97 INT5 PY PA0 to PA7 KI0 to KI7 1 1 1 1 1 8 92CA25-8 2007-02-28 TMP92CA25 Table 2.3.3 Pin Names and Functions (3/5) Pin Name PC0 INT0 TA1OUT PC1 INT1 TA3OUT PC2 INT2 TB0OUT0 PC3 INT3 PC4 to PC5 PC6 KO8 EA24 PC7 CSZF Number of Pins 1 I/O I/O Input Output I/O Port C0: I/O port (Schmitt-input) Function Interrupt request pin 0: Interrupt request pin with programmable level/rising/falling edge 8-bit timer 1 output: Timer 1 output Port C1: I/O port (Schmitt-input) Interrupt request pin 1: Interrupt request pin with programmable rising/falling edge 8-bit timer 3 output: Timer 3 output Port C2: I/O port (Schmitt-input) Interrupt request pin 2: Interrupt request pin with programmable rising/falling edge Timer B0 output Port C3: I/O port (Schmitt-input) Interrupt request pin 3: Interrupt request pin with programmable rising/falling edge Port C4 to C5: U/O port Port C6: I/O port Key Output 8: Pin used of key-scan strobe (Open-drain output programmable) Extended Address 24 Port C7: I/O port Expand chip select: ZF: Outputs “0” when address is within specified address area Extended Address 25 Port F0: I/O port (Schmitt-input) Serial 0 send data: Open-drain output programmable Port F1: I/O port (Schmitt-input) Serial 0 receive data Port F2: I/O port (Schmitt-input) Serial 0 clock I/O Serial 0 data send enable (Clear to send) Port F7: Output port Clock for SDRAM (When SDRAM is not used, SDCLK can be used as system clock) Port G0 to G1 port: Pin used to input ports Analog input 0 to 1: Pin used to Input to AD conveter Port G2 port: Pin used to input ports Analog input 2: Pin used to Input to AD conveter X-Minus: Pin connectted to X− for touch screen panel Port G3 port: Pin used to input ports Analog input 3: Pin used to input to AD conveter Y-Minus: Pin connectted to Y− for touch screen panel AD trigger: Signal used to request AD start 1 Input Output I/O 1 Input Output I/O Input I/O I/O Output Output I/O 1 2 1 1 Output Output I/O Output I/O Input I/O I/O Input Output Output Input Input Input Input Output Input Input Output Intput EA25 PF0 TXD0 PF1 RXD0 PF2 SCLK0 CTS0 1 1 1 PF7 SDCLK PG0 to PG1 AN0 to AN1 PG2 AN2 MX PG3 AN3 MY ADTRG 1 2 1 1 92CA25-9 2007-02-28 TMP92CA25 Table 2.3.4 Pin Names and Functions (4/5) Pin Name PJ0 SDRAS SRLLB Number of Pins 1 I/O Output Output Output Output Port J0: Output port Row address strobe for SDRAM Data enable for SRAM on pins D0 to D7 Port J1: Output port Column address strobe for SDRAM Function PJ1 SDCAS SRLUB 1 Output Output Output Data enable for SRAM on pins D8 to D15 Port J2: Output port Write enable for SDRAM Write for SRAM: Strobe signal for writing data Port J3: Output port Data enable for SDRAM on pins D0 to D7 Port J4: Output port Data enable for SDRAM on pins D8 to D15 Port J5: I/O port Address latch enable for NAND flash Port J6: I/O port Command latch enable for NAND flash Port J7: Output port Clock enable for SDRAM Port K0: Output port LCD driver output pin Port K1: Output port LCD driver output pin Port K2: Output port LCD driver output pin Port K3: Output port LCD driver output pin Port K4: I/O port Data input pin for SD card Port K5: I/O port Data output pin for SD card PJ2 SDWE SRWR 1 Output Output Output Output Output Output I/O Output I/O Output Output Output Output Output Output Output Output Output Output Output I/O Input I/O Output PJ3 SDLLDQM PJ4 SDLUDQM PJ5 NDALE PJ6 NDCLE PJ7 SDCKE PK0 LCP0 PK1 LLP PK2 LFR PK3 LBCD PK4 SPDI PK5 SPDO PK6 1 1 1 1 1 1 1 1 1 1 1 SPCS PK7 SPCLK PL0 to PL3 LD0 to LD3 PL4 to PL5 LD4 to LD5 PL6 LD6 BUSRQ PL7 LD7 BUSAK 1 1 4 2 1 I/O Output I/O Output Output Output I/O Output I/O Output Input Port K6: I/O port Chip select pin for SD card Port K7: I/O port Clock output pin for SD card Port L0 to L3: Output port Data bus for LCD driver Port L4 to L5: I/O port Data bus for LCD driver Port L6: I/O port Data bus for LCD driver Bus request: request pin that set external memory bus to high-impedance (for External DMAC) Port L7: I/O port Data bus for LCD driver Bus acknowledge: this pin show that external memory bus pin is set to high-impedance by receiving BUSRQ (for External DMAC) 1 I/O Output Output 92CA25-10 2007-02-28 TMP92CA25 Table 2.3.5 Pin Names and Functions (5/5) Pin Name PM1 MLDALM PM2 ALARM Number of Pins 1 I/O Output Output Output Output Output I/O Output Port M1: Output port Melody/alarm output pin Port M2: Output port RTC alarm output pin Melody/alarm output pin (inverted) Port N0 to N7: I/O port Key out pin (Open-drain setting ) Operation mode: Function 1 8 MLDALM PN0 to PN7 KO0 to KO7 Fix to AM1 = “0”, AM0 = “1” for 16-bit external bus starting AM0, AM1 2 Input Fix to AM1 = “1”, AM0 = “0” for 32-bit external bus starting Fix to AM1 = “1”, AM0 = “1” Prohibit setting Fix to AM1 = “0”, AM0 = “0” Prohibit setting X1/X2 XT1/XT2 RESET 2 2 1 1 1 1 1 1 1 3 3 I/O I/O Input Input Input − High-frequency oscillator connection pins Low-frequency oscillator connection pins Reset: Initializes TMP92CA25 (with pull-up resistor, Schmitt input) Pin for reference voltage input to AD converter (H) Pin for reference voltage input to AD converter (L) Power supply pin for RTC Back up enable pin: When power off DVCC and AVSS during RTC is operating, set to “L” level beforehand. Usually, this pin used to “H” level. (Schmitt input) Power supply pin for AD converter GND pin for AD converter (0 V) Power supply pins (All DVCC pins should be connected to the power supply pin) GND pins (0 V) (All DVSS pins should be connected to GND (0 V)) VREFH VREFL RTCVCC BE AVCC AVSS DVCC DVSS Input − − − − 92CA25-11 2007-02-28 TMP92CA25 3. 3.1 Operation This section describes the basic components, functions and operation of the TMP92CA25. CPU The TMP92CA25 contains an advanced high-speed 32-bit CPU (TLCS-900/H1 CPU) 3.1.1 CPU Outline The TLCS-900/H1 CPU is a high-speed, high-performance CPU based on the TLCS-900/L1 CPU. The TLCS-900/H1 CPU has an expanded 32-bit internal data bus to process instructions more quickly. The following is an outline of the CPU: Table 3.1.1 TMP92CA25 Outline Parameter Width of CPU address bus Width of CPU data bus Internal operating frequency Minimum bus cycle Internal RAM TMP92CA25 24 bits 32 bits Max 20 MHz 1-clock access (50 ns at fSYS = 20MHz) 32-bit 1-clock access INTC, SDRAMC, 8-bit 2-clock access 16-bit 2-clock access 8-bit 5∼6-clock access MEMC, NDFC, TSI, PORT I2S, SPIC, LCDC TMRA, TMRB, SIO, RTC, MLD/ALM, SBI, CGEAR, ADC Internal I/O External SRAM, Masked ROM 8- or 16-bit 2-clock access (waits can be inserted) 16-bit 1-clock access 8-bit 4-clock access (waits can be inserted) 1-clock (50 ns at fSYS = 20MHz) 2-clock (100 ns at fSYS = 20MHz) 12 bytes Compatible with TLCS-900/L1 (LDX instruction is deleted) Maximum mode only 8 channels External SDRAM External NAND flash Minimum instruction execution cycle Conditional jump Instruction queue buffer Instruction set CPU mode Micro DMA 92CA25-12 2007-02-28 TMP92CA25 3.1.2 Reset Operation When resetting the TMP92CA25, ensure that the power supply voltage is within the operating voltage range, and that the internal high-frequency oscillator has stabilized. Then hold the RESET input low for at least 20 system clocks (16 µs at fc = 40 MHz). At reset, since the clock doubler (PLL) is bypassed and the clock-gear is set to 1/16, the system clock operates at 1.25 MHz (fc = 40 MHz). When the reset has been accepted, the CPU performs the following: • Sets the program counter (PC) as follows in accordance with the reset vector stored at address FFFF00H to FFFF02H: PC PC PC • • • ← data in location FFFF00H ← data in location FFFF01H ← data in location FFFF02H Sets the stack pointer (XSP) to 00000000H. Sets bits of the status register (SR) to 111 (thereby setting the interrupt level mask register to level 7). Clears bits of the status register to 00 (there by selecting register bank 0). When the reset is released, the CPU starts executing instructions according to the program counter settings. CPU internal registers not mentioned above do not change when the reset is released. When the reset is accepted, the CPU sets internal I/O, ports and other pins as follows. • • Initializes the internal I/O registers as shown in the “Special Function Register” table in section 5. Sets the port pins, including the pins that also act as internal I/O, to general-purpose input or output port mode. Internal reset is released as soon as external reset is released. Memory controller operation cannot be ensured until the power supply becomes stable after power-on reset. External RAM data provided before turning on the TMP92CA25 may be corrupted because the control signals are unstable until the power supply becomes stable after power on reset. VCC (3.3 V) RESET High-frequency oscillation stabilized time +20 system clock 0 s (Min) Figure 3.1.1 Power on Reset Timing Example 92CA25-13 2007-02-28 fsys Sampling RESET fsys×(13.5~14.5) clock 0FFFF00H A23∼A0 CS0,1, 3 CS2 D0∼D31 DATA-IN DATA-IN Read RD SRxxB ((After reset released, starting 1 wait read cycle) Figure 3.1.2 TMP92CA25 Reset Timing Chart 92CA25-14 (Output mode) (Output mode) (Input mode) (Input mode) Pull up (Internal) High-Z D0∼D31 DATA-OUT WRxx Write SRWR SRxxB PF7 PJ3~PJ4, PJ7 PM1~PM2 P40~P47,P50~P57 P74~P72, PK0~PK3, PL0~PL3 PA0~PA7 TMP92CA25 2007-02-28 P71~P72, P75~P76, P90~P94, P96~P97, PC0~PC3, PC6~PC7, PF0~PF1, PG0~PG3, PJ5~PJ6, PL4~PL7, Note: This chart shows timing for a reset using a 32-bit external bus (AM1:0=10). TMP92CA25 3.1.3 Setting of AM0 and AM1 Set AM1 and AM0 pins as shown in Table 3.1.2 according to system usage. Table 3.1.2 Operation Mode Setup Table Operation Mode 16-bit external bus starting (MULTI 16 mode) 8-bit external bus starting (MULTI 8 mode) Prohibit setting Reserve (Toshiba test mode) Mode Setup Input Pin RESET AM1 0 1 1 0 AM0 1 0 1 0 92CA25-15 2007-02-28 TMP92CA25 3.2 Memory Map Figure 3.2.1 is a memory map of the TMP92CA25. 000000H Internal I/O (8 Kbytes) 000100H 001D00H 002000H Internal RAM (10 Kbytes) Direct area (n) 64-Kbyte area (nn) 004800H 010000H External memory F00000H Provisional emulator control (64 Kbytes) F10000H (Note 1) 16-Mbyte area (R) (−R) (R+) (R + R8/16) (R + d8/16) (nnn) External memory FFFF00H Vector table (256 bytes) FFFFFFH ( = Internal area) (Note 2) Figure 3.2.1 Memory Map Note 1: The Provisional emulator control area, mapped F00000H to F0FFFFH after reset, is for emulator use and so is not available. When emulator WR signal and RD signal are asserted, this area is accessed. Ensure external memory is used. Note 2: Do not use the last 16-byte area (FFFFF0H to FFFFFFH). This area is reserved for an emulator. 92CA25-16 2007-02-28 TMP92CA25 3.3 Clock Function and Stand-by Function The TMP92CA25 contains (1) clock gear, (2) clock doubler (PLL), (3) stand-by controller and (4) noise reduction circuits. They are used for low power, low noise systems. This chapter is organized as follows: 3.3.1 Block diagram of system clock 3.3.2 SFR 3.3.3 System clock controller 3.3.4 Clock doubler (PLL) 3.3.5 Noise reduction circuits 3.3.6 Stand-by controller 92CA25-17 2007-02-28 TMP92CA25 The clock operating modes are as follows: (a) single clock mode (X1, X2 pins only), (b) dual clock mode (X1, X2, XT1 and XT2 pins) and (c) triple clock mode (X1, X2, XT1 and XT2 pins and PLL). Figure 3.3.1 shows a transition figure. Reset (fOSCH/32) Release reset NORMAL mode (fOSCH/gear value/2) IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator) Instruction Interrupt Instruction Interrupt (a) Instruction Interrupt STOP mode (Stops all circuits) Single clock mode transition figure Reset (fOSCH/32) Release reset Instruction NORMAL mode Interrupt Interrupt Instruction Interrupt STOP mode (Stops all circuits) IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator) IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator) Instruction Interrupt Instruction Interrupt Instruction Interrupt Instruction Interrupt (b) (fOSCH/gear value/2) STOP mode (Stops all circuits) Instruction SLOW mode (fs/2) Dual clock mode transition figure Reset (fOSCH/32) Release reset NORMAL mode (fOSCH/gear value/2) IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator) Instruction Interrupt Instruction Interrupt Instruction Instruction Note IDLE2 mode (I/O operate) Instruction Interrupt NORMAL mode (4 × fOSCH/gear value/2) Interrupt Instruction Interrupt Instruction SLOW mode (fs/2) Interrupt Instruction Interrupt IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator) STOP mode (Stops all circuits) Instruction Instruction Note IDLE1 mode Instruction (Operate oscillator and PLL) Interrupt Using PLL (c) Triple clock mode transition figure Note 1: It is not possible to control PLL in SLOW mode when shifting from SLOW mode to NORMAL mode with use of PLL. (PLL start up/stop/change write to PLLCR0, PLLCR1 register) Note 2: When shifting from NORMAL mode with use of PLL to NORMAL mode, execute the following setting in the same order. 1) Change CPU clock (PLLCR0 ← “0”) 2) Stop PLL circuit (PLLCR1 ← “0”) Note 3: It is not possible to shift from NORMAL mode with use of PLL to STOP mode directly. NORMAL mode should be set once before shifting to STOP mode. (Sstop the high-frequency oscillator after stopping PLL.) Figure 3.3.1 System Clock Block Diagram The clock frequency input from the X1 and X2 pins is called fc and the clock frequency input from the XT1 and XT2 pins is called fs. The clock frequency selected by SYSCR1 is called the clock fFPH. The system clock fSYS is defined as the divided clock of fFPH, and one cycle of fSYS is defined as one state. 92CA25-18 2007-02-28 TMP92CA25 3.3.1 Block Diagram of System Clock SYSCR0 SYSCR2 Warm-up timer (High/low-frequency oscillator) Lock up timer (PLL) SYSCR0 XT1 XT2 Low-frequency oscillator fs PLLCR1, PLLCR0 fc fPLL = fOSCH × 4 SYSCR0 X1 X2 High-frequency oscillator fOSCH Clock doubler (PLL) Selector ÷2 ÷4 φT φT0 fFPH ÷4 ÷8 fs ÷2 fc/2 fc/4 fc/8 fc/16 ÷8 ÷16 fSYS ÷2 fIO SYSCR1 SYSCR1 Clock-gear PLLCR0 fSYS fIO φT0 TMRA0 to 3, TMRB0 Prescaler CPU RAM, ROM Interrupt controller SIO0 to SIO1 Prescaler LCDC Memory controller NAND flash controller IS I/O ports TSI SPIC 2 I2C bus Prescaler SDRAMC RTC fs MLD/ALM ADC WDT Figure 3.3.2 Block Diagram of System Clock 92CA25-19 2007-02-28 TMP92CA25 3.3.2 SFR 7 6 XTEN R/W 1 Highfrequency oscillator (fc) 0: Stop 1: Oscillation 5 4 3 2 WUEF R/W 0 Warm-up timer 0: Write don’t care 1: Write 1 0 SYSCR0 (10E0H) Bit symbol Read/Write After reset Function XEN 1 Lowfrequency oscillator (fs) 0: Stop 1: Oscillation start timer 0: Read end warm-up 1: Read do not end warm-up 7 SYSCR1 (10E1H) Bit symbol Read/Write After reset Function 6 5 4 3 SYSCK 0 2 GEAR2 R/W 1 1 GEAR1 0 0 GEAR0 0 Select Select gear value of high-frequency (fc) system clock 000: fc 0: fc 001: fc/2 1: fs 010: fc/4 011: fc/8 100: fc/16 101: (Reserved) 110: (Reserved) 111: (Reserved) 7 SYSCR2 (10E2H) Bit symbol Read/Write After reset Function − R/W 0 Always write “0” 6 5 WUPTM1 1 Warm-up timer 00: Reserved 4 WUPTM0 R/W 0 3 HALTM1 1 HALT mode 00: Reserved 01: STOP mode 10: IDLE1 mode 11: IDLE2 mode 2 HALTM0 1 1 0 01: 2 /input frequency 10: 2 /input frequency 11: 2 /input frequency 16 14 8 Note 1: The unassigned registers, SYSCR0, SYSCR0, SYSCR1, and SYSCR2 are read as undefined value. Note 2: Low-frequency oscillator is enabled on reset. Figure 3.3.3 SFR for System Clock 92CA25-20 2007-02-28 TMP92CA25 7 EMCCR0 (10E3H) Bit symbol Read/Write After reset Function PROTECT R 0 Protect flag 0: OFF 1: ON EMCCR1 (10E4H) Bit symbol Read/Write After reset Function EMCCR2 (10E5H) Bit symbol Read/Write After reset Function 6 5 4 3 2 EXTIN 0 1: External clock 1 DRVOSCH R/W 1 fc oscillator driver ability 1: Normal 0: Weak 0 DRVOSCL 1 fs oscillator driver ability 1: Normal 0: Weak Switch the protect ON/OFF by writing the following to 1st-KEY, 2nd-KEY 1st-KEY: write in sequence EMCCR1 = 5AH, EMCCR2 = A5H 2nd-KEY: write in sequence EMCCR1 = A5H, EMCCR2 = 5AH Note: When restarting the oscillator from the stop oscillation state (e.g. restarting the oscillator in STOP mode), set EMCCR0, = “1”. Figure 3.3.4 SFR for System Clock 92CA25-21 2007-02-28 TMP92CA25 7 PLLCR0 (10E8H) Bit symbol Read/Write After reset Function 6 FCSEL R/W 0 Select fc clock 0: fOSCH 1: fPLL 5 LUPFG R 0 Lock up timer status flag 0: Not end 1: End 4 3 2 1 0 Note: Ensure that the logic of PLLCR0 is different from 900/L1’s DFM. 7 PLLCR1 (10E9H) Bit symbol Read/Write After reset Function PLLON R/W 0 Control on/off 0: OFF 1: ON 6 5 4 3 2 1 0 Figure 3.3.5 SFR for PLL 7 PxDR (xxxxH) Bit symbol Read/Write After reset Function 1 Px7D 6 Px6D 1 5 Px5D 1 4 Px4D R/W 1 3 Px3D 1 2 Px2D 1 1 Px1D 1 0 Px0D 1 Output/input buffer drive-register for stand-by mode (Purpose and use) This register is used to set each pin status at stand-by mode. All ports have registers of the format shown above. (“x” indicates the port name.) For each register, refer to “3.5 Function of ports”. Before “Halt” instruction is executed, set each register according to the expected pin-status. They will be effective after the CPU has executed the “Halt” instruction. This is the case regardless of stand-by mode (IDLE2, IDLE1 or STOP). The output/input buffer control table is shown below. OE 0 0 1 1 Note 1: PxnD 0 1 0 1 Output Buffer OFF OFF OFF ON Input Buffer OFF ON OFF OFF OE denotes an output enable signal before stand-by mode. Basically, PxCR is used as OE. Note 2: “n” in PxnD denotes the bit number of PORTx. Figure 3.3.6 SFR for Drive Register 92CA25-22 2007-02-28 TMP92CA25 3.3.3 System Clock Controller The system clock controller generates the system clock signal (fSYS) for the CPU core and internal I/O. It contains two oscillation circuits and a clock gear circuit for high-frequency (fc) operation. The register SYSCR1 changes the system clock to either fc or fs, SYSCR0 and SYSCR0 control enabling and disabling of each oscillator, and SYSCR1 sets the high-frequency clock gear to either 1, 2, 4, 8 or 16 (fc, fc/2, fc/4, fc/8 or fc/16). These functions can reduce the power consumption of the equipment in which the device is installed. The combination of settings = 1, = 0 and = 100 will cause the system clock (fSYS) to be set to fc/32 (fc/16 × 1/2) after reset. For example, fSYS is set to 1.25 MHz when the 40 MHz oscillator is connected to the X1 and X2 pins. (1) Switching from normal mode to slow mode When the resonator is connected to the X1 and X2 pins, or to the XT1 and XT2 pins, the warm-up timer can be used to change the operation frequency after stable oscillation has been attained. The warm-up time can be selected using SYSCR2. This warm-up timer can be programmed to start and stop as shown in the following examples 1 and 2. Table 3.3.1 shows the warm-up time. Note 1: When using an oscillator (other than a resonator) with stable oscillation, a warm-up timer is not needed. Note 2: The warm-up timer is operated by an oscillation clock. Hence, there may be some variation in warm-up time. Table 3.3.1 Warm-up Times at fOSCH = 40 MHz, fs = 32.768 kHz Warm-up Time SYSCR2 01 (2 /frequency) 10 (2 /frequency) 11 (2 /frequency) 16 14 8 Change to Normal Mode 6.4 (μs) 409.6 (μs) 1.638 (ms) Change to Slow Mode 7.8 (ms) 500 (ms) 2000 (ms) 92CA25-23 2007-02-28 TMP92CA25 Example 1: Setting the clock Changing from high-frequency (fc) to low-frequency (fs). SYSCR0 SYSCR1 SYSCR2 EQU EQU EQU LD SET SET WUP: BIT JR SET RES 10E0H 10E1H 10E2H (SYSCR2), 0 X 1 1 − − X X B ; 6, (SYSCR0) 2, (SYSCR0) 2, (SYSCR0) NZ, WUP 3, (SYSCR1) 7, (SYSCR0) ; ; ; ; ; ; Sets warm-up time to 2 /fs. Enables low-frequency oscillation. Clears and starts warm-up timer. Detects stopping of warm-up timer. Changes fSYS from fc to fs. Disables high-frequency oscillation. 16 X: Don’t care, −: No change X1, X2 pins XT1, XT2 pins Warm-up timer End of warm-up timer System clock fSYS Clears and starts Enables low-frequency warm-up timer Chages fSYS from fc to fs End of warm-up timer Disabiles high-frequency fc fs Counts up by fSYS Counts up by fs 92CA25-24 2007-02-28 TMP92CA25 Example 2: Setting the clock Changing from low-frequency (fs) to high-frequency (fc). SYSCR0 SYSCR1 SYSCR2 EQU EQU EQU LD SET SET WUP: BIT JR RES RES 10E0H 10E1H 10E2H (SYSCR2), 0 X 1 0 − − X X B ; 7, (SYSCR0) 2, (SYSCR0) 2, (SYSCR0) NZ, WUP 3, (SYSCR1) 6, (SYSCR0) ; ; ; ; ; ; Sets warm-up time to 2 /fc. Enables high-frequency oscillation. Clears and starts warm-up timer. Detects stopping of warm-up timer. Changes fSYS from fs to fc. Disables low-frequency oscillation. 14 X: Don’t care, −: No change X1, X2 pins XT1, XT2 pins Warm-up timer End of warm-up timer System Clock fSYS Enables Clears and starts high-frequency warm-up timer Changes fSYS from fs to fc End of warm-up timer Disables low-frequency fs fc Counts up by fSYS Counts up by fc 92CA25-25 2007-02-28 TMP92CA25 (2) Clock gear controller fFPH is set according to the contents of the clock gear select register SYSCR1 to either fc, fc/2, fc/4, fc/8 or fc/16. Using the clock gear to select a lower value of fFPH reduces power consumption. Example 3: Changing to a high-frequency gear SYSCR1 EQU LD LD X: Don’t care 10E1H (SYSCR1), XXXX0000B (DUMMY), 00H ; ; Changes fSYS to fc/2. Dummy instruction (High-speed clock gear changing) To change the clock gear, write the register value to the SYSCR1 register.It is necessary for the warm-up time to elapse before the change occurs after writing the register value. There is the possibility that the instruction following the clock gear changing instruction is executed by the clock gear before changing.To execute the instruction following the clock gear switching instruction by the clock gear after changing, input the dummy instruction as follows (instruction to execute the write cycle). Example: SYSCR1 EQU LD LD 10E1H (SYSCR1), XXXX0001B (DUMMY), 00H ; ; Changes fSYS to fc/4. Dummy instruction Instruction to be executed after clock gear has changed 92CA25-26 2007-02-28 TMP92CA25 3.3.4 Clock Doubler (PLL) PLL outputs the fPLL clock signal, which is four times as fast as fOSCH. A low-speed-frequency oscillator can be used, even though the internal clock is high-frequency. A reset initializes PLL to stop status, so setting to PLLCR0, PLLCR1 register is needed before use. As with an oscillator, this circuit requires time to stabilize. This is called the lock up time and it is measured by a 16-stage binary counter. Lock up time is about 1.6 ms at fOSCH = 10 MHz. Note 1: Input frequency range for PLL The input frequency range (High-frequency oscillation) for PLL is as follows: fOSCH = 6 to 10 MHz (VCC = 3.0 to 3.6 V) Note 2: PLLCR0 The logic of PLLCR0 is different from 900/L1’s DFM. Exercise care in determining the end of lock up time. The following is an example of settings for PLL starting and PLL stopping. Example 1: PLL starting PLLCR0 PLLCR1 LUP: EQU EQU LD BIT JR LD X: Don’t care 10E8H 10E9H (PLLCR1), 5, (PLLCR0) Z, LUP (PLLCR0), 1XXXXXXXB ; ; ; X1XXXXXXB ; Enables PLL operation and starts lock up. Detects end of lock up. Changes fc from 10 MHz to 40 MHz. PLL output: fPLL Lock up timer System clock fSYS Starts PLL operation and starts lock up Changes from 10 MHz to 40 MHz Lock up ends Counts up by fOSCH During lock up After lock up 92CA25-27 2007-02-28 TMP92CA25 Example 2: PLL stopping PLLCR0 PLLCR1 EQU EQU LD LD X: Don’t care PLL output: fPLL System clock fSYS Changes from 40 MHz to 10 MHz Stops PLL operation 10E8H 10E9H (PLLCR0), X0XXXXXXB (PLLCR1), 0XXXXXXXB ; ; Changes fc from 40 MHz to10 MHz. Stop PLL. 92CA25-28 2007-02-28 TMP92CA25 Limitations on the use of PLL 1. It is not possible to execute PLL enable/disable control in the SLOW mode (fs) (writing to PLLCR0 and PLLCR1). PLL should be controlled in the NORMAL mode. 2. When stopping PLL operation during PLL use, execute the following settings in the same order. LD LD (PLLCR0), 00H (PLLCR1), 00H ; ; Change the clock fPLL to fOSCH PLL stop 3. When stopping the high-frequency oscillator during PLL use, stop PLL before stopping the high-frequency oscillator. Examples of settings are shown below: (1) Start up/change control (OK) Low-frequency oscillator operation mode (fs) (high-frequency oscillator STOP) → High-frequency oscillator start up → High-frequency oscillator operation mode (fOSCH) → PLL start up → PLL use mode (fPLL) (SYSCR0), 2, (SYSCR0) NZ, WUP (SYSCR1), (PLLCR1), 5, (PLLCR0) Z, LUP (PLLCR0), 11−−−1−−B; ; ; −−−−0−−−B; 1−−−−−−−B; ; ; −1−−−−−−B; High-frequency oscillator start/warm-up start Check for warm-up end flag Change the system clock fs to fOSCH PLL start-up/lock up start Check for lock up end flag Change the system clock fOSCH to fPLL LD WUP: BIT JR LD LD LUP: BIT JR LD (OK) Low-frequency oscillator operation mode (fs) (high-frequency oscillator Operate) → High-frequency oscillator operation mode (fOSCH) → PLL start up → PLL use mode (fPLL) LD LD LUP: BIT JR LD (SYSCR1), (PLLCR1), 5, (PLLCR0) Z, LUP (PLLCR0), −−−−0−−−B; 1−−−−−−−B; ; ; −1−−−−−−B; Change the system clock fs to fOSCH PLL start-up/lock up start Check for lock up end flag Change the system clock fOSCH to fPLL (Error) Low-frequency oscillator operation mode (fs) (high-frequency oscillator STOP) → High-frequency oscillator start up → PLL start up → PLL use mode (fPLL) LD WUP: BIT JR LD LUP: BIT JR LD LD (SYSCR0), 2, (SYSCR0) NZ, WUP (PLLCR1), 5, (PLLCR0) Z, LUP (PLLCR0), (SYSCR1), 11−−−1−−B; ; ; 1−−−−−−−B; ; ; −1−−−−−−B; −−−−0−−−B; High-frequency oscillator start/warm-up start Check for warm-up end flag PLL start-up/lock up start Check for lock up end flag Change the internal clock fOSCH to fPLL Change the system clock fs to fPLL 92CA25-29 2007-02-28 TMP92CA25 (2) Change/stop control (OK) PLL use mode (fPLL) → High-frequency oscillator operation mode (fOSCH) → PLL Stop → Low-frequency oscillator operation mode (fs) → High-frequency oscillator stop (PLLCR0), (PLLCR1), (SYSCR1), (SYSCR0), −0−−−−−−B; 0−−−−−−−B; −−−−1−−−B; 0−−−−−−−B; Change the system clock fPLL to fOSCH PLL stop Change the system clock fOSCH to fs High-frequency oscillator stop LD LD LD LD (Error) PLL use mode (fPLL) → Low-frequency oscillator operation mode (fs) → PLL stop → High-frequency oscillator stop LD LD LD LD (SYSCR1), (PLLCR0), (PLLCR1), (SYSCR0), − − − − 1 − − − B ; Change the system clock fPLL to fs − 0 − − − − − − B ; Change the internal clock (fC) fPLL to fOSCH 0 − − − − − − − B ; PLL stop 0 − − − − − − − B ; High-frequency oscillator stop (OK) PLL use mode (fPLL) → Set the STOP mode → High-frequency oscillator operation mode (fOSCH) → PLL stop → Halt (High-frequency oscillator stop) LD LD LD HALT (SYSCR2), (PLLCR0), (PLLCR1), −−−−01−−B; −0−−−−−−B; 0−−−−−−−B; ; Set the STOP mode (This command can be executed before use of PLL) Change the system clock fPLL to fOSCH PLL stop Shift to STOP mode (Error) PLL use mode (fPLL) → Set the STOP mode → Halt (High-frequency oscillator stop) LD HALT (SYSCR2), −−−−01−−B; ; Set the STOP mode (This command can execute before use of PLL) Shift to STOP mode 92CA25-30 2007-02-28 TMP92CA25 3.3.5 Noise Reduction Circuits Noise reduction circuits are built-in, allowing implementation of the following features. (1) Reduced drivability for high-frequency oscillator (2) Reduced drivability for low-frequency oscillator (3) Single drive for high-frequency oscillator (4) SFR protection of register contents When above function is used, set EMCCR0 and EMCCR2 registers (1) Reduced drivability for high-frequency oscillator (Purpose) Reduces noise and power for oscillator when a resonator is used. (Block diagram) fOSCH C1 Resonator X1 pin Enable oscillation EMCCR0 C2 X2 pin (Setting method) The drive ability of the oscillator is reduced by writing “0” to EMCCR0 register. At reset, is initialized to “1” and the oscillator starts oscillation by normal drivability when the power-supply is on. Note: This function (EMCCR0 = “0”) is available when fOSCH = 6 to 10 MHz. 92CA25-31 2007-02-28 TMP92CA25 (2) Reduced drivability for low-frequency oscillator (Purpose) Reduces noise and power for oscillator when a resonator is used. (Block diagram) C1 Resonator EMCCR0 C2 XT2 pin fS XT1 pin Enable oscillation (Setting method) The drive ability of the oscillator is reduced by writing 0 to the EMCCR0 register. At reset, is initialized to “1”. (3) Single drive for high-frequency oscillator (Purpose) Remove the need for twin drives and prevent operational errors caused by noise input to X2 pin when an external oscillator is used. (Block diagram) fOSCH X1 pin Enable oscillation EMCCR0 X2 pin (Setting method) The oscillator is disabled and starts operation as buffer by writing “1” to EMCCR0 register. X2 pin’s output is always “1”. At reset, is initialized to “0”. 92CA25-32 2007-02-28 TMP92CA25 (4) Runaway prevention using SFR protection register (Purpose) Prevention of program runaway caused by introduction of noise. Write operations to a specified SFR are prohibited so that the program is protected from runaway caused by stopping of the clock or by changes to the memory control register (memory controller, MMU) which prevent fetch operations. Runaway error handling is also facilitated by INTP0 interruption. Specified SFR list 1. Memory controller B0CSL/H, B1CSL/H, B2CSL/H, B3CSL/H, BECSL/H MSAR0, MSAR1, MSAR2, MSAR3, MAMR0, MAMR1, MAMR2, MAMR3, PMEMCR, MEMCR0 2. MMU LOCALPX/PY/PZ, LOCALLX/LY/LZ, LOCALRX/RY/RZ, LOCALWX/WY/WZ, 3. Clock gear SYSCR0, SYSCR1, SYSCR2, EMCCR0 4. PLL PLLCR0, PLLCR1 (Operation explanation) Execute and release of protection (write operation to specified SFR) becomes possible by setting up a double key to EMCCR1 and EMCCR2 registers. (Double key) 1st KEY: writes in sequence, 5AH at EMCCR1 and A5H at EMCCR2 2nd KEY: writes in sequence, A5H at EMCCR1 and 5AH at EMCCR2 Protection state can be confirmed by reading EMCCR0. At reset, protection becomes OFF. INTP0 interruption also occurs when a write operation to the specified SFR is executed with protection in the ON state. 92CA25-33 2007-02-28 TMP92CA25 3.3.6 Stand-by Controller (1) HALT modes and port drive register When the HALT instruction is executed, the operating mode switches to IDLE2, IDLE1 or STOP mode, depending on the contents of the SYSCR2 register and each pin-status is set according to the PxDR register, as shown below: 7 PxDR (xxxxH) Bit symbol Read/Write After reset Function (Purpose and use) • • • • • • This register is used to set each pin status at stand-by mode. All ports have this registers of the format shown above. (“x” indicates the port name.) For each register, refer to 3.5 function of ports. Before “Halt” instruction is executed, set each register according to the expected pin status. They will be effective after the CPU has executed the “Halt” instruction. This is the case regardless of stand-by mode (IDLE2, IDLE1 or STOP). The Output/Input buffer control table is shown below. 1 1 1 1 Px7D 6 Px6D 5 Px5D 4 Px4D R/W 3 Px3D 1 2 Px2D 1 1 Px1D 1 0 Px0D 1 Output/input buffer drive register for stand-by mode OE 0 0 1 1 Note 1: PxnD 0 1 0 1 Output Buffer OFF OFF OFF ON Input Buffer OFF ON OFF OFF OE denotes an output enable signal before stand-by mode. Basically, PxCR is used as OE. Note 2: “n” in PxnD denotes the bit number of PORTx The subsequent actions performed in each mode are as follows: 1. IDLE2: only the CPU halts. The internal I/O is available to select operation during IDLE2 mode by setting the following register. Table 3.3.2 shows the register setting operation during IDLE2 mode. Table 3.3.2 SFR Setting Operation during IDLE2 Mode Internal I/O TMRA01 TMRA23 TMRB0 SIO0 I C bus AD converter WDT 2 SFR TA01RUN TA23RUN TB0RUN SC0MOD1 SBI0BR0 ADMOD1 WDMOD 2. 3. IDLE1: Only the oscillator, RTC (real-time clock) and MLD continue to operate. STOP: All internal circuits stop operating. 92CA25-34 2007-02-28 TMP92CA25 The operation of each of the different HALT modes is described in Table 3.3.3. Table 3.3.3 I/O Operation during HALT Modes HALT Mode SYSCR2 CPU I/O ports TMRA, TMRB SIO, SBI Block AD converter WDT I2S, LCDC, SDRAMC, Interrupt controller, USBC, RTC, MLD Operate Operate Available to select operation block Stop IDLE2 11 Stop IDLE1 10 Depend on PxDR register setting STOP 01 (2) How to release the HALT mode These halt states can be released by resetting or requesting an interrupt. The halt release sources are determined by the combination of the states of the interrupt mask register and the HALT modes. The details for releasing the halt status are shown in Table 3.3.4. • Release by interrupt requesting The HALT mode release method depends on the status of the enabled interrupt .When the interrupt request level set before executing the HALT instruction exceeds the value of the interrupt mask register, the interrupt is processed depending on its status after the HALT mode is released, and the CPU status executing the instruction that follows the HALT instruction. When the interrupt request level set before executing the HALT instruction is less than the value of the interrupt mask register, HALT mode release is not executed. (in non-maskable interrupts, interrupt processing is processed after releasing the HALT mode regardless of the value of the mask register.) However only for INT0 to INT4, INTKEY, INTRTC, INTALM and interrupts, even if the interrupt request level set before executing the halt instruction is less than the value of the interrupt mask register, HALT mode release is executed. In this case, the interrupt is processed, and the CPU starts executing the instruction following the HALT instruction, but the interrupt request flag is held at “1”. • Release by resetting Release of all halt statuses is executed by resetting. When the STOP mode is released by RESET, it is necessary to allow enough resetting time (see Table 3.3.5) for operation of the oscillator to stabilize. When releasing the HALT mode by resetting, the internal RAM data keeps the state before the HALT instruction is executed. However the other settings contents are initialized. (Releasing due to interrupts keeps the state before the HALT instruction is executed.) 92CA25-35 2007-02-28 TMP92CA25 Table 3.3.4 Source of Halt State Clearance and Halt Clearance Operation Status of Received Interrupt HALT Mode INTWD Source of Halt State Clearance INT0 to INT4 (Note 1) INTALM0 to INTALM4 INTTA0 to INTTA3, Interrupt INTTB0 to INTTB1 INTRX0 to INTTX0, INTSBI INTTBO0, INTI2S INTAD, INT5, INTSPI INTKEY INTRTC INTLCD RESET Interrupt Enabled (Interrupt level) ≥ (Interrupt mask) IDLE2 ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ Interrupt Disabled (Interrupt level) < (Interrupt mask) IDLE2 − IDLE1 × ♦ ♦ × × × × ♦ ♦ × STOP × ♦*1 × × × × × ♦*1 ♦*1 × IDLE1 − STOP − ○ ○ × × × × ○ ○ × × × × ○* 1 × × × × × ○ ○ × ○ ○ × ○* 1 ○* 1 × Initialize LSI ♦: After clearing the HALT mode, CPU starts interrupt processing. ○: After clearing the HALT mode, CPU resumes executing starting from the instruction following the HALT instruction. ×: Cannot be used to release the HALT mode. −: The priority level (interrupt request level) of non-maskable interrupts is fixed to 7, the highest priority level. This combination is not available. *1: Release of the HALT mode is executed after warm-up time has elapsed. Note 1: When the HALT mode is cleared by an INT0 interrupt of the level mode in the interrupt enabled status, hold level H until starting interrupt processing. If level L is set before holding level L, interrupt processing is correctly started. Example: Releasing IDLE1 mode An INT0 interrupt clears the halt state when the device is in IDLE1 mode. Address 8200H 8203H 8206H 8209H 820BH 820EH LD LD LD EI LD HALT (PCFC), 01H (IIMC), 00H (INTE0AD), 06H 5 (SYSCR2), 28H ; ; ; ; ; ; Sets PC0 to INT0. Selects INT0 interrupt rising edge. Sets INT0 interrupt level to 6. Sets interrupt level to 5 for CPU. Sets HALT mode to IDLE1 mode. Halts CPU. INT0 INT0 interrupt routine RETI 820FH LD XX, XX 92CA25-36 2007-02-28 TMP92CA25 (3) Operation 1. IDLE2 mode In IDLE2 mode only specific internal I/O operations, as designated by the IDLE2 setting register, can take place. Instruction execution by the CPU stops. Figure 3.3.7 illustrates an example of the timing for clearance of the IDLE2 mode halt state by an interrupt. X1 A0 to A23 D0 to D15 RD Data Data WR Interrupt for release IDLE2 mode Figure 3.3.7 Timing Chart for IDLE2 Mode Halt State Cleared by Interrupt 2. IDLE1 mode In IDLE1 mode, only the internal oscillator and the RTC and MLD continue to operate. The system clock stops. In the halt state, the interrupt request is sampled asynchronously with the system clock; however, clearance of the halt state (e.g., restart of operation) is synchronous with it. Figure 3.3.8 illustrates the timing for clearance of the IDLE1 mode halt state by an interrupt. X1 A0 to A23 D0 to D15 RD Data Data WR Interrupt for release IDLE1 mode Figure 3.3.8 Timing Chart for IDLE1 Mode Halt State Cleared by Interrupt 92CA25-37 2007-02-28 TMP92CA25 3. STOP mode When STOP mode is selected, all internal circuits stop, including the internal oscillator. After STOP mode has been cleared system clock output starts when the warm-up time has elapsed, in order to allow oscillation to stabilize. Figure 3.3.9 illustrates the timing for clearance of the STOP mode halt state by an interrupt. Warm-up time X1 A0 to A23 D0 to D15 RD Data Data WR Interrupt for release STOP mode Figure 3.3.9 Timing Chart for STOP Mode Halt State Cleared by Interrupt Table 3.3.5 Example of Warm-up Time after Releasing STOP Mode at fOSCH = 40 MHz, fs = 32.768 kHz SYSCR1 0 (fc) 1 (fs) SYSCR2 01 (2 ) 6.4 μs 7.8 ms 8 10 (214) 409.6 μs 500 ms 11 (216) 1.638 ms 2000 ms 92CA25-38 2007-02-28 TMP92CA25 Table 3.3.6 Input Buffer State Table Input Buffer State In HALT mode (IDLE1/2/STOP) Input Function Port Name Name When the CPU is operating During Reset When used as Function pin ON upon external read − − ON − When used as Input pin − OFF − − ON − = 1 = 0 When used When used When When used as as used as as Function pin Input pin Function pin Input pin − OFF − − OFF − − D0~D7 P10~P17 P60~P67 P71~P72 P75 P76 P90 P91 P92 P93~P94 P96 * P97 PA0~PA7* 1 1 D0~D7 D8~D15 − − NDR / B WAIT OFF − RXD0 CTS0 , SCLK0 SDA, SCL INT4 INT5 KI0-KI7 INT0 INT1 INT2 INT3 − − RXD0 CTS0 ON ON ON ON ON OFF PC0 PC1 PC2 PC3 PC4~PC7 PF0 PF1 PF2 PG0~PG2* 2 OFF − − − ON − ON − ON − ON ON − ON ON upon port read ON − ON − ON − ON − ON − ON OFF − ON − OFF − OFF − ON − SCLK0 − ADTRG PG3 *2 OFF OFF PJ5~PJ6 PK4 PK5~PK5 PL4~PL5, PL7 PL6 PN0~PN7 BE RESET − SPDI − − BUSRQ AM0, AM1 X1, XT1 − − − − − input pin is not driven. ON − IDLE2/IDLE1:ON, STOP:OFF *2: AIN input does not cause a current to flow through the buffer. ON: The buffer is always turned on. A current flows the input buffer if the *1: Port having a pull-up/pull-down resistor. OFF: The buffer is always turned off. −: No applicable 92CA25-39 2007-02-28 TMP92CA25 Table 3.3.7 Output Buffer State Table (1/2) Output Buffer State When the CPU is operating Port Name Output Function Name During Reset When used as Function pin ON upon external write When used as Output pin − ON − ON OFF ON OFF ON OFF In HALT mode (IDLE1/2/STOP) = 1 When used as Function pin When used as Output pin − ON − = 0 When used When used as as Function Output pin pin − OFF − D0~D7 P10~P17 A0~A15 P60~P67 P70 P71 P72 P73 P74 P75 P76 P80 P81 P82 P83 P84 P85 P86 P87 P90 P91 P92 P93 P94 P95 P96 P97 D0~D7 OFF D8~D15 A16~A15, A16~A23 RD WRLL , NDRE WRLU , NDWE EA24 EA25 R/W − CS0 − − − CS1 , SDCS CS2 , CSZA ON ON ON OFF CS3 CSZB , ND0CE CSZC , ND1CE CSZD CSZE ON ON OFF TXD0, I2SCKO I2SDO I2SWS SDA SCL CLK32KO PX PY OFF ON OFF − − − ON: The buffer is always turned on. OFF: The buffer is always turned off. −: Not applicable *1: Port having a pull-up/pull-down resistor. 92CA25-40 2007-02-28 TMP92CA25 Table 3.3.8 Output Buffer State Table (2/2) Output Buffer State When the CPU is operating Port Name Output Function Name During Reset When used as Output pin In HALT mode (IDLE1/2/STOP) = 1 When used as Function pin When used as Output pin = 0 When used When used as as Function Output pin pin OFF − ON OFF − OFF When used as Function pin PC0 PC1 PC2 PC3 PC6 PC7 PF0 PF1 PF2 PF7 PG2 PG3 PJ0 PJ1 PJ2 PJ3 PJ4 PJ5 PJ6 PJ7 PK0 PK1 PK2 PK3 PK4 PK5 PK6 PK7 PL0~PL3 PL4~PL6 PL7 PM1 PM2 PN0~PN7 X2 TA1OUT TA3OUT TB0OUT0 ON − OFF ON − ON OFF − ON ON − ON − − KO8, EA24 CSZF , EA25 TXD0 − SCLK0 SDCLK MX MY SDRAS SRLLB − − SDCAS , SRLUB SDWE , SRWR ON ON OFF ON OFF SDLLDQM SDLUDQM NDALE NDCLE SDCKE LCP LLP LFR LBCD ON ON − OFF − ON − OFF − SPDO SPCS SPCLK LD0~LD3 LD4~LD6 LD7, BUSAK MLDALM ON OFF ON MLDALM , ALARM KO0~KO7 OFF IDLE2/1:ON, ON − − STOP: output ”H” IDLE2/1:ON, STOP: output ”HZ” *1: Port having a pull-up/pull-down resistor. − − XT2 ON: The buffer is always turned on. OFF: The buffer is always turned off. −: Not applicable 92CA25-41 2007-02-28 TMP92CA25 3.4 Interrupts Interrupts are controlled by the CPU Interrupt mask register (bits12 to 14 of the status register) and by the built-in interrupt controller. The TMP92CA25 has a total of 49 interrupts divided into the following five types: Interrupts generated by CPU: 9 sources Software interrupts: 8 sources Illegal instruction interrupt: 1 source Internal interrupts: 33 sources Internal I/O interrupts: 25 sources Micro DMA transfer end interrupts: 8 sources External interrupts: 7 sources Interrupts on external pins (INT0 to INT5, INTKEY) A fixed individual interrupt vector number is assigned to each interrupt source. Any one of six levels of priority can also be assigned to each maskable interrupt. Non-maskable interrupts have a fixed priority level of 7, the highest level. When an interrupt is generated, the interrupt controller sends the priority of that interrupt to the CPU. When more than one interrupt is generated simultaneously, the interrupt controller sends the priority value of the interrupt with the highest priority to the CPU. (The highest priority level is 7, the level used for non-maskable interrupts.) The CPU compares the interrupt priority level which it receives with the value held in the CPU interrupt mask register . If the priority level of the interrupt is greater than or equal to the value in the interrupt mask register, the CPU accepts the interrupt. However, software interrupts and illegal instruction interrupts generated by the CPU are processed irrespective of the value in . The value in the interrupt mask register can be changed using the EI instruction (EI num sets to num). For example, the command EI 3 enables the acceptance of all non-maskable interrupts and of maskable interrupts whose priority level, as set in the interrupt controller, is 3 or higher. The commands EI and EI 0 enable the acceptance of all non-maskable interrupts and of maskable interrupts with a priority level of 1 or above (hence both are equivalent to the command EI 1). The DI instruction (sets to 7) is exactly equivalent to the EI 7 instruction. The DI instruction is used to disable all maskable interrupts (since the priority level for maskable interrupts ranges from 1 to 6). The EI instruction takes effect as soon as it is executed. In addition to the general purpose interrupt processing mode described above, there is also a micro DMA processing mode. In micro DMA mode the CPU automatically transfers data in one-byte, two-byte or four-byte blocks; this mode allows high-speed data transfer to and from internal and external memory and internal I/O ports. In addition, the TMP92CA25 also has a software start function in which micro DMA processing is requested in software rather than by an interrupt. Figure 3.4.1 is a flowchart showing overall interrupt processing. 92CA25-42 2007-02-28 TMP92CA25 Interrupt processing Micro DMA soft start request Interrupt specified by micro DMA start vector ? YES Clear interrupt request flag NO Interrupt vector calue “V” read interrupt request F/F clear Data transfer by micro DMA Micro DMA processing General-purpose interrupt processing PUSH PC PUSH SR SR ← Level of accepted interrupt + 1 INTNEST ← INTNEST + 1 COUNT ← COUNT − 1 COUNT = 0 NO YES Clear vector register generating micro DMA transfer end interrupt (INTTC0 to 7) PC ← (FFFF00H + V) Interrupt processing program RETI instruction POP SR POP PC INTNEST ← INTNEST − 1 End Figure 3.4.1 Interrupt and Micro DMA Processing Sequence 92CA25-43 2007-02-28 TMP92CA25 3.4.1 General-purpose Interrupt Processing When the CPU accepts an interrupt, it usually performs the following sequence of operations. However, in the case of software interrupts and illegal instruction interrupts generated by the CPU, the CPU skips steps (1) and (3), and executes only steps (2), (4) and (5). (1) The CPU reads the interrupt vector from the interrupt controller. When more than one interrupt with the same priority level has been generated simultaneously, the interrupt controller generates an interrupt vector in accordance with the default priority and clears the interrupt requests. (The default priority is determined as follows: the smaller the vector value, the higher the priority.) (2) The CPU pushes the program counter (PC) and status register (SR) onto the top of the stack (pointed to by XSP). (3) The CPU sets the value of the CPU’s interrupt mask register to the priority level for the accepted interrupt plus 1. However, if the priority level for the accepted interrupt is 7, the register’s value is set to 7. (4) The CPU increments the interrupt nesting counter INTNEST by 1. (5) The CPU jumps to the address given by adding the contents of address FFFF00H + the interrupt vector, then starts the interrupt processing routine. On completion of interrupt processing, the RETI instruction is used to return control to the main routine. RETI restores the contents of the program counter and the status register from the stack and decrements the interrupt nesting counter INTNEST by 1. Non-maskable interrupts cannot be disabled by a user program. Maskable interrupts, however, can be enabled or disabled by a user program. A program can set the priority level for each interrupt source. (A priority level setting of 0 or 7 will disable an interrupt request.) If an interrupt request is received for an interrupt with a priority level equal to or greater than the value set in the CPU interrupt mask register , the CPU will accept the interrupt. The CPU interrupt mask register is then set to the value of the priority level for the accepted interrupt plus 1. If during interrupt processing, an interrupt is generated with a higher priority than the interrupt currently being processed, or if, during the processing of a non-maskable interrupt processing, a non-maskable interrupt request is generated from another source, the CPU will suspend the routine which it is currently executing and accept the new interrupt. When processing of the new interrupt has been completed, the CPU will resume processing of the suspended interrupt. If the CPU receives another interrupt request while performing processing steps (1) to (5), the new interrupt will be sampled immediately after execution of the first instruction of its interrupt processing routine. Specifying DI as the start instruction disables nesting of maskable interrupts. A reset initializes the interrupt mask register to 111, disabling all maskable interrupts. Table 3.4.1 shows the TMP92CA25 interrupt vectors and micro DMA start vectors. FFFF00H to FFFFFFH (256 bytes) is designated as the interrupt vector area. 92CA25-44 2007-02-28 TMP92CA25 Table 3.4.1 TMP92CA25 Interrupt Vectors and Micro DMA Start Vectors Default Priority 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 Maskable Nonmaskable Type Interrupt Source and Source of Micro DMA Request Reset or [SWI0] instruction [SWI1] instruction Illegal instruction or [SWI2] instruction [SWI3] instruction [SWI4] instruction [SWI5] instruction [SWI6] instruction [SWI7] instruction (Reserved) INTWD: Watchdog Timer Micro DMA INT0: INT0 pin input INT1: INT1 pin input INT2: INT2 pin input INT3: INT3 pin input INT4: INT4 pin input (TSI) INTALM0: ALM0 (8192 Hz) INTALM1: ALM1 (512 Hz) INTALM2: ALM2 (64 Hz) INTALM3: ALM3 (2 Hz) INTALM4: ALM4 (1 Hz) INTP0: Protect0 (Write to special SFR) (Reserved) INTTA0: 8-bit timer 0 INTTA1: 8-bit timer 1 INTTA2: 8-bit timer 2 INTTA3: 8-bit timer 3 INTTB0: 16-bit timer 0 INTTB1: 16-bit timer 0 INTKEY: Key-on wakeup INTRTC: RTC (Alarm interrupt) INTTBO0: 16-bit timer 0 (Overflow) INTLCD: LCDC/LP pin INTRX0: Serial receive (Channel 0) INTTX0: Serial transmission (Channel 0) (Reserved) (Reserved) (Reserved) (Reserved) INT5: INT5 pin input INTI2S: I S (Channel 0) INTNDF0 (NAND flash controller channel 0) INTNDF1 (NAND flash controller channel 1) INTSPI: SPIC INTSBI: SBI (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) (Reserved) 2 Vector Value 0000H 0004H 0008H 000CH 0010H 0014H 0018H 001CH 0020H 0024H − 0028H 002CH 0030H 0034H 0038H 003CH 0040H 0044H 0048H 004CH 0050H 0054H 0058H 005CH 0060H 0064H 0068H 006CH 0070H 0074H 0078H 007CH 0080H 0084H 0088H 008CH 0090H 0094H 0098H 009CH 00A0H 00A4H 00A8H 00ACH 00B0H 00B4H 00B8H 00BCH 00C0H 00C4H Micro Address Refer DMA Start to Vector Vector FFFF00H FFFF04H FFFF08H FFFF0CH FFFF10H FFFF14H FFFF18H FFFF1CH FFFF20H FFFF24H − FFFF28H FFFF2CH FFFF30H FFFF34H FFFF38H FFFF3CH FFFF40H FFFF44H FFFF48H FFFF4CH FFFF50H FFFF54H FFFF58H FFFF5CH FFFF60H FFFF64H FFFF68H FFFF6CH FFFF70H FFFF74H FFFF78H FFFF7CH FFFF80H FFFF84H FFFF88H FFFF8CH FFFF90H FFFF94H FFFF98H FFFF9CH FFFFA0H FFFFA4H FFFFA8H FFFFACH FFFFB0H FFFFB4H FFFFB8H FFFFBCH FFFFC0H FFFFC4H − (Note1) 0AH (Note 2) 0BH 0CH 0DH 0EH 0FH 10H 11H 12H 13H 14H 15H 16H 17H 18H 19H 1AH 1BH 1CH 1DH 1EH 1FH 20H (Note 2) 21H 22H (Note 2) 23H 24H 25H 26H 27H 28H 29H 2AH 2BH 2CH 2DH 2EH 2FH 30H 31H 92CA25-45 2007-02-28 TMP92CA25 Interrupt Source and Source of Micro DMA Request (Reserved) INTAD: AD conversion end INTTC0: Micro DMA end (Channel 0) INTTC1: Micro DMA end (Channel 1) INTTC2: Micro DMA end (Channel 2) INTTC3: Micro DMA end (Channel 3) Maskable INTTC4: Micro DMA end (Channel 4) INTTC5: Micro DMA end (Channel 5) INTTC6: Micro DMA end (Channel 6) INTTC7: Micro DMA end (Channel 7) (Reserved) Default Priority 51 52 53 54 55 56 57 58 59 60 − to − Type Vector Value 00C8H 00CCH 00D0H 00D4H 00D8H 00DCH 00E0H 00E4H 00E8H 00ECH 00F0H : 00FCH Micro Address Refer DMA Start to Vector Vector FFFFC8H FFFFCCH FFFFD0H FFFFD4H FFFFD8H FFFFDCH FFFFE0H FFFFE4H FFFFE8H FFFFECH FFFFF0H : FFFFFCH 32H 33H 34H 35H 36H 37H 38H 39H 3AH 3BH − to − Note 1: Micro DMA default priority. Micro DMA initiation takes priority over other maskable interrupts. Note 2: When initiating micro DMA, set at edge detect mode. 92CA25-46 2007-02-28 TMP92CA25 3.4.2 Micro DMA Processing In addition to general purpose interrupt processing, the TMP92CA25 also includes a micro DMA function. Micro DMA processing for interrupt requests set by micro DMA is performed at the highest priority level for maskable interrupts (level 6), regardless of the priority level of the interrupt source. Because the micro DMA function is implemented through the CPU, when the CPU is placed in a stand-by state by a Halt instruction, the requirements of the micro DMA will be ignored (pending). Micro DMA supports 8 channels and can be transferred continuously by specifying the micro DMA burst function as below. Note: When using the micro DMA transfer end interrupt, always write “1” to bit 7 of SIMC register. (1) Micro DMA operation When an interrupt request is generated by an interrupt source specified by the micro DMA start vector register, the micro DMA triggers a micro DMA request to the CPU at interrupt priority level 6 and starts processing the request. The eight micro DMA channels allow micro DMA processing to be set for up to eight types of interrupt at once. When micro DMA is accepted, the interrupt request flip-flop assigned to that channel is cleared. Data in one-byte, two-byte or four-byte blocks, is automatically transferred at once from the transfer source address to the transfer destination address set in the control register, and the transfer counter is decremented by 1. If the value of the counter after it has been decremented is not 0, DMA processing ends with no change in the value of the micro DMA start vector register. If the value of the decremented counter is 0, a micro DMA transfer end interrupt (INTTC0 to INTTC7) is sent from the CPU to the interrupt controller. In addition, the micro DMA start vector register is cleared to 0, the next micro DMA operation is disabled and micro DMA processing terminates. If micro DMA requests are set simultaneously for more than one channel, priority is not based on the interrupt priority level but on the channel number: the lower the channel number, the higher the priority (channel 0 thus has the highest priority and channel 7 the lowest). If an interrupt request is triggered for the interrupt source in use during the interval between the time at which the micro DMA start vector is cleared and the next setting, general purpose interrupt processing is performed at the interrupt level set. Therefore, if the interrupt is only being used to initiate micro DMA (and not as a general-purpose interrupt), the interrupt level should first be set to 0 (i.e., interrupt requests should be disabled). If micro DMA and general purpose interrupts are being used together as described above, the level of the interrupt which is being used to initiate micro DMA processing should first be set to a lower value than all the other interrupt levels. (Note) In this case, edge triggered interrupts are the only kinds of general interrupts which can be accepted. Note: If the priority level of micro DMA is set higher than that of other interrupts, CPU operates as follows. In case INTxxx interrupt is generated first and then INTyyy interrupt is generated between checking “Interrupt specified by micro DMA start vector” (in the Figure 3.4.1) and reading interrupt vector with setting below. The vector shifts to that of INTyyy at the time. This is because the priority level of INTyyy is higher than that of INTxxx. In the interrupt routine, CPU reads the vector of INTyyy because cheking of micro DMA has finished. And INTyyy is generated regardless of transfer counter of micro DMA. INTxxx: level 1 without micro DMA INTyyy: level 6 with micro DMA 92CA25-47 2007-02-28 TMP92CA25 Although the control registers used for setting the transfer source and transfer destination addresses are 32 bits wide, this type of register can only output 24-bit addresses. Accordingly, micro DMA can only access 16 Mbytes (the upper eight bits of a 32-bit address are not valid). Three micro DMA transfer modes are supported: one-byte transfers, two-byte (one-word) transfer and four-byte transfer. After a transfer in any mode, the transfer source and transfer destination addresses will either be incremented or decremented, or will remain unchanged. This simplifies the transfer of data from memory to memory, from I/O to memory, from memory to I/O, and from I/O to I/O. For details of the various transfer modes, see section 3.4.2 (1), detailed description of the transfer mode register. Since a transfer counter is a 16-bit counter, up to 65536 micro DMA processing operations can be performed per interrupt source (provided that the transfer counter for the source is initially set to 0000H). Micro DMA processing can be initiated by any one of 34 different interrupts – the 33 interrupts shown in the micro DMA start vectors in Table 3.4.1 and a micro DMA soft start. Figure 3.4.2 shows a 2-byte transfer carried out using a micro DMA cycle in transfer destination address INC mode (micro DMA transfers are the same in every mode except counter mode). (The conditions for this cycle are as follows: Both source and destination memory are internal RAM and multiples by 4 numbered source and destination addresses.) 1 state (1) fSYS A23 to A0 (2) (3) (4) (5) src dst Note: In fact, src and dst address are not output to A23 to A0 pins because they are internal RAM address. Figure 3.4.2 Timing for Micro DMA Cycle State (1), (2): Instruction fetch cycle (Prefetches the next instruction code) State (3): State (4): State (5): Micro DMA read cycle Micro DMA write cycle (The same as in state (1), (2)) 92CA25-48 2007-02-28 TMP92CA25 (2) Soft start function The TMP92CA25 can initiate micro DMA either with an interrupt or by using the micro DMA soft start function, in which micro DMA is initiated by a write cycle which writes to the register DMAR. Writing 1 to any bit of the register DMAR causes micro DMA to be performed once. (If write “0” to each bit, micro DMA doesn’t operate). On completion of the transfer, the bits of DMAR which support the end channel are automatically cleared to 0. Only one channel can be set for DMA request at once. (Do not write “1” to plural bits.) When writing again 1 to the DMAR register, check whether the bit is “0” before writing “1”. If read “1”, micro DMA transfer isn’t started yet. When a burst is specified by the DMAB register, data is transferred continuously from the initiation of micro DMA until the value in the micro DMA transfer counter is 0. If execatee soft start during micro DMA transfer by interrupt source, micro DMA transfer counter doesn’t change. Don’t use Read-modify-write instruction to avoid writign to other bits by mistake. Symbol Name DMA Request Address 109H (Prohibit RMW) 7 DREQ7 0 6 DREQ6 0 5 DREQ5 0 4 DREQ4 0 R/W 3 DREQ3 0 2 DREQ2 0 1 DREQ1 0 0 DREQ0 0 DMAR 1: DMA request in software (3) Transfer control registers The transfer source address and the transfer destination address are set in the following registers. An instruction of the form LDC cr, r can be used to set these registers. Channel 0 DMAS0 DMAD0 DMAC0 DMAM0 DMA source address register 0 DMA destination address register 0 DMA counter register 0 DMA mode register 0 Channel 7 DMAS7 DMAD7 DMAC7 DMAM7 8 bits 16 bits 32 bits DMA source address register 7 DMA destination address register 7 DMA counter register 7 DMA mode register 7 92CA25-49 2007-02-28 TMP92CA25 (4) Detailed description of the transfer mode register 0 0 0 Mode DMAM0 to DMAM7 DMAMn[4:0] 000zz Mode Description Destination INC mode (DMADn+) ← (DMASn) DMACn ← DMACn − 1 if DMACn = 0 then INTTCn Destination DEC mode (DMADn−) ← (DMASn) DMACn ← DMACn − 1 if DMACn = 0 then INTTCn Source INC mode (DMADn) ← (DMASn+) DMACn ← DMACn − 1 if DMACn = 0 then INTTCn Source DEC mode (DMADn) ← (DMASn−) DMACn ← DMACn − 1 if DMACn = 0 then INTTCn Source and destination INC mode (DMADn+) ← (DMASn+) DMACn ← DMACn − 1 If DMACn = 0 then INTTCn Source and destination DEC mode (DMADn−) ← (DMASn−) DMACn ← DMACn − 1 If DMACn = 0 then INTTCn Source and destination Fixed mode (DMADn) ← (DMASn) DMACn ← DMACn − 1 If DMACn = 0 then INTTCn Counter mode DMASn ← DMASn + 1 DMACn ← DMACn − 1 if DMACn = 0 then INTTCn Execution State Number 5 states 001zz 5 states 010zz 5 states 011zz 5 states 100zz 6 states 101zz 6 states 110zz 5 states 11100 5 states ZZ: 00 = 1-byte transfer 01 = 2-byte transfer 10 = 4-byte transfer 11 = (Reserved) Note1: N stands for the micro DMA channel number (0 to 7) DMADn+/DMASn+: Post-increment (register value is incremented after transfer) DMADn−/DMASn−: Post-decrement (register value is decremented after transfer) “I/O” signifies fixed memory addresses; “memory” signifies incremented or decremented memory addresses. Note2: The transfer mode register should not be set to any value other than those listed above. Note3: The execution state number shows number of best case (1-state memory access). 92CA25-50 2007-02-28 TMP92CA25 3.4.3 Interrupt Controller Operation The block diagram in Figure 3.4.3 shows the interrupt circuits. The left hand side of the diagram shows the interrupt controller circuit. The right hand side shows the CPU interrupt request signal circuit and the halt release circuit. For each of the 52 interrupts channels there is an interrupt request flag (consisting of a flip-flop), an interrupt priority setting register and a micro DMA start vector register. The interrupt request flag latches interrupt requests from the peripherals. The flag is cleared to zero in the following cases: when a reset occurs, when the CPU reads the channel vector of an interrupt it has received, when the CPU receives a micro DMA request (when micro DMA is set), when a micro DMA burst transfer is terminated, and when an instruction that clears the interrupt for that channel is executed (by writing a micro DMA start vector to the INTCLR register). An interrupt priority can be set independently for each interrupt source by writing the priority to the interrupt priority setting register (e.g., INTE0AD or INTE12). 6 interrupt priorities levels (1 to 6) are provided. Setting an interrupt source’s priority level to 0 (or 7) disables interrupt requests from that source. The priority of non-maskable interrupt (watchdog timer interrupts) is fixed at 7. If more than one interrupt request with a given priority level are generated simultaneously, the default priority (the interrupt with the lowest priority or, in other words, the interrupt with the lowest vector value) is used to determine which interrupt request is accepted first. The 3rd and 7th bit of the interrupt priority setting register indicate the state of the interrupt request flag and thus whether an interrupt request for a given channel has occurred. If several interrupts are generated simultaneously, the interrupt controller sends the interrupt request for the interrupt with the highest priority and the interrupt’s vector address to the CPU. The CPU compares the mask value set in of the status register (SR) with the priority level of the requested interrupt; if the latter is higher, the interrupt is accepted. Then the CPU sets SR to the priority level of the accepted interrupt + 1. Hence, during processing of the accepted interrupt, new interrupt requests with a priority value equal to or higher than the value set in SR (e.g., interrupts with a priority higher than the interrupt being processed) will be accepted. When interrupt processing has been completed (e.g., after execution of a RETI instruction), the CPU restores to SR the priority value which was saved on the stack before the interrupt was generated. The interrupt controller also includes eight registers which are used to store the micro DMA start vector. Writing the start vector of the interrupt source for the micro DMA processing (see Table 3.4.1), enables the corresponding interrupts to be processed by micro DMA processing. The values must be set in the micro DMA parameter registers (e.g., DMAS and DMAD) prior to micro DMA processing. 92CA25-51 2007-02-28 Interrupt controller Interrupt request F/F S R V = 20H V = 24H CPU 1 Q Interrupt mask F/F RESET Interrupt request RESET interrupt vector read Decoder Priority encoder signal to CPU IFF2 to 0 3 3 INTRQ2 to 0 3 Interrupt level detect 1 7 6 6 A B C INTWD Priority setting register D Q CLR Interrupt request F/F Dn + 3 Interrupt request F/F 45 Interrupt vector generator Dn Dn + 1 EI 1 t o 7 DI Interrupt request signal Dn + 2 Y1 Y2 Y3 Y4 Y5 Y6 If INTRQ2 to 0 ≥ IFF 2 to 0 then 1. INT0 Reset SQ R D0 D1 Interrupt vector read Micro DMA acknowledge D2 D3 D4 D5 D6 D7 1 A 2 Highest priority B 3 interrupt 4 level select C 5 6 7 INT1 INT2 INT3 INT4 INTALM0 INTALM1 INTALM2 INTALM3 INTALM4 V = 28H V = 2CH V = 30H V = 34H V = 38H V = 3CH V = 40H V = 44H V = 48H V = 4CH During IDLE1 During STOP Figure 3.4.3 Block Diagram of Interrupt Controller Interrupt vector read V = D0H V = D4H V = D8H V = DCH V = E0H V = E4H V = E8H V = ECH 92CA25-52 8 input OR Soft start 8 51 S Selector Halt release Micro DMA counter 0 interrupt RESET INT01 to INT4, INTKEY,INTRTC, INTALM Micro DMA request INTTC0 INTTC1 INTTC2 INTTC3 INTTC4 INTTC5 INTTC6 INTTC7 Micro DMA start vector setting register D5 D4 D3 D2 D1 D0 DQ CLR 6 INTTC0 DMA0V DMA1V : DMA7V if IFF = 7 then 0 3 3 RESET 0 1 2 3 4 5 6 7 A B C Micro DMA channel priority decoder Micro DMA channel specification TMP92CA25 2007-02-28 TMP92CA25 (1) Interrupt level setting registers Symbol Name INT0 & INTAD enable INT1 INTE12 & INT2 enable INT3 INTE34 & INT4 enable INT5 INTE5I2S & INTI2S enable INTTA0 INTETA01 & INTTA1 enable INTTA2 INTETA23 & INTTA3 enable INTTB0 INTETB01 & INTTB1 enable INTTBO0 INTETBO0 Address 7 IADC R 0 I2C R 0 I4C R 0 II2SC R 0 ITA1C R 0 ITA3C R 0 ITB1C R 0 − 6 INTAD IADM2 0 INT2 I2M2 0 INT4 I4M2 0 INTI2S II2SM2 0 ITA1M2 0 ITA3M2 0 ITB1M2 0 − − 5 IADM1 R/W 0 I2M1 R/W 0 I4M1 R/W 0 II2SM1 R/W 0 ITA1M1 R/W 0 ITA3M1 R/W 0 ITB1M1 R/W 0 − 4 IADM0 0 I2M0 0 I4M0 0 II2SM0 0 ITA1M0 0 ITA3M0 0 ITB1M0 0 − 3 I0C R 0 I1C R 0 I3C R 0 I5C R 0 ITA0C R 0 ITA2C R 0 ITB0C R 0 ITBO0C 2 INT0 I0M2 0 INT1 I1M2 0 INT3 I3M2 0 INT5 I5M2 0 ITA0M2 0 ITA2M2 0 ITB0M2 0 INTTBO0 ITBO0M2 1 I0M1 R/W 0 I1M1 R/W 0 I3M1 R/W 0 I5M1 R/W 0 ITA0M1 R/W 0 ITA2M1 R/W 0 ITB0M1 R/W 0 ITBO0M1 0 I0M0 0 I1M0 0 I3M0 0 I5M0 0 ITA0M0 0 ITA2M0 0 ITB0M0 0 ITBO0M0 INTE0AD F0H D0H D1H EBH INTTA1 (TMRA1) D4H INTTA0 (TMRA0) INTTA3 (TMRA3) D5H INTTA2 (TMRA2) INTTB1 (TMRB1) D8H INTTB0 (TMRB0) (Overflow) enable DAH R Note: Always write 0 0 ITX0M0 0 ITX1M0 0 IA1M0 0 IA3M0 0 IA0C R 0 IA2C R 0 0 0 IRX0C R 0 − 0 − − 0 INTTX0 R/W 0 INTRX0 IRX0M2 IRX0M1 R/W 0 − 0 − IRX0M0 0 INTRX0 INTES0 & INTTX0 enable DBH ITX0C R 0 ITX1C R 0 INTALM0 & INTALM1 enable IA1C R 0 INTALM2 & INTALM3 enable IA3C R 0 0 0 0 0 ITX0M2 ITX0M1 R/W 0 INTTX1 INTESPI INTSPI enable E0H ITX1M2 ITX1M1 R/W 0 INTALM1 INTEALM01 Note: Always write 0 INTALM0 IA0M2 IA0M1 R/W 0 INTALM2 IA2M2 IA2M1 R/W 0 0 IA2M0 0 IA0M0 E5H IA1M2 IA1M1 R/W 0 INTALM3 INTEALM23 E6H IA3M2 IA3M1 R/W 0 92CA25-53 2007-02-28 TMP92CA25 Symbol Name INTALM4 enable Address 7 − 6 − − 5 − 4 − 3 IA4C R 0 2 INTALM4 IA4M2 0 INTRTC IRM2 0 INTKEY IKM2 0 INTLCD ILCDM2 0 INTNDF0 IN0M2 0 INTP0 IP0M2 0 1 IA4M1 R/W 0 IRM1 R/W 0 IKM1 R/W 0 ILCDM1 R/W 0 IN0M1 R/W 0 IP0M1 R/W 0 0 IA4M0 0 IRM0 0 IKM0 0 ILCDM0 0 IN0M0 0 IP0M0 0 INTEALM4 E7H Note: Always write 0 − INTERTC INTRTC enable E8H − − − − IRC R 0 Note: Always write 0 − INTEKEY INTKEY enable E9H − − − − IKC R 0 Note: Always write 0 − INTELCD INTLCD enable EAH − − − − ILCD1C R 0 Note: Always write 0 INTNDF0 & INTNDF1 enable INTNDF1 ECH IN1C R 0 − 0 − INTEP0 INTP0 enable EEH − − − IN1M2 IN1M1 R/W 0 0 IN1M0 INTEND01 IN0C R 0 IP0C R 0 Note: Always write 0 lxxM2 0 0 0 0 Interrupt request flag 1 1 1 1 lxxM1 0 0 1 1 0 0 1 1 lxxM0 0 1 0 1 0 1 0 1 Function (Write) Disables interrupt requests Sets interrupt priority level to 1 Sets interrupt priority level to 2 Sets interrupt priority level to 3 Sets interrupt priority level to 4 Sets interrupt priority level to 5 Sets interrupt priority level to 6 Disables interrupt requests 92CA25-54 2007-02-28 TMP92CA25 Symbol Name INTTC0 & INTTC1 enable INTTC2 & INTTC3 enable INTTC4 & INTTC5 enable INTTC6 & INTTC7 enable Address 7 ITC1C R 0 ITC3C R 0 ITC5C R 0 ITC7C R 0 6 ITC1M2 0 ITC3M2 0 ITC5M2 0 ITC7M2 0 − − 5 ITC1M1 R/W 0 ITC3M1 R/W 0 ITC5M1 R/W 0 ITC7M1 R/W 0 − 4 ITC1M0 0 ITC3M0 0 ITC5M0 0 ITC7M0 0 − 3 ITC0C R 0 ITC2C R 0 ITC4C R 0 ITC6C R 0 ITCWD R 0 2 ITC0M2 0 ITC2M2 0 ITC4M2 0 ITC6M2 0 INTWD − − 1 ITC0M1 R/W 0 ITC2M1 R/W 0 ITC4M1 R/W 0 ITC6M1 R/W 0 − − 0 ITC0M0 0 ITC2M0 0 ITC4M0 0 ITC6M0 0 − − INTTC1 (DMA1) F1H INTTC0 (DMA0) INTETC01 INTTC3 (DMA3) F2H INTTC2 (DMA2) INTETC23 INTTC5 (DMA5) F3H INTTC4 (DMA4) INTETC45 INTTC7 (DMA7) INTETC67 F4H INTTC6 (DMA6) INTWDT INTWD enable F7H − Note: Always write 0 lxxM2 0 0 0 0 Interrupt request flag 1 1 1 1 lxxM1 0 0 1 1 0 0 1 1 lxxM0 0 1 0 1 0 1 0 1 Function (Write) Disables interrupt requests Sets interrupt priority level to 1 Sets interrupt priority level to 2 Sets interrupt priority level to 3 Sets interrupt priority level to 4 Sets interrupt priority level to 5 Sets interrupt priority level to 6 Disables interrupt requests 92CA25-55 2007-02-28 TMP92CA25 (2) External interrupt control Symbol Name Address 7 I5EDGE 0 F6H 6 I4EDGE 0 5 I3EDGE W 0 4 I2EDGE 0 3 I1EDGE 0 2 I0EDGE 0 1 I0LE R/W 0 0 − 0 Always write “0” IIMC Interrupt input mode control INT5EDGE INT4EDGE INT3EDGE INT2EDGE INT1EDGE INT0EDGE 0: INT0 (Prohibit edge 0: Rising 0: Rising 0: Rising 0: Rising 0: Rising 0: Rising RMW) mode 1: Falling 1: Falling 1: Falling 1: Falling 1: Falling 1: Falling 1: INT0 level mode *INT0 level enable 0 Edge detect INT 1 “H” level INT Note 1: Disable INT0 request before changing INT0 pin mode from level sense to edge sense. Setting example: DI LD LD NOP NOP NOP EI (IIMC), XXXXXX00B ; Switches from level to edge. (INTCLR), 0AH ; Clears interrupt request flag. ; Wait EI execution X: Don’t care, −: No change. Note 2: See electrical characteristics in section 4 for external interrupt input pulse width. Settings of External Interrupt Pin Function Interrupt Pin Name Mode Rising edge INT0 PC0 Falling edge High level Rising edge INT1 PC1 Falling edge Rising edge INT2 PC2 Falling edge Rising edge INT3 PC3 Falling edge Rising edge INT4 P96 Falling edge Rising edge INT5 P97 Falling edge = 0, = 0 = 0, = 1 = 1 = 0 = 1 = 0 = 1 = 0 = 1 = 0 = 1 = 0 = 1 Setting Method 92CA25-56 2007-02-28 TMP92CA25 (3) SIO receive interrupt control Symbol Name Address 7 − W SIO SIMC interrupt mode control F5H (Prohibit RMW) 0 Always write “0” (Note) 1 Always write “0” 6 5 4 3 2 1 − W 0 IR0LE 1 0: INTRX0 edge mode 1: INTRX0 level mode Note: When using the micro DMA transfer end interrupt, always write “1”. INTRX0 rising edge enable 0 Edge detect INTRX0 1 “H” level INTRX0 92CA25-57 2007-02-28 TMP92CA25 (4) Interrupt request flag clear register The interrupt request flag is cleared by writing the appropriate micro DMA start vector, as given in Table 3.4.1, to the register INTCLR. For example, to clear the interrupt flag INT0, perform the following register operation after execution of the DI instruction. INTCLR ← 0AH Symbol Name Interrupt clear control Clears interrupt request flag INT0. 6 CLRV6 0 Address F8H (Prohibit RMW) 7 CLRV7 5 CLRV5 0 4 CLRV4 W 0 3 CLRV3 0 2 CLRV2 0 1 CLRV1 0 0 CLRV0 0 INTCLR 0 Interrupt vector (5) Micro DMA start vector registers These registers assign micro DMA processing to sets which source corresponds to DMA. The interrupt source whose micro DMA start vector value matches the vector set in one of these registers is designated as the micro DMA start source. When the micro DMA transfer counter value reaches zero, the micro DMA transfer end interrupt corresponding to the channel is sent to the interrupt controller, the micro DMA start vector register is cleared, and the micro DMA start source for the channel is cleared. Therefore, in order for micro DMA processing to continue, the micro DMA start vector register must be set again during processing of the micro DMA transfer end interrupt. If the same vector is set in the micro DMA start vector registers of more than one channel, the lowest numbered channel takes priority. Accordingly, if the same vector is set in the micro DMA start vector registers for two different channels, the interrupt generated on the lower numbered channel is executed until micro DMA transfer is complete. If the micro DMA start vector for this channel has not been set in the channel’s micro DMA start vector register again, micro DMA transfer for the higher-numbered channel will be commenced. (This process is known as micro DMA chaining.) 92CA25-58 2007-02-28 TMP92CA25 Symbol Name DMA0 Address 7 6 5 DMA0V5 4 DMA0V4 0 DMA1V4 0 DMA2V4 0 DMA3V4 0 DMA4V4 0 DMA5V4 0 DMA6V4 0 DMA7V4 0 3 DMA0V3 0 DMA1V3 0 DMA2V3 0 DMA3V3 0 DMA4V3 0 DMA5V3 0 DMA6V3 0 DMA7V3 0 R/W 2 DMA0V2 0 DMA1V2 0 DMA2V2 0 DMA3V2 0 DMA4V2 0 DMA5V2 0 DMA6V2 0 DMA7V2 0 1 DMA0V1 0 DMA1V1 0 DMA2V1 0 DMA3V1 0 DMA4V1 0 DMA5V1 0 DMA6V1 0 DMA7V1 0 0 DMA0V0 0 DMA1V0 0 DMA2V0 0 DMA3V0 0 DMA4V0 0 DMA5V0 0 DMA6V0 0 DMA7V0 0 DMA0V start vector 100H 0 DMA1V5 101H 0 DMA2V5 102H 0 DMA3V5 103H 0 DMA4V5 104H 0 DMA5V5 105H 0 DMA6V5 106H 0 DMA7V5 107H 0 DMA0 start vector DMA1 DMA1V start vector R/W DMA1 start vector DMA2 DMA2V start vector R/W DMA2 start vector DMA3 DMA3V start vector R/W DMA3 start vector DMA4 DMA4V start vector R/W DMA4 start vector DMA5 DMA5V start vector R/W DMA5 start vector DMA6 DMA6V start vector R/W DMA6 start vector DMA7 DMA7V start vector R/W DMA7 start vector 92CA25-59 2007-02-28 TMP92CA25 (6) Specification of a micro DMA burst Specifying the micro DMA burst function causes micro DMA transfer, once started, to continue until the value in the transfer counter register reaches zero. Setting any of the bits in the register DMAB which correspond to a micro DMA channel (as shown below) to 1 specifies that any micro DMA transfer on that channel will be a burst transfer. Symbol Name DMA burst Address 7 DBST7 6 DBST6 0 5 DBST5 0 4 DBST4 R/W 0 3 DBST3 0 2 DBST2 0 1 DBST1 0 0 DBST0 0 DMAB 108H 0 1: DMA burst request 92CA25-60 2007-02-28 TMP92CA25 (7) Notes The instruction execution unit and the bus interface unit in this CPU operate independently. Therefore, immediately before an interrupt is generated, if the CPU fetches an instruction which clears the corresponding interrupt request flag, the CPU may execute this instruction in between accepting the interrupt and reading the interrupt vector. In this case, the CPU will read the default vector 0004H and jump to interrupt vector address FFFF04H. To avoid this, an instruction which clears an interrupt request flag should always be placed after a DI instruction. And in the case of setting an interrupt enable again by EI instruction after the execution of clearing instruction, execute EI instruction after clearing and more than 3−instructions (e.g., “NOP” × 3 times). If it placed EI instruction without waiting NOP instruction after execution of clearing instruction, interrupt will be enabled before request flag is cleared. In the case of changing the value of the interrupt mask register by execution of POP SR instruction, disable an interrupt by DI instruction before execution of POP SR instruction. In addition, please note that the following two circuits are exceptional and demand special attention. INT0 level mode In level mode INT0 is not an edge triggered interrupt. Hence, in level mode the interrupt request flip-flop for INT0 does not function. The peripheral interrupt request passes through the S input of the flip-flop and becomes the Q output. If the interrupt input mode is changed from edge mode to level mode, the interrupt request flag is cleared automatically. If the CPU enters the interrupt response sequence as a result of INT0 going from 0 to 1, INT0 must then be held at 1 until the interrupt response sequence has been completed. If INT0 is set to level mode so as to release a halt state, INT0 must be held at 1 from the time INT0 changes from 0 to 1 until the halt state is released. (Hence, it is necessary to ensure that input noise is not interpreted as a 0, causing INT0 to revert to 0 before the halt state has been released.) When the mode changes from level mode to edge mode, interrupt request flags which were set in level mode will not be cleared. Interrupt request flags must be cleared using the following sequence. DI LD (IIMC), 00H NOP NOP NOP EI ; Switches from level to edge. ; Wait EI execution LD (INTCLR), 0AH ; Clears interrupt request flag. INTRX In level mode (the register SIMC set to “0”), the interrupt request flip-flop can only be cleared by a reset or by reading the serial channel receive buffer. It cannot be cleared by writing INTCLR register. Note: The following instructions or pin input state changes are equivalent to instructions which clear the interrupt request flag. INT0: Instructions which switch to level mode after an interrupt request has been generated in edge mode. The pin input changes from high to low after an interrupt request has been generated in level mode. (“H” → “L”) INTRX: Instructions which read the receive buffer. INTRX: Instructions which read the receive buffer. 92CA25-61 2007-02-28 TMP92CA25 3.5 Function of Ports The TMP92CA25 I/O port pins are shown in Table 3.5.1 and Table 3.5.2. In addition to functioning as general-purpose I/O ports, these pins are also used by the internal CPU and I/O functions. Table 3.5.3 to Table 3.5.5 list the I/O registers and their specifications. Table 3.5.1 Port Functions (1/2) (R: PD = with programmable pull-down resistor, U = with pull-up resistor) Port Name Port 1 Port 6 Port 7 Pin Name P10 to P17 P60 to P67 P70 P71 P72 P73 P74 P75 P76 Number of Pins 8 8 1 1 1 1 1 1 1 I/O I/O I/O Output I/O I/O I/O I/O I/O I/O R − − − − − − − − − − − − − − − I/O Setting Bit Bit (Fixed) Bit Bit Bit Bit Bit Pin Name for Built-in Function D8 to D15 A16 to A23 RD WRLL , NDRE WRLU , NDWE EA24 EA25 R/ W , NDR/ B WAIT CS0 CS1 , SDCS CS2 , CSZA CS3 CSZB , WRUL , ND0CE CSZC , WRUU , ND1CE CSZD CSZE Bit (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) Bit Bit Bit Bit Bit (Fixed) (Fixed) (Fixed) (Fixed) Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit (Fixed) Port 8 P80 P81 P82 P83 P84 P85 P86 P87 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Output Output Output Output Output Output Output Output I/O I/O I/O I/O I/O Output Input Input Input I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O Output − − − − − − − − Port 9 P90 P91 P92 P93 P94 P95 P96 P97 TXD0, I2SCKO RXD0, I2SDO SCLK0, CTS0 , I2SWS SDA SCL CLK32KO INT4, PX INT5, PY KI0 to KI7 INT0, TA1OUT INT1, TA3OUT INT2, TB0OUT0 INT3 PD − Port A Port C PA0 to PA7 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 U − − − − − − − − − − − − − − − − KO8, EA24 CSZF , EA25 Port F PF0 PF1 PF2 PF3 PF4 PF5 PF6 PF7 TXD0 RXD0 SCLK0, CTS0 SDCLK 92CA25-62 2007-02-28 TMP92CA25 Table 3.5.2 Port Functions (2/2) (R: PD = with programmable pull-down resistor, U = with pull-up resistor) Port Name Port G Pin Name PG0 to PG1 PG2 PG3 Number of Pins 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 2 1 1 1 1 8 I/O Input Input Input Output Output Output Output Output I/O I/O Output Output Output Output Output I/O I/O I/O I/O Output I/O I/O I/O Output Output I/O R − − − − − − − − − − − − − − − − − − − − − − − − − − I/O Setting (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) Bit Bit (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) Bit Bit Bit Bit (Fixed) Bit Bit Bit (Fixed) (Fixed) Bit Pin Name for Built-in Function AN0 to AN1 AN2, MX AN3, ADTRG , MY SDRAS , SRLLB SDCAS , SRLUB SDWE , SRWR Port J PJ0 PJ1 PJ2 PJ3 PJ4 PJ5 PJ6 PJ7 SDLLDQM SDLUDQM NDALE NDCLE SDCKE LCP0 LLP LFR LBCD SPDI SPDO SPCS Port K PK0 PK1 PK2 PK3 PK4 PK5 PK6 PK7 SPCLK LD0 to LD3 LD4 to LD5 LD6, BUSRQ LD7, BUSAK MLDALM ALARM , MLDALM Port L PL0 to PL3 PL4 to PL5 PL6 PL7 Port M Port N PM1 PM2 PN0 to PN7 KO0 to KO7 92CA25-63 2007-02-28 TMP92CA25 Table 3.5.3 I/O Registers and Specifications (1/3) X: Don’t care Port Port 1 Pin Name P10 to P17 Input port Output port Specification I/O Register Pn X X X X X X X X X X 1 0 1 0 X X X X X X X X X X X X X X X X X X None 0 1 X 1 0 None 1 1 1 1 1 1 1 0 0 PnCR 0 1 X PnFC PnFC2 0 0 1 1 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 X 1 0 1 1 1 1 1 1 1 0 0 0 1 0 1 0 0 1 0 1 0 0 None None None D8 to D15 bus A0 to A7 output Port 6 P60 to P67 Input port Output port A16 to A23 output Port 7 P70 to P76 P71 to P76 P70 P71 Output port Input port RD output WRLL output NDRE output P72 WRLU output NDWE output P73 P74 P75 P76 Port 8 P80 to P87 P80 P81 P82 P83 P84 P85 P86 P87 EA24 output EA25 output R/ W output NDR/ B input WAIT input Output Port CS0 output CS1 output SDCS output CS2 output CSZA Output CS3 output CSZB output ND0CE output CSZC output ND1CE output CSZD output CSZE output 92CA25-64 2007-02-28 TMP92CA25 Table 3.5.4 I/O Registers and Specifications (2/3) X: Don’t care Port Port 9 Pin Name P90 to P94, P96 to P97 P90 to P94 P95 P90 Input port Output port Specification Pn X X X X X X X X X X X X X X X X X X None X X X X X X X X X X 0 X 0 X X X X X X X X I/O Register PnCR 0 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 None None None 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 1 0 1 0 None PnFC PnFC2 0 0 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 1 0 1 None 0 0 1 None None None None None None None 0 1 0 1 None None 1 0 TXD0 output I2SCKO output TXD0 output (Open drain) P91 RXD0 input I2SDO output P92 SCLK0 output I2SWS output SCLK0, CTS0 input (Note1) P93 SDA I/O SDA I/O (Open drain) P94 SCL I/O SCL I/O (Open drain) P95 P96 P97 Port A Port C PA0 to PA7 PC0 to PC3 PC6 to PC7 PC0 PC1 PC2 CLK32KO output INT4 input INT5 input Input port KI0 to KI7 input Input port Output port INT0 input TA1OUT output INT1 input TA3OUT output INT2 input TB0OUT0 output PC3 PC6 PC7 Port F PF0 to PF6 PF0 toPF7 PF0 PF1 PF2 PF7 INT3 input KO8 output (Open drain) EA24 output CSZF output EA25 output Input port Output port TXD0 output TXD0 output (Open drain) RXD0 input SCLK0 output SCLK0, CTS0 input SDCLK output Note: To use P92-pin as SCLK0 input or CTS0 input, set “1” to PF 92CA25-65 2007-02-28 TMP92CA25 Table 3.5.5 I/O Registers and Specifications (3/3) X: Don’t care Port Port G Pin Name PG0 to PG3 PG3 PG2 PG3 Input port Specification I/O Register Pn PnCR PnFC PnFC2 AN0 to AN3 input ADTRG input X None None None MX output MY output Output port Input port SDRAS , SRLLB output SDCAS , SRLUB output SDWE , SRWR output Port J PJ0 to PJ7 PJ5 to PJ6 PJ0 PJ1 PJ2 PJ3 PJ4 PJ5 PJ6 PJ7 X X X X X X 1 0 0 X X X X X X X X X X X X X X X X X X X 0 1 X X X 1 0 0 0 1 1 None 1 1 1 SDLLDQM output SDLUDQM output NDALE output NDCLE output SDCKE output Input port Output port Output port LCP0 output LLP output LFR output LBCD output SPDI input SPDO output SPCS output None 1 1 None 0 None 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 0 None None None Port K PK4 to PK7 PK0 to PK3 PK4 to PK7 PK0 PK1 PK2 PK3 PK4 PK5 PK6 PK7 None 0 1 1 1 0 1 1 1 1 SPCLK output Input Port Output Port LD0 to LD7 output BUSRQ input Port L PL4 to PL7 PL0 to PL7 PL0 to PL7 PL6 PL7 BUSAK output Port M PM1 to PM2 PM1 PM2 Output Port MLDALM output MLDALM output ALARM output None 1 1 1 0 0 1 None Port N PN0 to PN7 Input Port Output Port (CMOS output) KO output (Open drain output) 0 1 1 None 92CA25-66 2007-02-28 TMP92CA25 3.5.1 Port 1 (P10 to P17) Port 1 is an 8-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register P1CR and function register P1FC. In addition to functioning as a general-purpose I/O port, port1 can also function as a data bus (D8 to D15). AM1 0 0 1 1 AM0 0 1 0 1 Function Setting after Reset is Released Don’t use this setting Data bus (D8 to D15) Data bus (D8 to D15) Input port P1CR register P1FC register External write enable P1 register S 0 D8 to D15 S Port read data 1 0 Selector 1 Selector P10 to P17 (D8 to D15) D8 to D15 External read enable Figure 3.5.1 Port 1 92CA25-67 2007-02-28 TMP92CA25 Port 1 register 7 P1 (0004H) Bit symbol Read/Write After reset P17 6 P16 5 P15 4 P14 R/W 3 P13 2 P12 1 P11 0 P10 Data from external port (Output latch register is cleared to “0”) Port 1 Control register 7 P1CR (0006H) Bit symbol Read/Write After reset Function 0 0 0 0 P17C 6 P16C 5 P15C 4 P14C W 3 P13C 0 2 P12C 0 1 P11C 0 0 P10C 0 0: Input 1: Output Port 1 Function register 7 P1FC (0007H) Bit symbol Read/Write After reset Function 6 5 4 3 2 1 0 P1F W 0/1 Note 2 0: Port 1: Data bus (D8 to D15) Port 1 Drive register 7 P1DR (0081H) Bit symbol Read/Write After reset Function 1 1 1 1 P17D 6 P16D 5 P15D 4 P14D W 3 P13D 1 2 P12D 1 1 P11D 1 0 P10D 1 Input/Output buffer drive register for standby mode Note1: Read-modify-write is prohibited for P1CR and P1FC. Note2: It is set to “Port” or “Data bus” by AM pin setting. Figure 3.5.2 Register for Port 1 92CA25-68 2007-02-28 TMP92CA25 3.5.2 A0 to A7 A0 to A7 pin function is Address bus function only. Driver register is following register. Port 4 Drive register 7 P4DR (0084H) Bit symbol Read/Write After reset Function 1 1 1 1 P57D 6 P56D 5 P55D 4 P54D W 3 P53D 1 2 P52D 1 1 P51D 1 0 P50D 1 Input/Output buffer drive register for standby mode Figure 3.5.3 Driver register for A0 to A7 3.5.3 A8 to A15 A8 to A15 pin function is Address bus function only. Driver register is following register. Port 5 Drive register 7 P5DR (0085H) Bit symbol Read/Write After reset Function 1 1 1 1 P57D 6 P56D 5 P55D 4 P54D W 3 P53D 1 2 P52D 1 1 P51D 1 0 P50D 1 Input/Output buffer drive register for standby mode Figure 3.5.4 Drive register for A8 to A15 92CA25-69 2007-02-28 TMP92CA25 3.5.4 Port 6 (P60 to P67) Port 6 is an 8-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register P6CR and function register P6FC. In addition to functioning as a general-purpose I/O port, port 6 can also function as an address bus (A16 to A23). AM1 0 0 1 1 AM0 0 1 0 1 P6CR register Function Setting after Reset is Released Don’t use this setting Address bus (A16 to A23) Address bus (A16 to A23) Input port P6FC register (Reserved) P6 register S 0 A16 to A23 S Port read data 1 0 Selector 1 Selector P60 to P67 (A16 to A23) Figure 3.5.5 Port 6 92CA25-70 2007-02-28 TMP92CA25 Port 6 register 7 P6 (0018H) Bit symbol Read/Write After reset P67 6 P66 5 P65 4 P64 R/W 3 P63 2 P62 1 P61 0 P60 Data from external port (Output latch register is cleared to “0”) Port 6 Control register 7 P6CR (001AH) Bit symbol Read/Write After reset Function 0 0 0 0 P67C 6 P66C 5 P65C 4 P64C W 3 P63C 0 2 P62C 0 1 P61C 0 0 P60C 0 0: Input 1: Output Port 6 Function register 7 P6FC (001BH) Bit symbol Read/Write After reset Note 2 Function 0/1 0/1 0/1 0/1 P67F 6 P66F 5 P65F 4 P64F W 3 P63F 2 P62F 1 P61F 0 P60F 0/1 0/1 0/1 0/1 0: Port 1: Address bus (A16 to A23) Port 6 Drive register 7 P6DR (0086H) Bit symbol Read/Write After reset Function 1 1 1 1 P67D 6 P66D 5 P65D 4 P64D W 3 P63D 1 2 P62D 1 1 P61D 1 0 P60D 1 Input/Output buffer drive register for standby mode Note 1: Read-modify-write is prohibited for P6CR and P6FC. Note 2: It is set to “Port” or “Address bus” by AM pin setting. Figure 3.5.6 Register for Port 6 92CA25-71 2007-02-28 TMP92CA25 3.5.5 Port 7 (P70 to P76) Port 7 is a 7-bit general-purpose I/O port (P70 is used for output only). Bits can be individually set as either inputs or outputs by control register P7CR and function register P7FC. In addition to functioning as a general-purpose I/O port, P70 to P76 pins can also function as interface pins for external memory. A reset initializes P70 pin to output port mode, and P71to P76 pin to input port mode. AM1 0 0 1 1 AM0 0 1 0 1 Function Setting after Reset is Released Don’t use this setting RD pin RD pin P70 output port P7FC register P7 register 0 RD S P70( RD ) 1 Selector Port read data P7CR register P7FC register S 0 S NDRE , NDWE WRLL , WRLU P7 register 0 1 S 1 0 Selector 1 Selector P71 ( WRLL , NDRE ) P72 ( WRLU , NDWE ) Port read data Figure 3.5.7 Port 7 92CA25-72 2007-02-28 TMP92CA25 P7CR register P7FC register S 0 1 Selector S Port read data 1 0 Selector P73 (EA24) P74 (EA25) P7 register EA24, EA25 P7CR register P7FC register S 0 1 Selector S Port read data 1 0 NDR/ B P75 (R/ W , NDR/ B ) P7 register R/ W P7CR register P7FC register P7 register P76 ( WAIT ) Port read data WAIT Figure 3.5.8 Port 7 92CA25-73 2007-02-28 TMP92CA25 Port 7 register 7 P7 (001CH) Bit symbol Read/Write After reset Data from external port (Output latch register is set to “1”) 6 P76 5 P75 4 P74 3 P73 R/W 2 P72 1 P71 0 P70 Data from external port (Output latch register is set to “0”) Data from external port (Output latch register is set to “1”) 1 Port 7 Control register 7 P7CR (001EH) Bit symbol Read/Write After reset Function 0 0 0 6 P76C 5 P75C 4 P74C W 3 P73C 0 2 P72C 0 1 P71C 0 0 0: Input 1: Output Port 7 Function register 7 P7FC (001FH) Bit symbol Read/Write After reset Function 0 0: Input port 1: WAIT 0 0 6 P76F 5 P75F 4 P74F 3 P73F W 0 Refer to following table 2 P72F 0 1 P71F 0 0 P70F 0/1 Note 2 0: port 1: RD Port 7 Drive register 7 P7DR (0087H) Bit symbol Read/Write After reset Function P73 Setting 0 1 P76 Setting 0 0 Input port 1 Output port 0 Input port (Reserved) 1 Output port EA24 output P72 Setting 0 0 Input port 1 Output port NDWE output (at = 0) WRLH output (at = 1) 6 P76D 1 5 P75D 1 4 P94D 1 3 P73D R/W 1 2 P72D 1 1 P71D 1 0 P70D 1 Input/Output buffer drive register for standby mode P71 Setting 0 0 Input port 1 Output port NDRE output at ( = 0) WRLL output (at = 1) 1 P75 Setting 0 1 (Reserved) 1 P74 Setting (Reserved) 0 Input port NDR/ B input (at = 1) 1 Output port R/ W output 0 0 Input port 1 Output port 1 WAIT input (Reserved) 1 (Reserved) EA25 output Note 1: Read-modify-write is prohibited for P7CR and P7FC. Note 2: It is set to “Port” or “ RD ” by AM pin setting. Note 3: When NDRE and NDWE are used, set registers in the following order to avoid outputting a negative glitch. Order (1) (2) (3) Register P7 P7FC P7CR Bit2 0 1 1 Bit1 0 1 1 Figure 3.5.9 Register for Port 7 92CA25-74 2007-02-28 TMP92CA25 3.5.6 Port 8 (P80 to P87) Ports 80 to 87 are 8-bit output ports. Resetting sets the output latch of P82 to “0” and the output latches of P80 to P81, P83 to P87 to “1”. Port 8 can also be set to function as an interface pin for external memory using function register P8FC. Writing “1” in the corresponding bit of P8FC and P8FC2 enables the respective functions. Resetting to of P8FC to “0” and P8FC2 to “0”, sets all bits to output ports. Reset Function control 2 P8FC2 write Internal data bus Function contol P8FC write Ouptut latch Selector P8 write P80 ( CS0 ) P81 ( CS1 , SDCS ) P82 ( CS2 , CSZA ) P83 ( CS3 ) P84 ( CSZB , ND0CE ) P85 ( CSZC , ND1CE ) P86 ( CSZD ) P87 ( CSZE ) P8 read “1”, “1”, “1”, “1”, ND0CE , ND1CE , “1”, “1”, “1”, SDCS , CSZA , “1” CS0 , CS1 , CS2 , CS3 , CSZB , CSZC , CSZD , CSZE Figure 3.5.10 Port 8 92CA25-75 2007-02-28 TMP92CA25 Port 8 Register 7 P8 (0020H) Bit symbol Read/Write After reset 1 1 1 1 P87 6 P86 5 P85 4 P84 R/W 3 P83 1 2 P82 0 1 P81 1 0 P80 1 Port 8 Function Register 7 P8FC (0023H) Bit symbol Read/Write After reset Function 0 0: Port 1: CSZE 0 0: Port 1: CSZD 0 Refer to following table 0 Refer to following table P87F 6 P86F 5 P85F 4 P84F W 3 P83F 0 0: Port 1: CS3 2 P82F 0 Refer to following table 1 P81F 0 0: Port 1: CS1 0 P80F 0 0: Port 1: CS0 Port 8 Function Register 2 7 P8FC2 (0021H) Bit symbol Read/Write After reset Function 0 0 0 0 Refer to following table 0: 0: Refer to 1:Reserved 1:Reserved following table P87F2 6 P86F2 5 P85F2 4 P84F2 W 3 P83F2 0 Always write “0” 2 P82F2 0 1 P81F2 0 0 P80F2 0 Always write “0” Refer to 0: table below 1: SDCS Port 8 Drive Register 7 P8DR (0088H) Bit symbol Read/Write After reset Function 1 1 1 1 P87D 6 P86D 5 P85D 4 P84D R/W 3 P83D 1 2 P82D 1 1 P81D 1 0 P80D 1 Input/Output buffer drive register for standby mode P85 Setting 0 0 1 Output port (Reserved) CSZC output ND1CE output P84 Setting 1 0 1 Output port (Reserved) CSZB output ND0CE output P82 Setting 0 1 0 1 Output port CSZA output CS2 output 0 1 Reserved Note 1: Read-modify-write is prohibited for P8FC and P8FC2. Note 2: Don’t write “1” to P8 register before setting P82 pin to CS2 or CSZA because P82 pin output “0” as CE for program memory by reset. Figure 3.5.11 Register for Port 8 92CA25-76 2007-02-28 TMP92CA25 3.5.7 Port 9 (P90 to P97) P90 to P94 are 5-bit general-purpose I/O ports. I/O can be set on a bit basis using the control register. Resetting sets P90 to P94 to input port and all bits of output latch to“1”. P95 is 1-bit general-purpose output port and P96 to P97 are 2-bit general-purpose input ports. Setting the corresponding bits of P9FC enables the respective functions. Resetting resets the P9FC to “0”, and sets all bits except P95 to input ports. (1) Port 90 (TXD0, I2SCKO), Port91 (RXD0, I2SDO), Port 92 (SCLK0, CTS0 I2SWS) Ports 90 to 92 are general-purpose I/O ports. They also function as either SIO0 or I2S. Each pin is detailed below. SIO mode (SIO0 module) P90 P91 P92 TXD0 (Data output) RXD0 (Data input) SCLK0 (Clock input or output) UART, IrDA mode (SIO0 module) TXD0 (Data output) RXD0 (Data input) CTS0 I2S mode (I S module) I2SCKO (Clock output) I2SDO (Data output) I2SWS (Word select output) 2 SIO mode (I2S module) I2SCKO (Clock output) I2SDO (Data output) (No use) (Clear to send) Reset Direction control (on bit basis) P9CR write Function control (on bit basis) P9FC write S Output latch Internal data bus S A Selector B S B Selector A P90 (TXD0, I2SCKO) SPDI input P9 write TXD0, I2SCKO output P9 read Figure 3.5.12 P90 92CA25-77 2007-02-28 TMP92CA25 Reset Direction control (on bit basis) P9CR write Function control (on bit basis) P9FC write S Output latch Internal data bus S A Selector B S B Selector A (to Port F1) P91RXD0 input (to Port F2) P92SCLK0 input P91 (RXD0, I2SDO) P92 (SCLK0, CTS0 , I2SWS) P9 write I2SDO output SCLK0,I2SWS output P9 read Figure 3.5.13 P91 and P92 (2) P93 (SDA), P94 (SCL) Reset Direction control (on bit basis) P9CR write Function control (on bit basis) P9FC write S Output latch Internal data bus S A Selector B S B Selector A Open drain enable P9FC2 P93(SDA), P94(SCL) P9 write SDA, SCL output P9 read SDA, SCL input Figure 3.5.14 Port 93 and 94 92CA25-78 2007-02-28 TMP92CA25 (3) P95 (CLK32KO) Reset Direction control (on bit basis) P9CR write Internal data bus Funtcion control (on bit basis) P9FC write S Output latch S A Selector B P95 (CLK32KO) P9 write fs P9 read Figure 3.5.15 Port 95 (4) P96 (INT4, PX), P97 (INT5, PY) Internal data bus Reset Function control TSICR0 P9FC write TSICR0 AVCC Switch for TSI Typ.20Ω P9 read P96 (INT4, PX) P97 (INT5, PY) TSICR1 S Rising/Falling edge detection IIMC A Selector B De-bounce circuit Only for P96 INT4 INT5 TSICR0 TSICR0 TSICR0 Pull-down resistor typ.200kΩ Figure 3.5.16 Port 96, 97 92CA25-79 2007-02-28 TMP92CA25 Port 9 Register 7 P9 (0024H) Bit symbol Read/Write After reset P97 R Data from external port 0 6 P96 5 P95 4 P94 3 P93 R/W 2 P92 1 P91 0 P90 Data from external port (Output latch register is set to “1”) Port 9 Control Register 7 P9CR (0026H) Bit symbol Read/Write After reset Function 0 0 0 6 5 P95C 4 P94C 3 P93C W 2 P92C 0 1 P91C 0 0 P90C 0 Refer to following table Port 9 Function Register 7 P9FC (0027H) Bit symbol Read/Write After reset Function 0 0: Input port 1: INT5 6 P96F 0 0: Input port 1: INT4 5 P95F 0 4 P94F W 0 3 P93F 0 2 P92F 0 1 P91F 0 0 P90F 0 P97F Refer to following table P92 Setting 0 0 1 P95 Setting 0 0 1 Output port (Reserved) CLK32KO output P91 Setting 1 Input port SCLK0, CTS0 input P90 Setting 0 Input port RXD0 input I2SDO output 1 Output port (Reserved) 0 1 P93 Setting 0 Input port I2SCKO output 1 Output port TXD0 output Output port SCLK0 output 0 1 P94 Setting I2SWS output 1 0 1 0 Input port (Reserved) 1 Output port (Reserved) 0 1 0 Input port (Reserved) 1 Output port SDA I/O (Reserved) Port 9 Function Register 2 7 P9FC2 (0025H) Bit symbol Read/Write After reset Function 0 0: CMOS 1: Open drain 6 5 4 P94F2 W 3 P93F2 0 0: CMOS 1: Open drain 2 1 0 P90F2 W 0 0: CMOS 1: Open drain Port 9 Drive Register 7 P9DR (0089H) Bit symbol Read/Write After reset Function 1 1 1 1 P97D 6 P96D 5 P95D 4 P94D R/W 3 P93D 1 2 P92D 1 1 P91D 1 0 P90D 1 Output/Input buffer drive register for standby mode Note 1: Read modify write is prohibited for P9CR, P9FC and P9FC2. Note 2: When setting P97 and P96 pin to INT5 and INT4 input, set P9DR to “00”(prohibit input), and when driving P96 and P97 pins to “0”, execute HALT instruction. This setting generates INT5 and INT4 inside. If don’t use external interrupt in HALT condition, set like a interrupt don’t generated. (e.g. change port setting) Figure 3.5.17 Register for Port 9 92CA25-80 2007-02-28 TMP92CA25 3.5.8 Port A (PA0 to PA7) Ports A0 to A7 are 8-bit input general-purpose ports with pull-up resistor. In addition to functioning as general-purpose I/O ports, ports A0 to A7 can also, as a keyboard interface, operate a key-on wakeup function. The various functions can each be enabled by writing a “1” to the corresponding bit of the port A function register (PAFC). Resetting resets all bits of the register PAFC to “0” and sets all pins to be input port. INTKEY Edge detection PA0 to PA7 8-input OR Reset Key-on Enable (on bit basis) PAFC write Pull-up resistor Internal data bus PA read PA0 (KI0) PA1 (KI1) PA2 (KI2) PA3 (KI3) PA4 (KI4) PA5 (KI5) PA6 (KI6) PA7 (KI7) Figure 3.5.18 Port A When PAFC = “1”, if the input of any of KI0 to KI7 pins fall down, an INTKEY interrupt is generated. An INTKEY interrupt can be used to release all HALT modes. 92CA25-81 2007-02-28 TMP92CA25 Port A Register 7 PA (0028H) Bit symbol Read/Write After reset PA7 6 PA6 5 PA5 4 PA4 R/W 3 PA3 2 PA2 1 PA1 0 PA0 Data from external port Port A Function Register 7 PAFC (002BH) Bit symbol Read/Write After reset Function 0 0 0 0 0: Key input disable PA7F 6 PA6F 5 PA5F 4 PA4F W 3 PA3F 0 2 PA2F 0 1 PA1F 0 0 PA0F 0 1: Key input enable Port A Drive register 7 PADR (008AH) Bit symbol Read/Write After reset Function 1 1 1 1 PA7D 6 PA6D 5 PA5D 4 PA4D W 3 PA3D 1 2 PA2D 1 1 PA1D 1 0 PA0D 1 Input/Output buffer drive register for standby mode Note: Read-modify-write is prohibited for PACR and PAFC. Figure 3.5.19 Register for Port A 92CA25-82 2007-02-28 TMP92CA25 3.5.9 Port C (PC0 to PC3, PC6 to PC7) PC0 to PC7 are 8-bit general-purpose I/O ports. Each bit can be set individually for input or output. Resetting sets port C to an input port. In addition to functioning as a general-purpose I/O port, port C can also function as an output pin for timers (TA1OUT, TA3OUT and TB0OUT0), input pin for external interruption (INT0 to INT3), output pin for memory ( CSZF ), output pin for key (KO8). These settings are made using the function register PCFC. The edge select for external interruption is determined by the IIMC register in the interruption controller. (1) PC0 (INT0, TA1OUT) Reset Reset Direction control Direction control (on bit basis) PCCR write Internal data bus Function control Function control (on bit basis) PCFC write S Output latch S A Selector B PC0 (INT0, TA1OUT) PC write TA1OUT S B Selector A Level/edge select and Rising/falling select IIMC PC read INT0 Figure 3.5.20 Port C0 92CA25-83 2007-02-28 TMP92CA25 (2) PC1 (INT1, TA3OUT), PC2 (INT2, TB0OUT0), PC3 (INT3, TB0OUT1) Reset Direction control (on bit basis) PCCR write Function control (on bit basis) PCFC write S Output latch S A Selector B Internal data bus PC1 (INT1, TA3OUT) PC2 (INT2, TB0OUT0) PC3 (INT3) PC write TA3OUT TB0OUT0 S B Selector A PC read INT1 to INT3 Rising/falling edge detection IIMC Figure 3.5.21 Port C1, C2, C3 (3) PC4, PC5 Reset Direction control (on bit basis) PCCR write Function control (on bit basis) Internal data bus PCFC write S Output latch PC4 PC5 PC write S B Selector A PC read Figure 3.5.22 Port C4, C5 92CA25-84 2007-02-28 TMP92CA25 (4) PC6 (KO8, EA24) Reset Direction control (on bit basis) PCCR write Internal data bus Funtcion control (on bit basis) PCFC write S Output latch S A Selector B PC6 (KO8, EA24) Open drain enable PC write EA24 S B Selector A PC read Figure 3.5.23 Port C6 (4) PC7 ( CSZF , EA25) Reset Direction control (on bit basis) PCCR write Funtcion control (on bit basis) Internal data bus PFFC write S Output latch S A Selector B C S B Selector A PC7 ( CSZF , EA25) PC write CSZF EA25 PC read Figure 3.5.24 Port C7 92CA25-85 2007-02-28 TMP92CA25 Port C Register 7 PC (0030H) Bit symbol Read/Write After reset PC7 6 PC6 5 PC5 4 PC4 R/W 3 PC3 2 PC2 1 PC1 0 PC0 Data from external port (Output latch register is set to “1”) Port C Control Register 7 PCCR (0032H) Bit symbol Read/Write After reset Function 0 0 0 0 PC7C 6 PC6C 5 PC5C 4 PC4C W 3 PC3C 0 2 PC2C 0 1 PC1C 0 0 PC0C 0 Refer to following table Port C Function Register 7 PCFC (0033H) Bit symbol Read/Write After reset Function PC2 Setting 0 1 PC5 Setting 0 1 0 Input port (Reserved) 1 Output port (Reserved) 0 Input port INT2 1 Output port TB0OUT PC1 Setting 0 1 PC4 Setting 0 1 0 Input port (Reserved) 1 Output port (Reserved) 0 Input port INT1 1 Output port TA3OUT 0 0 0 0 PC7F 6 PC6F 5 PC5F 4 PC4F W 3 PC3F 0 2 PC2F 0 1 PC1F 0 0 PC0F 0 Refer to following table PC0 Setting 0 1 PC3 Setting 0 1 0 Input port INT3 1 Output port (Reserved) 0 Input port INT0 1 Output port TA1OUT PC7 Setting 0 0 1 Input port CSZF I/O PC6 Setting 1 Output port EA25 output at = 0 0 0 1 Input port KO8 (Open drain) 1 Output port EA24 output at = 0 Port C Drive Register 7 PCDR (008CH) Bit symbol Read/Write After reset Function 1 1 1 1 PC7D 6 PC6D 5 PC5D 4 PC4D R/W 3 PC3D 1 2 PC2D 1 1 PC1D 1 0 PC0D 1 Input/Output buffer drive register for standby mode Note1: Read-modify-write is prohibited for the registers PCCR and PCFC. Note2: When setting PC3-PC0 pins to INT3-INT0 input, set PCDR to “0000”(prohibit input), and when driving PC3-PC0 pins to “0”, execute HALT instruction. This setting generates INT3-INT0 inside. If don’t use external interrupt in HALT condition, set like an interrupt don’t generated. (e.g. change port setting) Figure 3.5.25 Register for Port C 92CA25-86 2007-02-28 TMP92CA25 3.5.10 Port F (PF0 to PF7) Ports F0 to F6 are 7-bit general-purpose I/O ports. Resetting sets PF0 to PF6 to be input ports. It also sets all bits of the output latch register to “1”. In addition to functioning as general-purpose I/O port pins, PF0 to PF6 can also function as the I/O for serial channels 0 and 1. A pin can be enabled for I/O by writing a “1” to the corresponding bit of the port F function register (PFFC). Port F7 is a 1-bit general-purpose output port. In addition to functioning as a general-purpose output port , PF7 can also function as the SDCLK output. Resetting sets PF7 to be an SDCLK output port. (1) Port F0 (TXD0), F1 (RXD0), F2 (SCLK0, CTS0 ) Ports F0 to F2 are general-purpose I/O ports. They also function as either SIO0. Each pin is detailed below. SIO mode (SIO0 module) PF0 PF1 PF2 TXD0 (Data output) RXD0 (Data input) SCLK0 (Clock input or output) UART, IrDA mode (SIO0 module) TXD0 (Data output) RXD0 (Data input) CTS0 (Clear to send) Reset Direction control (on bit basis) PFCR write Function control (on bit basis) Internal data bus PFFC write S Output latch S A BSelector PF0 (TXD0) Open drain set possible PFFC2 PF write TXD0 S B Selector A PF read Figure 3.5.26 Port F0 92CA25-87 2007-02-28 TMP92CA25 Reset Direction control (on bit basis) Internal data bus PFCR write S Output latch PF1 (RXD0) PF write S B Selector A PFFC S A Selector B PF read RXD0 P91RXD0 input Figure 3.5.27 Port F1 Reset Direction control (on bit basis) PFCR write Internal data bus S Output latch SCLK0 output PF write Function control (on bit basis) Selector S PF2 (SCLK0, CTS0 ) PFFC write S B Selector A PFFC S A Selector B PF read SCLK0 input, CTS0 input P92SCLK0 input Figure 3.5.28 Port F2 92CA25-88 2007-02-28 TMP92CA25 (2) PF3, PF4, PF5, PF6, PF7 Reset Direction control (on bit basis) PFCR write Function control (on bit basis) PFFC write S Output latch PF3 PF4 PF5 PF6 S B Selector A PF read Internal data bus PF write Figure 3.5.29 Port F3, F4. F5 and F6 Reset Internal data bus Function control (on bit basis) PFFC write S Output latch SDCLK PF write S A Selector B PF7 (SDCLK) PF read Figure 3.5.30 Port F7 92CA25-89 2007-02-28 TMP92CA25 Port F Register 7 PF (003CH) Bit symbol Read/Write After reset 1 PF7 6 PF6 5 PF5 4 PF4 R/W 3 PF3 2 PF2 1 PF1 0 PF0 Data from external port (Output latch register is set to “1”) Port F Control Register 7 PFCR (003EH) Bit symbol Read/Write After reset Function 0 0 0 6 PF6C 5 PF5C 4 PF4C 3 PF3C W 0 Refer to following table 2 PF2C 0 1 PF1C 0 0 PF0C 0 Port F Functon Register 7 PFFC (003FH) Bit symbol Read/Write After reset Function 1 0 0 0 Refer to following table PF7F 6 PF6F 5 PF5F 4 PF4F W 3 PF3F 0 2 PF2F 0 1 PF1F 0 RXD0 pin selection 0: Port F1 1: Port 91 0 PF0F 0 Refer to following table PF2 Setting 0 Input port, PF1 Setting 1 Output port 0 0 Input port, RXD0 input from PF1, PF0 Setting 1 Output port 0 0 Input port (Reserved) 1 1 Output port TXD0 output 0 SCLK0, CTS0 input From PF2 pin at = 0 From P92 pin at = 1 RXD0 input from P91 Reserved 1 PF5 Setting 0 1 PF7 Setting 0 1 (Reserved) SCLK0 output 1 PF4 Setting 0 Input port (Reserved) 1 Output port (Reserved) 0 1 PF6 Setting Output port SDCLK output 0 1 0 Input port (Reserved) 1 Output port (Reserved) 0 Input (Reserved) 1 Output (Reserved) PF3 Setting 0 1 0 Input port (Reserved) 1 Output port (Reserved) 92CA25-90 2007-02-28 TMP92CA25 Port F Functon Register 2 7 PFFC2 (003DH) Bit symbol Read/Write After reset Function − 6 5 4 3 2 − 1 0 PF0F2 W 0 Output buffer 0: CMOS 1: Open drain W 0 Always write “0” W 0 Always write “0” Port F Drive Register 7 PFDR (008FH) Bit symbol Read/Write After reset Function 1 1 1 1 PF7D 6 PF6D 5 PF5D 4 PF4D R/W 3 PF3D 1 2 PF2D 1 1 PF1D 1 0 PF0D 1 Input/Output buffer drive register for standby mode Note: Read-modify-write is prohibited for the registers PFCR, PFFC and PFFC2. Figure 3.5.31 Register for Port F 92CA25-91 2007-02-28 TMP92CA25 3.5.11 Port G (PG0 to PG3) PG0 to PG3 are 4-bit input ports and can also be used as the analog input pins for the internal AD converter. PG3 can also be used as the ADTRG pin for the AD converter. PG2 and PG3 can also be used as the MX and MY pins for a touch screen interface. Internal data bus Port G read Conversion result register PG0 (AN0), PG1 (AN1), PG2 (AN2, MX), PG3 (AN3, MY, ADTRG ) AD converter Channel selector AD read ADTRG (only for PG3) (Only for PG2, PG3) TSICR0 Switch for TSI typ. 20Ω TSICR0 Figure 3.5.32 Port G Port G Register 7 PG (0040H) Bit symbol Read/Write After reset 6 5 4 3 PG2 2 PG2 R 1 PG1 0 PG0 Data from external port Note: The input channel selection of the AD converter and the permission for ADTRG input are set by AD converter mode register ADMOD1. Port G Drive Register 7 PGDR (0090H) Bit symbol Read/Write After reset Function 1 6 5 4 3 PG3D R/W 2 PG2D 1 1 0 Input/Output buffer drive register for standby mode Figure 3.5.33 Register for Port G 92CA25-92 2007-02-28 TMP92CA25 3.5.12 Port J (PJ0 to PJ7) PJ0 to PJ4 and PJ7 are 6-bit output ports. Resetting sets the output latch PJ to “1”, and they output “1”. PJ5 to PJ6 are 2-bit I/O ports. In addition to functioning as a port, port J also functions as output pins for SDRAM ( SDRAS , SDCAS , SDWE , SDLLDQM, SDLUDQM and SDCKE), SRAM ( SRWR , SRLLB , SRLUB ) and NAND flash (NDALE and NDCLE). The above settings are made using the function register PJFC. However, H either SDRAM or SRAM output signals for PJ0 to PJ2 are selected automatically according to the setting of the memory controller. Reset Function control 2 (on bit basis) PJFC2 write Internal data bus Function control (on bit basis) S PJFC write Selector Output latch PJ0 ( SDRAS , SRLLB ) PJ1 ( SDCAS , SRLUB ) PJ2 ( SDWE , SRWR ) PJ3 (SDLLDQM) PJ4 (SDLUDQM) PJ7 (SDCKE) PJ write SRLLB , SRLUB , SRWR SDRAS , SDCAS , SDWE , SDLLDQM, SDLUDQM, SDCKE PJ read Figure 3.5.34 Port J0, J1, J2, J3, J4 and J7 92CA25-93 2007-02-28 TMP92CA25 Reset Direction control (on bit basis) PJCRwrite Function control (on bit basis) PJFC write S Output latch Selector PJ write NDALE, NDCLE S B Selector A Internal data bus S PJ5 (NDALE), PJ6 (NDCLE) PJ read Figure 3.5.35 Port J5 and J6 92CA25-94 2007-02-28 TMP92CA25 Port J Register 7 PJ (004CH) Bit symbol Read/Write After reset 1 Data from external port (Output latch register is set to “1”) 1 PJ7 6 PJ6 5 PJ5 4 PJ4 R/W 3 PJ3 2 PJ2 1 PJ1 0 PJ0 1 1 1 1 Port J Control Register 7 PJCR (004EH) Bit symbol Read/Write After reset Function 0 6 PJ6C W 5 PJ5C 0 4 3 2 1 0 0: Input 1: Output Port J Function Register 7 PJFC (004FH) Bit symbol Read/Write After reset Function 0 0: Port 1: SDCKE at = 1 6 PJ6F 0 0: Port 1: NDCLE at = 0, 5 PJ5F 0 0: Port 4 PJ4F W 0 0: Port 3 PJ3F 0 0: Port 2 PJ2F 0 0: Port 1 PJ1F 0 0: Port 1: SDCAS , SRLUB 0 PJ0F 0 0: Port 1: SRRAS , SRLLB PJ7F 1: NDALE at 1: SDLUDQM 1: SDLLDQM 1: SDWE , = 0 at = 1 at = 1 SDWR Port J Drive Register 7 PJDR (0093H) Bit symbol Read/Write After reset Function 1 1 1 1 PJ7D 6 PJ6D 5 PJ5D 4 PJ4D R/W 3 PJ3D 1 2 PJ2D 1 1 PJ1D 1 0 PJ0D 1 Input/Output buffer drive register for standby mode Note: Read-modify-write is prohibited for the registers PJCR and PJFC. Figure 3.5.36 Register for Port J 92CA25-95 2007-02-28 TMP92CA25 3.5.13 Port K (PK0 to PK7) Port K is a 4-bit output port. Resetting sets the output latch PK to “0”, and PK0 to PK3 pins output “0”. PK4 to PK7 are 4-bit input ports. Resetting sets the PLCR to “0”, and set input port. In addition to functioning as an output port, port K also functions as output pins for an LCD controller (LCP0, LLP, LFR and LBCD) and pin for an SPI controller (SPCLK, SPCS , SPDO and SPDI). The above settings are made using the function register PKFC. Reset Function control Internal data bus (on bit basis) PKFC write S Output latch A Selector PK write B LCP0, LLP, LFR, LBCD Output buffer PK0 (LCP0) PK1(LLP) PK2 (LFR) PK3 (LBCD) PK read Figure 3.5.37 Port K0 to K3 92CA25-96 2007-02-28 TMP92CA25 Reset Direction contorl (on bit basis) PKCR write Function control (on bit basis) PKFC write S Output latch PK4 (SPDI) Internal data bus PK write S B Selector A PK read SPDI input Figure 3.5.38 Port K4 Reset Direction control (on bit basis) PKCR write Function control (on bit basis) PKFC write S Output latch S A Selector B Internal data bus PK5 (SPDO) PK6 ( SPCS ) PK7 (SPCLK) PK write SPDO SPCS SPCLK S B Selector A PJ read Figure 3.5.39 Port K5 to K7 92CA25-97 2007-02-28 TMP92CA25 Port K Register 7 PK (0050H) Bit symbol Read/Write After reset Data from external port (Output latch register is cleared to “0”) PK7 6 PK6 5 PK5 4 PK4 R/W 3 PK3 2 PK2 1 PK1 0 PK0 0 0 0 0 Port K Control Register 7 PKCR (0052H) Bit symbol Read/Write After reset Function 0 0 PK7C 6 PK6C W 5 PK5C 0 4 PK4C 0 3 2 1 0 0: Input 1: Output Port K Function Register 7 PKFC (0053H) Bit symbol Read/Write After reset Function 0 0: Port 1: SPCLK output 0 0: Port 1: SPCS output 0 0: Port 1: SPDO output 0 0: Port 1: SPDI output PK7F 6 PK6F 5 PK5F 4 PK4F W 3 PK3F 0 0: Port 1: LBCD 2 PK2F 0 0: Port 1: LFR 1 PK1F 0 0: Port 1: LLP 0 PK0F 0 0: Port 1: LCP0 PK5 Setting 0 1 PK4 Setting 0 1 0 1 PK7 Setting Input port Reserved Output port SPDO output 0 1 PK6 Setting Input port SPDI input Output port Reserved 0 1 0 1 0 1 Input port Reserved Output port SPCLK output 0 1 Input port Reserved Output port SPCS output Port K Drive Register 7 PKDR (0094H) Bit symbol Read/Write After reset Function 1 1 1 1 PK7D 6 PK6D 5 PK5D 4 PK4D R/W 3 PK3D 1 2 PK2D 1 1 PK1D 1 0 PK0D 1 Input/Output buffer drive register for standby mode Note: Read-modify-write is prohibited for the register PKFC. Figure 3.5.40 Register for Port K 92CA25-98 2007-02-28 TMP92CA25 3.5.14 Port L (PL0 to PL7) PL0 to PL3 are 4-bit output ports. Resetting sets the output latch PL to “0”, and PL0 to PL3 pins output “0”. PL4 to PL7 are 4-bit general-purpose I/O ports. Each bit can be set individually for input or output using the control register PLCR. Resetting resets the control register PLCR to “0” and sets PL4 to PL7 to input ports. In addition to functioning as a general-purpose I/O port, port L can also function as a data bus for an LCD controller (LD0 to LD7) and external bus open request input ( BUSRQ ),answer output ( BUSAK ). The above settings are made using the function register PLFC. Reset Function control (on bit basis) Internal data bus PLFC write R Output latch S A PL write LD0 to LD3 Selector B PL0 to PL3 (LD0 to LD3) PL read Figure 3.5.41 Register for Port L0 to L3 Reset Direction control (on bit basis) PLCR write Internal data bus Function control (on bit basis) PLFC write S Output latch S A Selector B S B Selector PL4 to PL5 (LD4 to LD5) PL write LD4 to LD5 PL read A Figure 3.5.42 Register for Port L4 to L5 92CA25-99 2007-02-28 TMP92CA25 Reset Direction control (on bit basis) PLCR write Internal data bus Functino control (on bit basis) PLFC write R Output latch S A Selector B S B Selector PL6 (LD6, BUSRQ ) PL write BUSRQ PL read A BUSRQ Figure 3.5.43 Port L6 Reset Direction control (on bit basis) PLCR write Function control (on bit basis) Internal data bus PLFC write R Output latch S A Selector B PL7 (LD7, BUSAK ) PL write S A Selector B S B Selector A LD7 BUSAK PL read Figure 3.5.44 Port L7 92CA25-100 2007-02-28 TMP92CA25 Port L Register 7 PL (0054H) Bit symbol Read/Write After reset Data from external port (Output latch register is cleared to “0”) PL7 6 PL6 5 PL5 4 PL4 R/W 3 PL3 2 PL2 1 PL1 0 PL0 0 0 0 0 Port L Control Register 7 PLCR (0056H) Bit symbol Read/Write After reset Function 0 0 PL7C 6 PL6C W 5 PL5C 0 4 PL4C 0 3 2 1 0 0: Input 1: Output Port L Function Register 7 PLFC (0057H) Bit symbol Read/Write After reset Function 0 0 0 0 Refer following table PL5 Setting 0 1 6 PL6F 5 PL5F 4 PL4F W 3 PL3F 0 2 PL2F 0 PL4 Setting 0 1 PL1F 0 0 PL0F 0 PL7F 0: Port 1: Data bus for LCDC (LD3 to LD0) 1 0 1 PL7 Setting Input port Reserved Output port LD5 output 0 1 PL6 Setting Input port Reserved Output port LD4 output 0 1 0 1 0 1 Input port Output port LD7 output 0 1 Input port Output port LD6 output BUSAK output BUSRQ input Port L Drive Register 7 PLDR (0095H) Bit symbol Read/Write After reset Function 1 1 1 1 PL7D 6 PL6D 5 PL5D 4 PL4D R/W 3 PL3D 1 2 PL2D 1 1 PL1D 1 0 PL0D 1 Input/Output buffer drive register for standby mode Note1: Read-modify-write is prohibited for the registers PLCR and PLFC. Note2: When Port L are used at LD0 to LD7, If set PL6 pin to BUSRQ function input temporarily, CPU may not be operate normally. Therefore, set registers by following order. Order (1) (2) Register PLCR PLFC Setting value 1 1 Figure 3.5.45 Port L Register 92CA25-101 2007-02-28 TMP92CA25 3.5.15 Port M (PM1 to PM2) PM1 and PM2 are 2-bit output ports. Resetting sets the output latch PM to “1”, and PM1 and PM2 pins output “1”. In addition to functioning as a port, port M also functions as output pins for the RTC alarm ( ALARM ), and as the output pin for the melody/alarm generator (MLDALM, MLDALM ). The above settings are made using the function register PMFC. Only PM2 has two output functions - ALARM and MLDALM . These are selected using PM. Reset Function control (on bit basis) Internal data bus PMFC write S Output latch S A Selector B PM write PM1 (MLDALM) PM read MLDALM Figure 3.5.46 Port M1 Reset Function control (on bit basis) PMFC write Internal data bus S Output latch A S Selector PM2 ( ALARM , MLDALM ) PM write B PM read S MLDALM A Selector ALARM B Figure 3.5.47 Port M2 92CA25-102 2007-02-28 TMP92CA25 Port M Register 7 PM (0058H) Bit symbol Read/Write After reset 1 6 5 4 3 2 PM2 R/W 1 PM1 1 0 Port M Function Register 7 PMFC (005BH) Bit symbol Read/Write After reset Function 0 0: Port 1: ALARM at = “1” 1: MLDALM at = “0” 6 5 4 3 2 PM2F W 1 PM1F 0 0: Port 1: MLDALM output 0 Port M Drive Register 7 PMDR (0096H) Bit symbol Read/Write After reset Function 1 6 5 4 3 2 PM2D R/W 1 PM1D 1 0 Input/Output buffer drive register for standby mode Note: Read-modify-write is prohibited for the register PMFC. Figure 3.5.48 Register for Port M 92CA25-103 2007-02-28 TMP92CA25 3.5.16 Port N (PN0 to PN7) PN0 to PN7 are 8-bit general-purpose I/O port. Each bit can be set individually for input or output. Resetting sets Port N to an input port. In addition to functioning as a general-purpose I/O port, Port N can also as interface pin for key-board (KO0 to KO7). This function can set to open-drain type output buffer. Reset Direction control (on bit basis) PNCR write Internal data bus Function control (on bit basis) PNFC write S Output latch Open drian enable PN write S B Selector PN read A PN0 to PN7 (KO0 to KO7) Figure 3.5.49 Port N 92CA25-104 2007-02-28 TMP92CA25 Port N register 7 PN (005CH) Bit symbol Read/Write After reset PN7 6 PN6 5 PN5 4 PN4 R/W 3 PN3 2 PN2 1 PN1 0 PN0 Data from external port (Output latch register is set to “1”) Port N Control Register 7 PNCR (005EH) Bit symbol Read/Write After reset Function 0 0 0 0 PN7C 6 PN6C 5 PN5C 4 PN4C W 3 PN3C 0 2 PN2C 0 1 PN1C 0 0 PN0C 0 0: Input 1: Output Port N Function Register 7 PNFC (005FH) Bit symbol Read/Write After reset Function 0 0 0 0 PN7F 6 PN6F 5 PN5F 4 PN4F W 3 PN3F 0 2 PN2F 0 1 PN1F 0 0 PN0F 0 0: CMOS output 1:Open drain output Port N Drive Register 7 PNDR (0097H) Bit symbol Read/Write After reset Function 1 1 1 1 PN7D 6 PN6D 5 PN5D 4 PN4D R/W 3 PN3D 1 2 PN2D 1 1 PN1D 1 0 PN0D 1 Input/Output buffer drive register for standby mode Note: Read modify write is prohibited for the registers PNCR and PNFC. Figure 3.5.50 Register for Port N 92CA25-105 2007-02-28 TMP92CA25 3.6 Memory Controller Functions The TMP92CA25 has a memory controller with a variable 4-block address area that controls as follows. (1) 4-block address area support Specifies a start address and a block size for the 4-block address area (block 0 to 3). • • • • SRAM or ROM: All CS blocks (CS0 to CS3) are supported. SDRAM Page ROM NAND flash : Only either CS1 or CS2 blocks are supported. : Only CS2 blocks are supported. : CS setting is not needed. 3.6.1 (2) Connecting memory specifications Specifies SRAM, ROM and SDRAM as memories that connect with the selected address areas. (3) Data bus width selection Whether 8 bits, 16 bits is selected as the data bus width of the respective block address areas. (4) Wait control Wait specification bit in the control register and WAIT input pin control the number of waits in the external bus cycle. Read cycle and write cycle can specify the number of waits individually. The number of waits is controlled in the 6 modes listed below. 0 waits, 1 wait, 2 waits, 3 waits, 4 waits N waits (controls with WAIT pin) 3.6.2 Control Register and Operation after Reset Release This section describes the registers that control the memory controller, the state following reset release and the necessary settings. (1) Control register The control registers of the memory controller are as follows and in Table 3.6.1 and Table 3.6.2. • Control register: BnCSH/BnCSL (n = 0 to 3, EX) Sets the basic functions of the memory controller; the memory type that is connected, the number of waits which are read and written. Memory start address register: MSARn (n = 0 to 3) Sets a start address in the selected address areas. Memory address mask register: MAMR (n = 0 to 3) Sets a block size in the selected address areas. Page ROM control register: PMEMCR Sets the method of accessing page ROM. Memory controls control register: MEMCR0 Sets waveform selection of RD pin and setting method of CS0 • • • • to CS3 . 92CA25-106 2007-02-28 TMP92CA25 Table 3.6.1 Control Register 7 B0CSL (0140H) Bit symbol Read/Write After reset B0CSH (0141H) Bit symbol Read/Write After reset MAMR0 (0142H) Bit symbol Read/Write After reset MSAR0 (0143H) Bit symbol Read/Write After reset B1CSL (0144H) Bit symbol Read/Write After reset B1CSH (0145H) Bit symbol Read/Write After reset MAMR1 (0146H) Bit symbol Read/Write After reset MSAR1 (0147H) Bit symbol Read/Write After reset B2CSL (0148H) Bit symbol Read/Write After reset B2CSH (0149H) Bit symbol Read/Write After reset MAMR2 (014AH) Bit symbol Read/Write After reset MSAR2 (014BH) Bit symbol Read/Write After reset B3CSL (014CH) Bit symbol Read/Write After reset B3CSH (014DH) Bit symbol Read/Write After reset MAMR3 (014EH) Bit symbol Read/Write After reset MSAR3 (014FH) Bit symbol Read/Write After reset 1 1 1 1 1 M3S23 1 M3S22 1 M3S21 1 M3S20 R/W 1 1 1 1 0 M3V22 0 (Note) M3V21 0 (Note) M3V20 0 M3V19 R/W 1 M3S19 1 M3S18 1 M3S17 1 M3S16 B3E 0 − 1 1 B3WW2 1 B3WW1 W 1 − 0 B3REC W 0 M3V18 0 M3V17 0 M3V16 0 M3V15 B3OM1 0 B3OM0 1 B3WW0 1 M2S23 1 M2S22 1 M2S21 1 M2S20 R/W 1 1 B3WR2 1 B3WR1 W 1 B3BUS1 0 B3BUS0 1 B3WR0 1 M2V22 0 M2V21 0 (Note) M2V20 0 M2V19 R/W 1 M2S19 1 M2S18 1 M2S17 1 M2S16 B2E 0 B2M 1 1 B2WW2 1 B2WW1 W 1 − 0 B2REC W 0 M2V18 0 M2V17 0 M2V16 0 M2V15 B2OM1 0 B2OM0 1 B2WW0 1 M1S23 1 M1S22 1 M1S21 1 M1S20 R/W 1 1 B2WR2 1 B2WR1 W 1 B2BUS1 0 B2BUS0 1 B2WR0 0 M1V21 0 (Note) M1V20 0 (Note) M1V19 0 M1V18 R/W 1 M1S19 1 M1S18 1 M1S17 1 M1S16 B1E 0 − 1 1 B1WW2 1 B1WW1 W 1 − 0 B1REC W 0 M1V17 0 M1V16 0 M1V15 to M1V9 0 M1V8 B1OM1 0 B1OM0 1 B1WW0 1 M0S23 1 M0S22 1 M0S21 1 M0S20 R/W 1 1 B1WR2 1 B1WR1 W 1 B1BUS1 0 B1BUS0 1 B1WR0 0 M0V20 0 (Note) M0V19 0 (Note) M0V18 0 M0V17 R/W 1 M0S19 1 M0S18 1 M0S17 1 M0S16 B0E 0 − 6 B0WW2 5 B0WW1 W 1 − 4 B0WW0 0 B0REC W 3 2 B0WR2 0 1 B0WR1 W 1 B0BUS1 0 M0V14 to M0V9 0 B0WR0 0 B0BUS0 0 M0V8 B0OM1 0 M0V16 B0OM0 0 M0V15 Note 1: Always write “0”. Note 2:Read-modify-write is prohibited for BnCS0 and BnCSH (n = 0 to 3) registers. 92CA25-107 2007-02-28 TMP92CA25 Table 3.6.2 Control Register 7 BEXCSH (0159H) Bit symbol Read/Write After reset BEXCSL (0158H) Bit symbol Read/Write After reset PMEMCR Bit symbol (0166H) Read/Write After reset MEMCR0 (0168H) Bit symbol Read/Write After reset Note: Read-modify-write is prohibited for BEXCSH and BEXCSL registers. 0 0 BEXWW2 BEXWW1 W 1 0 OPGE 0 OPWR1 0 0 OPWR0 R/W 0 CSDIS 1 RDTMG1 R/W 0 0 0 RDTMG0 BEXWW0 0 0 BEXWR2 6 5 4 3 BEXOM1 2 BEXOM0 W 1 BEXBUS1 0 BEXWR1 W 1 PR1 0 BEXBUS0 0 BEXWR0 0 PR0 (2) Operation after reset release The start data bus width is determined by the state of AM1/AM0 pins just after reset release. The external memory is then accessed as follows AM1 0 0 1 1 AM0 0 1 0 1 Start Mode Don’t use this setting Start with 16-bit data bus (Note) Start with 8-bit data bus (Note) Don’t use this setting Note: The memory to be used on starting after reset must be either NOR flash or masked ROM. NAND flash and SDRAM cannot be used. AM1/AM0 pins are valid only just after reset release. In other cases, the data bus width is set by the control register . On reset, only the control register (B2CSH/B2CSL) of the block address area 2 becomes effective automatically (B2CSH is set to “1” on reset). The data bus width which is specified by AM1/AM0 pins is loaded to the bit for specification of the bus width of the control register in the block address area 2. The block address area 2 is set to 000000H to FFFFFFH address on reset (B2CSH is reset to “0”). After reset release, the block address areas are specified by the memory start address register (MSARn) and the memory address mask register (MAMRn). The control register (BnCS) is then set. Set the enable bit (BnE) of the control register to “1” to enable the setting. 92CA25-108 2007-02-28 TMP92CA25 3.6.3 Basic Functions and Register Setting This section describes the setting of the block address area, the connecting memory and the number of waits out of the memory controller’s functions. (1) Block address area specification The block address area is specified by two registers. The memory start address register (MSARn) sets the start address of the block address areas. The memory controller compares the register value and the address every bus cycle. The address bit which is masked by the memory address mask register (MAMRn) is not compared by the memory controller. The block address area size is determined by setting the memory address mask register. The value that is set to the register is compared with the block address area on the bus. If the result is a match, the memory controller sets the chip select signal (CSn) to “low”. (i) Memory start address register setting The MS23 to MS16 bits of the memory start address register correspond with addresses A23 to A16 respectively. The lower start addresses A15 to A0 are always set to address 0000H. Therefore the start addresses of the block address area are set to all 64 Kbytes of addresses 000000H to FF0000H. (ii) Memory address mask register setting The memory address mask register determines whether an address bit is compared or not. In register setting, “0” is “compare”, and “1” is “do not compare”. The address bits that can be set depends on the block address area. Block address area 0: A20 to A8 Block address area 1: A21 to A8 Block address area 2 to 3: A22 to A15 The upper bits are always compared. The block address area size is determined by the result of the comparison. The size to be set depending on the block address area is as follows. Size (bytes) CS area CS0 CS1 CS2 to CS3 256 ○ ○ 512 ○ ○ 32 K ○ ○ 64 K ○ ○ ○ 128 K 256 K 512 K ○ ○ ○ ○ ○ ○ ○ ○ ○ 1M ○ ○ ○ 2M ○ ○ ○ 4M ○ ○ 8M ○ Note: After reset release, only the control register of the block address area 2 is valid. The control register of block address area 2 has the bit. If the bit is set to “0”, block address area 2 is set to addresses 000000H to FFFFFFH. (This is the state following reset release .) If the bit is set to “1”, the start address and the address area size are set, as in the other block address areas. 92CA25-109 2007-02-28 TMP92CA25 (iii) Example of register setting To set the block address area 64 Kbytes from address 110000H, set the register as follows. MSAR1 Register Bit Bit symbol Specified value 7 M1S23 0 6 M1S22 0 5 M1S21 0 4 M1S20 1 3 M1S19 0 2 M1S18 0 1 M1S17 0 0 M1S16 1 M1S23 to M1S16 bits of the memory start address register MSAR1 correspond with address A23 to A16. A15 to A0 are set to “0”. Therefore, if MSAR1 is set to the above mentioned value, the start address of the block address area is set to address 110000H. MAMR1 Register Bit Bit symbol Specified value 7 M1V21 0 6 M1V20 0 5 M1V19 0 4 M1V18 0 3 M1V17 0 2 M1V16 0 1 M1V15 to M1V9 0 M1V8 1 0 M1V21 to M1V16 and M1V8 bits of the memory address mask register MAMR1 are set whether addresses A21 to A16 and A8 are compared or not. In register setting, “0” is “compare”, and “1” is “do not compare”. M1V15 to M1V9 bits determine whether addresses A15 to A9 are compared or not with bit 1. A23 and A22 are always compared. When set as above, A23 to A9 are compared with the value that is set as the start addresses. Therefore, 512 bytes (addresses 110000H to 1101FFH) are set as block address area 1, and if it is compared with the addresses on the bus, the chip select signal CS1 is set to “low”. The other block address area sizes are specified in the same way. A23 and A22 are always compared with block address area 0. Whether A20 to A8 are compared or not is determined by the register. Similarly, A23 is always compared with block address areas 2 to 5. Whether A22 to A15 are compared or not is determined by the register. Note 1: When the set block address area overlaps with the built-in memory area, or both two address areas overlap, the block address area is processed according to priority as follows. Built-in I/O > Built-in memory > Block address area 0 > 1 > 2 > 3 Note 2: If an address area other than CS0 to CS3 is accessed, this area is regarded as CSEX . Therefore, wait number and data bus width controls follow the setting of CSEX (BEXCSH, BEXCSL register). 92CA25-110 2007-02-28 TMP92CA25 (2) Connection memory specification Setting the bit of the control register (BnCSH) specifies the memory type that is connected with the block address areas. The interface signal is outputted according to the set memory as follows. Bit (BnCSH Register) 0 0 1 1 0 1 0 1 Reserved Reserved SDRAM Function SRAM/ROM (Default) Note 1: SDRAM should be set to block either 1 or 2. Note 2: Set “00” for NAND flash, RAM built-in LCDD. (3) Data bus width specification The data bus width is set for every block address area. The bus size is set by setting the control register (BnCSH) as follows. bit (BnCSH Register) BnBUS 1 0 0 1 1 BnBUS 0 0 1 0 1 Function 8-bit bus mode (Default) 16-bit bus mode Reserved Don’t use this setting Note: SDRAM should be set to either “01” (16-bit bus). This method of changing the data bus width depending on the accessing address is called “dynamic bus sizing”. The part of the data bus to which the data is output depends on the data size, baus width and start address. Number of external data bus pin in TMP92CA25 are 16 pins. Therefore, please ignore case of memory data size is 32 in each tables. Note: Since there is a possibility of abnormal writing/reading of the data if two memories with different bus width are put in consecutive addresses, do not execute an access to both memories with one command. 92CA25-111 2007-02-28 TMP92CA25 Operand Data Size (bit) Operand Start Address 4n + 0 4n + 1 Memory Data Size (bit) 8/16/32 8 16/32 8/16 32 8 16 32 8 16/32 8 16 32 8 16 32 8 16 32 CPU Address 4n + 0 4n + 1 4n + 1 4n + 2 4n + 2 4n + 3 4n + 3 4n + 3 (1) 4n + 0 (2) 4n + 1 4n + 0 (1) 4n + 1 (2) 4n + 2 (1) 4n + 1 (2) 4n + 2 4n + 1 (1) 4n + 2 (2) 4n + 1 4n + 2 4n + 2 (1) 4n + 3 (2) 4n + 4 (1) 4n + 3 (2) 4n + 4 (1) 4n + 3 (2) 4n + 4 (1) 4n + 0 (2) 4n + 1 (3) 4n + 2 (4) 4n + 3 (1) 4n + 0 (2) 4n + 2 4n + 0 (1) 4n + 0 (2) 4n + 1 (3) 4n + 2 (4) 4n + 3 (1) 4n + 1 (2) 4n + 2 (3) 4n + 4 (1) 4n + 1 (2) 4n + 4 (1) 4n + 2 (2) 4n + 3 (3) 4n + 4 (4) 4n + 5 (1) 4n + 2 (2) 4n + 4 (1) 4n + 2 (2) 4n + 4 (1) 4n + 3 (2) 4n + 4 (3) 4n + 5 (4) 4n + 6 (1) 4n + 3 (2) 4n + 4 (3) 4n + 6 (1) 4n + 3 (2) 4n + 4 xxxxx CPU Data D31 to D24 D23 to D16 D15 to D8 xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx b15 to b8 xxxxx xxxxx b7 to b0 xxxxx b7 to b0 xxxxx xxxxx b15 to b8 xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 b31 to b24 b15 to b8 xxxxx xxxxx xxxxx xxxxx b7 to b0 b23 to b16 xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 b31 to b24 xxxxx b31 to b24 xxxxx xxxxx xxxxx xxxxx b7 to b0 b23 to b16 xxxxx xxxxx b23 to b16 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b31 to b24 b23 to b16 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b23 to b16 b15 to b8 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx b31 to b24 D7 to D0 b7 to b0 b7 to b0 xxxxx b7 to b0 xxxxx b7 to b0 xxxxx xxxxx b7 to b0 b15 to b8 b7 to b0 b7 to b0 b15 to b8 xxxxx b15 to b8 xxxxx b7 to b0 b15 to b8 b7 to b0 xxxxx b7 to b0 b15 to b8 xxxxx b15 to b8 xxxxx b15 to b8 b7 to b0 b15 to b8 b23 to b16 b31 to b24 b7 to b0 b23 to b16 b7 to b0 b7 to b0 b15 to b8 b23 to b16 b31 to b24 xxxxx b15 to b8 b31 to b24 xxxxx b31 to b24 b7 to b0 b15 to b8 b23 to b16 b31 to b24 b7 to b0 b23 to b16 xxxxx b23 to b16 b7 to b0 b15 to b8 b23 to b16 b31 to b24 xxxxx b15 to b8 b31 to b24 xxxxx b15 to b8 8 4n + 2 4n + 3 4n + 0 4n + 1 16 4n + 2 4n + 3 4n + 0 8 16 32 8 4n + 1 16 32 32 4n + 2 8 16 32 4n + 3 8 16 32 xxxxx: During a read, data input to the bus ignored. At write, the bus is at high impedance and the write strobe signal remains non active. 92CA25-112 2007-02-28 TMP92CA25 (4) Wait control The external bus cycle completes a wait of at least two states (100 ns at fSYS = 20 MHz). Setting the and of BnCSL specifies the number of waits in the read cycle and the write cycle. is set using the same method as . / (BnCSL Register) 0 0 1 1 1 0 0 1 0 1 1 1 Others 1 0 1 0 1 1 Function 2 states (0 waits) access fixed mode 3 states (1 wait) access fixed mode (Default) 4 states (2 waits) access fixed mode 5 states (3 waits) access fixed mode 6 states (4 waits) access fixed mode WAIT pin input mode (Reserved) Note 1: For SDRAM, the above setting is ineffective. Refer to 3.16 SDRAM controller. Note 2: For NAND flash, this setting is ineffective. For RAM built-in LCDD, this setting is effective. (i) Waits number fixed mode The bus cycle is completed following the number of states set. The number of states is selected from 2 states (0 waits) to 6 states (4 waits). (ii) WAIT pin input mode This mode samples the WAIT input pins. In this mode, a wait is inserted continuously while the signal is active. The bus cycle is a minimum 2 states. The bus cycle is completed if the wait signal is non active (“High” level) at the second state. The bus cycle continues if the wait signal is active after 2 states or more. 92CA25-113 2007-02-28 TMP92CA25 (5) Recovery (Data hold) cycle control Some memory is defined by AC specification about data hold time by CE or OE for read cycle. Therefore, a data conflict problem may occur. To avoid this problem, 1-dummy cycle can be inserted after CSm-block access cycle by setting “1” to BmCSH register. This 1-dummy cycle is inserted when the next cycle is for another CS-block. (BnCSH register) 0 1 No dummy cycle is inserted (Default). Dummy cycle is inserted. • When no dummy cycle is inserted (0 waits) SDCLK A23 to A0 CSm CSn RD • When inserting a dummy cycle (0 waits) Dummy SDCLK A23 to A0 CSm CSn RD Above function (BnCSH) is inserted dummy cycle and performance go down. Therefore, TMP92CA25 have changing function of RD pin falling timing except for . This function can be changed falling timing of RD pin by changing MEMCR0. This function can be avoided A.C speck shortage about data-hold time from OE , and it can be avoided data conflict problem. This function can use with . And, this function doesn’t depend on CS block. Cycle until from memory OE to data output becomes short by using this function. If using this function, please be careful. (MEMCR0 register) 00 01 10 11 RD “H” pulse width = 0.5T(Default) RD “H” pulse width = 0.75T RD “H” pulse width = 1.0T (Reserved) 92CA25-114 2007-02-28 TMP92CA25 T1 SDCLK (20MHz) T2 CSn A23 to A0 SRxxB D15 to D0 = “00” = “01” Input RD = “10” 92CA25-115 2007-02-28 TMP92CA25 (6) Basic bus timing (a) External read/write cycle (0 waits) SDCLK (20 MHz) CSn T1 T2 A23 to A0 RD , SRxxB Read D15 to D0 SRWR , SRxxB WRxx Input Write Output D15 to D0 (b) External read/write cycle (1 wait) SDCLK (20 MHz) CSn T1 TW T2 A23 to A0 RD , SRxxB Read D15 to D0 SRWR , SRxxB WRxx Input Write Output D15 to D0 92CA25-116 2007-02-28 TMP92CA25 (c) External read/write cycle (0 waits at WAIT pin input mode) SDCLK (20 MHz) CSn T1 T2 A23 to A0 RD , SRxxB Read D15 to D0 SRWR , SRxxB WRxx Input Write Output D15 to D0 WAIT Sampling (d) External read/write cycle (n waits at WAIT pin input mode) SDCLK (20 MHz) CSn T1 TW T2 A23 to A0 RD , SRxxB Read D15 to D0 SRWR , SRxxB WRxx Input Write Output D15 to D0 WAIT Sampling Sampling 92CA25-117 2007-02-28 TMP92CA25 Example of wait input cycle (5 waits) FF0 D CK Q FF1 D CK Q FF2 D CK Q FF3 D CK Q FF4 D CK Q WAIT RES RES RES RES RES SDCLK CSn RD SRWR SDCLK (20 MHz) CSn RD 1 2 3 4 5 6 7 FF_RES FF0_D FF0_Q FF1_Q FF2_Q FF3_Q WAIT 92CA25-118 2007-02-28 TMP92CA25 (7) Connecting external memory Figure 3.6.1 shows an example of how to connect an external 16-bit SRAM and 16-bit NOR flash to the TMP92CA25. TMP92CA25 RD SRLLB SRLUB SRWR CS0 16-bit SRAM OE LDS UDS R/W CE D [15:0] A0 A1 A2 A3 Not connect I/O [16:1] A0 A1 A2 16-bit NOR flash OE WE CS2 CE DQ [15:0] A0 A1 A2 Figure 3.6.1 Example of External 16-Bit SRAM and NOR Flash Connection 92CA25-119 2007-02-28 TMP92CA25 3.6.4 ROM Control (Page mode) This section describes ROM page mode accessing and how to set registers. ROM page mode is set by the page ROM control register. (1) Operation and how to set the registers The TMP92CA25 supports ROM access of the page mode. ROM access of the page mode is specified only in block address area 2. ROM page mode is set by the page ROM control register (PMEMCR). Setting of the PMEMCR register to “1” sets the memory access of the block address area to ROM page mode access. The number of read cycles is set by the of the PMEMCR register. (PMEMCR register) 0 0 1 1 0 1 0 1 Number of Cycle in a Page 1 state (n-1-1-1 mode) (n ≥ 2) 2 state (n-2-2-2 mode) (n ≥ 3) 3 state (n-3-3-3 mode) (n ≥ 4) (Reserved) Note: Set the number of waits (“n”) using the control register (BnCSL) in each block address area. The page size (the number of bytes) of ROM in the CPU size is set by the of the PMEMCR register. When data is read out up to the border of the set page, the controller completes the page reading operation. The start data of the next page is read in the normal cycle. The following data is set to page read again. Bit (PMEMCR register) 0 0 1 1 0 1 0 1 64 bytes 32 bytes ROM Page Size 16 bytes (Default) 8 bytes SDCLK tCYC A0 to A23 +0 +1 +2 +3 CS2 tAD3 RD tAD2 tAD2 tAD2 tHA tRD3 D0 to D31 Data input tHA Data input tHA Data input tHA Data input tHR Figure 3.6.2 Page mode access Timing (8-byte example) 92CA25-120 2007-02-28 TMP92CA25 3.6.5 Cautions (1) Note on timing between CS and RD If the parasitic capacitance of the RD (Read signal) is greater than that of the CS (Chip select signal), it is possible that an unintended read cycle occurs due to a delay in the read signal. Such an unintended read cycle may cause a problem, as in the case of (a) in Figure 3.6.3. SDCLK (20 MHz) A23 to A0 CSm CSn RD (a) Figure 3.6.3 Read Signal Delay Read Cycle Example: When using an externally connected NOR flash which uses JEDEC standard commands, note that the toggle bit may not be read out correctly. If the read signal in the cycle immediately preceding the access to the NOR flash does not go high in time, as shown in Figure 3.6.4, an unintended read cycle like the one shown in (b) may occur. Memory access SDCLK (20 MHz) A23 to A0 NOR flash chip select RD Toggle bit RD cycle Toggle bit (b) Figure 3.6.4 NOR Flash Toggle Bit Read Cycle When the toggle bit is reversed by this unexpected read cycle, the CPU cannot read the toggle bit correctly since it always reads same value for the toggle bit. To avoid this phenomenon, data polling function control is recommended. 92CA25-121 2007-02-28 TMP92CA25 (2) Note on NAND flash area setting, LCD driver area setting with built-in RAM Figure 3.6.5 shows a memory map for a NAND flash and RAM built-in LCD driver. Since it is recommended that CS3 area be assigned to the address 000000H to 3FFFFFH, the following explanation is given. In this case, the NAND flash and RAM built-in LCD driver overlap with CS3 area. However, each access control circuit in the TMP92CA25 operates independently. So, if a program on CS3 area accesses NAND flash, both CS3 and NAND flash will be accessed at the same time and a problem such as data conflict will occur. To avoid this phenomenon, TMP92CA25 have MEMCR0. If set to “1”, CS3 pin don’t active in case of access 001D00H to 001FFFH (768B) in area that is set as CS3 area. Above phenomenon can be avoided by this setting. This function is valid not only CS3 but also all CS0 to CS3 pins. Note1: In above setting, the address from 000000H to 005FFFH of 24 Kbytes for CS3’s memory can’t be used. Note2: 512 byte area (001D00H to 001EFFH) for NAND flash are fixedlike a following without relation ship to setting CS block. Therefore, NAND flash area don’t conform to CS3 area setting. (NAND flash area specification) 1. bus width 2. WAIT control 000000H Internal I/O 001D00H NAND flash (512byte) CS0 ∼ CS3 pins become to : Fixed 8 bit : Depend on NDnFSPR of NAND flash controller (No assigned) 001FE0H LCDD with built-in RAM (16byte) 001FF0H 002000H Internal RAM (10K byte) 004800H 008000H COMMON-X (2 M byte) 001F00H Non-active by setting MEMCR0 to “1” 200000H CS3 area setting 000000H~3FFFFFH (4 MB) LOCAL-X (2 M byte) 400000H Figure 3.6.5 Recommended CS3 and CS0 Setting 92CA25-122 2007-02-28 TMP92CA25 (3) The cautions at the time of the functional change of a CSn . A chip select signal output has the case of a combination terminal with a general-purpose port function. In this case, an output latch register and a function control register are initialized by the reset action, and an object terminal is initialized by the port output (“1” or “0”) by it. Functional change Although an object terminal is changed from a port to a chip select signal output by setting up a function control register (PnFC register), the short pulse for several ns may be outputted to the changing timing. Although it does not become especially a problem when using the usual memory, it may become a problem when using a special memory. * XX is a function register address.(When an output port is initialized by “0”) A port is set as CSn . Internal Signal Internal address bus Function control signal Output port External Signal Pxx A23 to A0 n n+2 Output pulse tAD3 CSn n XX n+2 The measure by software The countermeasures in S/W for avoiding this phenomenon are explained. Since CS signal decodes the address of the access area and is generated, an unnecessary pulse is outputted by access to the object CS area immediately after setting it as a CSn function. Then, if internal area is accessed also immediately after setting a port as CS function, an unnecessary pulse will not output. 1. The ban on interruption under functional change (DI command) 2. 3. A dummy command is added in order to carry out continuous internal access. (Access to a functional change register is corresponded by 16-bit command. (LDW command)) A port is set as CSn . Internal Internal address bus Function control signal Output port signal Pxx A23 to A0 n n+2 CSn Dummy access n+2 External signal XX XX+1 92CA25-123 2007-02-28 TMP92CA25 3.7 8-Bit Timers (TMRA) The TMP92CA25 features 4 built-in 8-bit timers (TMRA0-TMRA3). These timers are paired into two modules: TMRA01 and TMRA23. Each module consists of two channels and can operate in any of the following four operating modes. • • • • 8-bit interval timer mode 16-bit interval timer mode 8-bit programmable square wave pulse generation output mode (PPG: Variable duty cycle with variable period) 8-bit pulse width modulation output mode (PWM: Variable duty cycle with constant period) Figure 3.7.1 and Figure 3.7.2 show block diagrams for TMRA01 and TMRA23. Each channel consists of an 8-bit up counter, an 8-bit comparator and an 8-bit timer register. In addition, a timer flip-flop and a prescaler are provided for each pair of channels. The operation mode and timer flip-flops are controlled by a five-byte SFR (special function register). Each of the two modules (TMRA01 and TMRA23) can be operated independently. All modules operate in the same manner; hence only the operation of TMRA01 is explained here. The contents of this chapter are as follows. 3.7.1 Block Diagrams 3.7.2 Operation of Each Circuit 3.7.3 SFR 3.7.4 Operation in Each Mode (1) 8-bit timer mode (2) 16-bit timer mode (3) 8-bit PPG (programmable pulse generation) output mode (4) 8-bit PWM (pulse width modulation) output mode (5) Mode settings Table 3.7.1 Registers and Pins for Each Module Module Input pin for external clock Output pin for timer flip-flop Timer run register SFR (Address) Timer register Timer mode register Timer flip-flop control register TMRA01 No TA1OUT (Shared with PC0) TA01RUN (1100H) TA0REG (1102H) TA1REG (1103H) TA01MOD (1104H) TA1FFCR (1105H) TMRA23 No TA3OUT (Shared with PC1) TA23RUN (1108H) TA2REG (110AH) TA3REG (110BH) TA23MOD (110CH) TA3FFCR (110DH) External pin 92CA25-124 2007-02-28 3.7.1 Prescaler 16 32 64 128 256 512 φT16 Timer flip-flop TA1FF TA01RUN TA1FFCR φT256 Run/clear TA01RUN Prescaler clock: φT0 2 4 8 φT1 φT4 Block Diagrams Timer flip-flop output: TA1OUT Selector Selector 8-bit up counter (UC1) 8-bit up counter (UC0) 2 Over flow TA01MOD TA01MOD n TA01RUN φT1 φT4 φT16 φT1 φT16 φT256 Figure 3.7.1 TMRA01 Block Diagram 92CA25-125 8-bit up counter (CP0) TA01MOD 8-bit timer register TA0REG 8-bit timer register TA1REG Match detect TA0TRG TA01MOD 8-bit comparator (CP1) Match detect TA01RUN Register buffer 0 TMP92CA25 2007-02-28 Internaldata bus TMRA0 Interrupt output: INTTA0 TMRA0 Internal data bus Interrupt output: TA0TRG TMRA1 Interrupt output: INTTA1 Prescaler 4 φT4 φT16 φT256 8 16 32 64 128 256 512 Run/clear TA23RUN Prescaler clock: φT0 2 φT1 Timer flip-flop TA3FF TA23RUN TA3FFCR Timer flip-flop output: TA3OUT Selector Selector 8-bit up comparator (UC3) 8-bit up counter (UC2) 2 Over flow TA23MOD TA23MOD n TA23RUN φT1 φT4 φT16 φT1 φT16 φT256 Figure 3.7.2 TMRA23 Block Diagram 92CA25-126 8-bit comparator (CP2) Match detect TA2TRG TA23MOD 8-bit comparator (CP3) Match detect TA23MOD 8-bit timer register TA2REG 8-bit timer register TA3REG TA23RUN Register buffer 2 TMP92CA25 2007-02-28 Internal data bus TMRA2 Interrupt output: INTTA2 TMRA2 Internal data bus Interrupt output: TA2TRG TMRA3 Interrupt output: INTTA3 TMP92CA25 3.7.2 Operation of Each Circuit (1) Prescalers A 9-bit prescaler generates the input clock to TMRA01. The clock φT0 is divided into 8 by the CPU clock fSYS and input to this prescaler. The prescaler operation can be controlled using TA01RUN in the timer control register. Setting to “1” starts the count; setting to “0” clears the prescaler to “0” and stops operation. Table 3.7.2 shows the various prescaler output clock resolutions. Table 3.7.2 Prescaler Output Clock Resolution System clock selection SYSCR1 1 (fs) Clock gear selection SYSCR1 − 000 (1/1) 001 (1/2) 0 (fc) 010 (1/4) 011 (1/8) 100 (1/16) 1/8 Timer counter input clock TMRA prescaler − φT1(1/2) fs/16 fc/16 fc/32 fc/64 fc/128 fc/256 TAxMOD φT4(1/8) fs/64 fc/64 fc/128 fc/256 fc/512 fc/1024 φT16(1/32) φT256(1/512) fs/256 fc/256 fc/512 fc/1024 fc/2048 fc/4096 fs/4096 fc/4096 fc/8192 fc/16384 fc/32768 fc/65536 xxx: Don’t care (2) Up counters (UC0 and UC1) These are 8-bit binary counters which count up the input clock pulses for the clock specified by TA01MOD. The input clock for UC0 is selectable and can be either the external clock input via the TA0IN pin or one of the three internal clocks φT1, φT4 or φT16. The clock setting is specified by the value set in TA01MOD. The input clock for UC1 depends on the operation mode. In 16-bit timer mode, the overflow output from UC0 is used as the input clock. In any mode other than 16-bit timer mode, the input clock is selectable and can either be one of the internal clocks φT1, φT16 or φT256, or the comparator output (the match detection signal) from TMRA0. For each interval timer the timer operation control register bits TA01RUN and TA01RUN can be used to stop and clear the up counters and to control their count. A reset clears both up counters, stopping the timers. 92CA25-127 2007-02-28 TMP92CA25 (3) Timer registers (TA0REG and TA1REG) These are 8-bit registers, which can be used to set a time interval. When the value set in the timer register TA0REG or TA1REG matches the value in the corresponding up counter, the comparator match detect signal goes Active. If the value set in the timer register is 00H, the signal goes Active when the up counter overflows. TA0REG has a double buffer structure, making a pair with the register buffer. The setting of the bit TA01RUN determines whether TA0REG’s double buffer structure is enabled or disabled. It is disabled if = “0” and enabled if = “1”. When the double buffer is enabled, data is transferred from the register buffer to the timer register when a 2n overflow occurs in PWM mode, or at the start of the PPG cycle in PPG mode. Hence the double buffer cannot be used in timer mode. A reset initializes to “0”, disabling the double buffer. To use the double buffer, write data to the timer register, set to “1”, and write the following data to the register buffer. Figure 3.7.3 show the configuration of TA0REG. Timer registers 0 (TA0REG) B Selector S A Matching detection PPG cycle n 2 overflow of PWM Write to TA0REG Shift trigger Register buffers 0 Write Internal data bus TA01RUN Figure 3.7.3 Configuration of TA0REG Note: The same memory address is allocated to the timer register and the register buffer. When = 0, the same value is written to the register buffer and the timer register; when = 1, only the register buffer is written to. The address of each timer register is as follows. TA0REG: 001102H TA2REG: 00110AH TA1REG: 001103H TA3REG: 00110BH All these registers are write only and cannot be read. 92CA25-128 2007-02-28 TMP92CA25 (4) Comparator (CP0) The comparator compares the value in an up counter with the value set in a timer register. If they match, the up counter is cleared to “0” and an interrupt signal (INTTA0 or INTTA1) is generated. If timer flip-flop inversion is enabled, the timer flip-flop is inverted at the same time. (5) Timer flip-flop (TA1FF) The timer flip-flop (TA1FF) is a flip-flop inverted by the match detects signals (8-bit comparator output) of each interval timer. Whether inversion is enabled or disabled is determined by the setting of the bit TA1FFCR in the timer flip-flops control register. A reset clears the value of TA1FF to “0”. Writing “01” or “10” to TA1FFCR sets TA1FF to “0” or “1”. Writing “00” to these bits inverts the value of TA1FF (this is known as software inversion). The TA1FF signal is output via the TA1OUT pin (which can also be used as PC0). When this pin is used as the timer output, the timer flip-flop should be set beforehand using the port C function register PCCR and PCFC. Note: When the double buffer is enabled for an 8-bit timer in PWM or PPG mode, caution is required as explained below. If new data is written to the register buffer immediately before an overflow occurs by a match between the timer register value and the up-counter value, the timer flip-flop may output an unexpected value. For this reason, make sure that in PWM mode new data is written to the register buffer by six cycles (fSYS × 6) before the next overflow occurs by using an overflow interrupt. When using PPG mode, make sure that new data is written to the register buffer by six cycles before the next cycle compare match occurs by using a cycle compare match interrupt. Example when using PWM mode Match between TA0REG and up-counter 2 overflow interrupt (INTTA0) TA1OUT tPWM (PWM cycle) Desired PWM cycle change point Write new data to the register buffer before the next overflow occurs by using an overflow interrupt n 92CA25-129 2007-02-28 TMP92CA25 3.7.3 SFR TMRA01 Run Register 7 TA01RUN Bit symbol (1100H) Read/Write After reset Function TA0RDE R/W 0 Double buffer 0: Disable 1: Enable TA0REG double buffer control 0 1 Disable Enable 0 IDLE2 0: Stop 1: Operate 0 TMRA01 prescaler 6 5 4 3 I2TA01 2 TA01PRUN R/W 1 TA1RUN 0 UP counter (UC1) 0 TA0RUN 0 UP counter (UC0) 0: Stop and clear 1: Run (Count up) Timer run/stop control 0 1 Stop and clear Run (Count up) Note: The values of bits 4 to 6 of TA01RUN are undefined when read. TMRA23 Run Register 7 TA23RUN Bit symbol (1108H) Read/Write After reset Function TA2RDE R/W 0 Double buffer 0: Disable 1: Enable TA2REG double buffer control 0 1 Disable Enable 0 IDLE2 0: Stop 1: Operate 0 TMRA23 prescaler 6 5 4 3 I2TA23 2 TA23PRUN R/W 1 TA3RUN 0 UP counter (UC3) 0 TA2RUN 0 UP counter (UC4) 0: Stop and clear 1: Run (Count up) Timer run/stop control 0 1 Stop and clear Run (Count up) Note: The values of bits 4 to 6 of TA23RUN are undefined when read. Figure 3.7.4 TMRA01 Run Register and TMRA23 Run Register 92CA25-130 2007-02-28 TMP92CA25 TMRA01 Mode Register 7 TA01MOD (1104H) Bit symbol Read/Write After reset Function 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode 0 0 PWM cycle 00: Reserved 01: 2 6 7 8 6 TA01M0 5 PWM01 4 PWM00 0 R/W 3 TA1CLK1 0 00: TA0TRG 01: φT1 10: φT16 11: φT256 2 TA1CLK0 0 1 TA0CLK1 0 00: Reserved 01: φT1 10: φT4 11: φT16 0 TA0CLK0 0 TA01M1 Source clock for TMRA1 Source clock for TMRA0 10: 2 11: 2 TMRA0 source clock selection 00 01 10 11 (Reserved) φT1 (Prescaler) φT4 (Prescaler) φT16 (Prescaler) TMRA1 source clock selection TA01MOD ≠ 01 00 01 10 11 Comparator output from TMRA0 φT1 φT16 φT256 (16-bit timer mode) TA01MOD = 01 Overflow output from TMRA0 PWM cycle selection 00 01 10 11 Reserved 2 × Source clock 2 × Source clock 2 × Source clock 8 7 6 TMRA01 operation mode selection 00 01 10 11 8-bit timers × 2ch 16-bit timer 8-bit PPG 8-bit PWM (TMRA0) 8-bit timer (TMRA1) Figure 3.7.5 TMRA Mode Register 92CA25-131 2007-02-28 TMP92CA25 TMRA23 Mode Register 7 TA23MOD (110CH) Bit symbol Read/Write After reset Function 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode 0 0 PWM cycle 00: Reserved 01: 2 10: 2 11: 2 6 7 8 6 TA23M0 5 PWM21 4 PWM20 0 R/W 3 TA3CLK1 0 00: TA2TRG 01: φT1 10: φT16 11: φT256 2 TA3CLK0 0 1 TA2CLK1 0 00: Reserved 01: φT1 10: φT4 11: φT16 0 TA2CLK0 0 TA23M1 Source clock for TMRA3 Source clock for TMRA2 TMRA2 source clock selection 00 01 10 11 (Reserved) φT1 (Prescaler) φT4 (Prescaler) φT16 (Prescaler) TMRA3 source clock selection TA23MOD ≠ 01 00 01 10 11 Comparator output from TMRA2 φT1 φT16 φT256 (16-bit timer mode) TA23MOD = 01 Overflow output from TMRA2 PWM cycle selection 00 01 10 11 Reserved 2 × Source clock 2 × Source clock 2 × Source clock 8 7 6 TMRA23 operation mode selection 00 01 10 11 8-bit timers × 2ch 16-bit timer 8-bit PPG 8-bit PWM (TMRA2) 8-bit timer (TMRA3) Figure 3.7.6 TMRA23 Mode Register 92CA25-132 2007-02-28 TMP92CA25 TMRA1 Flip-Flop Control Register 7 TA1FFCR (1105H) Bit symbol Read/Write After reset Read-modify- Function write instruction is prohibited. 6 5 4 3 TA1FFC1 1 00: Invert TA1FF 01: Set TA1FF 10: Clear TA1FF 11: Don’t care 2 TA1FFC0 R/W 1 1 TA1FFIE 0 TA1FF control for inversion 0: Disable 1: Enable 0 TA1FFIS 0 TA1FF inversion select 0: TMRA0 1: TMRA1 Inverse signal for timer flop-flop 1 (TA1FF) (Don’t care except in 8-bit timer mode) 0 1 Inversion by TMRA0 Inversion by TMRA1 Inversion of TA1FF 0 1 Disabled Enabled Control of TA1FF 00 01 10 11 Note: The values of bits4 to 6 of TA1FFCR are undefined when read. Inverts the value of TA1FF Sets TA1FF to “1” Clears TA1FF to “0” Don’t care Figure 3.7.7 TMRA Flip-Flop Control Register 92CA25-133 2007-02-28 TMP92CA25 TMRA3 Flip-Flop Control Register 7 TA3FFCR Bit symbol (110DH) Read/Write After reset Readmodifywrite instruction is prohibited. 6 5 4 3 TA3FFC1 1 00: Invert TA3FF 01: Set TA3FF 10: Clear TA3FF 11: Don’t care 2 TA3FFC0 R/W 1 1 TA3FFIE 0 TA3FF control for inversion 0: Disable 1: Enable 0 TA3FFIS 0 TA3FF inversion select 0: TMRA2 1: TMRA3 Function Inverse signal for timer flip-flop 3 (TA3FF) (Don’t care except in 8-bit timer mode) 0 1 Inversion by TMRA2 Inversion by TMRA3 Inversion of TA3FF 0 1 Disabled Enabled Control of TA3FF 00 01 10 11 Note: The values of bits4 to 6 of TA3FFCR are undefined when read. Inverts the value of TA3FF Sets TA3FF to “1” Clears TA3FF to “0” Don’t care Figure 3.7.8 TMRA3 Flip-Flop Control Register 92CA25-134 2007-02-28 TMP92CA25 TMRA Register Symbol TA0REG Address 1102H 7 6 5 4 − W Undefined − 3 2 1 0 TA1REG 1103H W Undefined − TA2REG 110AH W Undefined − TA3REG 110BH W Undefined Note: Read-modify-write instruction is prohibited. Figure 3.7.9 8-Bit Timers Register 92CA25-135 2007-02-28 TMP92CA25 3.7.4 Operation in Each Mode (1) 8-bit timer mode Both TMRA0 and TMRA1 can be used independently as 8-bit interval timers. 1. Generating interrupts at a fixed interval (using TMRA1) To generate interrupts at constant intervals using TMRA1 (INTTA1), first stop TMRA1 then set the operation mode, input clock and a cycle to TA01MOD and TA1REG register, respectively. Then, enable the interrupt INTTA1 and start TMRA1 counting. Example: To generate an INTTA1 interrupt every 40 μs at fC = 40 MHz, set each register as follows: MSB 7 TA01RUN TA01MOD TA1REG INTETA01 TA01RUN ←− ←0 ←0 ←X ←– 6 X 0 1 1 X 5 X X 1 0 X 4 X X 0 1 X 3 − 0 0 − − 2 − 1 1 − 1 LSB 1 0 − 0 − 1 0 − − 0 − − Stop TMRA1 and clear it to “0”. Select 8-bit timer mode and select φT1 (= (16/fc)s at fC = 40 MHz) as the input clock. Set TREG1 to 40 μs ÷ φT1 = 100 = 64H. Enable INTTA1 and set it to level 5. Start TMRA1 counting. X: Don’t care, −: No change Select the input clock using Table 3.7.3. Table 3.7.3 Selecting Interrupt Interval and the Input Clock Using 8-Bit Timer Input Clock φT1 φT4 φT16 (8/fSYS) (32/fSYS) (128/fSYS) Interrupt Interval (at fSYS = 20 MHz) 0.4 μs to 102.4 μs 1.6 μs to 409.6 μs 6.4 μs to 1.638 ms 102.4 μs to 26.21 ms Resolution 0.4 μs 1.6 μs 6.4 μs 102.4 μs φT256 (2048/fSYS) Note: The input clocks for TMRA0 and TMRA1 differ as follows: TMRA0: Uses TMRA0 input (TA0IN) and can be selected from φT1, φT4 or φT16 TMRA1: Matches output of TMRA0 (TA0TRG) and can be selected from φT1, φT16, φT256 92CA25-136 2007-02-28 TMP92CA25 2. Generating a 50 % duty ratio square wave pulse The state of the timer flip-flop (TA1FF1) is inverted at constant intervals and its status output via the timer output pin (TA1OUT). Example: To output a 2.4-μs square wave pulse from the TA1OUT pin at fC = 40 MHz, use the following procedure to make the appropriate register settings. This example uses TMRA1; however, either TMRA0 or TMRA1 may be used. 7 TA01RUN TA01MOD TA1REG TA1FFCR PCCR PCFC TA01RUN ←− ←0 ←0 ←X ←− ←− ←− 6 X 0 0 X − − X 5 X X 0 X − − X 4 X X 0 X − − X 3 − 0 0 1 − − − 2 − 1 0 0 − − 1 1 0 − 1 1 − − 1 0 − − 1 1 1 1 − Stop TMRA1 and clear it to “0”. Select 8-bit timer mode and select φT1 (= (16/fc)s at fC = 40 MHz) as the input clock. Set the timer register to 2.4 μs ÷ φT1 ÷ 2 = 3 Clear TA1FF to “0” and set it to invert on the match detect signal from TMRA1. Set PC0 to function as the TA1OUT pin. Start TMRA1 counting. X: Don’t care, −: No change φT1 TA01RUN Bit7 to Bit2 Up counter Bit1 Bit0 Comparator timing Comparator output (Match detect) INTTA1 UC1 clear TA1FF TA1OUT 1.2 μs at fC = 40 MHz 0 1 2 3 0 1 2 3 0 1 2 3 0 Figure 3.7.10 Square Wave Output Timing Chart (50 % Duty) 92CA25-137 2007-02-28 TMP92CA25 3. Making TMRA1 count up on the match signal from the TMRA0 comparator Select 8-bit timer mode and set the comparator output from TMRA0 to be the input clock to TMRA1. Comparator output (TMRA0 match) TMRA0 up counter (when TA0REG = 5) TMRA1 up counter (when TA1REG = 2) TMRA1 match output 1 2 3 1 4 5 1 2 3 2 4 5 1 2 1 3 Figure 3.7.11 TMRA1 Count Up on Signal from TMRA0 (2) 16-bit timer mode A 16-bit interval timer is configured by pairing the two 8-bit timers TMRA0 and TMRA1. To make a 16-bit interval timer in which TMRA0 and TMRA1 are cascaded together, set TA01MOD to “01”. In 16-bit timer mode, the overflow output from TMRA0 is used as the input clock for TMRA1, regardless of the value set in TA01MOD. Table 3.7.2 shows the relationship between the timer (interrupt) cycle and the input clock selection. To set the timer interrupt interval, set the lower eight bits in timer register TA0REG and the upper eight bits in TA1REG. Be sure to set TA0REG first (as entering data in TA0REG temporarily disables the compare, while entering data in TA1REG starts the compare). Setting example: To generate an INTTA1 interrupt every 0.4 s at fC = 40 MHz, set the timer registers TA0REG and TA1REG as follows: If φT16 (= (256/fc)s at fC = 40 MHz) is used as the input clock for counting, set the following value in the registers: 0.4 s ÷ =(256/fc)s = 62500 = F424H; e.g. set TA1REG to F4H and TA0REG to 24H. 92CA25-138 2007-02-28 TMP92CA25 The comparator match signal is output from TMRA0 each time the up counter UC0 matches TA0REG, though the up counter UC0 is not cleared. In the case of the TMRA1 comparator, the match detect signal is output on each comparator pulse on which the values in the up counter UC1 and TA1REG match. When the match detect signal is output simultaneously from both the comparator TMRA0 and TMRA1, the up counters UC0 and UC1 are cleared to “0” and the interrupt INTTA1 is generated. Also, if inversion is enabled, the value of the timer flip-flop TA1FF is inverted. Example: When TA1REG = 04H and TA0REG = 80H Value of up counter (UC1, UC0) TMRA0 comparator match detect signal TMRA1 comparator match detect signal Interrupt INTTA0 Interrupt INTTA1 Timer output TA1OUT Inversion 0080H 0180H 0280H 0380H 0480H 0080H Figure 3.7.12 Timer Output by 16-Bit Timer Mode (3) 8-bit PPG (Programmable pulse generation) output mode Square wave pulses can be generated at any frequency and duty ratio by TMRA0. The output pulses may be active low or active high. In this mode TMRA1 cannot be used. TMRA0 outputs pulses on the TA1OUT pin (which can also be used as PC0). tH = “10” t tL = “01” t Example: = “01” TA0REG and UC0 match (Interrupt INTTA0) TA1REG and UC0 match (Interrupt INTTA1) TA1OUT tL tH TA0REG TA1REG Figure 3.7.13 8-Bit PPG Output Waveforms 92CA25-139 2007-02-28 TMP92CA25 In this mode a programmable square wave is generated by inverting the timer output each time the 8-bit up counter (UC0) matches the value in one of the timer registers TA0REG or TA1REG. The value set in TA0REG must be smaller than the value set in TA1REG. Although the up counter for TMRA1 (UC1) is not used in this mode, TA01RUN should be set to “1” so that UC1 is set for counting. Figure 3.7.14 shows a block diagram representing this mode. Selector φT1 φT4 φT16 TA01MOD 8-bit up counter (UC0) TA01RUN TA1OUT TA1FFCR TA1FF Inversion INTTA0 Comparator Comparator INTTA1 Selector TA0REG Shift trigger Register buffer TA1REG TA0REG-WR TA01RUN Internal data bus Figure 3.7.14 Block Diagram of 8-Bit PPG Output Mode If the TA0REG double buffer is enabled in this mode, the value of the register buffer will be shifted into TA0REG each time TA1REG matches UC0. Use of the double buffer facilitates the handling of low duty waves (when duty is varied). Match with TA0REG and up counter Match with TA1REG TA0REG (Value to be compared) Register buffer Shift from register buffer Q1 Q2 Q2 Q3 TA0REG (Register buffer) write (Up counter = Q1) (Up counter = Q2) Figure 3.7.15 Operation of Register Buffer 92CA25-140 2007-02-28 TMP92CA25 Example: To generate 1/4 duty 62.5 kHz pulses (at fC = 40 MHz) 16 μs Calculate the value which should be set in the timer register. To obtain a frequency of 62.5 kHz, the pulse cycle t should be: t = 1/62.5 kHz = 16 μs φT1 (=(16/fc)s (at fC = 40 MHz); 16 μs ÷ (16/fc)s = 40 Therefore set TA1REG to 40 (28H) The duty is to be set to 1/4: t × 1/4 = 16 μs × 1/4 = 4 μs 4 μs ÷ (16/fc)s = 10 Therefore, set TA0REG = 10 = 0AH. 7 TA01RUN TA01MOD TA0REG TA1REG TA1FFCR PCCR PCFC TA01RUN ←0 ←1 ←0 ←0 ←X ←− ←− ←1 6 X 0 0 0 X − − X 5 X X 0 1 X − − X 4 X X 0 0 X − − X 3 − X 1 1 0 − − − 2 0 X 0 0 1 − − 1 1 0 0 1 0 1 − − 1 0 0 1 0 0 X 1 1 1 Stop TMRA0 and TMRA1 and clear it to “0”. Set the 8-bit PPG mode, and select φT1 as input clock. Write 0AH. Write 28H. Set TA1FF, enabling both inversion and the double buffer. 10 generate a negative logic pulse. Set PC0 as the TA1OUT pin. Start TMRA0 and TMRA1 counting. X: Don't care, −: No change 92CA25-141 2007-02-28 TMP92CA25 (4) 8-bit PWM output mode This mode is only valid for TMRA0. In this mode, a PWM pulse with the maximum resolution of 8 bits can be output. When TMRA0 is used the PWM pulse is output on the TA1OUT pin (which is also used as PC1). TMRA1 can also be used as an 8-bit timer. The timer output is inverted when the up counter (UC0) matches the value set in the timer register TA0REG or when 2n counter overflow occurs (n = 6, 7 or 8 as specified by TA01MOD). The up counter UC0 is cleared when 2n counter overflow occurs. The following conditions must be satisfied before this PWM mode can be used. Value set in TA0REG < value set for 2n counter overflow Value set in TA0REG ≠ 0 TA0REG and UC0 match 2 overflow (INTTA0 interrupt) n TA1OUT tPWM (PWM cycle) Figure 3.7.16 8-Bit PWM Waveforms Figure 3.7.17 shows a block diagram representing this mode. TA01RUN φT1 φT4 φT16 Selector 8-bit up counter (UC0) TA1OUT TA1FFCR Clear TA1FF Inversion TA01MOD 2 overflow control n TA01MOD Comparator Overflow INTTA0 TA0REG Selector TA0REG-WR Shift trigger Register buffer TA01RUN Internal data bus Figure 3.7.17 Block Diagram of 8-Bit PWM Mode 92CA25-142 2007-02-28 TMP92CA25 In this mode the value of the register buffer will be shifted into TA0REG if 2n overflow is detected when the TA0REG double buffer is enabled. Use of the double buffer facilitates the handling of low duty ratio waves. Match with TA0REG Up counter = Q1 2 overflow TA0REG (Value to be compared) Register buffer Shift into TA0REG Q1 Q2 Q2 Q3 TA0REG (Register buffer) write n Up counter = Q2 Figure 3.7.18 Register Buffer Operation Example: To output the following PWM waves on the TA1OUT pin (at fC = 40 MHz). 36.0 μs 51.2 μs To achieve a 51.2-μs PWM cycle by setting φT1 (= (16/fc)s (@fC = 40 MHz): 51.2 μs ÷ (16/fc)s = 128 n 2 = 128 Therefore n should be set to 7. Since the low level period is 36.0 μs when φT1 = (16/fc)s, set the following value for TREG0: 36.0 μs ÷ (16/fc)s = 90 = 5AH MSB 7 TA01RUN TA01MOD TA0REG TA1FFCR PCCR PCFC TA01RUN ←− ←1 ←0 ←X ←− ←− ←1 6 X 1 1 X − − X 5 X 1 0 X − − X 4 X 0 1 X − − X 3 − − 1 1 − − − 2 − − 0 0 − − 1 LSB 1 − 0 1 1 − − − 0 0 1 0 X 1 1 1 Stop TMRA0 and clear it to 0 Select 8-bit PWM mode (cycle: 2 ) and select φT1 as the input clock. Write 5AH. Clear TA1FF to 0; enable the inversion and double buffer. 7 Set PC0 as the TA1OUT pin. Start TMRA0 counting. X: Don't care, −: No change 92CA25-143 2007-02-28 TMP92CA25 Table 3.7.4 PWM Cycle PWM cycle System clock SYSCR0 Clock gear SYSCR1 TAxxMOD − φT1(x2) 2 (x64) TAxxMOD φT4(x8) 4096/fs 4096/fc 8192/fc 16384/fc 32768/fc 65536/fc 6 2 (x128) TAxxMOD φT1(x2) 2048/fs 2048/fc 4096/fc 8192/fc 16384/fc 32768/fc 7 2 (x256) TAxxMOD φT1(x2) 4096/fs 4096/fc 8192/fc 16384/fc 32768/fc 65536/fc 8 φT16(x32) 16384/fs 16384/fc 32768/fc 65536/fc 131072/fc 262144/fc φT4(x8) 8192/fs 8192/fc 16384/fc 32768/fc 65536/fc 131072/fc φT16(x32) 32768/fs 32768/fc 65536/fc 131072/fc 262144/fc 524288/fc φT4(x8) 16384/fs 16384/fc 32768/fc 65536/fc 131072/fc 262144/fc φT16(x32) 65536/fs 65536/fc 131072/fc 262144/fc 524288/fc 1048576/fc 1(fs) − 000(x1) 001(x2) 1024/fs 1024/fc 0(fc) 010(x4) 011(x8) 100(x16) ×8 2048/fc 4096/fc 8192/fc 16384/fc (5) Settings for each mode Table 3.7.5 shows the SFR settings for each mode. Table 3.7.5 Timer Mode Setting Registers Register name Function Timer Mode TA01MOD PWM Cycle Upper Timer Input Clock Lower timer match, φT1, φT16, φT256 (00, 01, 10, 11) − Lower Timer Input Clock External clock, φT1, φT4, φT16 (00, 01, 10, 11) External clock, φT1, φT4, φT16 (00, 01, 10, 11) External clock, φT1, φT4, φT16 (00, 01, 10, 11) External clock, φT1, φT4, φT16 (00, 01, 10, 11) − TA1FFCR Timer F/F Invert Signal Select 0: Lower timer output 1: Upper timer output 8-bit timer × 2 channels 00 − 16-bit timer mode 01 − − 8-bit PPG × 1 channel 10 6 − 7 8 − − 8-bit PWM × 1 channel 8-bit timer × 1 channel 11 11 2 ,2 ,2 (01, 10, 11) − − φT1, φT16, φT256 (01, 10, 11) − Output disabled −: Don’t care 92CA25-144 2007-02-28 TMP92CA25 3.8 External Memory Extension Function (MMU) By providing 3 local areas, the MMU function allows for the expansion of the program/data area up to 512 Mbytes. The recommended address memory map is shown in Figure 3.8.1. However, when the memory used is less than 16 Mbytes, it is not necessary to set the MMU register. In this case, please refer to the Memory Controller section. An area which can be set as a bank is called a local area. Since the address for local areas is fixed, it cannot be changed. And, area which cannot be set as a bank is called Common area. Basically one series of program should be closed within one bank. Please don’t jump to the same LOCAL-area in the different bank directly by JP instruction and so on. Refer to the examples as follows. It is not possible for a program to branch between different banks of the same local area. The TMP92CA25 has the following external pins for memory LSI connection. Address bus: EA25, EA24 and A23 to A0 Chip select: CS0 to CS3 , CSZA to CSZF , SDCS ND0CE and ND1CE Data bus: D15 to D0 3.8.1 Recommended Memory Map Figure 3.8.1 shows one recommended address memory map. This is for maximum expanded memory size and for a system in which an internal boot ROM with NAND flash is not required. 92CA25-145 2007-02-28 TMP92CA25 Memory controller setting ND0CE pin (128 Mbytes) Address 000000H Memory Map Internal I/O, RAM COMMON-X (2 Mbytes) ND1CE pin (128 Mbytes) CS3 pin 64 Mbytes(2 Mbytes × 32) CS0 area 32 Mbytes CS3 area 4 Mbytes 200000H LOCAL-X (2 Mbytes) 400000H LOCAL-Y (2 Mbytes) 600000H COMMON-Y (2 Mbytes) 800000H SDCS or CS1 pin 64 Mbytes(2 Mbytes × 32) Bank 0 1 2 3 15 31 Bank 0 1 2 3 15 31 CS1 area 4 Mbytes LOCAL-Z (4 Mbytes) Bank 0 1 2 3 15 16 31 80 95 C00000H CSZA pin (Note) 64 Mbytes(4 Mbytes × 16) CSZB pin CSZF pin CS2 area 8 Mbytes COMMON-Z (4 Mbytes) FFFF00H FFFFFFH Vector area : Internal area : Overlapped with COMMON area and disabled setting as LOCAL area. Note: CSZA is a chip select for not only bank 0 to 15 of LOCAL-Z but also COMMON-Z. Figure 3.8.1 Recommended Memory Map for Maximum Specification (Logical address) 92CA25-146 2007-02-28 TMP92CA25 TMP92CA25 LOCAL-X CS3 LOCAL-Y SDCS or CS1 LOCAL-Z CSZA to CSZF , EA24, EA25 64 Mbytes 64 Mbytes 64 Mbytes × 6 = 384 Mbytes CSZA CSZD 000000H BANK 0 BANK 0 BANK 0 BANK 48 Internal I/O and RAM 31 31 15 63 CSZB CSZE BANK 16 BANK 64 31 79 CSZC CSZF BANK 32 BANK 80 47 95 Figure 3.8.2 Recommended Memory Map for Maximum Specification (Physical address) 92CA25-147 2007-02-28 TMP92CA25 3.8.2 Control Registers There are 12 MMU registers, covering 4 functions (program, data read, data write and LCDC display data), in each of 3 local areas (Local-X, Y and Z), providing easy data access. (Instructions for use) First, set the enable register and bank number for each LOCAL register. The relevant pin and memory settings should then be set to the ports and memory controller. When the CPU or LCDC outputs a local area logical address, the MMU converts and outputs this to the physical address according to the bank number. The physical address bus is output to the external address bus pin, thereby enabling access to external memory. Note 1: Since the common area cannot be used as local area, do not set a bank number to LOCAL register which overlaps with the common area. Note 2: Changing program BANK number (LOCALPX, Y or Z) is disabled in the LOCAL area. The program bank setting for each local area must be changed in the common area. (But bank setting of read data, write data and data for LCD display can be changed in the local area.) Note 3: After data bank number register (LOCALRn, LOCALWn or LOCALLn; where “n” means X, Y or Z) is set by an instruction, do not access its memory by the following instruction because several clocks are required for effective MMU setting. For this reason, insert between them a dummy instruction which accesses SFR or another memory, as in the following example. (Example) ld ld ld ld xix, 200000H (localrx), 81H wa, (localrx) wa, (xix) ; ; ; ; Data bank number is set ← Inserted dummy instruction which accesses SFR Instruction which reads BANK 1 of LOCAL-X area. Note 4: When LOCAL-Z area is used, chip select signal CSZA should be assigned to P82 pin. In this case, CSZA works as chip select signal for not only BANK 0 to 15 but also COMMON-Z. The following setting after reset is required before setting Port82. ld ld ld ld ld ld (*1) (*2) (localpz), 80H (localrz), 80H (localwz), 80H (locallz), 80H (p8fc), ; ; ; ; LOCAL-Z bank enable for program LOCAL-Z bank enable for data read LOCAL-Z bank enable for data write Set P82 pin to CSZA output (*1) LOCAL-Z bank enable for LCD display memory (*2) −−−−−0−−B ; (p8fc2), − − − − − 1 − − B ; If COMMON-Z area is not used as data write memory, this setting is not required. If COMMON-Z area is not used as LCD display memory, this setting is not required. 92CA25-148 2007-02-28 TMP92CA25 (1) Program bank register The bank number used as program memory is set to these registers. It is not possible to change program bank number in the same local area. LOCAL-X Register for Program 7 LOCALPX Bit symbol (01D0H) Read/Write After reset Function LXE R/W 0 Use BANK for LOCAL-X 0: Not use 1: Use 0 0 6 5 4 X4 3 X3 2 X2 R/W 0 1 X1 0 0 X0 0 Set wBANK number for LOCAL-X (“0” is disabled because of overlap with COMMON area.) LOCAL-Y Register for Program 7 LOCALPY Bit symbol (01D1H) Read/Write After reset Function LYE R/W 0 Use BANK for LOCAL-Y 0: Not use 1: Use 0 0 6 5 4 Y4 3 Y3 2 Y2 R/W 0 1 Y1 0 0 Y0 0 Set BANK number for LOCAL-Y (“3” is disabled because of overlap with COMMON area.) LOCAL-Z Register for Program 7 LOCALPZ Bit symbol (01D3H) Read/Write After reset Function LZE 0 Use BANK for LOCAL-Z 0: Disable 1: Enable 6 Z6 0 5 Z5 0 4 Z4 R/W 0 3 Z3 0 2 Z2 0 1 Z1 0 0 Z0 0 Set BANK number for LOCAL-Z (“3” is disabled because of overlap with COMMON area.) 92CA25-149 2007-02-28 TMP92CA25 (2) LCD Display bank register The bank number used as LCD display memory is set to these registers. Since the bank registers for CPU and LCDC are prepared independently, the bank number for CPU (Program, Read data or Write data) can be changed during LCD display. LOCAL-X Register for LCDC Display Data 7 LOCALLX Bit symbol (01D4H) Read/Write After reset Function LXE R/W 0 Use BANK for LOCAL-X 0: Not use 1: Use 0 0 6 5 4 X4 3 X3 2 X2 R/W 0 1 X1 0 0 X0 0 Set BANK number for LOCAL-X (“0” is disabled because of overlap with COMMON area.) LOCAL-Y Register for LCDC Display Data 7 LOCALLY (01D5H) Bit symbol Read/Write After reset Function LYE R/W 0 Use BANK for LOCAL-Y 0: Not use 1: Use 0 0 6 5 4 Y4 3 Y3 2 Y2 R/W 0 1 Y1 0 0 Y0 0 Set BANK number for LOCAL-Y (“3” is disabled because of overlap with COMMON area.) LOCAL-Z Register for LCDC Display Data 7 LOCALLZ (01D7H) Bit symbol Read/Write After reset Function 0 Use BANK for LOCAL-Z 0: Disable 1: Enable 0 0 0 LZE 6 Z6 5 Z5 4 Z4 R/W 3 Z3 0 2 Z2 0 1 Z1 0 0 Z0 0 Set BANK number for LOCAL-Z (“3” is disabled because of overlap with COMMON area.) 92CA25-150 2007-02-28 TMP92CA25 (3) Read data bank register The bank register number used as read data memory is set to these registers. The following is an example where the read data bank register of LOCAL-X is set to “1”. When “ld wa, (xix)” instruction is executed, the bank becomes effective only at the read cycle for xix address. (Example) ld ld ld SFR ld wa, (xix) ; Read bank1 of LOCAL-X area xix, 200000h (localrx), 81h wa, (localrx) ; ; Set Read data bank. ; B > C. If the A area is set to enable while the panel area is defined as all C area (A and B areas are disabled), C area is shifted below the LCD panel and A area is inserted from the top of the LCD panel. Similarly if the B area is set to enable while the panel area is defined as all C area, B area is inserted from the bottom of the C area overlapping. Memory map image Logic address 400000H Ya A area Vertical pan B area Yb Row address C area Yc Horizontal pan 2X 600000H B area Yb A area C area Yc Column address Reserved area for horizontal pan of C area * Display data cannot input closely when pan function is not used (SDRAM). LCD Panel image X Ya Figure 3.15.1 Memory Mapping from Physical Memory to LCD Panel 92CA25-272 2007-02-28 TMP92CA25 3.15.3.3 Display Memory Mapping and Panning Function (Common spec. SR mode and TFT mode) The LCDC can only change the panel window if you change each start address of A, B and C areas. The display area can be panned vertically and horizontally by changing the row address and column address. This LCDC can select many display modes: 1 bpp (monochrome), 2 bpp (4 grayscales), 3 bpp (8 grayscales), 4 bpp (16 grayscales), 8 bpp (256 colors) and 12 bpp (4096 colors) and 1-line (row). Data volume is different for each display mode. When using the panning function, care must be exercised in calculating the address for each display mode. For details, refer to Figure 3.15.2, “Relation of memory map image and output data”. This LCDC can also support external SDRAM, SRAM and internal SRAM for display RAM. When using SDRAM for display RAM, data from one line to the next line cannot be input continuously in display RAM, even if the panning function is not used. One row address of display SDRAM corresponds to the first line of the display panel. Second line display data cannot now be set within the first row address of the display RAM even if the necessary data for the size you want to display does not fill the capacity of first row address of the display SDRAM. Adding one line to the display panel is equal to adding one address to the row address of the display SDRAM. In other words, when using SDRAM for display RAM, address calculation for panning is simple. When using SRAM for display RAM, data from one line to the next line must be input continuously to the display RAM. However, address calculation for panning is complex and horizontal panning function is not supported. And when setting segment = 240 and select internal RAM, the limitation is added under below. 16bit data is thrown away 1 common 240 bit **00H **04H **08H **0CH **10H **14H **18H **1CH 2 common * *20H **20H **24H **28H **2CH **30H **34H **38H **3CH The last 16bits data in 8th access is thrown away. If using all data effectively, set internal SRAM2 mode (16bit access mode). And it is possible to allocate data tightly. 3.15.3.4 Data Transmission This LSI has an LD bus (LD7 to LD0): a special data bus for LCD driver. Bus width of 4-bits_Atype, 4-bits_B-type or 8-bits type can be supported. Relation between memory mapping and Output data is shown to Figure 3.15.2. 92CA25-273 2007-02-28 TMP92CA25 • Monochrome: 1 bpp (bit per pixel) Display memory image LSB D0 0 1 2 Address 0 3 4 5 6 7 8 Address 1 Address 2 Address 3 MSB D31 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 LD bus output sequence 4-bit width A type LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 0 1 2 3 → → → → 4 5 6 7 → → 8 9 → 12 ... → 13 ... 4-bit width B type LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 4 5 6 7 → → → → 0 1 2 3 → 12 → → 13 → 8 9 ... ... 8-bit width type LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 0 1 2 3 4 5 6 7 → → → → → → → → 8 9 ... ... → 10 → 14 ... → 11 → 15 ... → 14 → 10 ... → 15 → 11 ... 10 ... 11 ... 12 ... 13 ... 14 ... 15 ... Not use Not use Not use Not use Not used Not used Not used Not used Figure 3.15.2 Relation of Memory Map Image and Output Data 92CA25-274 2007-02-28 TMP92CA25 3.15.3.5 Refresh Rate Setting Frame cycle (refresh rate) is generated from setting of LSCC (LCDSCC) and FP [9:0] (LCDCTL0, LCDFFP). The LBCD terminal outputs one pulse every cycle and the LFR normally outputs an inverted signal every cycle. But when the DIVIDE FRAME function is used, the LFR signal changes to a special signal for high quality display. (1) Basic clock setting This LSI has a special clock generator for basic source clock used in the LCD controller. This generator can set details of the refresh rate for the LCDC. This generator is made by dividing the system clock by 16 and an 8-bit counter. The following shows the method of setting and calculation. fBCD[Hz]: Frame rate (Refresh rate: Frequency of LBCD signal) FP: FP [9:0] setting value of FFP register SCC: setting value of LSCC register fBCD [Hz] = fSYS [Hz] / ((SCC+1) × 16 × FP) Example: fSYS [Hz] = 20MHz, 240COM (FP = 240), target refresh rate = 70Hz 70 [Hz] = 20000000 [Hz]/((SCC+1) × 16 × 240) (SCC+1) = 20000000/(70 ×16 × 240) = 74.4 Value of setting to register is only integer, SCC = 73. The floating value is disregarded. In this case, the refresh rate comes to 70.3 [Hz] LCDC Source Clock Counter Register 7 LCDSCC (0846H) Bit symbol Read/Write After reset Function 0 0 0 0 SCC7 6 SCC6 5 SCC5 4 SCC4 R/W 3 SCC3 0 2 SCC2 0 1 SCC1 0 0 SCC0 0 LCDC Source Clock Counter bit7 to bit0 * Data should be written from 1-hex to FFFF-hex in the above register. It cancannot operate if set to “0”. * If the refresh rate is set too fast, it may not be in time with the display data. tLP time is determined by SCC. tLP [s] = (1/fSYS [Hz]) × 16 × (SCC + 1) tLP is shown in 1-line (ROW) display time. 1-line data transmission must be completed during tLP cycle time. AboutRefer to “Data transmission and bus occupation” for details of data transmission time. 92CA25-275 2007-02-28 TMP92CA25 (2) Refresh rate adjust function (Correct function) In this function, the LBCD frequency: refresh rate is generated by setting LCDSCC and FP [9:0] register. The FFP value is normally set at the same value as the ROW number, but this value can be used for correction of BCD frequency: refresh rate. This function always uses a value greater than the ROW number, set to slower frequency. The LCDC cannot operate correctly if a value smaller than the ROW number is set. The following is an example of settings: Example: fSYS [Hz] = 20 MHz, 240COM ( FP = 240 ), Target refresh rate = 70 Hz 140 [Hz] = 20000000 [Hz]/((SCC+1) × 16 × 240) (SCC+1) = 20000000/(70 × 16 × 240) = 74.4 Value of setting to register is only integer, SCC = 73. The floating value is disregarded. In this case, refresh rate comes to 70.3 [Hz] fBCD [Hz] = fSYS [Hz]/((SCC+1) × 16 × FP) FP value is adjusted to set SCC=73 in above equation again. 70 [Hz] = 20000000/(74 × 16 × FP) FP = 241.3 Value of setting to register is only integer, FP = 241. In this case, refresh rate comes to 70.0 [Hz] LCD fFP Register 7 LCDFFP (0841H) Bit symbol Read/Write After reset Function 0 0 0 0 FP7 6 FP6 5 FP5 4 FP4 R/W 3 FP3 0 2 FP2 0 1 FP1 0 0 FP0 0 Setting bit7 to bit0 for fFP Reference) We recommend refresh rate values in the region of: Monochrome: 70 [Hz] 92CA25-276 2007-02-28 TMP92CA25 (3) Divide frame adjust function The DIVIDE FRAME function allows for adjustments to reduce uneven display in large LCD panels. When this function is enabled by setting = 1, the LFR signal alternates between high and low level with each LLP cycle for the LCDDVM register values given below. When this function is disabled by setting LCDCTL = 0, the LFR signal alternates between high and low level with each LBCD cycle. This function is not affected by the LBCD timing. Note: Availability of this function depends on the actual LCD driver or LCD panel used. We recommend checking that register’s value when used in the proposed environment. Divide Frame Register 7 LCDDVM (0842H) Bit symbol Read/Write After reset Function 0 0 0 0 FMN7 6 FMN6 5 FMN5 4 FMN4 R/W 3 FMN3 0 2 FMN2 0 1 FMN1 0 0 FMN0 0 Setting DVM bit7 to bit0 (Reference) In general, prime numbers (3, 5, 7, 11, 13 ...) are best for the value of the LCDDVM register. 92CA25-277 2007-02-28 TMP92CA25 LFR LBCD 1 2 3 120 1 2 3 120 1 2 LLP LCP LD7 to LD0 (8-bit case) Use internal signal to CPU (Interrupt) Figure 3.15.3 Whole Timing Diagram of SR Mode LFR tLP: LLP cycle tOPR: CPU opration time LBCD LLP Use internal signal (Internal) BUSRQ LCP0 LD7 to LD0 (8 bits) N tSTOP: Stop time tLPH = fSYS × 4 tCP = 2 states N+1 N + 28 N + 29 Note: There is internal FI/FO_RAM (160bits) for controlling the speed of transfering to LCD driver. If the size of segment is over 160, several bus request is generated at one tLP interval. (640segment: 5times max) Figure 3.15.4 Detailed Timing Diagram of SR Mode Condition: FFP [9:0] setting = 240 (COM) + 63, LCDDVM = 0BH LP1 LLP LP2 LP3 LP10 LP11 LP301 LP302 LP303 LP304 LFR DVM disable DVM enable Figure 3.15.5 Waveform of LLP, LFR 92CA25-278 2007-02-28 TMP92CA25 3.15.3.6 LCD Data Transmission Speed and Data Bus Occupation Rate After setting start register, the LCDC outputs a bus release request to the CPU and reads data from source memory. The LCDC then transmits LCD size data to the external LCD driver through the special LCDC data bus (LD11 to LD0). At this time, the control signals connected to the LCD driver output the specified waveform which is synchronized with the data transmission. After data reading from RAM for display is completed, the LCDC cancels the bus release request and the CPU will restart. During data read from source memory (during DMA operation), the CPU is stopped by the internal BUSREQ signal. When using SR mode LCDC, programmers must monitor CPU performance. The occupation rate of the data bus depends on data size, transmission speed (CPU clock speed) and display RAM type used. Valid Data Reading Time tLRD (ns/Byte) at fSYS = 20 MHz 50 25 12.5 *25 Display RAM External SRAM Internal RAM External SDRAM Bus Width 16 bits 32 bits 32 bits 16 bits Valid Data Reading Time (fSYS Clock/Byte) 2/2 2/4 1/4 *1/2 Note: When using SDRAM for display RAM, overhead time (+ 8 clocks) is required for every 1 row data reading. tSTOP refers to the CPU stoppage time during transmission of 1 row data. tSTOP is calculated by the equation below for each display mode. tSTOP = (SegNum /8) × tLRD SegNum : Number of segment When SDRAM is used, more overhead time is required. tSTOP = (SegNum /8) × tLRD + ((1/fSYS) × 8) Data bus occupation rate equals the percentage of tSTOP time in tLP time. Data bus occupation rate = tSTOP/tLP Note: For tLP time, refer to “refresh rate setting”. 92CA25-279 2007-02-28 TMP92CA25 3.15.3.7 Timing Diagram of LD Bus The TMP92CA25 can select to display RAM for external SRAM: Available to set WAIT, internal SRAM of 10Kbyte and external SRAM: 64, 128, 256 and 512 Mbits. As a 160-bit FIFO buffer is built into this LCDC, the LD bus speed can be controlled. The speed can be selected from 3 kinds of LCP cycle: (fSYS/2, fSYS/4, and fSYS/8) LD bus data: LD7 to LD0 is out at rising edge of LCP, LCD driver receives at falling edge of LCP. Note: If the LCP cycle is too slow it may not transfer correctly. fSYS LCP0 CP 2-clock LD7 to LD0 LCP0 CP 4-clock LD7 to LD0 LCP0 CP 8-clock LD7 to LD0 Figure 3.15.6 Selection of LCP Cycle If LCP cycle is not set at a suitable speed with respect to the refresh rate, LD bus data will not transfer correctly. tLP time is shown in the equation below. tLP [s] = (1/fSYS [Hz]) × 16 × (SCC+1) Data transmission must finish in tLP time. Set SCC clock and LCP0 speed to be less than tLP time. For setting of SCC, refer to “basic clock setting” of “refresh rate setting”. 92CA25-280 2007-02-28 TMP92CA25 3.15.3.8 Example of SR mode LCD driver connection TMP92CA25 VDD T6C13B (240-row driver selection) VDD VSS DIR TEST DI7 to DI0 DUAL SCP S/C VCCL/R, V0L/R, V1L/R, V4L/R, V5L/R O240 DSPOF FR LP EIO2 EIO1 O001 COM001 VSS 240 commons × 240 segments LCD (Monochrome) SEG001 SEG240 T6C13B (240-column driver selection) VSS TEST DUAL VCCLR V0LR,V2LR, VSSLR,V3LR V5LR O240 COM240 LBCD LCP0 LLP LFR Port LD7 to LD0 Open Open SCP LP FR DSPOF DI7 to DI0 EIO1 EIO2 DIR VDD S/C VSS VDD VSS Note: Other circuit is necessary for LCD drive power supply for LCD driver display. Figure 3.15.7 Interface Example for Shift Register Type LCD Driver 92CA25-281 O001 2007-02-28 TMP92CA25 3.15.3.9 Program Example (4 K colors STN) ; LCDC condition ; Panel = 320seg × 240com, ; LD bus = 8bit, 4clock ld ldw fBCD = 70Hz(at fSYS = 20MHz) Display memory = Internal RAM(2000H-) ; PK0-3: LCP0, LLP, LFR, LBCD ; PL0-7: LD0-7 ; ********PORT settings ********* (pkfc),0x0f (plcr),0xffff ; ********LCD settings********* ld ld ld ld ld ld ld set xix,0x00002000 (lsarcl),xix (lcdmode0),0x22 (lcdffp),240 (lcdsize),0x65 (lcdctl0),0x00 (lcdscc),74 0,(lcdctl0) ; ; SCC = fSYS / (fBCD × 16 × FP) ; = 20MHz/ (70 × 16 × 240) = 74.4 ; Start LCDC display ; Internal RAM start address ; Only C-area ; Display memory = Internal RAM, SCP = 4clock, 8bit bus ; 240com × 320seg 92CA25-282 2007-02-28 TMP92CA25 3.15.4 Built-in RAM Type LCD driver Mode Data transmission to the LCD driver is executed by a transmit instruction from the CPU. After setting operation mode of to the control register, when a CPU transmits instruction is executed the LCDC outputs a chip select signal to the LCD driver connected externally by the control pin (LCP0...). Therefore control of data transmission numbers corresponding to LCD size is controlled by CPU instruction. There are 2 kinds of LCD driver address in this case, which are selected by the LCDCTL register. 3.15.4.1 Description of Operation 3.15.4.2 Random Access Type This corresponds to address direct writing type LCD driver when = “1”. The transmission address can also assign the memory area 3C0000H − 3FFFFF, the four areas each being 64 Kbytes. Interface and access timing are the same as for normal memory. Refer to the memory access timing section. Table 3.15.2 Random Access Type Built-in RAM Type LCD driver Address 3C0000H to 3CFFFFH 3D0000H to 3DFFFFH 3E0000H to 3EFFFFH 3F0000H to 3FFFFFH Function Built-in RAM LCD driver 1 Built-in RAM LCD driver 2 Built-in RAM LCD driver 3 Built-in RAM LCD driver 4 Chip Enable Terminal LCP0 LLP LFR LBCD 92CA25-283 2007-02-28 TMP92CA25 3.15.4.3 Sequential Access Type Data transmission to the LCD driver is executed by a transmit instruction from the CPU. After setting operation mode to the control register, when a CPU transmit instruction is executed the LCDC outputs a chip select signal to the LCD driver connected externally by the control pin (LCP0...). Therefore control of data transmission numbers corresponding to LCD size is controlled by CPU instruction . There are 2 kinds of LCD driver address in this case, which are selected by the LCDCTL register. This corresponds to a LCD driver which has each 1 byte of instruction register and display data register in LCD driver when = “0”. Please select the transmission address at this time from 1FE0H to 1FE7H. LCDC0L/LCDC0H/LCDC1L/LCDC1H/LCDC2L/LCDC2H/LCDR0L/LCDR0H Register 7 Bit symbol Read/Write After reset Function D7 6 D6 5 D5 4 D4 3 D3 2 D2 1 D1 0 D0 Depends on external LCDD specification Depends on external LCDD specification Depends on external LCDD specification [Write cycle] T1 System clock: fSYS A23 to A0 TW T2 T1 [Read cycle] TW T2 R/ W LCP0, LLP, LFR, LBCD D7 to D0 Data out Data in WAIT sampling Note 1: Note 2: This waveform is in the case of 3-state access. Rising timing of chip enable signal (e.g LCP0) is different. Figure 3.15.8 Example of Access Timing for Built-in RAM Type LCD Driver (Wait = 0) 92CA25-284 2007-02-28 TMP92CA25 3.15.4.4 Example of Built-in RAM LCD driver connection TMP92CA25 VDD VSS T6B66A (65-row driver) VDD VSS VLC1, VLC2, VLC3, VLC4, VLC5 LE DB0 to DB5 COM065 SEG001 SEG080 VSS VLC2, VLC3, VLC5 T6B65A (80-column driver) COM065 WR COM001 COM001 65 COM × 80 SEG LCD SEG001 R/W CE WR A0 D0 to D7 Open D/I DB0 to DB7 EIO1 EIO2 VDD VDD VSS Note: Other circuit is required for power supply for LCD driver display. Figure 3.15.9 Interface Example for Built-in RAM and Sequential Access Type LCD Driver 92CA25-285 2007-02-28 SEG080 LBCD LCP0 TMP92CA25 3.15.4.5 Program Example • Setting example: when using 80 segments × 65 commons LCD driver. Assign external column driver to LCDC1 and row driver to LCDC4. This example uses LD instruction in setting of instruction and micro DMA burst function for soft start in setting of display data. When storing 650-byte transfer data to LCD driver. ; ********Setting for LCDC********* ld ld (lcdmode0), 00h (lcdctl0), 00h ; Select RAM mode ; MMULCD = 0 (Sequential access mode) ; ********Setting for mode of LCDC0/LCDR0********* ld ld (lcdc1l), xx (lcdc4l), xx ; Setting instruction for LCDC1 ; Setting instruction for LCDC4 ; ********Setting for micro DMA and INTTC (ch0)********* ld ldc ld ldc ld ldc ld ldc ld ei ld ld a, 08h dmam0, a wa, 650 dmac0, wa xwa, 002000h dmas0, xwa xwa, 1fe1h dmad0, xwa (intetc01), 06H 6 (dmab), 01h (dmar), 01h ; Source address INC mode ; ; Count = 650 ; ; Source address = 002000H ; ; Destination address = 1FE1H (LCDC0H) ; ; INTTC0 level = 6 ; ; Burst mode ; Soft start 92CA25-286 2007-02-28 TMP92CA25 3.16 Melody/Alarm Generator (MLD) The TMP92CA25 contains a melody function and alarm function, both of which are output from the MLDALM pin. Five kinds of fixed cycle interrupt are generated using a 15-bit counter for use as the alarm generator. The features are as follows. 1) Melody generator The Melody function generates signals of any frequency (4 Hz to 5461 Hz) based on a low-speed clock (32.768 kHz), and outputs the signals from the MLDALM pin. The melody tone can easily be heard by connecting an external loudspeaker. 2) Alarm generator The alarm function generates eight kinds of alarm waveform having a modulation frequency (4096 Hz) determined by the low-speed clock (32.768 kHz). This waveform can be inverted by setting a value to a register. The alarm tone can easily be heard by connecting an external loudspeaker. Five kinds of fixed cycle interrupts are generated (1 Hz, 2 Hz, 64 Hz, 512 Hz, and 8192 Hz) by using a counter which is used for the alarm generator. This section is constituted as follows. 3.16.1 3.16.2 Block Diagram Control Registers 3.16.3 Operational description 3.16.3.1 Melody Generator 3.16.3.2 Alarm Generator 92CA25-287 2007-02-28 TMP92CA25 3.16.1 Block Diagram [Melody Generator] Internal data bus Reset MELFH, MELFL register MELOUT MELFH Stop and clear Clear Low-speed clock 12-bit counter (UC0) Invert Comparator (CP0) F/F INTALM0 (8192 Hz) INTALM1 (512 Hz) Edge detector INTALM2 (64 Hz) INTALM3 (2 Hz) INTALM4 (1 Hz) 15-bit counter (UC1) 4096 Hz MELALMC 8-bit counter (UC2) ALMINT INTALMH (HALT release) MELOUT Alarm wave form generator Selector Invert ALMOUT MELALMC MELALMC MLDALM pin ALM register [Alarm Generator] Internal data bus Reset Figure 3.16.1 MLD Block Diagram 92CA25-288 2007-02-28 TMP92CA25 3.16.2 Control Registers ALM Register 7 ALM (1330H) Bit symbol Read/Write After reset Function 0 0 0 0 AL8 6 AL7 5 AL6 4 AL5 R/W 3 AL4 0 2 AL3 0 1 AL2 0 0 AL1 0 Setting alarm pattern MELALMC Register 7 MELALMC Bit symbol (1331H) Read/Write After reset Function FC1 0 00: Hold 01: Restart 10: Clear 11: Clear and start Note 1: Note 2: MELALMC is always read “0”. When setting MELALMC register except while the free-run counter is running, is kept “01”. 6 FC0 0 5 ALMINV 0 Alarm waveform invert 1: Invert 4 − R/W 0 3 − 0 2 − 0 1 − 0 0 MELALM 0 Output waveform select 0: Alarm 1: Melody Free-run counter control Always write “0” MELFL Register 7 MELFL (1332H) Bit symbol Read/Write After reset Function 0 0 0 0 ML7 6 ML6 5 ML5 4 ML4 R/W 3 ML3 0 2 ML2 0 1 ML1 0 0 ML0 0 Setting melody frequency (Lower 8 bits) MELFH Register 7 MELFH (1333H) Bit symbol Read/Write After reset Function MELON R/W 0 Control melody counter 0: Stop and clear 1: Start Setting melody frequency (Upper 4 bits) 0 0 6 5 4 3 ML11 2 ML10 R/W 1 ML9 0 0 ML8 0 ALMINT Register 7 ALMINT (1334H) Bit symbol Read/Write After reset Function 0 Always write “0” 0 0 6 5 − 4 IALM4E 3 IALM3E R/W 2 IALM2E 0 1 IALM1E 0 0 IALM0E 0 1: Interrupt enable for INTALM4 to INTALM0 92CA25-289 2007-02-28 TMP92CA25 3.16.3 Operational description The Melody function generates signals of any frequency (4 Hz to 5461 Hz) based on a low-speed clock (32.768 kHz) and outputs the signals from the MLDALM pin. The melody tone can easily be heard by connecting an external loud speaker. (Operation) MELALMC must first be set as 1 in order to select the melody waveform to be output from MLDALM. The melody output frequency must then be set to 12-bit registers MELFH and MELFL. The following are examples of settings and calculations of melody output frequency. (Formula for calculating melody waveform frequency) at fs = 32.768 [kHz] Melody output waveform Setting value for melody fMLD [Hz] = 32768/(2 × N + 4) N = (16384/ fMLD) − 2 3.16.3.1 Melody Generator (Note: N = 1 to 4095 (001H to FFFH), 0 is not acceptable.) (Example program) When outputting an “A” musical note (440 Hz) LD LD LD (MELALMC), − − X X X X X 1 B (MELFL), 23H (MELFH), 80H ; Select melody waveform ; N = 16384/440 − 2 = 35.2 = 023H ; Start to generate waveform Reference) Basic musical scale setting table Scale Frequency [Hz] C D E F G A B C 264 297 330 352 396 440 495 528 Register Value: N 03CH 035H 030H 02DH 027H 023H 01FH 01DH 92CA25-290 2007-02-28 TMP92CA25 3.16.3.2 Alarm Generator The alarm function generates eight kinds of alarm waveform having a modulation frequency of 4096 Hz determined by the low-speed clock (32.768 kHz). This waveform is reversible by setting a value to a register. The alarm tone can easily be heard by connecting an external loud speaker . Five kinds of fixed cycle (interrupts can be generated 1 Hz, 2 Hz, 64 Hz, 512 Hz, 8 192 Hz) by using a counter which is used for the alarm generator. (Operation) MELALMC must first be set as 0 in order to select the alarm waveform to be output from MLDALMC. The “10” must be set on the MELALMC register, and clear internal counter. Finally the alarm pattern must then be set on the 8-bit register of ALM. If it is inverted output-data, set as invert. The following are examples of program, setting value of alarm pattern and waveform of each setting value. (Setting value of alarm pattern) Setting Value for ALM Register 00H 01H 02H 04H 08H 10H 20H 40H 80H Others Alarm Waveform Write “0” AL1 pattern AL2 pattern AL3 pattern AL4 pattern AL5 pattern AL6 pattern AL7 pattern AL8 pattern Undefined (Do not set) (Example program) When outputting AL2 pattern (31.25 ms/8 times/1 s) LD LD (MELALMC), C0H (ALM), 02H ; Set output alarm waveform ; Free-run counter start ; Set AL2 pattern, start 92CA25-291 2007-02-28 TMP92CA25 Example: Waveform of alarm pattern for each setting value (Not inverted) AL1 pattern (Continuous output) 1 AL2 pattern (8 times/1 s) 31.25 ms 1 AL3 pattern (Once) 500 ms 1 AL4 pattern (Twice/1 s) 62.5 ms 1 AL5 pattern (3 times/1 s) 62.5 ms 1 2 3 2 2 Modulation frequency (4096 Hz) 8 1 1s 1 1s 1 1s AL6 pattern (Once) 62.5 ms AL7 pattern (Twice) 1 2 62.5 ms AL8 pattern (Once) 250 ms 92CA25-292 2007-02-28 TMP92CA25 3.17 SDRAM Controller (SDRAMC) The TMP92CA25 includes an SDRAM controller which supports SDRAM access by CPU/LCDC. The features are as follows. (1) Support SDRAM Data rate type: Bulk of memory: Number of banks: Width of data bus: Read burst length: Write mode: Only SDR (Single data rate) type 16/64/128/256/512 Mbits 2/4 banks 16 1 word/full page Single/burst (2) Initialize function All banks precharge command 8 times auto refresh command Set the mode register command (3) Access mode CPU Access Read burst length Addressing mode CAS latency (clock) Write mode 1 word/full page selectable Sequential 2 Single/burst selectable LCDC Access Full page Sequential 2 − (4) Access cycle CPU Access (Read/write) Read cycle: Write cycle: Access data width: 1 word− 4 states/full page − 1 state Single − 3 states/burst − 1 state 1 byte/ 1 word/ 1 long word LCDC Burst Access (Read only) Read cycle: Full page Over head: Access data width: full page − 1 state 4 states (200 ns at fSYS = 20 MHz) 1 word/ 1 long word (5) Refresh cycle auto generate Auto-refresh is generated while another area is being accessed. Refresh interval is programmable. Self-refresh is supported Note 1: Note 2: Display data for LCDC must be set from the head of each page. Condition of SDRAM’s area set by CS1 setting of memory controller. 92CA25-293 2007-02-28 TMP92CA25 3.17.1 Control Registers Figure 3.17.1 shows the SDRAMC control registers. Setting these registers controls the operation of SDRAMC. SDRAM Access Control Register 1 7 SDACR1 (0250H) Bit symbol Read/Write After reset Function 0 Always write “0” 0 Always write “0” 0 Mode register set delay time 0: 1 clock 1: 2 clocks 0 Write recover time 0: 1 clock 1: 2 clocks − 6 − 5 SMRD 4 SWRC R/W 3 SBST 0 Burst stop command 0: Precharge all 1: Burst stop 2 SBL1 1 1 SBL0 0 0 SMAC 0 SDRAM controller 0: Disable 1: Enable Selecting burst length (Note 1) 00: Reserved 01: Full-page read, burst write 10: 1-word read, single write 11: Full-page read, single write Note 1: Issue mode register set command after changing . Exercise care in settings when changing from “full-page read” to “1-word read”. Please refer to “Limitations arising when using SDRAM”. SDRAM Access Control Register 2 7 SDACR2 (0251H) Bit symbol Read/Write After reset Function 0 Number of banks 0: 2 banks 1: 4 banks 0 6 5 4 SBS 3 SDRS1 2 SDRS0 R/W 0 1 SMUXW1 0 Selecting address multiplex type 00: TypeA (A9-) 01: TypeB (A10-) 10: TypeC (A11-) 11: Reserved 0 SMUXW0 0 Selecting ROW address size 00: 2048 rows (11 bits) 01: 4096 rows (12 bits) 10: 8192 rows (13 bits) 11: Reserved SDRAM Refresh Control Register 7 SDRCR (0252H) Bit symbol Read/Write After reset Function − R/W 0 Always write “0” 1 SR Auto Exit function 0: Disable 1: Enable 0 Refresh interval 000: 47 states 001: 78 states 010: 97 states 011: 124 states 100: 156 states 101: 195 states 110: 249 states 111: 312 states 6 5 4 SSAE 3 SRS2 2 SRS1 R/W 0 1 SRS0 0 0 SRC 0 Auto refresh 0: Disable 1: Enable 92CA25-294 2007-02-28 TMP92CA25 SDRAM Command Register 7 SDCMM (0253H) Bit symbol Read/Write After reset Function 0 Command issue (Note 1) (Note 2) 000: Not execute 001: Initialization sequence a. Precharge All command b. Eight Auto Refresh commands c. Mode Register Set command 100: Mode Register Set command 101: Self Refresh Entry command 110: Self Refresh Exit command Others: Reserved Note 1: is automatically cleared to “000” after the specified command is issued. Before writing the next command, make sure that is “000”. In the case of the Self Refresh Entry command, however, is not cleared to “000” by execution of this command. Thus, this register can be used as a flag for checking whether or not Self Refresh is being performed. Note 2: The Self Refresh Exit command can only be specified while Self Refresh is being performed. 6 5 4 3 2 SCMM2 1 SCMM1 R/W 0 0 SCMM0 0 Figure 3.17.1 SDRAM Control Registers 92CA25-295 2007-02-28 TMP92CA25 3.17.2 Operation Description (1) Memory access control SDRAM controller is enabled when SDACR1 = 1. And then SDRAM control signals ( SDCS , SDRAS , SDCAS , SDWE , SDLLDQM, SDLUDQM, SDCLK and SDCKE) are operating during the time CPU or LCDC accesses CS1 area. 1. Address multiplex function In the access cycle, outputs row/column address through A0 to A15 pin. And multiplex width is decided by setting SDACR2 of use memory size. The relation between multiplex width and Row/Column address is shown in Table 3.17.1 Address Multiplex. Table 3.17.1 Address Multiplex Address of SDRAM Accessing Cycle TMP92CA25 Pin Name A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 Row Address Column Address TypeA TypeB TypeC 16-Bit Data Bus Width 32-Bit Data Bus Width “00” “01” “10” B1CSH = “01” B1CSH = “10” A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23 EA24 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23 EA24 EA25 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23 EA24 EA25 EA26 Row address A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 AP * A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 AP * * AP: Auto Precharge Burst length of SDRAM read/write by CPU can be select by setting SDACR1. Burst length of accessing by LCDC is fixed to operation contents. SDRAM access cycle is shown in Figure 3.17.2 and Figure 3.17.3. SDRAM access cycle number does not depend on the settings of B1CSL register. In the full page burst read cycle, a mode register set cycle and a precharge cycle are automatically inserted at the beginning and end of a cycle. (2) Instruction executing on SDRAM The CPU can execute instructions on SDRAM. However, the following functions do not operate. a) b) Executing HALT instruction Execute instructions that write to SDCMM register These operations must be executed by another memory such as the built-in RAM. 92CA25-296 2007-02-28 TMP92CA25 85 states (320-byte read) SDCLK SDCKE SDLUDQM SDLLDQM SDCS SDRAS SDCAS SDWE A10 A15 to A0 D15 to D0 RA RA CA (n) CA (n + 2) CA (n + 4) CA (n + 6) D (n) D (n + 2) D (n + 4) (n + 316) D (n + 6) (n + 318) D (n + 316) D (n + 318) Bank active Read All banks precharge Figure 3.17.2 Timing of Burst Read Cycle 3 states SDCLK SDCKE SDLUDQM SDLLDQM SDCS SDRAS SDCAS SDWE A10 A15 to A0 D15 to D0 RA RA OUT Bank active Write with precharge Internal precharge CA CA Figure 3.17.3 Timing of CPU Write Cycle (Structure of Data Bus: 16 bits × 1, operand Size: 2 bytes, address: 2n + 0) 92CA25-297 2007-02-28 TMP92CA25 (3) Refresh control This LSI supports two refresh commands: auto-refresh and self-refresh. (a) Auto-refresh The auto-refresh command is automatically generated at intervals set by SDRCR by setting SDRCR to “1”. The generation interval can be set from between 47 to 312 states (2.4 μs to 15.6 μs at fSYS = 20 MHz). CPU operation (instruction fetch and execution) stops while performing the auto-refresh command. The auto-refresh cycle is shown in Figure 3.17.4 and the auto-refresh generation interval is shown in Table 3.17.2. The Auto-Refresh function cannot be used in IDLE1 and STOP modes. In these modes, use the SelfRefresh function to be explained next. Note: A system reset disables the Auto-Refresh function. 2 states SDCLK SDCKE SDLUDQM SDLLDQM SDCS SDRAS SDCAS SDWE Auto refresh Figure 3.17.4 Timing of Auto-Refresh Cycle Table 3.17.2 Refresh Cycle Insertion Interval SDRCR SRS2 0 0 0 0 1 1 1 1 (Unit: μs) SRS1 0 0 1 1 0 0 1 1 SRS0 0 1 0 1 0 1 0 1 Insertion Interval (State) 47 78 97 124 156 195 249 312 fSYS Frequency (System clock) 6 MHz 7.8 13.0 16.2 20.7 26.0 32.5 41.5 52.0 10 MHz 12.5 MHz 15 MHz 17.5 MHz 20 MHz 4.7 7.8 9.7 12.4 15.6 19.5 24.9 31.2 3.8 6.2 7.8 9.9 12.5 15.6 19.9 25.0 3.1 5.2 6.5 8.3 10.4 13.0 16.6 20.8 2.7 4.5 5.5 7.1 8.9 11.1 14.2 17.8 2.4 3.9 4.9 6.2 7.8 9.8 12.4 15.6 92CA25-298 2007-02-28 TMP92CA25 (b) Self-refresh The self-refresh ENTRY command is generated by setting SDCMM to “101”. The self-refresh cycle is shown in Figure 3.17.5. During self-refresh Entry, refresh is performed within the SDRAM (an auto-refresh command is not needed). Note 1: When standby mode is released by a system reset, the I/O registers are initialized and the Self Refresh state is exited. Note that the Auto Refresh function is also disabled at this time. Note 2: The SDRAM cannot be accessed while it is in the Self Refresh state. Note 3: To execute the HALT instruction after the Self Refresh Entry command, insert at least 10 bytes of NOP or other instructions between the instruction to set SDCMM to “101” and the HALT instruction. SDCLK SDCKE SDLUDQM SDLLDQM SDCS SDRAS SDCAS SDWE Self refresh Entry Self refresh Exit Auto refresh Figure 3.17.5 Timing of Self-Refresh Cycle 92CA25-299 2007-02-28 TMP92CA25 Self-Refresh condition is released by executing Serf-Refresh command. Way to execute Self-Refresh EXIT command is 2 ways: write “110” to SDCMM, or execute EXIT automatically by synchronizing to releasing HALT condition. Both ways, after it executes Auto-Refresh at once just after Self-Refresh EXIT, it executes Auto-Refresh at setting condition. When it became EXIT by writing “110” to , is cleared to “000”. EXIT command that synchronize to release HALT condition can be prohibited by setting SDRCR to “0”. If don’t set to EXIT automatically, set to prohibit. If using condition of SDRAM is satisfied by operation clock frequency (clock gear down, SLOW mode condition and so on) is falling, set to prohibit. Figure 3.17.6 shows execution flow in this case. Gear-down or Change to Low clock fSYS 20MHz | | 32KHz CPU Auto Exit enable SR EXIT Change CLK HALT Gear-up or Change to High clock Interrupt Change CLK SR EXIT Auto Exit enable HALT condition SDRAM controller internal condition Auto Exit enable Auto Exit disable Auto Exit enable SDRAM condition AR condition SR condition AR condition Figure 3.17.6 Execution flow example (Execute HALT instruction at low-speed clock). 92CA25-300 2007-02-28 TMP92CA25 ; ********Sample program ********* LOOP1: LDB ANDB J A, (SDCMM) A, 00000111B NZ, LOOP1 ; ; ; Check the command register clear LDW NOP×10 LD HALT NOP (SDRCR), 0000010100000011B ; ; Auto Exit disable→ Self-refresh Entry Wait for execution of self-refresh entry fs Self-refresh Exit (Internal signal only) (SYSCR1), 00001---B ; ; LD LD LD (SYSCR1), 00000---B (SDCMM), 00000110B (SDRCR), 0001---1B ; ; ; fc Self-refresh Exit (command) Auto Exit enable 92CA25-301 2007-02-28 TMP92CA25 (4) SDRAM initialize This LSI can generate the following SDRAM initialize routine after introduction of power supply to SDRAM. The command is shown in Figure 3.17.7. 1. Precharge all command 2. Eight Auto Refresh commands 3. Mode Register set command The above commands are issued by setting SDCMM to “001”. While these commands are issued, the CPU operation (an instruction fetch, command execution) is halted. Before executing the initialization sequence, appropriate port settings must be made to enable the SDRAM control signals and address signals (A0 to A15). After the initialization sequence is completed, SDCMM is automatically cleared to “000”. 8 times refresh cycle SDCLK SDCKE SDLUDQM SDLLDQM SDCS SDRAS SDCAS SDWE A10 A15 to A0 627 227 Precharge Auto all banks refresh Auto refresh Auto refresh Auto refresh Auto refresh Set mode register Figure 3.17.7 Timing of Initialization command 92CA25-302 2007-02-28 TMP92CA25 (5) Connection example Figure 3.17.8 shows an example of connections between the TMP92CA25 and SDRAM Table 3.17.3 Connection with SDRAM TMP92CA25 Pin Name SDRAM Pin Name Data Bus Width: 16 Bits 16 M 64 M 128 M 256 M 512 M A0 A0 A0 A0 A0 A0 A1 A1 A1 A1 A1 A1 A2 A2 A2 A2 A2 A2 A3 A3 A3 A3 A3 A3 A4 A4 A4 A4 A4 A4 A5 A5 A5 A5 A5 A5 A6 A6 A6 A6 A6 A6 A7 A7 A7 A7 A7 A7 A8 A8 A8 A8 A8 A8 A9 A9 A9 A9 A9 A9 A10 A10 A10 A10 A10 A10 A11 BS A11 A11 A11 A11 A12 − BS0 BS0 A12 A12 A13 − BS1 BS1 BS0 BS0 A14 − − − BS1 BS1 A15 − − − − − CS CS CS CS CS SDCS SDLUDQM UDQM UDQM UDQM UDQM UDQM SDLLDQM LDQM LDQM LDQM LDQM LDQM RAS RAS RAS RAS RAS SDRAS CAS CAS CAS CAS CAS SDCAS SDWE WE WE WE WE WE SDCKE CKE CKE CKE CKE CKE SDCLK CLK CLK CLK CLK CLK SDACR 00: 00: 01: 01: 10: TypeA TypeA TypeB TypeB TypeC (An): Row address : Command address pin of SDRAM TMP92CA25 SDCLK SDCKE A13 to A12 A11 to A0 D15 to D0 SDRAS SDCAS SDWE SDCS CLK CKE BS1 to BS0 A11 to A0 D15 to D0 RAS CAS WE CS SDLUDQM SDLLDQM UDQM LDQM 1 M word × 4 Banks × 16 bits Figure 3.17.8 Connection with SDRAM (4 M word × 16 bits) 92CA25-303 2007-02-28 TMP92CA25 3.17.3 Limitations arising when using SDRAM Take care to note the following points when using SDRAMC. 1. WAIT access When using SDRAM, some limitation is added when accessing memory other than SDRAM. In WAIT-pin input setting of the Memory Controller, if the setting time is inserted as an external WAIT, set a time less than the Auto-Refresh cycle × 8190 (Auto- Refresh function controlled by SDRAM controller). Execution of SDRAM command before HALT instruction (SR (Self refresh)-Entry, Initialize, Mode-set) When a SDRAM controller command (SR-Entry, Initialize and Mode-set) is issued, several states are required for execution time after the SDCMM register is set. Therefore, when a HALT instruction is executed after the SDRAM command, please insert a NOP of more than 10 bytes or 10 other instructions before executing the HALT instruction. AR (Auto-Refresh) interval time When using SDRAM, set the system clock frequency to satisfy the minimum operation frequency for the SDRAM and minimum refresh cycle. In a system in which SDRAM is used and the clock is geared up and down exercise care in AR cycle for SDRAM. Note when changing access mode 2. 3. 4. If changing access mode from “full page read” to “1 word read”, execute the following program. This program must not be executed on the SDRAM. di ld ld ld ei a,(optional external memory address) (sdacr1),00001101b (sdcmm),0x04 ; Interrupt Disable (Added) ; Dummy read instruction (Added) ; Change to “1-word read” ; Execute MRS (mode register setting) ; Interrupt enable (Added) 92CA25-304 2007-02-28 TMP92CA25 3.18 NAND-Flash Controller 3.18.1 Characteristics The NAND-Flash controller (NDFC) is provided with dedicated pins for connecting with NAND-Flash memory. The NDFC also has an ECC calculation function for error correction. Although the NDFC has two channels (channel 0, channel 1), all pins except for Chip Enable are shared between the two channels. These signals are controlled by NDCR. Only the operation of channel 0 is explained here. The NDFC has the following features: 1) Controlled NAND-Flash interface by setting registers. 2) ECC calculating circuits. (for SCL-type) Note 1: The WP (Write Protect) pin of NAND Flash is not supported. If this function is needed, prepare it on an external circuit. Note 2: The two channels cannot be accessed simultaneously. It is necessary to switch between the two channels. 92CA25-305 2007-02-28 TMP92CA25 3.18.2 Block Diagram NAND-Flash Controller Channel 0 (NDFC0) Internal bus bus I/F Registers Register address ND_CE* ND_ALE ND_CLE ND_RE* Host I/F timing control NAND-Flash I/F timing control ND_WE* ND_RB* A B S NDCLE, NDALE, NDRE , NDWE , D7 to D0 ND0CE DATA_OUT [7:0] DATA_IN [7:0] D7 to D0, NDR/ B NAND-Flash Controller Channel 1 (NDFC1) ND1CE (Same as NDFC0 ) NDCR register D Q Figure 3.18.1 NAND-Flash Controller Block Diagram 92CA25-306 2007-02-28 TMP92CA25 3.18.3 Operation Description The NDFC accesses data on NAND Flash memory indirectly through its internal registers. It also contains the ECC calculating circuits. Please see 3.18.3.2 for details of the ECC. This section explains the operations for accessing the NAND Flash. Basically, set the command in ND0FMCR and then read or write to ND0FDTR. The read cycle for ND0FDTR is completed after the external read cycle for the NAND-Flash is finished. Likewise, the write cycle for ND0FDTR is completed after the external write cycle for the NAND-Flash is finished. 1) Initialize The initialize sequence is as follows. (1) ND0FSPR: Set the low pulse width. (2) ND0FIMR: Set 0x81 if interrupt is required. (Release interrupt mask) 2) Write The write sequence is as follows. (1) ND0FMCR: (2) Write 512 bytes ND0FMCR: ND0FDTR: ND0FMCR: ND0FDTR: ND0FMCR: ND0FDTR: (3) Read ECC data ND0FMCR: NDECCRD: First data: Second data: Third data: Fourth data: Fifth data: Sixth data: Set 0xDC for the ECC data read mode. Read 6 bytes ECC data. LPR [7:0] LPR [15:8] CPR [5:0], 2’b11 LPR [23:16] LPR [31:24] CPR [11:6], 2’b11 Set 0x9D for NDCLE signal enable and command mode. Set 0x80 for the serial data input command. Set 0x9E for NDALE signal enable and address mode. Write address. Set A [7:0], A [16:9], and A [24:17]. If it is required, set A [25]. Set 0xBC for the data mode. Write 512 bytes data. Set 0x7C for ECC data reset. 3.18.3.1 Accessing NAND-Flash Memory 92CA25-307 2007-02-28 TMP92CA25 (4) Write 16-byte redundant data ND0FMCR: ND0FDTR: D520: D521: D522: D525: D526: D527: (5) Run page program ND0FMCR: ND0FDTR: ND0FMCR: Set 0x9D for NDCLE signal enable and command mode. Set 0x10 for the page program command. Set 0x1C for NDALE signal disable. Set 0x9C for the data mode without ECC calculation. Write 16-byte redundant data. LPR [23:16] LPR [31:24] CPR [11:6], 2’b11 LPR [7:0] LPR [15:8] CPR [5:0], 2’b11 Wait several states (e.g., “NOP” × 10) ND0FSR: (6) Read status ND0FMCR: ND0FDTR: ND0FMCR: ND0FDTR: Set 0x1D for NDCLE signal and command mode. Set 0x70 for Status read command. Set 0x1C for NDCLE signal disable. Read the Status data from the NAND-Flash. Check BUSY flag. If it is 0, go to the next. If it is 1, wait until it becomes 0. (7) Repeat 1 to 6 for all other pages if required. 92CA25-308 2007-02-28 TMP92CA25 3) Read The read sequence is as follows. (1) ND0FMCR: (2) Read 512 bytes ND0FMCR: ND0FDTR: ND0FMCR: ND0FDTR: ND0FMCR: Set 0x1D for NDCLE signal enable and command mode. Set 0x00 for the read command. Set 0x1E for NDALE signal enable and address mode. Set A [7:0], A [16:9], and A [24:17]. If it is required, set A [25]. Set 0x1C for NDALE signal disable. Set 0x7C for ECC data reset. Wait several states (e.g., “NOP” × 10) ND0FSR: ND0FMCR: ND0FDTR: ND0FMCR: ND0FDTR: (3) Read ECC data ND0FMCR: NDECCRD: First data: Second data: Third data: Fourth data: Fifth data: Sixth data: (4) Software routine: Compare ECC data and redundant data, run the error routine if error is generated. (5) Read other pages ND0FMCR: ND0FSR: Set 0x1C. Check BUSY flag. If it is 0, go to the next. If it is 1, wait until it becomes 0. Set 0x5C for the ECC data read mode. Read 6-byte ECC data. LPR [7:0] LPR [15:8] CPR [5:0], 2’b11 LPR [23:16] LPR [31:24] CPR [11:6], 2’b11 Check BUSY flag. If it is 0, go to the next. If it is 1, wait until it becomes 0. Set 0x3C for the data mode with ECC calculation. Read 512-byte data. Set 0x1C for the data mode without ECC calculation. Read 16-byte redundant data. 92CA25-309 2007-02-28 TMP92CA25 4) ID read The ID read sequence is as follows. (1) ND0FMCR: (2) ND0FDTR: (3) ND0FMCR: (4) ND0FDTR: (5) ND0FMCR: (6) ND0FDTR: (7) ND0FDTR: Set 0x1D for NDCLE signal enable and command mode. Set 0x90 for the ID Read command. Set 0x1E for NDALE signal enable and the address mode. Set 0x00. Set 0x1C for the data mode without ECC calculation. Read Maker code. Read Device code. 3.18.3.2 ECC Control The NDFC contains the ECC calculating circuits. The circuits are controlled by ND0FMCR. This circuit executes ECC data calculation. However, ECC comparison and error correction is not executed. This must be executed using software. The calculated ECC data can be read from the NDECCRD register when ND0FMCR is 0xD0 (write mode) or 0x50 (read mode). This is 6-byte data, and six NDECCRD read operations are required. The order of the data is as follows. First data: Second data: Third data: Fourth data: Fifth data: Sixth data: LPR [7:0] LPR [15:8] CPR [5:0], 2’b11 LPR [23:16] LPR [31:24] CPR [11:6], 2’b11 92CA25-310 2007-02-28 TMP92CA25 3.18.4 Registers Table 3.18.1 NAND-Flash Control Registers for Channel 0 Address 1D00H (1D00H to 1EFFH) 1CC4H 1CC8H 1CCCH 1CD0H 1CD4H 1CD8H Register ND0FDTR ND0FMCR ND0FSR ND0FISR ND0FIMR ND0FSPR ND0FRSTR Register Name NAND-Flash data transfer register NAND-Flash ECC-code read register NAND-Flash mode control register NAND-Flash status register NAND-Flash interrupt status register NAND-Flash interrupt mask register NAND-Flash strobe pulse width register NAND-Flash reset register 1CB0H (1CB0H to 1CB5H) ND0ECCRD Table 3.18.2 NAND-Flash Control Registers for Channel 1 Address 1D00H (1D00H to 1EFFH) 1CE4H 1CE8H 1CECH 1CF0H 1CF4H 1CF8H Register ND1FDTR ND1FMCR ND1FSR ND1FISR ND1FIMR ND1FSPR ND1FRSTR Register Name NAND-Flash data transfer register NAND-Flash ECC-code read register NAND-Flash mode control register NAND-Flash status register NAND-Flash interrupt status register NAND-Flash interrupt mask register NAND-Flash strobe pulse width register NAND-Flash reset register 1CB0H (1CB0H to 1CB5H) ND1ECCRD Table 3.18.3 NAND-Flash Control Registers Address 01C0H Register NDCR Register Name NAND-Flash control register 92CA25-311 2007-02-28 TMP92CA25 3.18.4.1 NAND-Flash Data Transfer Register (ND0FDTR and ND1FDTR) 7 DATA R/W − : Type : Default 0 Bit (s) 7:0 Mnemonic DATA Field Name DATA Description NAND-Flash data. Read: Read the data that was read from the NAND-Flash. Write: Write data to the NAND-Flash. Note 1: This register has a 512-address window from 1D00H to 1EFFH since a NAND-Flash page size is either 256 or 512 bytes. When the CPU reads from or writes to the NAND-Flash , and if the block transfer instruction (“LDIR” instruction) is used, the following restriction applies to the 900/H1 CPU. [Restriction for using the block transfer instruction] 1) The source address for “LDIR” instruction should be set to (1F00H – read (or write) byte number) Example 1) In case of 512-byte read ld ld ld ldir ld ld ld ldir Note 2: bc, 512 xix, 2000H xiy, 1D00H (xix + ), (xiy + ) bc, 16 xix, 2000H xiy, 1EF0H (xix + ), (xiy + ) ; 512 bytes ; dst = 2000H ; src = (1F00H − 512) = 1D00H ; Block transfer instruction ; 16 bytes ; dst = 2000H ; src = (1F00H − 16) = 1EF0H ; Block transfer instruction Example 2) In case of 16-byte read Both ND0FDTR and ND1FDTR are assigned to the same address. The NDCR register determines which channel is accessed. Figure 3.18.2 NAND-Flash Data Transfer Register (ND0FDTR and ND1FDTR) 92CA25-312 2007-02-28 TMP92CA25 3.18.4.2 NAND-Flash ECC-code Read Register (ND0ECCRD and ND1ECCRD) 7 ECC-code R − : Type : Default 0 Bit (s) 7:0 Mnemonic ECC-code Note 1: Field Name ECC-code Read calculated ECC data. Description Both ND0ECCRD and ND1ECCRD are assigned to the same address. The NDCR register determines which channel is accessed. Figure 3.18.3 NAND-Flash ECC-code Read Register (ND0ECCRD and ND1ECCRD) 92CA25-313 2007-02-28 TMP92CA25 3.18.4.3 NAND-Flash Mode Control Register (ND0FMCR and ND1FMCR) 7 WE R/W 0 6 5 4 CE R/W 0 3 5 1 0 CLE R/W 0 : Type : Default ECC1 ECC0 R/W 0 R/W 0 PCNT1 PCNT0 ALE R/W 0 R/W 0 R/W 0 Bits 7 Mnemonic WE Field Name Write enable Write enable (Default: 0) Description This bit enables the data write operation. When writing the data to the NAND-Flash, set this bit to “1”. When writing command or address, this bit need not be set to “1”. 0: Disable write operation 1: Enable write operation 6 ECC1 ECC control ECC control (Default: 00) Control the ECC calculating circuits with (bit4) register. 11 (at = X): Reset ECC circuits 00 (at = 1): ECC circuits are disabled. 5 ECC0 01 (at = 1): ECC circuits are enabled. 10 (at = 1): Read ECC data calculated by NDFC 10 (at = 0): Read ID data 4 CE Chip enable Chip enable (Default: 0) Enable NAND-Flash access. Set “1” to this bit when accessing the NAND-Flash. 0: Disable ( NDCE is High.) 1: Enable ( NDCE is Low.) 3 2 1 PCNT1 PCNT0 ALE Power control Address latch enable Power control (Default: 00) Always write “11” Address latch enable (Default: 0) This bit specifies the value of the NDALE signal. 0: Low 1: High 0 CLE Command latch enable Command latch enable (Default: 0) This bit specifies the value of the NDCLE signal. 0: Low 1: High Figure 3.18.4 NAND-Flash Mode Control Register (ND0FMCR and ND1FMCR) 92CA25-314 2007-02-28 TMP92CA25 3.18.4.4 NAND-Flash Status Register (ND0FSR and ND1FSR) 7 BUSY R − : Type : Default 6 0 Bits 7 Mnemonic BUSY Field Name BUSY BUSY (Default: Undefined) Description This bit shows the status of the NAND-Flash. 0: Ready 1: Busy 6:0 − − Reserved Note: A noise-filter for some states is built into the NDFC, so when the NDR/ B pin changes, a flag is not renewed at the same time. Therefore, insert several delays (e.g., “NOP” instruction × 10) using software before starting this flag check. Read command Address input Delay time Sensing flag NDWE pin NDCLE pin NDALE pin NDR/ B pin flag Figure 3.18.5 NAND-Flash Status Register (ND0FSR and ND1FSR) 92CA25-315 2007-02-28 TMP92CA25 3.18.4.5 NAND-Flash Interrupt Status Register (ND0FISR and ND1FISR) 7 6 5 4 3 2 1 0 RDY : Type : Default Bits 7:1 0 Mnemonic − RDY Field Name − Ready Reserved Ready (Default: 0) Description When NDR/ B signal changes from low (BUSY) to High (READY) and NDFIMR is “1”, this bit is set to “1”. By writing “1”, this bit is cleared to 0. Read: 0: None 1: Change NDR/ B signal from BUSY to READY. Write: 0: No change 1: Clear to “0” Figure 3.18.6 NAND-Flash Interrupt Status Register (ND0FISR and ND1FISR) 3.18.4.6 NAND-Flash Interrupt Mask Register (ND0FIMR and ND1FIMR) 7 INTEN R/W 0 6 4 0 3 2 1 0 MRDY R/W 0 : Type : Default Bits 7 Mnemonic INTEN Field Name Interrupt enable Interrupt enable (Default: 0) Description When and are set “1” and NDFISR becomes “1”, INTNDFC occurs. 0: Disable 1: Enable 6:1 0 − MRDY − Mask RDY interrupt Reserved Mask RDY interrupt (Default: 0) This bit masks the NDFISR. If is “1” and NDR/ B signal changes from Low to High, NDFISR is set to “1”. 0: Disable to set NDFISR 1: Enable to set NDFISR Figure 3.18.7 NAND-Flash Interrupt Mask Register (ND0FIMR and ND1FIMR) 92CA25-316 2007-02-28 TMP92CA25 3.18.4.7 NAND-Flash Strobe Pulse Width Register (ND0FSPR and ND1FSPR) 7 6 5 4 3 2 SPW R/W 0000 : Type : Default 1 0 Bits 7:4 3:0 Mnemonic − SPW Field Name − Strobe pulse width Reserved Strobe pulse width (Default: 0000) Description These bits set the Low pulse width of the NDRE and NDWE signals. The Low pulse width is ((value set to SPW) +1 )× fSYS clock Figure 3.18.8 NAND-Flash Strobe Pulse Width Register (ND0FSPR and ND1FSPR) 92CA25-317 2007-02-28 TMP92CA25 3.18.4.8 NAND-Flash Reset Register (ND0FRSTR and ND1FRSTR) 7 6 5 4 3 2 1 0 RST R/W 0 : Type : Default Bits 7:1 0 Mnemonic − RST Field Name − Reset Reserved Reset (Default: 0) Description By setting this bit, reset the NDFC (except NDCR register). By reset, this bit is automatically cleared to “0”. 0: Don’t care 1: Reset Note: After writing register, several waits are required (about 10 states) before accessing the NDFC. Figure 3.18.9 NAND-Flash Reset Register (ND0FRSTR and ND1FRSTR) 3.18.4.9 NAND-Flash Control Register (NDCR) 7 NDCR (01C0H) Bit symbol Read/Write After reset Function CHSEL R/W 0 0: Channel 0 1: Channel 1 6 5 4 3 2 1 0 92CA25-318 2007-02-28 TMP92CA25 3.18.5 Timing Diagrams 3.18.5.1 Command and Address Cycle ND0FMCR = 0 ND0FMCR = 0 ND0FMCR = 1 ND0FMCR = 1 ND0FMCR = 1 Figure 3.18.10 Command and Address Cycle 92CA25-319 D7 to D0 NDCLE NDALE NDR/B NDWE NDCE NDRE 2007-02-28 TMP92CA25 3.18.5.2 Data Read Cycle Figure 3.18.11 shows a timing chart example for a Data Read cycle from the NAND-Flash at ND0FSPR = 02H. Program memory read (1 wait) FF1238H NAND-Flash read 001D00H Program memory read (1 wait) FF1234H NDCE NDCLE NDRE CS2 A23 to A0 NDWE Figure 3.18.11 Data Read Cycle Example (ND0FSPR = 02H) 92CA25-320 2007-02-28 D15 to D0 SDCLK NDALE NDR/B SRWR RD IN (Program) IN (NAND-Flash) IN (Program) TMP92CA25 3.18.5.3 Data Write Cycle Figure 3.18.12 shows a timing chart example for a Data Write cycle to the NAND-Flash at ND0FSPR = 02H. Program memory read (1 wait) FF1238H NAND-Flash write Program memory read (1 wait) FF1234H NDCE NDRE CS2 A23 to A0 NDWE Figure 3.18.12 Data Write Cycle (ND0FSPR = 02H) 92CA25-321 2007-02-28 D15 to D0 SDCLK NDCLE NDALE NDR/B SRWR RD IN (Program) OUT (NAND-Flash) 001D00H IN (Program) TMP92CA25 3.18.6 Example of NAND-Flash Use TMP92CA25 100 kΩ NDCLE NDALE NDRE NDWE NAND-Flash 0 CLE ALE RE WE NAND-Flash 1 CLE ALE RE WE 2 kΩ NDR/ B D [7:0] ND0CE ND1CE R/B (Open drain) I/O [7:0] CE WP R/B (Open drain) I/O [7:0] CE WP External circuits for write protect Note 1: By reset, both NDRE and NDWE pins become input ports (Port 71 and Port 72) And so require pull-up resistors. Note 2: Use the NAND-Flash memory and board capacitance to set the correct value for the NDR/ B pin pull-up resistor . 2 kΩ is a typical value. Note 3: The NAND-Flash WP (write protect) pin is not supported by the TMP92CA25. It must be provided by an external circuit if required. Figure 3.18.13 Example of NAND-Flash Connection 92CA25-322 2007-02-28 TMP92CA25 3.19 16-Bit Timer/Event Counters (TMRB0) The TMP92CA25 incorporates one multifunctional 16-bit timer/event counter (TMRB0) which has the following operation modes: • • • 16-bit interval timer mode 16-bit event counter mode 16-bit programmable pulse generation (PPG) mode The timer/event counter consists of a 16-bit up counter, two 16-bit timer registers (one of them with a double buffer structure), a 16-bit capture register, two comparators, a capture input controller, a timer flip-flop and a control circuit. The timer/event counter is controlled by an 11-byte control SFR. This chapter includes the following sections: 3.19.1 Block Diagrams 3.19.2 Operation of Each Block 3.19.3 SFRs 3.19.4 Operation in Each Mode (1) 16-bit interval timer mode (2) 16-bit programmable pulse generation (PPG) output mode Table 3.19.1 Pins and SFR of TMRB0 Channel Spec. External pins External clock/capture trigger input pins Timer flip-flop output pins Timer run register Timer mode register Timer flip-flop control register TMRB0 None TB0OUT0 (also used as PC2) TB0RUN (1180H) TB0MOD (1182H) TB0FFCR (1183H) TB0RG0L (1188H) TB0RG0H (1189H) TB0RG1L (118AH) TB0RG1H (118BH) TB0CP0L (118CH) TB0CP0H (118DH) TB0CP1L (118EH) TB0CP1H (118FH) SFR (Address) Timer register Capture register 92CA25-323 2007-02-28 Interrupt output 3.19.1 Internal data bus Internal data bus INTTB00 INTTB01 Prescaler clock: φT0 TB0RUN Capture register 0 TB0CP0H/L Timer flip-flop Timer TB0RUN flip-flop control Slelector Count clock 16-bit up counter (UC10) TB0MOD TB0FF0 Caputure register 1 TB0CP1H/L φT16 TB0MOD 2 4 8 16 32 Run/ clear φT1 φT4 Timer flip-flop output Block Diagrams TA1OUT (from TMRA01) Capture, external interrupt input control TB0OUT0 TB1MOD φT1 φT4 φT16 Figure 3.19.1 Block Diagram of TMRB0 TB0MOD 16-bit comparator (CP10) Match detection 16-bit comparator (CP11) 16-bit timer register TB0RG0H/L 16-bit time register TB0RG1H/L Register buffer 10 Internal data bus Intenal data bus 92CA25-324 Overflow interrupt INTTBOF0 Match detection TB0RUN TMP92CA25 2007-02-28 TMP92CA25 3.19.2 Operation of Each Block (1) Prescaler The 5-bit prescaler generates the source clock for timer 0. The prescaler clock (φT0) is a divided clock (divided by 8) from the fFPH. This prescaler can be started or stopped using TB0RUN. Counting starts when is set to “1”; the prescaler is cleared to 0 and stops operation when is cleared to “0”. Table 3.19.2 Prescaler Clock Resolution System clock selection SYSCR1 1 (fs) Clock gear selection SYSCR1 − 000 (1/1) 001 (1/2) 0 (fc) 010 (1/4) 011 (1/8) 100 (1/16) XXX: Don't care 1/8 Timer counter input clock TMRB prescaler − TB0MOD φT1(1/2) fs/16 fc/16 fc/32 fc/64 fc/128 fc/256 φT4 (1/8) fs/64 fc/64 fc/128 fc/256 fc/512 fc/1024 φT16 (1/32) fs/256 fc/256 fc/512 fc/1024 fc/2048 fc/4096 (2) Up counter (UC10) UC10 is a 16-bit binary counter which counts up pulses input from the clock specified by TB0MOD. Any one of the prescaler internal clocks φT1, φT4 and φT16 can be selected as the input clock. Counting or stopping and clearing of the counter is controlled by TB0RUN. When clearing is enabled, the up counter UC10 will be cleared to “0” each time its value matches the value in the timer register TB0RG1H/L. If clearing is disabled, the counter operates as a free-running counter. Clearing can be enabled or disabled using TB0MOD. A timer overflow interrupt (INTTBOF0) is generated when UC10 overflow occurs. 92CA25-325 2007-02-28 TMP92CA25 (3) Timer registers (TB0RG0H/L and TB0RG1H/L) These 16-bit registers are used to set the interval time. When the value in the up counter UC10 matches the value set in this timer register, the comparator match detect signal will go active. Setting data for both Upper and Lower timer registers is always needed. For example, either using a 2-byte data transfer instruction or using a 1-byte data transfer instruction twice for the lower 8 bits and upper 8 bits in order. The TB0RG0H/L timer register has a double-buffer structure, which is paired with a register buffer. The value set in TB0RUN determines whether the double-buffer structure is enabled or disabled: it is disabled when = “0”, and enabled when = “1”. When the double buffer is enabled, data is transferred from the register buffer to the timer register when the values in the up counter (UC10) and the timer register TB0RG1H/L match. After a reset, TB0RG0H/L and TB0RG1H/L are undefined. If the 16-bit timer is to be used after a reset, data should be written to it beforehand. On a reset is initialized to “0”, disabling the double buffer. To use the double buffer, write data to the timer register, set to 1, then write data to the register buffer as shown below. TB0RG0H/L and the register buffer both have the same memory addresses (001188H and 001189H) allocated to them. If = “0”, the value is written to both the timer register and the register buffer. If = “1”, the value is written to the register buffer only. The addresses of the timer registers are as follows: TMRB0 TB0RG0H/L Upper 8 bits Lower 8 bits (TB0RG0H) (TB0RG0L) 001189H 001188H TB0RG1H/L Upper 8 bits Lower 8 bits (TB0RG1H) (TB0RG1L) 00118BH 00118AH The timer registers are write-only registers and thus cannot be read. 92CA25-326 2007-02-28 TMP92CA25 (4) Capture registers (TB0CP0H/L and TB0CP1H/L) These 16-bit registers are used to latch the values in the up counters. All 16 bits of data in the capture registers should be read. For example, using a 2-byte data load instruction or two 1-byte data load instructions. The least significant byte is read first, followed by the most significant byte. The addresses of the capture registers are as follows: TMRB0 TB0CP0H/L Upper 8 bits Lower 8 bits (TB0CPH) (TB0CP0L) 00118DH 00118CH TB0CP1H/L Upper 8 bits Lower 8 bits (TB0CP1H) (TB0CP1L) 00118FH 00118EH The capture registers are read-only registers and thus cannot be written to. (5) Capture input control This circuit controls the timing to latch the value of the up counter UC10 into TB0CP0H/L and TB0CP1H/L. The value in the up counter can be loaded into a capture register by software. Whenever “0” is programmed to TB0MOD, the current value in the up counter is loaded into capture register TB0CP0H/L. It is necessary to keep the prescaler in run mode (i.e., TB0RUN must be held at a value of 1). (6) Comparators (CP10 and CP11) CP10 and CP11 are 16-bit comparators which compare the value in the up counter UC10 with the value set in TB0RG0H/L or TB0RG1H/L respectively, in order to detect a match. If a match is detected, the comparator generates an interrupt (INTTB00 or INTTB01 respectively). (7) Timer flip-flops (TB0FF0) These flip-flops are inverted by the match detect signals from the comparators and the latch signals to the capture registers. Inversion can be enabled and disabled for each element using TB0FFCR. After a reset the value of TB0FF0 is undefined. If “00” is programmed to TB0FFCR , TB0FF0 will be inverted. If “01” is programmed to the capture registers, the value of TB0FF0 will be set to “1”. If “10” is programmed to the capture registers, the value of TB0FF0 will be cleared to “0”. The values of TB0FF0 can be output via the timer output pin TB0OUT0 (which is shared with PC6). Timer output should be specified using the port B function register. 92CA25-327 2007-02-28 TMP92CA25 3.19.3 SFRs TMRB0 Run Register 7 TB0RUN (1180H) Bit symbol Read/Write After reset Function 0 Double buffer 0: Disable 1: Enable TB0RDE R/W 0 Always write “0” 0 IDLE2 0: Stop 1: Operate 6 − 5 4 3 I2TB0 R/W 2 TB0PRUN 0 TMRB0 Prescaler 0: Stop and clear 1: Run (Count up) 1 0 TB0RUN R/W 0 Up counter UC10 Count operation 0 1 Stop and clear Count Note: 1, 4 and 5 of TB0RUN are read as undefined values. Figure 3.19.2 The Registers for TMRB 92CA25-328 2007-02-28 TMP92CA25 TMRB0 Mode Register 7 TB0MOD (1182H) Read-modify -write instruction is prohibited. Bit symbol Read/Write After reset Function 0 Always write “0” − R/W 0 6 − 5 TB0CP0I W* 1 Execute software capture 4 TB0CPM1 0 Capture timing 00: Disable 01: Reserved 3 TB0CPM0 0 2 TB0CLE R/W 0 Control up counter 0: Disable clearing 1: Enable clearing 1 TB0CLK1 0 00: Reserved 01: φT1 10: φT4 11: φT16 0 TB0CLK0 0 TMRB0 source clock 0: Software 10: Reserved capture 11: TA1OUT↑ 1: TA1OUT↓ Undefined TMRB0 source clock 00 01 10 11 Reserved φT1 φT4 φT16 Up counter clear control 0 1 Disable Enable clearing on match with TB0RG1H/L Capture/interrupt timing 00 01 10 11 Disable Reserved Reserved Capture to TB0CP0H/L at rising edge of TA1OUT Capture to TB0CP1H/L at falling edge of TA1OUT Software capture 0 1 The value in the up counter is captured to TB0CP0H/L. Undefined Figure 3.19.3 The Registers for TMRB0 92CA25-329 2007-02-28 TMP92CA25 TMRB0 Flip-Flop Control Register 7 TB0FFCR (1183H) Bit symbol Read/Write After reset Function Read-modify -write instruction is prohibited. 1 − W* 1 0 0: Disable trigger 1: Enable trigger Invert when the UC value is loaded into TB0CP1H/L. Invert when the UC value is loaded into TB0CP0H/L. Invert when the UC value matches the value in TB0RG1H/L. Invert when the UC value matches the value in TB0RG0H/L. 6 − 5 TB0C1T1 4 TB0C0T1 0 R/W 3 TB0E1T1 0 2 TB0E0T1 0 1 TB0FF0C1 1 Control TB0FF0 00: Invert 01: Set 10: Clear 11: Don’t care W* 0 TB0FF0C0 1 Always write “11”. TB0FF0 inversion trigger * Always read as 11. Timer flip-flop control (TB0FF0) 00 01 10 11 Invert Set to 1 Clear to 0 Don’t care Inverted when the UC10 value matches the value in TB0RG0H/L. 0 1 Disable trigger Enable trigger Inverted when the UC10 value matches the value in TB0RG1H/L. 0 1 Disable trigger Enable trigger Inverted when the UC10 value is loaded into TB0CP0. 0 1 Disable trigger Enable trigger Inverted when the UC10 value is loaded into TB0CP1H/L. 0 1 Disable trigger Enable trigger Figure 3.19.4 The Registers for TMRB 92CA25-330 2007-02-28 TMP92CA25 TMRB0 register 7 TB0RG0L (1188H) bit Symbol Read/Write After reset TB0RG0H (1189H) bit Symbol Read/Write After reset TB0RG1L (118AH) bit Symbol Read/Write After reset TB0RG1H (118BH) bit Symbol Read/Write After reset TB0CP0L (118CH) bit Symbol Read/Write After reset TB0CP0H (118DH) bit Symbol Read/Write After reset TB0CP1L (118EH) bit Symbol Read/Write After reset TB0CP1H (118FH) bit Symbol Read/Write After reset 6 5 4 - W Undefined - W Undefined - W Undefined - W Undefined - W Undefined - W Undefined - W Undefined - W Undefined 3 2 1 0 Note: All registers are prohibited to execute read-modify-write instruction. Figure 3.19.5 The Registers for TMRB 92CA25-331 2007-02-28 TMP92CA25 3.19.4 Operation in Each Mode (1) 16-bit interval timer mode Generating interrupts at fixed intervals. In this example, the interrupt INTTB01 is set to be generated at fixed intervals. The interval time is set in the timer register TB0RG1H/L. 7 TB0RUN INTETB01 TB0FFCR TB0MOD TB0RG1 TB0RUN ← 0 ←X ← ← ← ← 1 0 * * 0 6 0 1 1 0 * * 0 5 X 0 0 1 * * X 4 X 0 0 0 * * X 3 − X 0 0 * * − 2 0 0 0 1 * * 1 1 X 0 1 * * * X 0 0 0 1 * * * 1 Stop TMRB0. Enable INTTB01 and set interrupt level 4. Disable INTTB00. Disable the trigger. Select internal clock for input and disable the capture function. (** = 01, 10, 11) Set the interval time (16 bits). Start TMRB0. X: Don't care, −: No change (2) 16-bit programmable pulse generation (PPG) output mode Square wave pulses can be generated at any frequency and duty ratio. The output pulse may be either low active or high active. The PPG mode is obtained by inversion of the timer flip-flop TB0FF0 that is enabled by the match of the up counter UC10 with timer register TB0RG0H/L or TB0RG1H/L and is output to TB0OUT0. In this mode the following conditions must be satisfied. (Value set in TB0RG0H/L) < (Value set in TB0RG1H/L) Match with TB0RG0H/L (INTTB00 inerrupt) Match with TB0RG1H/L (INTTB01 interrupt) TB0OUT0 pin Figure 3.19.6 Programmable Pulse Generation (PPG) Output Waveforms When the TB0RG0H/L double buffer is enabled in this mode, the value of register buffer 10 will be shifted into TB0RG0H/L at match with TB0RG1H/L. This feature facilitates the handling of low duty waves. Match with TB0RG0H/L Up counter = Q1 Match with TB0RG1H/L Shift into TB0RG1H/L TB0RG0H/L (Value to be compared) Register buffer Q1 Q2 Q2 Q3 Write TB0RG0H/L Up counter = Q2 Figure 3.19.7 Operation of Register Buffer 92CA25-332 2007-02-28 TMP92CA25 The following block diagram illustrates this mode. TB0RUN TB0OUT0 (PPG output) φT1 φT4 φT16 Selector 16-bit up counter UC10 Clear F/F (TB0FF0) 16-bit comparator Match 16-bit comparator Selector TB0RG0H/L TB0RG0-WR TB0RUN Register buffer 10 TB0RG1H/L Internal data bus Figure 3.19.8 Block Diagram of 16-Bit Mode The following example shows how to set 16-bit PPG output mode: 7 TB0RUN TB0RG0H/L TB0RG1H/L TB0RUN TB0FFCR TB0MOD PCCR PCFC TB0RUN ← ← ← ← ← ← ← ← ← 0 * * * * 1 1 0 − − 1 6 0 * * * * 0 1 0 1 1 0 5 X * * * * X 0 1 X X X 4 X * * * * X 0 0 X X X 3 − * * * * − 1 0 − − − 2 0 * * * * 0 1 1 − − 1 1 X * * * * X 1 * − − X 0 0 * * * * 0 0 * − − 1 Disable the TB0RG0H/L double buffer and stop TMRB0. Set the duty ratio (16 bits). Set the frequency (16 bits). Enable the TB0RG0H/L double buffer. (The duty and frequency are changed on an INTTB01 interrupt.) Set the mode to invert TB0FF0 at the match with TB0RG0H/L/TB0RG1H/L. Set TB0FF0 to “0”. Select the Prescaler output clock as the input clock and disable the capture function. Set PC6 to function as TB0OUT0. Start TMRB0. (** = 01, 10, 11) X: Don't care, −: No change 92CA25-333 2007-02-28 TMP92CA25 3.20 Touch Screen Interface (TSI) The TMP92CA25 has an interface for a 4-terminal resistor network touch screen. This interface supports two procedures: an X/Y position measurement and touch detection. Each procedure is executed by setting the TSI control register (TSICR0 and TSICR1) and using an internal AD converter. 3.20.1 Touch Screen Interface Module Internal/External Connection TMP92CA25 Y− MY X+ Touch screen X− MX PY Y+ PX External capacitors Figure 3.20.1 External Connection of TSI AVCC Touch screen control PXEN AVSS SPY SPX Dec. PYEN MXEN INT4 PTST Internal data bus P97 (PY) P96/INT4 (PX) PXD (typ.200 kΩ) PG3/AN3 (MY) PG2/AN2 (MX) SMX VREFH SM Y MYEN TSI7 AD converter AN3 AN2 AVCC AVSS VREFH VREFL VREFL Figure 3.20.2 Internal Block Diagram of TSI 92CA25-334 2007-02-28 TMP92CA25 3.20.2 Touch Screen Interface (TSI) Control Register TSI Control Register 7 TSICR0 (01F0H) Bit symbol Read/Write After reset Function TSI7 R/W 0 0: Disable 1: Enable 6 5 PTST R 0 Detection condition 0: no touch 1: touch 4 TWIEN 0 INT4 interrupt control 0: Disable 1: Enable SPY 3 PYEN 0 SPX 0 : OFF 1 : ON 2 PXEN R/W 0 SMY 0 : OFF 1 : ON 1 MYEN 0 SMX 0 : OFF 1 : ON 0 MXEN 0 0 : OFF 1 : ON PXD (Internal Pull-down resistance) ON/OFF setting 0 OFF ON 1 OFF OFF 0 1 Debounce Time Setting Register 7 TSICR1 (01F1H) Bit symbol Read/Write After reset Function 0 0: Disable 1: Enable 0 1024 0 256 0 64 DBC7 6 DB1024 5 DB256 4 DB64 R/W 3 DB8 0 8 2 DB4 0 4 1 DB2 0 2 0 DB1 0 1 Debounce time is set by the formula “(N × 64 − 16)/fSYS”. “N” is the number of bits between bit6 and bit0 which are set to “1”. Note2) Note1: Since an internal clock is used for the debounce circuit, when IDLE1, STOP mode, the de-bounce circuit don’t operate and also interrupt which through this circuit is not generated. When IDLE1, STOP mode, set this circuit to disable (Write “0” to TSICR1) before entering HALT state. Note2: Ex: TSICR1=95H →N = 64 + 4 + 1 = 69 92CA25-335 2007-02-28 TMP92CA25 3.20.3 Touch Detection Procedure The Touch detection procedure shows procedure until a pen is touched by the screen and it is detected. By touching, TSI generates interrupt (INT4) and this procedure terminates. After an X/Y position measuring procedure is terminated, return to this procedure and wait for the next touch. When the waiting state, make ON only the SPY switch ON and OFF the other 3 switches (SMY, SPX and SMX). The pull-down resistor that is connected to the P96/INT4/PX pin is ON when the SPX switch is OFF. During this waiting state, P96/INT4/PX pin’s level is L because the internal Pull-down resistors (PXD) between the X and Y directions in the touch screen are not connected and INT4 is not generated. When the pen touches the screen, P96/INT4/PX pin’s level is H because the internal resistors between the X and Y directions in the touch screen are connected and INT4 is generated. In order to avoid the generation of several interrupts from one touch, a debounce circuit is used, as below. This can ignore the pulse under the time which is set to TSICR1 register. The circuit detects the rising of signal, counts-up the time of the counter which is set, after count, receive the signal internal. During counting, when the signal is set to Low, counter is cleared. And the state become to state of waiting a rising edge. TSICR1 TSICR0, IIMC, P9FC Enables INT4 and selects the Rising edge or Falling edge of INT4 P96/INT4/PX pin Debounce circuit INT4 F/F TSICR0 Figure 3.20.3 Block Diagram of Debounce Circuit 92CA25-336 2007-02-28 TMP92CA25 Reset counter for debounce time Start counter for debounce time Debounce Debounce time time INT4 Debounce time INT4 is generated by matching counter and specified debounce time. After pen is released, INT4 can be issued again. IINT4 is not generated by matching counter and specified debounce period because it is an edge-type interrupt. Figure 3.20.4 Timing Diagram of Debounce Circuit 92CA25-337 2007-02-28 TMP92CA25 3.20.4 X/Y Position Measuring Procedure During the INT4 routine, execute an X/Y position measuring procedure as below. Make both the SPX and SMX switches ON, and the SPY and SMY switches OFF. With this setting, an analog voltage which shows the X position will be input to the PG3/MY/AN3 pin. The X position can be measured by converting this voltage to digital code using the AD converter. Next, make both the SPY and SMY switches ON and the SPX and SMX switches OFF. With this setting, an analog voltage which shows the Y position will be input to the PG2/MX/AN2 pin. The Y position can be measured by converting this voltage to digital code using the AD converter. The above analog voltage which is inputted to AN3 or AN2 pin can be calculated as follows. It is the ratio between the resistance value in the TMP92CA25F and the resistance value in the touch screen as shown in Figure 3.20.5. Therefore, if the pen touches an area on the touch screen, the analog voltage will be neither 3.3 V nor 0.0 V. Please remember to take into consideration the variation in the rate of resistance. It is also recommended that an average taken from several AD conversions be adopted as the correct code. [Formula to calculate analog voltage (E1) to AN2 or AN3 pin] SPY (SPX) ON resistor: Rpy (Rpx) 20 Ω (typ.) Touch screen resistor: Rty (Rtx) The value depends on the touch screen. SMY (SMX) ON resistor: Rmy (Rmx) 20 Ω (typ.) AVCC = 3.3 V E1 = ((R2 + Rmy)/(Rpy + Rty + Rmy)) × AVCC [V] Example: AN2 (AN3) pin R2 R1 Touch point Note 1: Note 2: When AVCC = 3.3 V, Rpy = Rmy = 20 Ω, R1 = 400 Ω and R2 = 100 Ω E1 = ((100 + 20)/(20 + 400 + 100 + 20)) × 3.3 = 0.733 V An X position can be calculated in the same way though the above formula is for Y position. Rty = R1 + R2. Figure 3.20.5 Calculation Analog Voltage 92CA25-338 2007-02-28 TMP92CA25 3.20.5 Flow Chart for TSI (2) X/Y position measurement procedure INT4 routine: TSICR0 ← 98H TSICR1 ← XXH (Voluntary) ・TSICR0 ← 85H ・AD conversion for AN3 ・Store the result (1) Touch detection procedure Main routine: Execute main routine ・TSICR0 ← 8AH ・AD conversion for AN2 ・Store the result Execute an operation by using X/Y position Yes Still touched ? TSICR0 = 1? No Return to main routine Figure 3.20.6 Flow Chart for TSI Following pages explain each circuit condition of (a), (b) and (c) in above flow chart. 92CA25-339 2007-02-28 TMP92CA25 (a) Main routine (condition of waiting INT4 interrupt) (pbfc),= “1” : P96: int4/PX , P97:PY (inte34) : Set interrupts level of INT4 (tsicr0)=98h : Pull down resister on, SPY on, Interrupt-set ei : Enable interrupt TMP92CA25 AVCC ON SP Y (PY/P97) Y+ Touch Screen (PX/P96/INT4) X+ (MY/PG3) Y− (MX/PG2) ON PXD (typ.200kΩ) MYEN INT2 TSI7 SPX Dec. Touch screen control PXEN PYEN MXEN PTST Internal data bus X− AD Converter AN3 AN2 SMX VREFH VREFL AVSS SMY AVCC AVSS VREFH VREFL 92CA25-340 2007-02-28 TMP92CA25 (b) X position measurement (Start A/D conversion) (tsicr0)=85h : SMX, SPX on (admod1)=83h : AN3 measure (admod0)=01h : A/D start TMP92CA25 AVCC ON SP Y (PY/P97) Y+ Touch Screen (PX/P96/INT4) X+ (MY/PG3) Y− (MX/PG2) PXD (typ.200kΩ) SPX Dec Touch screen control PXEN PYEN MXEN MYEN INT2 TSI7 PTST X− AD Converter AN3 AN2 SMX ON VREFH VREFL AVSS SMY AVCC AVSS VREFH VREFL 92CA25-341 2007-02-28 Internal data bus TMP92CA25 (c) Y position measurement (Start A/D conversion) (tsicr0)=8ah : SMY, SPY on (admod1)=82h : AN2 measure (admod0)=01h : A/D start TMP92CA25 AVCC ON SP Y (PY/P97) Y+ Touch Screen (PX/P96/INT4) X+ (MY/PG3) Y− (MX/PG2) PXD (typ.200kΩ) MYEN INT2 Internal data bus TSI7 SPX Dec. Touch screen control PXEN PYEN MXEN PTST X− AD Converter AN3 AN2 SMX SMY AVCC ON AVSS VREFH VREFL VREFH VREFL AVSS 92CA25-342 2007-02-28 TMP92CA25 3.21 I2S (Inter-IC Sound) An I2S format compatible serial output circuit is built-in. This product can be used in digital audio system applications by connecting LSI for sound generation (e.g., a DA converter). This circuit has both I2S mode and general SIO mode. But both modes have only clock output and data transmitting functions. Table 3.21.1 shows an outline for each mode. Table 3.21.1 Outline for Each Mode I2S mode 1) Format 2) Used pin I S-format compatible (Only master and transmitting) 1. I2SCKO (Clock output) 2. I2SDO (Clock output) 3. I2SWS (Word select output) 3) WS frequency 4) Baud rate (at fc = 40 Selectable either fs/4 or TA1OUT (TMRA1 output) MHz) − 2 SIO mode General (Only master and transmitting) 1. I2SCKO (Clock output) 2. I2SDO (Data output) Selectable either 20, 10, 5, or 2.5 Mbps 16 bytes × 2 channels (Right, left) 32 bytes 5) Transmittion buffer 6) Direction of data 7) Data length 8) Edge of clock 9) Interrupt Selectable either MSB first or LSB first Selectable either 8 bits or 16 bits Selectable either rising edge or falling edge INTI2S (FIFO empty interrupt) 92CA25-343 2007-02-28 TMP92CA25 3.21.1 Block Diagram fSYS Prescaler 248 Selector I2SCKO control I2SCKO fS TA1OUT ÷4 Selector I2SWS control I2SWS I2SBUFR 0 1 7 Shifter Data 16 bits 16-byte FIFO (Right) (2 bytes × 8) selector, FIFO control 0 1 7 Write pointer Read pointer Internal data bus I2SBUFL interrupt control I2SDO INTI2S 16 bits 16-byte FIFO (Left) (2 bytes × 8) Write pointer Read pointer FIFO control 16 bits I2SCTL0 2 Figure 3.21.1 I S Block Diagram 92CA25-344 2007-02-28 TMP92CA25 3.21.2 SFR The following tables show the SFR for I2S. This I2S is connected to the CPU by the 16-bit data bus. When the CPU accesses the SFR, use a 2-byte load instruction. I2SCTL0 Register 7 I2SCTL0 (080EH) Bit symbol Read/Write After reset Function 0 Transmit 0: Stop 1: Start 2 6 FMT R/W 0 Mode 0: I S 1: SIO 5 BUSY R 0 Status 0: Stop 4 DIR 0 First bit 0: MSB 3 BIT 0 Bit number 0: 8 bits 1: 16 bits 2 MCK1 R/W 0 Baud rate 00: fSYS 1 MCK0 0 10: fSYS/4 0 I2SWCK 0 WS clock 0: fs/4 1: TA1OUT TXE 1: Under 1: LSB transmitting 2 01: fSYS/2 11: fSYS/8 Note: is effective only for I S mode. 15 (080FH) Bit symbol Read/Write After reset Function 0 WS level 0: Low left 1: High left I2SWLVL 14 EDGE R/W 0 Clock edge 0: Falling 1: Rising 13 I2SFSEL 0 Select for 0: Stereo 12 I2SCLKE 0 Clock enable 11 10 9 8 SYSCKE R/W 0 System clock 0: Disable 1: Enable for data out stereo (After (2 channels) transmit) (1 channel) 1: Stop 2 1: Monaural 0: Operation Note: , and are effective only in I S mode. I2SBUFR Register 15 I2SBUFR (0800H) Read-modifywrite instruction is prohibited Bit symbol Read/Write After reset Function R15 14 R14 13 R13 12 R12 11 R11 10 R10 9 R9 8 R8 W 7 R7 6 R6 5 R5 4 R4 3 R3 2 R2 1 R1 0 R0 Undefined Register for transmitting buffer (FIFO) (Right channel) I2SBUFL Register 15 I2SBUFL (0808H) Bit symbol Read/Write L15 14 L14 13 L13 12 L12 11 L11 10 L10 9 L9 8 L8 W 7 L7 6 L6 5 L5 4 L4 3 L3 2 L2 1 L1 0 L0 Read-modify- After reset write instruction is Function prohibited Undefined Register for transmitting buffer (FIFO) (Left channel) Figure 3.21.2 I2S SFR 92CA25-345 2007-02-28 TMP92CA25 3.21.3 Explanation of I2S Mode (1) Connection example Figure 3.21.3 shows an example with external LSI. TMP92CA25 (Transmitter) P92/I2SWS P90/I2SCKO P91/I2SDO WS CK DATA (Receiver) Example: DA converter Note: After reset, P90 to P92 are placed in a high-impedance state. Connect each pin with a pull-up or pull-down resistor as necessary. Figure 3.21.3 Example with External LSI (2) Procedure A 32-byte FIFO is built-in. If the FIFO’s data becomes empty, an INTI2S interrupt is generated. In the interrupt routine, write the next transmission data to the FIFO. The following shows a setting example and timing diagram. Transmitting by I2S mode, I2SWS = 8.192 kHz, I2SCKO = 10 MHz, synchronous with rising edge (at fSYS = 20 MHz) 6 0 − − 0 1 5 0 − − − 0 4 1 − − 0 1 3 X − − 0 0 2 − 0 1 0 0 1 − 0 1 1 0 0 − 0 1 0 1 Set I S mode, MSB first, 8 bits, fSYS/2 clocks. Set rising edge, clock stop. Write 16-byte data to FIFO for right (8 times). Write 16-byte data to FIFO for left (8 times). Start transmitting. 2 (Setting example) (Main routine) 7 INTE5I2S P9CR P9FC I2SCTL0 I2SBUFR I2SBUFL I2SCTL0 X − − 0 0 Set interrupts level. Set pins to P90 (I2SCKO), P91 (I2SDO), and P92 (I2SWS). ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 1 0 0 1 − 0 0 1 0 0 0 0 1 0 0 1 (INTI2S interrupt routine) I2SBUFR I2SBUFL ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** Write 16-byte data to FIFO for right (8 times). Write 16-byte data to FIFO for left (8 times). X: Don't care, −: No change 92CA25-346 2007-02-28 TMP92CA25 Write to FIFO 1 I2SWS pin I2SCKO pin I2SDO pin INTI2S 2 16 1 Figure 3.21.4 Whole Timing Diagram I2SWS pin I2SCKO pin I2SDO pin LSB MSB Bit7 Bit6 LSB Bit0 MSB Bit7 Bit6 LSB Bit0 MSB Bit7 10 MHz Figure 3.21.5 Detail Timing Diagram (3) Notes 1) INTI2S timing INTI2S is generated after the last data of FIFO is loaded to the internal shifter. FIFO is now empty and it is possible to write the next data. 2) I2SCTL0 A transmission is started by programming “1” to the register and stopped by writing “0”. After is programmed “1” once, the transmission automatically from right to left in order, alternately. is repeated If a transmission should be stopped, program “0” to after changes to “0” in the INTI2S interrupt routine. When is programmed “0” during transmitting, transmitting stops immediately. 3) FIFO size A 16-byte FIFO is provided for both right and left channels. It is not necessary to use all data, but please use the even numbers (2, 4 ... 16). 4) I2SCTL0 Write “1” to and use the right channel FIFO for monaural. It is not necessary to write data to the left channel FIFO. Channel transmission data is fixed at “0”. 5) Address for I2SBUFR and I2SBUFL If writing data to I2SBUFR or I2SBUFL, use “word or long word data load instruction”. A “byte data load instruction” cannot be used. The address of I2SBUFR selectable from 0800H to 0803H, and I2SBUFL is selectable from 0808H to 080BH. 92CA25-347 2007-02-28 TMP92CA25 3.21.4 Explanation of SIO Mode (1) Connection example Figure 3.21.6 shows an example with external LSI. TMP92CA25 (Transmitter) (Receiver) P90/I2SCKO P91/I2SDO Port SCK SI RCK Example: Shift register Note: Since P90 to P91 become high impedance by reset, connect a pull-up or pull-down resistor if necessary. Figure 3.21.6 Example with External LSI (2) Procedure A 32-byte FIFO is built-in. If the FIFO’s data becomes empty, an INTI2S interrupt is generated. In the interrupt routine, write the next transmission data to the FIFO. The following shows a setting example and timing diagram. (Setting example) Transmitting by SIO mode, I2SCKO = 10 MHz, synchronous with rising edge (at fSYS = 20 MHz) (Main routine) 7 INTE5I2S P9CR P9FC I2SCTL0 I2SBUFR I2SCTL0 X − − 0 − 1 − 6 0 − − 1 1 1 1 5 0 − − − − − − 4 1 − − 1 1 1 1 3 X − − 0 0 0 0 2 − − − 0 0 0 0 1 − 0 1 1 0 1 0 0 − 0 1 − 1 − 1 Set SIO mode, LSB first, 8 bits, fSYS/2 clocks. Set rising edge. Write 32-byte data to FIFO (16 times). Start transmitting. Set interrupts level. Set pins to P90 (I2SCKO) and P91 (I2SDO). ** ** ** ** ** ** ** ** (INTI2S interrupt routine) I2SBUFR I2SCTL0 ** ** ** ** ** ** ** ** 1 − 1 1 − − 1 1 0 0 0 0 1 0 − 1 Write 32-byte data to FIFO (16 times). Confirm termination of the 32-byte data transfer. Start transmitting. If = “1” then WAIT else NEXT X: Don't care, −: No change 92CA25-348 2007-02-28 TMP92CA25 Write to FIFO 1 I2SCKO pin I2SDO pin INTI2S 2 31 32 1 2 Figure 3.21.7 Whole Timing 10 MHz I2SCKO pin I2SDO pin LSB Bit0 Bit1 MSB Bit7 LSB Bit0 Bit1 MSB Bit7 Figure 3.21.8 Detail Timing (3) Notes 1) INTI2S timing INTI2S is generated after the last data of FIFO is loaded to the internal shifter. FIFO is now empty and it is possible to write the next data. 2) I2SCTL0 A transmission is started by programming “1” to the register and stopped by programming “0”. register is cleared to “0” when changes from “1” to “0”. When is programmed “0” during transmitting, transmitting stops immediately. 3) FIFO size A 32-byte FIFO is provided for SIO mode. It is not necessary to use all data but please use even numbers ( 2, 4 ... 32). The will be changed to “0” and will be cleared to “0” automatically after transmitting all programmed data to FIFO. In case of continuous transmitting, program “1” to after programming data to FIFO. The number of data programmed to FIFO is counted automatically and held by programming “1” to . 4) Address for I2SBUFR and I2SBUFL If writing data to I2SBUFR (I2SBUFL cannot be written), use “word or long word data load instruction”. A “byte data load instruction” cannot be used. The address of I2SBUFR is selectable from 0800H to 0803H. 92CA25-349 2007-02-28 TMP92CA25 3.22 Power Supply Backup (Power Supply Backup) TMP92CA25 includes three type power supply systems. Analog Power supply input (AVCC - AVSS) Digital Power suppy input (DVCC - DVSS) Power supply input for RTC (RTCVCC - DVSS) Each Power supply is independent. AVCC TMP92CA25 DVCC1∼DVCC3 RTCVCC ADC control CPU control & Other logic High-OSC RTC control PM1(MLDALM) Low-OSC Port M PM2( ALARM , MLDALM ) AVSS DVSS1∼DVSS4 BE XT1 XT2 Figure 3.22.1 Power supply input system DVCC RTCVCC TMP92CA25 Main power suorce & Other device RTC 32K_OSC Sub battery for RTC BE DVSS Figure 3.22.2 Outside circuit example for PSB 92CA25-350 2007-02-28 TMP92CA25 TMP92CA25 has the power supply backup mode which is desighed to work for only low-speed oscillator, RTC and port M under sub battery supply. TMP92CA25 is set to the power supply backup mode by using the BE pin (Backup enable) and the RESET pin. Figure 3.22.3 and Figure 3.22.4 shows the timing diagram of BE pin and RESET pin. |←10μs→| BE RESET Power source (DVCC) RTCVCC is always supplied. Figure 3.22.3 Shift from Normal Mode to PSB Mode Over 20 system clocks after oscillator becomes stable BE RESET Power source (DVCC) RTCVCC is always supplied. Figure 3.22.4 Shift from PSB Mode to NORMAL Mode 92CA25-351 2007-02-28 TMP92CA25 Backup enable pin ( BE ) Low frequency oscillator, RTC and Port M can work also if BE = “L”. If BE = “L”, Low frequency oscillator, RTC and Port Mare separated from CPU and so on in internal. Therefore, it is prohibited accessing to RTC register and Port M. In addition, Low frequency oscillator (fs) isn’t provided except RTC circuit (Melody Alarm generator etc.). So, ALARM (= output function of RTC) can output from PM2 pin, if port is set before set to BE = “L”. Note: 1: If “H” level signal was inputted to general purpose port with power off condition, current is used more than always. Therefore, set to “l” level or High-impedance condition. If this back up function is used, set BE pin to “L” level when DVCC power off. When BE pin is set to “L”, Low frequency oscillator operation become same with EMCCR0 = “0”, forcibly. Therefore, don’t set to BE = “L”, when it is not operated Low frequency oscillator. When BE pin is set to “L”, PM2, PM1 pins condition change according to setting value of PMDR. If keep output PM2, PM1 pins write “11” to before set to BE = “L”. If release RESET , 2: 3: 4: release RESET after BE = “H”. 92CA25-352 2007-02-28 TMP92CA25 3.23 External bus release function TMP92CA25 have external bus release function that can connect bus master to external. Bus release request ( BUSRQ ), bus release answer ( BUSAK ) pin is assigned to Port L6 and L7. And, it become effective by setting to PLCR and PLFC. Figure 3.23.1 shows operation timing. Time that from BUSRQ pin inputted “0” until busis released ( BUSAK is set to “0”) depend on instruction that CPU execute at that time. fSYS BUSRQ (PL6) External bus release cycle BUSAK (PL7) External bus pin (A type) External bus pin (B type) External bus pin (C type) Figure 3.23.1 Bus release function operation timing 3.23.1 Non release pin If it received bus release request, CPU release bus to external by setting BUSAK pin to “0” without start next bus. In this case, pin that is released have 3 types (A, B and C). Eve operation that set to high impedance (HZ) is different in 3 types. Table 3.23.1 shows support pin for 3 types. Any pin become non release pin only case of setting to that function by setting port. Therefore, if pin set to output port and so on, it is not set non relase pin, and it hold previous condition. Table 3.23.1 Non release pin Type A Eve operation that set to HZ Drive “1” Support function (Pin name) A23-A16(P67-P60), A15-A0, RD (P70), WRLL (P71), WRLU (P72), EA24(P73), EA25(P74), R/ W (P75), CS0 (P80), CS1 (P81), SDCS (P81), CS2 (P82), CSZA (P82), CS3 (P83), CSZB (P84), CSZC (P85), CSZD (P86), CSZE (P87), EA24(PC6), EA25(PC7), CSZF (PC7), SRLLB , SDRAS (PJ0), SRLUB , SDCAS (PJ1), SRWR , SDWE (PJ2), SDCLK(PF7), SDLLDQM(PJ3), SDLUDQM(PJ4) B C Drive “0” None operation SDCKE(PJ7) D15-D8(P17-P10), D7-D0 92CA25-353 2007-02-28 TMP92CA25 3.23.2 Connection example Figure 3.23.2 show connection example. TMP92CA25 CLE CLE ALE ALE Memory External bus pin (A type) External bus pin (C type) External bus pin (B type) External bus master BUSRQ BUSAK Figure 3.23.2 Connection example 3.23.3 Note If use bus release function, be careful following notes. 1) Prohibit using this function together LCD controller and, SDRAM controller If use this function, prohibit use LCD controller in SR mode. And, prohibitalso SDRAMC basically, but if external bus master use SDRAM, set SDRAM to SR (self refresh) condition before bus release request. And, when finish bus release, release SR condition. In this case, confirm each condition by handshake of general purpose port. 2) Support standby mode The condition that can receive this function is only CPU operationg condition and during IDLE2 mode. During IDLE1 and STOP condition don’t receive. (Bus release function is ignored). 3) Internal resource access disable External bus master cannnot access to internal memory and interhal I/O of TMP92CA25. Internal I/O operation during bus releasing. 4) Internal I/O operation during bus releasing Internal I/O continue operation during bus releasing, please be careful. And, if set the watchdog timer, set runaway time by consider bus release time. 5) Non release pin Control output pin for NAND-Flash ( ND0CE , NDRE , NDWE ) are not non release pins. ND1CE , NDALE, NDCLE, 92CA25-354 2007-02-28 TMP92CA25 4. 4.1 Electrical Characteristics Absolute Maximum Ratings Parameter Power Supply Voltage Input Voltage Output Current Output Current (MX, MY pin) Output Current Output Current (PX, PY pin) Output Current (Total) Output Current (Total) Power Dissipation (Ta = 85°C) Soldering Temperature (10 s) Storage Temperature Operation Temperature Symbol VCC VIN IOL IOL IOH IOH Σ IOL Σ IOH PD TSOLDER TSTG TOPR Rating −0.5 to 4.0 −0.5 to VCC + 0.5 2 15 −2 −15 80 −80 600 260 −65 to 150 −20 to 70 Unit V V mA mA mA mA mA mA mW °C °C °C Note: The Absolute maximum ratings are rated values which must not be exceeded during operation, even for an instant. Any one of the ratings must not be exceeded. If any absolute maximum rating is exceeded, the device may break down or its performance may be degraded, causing it to catch fire or explode resulting in injury to the user. Thus, when designing products which include this device, ensure that no absolute maximum rating value will ever be exceeded. Solderability of lead free products Test parameter Solderability (1) Test condition Use of Sn-37Pb solder Bath Solder bath temperature = 230°C, Dipping time = 5 seconds The number of times = one, Use of R-type flux (2) Use of Sn-3.0Ag-0.5Cu solder bath Solder bath temperature = 245°C, Dipping time = 5 seconds The number of times = one, Use of R-type flux (use of lead-free) Pass: Note solderability rate until forming ≥ 95% 92CA25-355 2007-02-28 TMP92CA25 4.2 DC Electrical Characteristics (1/2) VCC = 3.3 ± 0.3V/X1 = 6 to 40 MHz/Ta = −20 to 70°C VCC = 2.7 − 3.6V/X1 = 6 to 27 MHz/Ta = −20 to 70°C Parameter Power supply voltage (DVCC = AVCC) (DVSS = AVSS = 0 V) Input low voltage for D0 to D7 P10 to P17 (D8 to D15) Input low voltage for P40 to P47, P50 to P57, P60 to P67, P71 to P76, P90, P93 to P94, PC4 to PC7, PF3 to PF6, PG0 to PG3, PJ5 to PJ6, PK4 to PK7, PL4 to PL7 Input low voltage for P91 to P92, P96 to P97, PA0 to PA7, PC0 to PC3, PF0 to PF2, BE , RESET Symbol VCC Min 3.0 Typ. Max 3.6 Unit V Condition X1 = 6 to 40 MHz X1 = 6 to 27 MHz XT1 = 30 to 34 kHz 2.7 VIL0 0.6 VIL1 0.3 × VCC −0.3 V VIL2 0.25 × VCC Input low voltage for AM0 to AM1 Input low voltage for X1, XT1 Input high voltage for D0 to D7 P10 to P17 (D8 to D15) Input high voltage for P40 to P47, P50 to P57, P60 to P67, P71 to P76, P90, P93 to P94, PC4 to PC7, PF3 to PF6, PG0 to PG3, PJ5 to PJ6, PK4 to PK7, PL4 to PL7 Input high voltage for P91 to P92, P96 to P97, PA0 to PA7, PC0 to PC3, PF0 to PF2, BE , RESET Input high voltage for AM0 to AM1 Input high voltage for X1, XT1 VIL3 VIL4 VIH0 2.0 0.3 0.2 × VCC VIH1 0.7 × VCC VCC + 0.3 0.75 × VCC V VIH2 VIH3 VIH4 VCC − 0.3 0.8 × VCC 92CA25-356 2007-02-28 TMP92CA25 DC Electrical Characteristics (2/2) Parameter Output low voltage Output high voltage Internal resistor (ON) MX, MY pins Internal resistor (ON) PX, PY pins Input leakage current Output leakage current Power down voltage at STOP (for internal RAM backup) Pull-up resistor for RESET , PA0 to PA7 Programmable pull down resistor for p96 Pin capacitance Schmitt width for P91 to P92, P96 to P97, PA0 to PA7,PC0 to PC3, PF0 to PF2, BE , RESET NORMAL (Note 2) IDLE2 IDLE1 SLOW (Note 2) IDLE2 IDLE1 STOP ICC Symbol VOL VOH1 VOH2 IMon IMon ILI ILO VSTOP RRST Min 2.4 0.9 × VCC Typ. Max 0.45 Unit IOL = 1.6 mA V IOH = −400 μA IOH = −20 μA VOL = 0.2V Ω Condition 30 30 0.02 0.05 1.8 ±5 ±10 μA μA VCC = 3.0 to 3.6 V VOH = VCC −0.2V 0.0 ≤ VIN ≤ VCC 0.2 ≤ VIN ≤ VCC − 0.2 V VIL2 = 0.2 × VCC, VIH2 = 0.8 × VCC 3.6 V 80 RKH CIO VTH 0.4 1.0 500 kΩ 10 pF fc = 1 MHz V VCC = 3.6 V, fc = 40 MHz mA Ta ≤ 70°C Ta ≤ 50°C Ta ≤ 70°C μA 42 13 3.1 41 15 4 0.2 65 26 8.7 110 70 80 30 60 20 50 15 VCC = 3.6 V, fs = 32 kHz Ta ≤ 50°C Ta ≤ 70°C Ta ≤ 50°C Ta ≤ 70°C Ta ≤ 50°C VCC = 3.6 V Note 1: Typical values are for when Ta = 25°C and VCC = 3.3 V unless otherwise noted. Note 2: ICC measurement conditions (NORMAL, SLOW): All functions are operational; output pins except the bus pin are opened, and input pins are fixed. Bus pin CL = 30 pF 92CA25-357 2007-02-28 TMP92CA25 4.3 AC Characteristics Basic Bus Cycle Read cycle Variable Min 1 2 3 4 OSC period (X1/X2) System clock period ( = T) SDCLK low width SDCLK high width A0 to A23 valid → D0 to D15 Input at 0 waits A0 to A23 valid → D0 to D15 Input at 1 wait RD falling → D0 to D15 Input at 0 waits 4.3.1 No. Parameter Symbol tOSC tCYC tCL tCH tAD (3.0 V) tAD (2.7 V) tAD3 (3.0 V) tAD3 (2.7 V) tRD(a) tRD(b) tRD(c) tRD3(a) tRD3(b) tRD3(c) tRR(a) tRR(b) tRR(c) tRR3(a) tRR3(b) tRR3(c) tAR(a) tAR(a) tAR(a) tRK(a) tRK(b) tRK(c) tHA tHR tTK tKT tSBA tRRH(a) tRRH(b) tRRH(c) 40 MHz 36 MHz 27 MHz 25 50 10 10 70 − Unit Max 166.7 333.3 27.7 55.5 12.7 12.7 81 − 25 50 0.5 T − 15 0.5 T − 15 5-1 5-2 2.0 T − 30 2.0 T − 35 3.0 T − 30 3.0 T − 35 1.5 T − 30 1.25 T − 30 1.0 T − 30 2.5 T − 30 2.25 T − 30 2.0T − 30 1.5 T − 20 1.25 T − 20 1.0 T − 20 2.5 T − 20 2.25 T − 20 2.0 T − 20 0.5 T − 20 0.75 T − 20 1.0 T − 20 0.5 T − 20 0.25 T − 20 0 T − 20 0 0 15 5 1.5 T − 30 0.5 T − 15 0.75 T − 15 1.0 T − 15 37.0 74.0 22 22 − 113 − 120 − 45 32.5 136.5 − 53.3 39.5 6-1 187 81 62.5 44 155 136.5 118 91 72.5 54 165 146.5 128 17 35.5 54 17 −1.5 −20 0 0 15 5 6-2 RD falling Input at 1 wait → D0 to D15 20 95 82.5 70 55 42.5 30 105 92.5 80 5 17.5 30 5 −7.5 −20 0 0 15 5 25.7 108.8 95 312 63.2 49.4 35.6 118.8 105 91.2 7.7 21.5 35.3 7.7 −6.1 −20 0 0 15 5 7-1 RD low width at 0 waits ns 7-2 RD low width at 1 wait 8 A0 to A23 valid → RD falling 9 RD falling → SDCLK rising 10 A0 to A23 valid → D0 to D15 hold 11 RD rising → D0 to D15 hold 12 WAIT setup time 13 WAIT hold time Data byte control access time 14 for SRAM 15 RD high width AC measuring condition 45 10 22.5 35 53.3 12.7 26.5 40.3 81 22 40.5 59 • Output: High = 0.7 VCC, Low = 0.3 VCC, CL = 50 pF • Input: High = 0.9 VCC, Low = 0.1 VCC Note1: The figures in the “Variable” column cover the whole VCC range (2.7 V to 3.6 V). shown by the VCC (min), “(3.0 V)” or “(2.7 V)”, added to the “Symbol” column. Exceptions are Note2: The figures in the (a), (b) and (c) of “Symbol” column shows difference of falling timing of RD pin. Falling timing of RD pin is set by MEMECR0. If MEMCR0 is “00”, it correspond with (a) in above table, and “01” is (b), “10” is (c). 92CA25-358 2007-02-28 TMP92CA25 Write cycle No. 16-1 16-2 17-1 17-2 18 19 20 21 Parameter D0 to D15 valid → WRxx rising at 0 waits D0 to D15 valid → WRxx rising at 1 wait WRxx low width at 0 waits WRxx low width at 1 wait A0 to A23 valid → WR falling WRxx falling → SDCLK rising WRxx rising → A0 to A23 hold WRxx rising → D0 to D15 hold → D0 to D15 output Symbol tDW tDW3 tWW tWW3 tAW tWK tWA tWD Variable Min 1.25T − 35 2.25T − 35 40 MHz 36 MHz 27 MHz 27.5 77.5 32.5 82.5 5 5 7.5 7.5 20 − 32.5 Unit Max 34.3 89.8 34.3 89.8 7.7 7.7 8.8 8.8 22.7 − 39.3 57.5 131.5 62.5 136.5 17 17 13.5 13.5 − 30 62.5 62.5 17 13.5 57.5 13.5 22 RD rising 23 Write pulse width for SRAM Data byte control to end of write 24 for SRAM 25 Address setup time for SRAM 26 Write recovery time for SRAM 27 Data setup time for SRAM 28 Data hold time for SRAM AC measuring condition 1.25T − 30 2.25T − 30 0.5T − 20 0.5T − 20 0.25T − 5 0.25T − 5 tRDO (3.0 V) 0.5T − 5 tRDO (2.7 V) 0.5T − 7 tSWP 1.25T − 30 tSBW tSAS tSWR tSDS tSDH 1.25T − 30 0.5T − 20 0.25T − 5 1.25T − 35 0.25T − 5 ns 32.5 5 7.5 27.5 7.5 39.3 7.7 8.8 34.3 8.8 • Output: High = 0.7 VCC, Low = 0.3 VCC, CL = 50 pF • Input: High = 0.9 VCC, Low = 0.1 VCC Note: The figures in the “Variable” column cover the whole VCC range (2.7 V to 3.6 V). Exceptions are shown by the VCC (min), “(3.0 V)” or “(2.7 V)”, added to the “Symbol” column. 92CA25-359 2007-02-28 TMP92CA25 (1) Read cycle (0 waits) tOSC X1 tCYC tCH SDCLK tCL tTK WAIT tKT A0~A23 tAD CSn tHA R/ W tAR RD tRK Note2 tHR tRR tRD Data input tRRH D0~D15 tSBA SRxxB SRWR Note1: The phase relation between X1 input signal and the other signals is undefined. The above timing chart is an example. Note2: RD pin falling timing depends on MEMCR0 setting in memory controller. 92CA25-360 2007-02-28 TMP92CA25 (2) Write cycle (0 waits) tOSC X1 tCYC tCH SDCLK tCL tTK WAIT tKT A0~A23 CSn R/ W tAW WRxx tWK tWA tWW tDW D0~D15 Data output tSWR tWD tRDO RD tSDH tSBW SRxxB tSDS tSAS tSWP SRWR Note: The phase relation between X1 input signal and the other signals is undefined. The above timing chart is an example. 92CA25-361 2007-02-28 TMP92CA25 (3) Read cycle (1 wait) SDCLK WAIT A0 to A23 tAD3 CSn R/ W RD tRR3 tRD3 D0 to D15 Data input (4) Write cycle (1 wait) SDCLK WAIT A0 to A23 CSn R/ W WRxx tWW3 tDW3 D0 to D15 Data output RD 92CA25-362 2007-02-28 TMP92CA25 4.3.2 Page ROM Read Cycle (1) 3-2-2-2 mode No. Parameter Symbol tCYC tAD2 tAD3 tRD3(a) tRD3(b) tRD3(c) tHA tHR 0 0 50 Variable Min Max 166.7 2.0T − 50 3.0T − 50 2.5T − 45 2.25T − 45 2.0T − 45 40 MHz 36 MHz 27 MHz Unit 50 50 100 80 67.5 55 0 0 55.5 61 116.5 93.8 79.6 66 0 0 74 98 172 140 121.5 103 0 0 1 System clock period ( = T) 2 A0, A1 → D0 to D15 input 3 A2 to A23 → D0 to D15 input 4 RD falling → D0 to D15 input 5 A0 to A23 Invalid → D0 to D15 hold 6 RD rising → D0 to D15 hold AC measuring condition ns • Output: High = 0.7 VCC, Low = 0.3 VCC, CL = 50 pF • Input: High = 0.9 VCC, Low = 0.1 VCC Note: The figures in the (a), (b) and (c) of “Symbol” column shows difference of falling timing of RD pin. Falling timing of RD pin is set by MEMECR0. If MEMCR0 is “00”, it correspond with (a) in above table, and “01” is (b), “10” is (c). SDCLK tCYC A0 to A23 +0 +1 +2 +3 CS2 tAD3 RD tAD2 tAD2 tAD2 tHA tRD3 D0 to D15 Data input tHA Data input tHA Data input tHA Data input tHR Timing pulse (8-byte setting) 92CA25-363 2007-02-28 TMP92CA25 4.3.3 No. SDRAM Controller AC Characteristics Parameter Symbol tRC tRAS tRCD tRP tRRD tWR tCK tCH tCL tAC tOH tDS tDH tAS tAH tCKS tCMS tCMH tRSC 2T 2T T T 3T T T 0.5T − 15 0.5T − 15 T − 30 0 0.5T − 10 T − 15 0.75T − 30 0.25T − 9 0.5T − 15 0.5T − 15 0.5T − 15 T Variable Min Max 12210 40 MHz 36 MHz 27 MHz 100 100 50 50 150 50 50 10 10 20 0 15 35 7.5 3.5 10 10 10 50 111 111 55.5 55.5 166.5 55.5 55.5 12.7 12.7 25.5 0 17 40.5 11.6 4.8 12.7 12.7 12.7 55.5 148 148 74 74 222 74 74 22 22 44 0 27 59 25.5 9.5 22 22 22 74 Unit 1 Ref/active to ref/active command period 2 Active to precharge command period 3 Active to read/write command delay time 4 Precharge to active command period 5 Active to active command period 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Write recovery time (CL* = 2) Clock cycle time (CL* = 2) Clock high level width Clock low level width Access time from clock (CL* =2) Output data hold time Data in setup time Data in hold time Address setup time Address hold time CKE setup time Command setup time Command hold time Mode register set cycle time ns CL*: CAS latency. AC measuring conditions • Output level: High = 0.7 VCC, Low = 0.3 VCC, CL = 50 pF • Input level: High = 0.9 VCC, Low = 0.1 VCC 92CA25-364 2007-02-28 TMP92CA25 (1) SDRAM read timing (CPU access or LCDC normal access) tCK SDCLK tCH SDxxDQM tCMS SDCS tCL tRP tRCD tRAS tRP tCMS tCMH tCMH SDRAS tRRD SDCAS SDWE 16-bit data bus A1 to A10 tAS Row tAH Column tAS tAH Column A11 Row A12 to A15 Row Column tAC tOH Data input D0 to D15 92CA25-365 2007-02-28 TMP92CA25 (2) SDRAM write timing (CPU access) tCK SDCLK tCH SDxxDQM tCMS SDCS tCL tRP tRCD tCMS tWR tRP tRRD tCMH SDRAS tCMH SDCAS tRAS SDWE 16-bit data bus A1 to A12 tAS Row tAH Column tAS tAH Column A11 Row A12 to A15 Row tDS Column tDH Data output D0 to D15 92CA25-366 2007-02-28 TMP92CA25 (3) SDRAM burst read timing (Start of burst cycle) tCK SDCLK tCMS SDxxDQM tRP SDCS tRCD tCMS SDRAS tCMH tCMS tCMH SDCAS tCMH SDWE tAS A1 to A11 or A1 to A10 227 tAH tAS Row tAH tAS Column A12 or A11 Row Column A13 to A15 or A12 to A15 0 Row tAC tAC Data input tOH tAC Data input tOH Data input D0 to D15 92CA25-367 2007-02-28 TMP92CA25 (4) SDRAM burst read timing (End of burst cycle) tCK SDCLK tCMH SDxxDQM tCMS SDCS tCMS tRSC tRC tCMH SDRAS tCMS SDCAS tCMH SDWE tAS A1 to A11 or A1 to A10 Column 220 Column A12 or A11 Column Column A13 to A15 or A12 to A15 Row tAC 0 tAC Data input tOH Data input tOH Column D0 to D15 Data input tOH 92CA25-368 2007-02-28 TMP92CA25 (5) SDRAM initialize timing tCK SDCLK tCH SDxxDQM tCMS SDCS tCL tRSC tRC tCMS SDRAS tCMS SDCAS tCMH tCMH tCMH SDWE tAS A1 to A12 tAH tAS 220 A20 to A23 (BS0 and BS1) 92CA25-369 2007-02-28 TMP92CA25 (6) SDRAM refresh timing tCK SDCLK tRC SDxxDQM tCMS SDCS tRC tCMH SDRAS SDCAS SDWE (7) SDRAM self refresh timing tCK SDCLK tCKS SDCKE tCKS tRC SDxxDQM tCMS SDCS tCMH SDRAS SDCAS SDWE 92CA25-370 2007-02-28 TMP92CA25 4.3.4 No. 1 2 3 4 5 6 NAND Flash Controller AC Characteristics Parameter Symbol Min Variable Max (1 + n) T − 25 (1 + n) T − 30 38 25 − 0 17.5 132.5 10.5 43.5 30.5 − 0 21.6 150.3 11.8 62 − 44 0 35.5 210.5 16.5 40 MHz 36 MHz 27 MHz Unit NDRE low width NDRE data access time Read data hold time NDWE low width Write data setup time Write data hold time AC measuring conditions tRP (1 + n) T − 12 tREA (3.0 V) tREA (2.7 V) tOH 0 tWP (0.75 + n) T − 20 tDS tDH (3.25 + n) T − 30 0.25 T − 2 ns • Output level: High = 0.7 VCC, Low = 0.3 VCC, CL = 50 pF • Input level: High = 0.9 VCC, Low = 0.1 VCC Note 1: The “n” shown in “Variable” refers to the wait number which is set to NDnFSPR register. Example: When NDnFSPR = “0001”, tRP = (1 + n) T − 12 = 2T − 12 Note 2: The figures in the “Variable” column cover the whole VCC range (2.7 V to 3.6 V). Exceptions are shown by the VCC (min), “(3.0 V)” or “(2.7 V)”, added to the “Symbol” column. Example: (3.0V) : VCC range = 3.0V to 3.6V SDCLK A0 to A23 NDRE Read cycle NDWE tRP D0 to D7 Data input tREA NDRE tOH tWP Write cycle NDWE tDS D0 to D7 Data output tDH 92CA25-371 2007-02-28 TMP92CA25 4.3.5 Serial Channel Timing (1) SCLK input mode (I/O interface mode) Parameter Symbol Min tSCY tOSS tOHS tHSR tSRD tRDS Variable Max 16T tSCY/2 − 4T − 110 tSCY/2 + 2T + 0 3 T + 10 tSCY − 0 0 40 MHz 36 MHz 27 MHz Unit 0.8 90 500 160 800 0 0.888 114 554 175 888 0 1.184 186 740 232 1184 0 μs SCLK cycle Output data → SCLK rising/falling SCLK rising/falling → Output data hold SCLK rising/falling → Input data hold SCLK rising/falling → Input data valid Input data valid → SCLK rising/falling ns (2) SCLK output mode (I/O Interface mode) Parameter SCLK cycle (Programmable) Output data → SCLK rising/falling SCLK rising/falling → Output data hold SCLK rising/falling → Input data hold SCLK rising/falling → Input data valid Input data valid → SCLK rising/falling Symbol Min tSCY tOSS tOHS tHSR tSRD tRDS Variable Max 8192T 16 T tSCY/2 − 40 tSCY/2 − 40 0 1 T + 180 40 MHz 36 MHz 27 MHz Unit 0.8 360 360 0 570 230 0.888 404 404 0 654 233 1.184 552 552 0 967 253 μs ns tSCY − 1T − 180 tSCY SCLK Output mode/ input rising mode SCLK (Input falling mode) tOSS Output data TXD 0 tSRD Input data RXD 0 Valid tRDS tHSR 1 Valid 2 Valid 3 Valid tOHS 1 2 3 4.3.6 Interrupt Operation Parameter Symbol Min tINTAL tINTAH 4 T + 40 4 T + 40 Variable Max 40 MHz 36 MHz 27 MHz Unit 240 240 262 262 336 336 ns INT0 to INT5 low width INT0 to INT5 high width 92CA25-372 2007-02-28 TMP92CA25 4.3.7 LCD Controller (SR mode) Parameter LCP0 clock period ( = tm) LCP0 high width LCP0 low width Data valid → LCP0 falling LCP0 falling → Data hold Symbol Min tCW tCWH tCWL tDSU tDHD Variable Max 2T 0.5 tm − 12 0.5 tm − 12 0.5 tm − 20 0.5 tm − 5 40 MHz 36 MHz 27 MHz Unit 100 38 38 30 45 111 43.5 43.5 35.5 50.5 148 62 62 54 69 ns tCW tCWH LCP0 tDSU LD0 to LD7 tDHD tCWL LD0 to LD7 output 4.3.8 I2S Timing (I2S, SIO Mode) Parameter Symbol Min tCR tHB tLB tSD tHD Variable Max T 0.5 tCR − 15 0.5 tCR − 15 0.5 tCR − 15 0.5 tCR − 5 40 MHz 36 MHz 27 MHz Unit 50 10 10 10 20 55 12 12 12 22 74 22 22 22 32 I2SCKO clock period I2SCKO high width I2SCKO low width I2SDO, I2SWS setup time I2SDO, I2SWS hold time AC measuring conditions ns • Output level: High = 0.7 VCC, Low = 0.3 VCC, CL = 10 pF tCR tLB I2SCKO tHD I2SDO tSD tHD tHB I2SWS 92CA25-373 2007-02-28 TMP92CA25 4.3.9 SPI control Timing Parameter Symbol Min tCR tHB tLB tSD tHD 0.5S −6 0.5S −13 0.5S −18 0.5S −21 0.5S −10 0S + 5 0S + 5 Variable Max 20 6 6 40 MHz 36 MHz 27 MHz Unit 20 6 6 19 12 7 4 15 5 5 18 6 6 21 14 9 6 17 5 5 13.5 6 6 31 24 19 16 27 5 5 ns MHz SPCLK frequency (=1/S) SPCLK rising time SPCLK falling time SPCLK Low pulse width SPCLK High pulse width Output data valid → SPCLK rise Output data valid → SPCLK fall SPCLK rise → Output data hold Input data valid → SPCLK rise SPCLK rise → Input data hold AC measuring conditions • Output level: High = 0.7 VCC, Low = 0.3 VCC, CL = 25 pF • Input level: High = 0.9 VCC, Low = 0.1 VCC fPP SPCLK output (When SPIMD = “11”) 0.7VCC 0.2VCC tf tWL tWH SPCLK output (When SPIMD = “00”) tr tODS SPDO output tIDS SPDI intput tODH tIDH 92CA25-374 2007-02-28 TMP92CA25 4.3.10 External bus release function Variable Parameter Floating time until BUSRQ falling Floating time until BUSAK rising Symbol Min tABA tBAA 40 MHz Max 30 30 36 MHz 0 0 27 MHz 0 0 Unit MHz ns 0 0 0 0 30 30 30 30 30 30 BUSRQ BUSAK tBAA Release pin tABA (Note) Note: This line show only that output buffer is OFF. This line does not show that signal level is middle. 92CA25-375 2007-02-28 TMP92CA25 4.4 AD Conversion Characteristics Parameter Symbol VREFH VREFL AVCC AVSS AVIN Min VCC − 0.2 VSS VCC VSS VREFL Typ. VCC VSS VCC VSS Max VCC VSS + 0.2 VCC VSS VREFH Unit Analog reference voltage (+) Analog reference voltage (−) AD converter power supply voltage AD converter ground Analog input voltage Analog current for analog reference voltage = 1 Analog current for analog reference voltage = 0 Total error (Quantize error of ± 0.5 LSB is included.) V 0.8 IREF 0.02 ET ±1.0 1.35 5.0 ±4.0 mA μA LSB Note 1: 1LSB = (VREFH – VREFL) / 1024 [V] Note 2: Minimum frequency for operation AD converter operation is guaranteed only when using fc (high-frequency oscillator). fs is not guaranteed. However, operation is guaranteed if the clock frequency selected by the clock gear is over 4MHz. Note 3: The value for Icc includes the current which flows through the AVCC pin. 92CA25-376 2007-02-28 TMP92CA25 4.5 Recommended Oscillation Circuit The TMP92CA25 has been evaluated by the oscillator vender below. Use this information when selecting external parts. Note: The total load value of the oscillator is the sum of external loads (C1 and C2) and the floating load of the actual assembled board. There is a possibility of operating error when using C1 and C2 values in the table below. When designing the board, design the minimum length pattern around the oscillator. We also recommend that oscillator evaluation be carried out using the actual board. (1) Connection example X1 Rf Rd Rd X2 XT1 XT2 C1 C2 C1 C2 High-frequency oscillator Low-frequency oscillator (2) Recommended ceramic oscillator: Murata Manufacturing Co., Ltd. Oscillation MCU Frequency [MHZ] 6.00 TMP92CA25FG Parameter of elements Oscillator Product Number CSTCR6M00G55-R0 CSTCE10M0G55-R0 CSTCE20M0V53-R0 C1 [pF] (39) (33) (15) C2 [pF] (39) (33) (15) Open 0 Rf [Ω] Rd [Ω] Running Condition Voltage of Power [V] 2.7 ∼ 3.6 Ta [°C] 10.00 20.00 -20 ∼ +80 Note 1: The figure in parentheses ( ) under C1 and C2 is the built-in condenser type. Note 2: The product numbers and specifications of the oscillators made by Murata Manufacturing Co., Ltd. are subject to change. For up-to-date information, please refer to the following URL: http://www.murata.co.jp 92CA25-377 2007-02-28 TMP92CA25 5. Table of Special function registers (SFRs) The SFRs include the I/O ports and peripheral control registers allocated to the 4-Kbyte address space from 000000H to 001FFFH. (1) I/O Port (2) Interrupt control (3) Memory controller (4) MMU (5) Clock gear, PLL (6) LCD controller (7) Touch screen I/F (8) SDRAM controller (9) 8-bit timer (10) 16-bit timer (11) UART/serial channel (12) SBI (13) SPI controller (14) AD converter (15) Watchdog timer (16) RTC (Real time clock) (17) Melody/alarm generator (18) NAND flash controller (19) I2S Table layout Symbol Name Address 7 6 1 0 Bit symbol Read/Write Initial value after reset Remarks Note: “Prohibit RMW” in the table means that you cannot use RMW instructions on these register. Example: When setting bit0 only of the register PxCR, the instruction “SET 0, (PxCR)” cannot be used. The LD (transfer) instruction must be used to write all eight bits. Read/Write R/W: R: W: W* : Prohibit RMW: Both read and write are possible. Only read is possible. Only write is possible. Both read and write are possible (when this bit is read as “1”.) Read-modify-write instructions are prohibited. (The EX, ADD, ADC, BUS, SBC, INC, DEC, AND, OR, XOR, STCF, RES, SET, CHG, TSET, RLC, RRC, RL, RR, SLA, SRA, SLL, SRL, RLD and RRD instruction are read-modify-write instructions.) Read-modify-write is prohibited when controlling the pull-up resistor. R/W*: 92CA25-378 2007-02-28 TMP92CA25 Table 5.1 I/O Register Address Map [1] Port Address 0000H 1H 2H 3H 4H P1 5H 6H P1CR 7H P1FC 8H 9H AH BH CH DH EH FH Name Address 0010H 1H 2H 3H 4H 5H 6H 7H 8H P6 9H Name Address 0020H P8 Name Address 0030H PC 1H Name 1H P8FC2 2H 3H P8FC 4H P9 5H P9FC2 6H P9CR 7H P9FC 8H PA 9H AH BH PAFC CH DH EH FH 2H PCCR 3H PCFC 4H 5H 6H 7H 8H 9H AH BH CH PF DH PFFC2 EH PFCR FH PFFC AH P6CR BH P6FC CH P7 DH EH P7CR FH P7FC Address 0040H PG 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH PJ DH Name Address 0050H PK 1H Name Address 0080H Name Address 1H 2H Name 0090H PGDR 1H P1DR 2H 3H 4H P4DR 5H P5DR 6H P6DR 7H P7DR 8H P8DR 9H P9DR AH PADR BH CH PCDR DH EH FH PFDR 2H PKCR 3H PKFC 4H PL 5H 6H PLCR 7H PLFC 8H PM 9H AH BH PMFC CH PN DH EH PNCR FH PNFC 3H PJDR 4H PKDR 5H PLDR 6H PMDR 7H PNDR 8H 9H AH BH CH DH EH FH EH PJCR FH PJFC Note: Do not access un-named addresses. 92CA25-379 2007-02-28 TMP92CA25 [2] INTC Address Name Address Name Address Name Address Name 00D0H INTE12 1H INTE34 2H 3H 4H INTETA01 5H INTETA23 6H 7H 8H INTETB01 9H AH INTETBO0 BH INTES0 CH DH EH FH 00E0H INTESPI 1H INTESBI 2H Reserved 3H Reserved 4H Reserved 5H INTALM01 6H INTALM23 7H INTALM4 8H INTERTC 9H INTEKEY AH INTELCD BH INTE5I2S CH INTEND01 DH Reserved EH INTEP0 FH Reserved 00F0H INTE0AD 1H INTETC01 2H INTETC23 3H INTETC45 4H INTETC67 5H SIMC 6H IIMC 7H INTWDT 8H INTCLR 9H AH BH CH DH EH FH 0100H DMA0V 1H DMA1V 2H DMA2V 3H DMA3V 4H DMA4V 5H DMA5V 6H DMA6V 7H DMA7V 8H DMAB 9H DMAR AH Reserved BH CH DH EH FH [3] MEMC Address Name Address 0150H 1H 2H 3H 4H 5H 6H 7H 8H BEXCSL 9H BEXCSH AH BH CH DH EH FH [4] MMU Name Address 0160H 1H 2H 3H 4H 5H 6H PMEMCR 7H 8H MEMCR0 9H AH BH CH DH EH FH Name Address Name 0140H B0CSL 1H B0CSH 2H MAMR0 3H MSAR0 4H B1CSL 5H B1CSH 6H MAMR1 7H MSAR1 8H B2CSL 9H B2CSH AH MAMR2 BH MSAR2 CH B3CSL DH B3CSH EH MAMR3 FH MSAR3 01D0H LOCALPX 1H LOCALPY 2H 3H LOCALPZ 4H LOCALLX 5H LOCALLY 6H 7H LOCALLZ 8H LOCALRX 9H LOCALRY AH BH LOCALRZ CH LOCALWX DH LOCALWY EH FH LOCALWZ Note: Do not access un-named addresses. 92CA25-380 2007-02-28 TMP92CA25 [5] CGEAR, PLL Address Name 10E0H SYSCR0 1H SYSCR1 2H SYSCR2 3H EMCCR0 4H EMCCR1 5H EMCCR2 6H Reserved 7H 8H PLLCR0 9H PLLCR1 AH BH CH DH EH FH [6] LCDC Address Name Address Name 0840H LCDMODE0 1H LCDFFP 2H LCDDVM 3H LCDSIZE 4H LCDCTL0 5H 6H LCDSCC 7H 8H 9H AH BH CH DH EH FH 0850H LSARAL 1H LSARAM 2H LSARAH 3H CMNAL 4H CMNAH 5H 6H LSARBL 7H LSARBM 8H LSARBH 9H CMNBL AH CMNBH BH CH LSARCL DH LSARCM EH LSARCH FH Note: Do not access un-named addresses. 92CA25-381 2007-02-28 TMP92CA25 [7] TSI Address Name 01F0H TSICR0 1H TSICR1 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH [8] SDRAMC Address Name 0250H SDACR1 1H SDACR2 2H SDRCR 3H SDCMM 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH [9] 8-bit timer Address 1H 2H TA0REG 3H TA1REG 4H TA01MOD 5H TA01FFCR 6H 7H 8H TA23RUN 9H AH TA2REG BH TA3REG CH TA23MOD DH TA3FFCR EH FH [10] 16-bit timer Address 1H 2H TB0MOD 3H TB0FFCR 4H 5H 6H 7H 8H TB0RG0L 9H TB0RG0H AH TB0RG1L BH TB0RG1H CH TB0CP0L DH TB0CP0H EH TB0CP1L FH TB0CP1H Name Name 1100H TA01RUN 1180H TB0RUN [11] SIO Address Name 1200H SC0BUF 1H SC0CR 2H SC0MOD0 3H BR0CR 4H BR0ADD 5H SC0MOD1 6H 7H 8H 9H AH BH CH DH EH FH [12] SBI Address Name 1240H SBI0CR1 1H SBI0DBR 2H I2C0AR 3H SBI0CR2/SBI0SR 4H SBI0BR0 5H SBI0BR1 6H 7H 8H 9H AH BH CH DH EH FH Note: Do not access un-named addresses. 92CA25-382 2007-02-28 TMP92CA25 [13] SPI controller Address Name Address Name 0820H SPIMD 1H SPIMD 2H SPICT 3H SPICT 4H SPIST 5H SPIST 6H SPICR 7H SPICR 8H SPIIS 9H SPIIS AH SPIWE BH SPIWE CH SPIIE DH SPIIE EH SPIIR FH SPIIR 0830H SPITD 1H SPITD 2H SPIRD 3H SPIRD 4H SPITS 5H SPITS 6H SPIRS 7H SPIRS 8H 9H AH BH CH DH EH FH Note: Do not access un-named addresses. 92CA25-383 2007-02-28 TMP92CA25 [14] 10-bit ADC Address Name Address 12B0H 1H 2H 3H 4H 5H 6H 7H 8H ADMOD0 9H ADMOD1 AH ADMOD2 BH Reserved CH DH EH FH [15] WDT Name Address Name 1300H WDMOD 1H WDCR 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH 12A0H ADREG0L 1H ADREG0H 2H ADREG1L 3H ADREG1H 4H ADREG2L 5H ADREG2H 6H ADREG3L 7H ADREG3H 8H Reserved 9H Reserved AH Reserved BH Reserved CH Reserved DH Reserved EH Reserved FH Reserved [16] RTC Address Name 1320H SECR 1H MINR 2H HOURR 3H DAYR 4H DATER 5H MONTHR 6H YEARR 7H PAGER 8H RESTR 9H AH BH CH DH EH FH [17] MLD Address Name 1330H ALM 1H MELALMC 2H MELFL 3H MELFH 4H ALMINT 5H 6H 7H 8H 9H AH BH CH DH EH FH Note: Do not access un-named addresses. 92CA25-384 2007-02-28 TMP92CA25 [18] NAND flash controller Address 1CC0H 1H 2H 3H 4H ND0FMCR 5H 6H 7H 8H ND0FSR 9H AH BH CH ND0FISR DH EH FH Name Address 1H 2H 3H Name Address 1CE0H 1H 2H 3H Name Address 1H 2H 3H Name 1CD0H ND0FIMR 1CF0H ND1FIMR 4H ND0FSPR 5H 6H 7H 8H ND0FRSTR 9H AH BH CH DH EH FH 4H ND1FMCR 5H 6H 7H 8H ND1FSR 9H AH BH CH ND1FISR DH EH FH 4H ND1FSPR 5H 6H 7H 8H ND1FRSTR 9H AH BH CH DH EH FH Address to 1EFFH Name ND1FDTR Address to 1CB5H Name ND1ECCRD Address 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH Name 1D00H ND0FDTR, 1CB0H ND0ECCRD 01C0H NDCR Note: Do not access un-named addresses. 92CA25-385 2007-02-28 TMP92CA25 [19] I2S Address 1H 2H 3H 4H 5H 6H 7H 8H I2SBUFL 9H AH BH CH DH EH I2SCTL0 FH I2SCTL0 Name 0800H I2SBUFR Note: Do not access un-named addresses. 92CA25-386 2007-02-28 TMP92CA25 (1) I/O ports (1/7) Symbol P1 Name Port 1 Address 0004H 7 P17 6 P16 5 P15 4 P14 3 P13 2 P12 1 P11 0 P10 P6 Port 6 0018H P7 Port 7 001CH P8 Port 8 0020H P9 Port 9 0024H PA Port A 0028H PC Port C 0030H PF Port F 003CH R/W Data from external port (Output latch register is cleared to “0”) P67 P66 P65 P64 P63 P62 P61 P60 R/W Data from external port (Output latch register is cleared to “0”) P76 P75 P74 P73 P72 P71 P70 R/W Data from external port Data from external port Data from external port (Output latch register is (Output latch register is (Output latch register is 1 set to “1”) cleared to “0”) set to “1”) P87 P86 P85 P84 P83 P82 P81 P80 R/W 1 1 1 1 1 0 1 1 P97 P96 P95 P94 P93 P92 P91 P90 R/W R Data from 0 Data from external port (Output latch register is set to “1”) external port PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 R Data from external port PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 R/W Data from external port (Output latch register is set to “1”) PF7 PF6 PF5 PF4 PF3 PF2 PF1 PF0 R/W Data from external port (Output latch register is set to “1”) PG3 PG2 PG1 R Data from external port PJ7 PJ6 PJ5 PJ4 PJ3 PJ2 PJ1 R/W Data from external port 1 1 1 1 1 (Output latch register is set to “1”) PK7 PK6 PK5 PK4 PK3 PK2 PK1 R/W Data from external port 0 0 0 (Output latch register is cleared to “0”) PL7 PL6 PL5 PL4 PL3 PL2 PL1 R/W Data from external port 0 0 0 (Output latch register is cleared to “0”) PM2 PM1 R/W 1 1 PN7 PN6 PN5 PN4 PN3 PN2 PN1 R/W Data from external port (Output latch register is set to “1”) 1 PG0 PG Port G 0040H PJ0 PJ Port J 004CH 1 PK0 0 PL0 0 PK Port K 0050H PL Port L 0054H PM Port M 0058H PN0 PN Port N 005CH 92CA25-387 2007-02-28 TMP92CA25 (1) I/O ports (2/7) Symbol P1CR Name Port 1 control register Address 0006H (Prohibit RMW) 7 P17C 0 6 P16C 0 5 P15C 0 4 P14C W 0 0: Input 3 P13C 0 1: Output 2 P12C 0 1 P11C 0 0 P10C 0 P1F W 0/1 0:Port 1:Data bus (D8 to D15) P1FC Port 1 function register 0007H (Prohibit RMW) P6CR Port 6 control register 001AH (Prohibit RMW) P67C 0 P67F P66C 0 P66F 1 P76C 0 P76F P65C 0 P65F 1 0: Port P75C 0 P75F 0 0: Port 1: NDR/ B at =1, R/ W P64C W 0 0: Input P64F W 1 P63C 0 1: Output P63F 1 P62C 0 P62F 1 P61C 0 P61F 1 P71C 0 P71F 0 0: Port 1: NDRE at=0, WRLL at=1 P60C 0 P60F 1 P6FC Port 6 function register 001BH (Prohibit RMW) 1 P7CR Port 7 control register 001EH (Prohibit RMW) P7FC Port 7 function register 001FH (Prohibit RMW) 0 0: Port 1: WAIT 1: Address bus (A16 to A23) P75C P74C P72C W 0 0 0 0: Input 1: Output P74F P73F P72F W 0 0 0 0: Port 1: EA25 0: Port 1: EA24 0: Port 1: NDWE at=0, WRLU at=1 P70F 1 0: Port 1: RD P87F P8FC Port 8 function register 0023H (Prohibit RMW) 0 0: Port 1: CSZE P86F 0 0: Port 1: CSZD P85F 0 0: Port 1: CSZC , ND1CE P84F W 0 0: Port 1: CSZB , ND0CE P83F 0 0: Port 1: CS3 P82F 0 0: Port, CSZA 1: CS2 P81F 0 0: Port 1: CS1 P80F 0 0: Port 1: CS0 P87F2 P8FC2 Port 8 function register2 0021H (Prohibit RMW) 0 0: 1:Reserved P86F2 0 0: 1: Reserved P85F2 0 0: Port, CSZC 1: ND1CE P84F2 W 0 0: Port, CSZB 1: ND0CE − 0 P82F2 0 P81F2 0 0: 1: SDCS − 0 Always write “0” Always write 0: Port CS2 “0” 1: CSZA 92CA25-388 2007-02-28 TMP92CA25 (1) I/O ports (3/7) Symbol Name Address 7 6 5 P95C 0 P9CR Port 9 control register 0026H (Prohibit RMW) 0: Port 1: CLK32KO 4 P94C 0 0: Port 1: Port, SCL 3 P93C W 0 0:Port 1: Port, SDA 2 P92C 0 0:Port, SCLK0, CTS0 I2SWS 1:Port, SCLK0 1 P91C 0 0: Port, RXD0 I2SDO 1: Port 0 P90C 0 0:Port, I2SCKO 1: Port, TXD0 P97F Port 9 function register 0027H (Prohibit RMW) 0 0: Port 1: INT5 P96F 0 0: Port 1: INT4 P95F 0 0:Port, CLK32KO 1: Reserved P94F W 0 0: Port 1: SCL P93F 0 0: Port 1: SDA P92F 0 0: Port, SCLK0, CTS0 1: I2SWS, SCLK0 P91F 0 0: Port, RXD0 1: I2SDO P90F 0 0: Port 1: I2SCKO, TXD0 P9FC P94F2 P9FC2 Port 9 function register2 0025H (Prohibit RMW) W 0 0: CMOS 1: Open drain P93F2 0 0: CMOS 1: Open drain P90FC2 W 0 0: CMOS 1: Open drain PAFC Port A function register Port C control register 002BH (Prohibit RMW) 0032H (Prohibit RMW) PA7F 0 PC7C 0 PC7F 0 PA6F 0 PC6C 0 PC6F 0 0: Port 1:KO8 (Open -Drain) EA24 at = 0 PA5F PA4F W PA3F PA2F PA1F 0 PC1C 0 PC1F 0 0: Port 1: INT1, TA3OUT PA0F 0 PC0C 0 PC0F 0 0: Port 1: INT0, TA1OUT 0 0 0: Key-in disable PC5C 0 PC5F 0 PC4C W 0 0: Input PC4F W 0 0 0 1: Key-in enable PC3C 0 1: Output PC3F 0 0: Port 1: INT3 PC2C 0 PC2F 0 0: Port 1: INT2, TB0OUT0 PCCR PCFC Port C function register 0033H (Prohibit RMW) 0: Port 1: CSZF , EA25 at = 0 0: Port 0: Port 1:Reserved 1:Reserved 92CA25-389 2007-02-28 TMP92CA25 (1) I/O ports (4/7) Symbol Name Address 7 6 PF6C 0 Port F control register 003EH (Prohibit RMW) 0: Port 1: Port 5 PF5C 0 0: Port 1: Port 4 PF4C 0 0: Port 1: Port 3 PF3C W 0 0: Port 1: Port 2 PF2C 0 0: Port, SCLK0, CTS0 , 1 PF1C 0 0: Port, RXD0 1: Port 0 PF0C 0 0: Port 1: Port, TXD0 PFCR (From PF2 at = 0) (from P92 at = 1) 1: Port, SCLK0 PF7F 0 PFFC Port F function register 003FH (Prohibit RMW) 0: Port 1: SDCLK PF6F 0 PF5F 0 PF4F W 0 0: Port 1:Reserved PF3F 0 PF2F 0 PF1F 0 0: Port RXD0 (from PF1 pin) 1: RXD0 (from P91 pin) PF0F 0 0: Port 1: TXD0 0: Port 0: Port 1: Reserved 1:Reserved 0: Port 0: Port, 1:Reserved SCLK0, CTS0 (from PF2 at =0) (from P92 at =1) 1:SCLK0 − W PFFC2 Port F function register2 003DH (Prohibit RMW) 0 Always write “0” − W 0 Always write “0” PF0F2 W 0 Output buffer 0: CMOS 1: Open-drain PJCR Port J control register 004EH (Prohibit RMW) PJ7F PJ6C W 0 PJ6F 0 PJ5C 0 PJ5F 0 PJ4F W 0 PJ3F 0 PJ2F 0 PJ1F 0 PJ0F 0 0:Input 1: Output PJFC Port J function register 004FH (Prohibit RMW) 0 0: Port 1: SDCKE at =1 0: Port 0: Port 0: Port 1: NDCLE at 1: NDALE at 1: =0 =0 SDLUDQM at =1 0: Port 0: Port 1: SDWE , 1: SDLLDQM SDWR at =1 0: Port 0: Port 1: SDCAS , 1: SDRAS , SRLUB SRLLB PK7C Port K PKCR Control Register 0052H (Prohibit RMW) 0 PK7F PKFC Port K function register 0053H (Prohibit RMW) 0 0: Port 1: SPCLK PK7C W 0 0:Input PK6F 0 0: Port 1: SPCS PK7C 0 1: Output PK5F 0 0: Port 1: SPDO PK7C 0 PK4F 0 0: Port 1: SPDI PK3F 0 0: Port 1: LBCD PK2F W 0 0: Port 1: LFR PK1F 0 0: Port 1: LLP PK0F 0 0: Port 1: LCP0 92CA25-390 2007-02-28 TMP92CA25 (1) I/O ports (5/7) Symbol PLCR Name Port L control register Address 0056H (Prohibit RMW) 7 PL7C 0 PL7F 6 PL6C W 0 PL6F 0 0: Port 1: LD6, BUSRQ 5 PL5C 0 PL5F 0 0: Port 1: LD5 4 PL4C 0 PL4F W 0 0: Port 1: LD4 3 2 1 0 0: Input 1: Output PL3F 0 0: Port PL2F 0 PL1F 0 PL0F 0 PLFC Port L function register 0057H (Prohibit RMW) 0 0: Port 1: LD7, BUSAK 1: Data bus for LCDC (LD3 to LD0) PM2F PM1F W 0 0: Port 1: ALARM MLDALM PMFC Port M function register 005BH (Prohibit RMW) 0 0: Port 1: MLDALM output Port N PNCR Control Register 005EH (Prohibit RMW) PN7C 0 PN7F PN6C 0 PN6F 0 PN5C 0 PN5F 0 PN4C W 0 PN4F W 0 PN3C 0 PN3F 0 PN2C 0 PN2F 0 PN1C 0 PN1F 0 PN0C 0 PN0F 0 0:Input 1: Output Port N PNFC Function Register 005FH (Prohibit RMW) 0 0: CMOS output 1: Open drain output 92CA25-391 2007-02-28 TMP92CA25 (1) I/O ports (6/7) Symbol P1DR Name Port 1 drive register Address 0081H 7 P17D 1 P47D 6 P16D 1 P46D 1 P56D 1 P66D 1 P76D 5 P15D 1 4 P14D R/W 1 3 P13D 1 2 P12D 1 1 P11D 1 0 P10D 1 P40D 1 P50D 1 P60D 1 P70D 1 P80D 1 P90D 1 PA0D 1 PC0D 1 PF0D 1 Input/Output buffer drive register for standby mode P45D P44D P43D P42D P41D R/W 1 1 1 1 1 P4DR Port 4 drive register 0084H 1 P57D Input/Output buffer drive register for standby mode P55D P54D P53D P52D P51D R/W 1 1 1 1 1 P5DR Port 5 drive register 0085H 1 P67D Input/Output buffer drive register for standby mode P65D P64D P63D P62D P61D R/W 1 P75D 1 P85D 1 P95D 1 1 P74D 1 P84D R/W 1 P94D R/W 1 1 P73D R/W 1 P83D 1 P93D 1 1 P72D 1 P82D 1 P92D 1 1 P71D 1 P81D 1 P91D 1 P6DR Port 6 drive register 0086H 1 Input/Output buffer drive register for standby mode Port 7 drive register P7DR 0087H 1 P87D P86D 1 P96D 1 PA6D 1 PC6D 1 PF6D 1 Input/Output buffer drive register for standby mode Port 8 drive register P8DR 0088H 1 P97D Input/Output buffer drive register for standby mode Port 9 drive register P9DR 0089H 1 PA7D Input/Output buffer drive register for standby mode PA5D PA4D PA3D PA2D PA1D R/W 1 1 1 1 1 PADR Port A drive register 008AH 1 PC7D Input/Output buffer drive register for standby mode PC5D PC4D PC3D PC2D PC1D R/W 1 PF5D 1 1 PF4D R/W 1 1 PF3D 1 PG3D 1 PF2D 1 PG2D R/W 1 1 PF1D 1 PCDR Port C drive register 008CH 1 PF7D Input/Output buffer drive register for standby mode Port F drive register PFDR 008FH 1 Input/Output buffer drive register for standby mode PGDR Port G drive register 0090H 1 Input/Output buffer drive register for standby mode 92CA25-392 2007-02-28 TMP92CA25 (1) I/O ports (7/7) Symbol PJDR Name Port J drive register Address 0093H 7 PJ7D 1 PK7D 6 PJ6D 1 PK6D 1 5 PJ5D 1 PK5D 1 4 PJ4D R/W 1 PK4D R/W 1 3 PJ3D 1 PK3D 1 2 PJ2D 1 PK2D 1 1 PJ1D 1 PK1D 1 0 PJ0D 1 PK0D 1 PL0D 1 Input/Output buffer drive register for standby mode Port K drive register PKDR 0094H 1 PL7D 0095H 1 PLDR Port L drive register PMDR Port M drive register Input/Output buffer drive register for standby mode PL6D PL5D PL4D PL3D PL2D PL1D R/W 1 1 1 1 1 1 Input/Output buffer drive register for standby mode PM2D PM1D R/W 1 1 Input/Output buffer drive register for standby mode 0096H PNDR Port N drive register PN7D 0097H 1 PN6D 1 PN5D PN4D R/W PN3D PN2D PN1D 1 PN0D 1 1 1 1 1 Input/Output buffer drive register for standby mode 92CA25-393 2007-02-28 TMP92CA25 (2) Interrupt control (1/4) Symbol INTE12 Name INT1 & INT2 enable Address 00D0H 7 I2C R 0 I4C R 0 ITA1C R 0 ITA3C R 0 ITB1C R 0 − − 6 INT2 I2M2 0 INT4 I4M2 5 I2M1 R/W 0 4 I2M0 0 I4M0 0 ITA1M0 0 ITA3M0 0 ITB1M0 0 − 3 I1C R 0 I3C R 0 ITA0C R 0 ITA2C R 0 ITB0C R 0 ITBO0C R 0 IRX0C R 0 − − 2 INT1 I1M2 0 INT3 I3M2 1 I1M1 R/W 0 0 I1M0 0 I3M0 0 ITA0M0 0 ITA2M0 0 ITB0M0 0 ITBO0M0 0 IRX0M0 0 − INTE34 INT3 & INT4 enable 00D1H INTETA01 INTTA0 & INTTA1 enable INTTA2 & INTTA3 enable INTTB0 & INTTB1 enable INTTBO0 (Overflow) enable INTRX0 & INTTX0 enable 00D4H INTETA23 00D5H INTETB01 00D8H I4M1 R/W 0 0 INTTA1 (TMRA1) ITA1M2 ITA1M1 R/W 0 0 INTTA3 (TMRA3) ITA3M2 ITA3M1 R/W 0 0 INTTB1 (TMRB1) ITB1M2 ITB1M1 R/W 0 0 − − − Always write “0” INTTX0 ITX0M2 ITX0M1 R/W 0 0 INTSPI ISPIM2 0 − − ISPIM1 R/W 0 − I3M1 R/W 0 0 INTTA0 (TMRA0) ITA0M2 ITA0M1 R/W 0 0 INTTA2 (TMRA2) ITA2M2 ITA2M1 R/W 0 0 INTTB0 (TMRB0) ITB0M2 ITB0M1 R/W 0 0 INTTBO0 (TMRB0) ITBO0M2 ITBO0M1 R/W 0 0 INTRX0 IRX0M2 IRX0M1 R/W 0 0 − − − Always write “0” INTSBI ISBIM2 0 IA0M2 0 IA2M2 0 ISBIM1 R/W 0 IA0M1 R/W 0 INTALM2 IA2M1 R/W 0 − INTETBO0 00DAH INTES0 00DBH ITX0C R 0 ISPIC R 0 − − ITX0M0 0 ISPIM0 0 − INTESPI INTSPI enable 00E0H INTESBI INTSBI enable 00E1H − − Always write “0” INTALM1 IA1M2 0 IA3M2 0 IA1M1 R/W 0 INTALM3 IA3M1 R/W 0 ISBIC R 0 IA0C R 0 IA2C R 0 ISBIM0 0 IA0M0 0 IA2M0 0 INTALM0 IA1M0 0 IA3M0 0 INTEALM01 INTALM0 & INTALM1 enable 00E5H IA1C R 0 IA3C R 0 INTEALM23 INTALM2 & INTALM3 enable 00E6H 92CA25-394 2007-02-28 TMP92CA25 (2) Interrupt control (2/4) Symbol INTEALM4 Name INTALM4 enable Address 00E7H 7 − − 6 − − 5 4 − 3 IA4C R 0 IRC R 0 IKC R 0 ILCD1C R 0 I5C R 0 IN0C R 0 IP0C R 0 2 1 0 IA4M0 0 IRM0 0 IKM0 0 ILCDM0 0 I5M0 0 IN0M0 0 IP0M0 0 − − Always write “0” − − − Always write “0” − − − Always write “0” − − − Always write “0” INTI2S II2SM2 II2SM1 R/W 0 0 INTNDF1 IN1M2 IN1M1 R/W 0 0 − − − − Always write “0” − − − INTALM4 IA4M2 IA4M1 R/W 0 0 INTRTC IRM2 IRM1 R/W 0 0 INTKEY IKM2 IKM1 R/W 0 0 INTLCD ILCDM2 ILCDM1 R/W 0 0 INT5 I5M1 R/W 0 0 INTNDF0 IN0M2 IN0M1 R/W 0 0 INTP0 IP0M2 IP0M1 R/W 0 0 I5M2 INTERTC INTRTC enable 00E8H − − − INTEKEY INTKEY enable 00E9H − − − INTELCD INTLCD enable 00EAH − − − INTE5I2S INT5 & INTI2S enable INTNDF0 & INTNDF1 enable 00EBH II2SC R 0 IN1C R 0 − − II2SM0 0 IN1M0 0 − INTEND01 00ECH INTEP0 INTP0 enable 00EEH 92CA25-395 2007-02-28 TMP92CA25 (2) Interrupt control (3/4) Symbol INTE0AD Name INT0 & INTAD enable INTTC0 & INTTC1 enable INTTC2 & INTTC3 enable INTTC4 & INTTC5 enable INTTC6 & INTTC7 enable Address 00F0H 7 IADC R 0 ITC1C R 0 ITC3C R 0 ITC5C R 0 ITC7C R 0 − W 0 Always write “0”. 6 5 4 IADM0 0 ITC1M0 0 ITC3M0 0 ITC5M0 0 ITC7M0 0 3 I0C R 0 ITC0C R 0 ITC2C R 0 ITC4C R 0 ITC6C R 0 2 INT0 I0M2 1 0 I0M0 0 ITC0M0 0 ITC2M0 0 ITC4M0 0 ITC6M0 0 IR0LE W 1 0: INTRX0 edge mode 1: INTRX0 level mode − R/W 0 Always write “0”. INTETC01 00F1H INTETC23 00F2H INTAD IADM2 IADM1 R/W 0 0 INTTC1 (DMA1) ITC1M2 ITC1M1 R/W 0 0 INTTC3 (DMA3) ITC3M2 ITC3M1 R/W 0 0 INTTC5 (DMA5) ITC5M2 ITC5M1 R/W 0 0 INTTC7 (DMA7) ITC7M2 ITC7M1 R/W 0 0 I0M1 R/W 0 0 INTTC0 (DMA0) ITC0M2 ITC0M1 R/W 0 0 INTTC2 (DMA2) ITC2M2 ITC2M1 R/W 0 0 INTTC4 (DMA4) ITC4M2 ITC4M1 R/W 0 0 INTTC6 (DMA6) ITC6M2 ITC6M1 R/W 0 0 − 1 Always write “1”. INTETC45 00F3H INTETC67 00F4H SIMC SIO interrupt mode control 00F5H (Prohibit RMW) I5EDGE 0 INT5 edge 0: Rising 1: Falling I4EDGE 0 INT4 edge 0: Rising 1: Falling I3EDGE 0 INT3 edge 0: Rising 1: Falling IIMC Interrupt input mode control 00F6H (Prohibit RMW) I2EDGE W 0 INT2 edge 0: Rising 1: Falling I1EDGE 0 INT1 edge 0: Rising 1: Falling I0EDGE 0 INT0 edge 0: Rising 1: Falling I0LE 0 0: INT0 edge mode 1:INT0 level mode − − CLRV1 0 − INTWDT INTWD enable 00F7H − − CLRV7 0 − − Always write “0” CLRV6 0 CLRV5 0 − − ITCWD R 0 CLRV3 W 0 0 Interrupt vector 0 − − INTWD − − CLRV0 0 INTCLR Interrupt clear control 00F8H (Prohibit RMW) CLRV4 CLRV2 92CA25-396 2007-02-28 TMP92CA25 (2) Interrupt control (4/4) Symbol DMA0V Name DMA0 start vector Address 0100H 7 6 5 DMA0V5 0 DMA1V5 4 DMA0V4 0 DMA1V4 0 DMA2V4 3 2 1 DMA0V1 0 DMA1V1 0 DMA2V1 0 DMA3V1 0 DMA4V1 0 DMA5V1 0 DMA6V1 0 DMA7V1 0 DBST1 0 DREQ1 0 0 DMA0V0 0 DMA1V0 0 DMA2V0 0 DMA3V0 0 DMA4V0 0 DMA5V0 0 DMA6V0 0 DMA7V0 0 DBST0 0 DREQ0 0 DMA0V3 DMA0V2 R/W 0 0 DMA0 start vector DMA1V3 DMA1V2 R/W 0 0 DMA1 start vector DMA1V DMA1 start vector 0101H 0 DMA2V5 DMA2V DMA2 start vector 0102H DMA3V DMA3 start vector 0103H DMA4V DMA4 start vector 0104H DMA5V DMA5 start vector 0105H DMA6V DMA6 start vector 0106H DMA7V DMA7 start vector 0107H DBST7 DMAB DMA burst 0108H 0 DREQ7 0 DBST6 0 DREQ6 0 DMAR DMA request 0109H (Prohibit RMW) DMA2V3 DMA2V2 R/W 0 0 0 0 DMA2 start vector DMA3V5 DMA3V4 DMA3V3 DMA3V2 R/W 0 0 0 0 DMA3 start vector DMA4V5 DMA4V4 DMA4V3 DMA4V2 R/W 0 0 0 0 DMA4 start vector DMA5V5 DMA5V4 DMA5V3 DMA5V2 R/W 0 0 0 0 DMA5 start vector DMA6V5 DMA6V4 DMA6V3 DMA6V2 R/W 0 0 0 0 DMA6 start vector DMA7V5 DMA7V4 DMA7V3 DMA7V2 R/W 0 0 0 0 DMA7 start vector DBST5 DBST4 DBST3 DBST2 R/W 0 0 0 0 1: DMA request on burst mode DREQ5 DREQ4 DREQ3 DREQ2 R/W 0 0 0 0 1: DMA request in software 92CA25-397 2007-02-28 TMP92CA25 (3) Memory controller (1/3) Symbol Name Address 7 6 B0WW2 BLOCK0 CS/WAIT control register low 0140H (Prohibit RMW) 5 B0WW1 W 1 4 B0WW0 3 2 B0WR2 1 B0WR1 W 1 0 B0WR0 B0CSL B0E BLOCK0 CS/WAIT control register high 0141H (Prohibit RMW) 0 0 Write waits 001: 0 waits 010: 1 wait 101: 2 waits 110: 3 waits 011: (1+ N) waits 111: 4 waits Others: Reserved − − B0REC W 0 Always write “0”. 0 Dummy cycle 0:No insert 1: Insert B1WW0 B0OM1 0 0 Read waits 001: 0 waits 010: 1 wait 101: 2 waits 110: 3 waits 011: (1+ N) waits 111: 4 waits Others: Reserved B0OM0 B0BUS1 B0BUS0 0/1 0/1 Data bus width 00: 8 bits 01: 16 bits 10: 32 bits 11: Reserved B1WR1 B1WR0 W 1 0 B0CSH 0 0 CS select Always 0: Disable write “0”. 1: Enable 0 0 00: ROM/SRAM 01: Reserved 10: Reserved 11: Reserved B1WR2 B1WW2 BLOCK1 CS/WAIT control register low 0144H (Prohibit RMW) B1CSL B1E BLOCK1 CS/WAIT control register high 0145H (Prohibit RMW) 0 0 Write waits 001: 0 waits 010: 1 wait 101: 2 waits 110: 3 waits 011: (1+ N) waits 111: 4 waits Others: Reserved − − B1REC W 0 Always write “0”. 0 Dummy cycle 0:No insert 1: Insert B2WW0 B1WW1 W 1 B1OM1 0 Read waits 001: 0 waits 010: 1 wait 101: 2 waits 110: 3 waits 011: (1+ N) waits 111: 4 waits Others: Reserved B1OM0 B1BUS1 B1BUS0 0/1 0/1 Data bus width 00: 8 bits 01: 16 bits 10: 32 bits 11: Reserved B2WR1 B2WR0 W 1 0 B1CSH 0 0 CS select Always 0: Disable write “0”. 1: Enable 0 0 00: ROM/SRAM 01: Reserved 10: Reserved 11: SDRAM B2WR2 B2WW2 BLOCK2 CS/WAIT control register low 0148H (Prohibit RMW) B2CSL B2E BLOCK2 CS/WAIT control register high 0149H (Prohibit RMW) 0 0 Write waits 001: 0 waits 010: 1 wait 101: 2 waits 110: 3 waits 011: (1+ N) waits 111: 4 waits Others: Reserved B2M − B2REC W 0 Always write “0”. 0 Dummy cycle 0:No insert 1: Insert B2WW1 W 1 B2OM1 0 Read waits 001: 0 waits 010: 1 wait 101: 2 waits 110: 3 waits 011: (1+ N) waits 111: 4 waits Others: Reserved B2OM0 B2BUS1 B2BUS0 0/1 0/1 Data bus width 00: 8 bits 01: 16 bits 10: 32 bits 11: Reserved B2CSH 1 0 CS select 0: 16 MB 0: Disable 1: Sets 1: Enable area 0 0 00: ROM/SRAM 01: Reserved 10: Reserved 11: SDRAM 92CA25-398 2007-02-28 TMP92CA25 (3) Memory controller (2/3) Symbol Name Address 7 6 B3WW2 BLOCK3 CS/WAIT control register low 014CH (Prohibit RMW) 5 B3WW1 W 1 4 B3WW0 3 2 B3WR2 1 B3WR1 W 1 0 B3WR0 B3CSL B3E BLOCK3 CS/WAIT control register high 014DH (Prohibit RMW) 0 0 Write waits 001: 0 waits 010: 1 wait 101: 2 waits 110: 3 waits 011: (1 + N) waits 111: 4 waits Others: Reserved − − B3REC W 0 Dummy cycle 0:No insert 1: Insert BEXWW2 BEXWW1 BEXWW0 W 0 1 0 Write waits 001: 2 waits 010: 1 wait 101: 2 waits 110: 2 waits 011: (1 + N) waits Others: Reserved 0 Always write “0”. B3OM1 0 0 Read waits 001: 0 waits 010: 1 wait 101: 2 waits 110: 3 waits 011: (1 + N) waits 111: 4 waits Others: Reserved B3OM0 B3BUS1 B3BUS0 B3CSH 0 0 CS select Always 0: Disable write “0”. 1: Enable BEXCSL BLOCK EX CS/WAIT control register low 0158H (Prohibit RMW) BEXCSH BLOCK EX CS/WAIT control register high 0159H (Prohibit RMW) PMEMCR Page ROM control register 0166H 0/1 0/1 Data bus width 00: 8 bits 01: 16 bits 10: 32 bits 11: Reserved BEXWR2 BEXWR1 BEXWR0 W 0 1 0 Read waits 001: 2 waits 010: 1 wait 101: 2 waits 110: 2 waits 011: (1 + N) waits Others: Reserved BEXOM1 BEXOM0 BEXBUS1 BEXBUS0 W 0 0 0/1 0/1 00: ROM/SRAM 00: 8 bits 01: Reserved 01: 16 bits 10: Reserved 10: 32 bits 11: Reserved 11: Reserved OPGE OPWR1 OPWR0 PR1 PR0 R/W 0 0 0 1 0 ROM Wait number on page Byte number in a 00: 1 CLK (n-1-1-1 mode) page page 01: 2 CLK (n-2-2-2 mode) 00: 64 bytes access 0: Disable 10: 3 CLK (n-3-3-3 mode) 01: 32 bytes 10: 16 bytes 1: Enable 11: Reserved 11: 8 bytes 0 0 00: ROM/SRAM 01: Reserved 10: Reserved 11: Reserved 92CA25-399 2007-02-28 TMP92CA25 (3) Memory controller (3/3) Symbol MAMR0 Name Memory address mask register 0 Memory start address register 0 Memory address mask register 1 Memory start address register 1 Memory address mask register 2 Memory start address register 2 Memory address mask register 3 Memory start address register 3 Address 0142H 7 M0V20 1 M0S23 6 M0V19 1 M0S22 1 M1V20 1 M1S22 1 M2V21 1 M2S22 1 M3V21 1 M3S22 1 5 M0V18 4 M0V17 3 M0V16 2 M0V15 1 M0V14-9 1 M0S17 1 MV15-9 1 M1S17 1 M2V16 1 M2S17 1 M3V16 1 M3S17 1 0 M0V8 1 M0S16 1 M1V8 1 M1S16 1 M2V15 1 M2S16 1 M3V15 1 M3S16 1 MSAR0 0143H 1 M1V21 MAMR1 0146H 1 M1S23 MSAR1 0147H 1 M2V22 MAMR2 014AH 1 M2S23 MSAR2 014BH 1 M3V22 MAMR3 014EH 1 M3S23 MSAR3 014FH 1 R/W 1 1 1 1 0: Compare enable 1: Compare disable M0S21 M0S20 M0S19 M0S18 R/W 1 1 1 1 Set start address A23 to A16 M1V19 M1V18 M1V17 M1V16 R/W 1 1 1 1 0: Compare enable 1: Compare disable M1S21 M1S20 M1S19 M1S18 R/W 1 1 1 1 Set start address A23 to A16 M2V20 M2V19 M2V18 M2V17 R/W 1 1 1 1 0: Compare enable 1: Compare disable M2S21 M2S20 M2S19 M2S18 R/W 1 1 1 1 Set start address A23 to A16 M3V20 M3V19 M3V18 M3V17 R/W 1 1 1 1 0:Compare enable 1:Compare disable M3S21 M3S20 M3S19 M3S18 R/W 1 1 1 1 Set start address A23 to A16 CSDIS MEMCR0 Memory control register 0 0168H RDTMG1 RDTMG0 R/W 0 0 0 0: Disable 00: RD “H” pulse width = 0.5T (Default) 1: Enable 01: RD “H” pulse width = 0.75T 10: RD “H” pulse width =1.0T 11: Reserved 92CA25-400 2007-02-28 TMP92CA25 (4) MMU Symbol Name LOCALX register for program Address 7 LXE R/W 6 5 4 X4 0 3 X3 0 2 X2 R/W 0 1 X1 0 0 X0 0 LOCALPX 01D0H LOCALPY LOCALY register for program 0 LOCALX 1: Enable LYE R/W 0 LOCALY 1: Enable LZE R/W 0 LOCALZ 1: Enable LXE R/W 0 LOCALX 1: Enable LYE R/W 0 LOCALY 1: Enable LZE R/W 0 LOCALZ 1: Enable LXE R/W 0 LOCALX 1: Enable LYE R/W 0 LOCALY 1: Enable LZE R/W 0 LOCALZ 1: Enable LXE R/W 0 LOCALX 1: Enable LYE R/W 0 LOCALY 1: Enable LZE R/W 0 LOCALZ 1: Enable BANK number for LOCALX Setting Y4 0 Y3 0 Y2 R/W 0 Y1 0 Y0 0 01D1H BANK number for LOCALY Setting Z6 0 Z5 0 Z4 0 Z3 R/W 0 Z2 0 Z1 0 Z0 0 LOCALPZ LOCALZ register for program 01D3H BANK number for LOCALZ Setting X4 0 X3 0 X2 R/W 0 X1 0 X0 0 LOCALLX LOCALX register for LCDC 01D4H BANK number for LOCALX Setting Y4 0 Y3 0 Y2 R/W 0 Y1 0 Y0 0 LOCALLY LOCALY register for LCDC 01D5H BANK number for LOCALY Setting Z6 0 Z5 0 Z4 0 Z3 R/W 0 Z2 0 Z1 0 Z0 0 LOCALLZ LOCALZ register for LCDC 01D7H BANK number for LOCALZ Setting X4 0 X3 0 X2 R/W 0 X1 0 X0 0 LOCALRX LOCALX register for read 01D8H BANK number for LOCALX Setting Y4 0 Y3 0 Y2 R/W 0 Y1 0 Y0 0 LOCALRY LOCALY register for read 01D9H BANK number for LOCALY Setting Z6 0 Z5 0 Z4 0 Z3 R/W 0 Z2 0 Z1 0 Z0 0 LOCALRZ LOCALZ register for read 01DBH BANK number for LOCALZ Setting X4 0 X3 0 X2 R/W 0 X1 0 X0 0 LOCALX LOCALWX register for write 01DCH BANK number for LOCALX Setting Y4 0 Y3 0 Y2 R/W 0 Y1 0 Y0 0 LOCALY LOCALWY register for write 01DDH BANK number for LOCALY Setting Z6 0 Z5 0 Z4 0 Z3 R/W 0 Z2 0 Z1 0 Z0 0 LOCALWZ LOCALZ register for write 01DFH BANK number for LOCALZ Setting 92CA25-401 2007-02-28 TMP92CA25 (5) Clock gear, PLL Symbol Name System clock control register 0 Address 7 XEN R/W 1 H-OSC (fc) 0: Stop 1: Oscillation 6 XTEN 1 L-OSC (fs) 0: Stop 1: Oscillation 5 4 3 2 WUEF R/W 0 Warm-up timer 1 0 SYSCR0 10E0H SYSCK 0 Select system clock 0: fc 1: fs − R/W 0 Always write “0” SYSCR1 System clock control register 1 10E1H SYSCR2 System clock control register 2 10E2H PROTECT WUPTM1 WUPTM0 HALTM1 R/W 1 0 1 1 HALT mode Warm-up timer 00: Reserved 00: Reserved 01: 28/Inputted frequency 01: STOP mode 10: 214/Inputted frequency 10: IDLE1 mode 11: 216/Inputted frequency 11: IDLE2 mode EXTIN 0 GEAR2 GEAR1 GEAR0 R/W 1 0 0 Select gear value of high frequency (fc) 000: fc 101: (Reserved) 001: fc/2 110: (Reserved) 010: fc/4 111: (Reserved) 011: fc/8 100: fc/16 HALTM0 DRVOSCH DRVOSCL EMCCR0 EMC control register 0 10E3H R 0 Protect flag 0: OFF 1: ON 1: External clock R/W 1 High frequency oscillator driver ability 1 Low frequency oscillator driver ability 1: NORMAL 1: NORMAL 0: WEAK 0: WEAK EMCCR1 EMCCR2 EMC control register 1 EMC control register 2 10E4H 10E5H Switching the protect ON/OFF by write to following 1st KEY, 2nd KEY 1st KEY: EMCCR1=5AH, EMCCR2=A5H in succession write 2nd KEY: EMCCR1=A5H, EMCCR2=5AH in succession write FCSEL R/W 0 Select fc clock 0: fOSCH 1: fPLL PLLON R/W 0 Control on/off 0: OFF 1: ON LUPFG R 0 Lock up timer status flag PLLCR0 PLL control register 0 10E8H PLLCR1 PLL control register 1 10E9H 92CA25-402 2007-02-28 TMP92CA25 (6) LCD controller (1/2) Symbol Name Address 7 6 5 SCPW1 4 SCPW0 3 LMODE 2 INTMODE 1 LDO1 0 LDO0 RAMTYPE1 RAMTYPE0 R/W 0 LCDMODE0 0 1 0 0 LCDD type 0: SR 1: Built-in RAM type 0 Select interrupt 0: LP 1: BCD 0 0 LCD mode 0 register 0840H Display RAM 00: Internal SRAM1 01: External SRAM 10: SDRAM 11: Internal SRAM2 LD bus transmission speed 00: Reserved 01: 2 × fSYS 10: 4× fSYS 11: 8× fSYS LD bus width control 00: 4bit width A_type 01: 4bit width B_type 10: 8bit width type Others: Reserved LCDFFP LCD frame frequency register FP7 0841H 0 FMN7 0283H 0 COM3 FP6 0 FMN6 0 COM2 FP5 0 FMN5 0 COM1 FP4 R/W FP3 FP2 0 FMN2 0 SEG2 FP1 0 FMN1 0 SEG1 FP0 0 FMN0 0 SEG0 0 LCDDVM LCD divide FRM register 0 0 bit7 to bit0 fFP setting FMN4 FMN3 R/W 0 0 DVM bit7 to bit0 setting COM0 SEG3 R/W LCDSIZE LCD size register 0843H 0 0 0 0 Common setting 0000: Reserved 0101: 200 0001: 64 0110: 240 0010: 120 0111: 320 0011: 128 1000: 480 0100: 160 Others: Reserved ALL0 FRMON − 0 0 FR divide setting 0: Disable 1: Enable 0 0 0 Segment setting 0000: Reserved 0101: 320 0001: 64 0110: 480 0010: 128 0111: 640 0011: 160 0100: 240 Others: Reserved FP9 MMULCD FP8 START 0 Always write “0” LCDCTL0 LCD control 0 register 0844H Segment Data setting 0: Normal 1: All display data “0” R/W 0 0 0 0 fFP setting Built-in fFP setting LCDC start RAM LCDD bit 8 0: STOP bit 9 setting 0: Sequential access 1: Random access 1: START LCDSCC LCD source clock counter register SCC7 0846H 0 SCC6 0 SCC5 SCC4 R/W SCC3 SCC2 SCC1 0 SCC0 0 0 0 0 0 LCDC source clock counter bit7 to bit0 92CA25-403 2007-02-28 TMP92CA25 (6) LCD controller (2/2) Symbol LSARAL Name Start address register A area (L) Start address register A area (M) Start address register A area (H) Common number register A area (L) Common number register A area (H) Start address register B area (L) Start address register B area (M) Start address register B area (H) Common number register B area (L) Common number register B area (H) Start address register C area (L) Start address register C area (M) Start address register C area (H) Address 0850H 7 SA7 0 SA15 6 SA6 0 SA14 0 SA22 1 CA6 0 5 SA5 4 SA4 3 SA3 2 SA2 1 SA1 0 SA9 0 SA17 0 CA1 0 0 SA0 0 SA8 0 SA16 0 CA0 0 CA8 R/W 0 A area (bit8) LSARAM 0851H 0 SA23 LSARAH 0852H 0 CA7 CMNAL 0853H 0 R/W 0 0 0 0 Start address for A area (bit7 to bit0) SA13 SA12 SA11 SA10 R/W 0 0 0 0 Start address for A area (bit15 to bit8) SA21 SA20 SA19 SA18 R/W 0 0 0 0 Start address for A area (bit23 to bit16) CA5 CA4 CA3 CA2 R/W 0 0 0 0 Common number setting for A area (bit7 to bit0) CMNAH 0854H SB7 0856H 0 SB15 0857H 0 SB23 0858H 0 CB7 0859H 0 SB6 0 SB14 0 SB22 1 CB6 0 SB5 SB4 R/W SB3 SB2 SB1 0 SB9 0 SB17 0 CB1 0 SB0 0 SB8 0 SB16 0 CB0 0 CB8 R/W 0 B area (bit8) LSARBL LSARBM LSARBH CMNBL 0 0 0 0 Start address for B area (bit7 to bit0) SB13 SB12 SB11 SB10 R/W 0 0 0 0 Start address for B area (bit15 to bit8) SB21 SB20 SB19 SB18 R/W 0 0 0 0 Start address for B area (bit23 to bit16) CB5 CB4 CB3 CB2 R/W 0 0 0 0 Common number setting for B area (bit7 to bit0) CMNBH 085AH SC7 085CH 0 SC15 085DH 0 SC23 085EH 0 SC6 0 SC14 0 SC22 1 SC5 SC4 R/W SC3 SC2 SC1 0 SC9 0 SC17 0 SC0 0 SC8 0 SC16 0 LSARCL LSARCM LSARCH 0 0 0 0 Start address for C area (bit7 to bit0) SC13 SC12 SC11 SC10 R/W 0 0 0 0 Start address for C area (bit15 to bit8) SC21 SC20 SC19 SC18 R/W 0 0 0 0 Start address for C area (bit23 to bit16) 92CA25-404 2007-02-28 TMP92CA25 (7) Touch screen I/F Symbol Name Address 7 TSI7 R/W 0 0: Disable 1: Enable 6 5 PTST R 0 Detection condition 0: no touch 1: touch DB256 4 TWIEN 3 PYEN 2 PXEN R/W 0 SPX 0 : OFF 1 : ON 1 MYEN 0 SMY 0 : OFF 1 : ON 0 MXEN 0 SMX 0 : OFF 1 : ON TSICR0 Touch screen I/F control register 0 01F0H 0 0 INT4 SPY interrupt 0 : OFF control 1 : ON 0: Disable 1: Enable DB64 R/W DB8 DBC7 Touch screen I/F control register 1 0 0: Disable 1: Enable DB1024 DB4 DB2 DB1 TSICR1 01F1H 0 0 0 0 0 0 0 1024 256 64 8 4 2 1 Debounce time is set by the formula “(N × 64 − 16)/fSYS” − formula. “N” is sum ofthe number of bits between bit6 and bit0 which is are set to “1” (8) SDRAM controller Symbol Name Address 7 − 6 − 5 SMRD 0 Mode register set delay time 4 SWRC R/W 0 Write recovery time 3 SBST 2 SBL1 1 SBL0 0 SMAC SDACR1 SDRAM access control register 1 0 Always write “0” 0250H 0 Always write “0” SBS SDRAM access control register 2 0 Number of banks SDACR2 0251H 0 1 0 0 Burst stop Select read burst 0: Disable command length 1: Enable 00: Reserved 01: Full page read, Burst write 10: 1 word read, Single write 11: Full page read Single write SDRS1 SDRS0 SMUXW1 SMUXW0 R/W 0 0 0 0 Selecting ROW Selecting address address size Multiplex type SDRCR SDRAM refresh control register 0252H − R/W 0 Always write “0” SDCMM SDRAM command register 0253H SRS1 SRS0 R/W 1 0 0 0 SR Auto Refresh interval exit 000: 47 states 100: 156 states function 001: 78 states 101: 295 states 0: Disable 010: 97 states 110: 249 states 1: Enable 011: 124 states 111: 312 states SCMM2 SCMM1 R/W 0 0 SSAE SRS2 SRC 0 Auto refresh 0: Disable 1: Enable SCMM0 0 Issuing command 92CA25-405 2007-02-28 TMP92CA25 (9) 8-bit timer Symbol Name Address 7 TA0RDE R/W 0 Double buffer 0: Disable 1: Enable 6 5 4 3 I2TA01 2 1 0 TA0RUN 0 UP counter (UC0) TA01RUN TMRA01 RUN register 1100H TA01PRUN TA1RUN R/W 0 0 0 IDLE2 TMRA01 UP 0: Stop prescaler counter 1: Operate (UC1) 0: Stop and clear 1: Run (Count up) TA0REG 8-bit timer register 0 8-bit timer register 1 1102H (Prohibit RMW) 1103H (Prohibit RMW) TA01M1 TA01M0 PWM01 TA1REG TA01MOD TMRA01 mode register 1104H 0 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode 0 PWM cycle 00: Reserved 6 01: 2 7 10: 2 8 11: 2 − W Undefined − W Undefined PWM00 TA1CLK1 TA1CLK0 TA0CLK1 TA0CLK0 R/W 0 0 0 0 0 Source clock for TMRA1 Source clock for TMRA0 TA1FFCR TMRA1 flip-flop control register 1105H (Prohibit RMW) 00: TA0TRG 01: φT1 10: φT16 11: φT256 TA1FFC1 TA1FFC0 W 1 1 00: Invert TA1FF 01: Set TA1FF 10: Clear TA1FF 11: Don’t care I2TA23 0 IDLE2 0: Stop 1: Operate TA23RUN TMRA23 RUN register 1108H TA1RDE R/W 0 Double buffer 0: Disable 1: Enable 00: Reserved 01: φT1 10: φT4 11: φT16 TA1FFIE TA1FFIS R/W 0 0 TA1FF TA1FF control for Inversion inversion select 0: Disable 0: TMRA0 1: Enable 1: TMRA1 TA23PRUN TA3RUN TA2RUN R/W 0 0 0 TMRA23 UP UP counter prescaler counter (UC4) (UC3) 0: Stop and clear 1: Run (Count up) TA2REG 8-bit timer register 2 8-bit timer register 3 110AH (Prohibit RMW) 110BH (Prohibit RMW) TA23M1 TA23M0 PWM21 TA3REG TA23MOD TMRA23 mode register 110CH 0 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode 0 PWM cycle 00: Reserved 6 01: 2 7 10: 2 8 11: 2 − W Undefined − W Undefined PWM20 TA3CLK1 TA3CLK0 TA2CLK1 TA2CLK0 R/W 0 0 0 0 0 Source clock for TMRA3 Source clock for TMRA2 TA3FFCR TMRA3 flip-flop control register 110DH (Prohibit RMW) 00: TA2TRG 01: φT1 10: φT16 11: φT256 TA3FFC1 TA3FFC0 W 1 1 00: Invert TA3FF 01: Set TA3FF 10: Clear TA3FF 11: Don’t care 00: Reserved 01: φT1 10: φT4 11: φT16 TA3FFIE TA3FFIS R/W 0 0 TA3FF TA3FF control for inversion inversion select 0: Disable 0: TMRA2 1: Enable 1: TMRA3 92CA25-406 2007-02-28 TMP92CA25 (10) 16-bit timer Symbol Name Address 7 6 5 4 3 I2TB0 0 IDLE2 2 TB0PRUN R/W 0 TMRB0 Prescaler 1 0 TB0RUN R/W 0 Up counter UC10 TB0RUN TMRB0 RUN register 1180H TB0RDE − R/W 0 0 Double Always buffer write “0” 0: Disable 1: Enable − − 0: Stop 1: Operate 0: Stop and clear 1: Run (Count up) TB0CP0I TB0CPM1 TB0CPM0 TB0CLE W* R/W 1 0 0 0 Execute Capture timing Control software 00: Disable up counter 0: Disable capture 01: Reserved clearing 0: Software 10: Reserved 1: Enable capture 11: TA1OUT↑ clearing 1: Undefined TA1OUT↓ TB0CT1 TB0C0T1 TB0E1T1 TB0E0T1 R/W 0 0 0 0 TB0FF0 inversion trigger 0: Disable trigger 1: Enable trigger TB0CLK1 TB0CLK0 0 0 TMRB0 source clock 00: Reserved 01: φT1 10: φT4 11: φT16 R/W TMRB0 mode register 1182H (Prohibit RMW) 0 0 Always write “00”. TB0MOD − − W* 1 1 Always write “11”. TB0FFCR TMRB0 flip-flop control register 1183H (Prohibit RMW) TB0FF0C1 TB0FF0C0 W* 1 1 Control TB0FF0 00: Invert 01: Set Invert when Invert when Invert when Invert when 10: Clear 11: Don’t care the UC the UC the UC the UC * Always read as “11” value value is value is value loaded into TB0CP1. loaded into TB0CP0. matches matches the value in the value in TB0RG0. TB0RG1. TB0RG0L 16-bit timer register 0 low 16-bit timer register 0 high 16-bit timer register 1 low 16-bit timer register 1 high Capture register 0 low Capture register 0 high Capture register 1 low Capture register 1 high 1188H (Prohibit RMW) 1189H (Prohibit RMW) 118AH (Prohibit RMW) 118BH (Prohibit RMW) 118CH TB0RG0H TB0RG1L TB0RG1H TB0CP0L TB0CP0H 118DH TB0CP1L 118EH TB0CP1H 118FH − W Undefined − W Undefined − W Undefined − W Undefined − R Undefined − R Undefined − R Undefined − R Undefined 92CA25-407 2007-02-28 TMP92CA25 (11) UART/serial channel Symbol SC0BUF Name Serial channel 0 buffer register Address 1200H (Prohibit RMW) 7 RB7 TB7 6 RB6 TB6 5 4 3 2 1 RB1 TB1 0 RB0 TB0 SC0CR Serial channel 0 control register 1201H RB5 RB4 RB3 RB2 TB5 TB4 TB3 TB2 R (Receiving)/W (Transmission) Undefined RB8 EVEN PE OERR PERR FERR R R/W R (Clear 0 after reading) Undefined 0 0 0 0 0 1: Error Receive Parity Parity data bit8 0: Odd 0: Disable Overrun Parity Framing 1: Even 1: Enable SCLKS R/W 0 IOC 0 0: SCLK0↑ 0: Baud 1: SCLK0↓ rate generator 1: SCLK0 pin input TB8 Serial channel 0 mode 0 register 0 Transmission data bit8 CTSE 0 0: CTS disable 1: CTS enable RXE WU R/W SM1 SM0 SC1 SC0 SC0MOD0 1202H 0 0 0: Receive Wake-up disable 0: Disable 1: Receive 1: Enable enable 0 0 00: I/O Interface mode 01: 7-bit UART mode 10: 8-bit UART mode 11: 9-bit UART mode − BR0ADDE 0 (16-K)/16 divided 0: Disable 1: Enable BR0CK1 0 00: φT0 01: φT2 10: φT8 11: φT32 BR0CR Serial channel 0 baud rate control register Serial channel 0 K setting register 1203H 0 Always write “0” BR0CK0 BR0S3 BR0S2 R/W 0 0 0 0 0 Set the frequency divisor “N” (0 to F) 0 0 00: TA0TRG 01: Baud rate generator 10: Internal clock fIO 11: External clock (SCLK0 input) BR0S1 BR0S0 BR0K3 1204H BR0K2 R/W BR0K1 BR0K0 BR0ADD 0 0 0 0 Set the frequency divisor “K” (1 to F) I2S0 R/W FDPX0 0 I/O interface mode 0: Half duplex 1: Full duplex SC0MOD1 Serial channel 0 mode 1 register 1205H 0 IDLE2 0: Stop 1: Operate PLSEL 0 Select transmit pulse width 0: 3/16 1: 1/16 SIRCR IrDA control register 1207H SIRWD3 SIRWD2 SIRWD1 SIRWD0 R/W 0 0 0 0 0 0 0 Transmit Receive Receive Select receive pulse width 0: Disable 0: Disable Set effective pulse width for equal or more data 0: “H” pulse 1: Enable 1: Enable than 2x × (value + 1) + 100ns 1: “L” pulse Can be set: 1 to 14 Can not be set: 0,15 RXSEL TXEN RXEN 92CA25-408 2007-02-28 TMP92CA25 (12) Serial bus interface (SBI) Symbol Name Address 1240H 2 (I C Mode) (Prohibit RMW) 7 BC2 6 BC1 5 BC0 0 4 ACK 3 2 1 0 Serial bus interface 0 SBI0CR1 control register 1 W 0 0 Number of transfer bits 000: 8 001: 1 010: 2 100: 4 101: 5 110: 6 Serial bus interface SBI0DBR buffer register 1241H (Prohibit RMW) DB7 DB6 R/W 0 Acknowle 011: 3 -dge 111: 7 mode 0: Disable 1: Enable DB5 DB4 DB3 DB2 R (Receiving )/W (Transmission) Undefined SCK0/ SCK2 SCK1 SWRMON W R/W 0 0 0/1 Setting for the devisor value “n” 000: 5 001: 6 010: 7 011: 8 100: 9 101: 10 110: 11 111: Reserved DB1 DB0 SA6 I2CBUS0 address register 1242H (Prohibit RMW) 0 SA5 0 SA4 0 SA3 W 0 SA2 0 SA1 0 SA0 0 ALS 0 Address recognition 0: Disable 1: Enable SWRST0 I2C0AR Slave address setting MST 1243H 2 (I C Mode) 0 0: Slave 1: Master TRX BB PIN W SBIM1 SBIM0 SWRST1 Serial bus interface SBI0CR2 Interface control register 2 (Prohibit RMW) MST 1243H 2 (I C Mode) 0 0: Slave 1: Master 0 0 1 0: Receiver Start/Stop INTSBI 1: Transmit condition interrupt generation monitor 0: Stop 0: Request condition 1: Cancel 1: Start condition (Case of MST, TRX, Pin are “1”) TRX BB PIN 0 0 0: Receiver Bus status 1: Transmit monitor 0:Free 1:Busy 1 INTSBI interrupt 0: Request 1: Cancel 0 0 SBI operation mode selection 00: Port mode 01: Reserved 2 10: I C mode 11: Reserved 0 0 Software reset generate write “10” and “01”, then an internal reset signal is generated. AL R AAS AD0 LRB SBI0SR Serial bus interface status register (Prohibit RMW) 0 0 0 0 Arbitration Slave GENERAL Last lost address CALL received detection match detection bit monitor 0: 0 detection monitor monitor 1: 1 monitor 0: − 0: 1: Detected 0: Undetected Undetected 1: Detected 1: Detected − Serial bus interface Baud rate register 0 I2SBI0 R/W 0 IDLE2 0: Stop 1: Run − SBI0BR0 1244H (Prohibit RMW) W 0 Always write “0” P4EN Serial bus interface Baud rate register 1 W 1245H (Prohibit RMW) 0 Internal clock 0: Stop 1: Run 0 Always write “0” SBI0BR1 92CA25-409 2007-02-28 TMP92CA25 (13)SPI controller (1/4) Symbol Name Address 7 6 XEN R/W 0 0820H SYSCK 5 4 3 2 1 R/W 0 CLKSEL2 CLKSEL1 CLKSEL0 1 000: fSYS 001: fSYS/2 010: fSYS/4 011: fSYS/8 DOSTAT 1 SPDO pin (No transmit) 0: Fixed to “0” 1: Fixed to “1” 0 0 Baud rate selection 100: fSYS/16 101: fSYS/32 110: fSYS/64 111: Reserved TDINV 0 Invert data during transmitting 0: Disable 1: Enable SPIMD SPI mode setting register LOOPBACK MSB1ST R/W 1 TCPOL 0 Synchronous clock edge during transmitting RCPOL R/W 0 Synchronous clock edge during receiving RDINV 0 Invert data during receiving 0 0821H LOOPBACK Start bit for transmit test mode 0: Disable 0: LSB 1: Enable 1: MSB 0: Disable 1: Enable 0: Disable 1: Enable 0: Falling 1: Rising 0: Falling 1: Rising CEN 0 0822H Communic ation control SPCS_B R/W 1 SPCS pin 0: Output “0” UNIT16 0 Data length 0: 8bit 1: 16bit ALGNEN 0 Full duplex alignment RXWEN R/W 0 Sequential receive RXUEN 0 Receive UNIT 0: Disable 0: Disable 0: Disable 1: Enable 1: Enable DMAERFW 0: Disable 1:Output “1” 1: Enable SPICT SPI control register CRC16_7_B 1: Enable DMAERFR CRCRX_TX_B CRCRESET_B R/W 0 0823H CRC selection 0: CRC7 1: CRC16 R/W 0 0 Micro DMA 0: Disable 1: Enable 0 Micro DMA 0: Disable 1: Enable 0 CRC data CRC 0: Transmit Calculation register 1: Receive 0:Reset 1:Relese reset TEND 1 Receiving 0: Operation 1: No operation REND R 0 Receive shift t register 0: No data 1: Exist data RFW 1 Transmit buffer RFR 0 Receive buffer 0824H SPIST SPI status register 0: Exist 0: No valid un-transmit data ted data 1: Exist valid 1: No data un-transmit ted data 0825H 92CA25-410 2007-02-28 TMP92CA25 (13)SPI controller (2/4) Symbol Name Address 7 CRCD7 0826H 0 SPICR SPI CRC register 0827H 0 0 0 0 CRCD15 0 CRCD14 0 CRCD13 0 CRCD12 R 0 TENDIS 0 Read Read 1:interrupt Write 1:Clear 6 CRCD6 5 CRCD5 4 CRCD4 R 3 CRCD3 0 CRCD11 2 CRCD2 0 CRCD10 0 RENDIS R/W 0 Read 1 CRCD1 0 CRCD9 0 RFWIS 0 Read 0 CRCD0 0 CRCD8 0 RFRIS 0 CRC calculation result load register [7:0] CRC calculation result load register [15:8] 0828H SPIIS SPI interrupt status register 0:No interrupt 0:No interrupt 0:No interrupt 0:No interrupt 1:interrupt Write 0:Don’t care 1:Clear 1:interrupt Write 1:Clear 1:interrupt Write 1:Clear 0:Don’t care 0:Don’t care 0:Don’t care 0829H TENDWE 0 SPI interrupt status write enable register 082AH Clear SPIIS 0: Disable 1: Enable RENDWE R 0 RFWWE 0 RFRWE 0 Clear SPIIS Clear SPIIS Clear SPIIS 0: Disable 1: Enable 0: Disable 1: Enable 0: Disable 1: Enable SPIWE 082BH 92CA25-411 2007-02-28 TMP92CA25 (13) SPI controller (3/4) Symbol Name Address 7 6 5 4 3 TENDIE 0 082CH SPIIE SPI interrupt enable register TEND interrupt 0: Disable 1: Enable 2 RENDIE R/W 0 REND interrupt 0: Disable 1: Enable RFW 1 RFWIE 0 RFR 0 RFRIE 0 interrupt 0: Disable 1: Enable interrupt 0: Disable 1: Enable 082DH TENDIR 0 082EH SPIIR SPI interrupt request register TEND interrupt 0: None 1: Generate RENDIR R 0 REND interrupt 0: None 1: Generate RFWIR 0 RFW interrupt 0: None RFRIR 0 RFR interrupt 0: None 1: Generate 1: Generate 082FH TXD7 0830H SPITD SPI transmissio n data register TXD6 0 TXD14 0 TXD5 0 TXD13 0 TXD4 R/W 0 TXD12 R/W 0 TXD3 0 TXD11 0 TXD2 0 TXD10 0 TXD1 0 TXD9 0 TXD0 0 TXD8 0 0 TXD15 Transmission data register [7:0] 0831H 0 Transmission data register [15:8] 92CA25-412 2007-02-28 TMP92CA25 (13) SPI controller (4/4) Symbol Name Address 7 RXD7 0832H 0 SPIRD SPI receive register 0833H 0 TSD7 0834H SPITS SPI transmission data shift register 6 RXD6 0 RXD14 0 TSD6 0 TSD14 0 RSD6 0 RSD14 0 5 RXD5 0 RXD13 0 TSD5 0 TSD13 0 RSD5 0 RSD13 0 4 RXD4 R 0 RXD12 R 0 TSD4 R 0 TSD12 R 0 RSD4 R 0 RSD12 R/W 0 3 RXD3 0 RXD11 0 TSD3 0 TSD11 0 RSD3 0 RSD11 0 2 RXD2 0 RXD10 0 TSD2 0 TSD10 0 RSD2 0 RSD10 0 1 RXD1 0 RXD9 0 TSD1 0 TSD9 0 RSD1 0 RSD9 0 0 RXD0 0 RXD8 0 TSD0 0 TSD8 0 RSD0 0 RSD8 0 Receive data register [7:0] RXD15 Receive data register [15:8] 0 TSD15 0835H 0 RSD7 0836H 0 RSD15 0837H 0 Transmission data shift register [7:0] Transmission data register [15:8] SPIRS SPI receive data register 92CA25-413 2007-02-28 TMP92CA25 (14) AD converter (1/2) Symbol Name Address 7 EOCF R 0 ADMOD0 AD mode control register 0 12B8H AD conversion end flag 1:END 6 ADBF 0 AD conversion BUSY flag 1: Busy 5 − 4 − 3 ITM0 0 0: Every 1 time 1: Every 4 times 2 REPEAT R/W 0 Repeat mode 0: Single mode 1: Repeat mode − 1 SCAN 0 Scan mode 0: Fixed channel mode 1: Channel scan mode 0 ADS 0 AD conversion start 1: Start always read as “0” 0 Always write “0” 0 Always write “0” ADMOD1 AD mode control register 1 VREFON R/W 0 12B9H Ladder resistance 0: OFF 1: ON I2AD − R/W 0 0 IDLE2 Always 0: Stop write “0” 1: Operate − − ADCH1 ADCH0 R/W 0 Always write “0” 0 Always write “0” 0 Always write “0” 0 0 Input channel 000: AN0 001: AN1 010: AN2 011: AN3 − ADTRG 0 Always write “0” 0 AD external trigger start control 0: Disable 1: Enable − − − − − − R/W AD mode control register 1 0 Always write “0” 0 Always write “0” 0 Always write “0” 0 Always write “0” 0 Always write “0” 0 Always write “0” ADMOD2 12BAH ADREG0L AD result register 0 low AD result register 0 high AD result register 1 low AD result register 1 high AD result register 2 low AD result register 2 high AD result register 3 low AD result register 3 high ADR01 12A0H ADR00 R Undefined ADR09 ADR08 ADR07 ADR06 ADREG0H 12A1H ADR11 12A2H ADR10 R Undefined ADR19 ADR18 ADR05 R Undefined ADR04 ADR03 ADR0RF R 0 ADR02 ADREG1L ADR17 ADR16 ADREG1H 12A3H ADR21 12A4H ADR20 R Undefined ADR29 ADR28 ADR15 R Undefined ADR14 ADR13 ADR1RF R 0 ADR12 ADREG2L ADR27 ADR26 ADREG2H 12A5H ADR31 12A6H ADR30 R Undefined ADR39 ADR38 ADR25 R Undefined ADR24 ADR23 ADR2RF R 0 ADR22 ADREG3L ADR37 ADR36 ADREG3H 12A7H ADR35 R Undefined ADR34 ADR33 ADR3RF R 0 ADR32 92CA25-414 2007-02-28 TMP92CA25 (15) Watchdog timer Symbol Name Address 7 WDTE WDT mode register 1 WDT control 1: Enable 6 5 4 3 − 2 I2WDT 0 IDLE2 1 RESCR R/W 0 1: Internally connects WDT out to the reset pin 0 − WDMOD 1300H WDTP1 WDTP0 R/W 0 0 Select detecting time 15 00: 2 /fIO 17 01: 2 /fIO 19 10: 2 /fIO 21 11: 2 /fIO 0 Always write “0” 0: Stop 1: Operate 0 Always write “0” WDCR WDT control register 1301H (Prohibit RMW) − W − B1H: WDT disable code 4E: WDT clear code 92CA25-415 2007-02-28 TMP92CA25 (16) RTC (Real time clock) Symbol SECR Name Second register Address 1320H 7 6 SE6 5 SE5 4 SE4 3 2 1 SE1 0 SE0 “0” is read MINR Minute register 1321H “0” is read 40 sec. MI6 20 sec. MI5 10 sec. MI4 40 min. 20 min. HO5 10 min. HO4 HOURR Hour register 1322H “0” is read 20 hours (PM/AM) 10 hours SE3 SE2 R/W Undefined 8 sec. 4 sec. MI3 MI2 R/W Undefined 8 min. 4 min. HO3 HO2 R/W Undefined 8 hours 4 hours WE2 2 sec. MI1 1 sec. MI0 2 min. HO1 1 min. HO0 2 hours WE1 R/W Undefined W1 DA1 1 hour WE0 DAYR Day register 1323H “0” is read DA5 W2 DA2 DA4 DA3 W0 DA0 DATER Date register 1324H “0” is read 1325H PAGE0 PAGE1 “0” is read 10 month 20 days 10 days MO4 R/W Undefined 8 days 4 days MO3 MO2 R/W Undefined 8 month 4 month 2 days MO1 1 day MO0 2 month 1 month 0: Indicator for 12 hours 1: Indicator for 24 hours MONTHR Month register “0” is read YE7 1326H Year register PAGE0 PAGE1 80 years YE6 YE5 40 years 20 years YE3 R/W Undefined 10 years 8 years YE4 YE2 YE1 YE0 4 years YEARR “0” is read PAGER Page register 1327H (Prohibit RMW) INTENA R/W 0 INTRTC 0: Disable 1: Enable DIS1HZ RESTR Reset register 1328H (Prohibit RMW) ENATMR ENAALM R/W Undefined Undefined 0: Don’t Clock Alarm / “0” is read care enable enable 1: Adjust DIS16HZ RSTTMR RSTALM − − − W Undefined 1Hz 16Hz 1: Reset 1: Reset Always write “0” 0: Enable 0: Enable Clock alarm 1: Disable 1: Disable ADJUST W 2 years 1 year Leap year setting 00: Leap year 01: One year after 10: Two years after 11: Three years after PAGE R/W Undefined PAGE “0” is read setting − 92CA25-416 2007-02-28 TMP92CA25 (17) Melody/alarm generator Symbol ALM Name Alarm pattern register Address 1330H 7 AL8 0 FC1 6 AL7 0 FC0 5 AL6 0 ALMINV 0 Alarm frequency invert 1: Invert 4 AL5 R/W 3 AL4 2 AL3 0 − 1 AL2 0 − 0 AL1 0 MELALM 0 Output frequency 0: Alarm 1: Melody MELALMC Melody/ alarm control register 1331H MELFL Melody frequency L-register 0 0 Free run counter control 00: Hold 01: Restart 10: Clear 11: Clear and start ML7 ML6 0 MELON R/W 0 0 0 Alarm pattern set − − R/W 0 0 0 0 Always write “0” ML5 0 ML4 R/W ML3 ML2 ML1 0 ML9 R/W 0 ML0 0 ML8 0 1332H 0 0 0 Melody frequency set (Low 8bit) ML11 ML10 0 0 MELFH Melody frequency H-register 1333H 0 Melody counter control 0: Stop and clear 1: Start − Melody frequency set (Upper 4 bits) ALMINT Alarm interrupt enable register IALM4E 0 IALM3E IALM2E R/W 0 0 IALM1E 0 IALM0E 0 1334H 0 Always write “0” INTALM4 to INTALM0 alarm interrupt enable 92CA25-417 2007-02-28 TMP92CA25 (18) NAND flash controller (1/2) Symbol ND0FDTR Name NAND flash data transfer register Address 1D00H 7 D7 6 D6 5 D5 4 D4 3 D3 2 D2 1 D1 0 D0 WE 0 NAND flash mode ND0FMCR control register 0: Disable write operation 1: Enable write operation 1CC4H R/W Undefined Data window to read/write NAND flash ECC1 ECC0 CE PCNT1 PCNT0 R/W 0 0 0 0 0 Power Control ECC circuit Chip 11 (at =X): Reset enable 00 (at =1): Disable 0: Disable Always write “11” 01 (at =1): Enable ( NDCE is 10 (at =1): Read high) ECC data calculated 1: Enable by NDFC ( NDCE is 10 (at =0): Read ID low) data ALE 0 Address Latch Enable 0: Low 1: High CLE 0 Command Latch Enable 0: Low 1: High ND0FSR NAND flash status register 1CC8H BUSY R Undefined 0: Ready 1: Busy RDY R/W 0 ND0FISR NAND flash interrupt status register 1CCCH Read: 0: None 1: Change NDR/ B signal from BUSY to READY. Write: 0: No change 1: Clear to “0” ND0FIMR NAND flash interrupt mask register NAND flash strobe pulse width register 1CD0H INTEN R/W 0 0: Disable 1: Enable SPW3 SPW2 R/W 0 SPW1 0 MRDY R/W 0 Mask for RDY SPW0 0 ND0FSPR 1CD4H 0 Pulse width for NDRE , NDWE = fSYS × (This register’s value + 1) RST R/W 0 Reset controller CHSEL R/W 0 Channel selection 0: Channel 0 1: Channel 1 NAND ND0FRSTR flash reset register 1CD8H NDCR NAND flash control register 01C0H NAND flash ECC ND0ECCRD code register D7 1CB0H D6 D5 D4 R D3 D2 D1 D0 Data window to read ECC code 92CA25-418 2007-02-28 TMP92CA25 (17) NAND flash controller (2/2) Symbol ND1FDTR Name NAND flash data transfer register Address 1D00H 7 D7 6 D6 5 D5 4 D4 3 D3 2 D2 1 D1 0 D0 ND1FMCR NAND flash mode control register 1CE4H R/W Undefined Data window to read/write NAND flash WE ECC1 ECC0 CE PCNT1 PCNT0 R/W 0 0 0 0 0 0 Power Control 0: Disable ECC circuit Chip write 11 (at =X): Reset enable operation 00 (at =1): Disable 0: Disable Always write “11” 1: Enable 01 (at =1): Enable ( NDCE is write high) 10 (at =1): Read operation ECC data calculated 1: Enable by NDFC ( NDCE is 10 (at =0): Read ID low) data ALE 0 Address Latch Enable 0: Low 1: High CLE 0 Command Latch Enable 0: Low 1: High ND1FSR NAND flash status register 1CE8H BUSY R Undefined 0: Ready 1: Busy RDY R/W 0 ND1FISR NAND flash interrupt status register 1CECH Read: 0: None 1: Change NDR/ B signal from BUSY to READY. Write: 0: No change 1: Clear to “0” ND1FIMR NAND flash interrupt mask register NAND flash strobe pulse width register 1CF0H INTEN R/W 0 0: Disable 1: Enable SPW3 SPW2 R/W 0 SPW1 0 MRDY R/W 0 Mask for RDY SPW0 0 ND1FSPR 1CF4H 0 Pulse width for NDRE , NDWE = fSYS × (This register’s value +1) RST R/W 0 Reset controller D0 NAND ND1FRSTR flash reset register NAND flash ECC ND1ECCRD code register 1CF8H D7 1CB0H D6 D5 D4 R D3 D2 D1 Data window to read ECC code 92CA25-419 2007-02-28 TMP92CA25 (19) I2S Symbol I2SBUFR Name I S FIFO buffer (R) 2 Address 0800H (Prohibit RMW) 0808H (Prohibit RMW) 7 R15/R7 6 R14/R6 5 R13/R5 4 R12/R4 3 R11/R3 2 R10/R2 1 R9/R1 0 R8/R0 I2SBUFL I S FIFO buffer (L) 2 080EH I2SCTL0 IS control register 0 080FH 2 W Undefined Register for transmitting buffer (FIFO) L15/L7 L14/L6 L13/L5 L12/L4 L11/L3 W Undefined Register for transmitting buffer (FIFO) TXE FMT BUSY DIR BIT R/W R 0 0 0 0 0 Status First bit Bit Transmit Mode 2 0: Stop 0: MSB number 0: Stop 0: I S 1: SIO 1: Under 1: LSB 0: 8 bits 1: Start transmitting 1: 16 bits I2SWLVL EDGE I2SFSEL I2SCKE R/W 0 0 0 0 WS level Clock Select for Clock 0: Low left edge enable stereo 1: High left 0: Falling 0: Stereo (After 1: Rising transmit) (2 channel) 1: Monaural 0: Operation (1 channel) 1: Stop (Right channel) L10/L2 L9/L1 L8/L0 (Left channel) MCK1 MCK0 R/W 0 0 Baud rate 00: fSYS 10: fSYS/4 01: fSYS/2 11: fSYS/8 I2SWCK 0 WS clock 0: fs/4 1: TA1OUT SYSCKE R/W 0 System clock 0: Disable 1: Enable 92CA25-420 2007-02-28 TMP92CA25 6. 6.1 Notes and Restrictions Notation (1) The notation for built-in I/O registers is as follows: Register symbol Example: TA01RUN denotes bit TA0RUN of register TA01RUN. (2) Read-modify-write instructions (RMW) An instruction in which the CPU reads data from memory and writes the data to the same memory location in one instruction. Example 1: Example 2: • SET INC 3, (TA01RUN); Set bit3 of TA01RUN. 1, (100H); Increment the data at 100H. Examples of read-modify-write instructions on the TLCS-900 Exchange instruction EX (mem), R Arithmetic operations ADD (mem), R/# SUB (mem), R/# INC #3, (mem) Logic operations AND (mem), R/# XOR (mem), R/# Bit manipulation operations STCF #3/A, (mem) SET #3, (mem) TSET #3, (mem) Rotate and shift operations RLC (mem) RL (mem) SLA (mem) SLL (mem) RLD (mem) RRC RR SRA SRL (mem) (mem) (mem) (mem) RES #3, (mem) CHG #3, (mem) OR (mem), R/# ADC (mem), R/# SBC (mem), R/# DEC #3, (mem) RRD (mem) (3) fOSCH, fc, fFPH, fSYS, fIO and one state The clock frequency input on pins X1 and 2 is referred to as fOSCH. The clock selected by PLLCR0 is referred as fc. The clock selected by SYSCR1 is refer to as fFPH. The clock frequency give by fFPH divided by 2 is referred to as system clock fSYS. The clock frequency give by fSYS divided by 2 is referred to as fIO. One cycle of fSYS is referred to as one state. 92CA25-421 2007-02-28 TMP92CA25 6.2 Notes (1) AM0 and AM1 pins These pins are connected to the VCC (Power supply level) or the VSS (Grand level) pin. Do not alter the level when the pin is active. (2) Reserved address areas The 16 bytes area (FFFFF0H ∼ FFFFFFH) cannot be used since it is reserved for use as internal area. If using an emulator, an optional 64 Kbytes of the 16M bytes area is used for emulator control. Therefore, if using an emulator, this area cannot be used. (3) Standby mode (IDLE1) When the HALT instruction is executed in IDLE1 mode (in which only the oscillator operates), the internal RTC (Real-time-clock) and MLD (Melody-alarm-generator) operate. When necessity, stop the circuit before the HALT instruction is executed. (4) Warm-up counter The warm-up counter operates when STOP mode is released, even if the system is using an external oscillator. As a result, a time equivalent to the warm-up time elapses between input of the release request and output of the system clock. (5) Watchdog timer The watchdog timer starts operation immediately after a reset is released. Disable the watchdog timer when is not to be used. (6) AD converter The string resistor between the VREFH and VREFL pins can be cut by program so as to reduce power consumption. When STOP mode is used, disable the resistor using the program before the HALT instruction is executed. (7) CPU (Micro DMA) Only the “LDC cr, r” and “LDC r, cr” instructions can be used to access the control registers in the CPU. (e.g., the transfer source address register (DMASn).) (8) Undefined SFR The value of an undefined bit in an SFR is undefined when read. (9) POP SR instruction Please execute the POP SR instruction during DI condition. 92CA25-422 2007-02-28 TMP92CA25 7. Package Dimensions Package Name: P-LQFP144-1616-0.40C Unit: mm Note: Palladium plating 92CA25-423 2007-02-28 TMP92CA25 92CA25-424 2007-02-28
TMP92CA25FG 价格&库存

很抱歉,暂时无法提供与“TMP92CA25FG”相匹配的价格&库存,您可以联系我们找货

免费人工找货