![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
toshiba original cmos 32-bit microcontroller tlcs-900/h1 series tmp92ca25fg semiconductor company
preface thank you very much for making us e of toshiba microcomputer lsis. before use this lsi, refer the section, ?points of note and restrictions?. tmp92ca25 2007-02-28 92ca25-1 cmos 32-bit microcontroller tmp92ca25fg/JTMP92CA25 1. outline and device characteristics the tmp92ca25 is a high-speed advanced 32-b it 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 f sys = 20 mhz, best case) (2) minimum instruction execution time: 50 ns (at f sys = 20 mhz) restrictions on product use 070208ebp ? the information contained herein is subject to change without notice. 021023_d ? 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 i nherent electrical sensitivity and vulnerability to physical stress. it is the responsibility of t he 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 malfun ction 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 s pecified operating ranges as set forth in the most recent toshiba products specific ations. also, please keep in mind the precautions and conditions set forth in the ?handling guide for semiconduct or devices,? or ?toshiba semiconductor reliability handbook? etc. 021023_a ? the toshiba products listed in this document are intend ed for usage in general electr onics applications (computer, personal equipment, office equipment, measuring equipmen t, industrial robotics, domesti c appliances, etc.). these toshiba products are neither intended nor warranted for us age in equipment that requ ires 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 ener gy control instruments, airplane or spaceship instruments, transportation instrument s, traffic signal instruments, com bustion control instruments, medical instruments, all types of safety devic es, etc. unintended usage of toshiba pr oducts 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 gu ide for the applications of our products. no responsibility is assumed by toshiba for any infringements of patents or ot her rights of the third parties which may result from its use. no license is granted by implicat ion 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 tmp92ca25 2007-02-28 92ca25-2 (3) internal memory ? internal ram: 10 kbytes (can be used for program, data and display memory) ? internal rom: 0 kbytes (used as boot program) (4) external memory expansion ? 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 (5) memory controller ? chip select output: 4 channels (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 (9) serial bus interface: 1 channel: 1 channel ? i 2 c bus mode only (10) i 2 s (inter-ic sound) interface: 1 channel ? i 2 s bus mode/sio mode selectable (master, transmission only) ? 32-byte fifo buffer (11) lcd controller ? supports monochrome for stn ? built-in ram lcd driver (12) spi controller ? supported only spi mode for sd card (13) sdram controller: 1 channel ? 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 da ta for lcd display but also programming directly from sdram (14) timer for real-time clock (rtc) ? based on tc8521a (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 patte rn and 5 kinds of interval interrupt tmp92ca25 2007-02-28 92ca25-3 (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 (21) interrupts: 49 interrupt ? 9 cpu interrupts: software interrupt instruction and illegal instruction ? 34 internal interrupts: seven selectable priority levels ? 7 external interrupts: seven selectable priority levels (6-edge selectable) (21) input/output ports: 84 pins (except data bus (16bit), address bus (24bit) and rd pin) (22) nand flash interface: 2 channels ? direct nand flash connection capability ? ecc (error detection) calculation (for slc- type) (23) stand-by function ? three halt modes: idle2 (programmable), idle1, stop ? each pin status programmable for stand-by mode (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) (25) operating voltage: ? vcc = 3.0 v to 3.6 v (fc max = 40 mhz) ? vcc = 2.7 v to 3.6 v (fc max = 27 mhz) (26) package: ? 144-pin qfp (p-lqfp144 -1616-0.40c) ? 144-pin chip form is also available. fo r details, contact your local toshiba sales representative. tmp92ca25 2007-02-28 92ca25-4 figure 1.1 tmp92ca25 block diagram 10-bit 4-channel ad converter serial i/o sio0 (i2scko, txd0) p90 (i2sdo, rxd0) p91 (i2sws, sclk0) p92 8-bit timer (timera0) 8-bit timer (timera1) 8-bit timer (timera2) 8-bit timer (timera3) (tb0out0, int2) pc2 (int3) pc3 16-bit timer (timerb0) sdram controller (lcp0) pk0 (llp) pk1 (lfr) pk2 (lbcd) pk3 pl0 to pl5 ( ld0 to ld5 ) wa bc de hl ix i y iz sp xwa xbc xde xhl xix xiy xiz xsp watchdog timer port 1 port 7 nand flash i/f (2 channel) h-osc interrupt controller rtcvcc dvcc [3] dvss [3] x1 x2 p10 to p17 (d8 to d15) 32 bits f sr pc 900/h1 cpu touch screen i/f (tsi) i 2 s lcd controller pll clock gear l-osc xt1 xt2 port 6 d0 to d7 port 8 keyboard i/f rtc melody/ alarm out 10-kb ram mmu (ta1out, int0) pc0 (ta3out, int1) pc1 a 0 to a7 a 8 to a15 p60 to p67 (a16 to a23) pa0 to pa7 (ki0 to ki7) pc6 (ko8,ea24) pm1 (mldalm) pg0 to pg1 (an0 to an1) an2/mx (pg2) an3/my/ adtrg (pg3) avcc, avss vrefh, vrefl (px, int4) p96 (py, int5) p97 ( sdras , srllb ) pj0 ( sdcas , srlub ) pj1 ( sdwe , srwr ) pj2 (sdlldqm) pj3 (sdludqm) pj4 (ndale) pj5 (ndcle) pj6 (sdcke) pj7 (sdclk) pf7 reset a m0 a m1 p70 ( rd ) p71 ( wrll , ndre ) p72 ( wrlu , ndwe ) p73 (ea24) p74 (ea25) p75 (r/ w , ndr/ b ) p76 ( wait ) p80 ( 0 cs ) p81 ( 1 cs , sdcs ) p82 ( 2 cs , csza ) p83 ( 3 cs ) p84 ( cszb , ce 0 nd ) p85 ( cszc , ce 1 nd ) p86 ( cszd ) p87 ( csze ) pc7 ( cszf , ea25 ) pm2 ( alarm , mldalm ) (txd0) pf0 (rxd0) pf1 (sclk0) pf2 be port n pn0 to pn7 (ko0 to ko7) port l (ld6, busrq ) pl6 (ld7, busak ) pl7 port f pf3 pf4 pf5 pf6 (sda) p93 (scl) p94 (clk32ko) p95 sbi (i 2 cbus) (spdi) pk4 (spdo) pk5 ( spcs ) pk6 (spclk) pk7 spi controller port c pc4 pc5 tmp92ca25 2007-02-28 92ca25-5 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. figure 2.1.1 pin assignment diagram (144-pin qfp) tmp92ca25fg qfp144 top view p67, a23 p66, a22 p65, a21 p64, a20 dvcc3 p63, a19 p62, a18 p61, a17 p60, a16 a 15 a 14 a 13 a 12 a 11 a 10 a 9 a 8 a 7 a 6 a 5 a 4 a 3 a 2 a 1 a 0 pf6 pf5 dvss3 pf4 pf3 pk7, spclk pk6, spcs pk5, spdo pk4, spdi pn7, ko7 pn6, ko6 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, 0 cts , 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 rtcvcc be pc4 pc5 dvcc1 x1 dvss1 x2 am0 am1 reset 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 a vcc a vss 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 1 5 10 15 20 25 30 35 105 100 95 90 85 80 75 140 135 130 125 120 115 110 40 45 50 55 60 65 70 tmp92ca25 2007-02-28 92ca25-6 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. name x point y point pin no. name x point y point pin no. name x point y point 1 vrefl ? 2363 2309 49 dvss2 ? 447 ? 2678 97 a13 2359 822 2 vrefh ? 2363 2189 50 dvcc2 ? 297 ? 2678 98 a14 2359 939 3 pg0 ? 2363 1934 51 d0 ? 172 ? 2678 99 a15 2359 1055 4 pg1 ? 2363 1593 52 d1 ? 72 ? 2678 100 p60 2359 1171 5 pg2 ? 2363 1493 53 d2 28 ? 2678 101 p61 2359 1288 6 pg3 ? 2363 1393 54 d3 128 ? 2678 102 p62 2359 1400 7 p96 ? 2363 1293 55 d4 228 ? 2678 103 p63 2359 1514 8 p97 ? 2363 1192 56 d5 328 ? 2678 104 dvcc3 2359 1643 9 pa3 ? 2363 1088 57 d6 429 ? 2678 105 p64 2359 1779 10 pa4 ? 2363 988 58 d7 529 ? 2678 106 p65 2359 1902 11 pa5 ? 2363 888 59 p10 629 ? 2678 107 p66 2359 2027 12 pa6 ? 2363 788 60 p11 729 ? 2678 108 p67 2359 2309 13 pa7 ? 2363 688 61 p12 829 ? 2678 109 p70 1994 2675 14 p90 ? 2363 587 62 p13 929 ? 2678 110 p71 1874 2675 15 p91 ? 2363 487 63 p14 1029 ? 2678 111 p72 1753 2675 16 p92 ? 2363 387 64 p15 1129 ? 2678 112 p73 1633 2675 17 p93 ? 2363 287 65 p16 1229 ? 2678 113 p74 1527 2675 18 p94 ? 2363 187 66 p17 1329 ? 2678 114 p75 1420 2675 19 p95 ? 2363 87 67 pn0 1429 ? 2678 115 p76 1316 2675 20 pc2 ? 2363 ? 13 68 pn1 1529 ? 2678 116 p80 1211 2675 21 pl0 ? 2363 ? 113 69 pn2 1630 ? 2678 117 pc6 1104 2675 22 pl1 ? 2363 ? 213 70 pn3 1753 ? 2678 118 p81 999 2675 23 pl2 ? 2363 ? 313 71 pn4 1873 ? 2678 119 p82 893 2675 24 pl3 ? 2363 ? 413 72 pn5 1994 ? 2678 120 p83 787 2675 25 pl4 ? 2363 ? 514 73 pn6 2359 ? 2313 121 p84 682 2675 26 pl5 ? 2363 ? 614 74 pn7 2359 ? 2049 122 p85 574 2675 27 pl6 ? 2363 ? 714 75 pk4 2359 ? 1708 123 p86 468 2675 28 pl7 ? 2363 ? 814 76 pk5 2359 ? 1587 124 p87 363 2675 29 pk0 ? 2363 ? 914 77 pk6 2359 ? 1472 125 pc7 259 2675 30 pk1 ? 2363 ? 1014 78 pk7 2359 ? 1359 126 pf0 154 2675 31 pk2 ? 2363 ? 1114 79 pf3 2359 ? 1243 127 pf1 50 2675 32 pk3 ? 2363 ? 1215 80 pf4 2359 ? 1131 128 pf2 ? 55 2675 33 pm2 ? 2363 ? 1473 81 dvss3 2359 ? 1012 129 pc0 ? 158 2675 34 pm1 ? 2363 ? 1594 82 pf5 2359 ? 885 130 pc1 ? 261 2675 35 xt1 ? 2363 ? 1935 83 pf6 2359 ? 749 131 pf7 ? 364 2675 36 xt2 ? 2363 ? 2313 84 a0 2359 ? 639 132 pj0 ? 467 2675 37 rtcvcc ? 1986 ? 2678 85 a1 2359 ? 530 133 pj1 ? 568 2675 38 be ? 1853 ? 2678 86 a2 2359 ? 420 134 pj2 ? 669 2675 39 pc4 ? 1732 ? 2678 87 a3 2359 ? 311 135 pj3 ? 771 2675 40 pc5 ? 1612 ? 2678 88 a4 2359 ? 199 136 pj4 ? 872 2675 41 dvcc1 ? 1499 ? 2678 89 a5 2359 ? 88 137 pj5 ? 972 2675 42 x1 ? 1386 ? 2678 90 a6 2359 23 138 pj6 ? 1074 2675 43 dvss1 ? 1261 ? 2678 91 a7 2359 134 139 pj7 ? 1175 2675 44 x2 ? 972 ? 2678 92 a8 2359 245 140 pa0 ? 1278 2675 45 am0 ? 872 ? 2678 93 a9 2359 356 141 pa1 ? 1379 2675 46 am1 ? 772 ? 2678 94 a10 2359 473 142 pa2 ? 1499 2675 47 reset ? 672 ? 2678 95 a11 2359 589 143 avss ? 1860 2675 48 pc3 ? 572 ? 2678 96 a12 2359 705 144 avcc ? 1985 2675 tmp92ca25 2007-02-28 92ca25-7 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 number of pins i/o function d0 to d7 8 i/o data: data bus 0 to 7 p10 to p17 d8 to d15 8 i/o i/o port 1: i/o port input or output specifiable in units of bits data: data bus 8 to 15 a0 to a7 8 output address: address bus 0 to 7 a8 to a15 8 output address: address bus 8 to 15 p60 to p67 a16 to a23 8 i/o output port 6: i/o port input or output specifiable in units of bits address: address bus 16 to 23 p70 rd 1 output output port70: output port read: outputs strobe signal to read external memory p71 wrll ndre 1 i/o output output port 71: i/o port write: output strobe signal for writing data on pins d0 to d7 nand flash read: outputs strobe si gnal to read external nand flash p72 wrlu ndwe 1 i/o output output port 72: i/o port write: output strobe signal for writing data on pins d8 to d15 write enable for nand flash p73 ea24 1 output output port 73: output port extended address 24 p74 ea25 1 output output port 74: output port extended address 25 p75 w r/ ndr/ b 1 i/o output input port 75: i/o port read/write: 1 represents read or dummy cycle; 0 represents write cycle nand flash ready (1)/busy (0) input p76 wait 1 i/o input port 76: i/o port wait: signal used to request cpu bus wait tmp92ca25 2007-02-28 92ca25-8 table 2.3.2 pin names and functions (2/5) pin name number of pins i/o function p80 0 cs 1 output output port80: output port chip select 0: outputs ?low? when address is within specified address area p81 1 cs sdcs 1 output output output 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 p82 2 cs csza 1 output output output port82: output port chip select 2: outputs ?low? when address is within specified address area expand chip select: za: outputs ?0? when a ddress is within specified address area p83 3 cs 1 output output port83: output port chip select 3: outputs ?low? when address is within specified address area p84 cszb ce 0 nd 1 output output output port84: output port expand chip select: zb: outputs ?0? when a ddress is within specified address area chip select for nand flash 0: outputs ?0? when nand flash 0 is enabled p85 cszc ce 1 nd 1 output output output port85: output port expand chip select: zc: outputs ?0? when a ddress is within specified address area chip select for nand flash 1: outputs ?0? when nand flash 1 is enabled p86 cszd 1 output output port86: output port expand chip select: zd: outputs ?0? when ad dress is within specified address area p87 csze 1 output output port87: output port expand chip select: ze: outputs ?0? when a ddress is within specified address area p90 txd0 i2scko 1 i/o output output port90: i/o port serial 0 send data: open-drain output programmable i 2 s clock output p91 rxd0 i2sdo 1 i/o input output port91: i/o port (schmitt-input) serial 0 receive data i 2 s data output p92 sclk0 0 cts i2sws 1 i/o i/o input output port92: i/o port (schmitt-input) serial 0 clock i/o serial 0 data send enable (clear to send) i 2 s word select output p93 sda 1 i/o i/o port 93: i/o port i 2 c data i/o p94 scl 1 i/o i/o port 94: i/o port i 2 c clock i/o p95 clk32ko 1 output output port95: output port output fs (32.768 khz) clock p96 int4 px 1 input input output port 96: input port (schmitt-input) interrupt request pin4: interrupt reques t with programmable rising/falling edge x-plus: pin connectted to x + for touch screen panel p97 int5 py 1 input input output port 97: input port (schmitt-input) interrupt request pin5: interrupt reques t with programmable rising/falling edge y-plus: pin connectted to y + for touch screen panel pa0 to pa7 ki0 to ki7 8 input input port: a0 to a7 port: pin used to input por ts (schmitt input, with pull-up resistor) key input 0 to 7: pin used for key-on wakeup 0 to 7 tmp92ca25 2007-02-28 92ca25-9 table 2.3.3 pin names and functions (3/5) pin name number of pins i/o function pc0 int0 ta1out 1 i/o input output port c0: i/o port (schmitt-input) interrupt request pin 0: interrupt request pi n with programmable level/rising/falling edge 8-bit timer 1 output: timer 1 output pc1 int1 ta3out 1 i/o input output port c1: i/o port (schmitt-input) interrupt request pin 1: interrupt reques t pin with programmable rising/falling edge 8-bit timer 3 output: timer 3 output pc2 int2 tb0out0 1 i/o input output port c2: i/o port (schmitt-input) interrupt request pin 2: interrupt reques t pin with programmable rising/falling edge timer b0 output pc3 int3 1 i/o input port c3: i/o port (schmitt-input) interrupt request pin 3: interrupt reques t pin with programmable rising/falling edge pc4 to pc5 2 i/o port c4 to c5: u/o port pc6 ko8 ea24 1 i/o output output port c6: i/o port key output 8: pin used of key-scan strobe (open-drain output programmable) extended address 24 pc7 cszf ea25 1 i/o output output port c7: i/o port expand chip select: zf: outputs ?0? when a ddress is within specified address area extended address 25 pf0 txd0 1 i/o output port f0: i/o port (schmitt-input) serial 0 send data: open-drain output programmable pf1 rxd0 1 i/o input port f1: i/o port (schmitt-input) serial 0 receive data pf2 sclk0 0 cts 1 i/o i/o input port f2: i/o port (schmitt-input) serial 0 clock i/o serial 0 data send enable (clear to send) pf7 sdclk 1 output output port f7: output port clock for sdram (when sdram is not used, sdclk can be used as system clock) pg0 to pg1 an0 to an1 2 input input port g0 to g1 port: pin used to input ports analog input 0 to 1: pin used to input to ad conveter pg2 an2 mx 1 input input output 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 pg3 an3 my adtrg 1 input input output intput 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 tmp92ca25 2007-02-28 92ca25-10 table 2.3.4 pin names and functions (4/5) pin name number of pins i/o function pj0 sdras srllb 1 output output output port j0: output port row address strobe for sdram data enable for sram on pins d0 to d7 pj1 sdcas srlub 1 output output output port j1: output port column address strobe for sdram data enable for sram on pins d8 to d15 pj2 sdwe srwr 1 output output output port j2: output port write enable for sdram write for sram: strobe signal for writing data pj3 sdlldqm 1 output output port j3: output port data enable for sdram on pins d0 to d7 pj4 sdludqm 1 output output port j4: output port data enable for sdram on pins d8 to d15 pj5 ndale 1 i/o output port j5: i/o port address latch enable for nand flash pj6 ndcle 1 i/o output port j6: i/o port command latch enable for nand flash pj7 sdcke 1 output output port j7: output port clock enable for sdram pk0 lcp0 1 output output port k0: output port lcd driver output pin pk1 llp 1 output output port k1: output port lcd driver output pin pk2 lfr 1 output output port k2: output port lcd driver output pin pk3 lbcd 1 output output port k3: output port lcd driver output pin pk4 spdi 1 i/o input port k4: i/o port data input pin for sd card pk5 spdo 1 i/o output port k5: i/o port data output pin for sd card pk6 spcs 1 i/o output port k6: i/o port chip select pin for sd card pk7 spclk 1 i/o output port k7: i/o port clock output pin for sd card pl0 to pl3 ld0 to ld3 4 output output port l0 to l3: output port data bus for lcd driver pl4 to pl5 ld4 to ld5 2 i/o output port l4 to l5: i/o port data bus for lcd driver pl6 ld6 busrq 1 i/o output input 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) pl7 ld7 busak 1 i/o output output 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) tmp92ca25 2007-02-28 92ca25-11 table 2.3.5 pin names and functions (5/5) pin name number of pins i/o function pm1 mldalm 1 output output port m1: output port melody/alarm output pin pm2 alarm mldalm 1 output output output port m2: output port rtc alarm output pin melody/alarm output pin (inverted) pn0 to pn7 ko0 to ko7 8 i/o output port n0 to n7: i/o port key out pin (open-drain setting ) am0, am1 2 input operation mode: fix to am1 = ?0?, am0 = ?1? for 16-bit external bus starting 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 2 i/o high-frequency oscillator connection pins xt1/xt2 2 i/o low-frequency oscillator connection pins reset 1 input reset: initializes tmp92ca25 (with pull-up resistor, schmitt input) vrefh 1 input pin for reference voltage input to ad converter (h) vrefl 1 input pin for reference voltage input to ad converter (l) rtcvcc 1 ? power supply pin for rtc be 1 input back up enable pin: when power off dv cc and av ss during rtc is operating, set to ?l? level beforehand. usually, this pin used to ?h? level. (schmitt input) avcc 1 ? power supply pin for ad converter avss 1 ? gnd pin for ad converter (0 v) dvcc 3 ? power supply pins (all dv cc pins should be connected to the power supply pin) dvss 3 ? gnd pins (0 v) (all dv ss pins should be connected to gnd (0 v)) tmp92ca25 2007-02-28 92ca25-12 3. operation this section describes the basic components, functions and operation of the tmp92ca25. 3.1 cpu the tmp92ca25 contains an advanced hi gh-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 tmp92ca25 width of cpu address bus 24 bits width of cpu data bus 32 bits internal operating frequency max 20 mhz minimum bus cycle 1-clock access (50 ns at f sys = 20mhz) internal ram 32-bit 1-clock access 8-bit 2-clock access intc, sdramc, memc, ndfc, tsi, port 16-bit 2-clock access i2s, spic, lcdc internal i/o 8-bit 5 6-clock access tmra, tmrb, sio, rtc, mld/alm, sbi, cgear, adc external sram, masked rom 8- or 16-bit 2-clock access (waits can be inserted) external sdram 16-bit 1-clock access external nand flash 8-bit 4-clock access (waits can be inserted) minimum instruction execution cycle 1-clock (50 ns at f sys = 20mhz) conditional jump 2-clock (100 ns at f sys = 20mhz) instruction queue buffer 12 bytes instruction set compatible with tlcs-900/l1 (ldx instruction is deleted) cpu mode maximum mode only micro dma 8 channels tmp92ca25 2007-02-28 92ca25-13 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 by passed 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<7:0> data in location ffff00h pc<15:8> data in location ffff01h pc<23:16> data in location ffff02h ? sets the stack pointer (xsp) to 00000000h. ? sets bits tmp92ca25 2007-02-28 92ca25-14 figure 3.1.2 tmp92ca25 reset timing chart read write f sys a23 a0 data-in d0 d31 d0 d31 ((after reset released, sta r ting 1 wait read cycle) sampling reset rd wrxx srwr 0ffff00h data-in data-out cs0,1, 3 cs2 srxxb srxxb fsys(13.5~14.5) clock pull up (internal) high-z (input mode) pa0~pa7 (output mode) pf7 pj3~pj4, pj7 pm1~pm2 (input mode) p71~p72, p75~p76, p90~p94, p96~p97, pc0~pc3, pc6~pc7, pf0~pf1, pg0~pg3, pj5~pj6, pl4~pl7, (output mode) p40~p47,p50~p57 p74~p72, pk0~pk3, pl0~pl3 note: this chart shows timing for a reset using a 32-bit external bus (am1:0=10). tmp92ca25 2007-02-28 92ca25-15 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 mode setup input pin operation mode reset am1 am0 16-bit external bus starting (multi 16 mode) 0 1 8-bit external bus starting (multi 8 mode) 1 0 prohibit setting 1 1 reserve (toshiba test mode) 0 0 tmp92ca25 2007-02-28 92ca25-16 3.2 memory map figure 3.2.1 is a memory map of the tmp92ca25. 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 availab le. when emulator wr signal and rd signal are asserted, this area is access ed. 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. external memory external memory vector table (256 bytes) internal i/o (8 kbytes) internal ram (10 kbytes) direct area (n) 64-kbyte area (nn) 16-mbyte area (r) ( ? r) (r + ) (r + r8/16) (r + d8/16) (nnn) 000000h 000100h 001d00h 002000h 004800h f00000h f10000h ffff00h ffffffh ( = internal area) provisional emulator control (64 kbytes) 010000h (note 1) (note 2) tmp92ca25 2007-02-28 92ca25-17 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 tmp92ca25 2007-02-28 92ca25-18 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) tr iple clock mode (x1, x2, xt1 and xt2 pins and pll). figure 3.3.1 shows a transition figure. reset (f osch /32) release reset instruction interrupt stop mode (stops all circuits) normal mode (f osch /gear value/2) idle2 mode (i/o operate) idle1 mode (operate only oscillator) (a) single clock mode transition figure (b) dual clock mode transition figure slow mode (fs/2) reset (f osch /32) release reset normal mode (f osch /gear value/2) idle2 mode (i/o operate) idle1 mode (operate only oscillator) idle2 mode (i/o operate) idle1 mode (operate only oscillator) instruction instruction interrupt interrupt instruction instruction interrupt interrupt instruction instruction interrupt interrupt instruction interrupt stop mode (stops all circuits) instruction interrupt stop mode (stops all circuits) using pll note reset (f osch /32) release reset normal mode (f osch /gear value/2) idle2 mode (i/o operate) idle1 mode (operate only oscillator) stop mode (stops all circuits) slow mode (fs/2) normal mode (4 f osch /gear value/2) idle2 mode (i/o operate) idle1 mode (operate oscillator and pll) idle2 mode (i/o operate) idle1 mode (operate only oscillator) (c) triple clock mode transition figure instruction instruction interrupt interrupt instruction instruction instruction interrupt note instruction instruction interrupt instruction instruction interrupt interrupt interrupt interrupt instruction instruction instruction interrupt 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 tmp92ca25 2007-02-28 92ca25-19 3.3.1 block diagram of system clock figure 3.3.2 block diag ram of system clock tmra0 to 3, tmrb0 f sys cpu ram, rom i 2 s interrupt controller i/o ports prescaler t0 sio0 to sio1 rtc fs prescaler mld/alm sdramc f io clock-gear syscr1 tmp92ca25 2007-02-28 92ca25-20 3.3.2 sfr 7 6 5 4 3 2 1 0 bit symbol xen xten wuef read/write r/w r/w after reset 1 1 0 function high- frequency oscillator (fc) 0: stop 1: oscillation low- frequency oscillator (fs) 0: stop 1: oscillation warm-up timer 0: write don?t care 1: write start timer 0: read end warm-up 1: read do not end warm-up 7 6 5 4 3 2 1 0 bit symbol sysck gear2 gear1 gear0 read/write r/w after reset 0 1 0 0 function select system clock 0: fc 1: fs select gear value of high-frequency (fc) 000: fc 001: fc/2 010: fc/4 011: fc/8 100: fc/16 101: (reserved) 110: (reserved) 111: (reserved) 7 6 5 4 3 2 1 0 bit symbol ? wuptm1 wuptm0 haltm1 haltm0 read/write r/w r/w after reset 0 1 0 1 1 function always write ?0? warm-up timer 00: reserved 01: 2 8 /input frequency 10: 2 14 /input frequency 11: 2 16 /input frequency halt mode 00: reserved 01: stop mode 10: idle1 mode 11: idle2 mode note 1: the unassigned regist ers, syscr0 tmp92ca25 2007-02-28 92ca25-21 7 6 5 4 3 2 1 0 bit symbol protect extin drvosch drvoscl read/write r r/w after reset 0 0 1 1 function protect flag 0: off 1: on 1: external clock fc oscillator driver ability 1: normal 0: weak fs oscillator driver ability 1: normal 0: weak bit symbol read/write after reset function bit symbol read/write after reset function 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. restar ting the oscillator in stop mode), set emccr0 tmp92ca25 2007-02-28 92ca25-22 7 6 5 4 3 2 1 0 bit symbol fcsel lupfg read/write r/w r after reset 0 0 function select fc clock 0: f osch 1: f pll lock up timer status flag 0: not end 1: end note: ensure that the logic of pllcr0 tmp92ca25 2007-02-28 92ca25-23 3.3.3 system clock controller the system clock controller gene rates the system clock signal (f sys ) for the cpu core and internal i/o. it contains two oscillation circu its and a clock gear circuit for high-frequency (fc) operation. the register syscr1 tmp92ca25 2007-02-28 92ca25-24 example 1: setting the clock changing from high-frequency (fc) to low-frequency (fs). syscr0 equ 10e0h syscr1 equ 10e1h syscr2 equ 10e2h ld (syscr2), 0 x 1 1 ? ? x x b ; sets warm-up time to 2 16 /fs. set 6, (syscr0) ; enables low-frequency oscillation. set 2, (syscr0) ; clears and starts warm-up timer. wup: bit 2, (syscr0) ; jr nz, wup ; detects stopping of warm-up timer. set 3, (syscr1) ; changes f sys from fc to fs. res 7, (syscr0) ; disables high-frequency oscillation. x: don?t care, ?: no change enables low-frequency clears and starts warm-up timer chages f sys from fc to fs end of warm-up timer disabiles high-frequency fc tmp92ca25 2007-02-28 92ca25-25 example 2: setting the clock changing from low-frequency (fs) to high-frequency (fc). syscr0 equ 10e0h syscr1 equ 10e1h syscr2 equ 10e2h ld (syscr2), 0 x 1 0 ? ? x x b ; sets warm-up time to 2 14 /fc. set 7, (syscr0) ; enables high-frequency oscillation. set 2, (syscr0) ; clears and starts warm-up timer. wup: bit 2, (syscr0) ; jr nz, wup ; detects stopping of warm-up timer. res 3, (syscr1) ; changes f sys from fs to fc. res 6, (syscr0) ; disables low-frequency oscillation. x: don?t care, ?: no change counts up by f sys counts up by fc disables low-frequency enables high-frequency clears and starts warm-up time r changes f sys from fs to fc end of warm-up time r tmp92ca25 2007-02-28 92ca25-26 (2) clock gear controller f fph is set according to the contents of the clock gear select register syscr1 tmp92ca25 2007-02-28 92ca25-27 3.3.4 clock doubler (pll) pll outputs the f pll clock signal, which is four times as fast as f osch . 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 f osch = 10 mhz. note 1: input frequency range for pll the input frequency range (high-frequency oscillation) for pll is as follows: f osch = 6 to 10 mhz (v cc = 3.0 to 3.6 v) note 2: pllcr0 tmp92ca25 2007-02-28 92ca25-28 example 2: pll stopping pllcr0 equ 10e8h pllcr1 equ 10e9h ld (pllcr0), x0xxxxxxb ; changes fc from 40 mhz to10 mhz. ld (pllcr1), 0xxxxxxxb ; stop pll. x: don?t care changes from 40 mhz to 10 mhz tmp92ca25 2007-02-28 92ca25-29 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 (pllcr0), 00h ; change the clock f pll to f osch ld (pllcr1), 00h ; pll stop 3. when stopping the high-frequency oscillator during pll use, stop pll before stopping the high-frequency oscillator. examples of setting s 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 (f osch ) pll start up pll use mode (f pll ) ld (syscr0), 1 1 ? ? ? 1 ? ? b ; high-frequency oscillator start/warm-up start wup: bit 2, (syscr0) ; jr nz, wup ; check for warm-up end flag ld (syscr1), ? ? ? ? 0 ? ? ? b ; change the system clock fs to f osch ld (pllcr1), 1 ? ? ? ? ? ? ? b ; pll start-up/lock up start lup: bit 5, (pllcr0) ; jr z, lup ; check for lock up end flag ld (pllcr0), ? 1 ? ? ? ? ? ? b ; change the system clock f osch to f pll (ok) low-frequency oscillator operation mode (fs) (high-frequency oscillator operate) high-frequency oscillator operation mode (f osch ) pll start up pll use mode (f pll ) ld (syscr1), ? ? ? ? 0 ? ? ? b ; change the system clock fs to f osch ld (pllcr1), 1 ? ? ? ? ? ? ? b ; pll start-up/lock up start lup: bit 5, (pllcr0) ; jr z, lup ; check for lock up end flag ld (pllcr0), ? 1 ? ? ? ? ? ? b ; change the system clock f osch to f pll (error) low-frequency oscillator operation mode (fs) (high-frequency oscillator stop) high-frequency oscillator start up pll start up pll use mode (f pll ) ld (syscr0), 1 1 ? ? ? 1 ? ? b ; high-frequency oscillator start/warm-up start wup: bit 2, (syscr0) ; jr nz, wup ; check for warm-up end flag ld (pllcr1), 1 ? ? ? ? ? ? ? b ; pll start-up/lock up start lup: bit 5, (pllcr0) ; jr z, lup ; check for lock up end flag ld (pllcr0), ? 1 ? ? ? ? ? ? b ; change the internal clock f osch to f pll ld (syscr1), ? ? ? ? 0 ? ? ? b ; change the system clock fs to f pll tmp92ca25 2007-02-28 92ca25-30 (2) change/stop control (ok) pll use mode (f pll ) high-frequency oscillator operation mode (f osch ) pll stop low-frequency oscillator operation mode (fs) high-frequency oscillator stop ld (pllcr0), ? 0 ? ? ? ? ? ? b ; change the system clock f pll to f osch ld (pllcr1), 0 ? ? ? ? ? ? ? b ; pll stop ld (syscr1), ? ? ? ? 1 ? ? ? b ; change the system clock f osch to fs ld (syscr0), 0 ? ? ? ? ? ? ? b ; high-frequency oscillator stop (error) pll use mode (f pll ) low-frequency oscillator operation mode (fs) pll stop high-frequency oscillator stop ld (syscr1), ? ? ? ? 1 ? ? ? b ; change the system clock f pll to fs ld (pllcr0), ? 0 ? ? ? ? ? ? b ; change the internal clock (f c ) f pll to f osch ld (pllcr1), 0 ? ? ? ? ? ? ? b ; pll stop ld (syscr0), 0 ? ? ? ? ? ? ? b ; high-frequency oscillator stop (ok) pll use mode (f pll ) set the stop mode high-frequency oscillator operation mode (f osch ) pll stop halt (high-frequency oscillator stop) ld (syscr2), ? ? ? ? 01 ? ? b ; set the stop mode (this command can be executed before use of pll) ld (pllcr0), ? 0 ? ? ? ? ? ? b ; change the system clock f pll to f osch ld (pllcr1), 0 ? ? ? ? ? ? ? b ; pll stop halt ; shift to stop mode ( error) pll use mode (f pll ) set the stop mode halt (high-frequency oscillator stop) ld (syscr2), ? ? ? ? 01 ? ? b ; set the stop mode (this command can execute before use of pll) halt ; shift to stop mode tmp92ca25 2007-02-28 92ca25-31 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) (setting method) the drive ability of the oscillator is reduced by writing ?0? to emccr0 tmp92ca25 2007-02-28 92ca25-32 (2) reduced drivability for low-frequency oscillator (purpose) reduces noise and power for oscillator when a resonator is used. (block diagram) (setting method) the drive ability of the oscillator is reduced by writing 0 to the emccr0 tmp92ca25 2007-02-28 92ca25-33 (4) runaway prevention using sfr protection register (purpose) prevention of program runaway caused by introduction of noise. write operations to a specified sfr ar e 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, b2cs l/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 tmp92ca25 2007-02-28 92ca25-34 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 tmp92ca25 2007-02-28 92ca25-35 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 idle2 idle1 stop syscr2 tmp92ca25 2007-02-28 92ca25-36 table 3.3.4 source of halt state cl earance and halt clearance operation status of received interrupt interrupt enabled ( interrupt level) (interrupt mask) interrupt disabled ( interrupt level) < (interrupt mask) halt mode idle2 idle1 stop idle2 idle1 stop intwd ? ? ? ? int0 to int4 (note 1) ? ? ? * 1 * 1 intalm0 to intalm4 ? ? intta0 to intta3, inttb0 to inttb1 ? intrx0 to inttx0, intsbi ? inttbo0, inti2s ? intad, int5, intspi ? intkey ? ? ? * 1 * 1 intrtc ? ? ? * 1 * 1 interrupt intlcd ? source of halt state clearance reset 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-m askable interrupts is fixed to 7, the highest priority level. this combination is not available. * 1: release of the halt mode is exec uted after warm-up time has elapsed. note 1: when the halt mode is cleared by an in t0 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 st ate when the device is in idle1 mode. address 8200h ld (pcfc), 01h ; sets pc0 to int0. 8203h ld (iimc), 00h ; selects int0 interrupt rising edge. 8206h ld (inte0ad), 06h ; sets int0 interrupt level to 6. 8209h ei 5 ; sets interrupt level to 5 for cpu. 820bh ld (syscr2), 28h ; sets halt mode to idle1 mode. 820eh halt ; halts cpu. int0 int0 interrupt routine reti 820fh ld xx, xx tmp92ca25 2007-02-28 92ca25-37 (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. figure 3.3.7 timing chart for idle2 mo de 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. figure 3.3.8 timing chart for idle1 mo de halt state cleared by interrupt data data idle2 mode x1 a0 to a23 d0 to d15 rd wr interrupt for release data data idle1 mode x1 a0 to a23 d0 to d15 rd wr interrupt fo r release tmp92ca25 2007-02-28 92ca25-38 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. figure 3.3.9 timing chart for stop mo de halt state cleared by interrupt table 3.3.5 example of warm-up time after releasing stop mode at f osch = 40 mhz, fs = 32.768 khz syscr2 tmp92ca25 2007-02-28 92ca25-39 table 3.3.6 input buffer state table input buffer state in halt mode (idle1/2/stop) when the cpu is operating tmp92ca25 2007-02-28 92ca25-40 table 3.3.7 output buffer state table (1/2) output buffer state in halt mode (idle1/2/stop) when the cpu is operating tmp92ca25 2007-02-28 92ca25-41 table 3.3.8 output buffer state table (2/2) output buffer state in halt mode (idle1/2/stop) when the cpu is operating tmp92ca25 2007-02-28 92ca25-42 3.4 interrupts interrupts are controlled by the cpu interrupt mask register tmp92ca25 2007-02-28 92ca25-43 figure 3.4.1 interrupt and mi cro dma processing sequence micro dma soft start request interrupt processing interrupt vector calue ?v? read interrupt request f/f clear interrupt specified by micro dma start vector ? push pc push sr sr tmp92ca25 2007-02-28 92ca25-44 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 sk ips 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 gene rates 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 tmp92ca25 2007-02-28 92ca25-45 table 3.4.1 tmp92ca25 interrupt ve ctors and micro dma start vectors default priority type interrupt source and source of micro dma request vector value address refer to vector micro dma start vector 1 reset or [swi0] instruction 0000h ffff00h 2 [swi1] instruction 0004h ffff04h 3 illegal instruction or [swi2] instruction 0008h ffff08h 4 [swi3] instruction 000ch ffff0ch 5 [swi4] instruction 0010h ffff10h 6 [swi5] instruction 0014h ffff14h 7 [swi6] instruction 0018h ffff18h 8 [swi7] instruction 001ch ffff1ch 9 (reserved) 0020h ffff20h 10 non- maskable intwd: watchdog timer 0024h ffff24h ? micro dma ? ? ? (note1) 11 int0: int0 pin input 0028h ffff28h 0ah ( note 2) 12 int1: int1 pin input 002ch ffff2ch 0bh 13 int2: int2 pin input 0030h ffff30h 0ch 14 int3: int3 pin input 0034h ffff34h 0dh 15 int4: int4 pin input (tsi) 0038h ffff38h 0eh 16 intalm0: alm0 (8192 hz) 003ch ffff3ch 0fh 17 intalm1: alm1 (512 hz) 0040h ffff40h 10h 18 intalm2: alm2 (64 hz) 0044h ffff44h 11h 19 intalm3: alm3 (2 hz) 0048h ffff48h 12h 20 intalm4: alm4 (1 hz) 004ch ffff4ch 13h 21 intp0: protect0 (write to special sfr) 0050h ffff50h 14h 22 (reserved) 0054h ffff54h 15h 23 intta0: 8-bit timer 0 0058h ffff58h 16h 24 intta1: 8-bit timer 1 005ch ffff5ch 17h 25 intta2: 8-bit timer 2 0060h ffff60h 18h 26 intta3: 8-bit timer 3 0064h ffff64h 19h 27 inttb0: 16-bit timer 0 0068h ffff68h 1ah 28 inttb1: 16-bit timer 0 006ch ffff6ch 1bh 29 intkey: key-on wakeup 0070h ffff70h 1ch 30 intrtc: rtc (alarm interrupt) 0074h ffff74h 1dh 31 inttbo0: 16-bit timer 0 (overflow) 0078h ffff78h 1eh 32 intlcd: lcdc/lp pin 007ch ffff7ch 1fh 33 intrx0: serial receive (channel 0) 0080h ffff80h 20h ( note 2) 34 inttx0: serial transmission (channel 0) 0084h ffff84h 21h 35 (reserved) 0088h ffff88h 22h ( note 2) 36 (reserved) 008ch ffff8ch 23h 37 (reserved) 0090h ffff90h 24h 38 (reserved) 0094h ffff94h 25h 39 int5: int5 pin input 0098h ffff98h 26h 40 inti2s: i 2 s (channel 0) 009ch ffff9ch 27h 41 intndf0 (nand flash controller channel 0) 00a0h ffffa0h 28h 42 intndf1 (nand flash controller channel 1) 00a4h ffffa4h 29h 43 intspi: spic 00a8h ffffa8h 2ah 44 intsbi: sbi 00ach ffffach 2bh 45 (reserved) 00b0h ffffb0h 2ch 46 (reserved) 00b4h ffffb4h 2dh 47 (reserved) 00b8h ffffb8h 2eh 48 (reserved) 00bch ffffbch 2fh 49 (reserved) 00c0h ffffc0h 30h 50 maskable (reserved) 00c4h ffffc4h 31h tmp92ca25 2007-02-28 92ca25-46 default priority type interrupt source and source of micro dma request vector value address refer to vector micro dma start vector 51 (reserved) 00c8h ffffc8h 32h 52 intad: ad conversion end 00cch ffffcch 33h 53 inttc0: micro dma end (channel 0) 00d0h ffffd0h 34h 54 inttc1: micro dma end (channel 1) 00d4h ffffd4h 35h 55 inttc2: micro dma end (channel 2) 00d8h ffffd8h 36h 56 inttc3: micro dma end (channel 3) 00dch ffffdch 37h 57 inttc4: micro dma end (channel 4) 00e0h ffffe0h 38h 58 inttc5: micro dma end (channel 5) 00e4h ffffe4h 39h 59 inttc6: micro dma end (channel 6) 00e8h ffffe8h 3ah 60 inttc7: micro dma end (channel 7) 00ech ffffech 3bh ? to ? maskable (reserved) 00f0h : 00fch fffff0h : fffffch ? to ? note 1: micro dma default priority. micro dma initiation take s priority over other maskable interrupts. note 2: when initiating micro dma, set at edge detect mode. tmp92ca25 2007-02-28 92ca25-47 3.4.2 micro dma processing in addition to general purpose interrupt processing, the tmp92ca25 also includes a micro dma function. micro dma processing fo r 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 instruct ion, the requirements of the micro dma will be ignored (pending). micro dma supports 8 channels and can be tr ansferred continuously by specifying the micro dma burst function as below. note: when using the micro dma transfer end interrup t, 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 tr iggers 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 tr ansfer 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 controll er. 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 star t 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 interrupt s 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 tmp92ca25 2007-02-28 92ca25-48 although the control registers used for se tting 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 an d multiples by 4 numbered source and destination addresses.) 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 (prefetc hes the next instruction code) state (3): micro dma read cycle state (4): micro dma write cycle state (5): (the same as in state (1), (2)) src 1 state f sys a 23 to a0 (1) dst (2) (3) (4) (5) tmp92ca25 2007-02-28 92ca25-49 (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 us e read-modify-write instruction to avoid writign to other bits by mistake. symbol name address 7 6 5 4 3 2 1 0 dreq7 dreq6 dreq5 dreq4 dre q3 dreq2 dreq1 dreq0 r/w 0 0 0 0 0 0 0 0 dmar dma request 109h (prohibit rmw) 1: dma request in software (3) transfer control registers the transfer source address and the tran sfer 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 dma source address register 0 dmad0 dma destination address register 0 dmac0 dma counter register 0 dmam0 dma mode register 0 channel 7 dmas7 dma source address register 7 dmad7 dma destination address register 7 dmac7 dma counter register 7 dmam7 dma mode register 7 8 bits 16 bits 32 bits tmp92ca25 2007-02-28 92ca25-50 (4) detailed description of the transfer mode register 0 0 0 mode dmam0 to dmam7 dmamn[4:0] mode description execution state number 0 0 0 z z destination inc mode (dmadn + ) (dmasn) dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states 0 0 1 z z destination dec mode (dmadn ? ) (dmasn) dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states 0 1 0 z z source inc mode (dmadn) (dmasn + ) dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states 0 1 1 z z source dec mode (dmadn) (dmasn ? ) dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states 1 0 0 z z source and destination inc mode (dmadn + ) (dmasn + ) dmacn dmacn ? 1 if dmacn = 0 then inttcn 6 states 1 0 1 z z source and destination dec mode (dmadn ? ) (dmasn ? ) dmacn dmacn ? 1 if dmacn = 0 then inttcn 6 states 1 1 0 z z source and destination fixed mode (dmadn) (dmasn) dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states 1 1 1 0 0 counter mode dmasn dmasn + 1 dmacn dmacn ? 1 if dmacn = 0 then inttcn 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). tmp92ca25 2007-02-28 92ca25-51 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 circu it. 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 occu rs, when the cpu reads the channel vector of an interrupt it has received, when the cp u 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 execut ed (by writing a micro dma start vector to the intclr register). an interrupt priority can be set independentl y for each interrupt source by writing the priority to the interrupt priority setting re gister (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 sou rce. the priority of no n-maskable interrupt (watchdog timer interrupts) is fixed at 7. if more than one interrupt request with a given priority level are generated simultaneously, th e 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 gene rated 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 tmp92ca25 2007-02-28 92ca25-52 figure 3.4.3 block diagram of interrupt controller int01 to int4, intkey,intrtc, intalm interrupt request si g nal to cpu if iff = 7 then 0 micro dma start vector setting registe r inttc0 inttc1 inttc2 inttc3 inttc4 inttc5 inttc6 inttc7 v = d0h v = d4h v = d8h v = dch v = e0h v = e4h v = e8h v = ech soft start micro dm a counter 0 interrupt 6 inttc0 during idle1 45 3 3 3 1 6 1 7 3 3 8 6 51 8 input or micro dma channel priority decoder priority encoder dma0v dma1v : dma7v reset interrupt request f/f reset decode r reset priority setting register v = 20h v = 24h interrupt controller cpu s q r v = 28h v = 2ch v = 30h v = 34h v = 38h v = 3ch v = 40h v = 44h v = 48h v = 4ch d q clr y1 y2 y3 y4 y5 y6 a b c dn dn + 1 dn + 2 interrupt request f/f interrupt vector read micro dma acknowledge interrupt request f/f dn + 3 a b c i n t errup t vector read d2 d3 d4 d5 d6 d7 selector s q r 0 1 2 3 4 5 6 7 a b c d0 d1 interrupt vector read interrupt mask f/f micro dma request halt release if intrq2 to 0 iff 2 to 0 then 1. intrq2 to 0 iff2 to 0 interrupt level detect reset ei 1 to 7 di interrupt request signal during stop micro dma channel specification reset intwd int0 int1 int2 int3 int4 intalm0 intalm1 intalm2 intalm3 intalm4 s interrupt vector generator highest priority interrupt level select 1 2 3 4 5 6 7 d5 d4 d3 d2 d1 d0 d q clr tmp92ca25 2007-02-28 92ca25-53 (1) interrupt level se tting registers symbol name address 7 6 5 4 3 2 1 0 intad int0 iadc iadm2 iadm1 iadm0 i0c i0m2 i0m1 i0m0 r r/w r r/w inte0ad int0 & intad enable f0h 0 0 0 0 0 0 0 0 int2 int1 i2c i2m2 i2m1 i2m0 i1c i1m2 i1m1 i1m0 r r/w r r/w inte12 int1 & int2 enable d0h 0 0 0 0 0 0 0 0 int4 int3 i4c i4m2 i4m1 i4m0 i3c i3m2 i3m1 i3m0 r r/w r r/w inte34 int3 & int4 enable d1h 0 0 0 0 0 0 0 0 inti2s int5 ii2sc ii2sm2 ii2sm1 ii2sm0 i5c i5m2 i5m1 i5m0 r r/w r r/w inte5i2s int5 & inti2s enable ebh 0 0 0 0 0 0 0 0 intta1 (tmra1) intta0 (tmra0) ita1c ita1m2 ita1m1 ita1m0 it a0c ita0m2 ita0m1 ita0m0 r r/w r r/w inteta01 intta0 & intta1 enable d4h 0 0 0 0 0 0 0 0 intta3 (tmra3) intta2 (tmra2) ita3c ita3m2 ita3m1 ita3m0 it a2c ita2m2 ita2m1 ita2m0 r r/w r r/w inteta23 intta2 & intta3 enable d5h 0 0 0 0 0 0 0 0 inttb1 (tmrb1) inttb0 (tmrb0) itb1c itb1m2 itb1m1 itb1m0 it b0c itb0m2 itb0m1 itb0m0 r r/w r r/w intetb01 inttb0 & inttb1 enable d8h 0 0 0 0 0 0 0 0 ? inttbo0 ? ? ? ? itbo0c itbo0m2 itbo0m1 itbo0m0 r r/w intetbo0 inttbo0 (overflow) enable dah note: always write 0 0 0 0 0 inttx0 intrx0 itx0c itx0m2 itx0m1 itx0m0 irx0c irx0m2 irx0m1 irx0m0 r r/w r r/w intes0 intrx0 & inttx0 enable dbh 0 0 0 0 0 0 0 0 inttx1 ? itx1c itx1m2 itx1m1 itx1m0 ? ? ? ? r r/w intespi intspi enable e0h 0 0 0 0 note: always write 0 intalm1 intalm0 ia1c ia1m2 ia1m1 ia1m0 ia0c ia0m2 ia0m1 ia0m0 r r/w r r/w intealm01 intalm0 & intalm1 enable e5h 0 0 0 0 0 0 0 0 intalm3 intalm2 ia3c ia3m2 ia3m1 ia3m0 ia2c ia2m2 ia2m1 ia2m0 r r/w r r/w intealm23 intalm2 & intalm3 enable e6h 0 0 0 0 0 0 0 0 tmp92ca25 2007-02-28 92ca25-54 symbol name address 7 6 5 4 3 2 1 0 ? intalm4 ? ? ? ? ia4c ia4m2 ia4m1 ia4m0 r r/w intealm4 intalm4 enable e7h note: always write 0 0 0 0 0 ? intrtc ? ? ? ? irc irm2 irm1 irm0 r r/w intertc intrtc enable e8h note: always write 0 0 0 0 0 ? intkey ? ? ? ? ikc ikm2 ikm1 ikm0 r r/w intekey intkey enable e9h note: always write 0 0 0 0 0 ? intlcd ? ? ? ? ilcd1c ilcdm2 ilcdm1 ilcdm0 r r/w intelcd intlcd enable eah note: always write 0 0 0 0 0 intndf1 intndf0 in1c in1m2 in1m1 in1m0 in0c in0m2 in0m1 in0m0 r r/w r r/w intend01 intndf0 & intndf1 enable ech 0 0 0 0 0 0 0 0 ? intp0 ? ? ? ? ip0c ip0m2 ip0m1 ip0m0 r r/w intep0 intp0 enable eeh note: always write 0 0 0 0 0 lxxm2 lxxm1 lxxm0 function (write) 0 0 0 disables interrupt requests 0 0 1 sets interrupt priority level to 1 0 1 0 sets interrupt priority level to 2 0 1 1 sets interrupt priority level to 3 1 0 0 sets interrupt priority level to 4 1 0 1 sets interrupt priority level to 5 1 1 0 sets interrupt priority level to 6 1 1 1 disables interrupt requests interrupt request flag tmp92ca25 2007-02-28 92ca25-55 interrupt request flag symbol name address 7 6 5 4 3 2 1 0 inttc1 (dma1) inttc0 (dma0) itc1c itc1m2 itc1m1 itc1m0 itc0c itc0m2 itc0m1 itc0m0 r r/w r r/w intetc01 inttc0 & inttc1 enable f1h 0 0 0 0 0 0 0 0 inttc3 (dma3) inttc2 (dma2) itc3c itc3m2 itc3m1 itc3m0 itc2c itc2m2 itc2m1 itc2m0 r r/w r r/w intetc23 inttc2 & inttc3 enable f2h 0 0 0 0 0 0 0 0 inttc5 (dma5) inttc4 (dma4) itc5c itc5m2 itc5m1 itc5m0 itc4c itc4m2 itc4m1 itc4m0 r r/w r r/w intetc45 inttc4 & inttc5 enable f3h 0 0 0 0 0 0 0 0 inttc7 (dma7) inttc6 (dma6) itc7c itc7m2 itc7m1 itc7m0 itc6c itc6m2 itc6m1 itc6m0 r r/w r r/w intetc67 inttc6 & inttc7 enable f4h 0 0 0 0 0 0 0 0 ? intwd ? ? ? ? itcwd ? ? ? r intwdt intwd enable f7h note: always write 0 0 ? ? ? lxxm2 lxxm1 lxxm0 function (write) 0 0 0 disables interrupt requests 0 0 1 sets interrupt priority level to 1 0 1 0 sets interrupt priority level to 2 0 1 1 sets interrupt priority level to 3 1 0 0 sets interrupt priority level to 4 1 0 1 sets interrupt priority level to 5 1 1 0 sets interrupt priority level to 6 1 1 1 disables interrupt requests tmp92ca25 2007-02-28 92ca25-56 (2) external interrupt control symbol name address 7 6 5 4 3 2 1 0 i5edge i4edge i3edge i2edge i1edge i0edge i0le ? w r/w 0 0 0 0 0 0 0 0 iimc interrupt input mode control f6h (prohibit rmw) int5edge 0: rising 1: falling int4edge 0: rising 1: falling int3edge 0: rising 1: falling int2edge 0: rising 1: falling int1edge 0: rising 1: falling int0edge 0: rising 1: falling 0: int0 edge mode 1: int0 level mode always write ?0? * 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 (iimc), xxxxxx00b ; switches from level to edge. ld (intclr), 0ah ; clears interrupt request flag. nop ; wait ei execution nop nop ei x: don?t care, ?: no change. note 2: see electrical characteristics in sect ion 4 for external interrupt input pulse width. settings of external interrupt pin function interrupt pin name mode setting method rising edge tmp92ca25 2007-02-28 92ca25-57 (3) sio receive interrupt control symbol name address 7 6 5 4 3 2 1 0 ? ? ir0le w w 0 1 1 simc sio interrupt mode control f5h (prohibit rmw) always write ?0? (note) always write ?0? 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 tmp92ca25 2007-02-28 92ca25-58 (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 clears interrupt request flag int0. symbol name address 7 6 5 4 3 2 1 0 clrv7 clrv6 clrv5 clrv4 clrv3 clrv2 clrv1 clrv0 w 0 0 0 0 0 0 0 0 intclr interrupt clear control f8h (prohibit rmw) 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 valu e 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 th e 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 th e micro dma start vector for this channel has not been set in the channel?s micro dm a start vector register again, micro dma transfer for the higher-numbered channel will be commenced. (this process is known as micro dma chaining.) tmp92ca25 2007-02-28 92ca25-59 symbol name address 7 6 5 4 3 2 1 0 dma0v5 dma0v4 dma0v3 dma0v2 dma0v1 dma0v0 r/w 0 0 0 0 0 0 dma0v dma0 start vector 100h dma0 start vector dma1v5 dma1v4 dma1v3 dma1v2 dma1v1 dma1v0 r/w 0 0 0 0 0 0 dma1v dma1 start vector 101h dma1 start vector dma2v5 dma2v4 dma2v3 dma2v2 dma2v1 dma2v0 r/w 0 0 0 0 0 0 dma2v dma2 start vector 102h dma2 start vector dma3v5 dma3v4 dma3v3 dma3v2 dma3v1 dma3v0 r/w 0 0 0 0 0 0 dma3v dma3 start vector 103h dma3 start vector dma4v5 dma4v4 dma4v3 dma4v2 dma4v1 dma4v0 r/w 0 0 0 0 0 0 dma4v dma4 start vector 104h dma4 start vector dma5v5 dma5v4 dma5v3 dma5v2 dma5v1 dma5v0 r/w 0 0 0 0 0 0 dma5v dma5 start vector 105h dma5 start vector dma6v5 dma6v4 dma6v3 dma6v2 dma6v1 dma6v0 r/w 0 0 0 0 0 0 dma6v dma6 start vector 106h dma6 start vector dma7v5 dma7v4 dma7v3 dma7v2 dma7v1 dma7v0 r/w 0 0 0 0 0 0 dma7v dma7 start vector 107h dma7 start vector tmp92ca25 2007-02-28 92ca25-60 (6) specification of a micro dma burst specifying the micro dma burst function ca uses 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 address 7 6 5 4 3 2 1 0 dbst7 dbst6 dbst5 dbst4 d bst3 dbst2 dbst1 dbst0 r/w 0 0 0 0 0 0 0 0 dmab dma burst 108h 1: dma burst request tmp92ca25 2007-02-28 92ca25-61 (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 co rresponding 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 en abled before request flag is cleared. in the case of changing the value of the interrupt mask register tmp92ca25 2007-02-28 92ca25-62 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 regist ers and their sp ecifications. table 3.5.1 port functions (1/2) ( r: pd = with programmable pull-down resistor, u = with pull-up resistor) port name pin name number of pins i/o r i/o setting pin name for built-in function port 1 p10 to p17 8 i/o ? bit d8 to d15 port 6 p60 to p67 8 i/o ? bit a16 to a23 p70 1 output ? (fixed) rd p71 1 i/o ? bit wrll , ndre p72 1 i/o ? bit wrlu , ndwe p73 1 i/o ? bit ea24 p74 1 i/o ? bit ea25 p75 1 i/o ? bit r/ w , ndr/ b port 7 p76 1 i/o ? bit wait p80 1 output ? (fixed) 0 cs p81 1 output ? (fixed) 1 cs , sdcs p82 1 output ? (fixed) 2 cs , csza p83 1 output ? (fixed) 3 cs p84 1 output ? (fixed) cszb , wrul , ce 0 nd p85 1 output ? (fixed) cszc , wruu , ce 1 nd p86 1 output ? (fixed) cszd port 8 p87 1 output ? (fixed) csze p90 1 i/o ? bit txd0, i2scko p91 1 i/o ? bit rxd0, i2sdo p92 1 i/o ? bit sclk0, 0 cts , i2sws p93 1 i/o ? bit sda p94 1 i/o ? bit scl p95 1 output ? (fixed) clk32ko p96 1 input pd (fixed) int4, px port 9 p97 1 input ? (fixed) int5, py port a pa0 to pa7 8 input u (fixed) ki0 to ki7 pc0 1 i/o ? bit int0, ta1out pc1 1 i/o ? bit int1, ta3out pc2 1 i/o ? bit int2, tb0out0 pc3 1 i/o ? bit int3 pc4 1 i/o ? bit pc5 1 i/o ? bit pc6 1 i/o ? bit ko8, ea24 port c pc7 1 i/o ? bit cszf , ea25 pf0 1 i/o ? bit txd0 pf1 1 i/o ? bit rxd0 pf2 1 i/o ? bit sclk0, 0 cts pf3 1 i/o ? bit pf4 1 i/o ? bit pf5 1 i/o ? bit pf6 1 i/o ? bit port f pf7 1 output ? (fixed) sdclk tmp92ca25 2007-02-28 92ca25-63 table 3.5.2 port functions (2/2) ( r: pd = with programmable pull-down resistor, u = with pull-up resistor) port name pin name number of pins i/o r i/o setting pin name for built-in function pg0 to pg1 2 input ? (fixed) an0 to an1 pg2 1 input ? (fixed) an2, mx port g pg3 1 input ? (fixed) an3, adtrg , my pj0 1 output ? (fixed) sdras , srllb pj1 1 output ? (fixed) sdcas , srlub pj2 1 output ? (fixed) sdwe , srwr pj3 1 output ? (fixed) sdlldqm pj4 1 output ? (fixed) sdludqm pj5 1 i/o ? bit ndale pj6 1 i/o ? bit ndcle port j pj7 1 output ? (fixed) sdcke pk0 1 output ? (fixed) lcp0 pk1 1 output ? (fixed) llp pk2 1 output ? (fixed) lfr pk3 1 output ? (fixed) lbcd pk4 1 i/o ? bit spdi pk5 1 i/o ? bit spdo pk6 1 i/o ? bit spcs port k pk7 1 i/o ? bit spclk pl0 to pl3 4 output ? (fixed) ld0 to ld3 pl4 to pl5 2 i/o ? bit ld4 to ld5 pl6 1 i/o ? bit ld6, busrq port l pl7 1 i/o ? bit ld7, busak pm1 1 output ? (fixed) mldalm port m pm2 1 output ? (fixed) alarm , mldalm port n pn0 to pn7 8 i/o ? bit ko0 to ko7 tmp92ca25 2007-02-28 92ca25-64 table 3.5.3 i/o registers and specifications (1/3) x: don?t care i/o register port pin name specification pn pncr pnfc pnfc2 input port x 0 0 output port x 1 0 d8 to d15 bus x x 1 port 1 p10 to p17 a0 to a7 output x 1 none input port x 0 0 output port x 1 0 port 6 p60 to p67 a16 to a23 output x x 1 none p70 to p76 output port x 1 0 p71 to p76 input port x 0 0 p70 rd output x none 1 wrll output 1 1 1 p71 ndre output 0 1 1 wrlu output 1 1 1 p72 ndwe output 0 1 1 p73 ea24 output x 1 1 p74 ea25 output x 1 1 r/ w output x 1 1 p75 ndr/ b input x 0 1 port 7 p76 wait input x 0 1 none p80 to p87 output port x 0 0 p80 0 cs output x 1 0 1 cs output x 1 0 p81 sdcs output x x 1 2 cs output x 1 0 p82 csza output x 0 1 p83 3 cs output x 1 0 cszb output x 1 0 p84 ce 0 nd output x 1 1 cszc output x 1 0 p85 ce 1 nd output x 1 1 p86 cszd output x 1 0 port 8 p87 csze output x none 1 0 tmp92ca25 2007-02-28 92ca25-65 table 3.5.4 i/o registers and specifications (2/3) x: don?t care i/o register port pin name specification pn pncr pnfc pnfc2 p90 to p94, p96 to p97 input port x 0 0 p90 to p94 x 1 0 p95 output port x 0 0 txd0 output x 1 1 i2scko output x 0 1 0 p90 txd0 output (open drain) x 1 1 1 rxd0 input x 0 0 p91 i2sdo output x 0 1 sclk0 output x 1 1 i2sws output x 0 1 p92 sclk0, 0 cts input (note1) x 0 0 none sda i/o x 1 1 0 p93 sda i/o (open drain) x 1 1 1 scl i/o x 1 1 0 p94 scl i/o (open drain) x 1 1 1 p95 clk32ko output x 1 0 p96 int4 input x none 1 port 9 p97 int5 input x none 1 none input port 0 port a pa0 to pa7 ki0 to ki7 input none none 1 none input port x 0 0 pc0 to pc3 pc6 to pc7 output port x 1 0 int0 input x 0 1 none pc0 ta1out output x 1 1 none int1 input x 0 1 pc1 ta3out output x 1 1 none int2 input x 0 1 none pc2 tb0out0 output x 1 1 none pc3 int3 input x 0 1 ko8 output (open drain) x 0 1 pc6 ea24 output 0 1 1 cszf output x 0 1 port c pc7 ea25 output 0 1 1 none pf0 to pf6 input port x 0 0 pf0 topf7 output port x 1 0 0 txd0 output x 1 1 0 pf0 txd0 output (open drain) x 1 1 1 pf1 rxd0 input x 0 0 sclk0 output x 1 1 pf2 sclk0, 0 cts input x 0 0 port f pf7 sdclk output x none 1 none note: to use p92-pin as sclk0 input or 0 cts input, set ?1? to pf tmp92ca25 2007-02-28 92ca25-66 table 3.5.5 i/o registers and specifications (3/3) x: don?t care i/o register port pin name specification pn pncr pnfc pnfc2 input port pg0 to pg3 an0 to an3 input pg3 adtrg input pg2 mx output port g pg3 my output x none none none pj0 to pj7 output port x 1 0 pj5 to pj6 input port x 0 0 pj0 sdras , srllb output x 1 pj1 sdcas , srlub output x 1 pj2 sdwe , srwr output x 1 pj3 sdlldqm output x 1 pj4 sdludqm output 1 none 1 pj5 ndale output 0 1 1 pj6 ndcle output 0 1 1 port j pj7 sdcke output x none 1 none pk4 to pk7 input port x 0 0 none pk0 to pk3 output port x none 0 pk4 to pk7 output port x 1 0 pk0 lcp0 output x 1 pk1 llp output x 1 pk2 lfr output x 1 pk3 lbcd output x none 1 pk4 spdi input x 0 1 pk5 spdo output x 1 1 pk6 spcs output x 1 1 port k pk7 spclk output x 1 1 none pl4 to pl7 input port x 0 0 pl0 to pl7 output port x 1 0 pl0 to pl7 ld0 to ld7 output x 1 1 pl6 busrq input x 1 1 port l pl7 busak output x 1 1 none pm1 to pm2 output port x 0 pm1 mldalm output x 1 mldalm output 0 1 port m pm2 alarm output 1 none 1 none input port x 0 0 output port (cmos output) x 1 0 port n pn0 to pn7 ko output (open drain output) x 1 1 none tmp92ca25 2007-02-28 92ca25-67 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 p1 cr 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 am0 function setting after reset is released 0 0 don?t use this setting 0 1 data bus (d8 to d15) 1 0 data bus (d8 to d15) 1 1 input port figure 3.5.1 port 1 p1cr register p1fc register p1 register external write enable d8 to d15 s 0 1 s 1 0 p10 to p17 ( d8 to d15 ) external read enable d8 to d15 port read data selecto r selecto r tmp92ca25 2007-02-28 92ca25-68 port 1 register 7 6 5 4 3 2 1 0 bit symbol p17 p16 p15 p14 p13 p12 p11 p10 read/write r/w after reset data from external port (output latch register is cleared to ?0?) port 1 control register 7 6 5 4 3 2 1 0 bit symbol p17c p16c p15c p14c p13c p12c p11c p10c read/write w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port 1 function register 7 6 5 4 3 2 1 0 bit symbol p1f read/write w after reset 0/1 note 2 function 0: port 1: data bus (d8 to d15) port 1 drive register 7 6 5 4 3 2 1 0 bit symbol p17d p16d p15d p14d p13d p12d p11d p10d read/write w after reset 1 1 1 1 1 1 1 1 function input/output buffer driv e 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 p1 (0004h) p1cr (0006h) p1fc (0007h) p1dr (0081h) tmp92ca25 2007-02-28 92ca25-69 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 6 5 4 3 2 1 0 bit symbol p57d p56d p55d p54d p53d p52d p51d p50d p4dr (0084h) read/write w after reset 1 1 1 1 1 1 1 1 function input/output buffer driv e 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 6 5 4 3 2 1 0 bit symbol p57d p56d p55d p54d p53d p52d p51d p50d p5dr (0085h) read/write w after reset 1 1 1 1 1 1 1 1 function input/output buffer driv e register for standby mode figure 3.5.4 drive regi ster for a8 to a15 tmp92ca25 2007-02-28 92ca25-70 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 p6 cr and function register p6fc. in addition to functioning as a general-purpos e i/o port, port 6 can also function as an address bus (a16 to a23). am1 am0 function setting after reset is released 0 0 don?t use this setting 0 1 address bus (a16 to a23) 1 0 address bus (a16 to a23) 1 1 input port figure 3.5.5 port 6 p6cr register p6fc register p6 register (reserved) a16 to a23 s 0 1 s 1 0 p60 to p67 (a16 to a23) port read data selecto r selecto r tmp92ca25 2007-02-28 92ca25-71 port 6 register 7 6 5 4 3 2 1 0 bit symbol p67 p66 p65 p64 p63 p62 p61 p60 read/write r/w after reset data from external port (output latch register is cleared to ?0?) port 6 control register 7 6 5 4 3 2 1 0 bit symbol p67c p66c p65c p64c p63c p62c p61c p60c read/write w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port 6 function register 7 6 5 4 3 2 1 0 bit symbol p67f p66f p65f p64f p63f p62f p61f p60f read/write w after reset note 2 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 function 0: port 1: address bus (a16 to a23) port 6 drive register 7 6 5 4 3 2 1 0 bit symbol p67d p66d p65d p64d p63d p62d p61d p60d read/write w after reset 1 1 1 1 1 1 1 1 function input/output buffer driv e 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 p6 (0018h) p6fc (001bh) p6dr (0086h) p6cr (001ah) tmp92ca25 2007-02-28 92ca25-72 3.5.5 port 7 (p70 to p76) port 7 is a 7-bit general-purpose i/o po rt (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 am0 function setting after reset is released 0 0 don?t use this setting 0 1 rd pin 1 0 rd pin 1 1 p70 output port figure 3.5.7 port 7 p7fc register p7 register rd s 0 1 p70( rd ) port read data selecto r ndre , ndwe port read data wrll , wrlu p7cr register p7fc register p7 register s 0 1 s 1 0 p71 ( wrll , ndre ) p72 ( wrlu , ndwe ) selecto r selecto r s 0 1 tmp92ca25 2007-02-28 92ca25-73 figure 3.5.8 port 7 p7cr register p7fc register p7 register p76 ( wait ) wait port read data p7cr register p7fc register p7 register s 0 1 s 1 0 p75 (r/ w , ndr/ b ) selector port read data ndr/ b r/ w p7cr register p7fc register p7 register s 0 1 s 1 0 p73 (ea24) p74 (ea25) selector port read data ea24, ea25 selector tmp92ca25 2007-02-28 92ca25-74 port 7 register 7 6 5 4 3 2 1 0 bit symbol p76 p75 p74 p73 p72 p71 p70 read/write r/w after reset data from external port (output latch register is set to ?1?) 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 6 5 4 3 2 1 0 bit symbol p76c p75c p74c p73c p72c p71c read/write w after reset 0 0 0 0 0 0 function 0: input 1: output port 7 function register 7 6 5 4 3 2 1 0 bit symbol p76f p75f p74f p73f p72f p71f p70f read/write w after reset 0 0 0 0 0 0 0/1 note 2 function 0: input port 1: wait refer to following table 0: port 1: rd port 7 drive register 7 6 5 4 3 2 1 0 bit symbol p76d p75d p94d p73d p72d p71d p70d read/write r/w after reset 1 1 1 1 1 1 1 function input/output buffer dr ive register for standby mode 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 register bit2 bit1 (1) p7 0 0 (2) p7fc 1 1 (3) p7cr 1 1 figure 3.5.9 register for port 7 p72 setting tmp92ca25 2007-02-28 92ca25-75 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 in terface pin for external memory using function register p8fc. writing ?1? in the corresponding bit of p8fc and p8fc2 enables the respective functions. resetting tmp92ca25 2007-02-28 92ca25-76 port 8 register 7 6 5 4 3 2 1 0 bit symbol p87 p86 p85 p84 p83 p82 p81 p80 p8 (0020h) read/write r/w after reset 1 1 1 1 1 0 1 1 port 8 function register 7 6 5 4 3 2 1 0 bit symbol p87f p86f p85f p84f p83f p82f p81f p80f p8fc (0023h) read/write w after reset 0 0 0 0 0 0 0 0 function 0: port 1: csze 0: port 1: cszd refer to following table refer to following table 0: port 1: 3 cs refer to following table 0: port 1: 1 cs 0: port 1: 0 cs port 8 function register 2 7 6 5 4 3 2 1 0 bit symbol p87f2 p86f2 p85f2 p84f2 p83f2 p82f2 p81f2 p80f2 p8fc2 (0021h) read/write w after reset 0 0 0 0 0 0 0 0 function 0: tmp92ca25 2007-02-28 92ca25-77 3.5.7 port 9 (p90 to p97) p90 to p94 are 5-bit general-purpose i/o port s. i/o can be set on a bit basis using the control register. resettin g sets p90 to p94 to input port and all bits of output latch to?1?. p95 is 1-bit general-purpose output port an d 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 i 2 s. each pin is detailed below. sio mode (sio0 module) uart, irda mode (sio0 module) i 2 s mode (i 2 s module) sio mode (i 2 s module) p90 txd0 (data output) txd0 (data output) i2scko (clock output) i2scko (clock output) p91 rxd0 (data input) rxd0 (data input) i2sdo (data output) i2sdo (data output) p92 sclk0 (clock input or output) 0 cts (clear to send) i2sws (word select output) (no use) figure 3.5.12 p90 internal data bus direction control (on bit basis) reset p9cr write p9 write p9 read p90 (txd0, i2scko) function control (on bit basis) p9fc write txd0, i2scko output s output latch s b selector a s a selector b spdi input tmp92ca25 2007-02-28 92ca25-78 figure 3.5.13 p91 and p92 (2) p93 (sda), p94 (scl) figure 3.5.14 port 93 and 94 internal data bus direction control (on bit basis) reset p9cr write p9 write p9 read p91 (rxd0, i2sdo) p92 (sclk0, 0 cts , i2sws) function control (on bit basis) p9fc write i2sdo output sclk0,i2sws output s output latch s b selector a s a selector b (to port f1) p91rxd0 input (to port f2) p92sclk0 input internal data bus direction control (on bit basis) reset p9cr write p9 write p9 read p93(sda), p94(scl) function control (on bit basis) p9fc write sda, scl output s output latch s b selector a s a selector b open drain enable p9fc2 tmp92ca25 2007-02-28 92ca25-79 (3) p95 (clk32ko) figure 3.5.15 port 95 (4) p96 (int4, px), p97 (int5, py) figure 3.5.16 port 96, 97 internal data bus reset p9 read p96 (int4, px) p97 (int5, py) function control p9fc write int4 int5 s a selector b rising/falling edge detection tsicr1 tmp92ca25 2007-02-28 92ca25-80 port 9 register 7 6 5 4 3 2 1 0 bit symbol p97 p96 p95 p94 p93 p92 p91 p90 p9 (0024h) read/write r r/w after reset data from external port 0 data from ex ternal port (output latch register is set to ?1?) port 9 control register 7 6 5 4 3 2 1 0 bit symbol p95c p94c p93c p92c p91c p90c p9cr (0026h) read/write w after reset 0 0 0 0 0 0 function refer to following table port 9 function register 7 6 5 4 3 2 1 0 bit symbol p97f p96f p95f p94f p93f p92f p91f p90f p9fc (0027h) read/write w after reset 0 0 0 0 0 0 0 0 function 0: input port 1: int5 0: input port 1: int4 refer to following table port 9 function register 2 7 6 5 4 3 2 1 0 bit symbol p94f2 p93f2 p90f2 p9fc2 (0025h) read/write w w after reset 0 0 0 function 0: cmos 1: open drain 0: cmos 1: open drain 0: cmos 1: open drain port 9 drive register 7 6 5 4 3 2 1 0 bit symbol p97d p96d p95d p94d p93d p92d p91d p90d p9dr (0089h) read/write r/w after reset 1 1 1 1 1 1 1 1 function output/input buffer dr ive 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 i nput, set p9dr tmp92ca25 2007-02-28 92ca25-81 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. 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. internal data bus pa0 (ki0) pa1 (ki1) pa2 (ki2) pa3 (ki3) pa4 (ki4) pa5 (ki5) pa6 (ki6) pa7 (ki7) intkey edge detection key-on enable (on bit basis) pafc write pa read pull-up resistor reset pa0 to pa7 8-input or tmp92ca25 2007-02-28 92ca25-82 port a register 7 6 5 4 3 2 1 0 bit symbol pa7 pa6 pa5 pa4 pa3 pa2 pa1 pa0 read/write r/w after reset data from external port port a function register 7 6 5 4 3 2 1 0 bit symbol pa7f pa6f pa5f pa4f pa3f pa2f pa1f pa0f read/write w after reset 0 0 0 0 0 0 0 0 function 0: key input disable 1: key input enable port a drive register 7 6 5 4 3 2 1 0 bit symbol pa7d pa6d pa5d pa4d pa3d pa2d pa1d pa0d read/write w after reset 1 1 1 1 1 1 1 1 function input/output buffer driv e register for standby mode note: read-modify-write is prohibited for pacr and pafc. figure 3.5.19 register for port a padr (008ah) pa (0028h) pafc (002bh) tmp92ca25 2007-02-28 92ca25-83 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-purpos e 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) figure 3.5.20 port c0 internal data bus direction control reset pccr write pc read pc0 (int0, ta1out) pc write s output latch s b selector a function control pcfc write int0 s a selector b iimc tmp92ca25 2007-02-28 92ca25-84 (2) pc1 (int1, ta3out), pc2 (int2, tb0out0), pc3 (int3, tb0out1) figure 3.5.21 port c1, c2, c3 (3) pc4, pc5 figure 3.5.22 port c4, c5 internal data bus direction control (on bit basis) reset pccr write pc read pc1 (int1, ta3out) pc2 (int2, tb0out0) pc3 (int3) pc write s output latch s b selector a pcfc write int1 to int3 s a selector b rising/falling edge detection iimc tmp92ca25 2007-02-28 92ca25-85 (4) pc6 (ko8, ea24) figure 3.5.23 port c6 (4) pc7 ( cszf , ea25) figure 3.5.24 port c7 s a selector b c internal data bus direction control (on bit basis) reset pccr write pc read pc7 ( cszf , ea25) pc write s output latch s b selector a funtcion control (on bit basis) pffc write cszf ea25 internal data bus direction control (on bit basis) reset pccr write pc read pc6 (ko8, ea24) pc write s output latch s b selector a funtcion control (on bit basis) pcfc write s a selector b ea24 open drain enable tmp92ca25 2007-02-28 92ca25-86 port c register 7 6 5 4 3 2 1 0 bit symbol pc7 pc6 pc5 pc4 pc3 pc2 pc1 pc0 pc (0030h) read/write r/w after reset data from external port (o utput latch register is set to ?1?) port c control register 7 6 5 4 3 2 1 0 bit symbol pc7c pc6c pc5c pc4c pc3c pc2c pc1c pc0c pccr (0032h) read/write w after reset 0 0 0 0 0 0 0 0 function refer to following table port c function register 7 6 5 4 3 2 1 0 bit symbol pc7f pc6f pc5f pc4f pc3f pc2f pc1f pc0f pcfc (0033h) read/write w after reset 0 0 0 0 0 0 0 0 function refer to following table port c drive register 7 6 5 4 3 2 1 0 bit symbol pc7d pc6d pc5d pc4d pc3d pc2d pc1d pc0d read/write r/w after reset 1 1 1 1 1 1 1 1 function input/output buffer dr ive register for standby mode note1: read-modify-write is prohibi ted for the registers pccr and pcfc. note2: when setting pc3-pc0 pins to int3-int0 input, set pcdr tmp92ca25 2007-02-28 92ca25-87 3.5.10 port f (pf0 to pf7) ports f0 to f6 are 7-bit general-purpose i/o po rts. 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 al so 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 f unction 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) uart, irda mode (sio0 module) pf0 txd0 (data output) txd0 (data output) pf1 rxd0 (data input) rxd0 (data input) pf2 sclk0 (clock input or output) 0 cts (clear to send) figure 3.5.26 port f0 internal data bus direction control (on bit basis) reset pfcr write pf write pf read pf0 (txd0) pffc write txd0 s output latch s b selector a s a bselector open drain set possible pffc2 tmp92ca25 2007-02-28 92ca25-88 figure 3.5.27 port f1 figure 3.5.28 port f2 internal data bus direction control (on bit basis) reset pfcr write pf read pf1 (rxd0) pf write s output latch s a selector b s b selector a pffc tmp92ca25 2007-02-28 92ca25-89 (2) pf3, pf4, pf5, pf6, pf7 figure 3.5.29 port f3, f4. f5 and f6 figure 3.5.30 port f7 internal data bus direction control (on bit basis) reset pfcr write pf write pf read pf3 pf4 pf5 pf6 function control (on bit basis) pffc write s output latch s b selector a internal data bus reset pf read pf7 (sdclk) pf write s output latch function control (on bit basis) pffc write s a selector b sdclk tmp92ca25 2007-02-28 92ca25-90 port f register 7 6 5 4 3 2 1 0 bit symbol pf7 pf6 pf 5 pf4 pf3 pf2 pf1 pf0 pf (003ch) read/write r/w after reset 1 data from external port (output latch register is set to ?1?) port f control register 7 6 5 4 3 2 1 0 bit symbol pf6c pf5c pf 4c pf3c pf2c pf1c pf0c pfcr (003eh) read/write w after reset 0 0 0 0 0 0 0 function refer to following table port f functon register 7 6 5 4 3 2 1 0 bit symbol pf7f pf6f pf5f pf4f pf3f pf2f pf1f pf0f pffc (003fh) read/write w after reset 1 0 0 0 0 0 0 0 function refer to following table rxd0 pin selection 0: port f1 1: port 91 refer to following table pf2 setting tmp92ca25 2007-02-28 92ca25-91 port f functon register 2 7 6 5 4 3 2 1 0 bit symbol ? ? pf0f2 pffc2 (003dh) read/write w w w after reset 0 0 0 function always write ?0? always write ?0? output buffer 0: cmos 1: open drain port f drive register 7 6 5 4 3 2 1 0 bit symbol pf7d pf6d pf5d pf4d pf3d pf2d pf1d pf0d read/write r/w after reset 1 1 1 1 1 1 1 1 function input/output buffer dr ive register for standby mode note: read-modify-write is prohibited fo r the registers pfcr, pffc and pffc2. figure 3.5.31 register for port f pfdr (008fh) tmp92ca25 2007-02-28 92ca25-92 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 us ed 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. figure 3.5.32 port g port g register 7 6 5 4 3 2 1 0 bit symbol pg2 pg2 pg1 pg0 pg (0040h) read/write r after reset 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 6 5 4 3 2 1 0 bit symbol pg3d pg2d pgdr (0090h) read/write r/w after reset 1 1 function input/output buffer drive register for standby mode figure 3.5.33 register for port g internal data bus adtrg (only for pg3) port g read pg0 (an0), pg1 (an1), pg2 (an2, mx), pg3 (an3, my, adtrg ) ad converter channel selector ad read conversion result register tsicr0 tmp92ca25 2007-02-28 92ca25-93 3.5.12 port j (pj0 to pj7) pj0 to pj4 and pj7 are 6-bit output ports. rese tting 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. figure 3.5.34 port j0, j1, j2, j3, j4 and j7 internal data bus function control 2 (on bit basis) reset pjfc2 write pj write pj read pj0 ( sdras , srllb ) pj1 ( sdcas , srlub ) pj2 ( sdwe , srwr ) pj3 (sdlldqm) pj4 (sdludqm) pj7 (sdcke) function control (on bit basis) pjfc write output latch s selector srllb , srlub , srwr sdras , sdcas , sdwe , sdlldqm, sdludqm, sdcke tmp92ca25 2007-02-28 92ca25-94 figure 3.5.35 port j5 and j6 pj5 (ndale), pj6 (ndcle) internal data bus direction control (on bit basis) reset pjcrwrite pj write pj read function control (on bit basis) pjfc write ndale, ndcle s output latch s b selector a s selector tmp92ca25 2007-02-28 92ca25-95 port j register 7 6 5 4 3 2 1 0 bit symbol pj7 pj6 pj 5 pj4 pj3 pj2 pj1 pj0 pj (004ch) read/write r/w after reset 1 data from external port (output latch register is set to ?1?) 1 1 1 1 1 port j control register 7 6 5 4 3 2 1 0 bit symbol pj6c pj5c pjcr (004eh) read/write w after reset 0 0 function 0: input 1: output port j function register 7 6 5 4 3 2 1 0 bit symbol pj7f pj6f pj5f pj4f pj3f pj2f pj1f pj0f pjfc (004fh) read/write w after reset 0 0 0 0 0 0 0 0 function 0: port 1: sdcke at tmp92ca25 2007-02-28 92ca25-96 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. figure 3.5.37 port k0 to k3 internal data bus reset output latch pk write s a selector b pk read pk0 (lcp0) pk1(llp) pk2 (lfr) pk3 (lbcd) function control (on bit basis) pkfc write output buffer lcp0, llp, lfr, lbcd tmp92ca25 2007-02-28 92ca25-97 figure 3.5.38 port k4 figure 3.5.39 port k5 to k7 internal data bus direction contorl (on bit basis) reset pkcr write pk write pk read pk4 (spdi) function control (on bit basis) pkfc write s output latch s b selector a internal data bus reset pkcr write pk write pj read pk5 (spdo) pk6 ( spcs ) pk7 (spclk) function control (on bit basis) pkfc write s output latch s b selector a s a selector b spdo spcs spclk spdi input direction control (on bit basis) tmp92ca25 2007-02-28 92ca25-98 port k register 7 6 5 4 3 2 1 0 bit symbol pk7 pk6 pk5 pk4 pk3 pk2 pk1 pk0 pk (0050h) read/write r/w after reset data from external port (output latch register is cleared to ?0?) 0 0 0 0 port k control register 7 6 5 4 3 2 1 0 bit symbol pk7c pk6c pk5c pk4c pkcr (0052h) read/write w after reset 0 0 0 0 function 0: input 1: output port k function register 7 6 5 4 3 2 1 0 bit symbol pk7f pk6f pk5f pk4f pk3f pk2f pk1f pk0f pkfc (0053h) read/write w after reset 0 0 0 0 0 0 0 0 function 0: port 1: spclk output 0: port 1: spcs output 0: port 1: spdo output 0: port 1: spdi output 0: port 1: lbcd 0: port 1: lfr 0: port 1: llp 0: port 1: lcp0 port k drive register 7 6 5 4 3 2 1 0 bit symbol pk7d pk6d pk5d pk4d pk3d pk2d pk1d pk0d pkdr (0094h) read/write r/w after reset 1 1 1 1 1 1 1 1 function 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 pk5 setting tmp92ca25 2007-02-28 92ca25-99 3.5.14 port l (pl0 to pl7) pl0 to pl3 are 4-bit output ports. resetting se ts 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. rese tting 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. figure 3.5.41 register for port l0 to l3 figure 3.5.42 register for port l4 to l5 internal data bus direction control (on bit basis) reset plcr write pl write pl read pl4 to pl5 (ld4 to ld5) function control (on bit basis) plfc write s output latch s b selector a s a selector b ld4 to ld5 internal data bus reset r output latch pl write s a selector b pl read pl0 to pl3 (ld0 to ld3) function control (on bit basis) plfc write ld0 to ld3 tmp92ca25 2007-02-28 92ca25-100 figure 3.5.43 port l6 figure 3.5.44 port l7 internal data bus direction control (on bit basis) reset plcr write pl write pl read pl6 (ld6, busrq ) functino control (on bit basis) plfc write r output latch s b selector a s a selector b busrq internal data bus direction control (on bit basis) reset plcr write pl write pl read pl7 (ld7, busak ) function control (on bit basis) plfc write r output latch s b selector a s a selector b s a selector b ld7 busak busrq tmp92ca25 2007-02-28 92ca25-101 port l register 7 6 5 4 3 2 1 0 bit symbol pl7 pl6 pl5 pl4 pl3 pl2 pl1 pl0 pl (0054h) read/write r/w after reset data from external port (output latch register is cleared to ?0?) 0 0 0 0 port l control register 7 6 5 4 3 2 1 0 bit symbol pl7c pl6c pl5c pl4c plcr (0056h) read/write w after reset 0 0 0 0 function 0: input 1: output port l function register 7 6 5 4 3 2 1 0 bit symbol pl7f pl6f pl5f pl4f pl3f pl2f pl1f pl0f plfc (0057h) read/write w after reset 0 0 0 0 0 0 0 0 function refer following table 0: port 1: data bus for lcdc (ld3 to ld0) port l drive register 7 6 5 4 3 2 1 0 bit symbol pl7d pl6d pl5d pl4d pl3d pl2d pl1d pl0d pldr (0095h) read/write r/w after reset 1 1 1 1 1 1 1 1 function 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 register setting value (1) plcr 1 (2) plfc 1 figure 3.5.45 port l register pl5 setting tmp92ca25 2007-02-28 92ca25-102 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 tmp92ca25 2007-02-28 92ca25-103 port m register 7 6 5 4 3 2 1 0 bit symbol pm2 pm1 pm (0058h) read/write r/w after reset 1 1 port m function register 7 6 5 4 3 2 1 0 bit symbol pm2f pm1f pmfc (005bh) read/write w after reset 0 0 function 0: port 1: alarm at tmp92ca25 2007-02-28 92ca25-104 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-purpos e 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. figure 3.5.49 port n internal data bus direction control (on bit basis) reset pncr write pn write pn read pn0 to pn7 (ko0 to ko7) function control (on bit basis) pnfc write s output latch s b selector a open drian enable tmp92ca25 2007-02-28 92ca25-105 port n register 7 6 5 4 3 2 1 0 bit symbol pn7 pn6 pn5 pn4 pn3 pn2 pn1 pn0 pn (005ch) read/write r/w after reset data from external port (output latch register is set to ?1?) port n control register 7 6 5 4 3 2 1 0 bit symbol pn7c pn6c pn5c pn4c pn3c pn2c pn1c pn0c pncr (005eh) read/write w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port n function register 7 6 5 4 3 2 1 0 bit symbol pn7f pn6f pn5f pn4f pn3f pn2f pn1f pn0f pnfc (005fh) read/write w after reset 0 0 0 0 0 0 0 0 function 0: cmos output 1:open drain output port n drive register 7 6 5 4 3 2 1 0 bit symbol pn7d pn6d pn5d pn4d pn3d pn2d pn1d pn0d pndr (0097h) read/write r/w after reset 1 1 1 1 1 1 1 1 function 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 tmp92ca25 2007-02-28 92ca25-106 3.6 memory controller 3.6.1 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 fo r the 4-block address area (block 0 to 3). ? sram or rom: all cs blocks (cs0 to cs3) are supported. ? sdram : only either cs1 or cs2 blocks are supported. ? page rom : only cs2 blocks are supported. ? nand flash : cs setting is not needed. (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 th e 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 th e 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 0 cs to 3 cs . tmp92ca25 2007-02-28 92ca25-107 table 3.6.1 control register 7 6 5 4 3 2 1 0 bit symbol b0ww2 b0ww1 b0ww0 b0wr2 b0wr1 b0wr0 b0csl (0140h) read/write w w after reset 0 1 0 0 1 0 bit symbol b0e ? ? b0rec b0om1 b0om0 b0bus1 b0bus0 b0csh (0141h) read/write w after reset 0 0 (note) 0 (note) 0 0 0 0 0 bit symbol m0v20 m0v19 m0v18 m0v17 m0v16 m0v15 m0v14 to m0v9 m0v8 mamr0 (0142h) read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol m0s23 m0s22 m0s21 m0s20 m0s19 m0s18 m0s17 m0s16 msar0 (0143h) read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol b1ww2 b1ww1 b1ww0 b1wr2 b1wr1 b1wr0 b1csl (0144h) read/write w w after reset 0 1 0 0 1 0 bit symbol b1e ? ? b1rec b1om1 b1om0 b1bus1 b1bus0 b1csh (0145h) read/write w after reset 0 0 (note) 0 (note) 0 0 0 0 0 bit symbol m1v21 m1v20 m1v19 m1v18 m1v17 m1v16 m1v15 to m1v9 m1v8 mamr1 (0146h) read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol m1s23 m1s22 m1s21 m1s20 m1s19 m1s18 m1s17 m1s16 msar1 (0147h) read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol b2ww2 b2ww1 b2ww0 b2wr2 b2wr1 b2wr0 b2csl (0148h) read/write w w after reset 0 1 0 0 1 0 bit symbol b2e b2m ? b2rec b2om1 b2om0 b2bus1 b2bus0 b2csh (0149h) read/write w after reset 1 0 0 (note) 0 0 0 0 0 bit symbol m2v22 m2v21 m2v20 m2v19 m2v18 m2v17 m2v16 m2v15 mamr2 (014ah) read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol m2s23 m2s22 m2s21 m2s20 m2s19 m2s18 m2s17 m2s16 msar2 (014bh) read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol b3ww2 b3ww1 b3ww0 b3wr2 b3wr1 b3wr0 b3csl (014ch) read/write w w after reset 0 1 0 0 1 0 bit symbol b3e ? ? b3rec b3om1 b3om0 b3bus1 b3bus0 b3csh (014dh) read/write w after reset 0 0 (note) 0 (note) 0 0 0 0 0 bit symbol m3v22 m3v21 m3v20 m3v19 m3v18 m3v17 m3v16 m3v15 mamr3 (014eh) read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol m3s23 m3s22 m3s21 m3s20 m3s19 m3s18 m3s17 m3s16 msar3 (014fh) read/write r/w after reset 1 1 1 1 1 1 1 1 note 1: always write ?0?. note 2:read-modify-write is prohibited for bncs0 and bncsh (n = 0 to 3) registers. tmp92ca25 2007-02-28 92ca25-108 table 3.6.2 control register 7 6 5 4 3 2 1 0 bit symbol bexom1 bexom0 bexbus1 bexbus0 bexcsh (0159h) read/write w after reset 0 0 0 0 bit symbol bexww2 bexww1 bexww0 bexwr2 bexwr1 bexwr0 bexcsl (0158h) read/write w w after reset 0 1 0 0 1 0 bit symbol opge opwr1 opwr0 pr1 pr0 pmemcr (0166h) read/write r/w after reset 0 0 0 1 0 bit symbol csdis rdtmg1 rdtmg0 memcr0 (0168h) read/write r/w after reset 0 0 0 note: read-modify-write is prohibited for bexcsh and bexcsl registers. (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 am0 start mode 0 0 don?t use this setting 0 1 start with 16-bit data bus (note) 1 0 start with 8-bit data bus (note) 1 1 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 rese t release. in other cases, the data bus width is set by the control register tmp92ca25 2007-02-28 92ca25-109 3.6.3 basic functions and register setting this section describes the se tting 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 ma sk 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 addr ess 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 ma sk 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 256 512 32 k 64 k 128 k 256 k 512 k 1 m 2 m 4 m 8 m cs0 cs1 cs2 to cs3 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 tmp92ca25 2007-02-28 92ca25-110 (iii) example of register setting to set the block address area 64 kbytes from address 110000h, set the register as follows. msar1 register bit 7 6 5 4 3 2 1 0 bit symbol m1s23 m1s22 m1s21 m1s20 m1s19 m1s18 m1s17 m1s16 specified value 0 0 0 1 0 0 0 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 7 6 5 4 3 2 1 0 bit symbol m1v21 m1v20 m1v19 m1v18 m1v17 m1v16 m1v15 to m1v9 m1v8 specified value 0 0 0 0 0 0 0 1 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 ar e 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 ov erlaps with the built-in memory area, or both two address areas overlap, t he block address area is processed according to priority as follows. note 2: if an address area other than 0 cs to 3 cs is accessed, this area is regarded as csex . therefore, wait number and data bus width controls follow the setting of csex (bexcsh, bexcsl register). built-in i/o > built-in memory > block address area 0 > 1 > 2 > 3 tmp92ca25 2007-02-28 92ca25-111 (2) connection memory specification setting the tmp92ca25 2007-02-28 92ca25-112 cpu data operand data size (bit) operand start address memory data size (bit) cpu address d31 to d24 d23 to d16 d15 to d8 d7 to d0 4n + 0 8/16/32 4n + 0 xxxxx xxxxx xxxxx b7 to b0 8 4n + 1 xxxxx xxxxx xxxxx b7 to b0 4n + 1 16/32 4n + 1 xxxxx xxxxx b7 to b0 xxxxx 8/16 4n + 2 xxxxx xxxxx xxxxx b7 to b0 4n + 2 32 4n + 2 xxxxx b7 to b0 xxxxx xxxxx 8 4n + 3 xxxxx xxxxx xxxxx b7 to b0 16 4n + 3 xxxxx xxxxx b7 to b0 xxxxx 8 4n + 3 32 4n + 3 b7 to b0 xxxxx xxxxx xxxxx (1) 4n + 0 xxxxx xxxxx xxxxx b7 to b0 8 (2) 4n + 1 xxxxx xxxxx xxxxx b15 to b8 4n + 0 16/32 4n + 0 xxxxx xxxxx b15 to b8 b7 to b0 (1) 4n + 1 xxxxx xxxxx xxxxx b7 to b0 8 (2) 4n + 2 xxxxx xxxxx xxxxx b15 to b8 (1) 4n + 1 xxxxx xxxxx b7 to b0 xxxxx 16 (2) 4n + 2 xxxxx xxxxx xxxxx b15 to b8 4n + 1 32 4n + 1 xxxxx b15 to b8 b7 to b0 xxxxx (1) 4n + 2 xxxxx xxxxx xxxxx b7 to b0 8 (2) 4n + 1 xxxxx xxxxx xxxxx b15 to b8 16 4n + 2 xxxxx xxxxx b15 to b8 b7 to b0 4n + 2 32 4n + 2 b15 to b8 b7 to b0 xxxxx xxxxx (1) 4n + 3 xxxxx xxxxx xxxxx b7 to b0 8 (2) 4n + 4 xxxxx xxxxx xxxxx b15 to b8 (1) 4n + 3 xxxxx xxxxx b7 to b0 xxxxx 16 (2) 4n + 4 xxxxx xxxxx xxxxx b15 to b8 (1) 4n + 3 b7 to b0 xxxxx xxxxx xxxxx 16 4n + 3 32 (2) 4n + 4 xxxxx xxxxx xxxxx b15 to b8 (1) 4n + 0 xxxxx xxxxx xxxxx b7 to b0 (2) 4n + 1 xxxxx xxxxx xxxxx b15 to b8 (3) 4n + 2 xxxxx xxxxx xxxxx b23 to b16 8 (4) 4n + 3 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 0 xxxxx xxxxx b15 to b8 b7 to b0 16 (2) 4n + 2 xxxxx xxxxx b31 to b24 b23 to b16 4n + 0 32 4n + 0 b31 to b24 b23 to b16 b15 to b8 b7 to b0 (1) 4n + 0 xxxxx xxxxx xxxxx b7 to b0 (2) 4n + 1 xxxxx xxxxx xxxxx b15 to b8 (3) 4n + 2 xxxxx xxxxx xxxxx b23 to b16 8 (4) 4n + 3 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 1 xxxxx xxxxx b7 to b0 xxxxx (2) 4n + 2 xxxxx xxxxx b23 to b16 b15 to b8 16 (3) 4n + 4 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 1 b23 to b16 b15 to b8 b7 to b0 xxxxx 4n + 1 32 (2) 4n + 4 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 2 xxxxx xxxxx xxxxx b7 to b0 (2) 4n + 3 xxxxx xxxxx xxxxx b15 to b8 (3) 4n + 4 xxxxx xxxxx xxxxx b23 to b16 8 (4) 4n + 5 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 2 xxxxx xxxxx b15 to b8 b7 to b0 16 (2) 4n + 4 xxxxx xxxxx b31 to b24 b23 to b16 (1) 4n + 2 b15 to b8 b7 to b0 xxxxx xxxxx 4n + 2 32 (2) 4n + 4 xxxxx xxxxx b31 to b24 b23 to b16 (1) 4n + 3 xxxxx xxxxx xxxxx b7 to b0 (2) 4n + 4 xxxxx xxxxx xxxxx b15 to b8 (3) 4n + 5 xxxxx xxxxx xxxxx b23 to b16 8 (4) 4n + 6 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 3 xxxxx xxxxx b7 to b0 xxxxx (2) 4n + 4 xxxxx xxxxx b23 to b16 b15 to b8 16 (3) 4n + 6 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 3 b7 to b0 xxxxx xxxxx xxxxx 32 4n + 3 32 (2) 4n + 4 xxxxx b31 to b24 b23 to b16 b15 to b8 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. tmp92ca25 2007-02-28 92ca25-113 (4) wait control the external bus cycle completes a wait of at least two states (100 ns at f sys = 20 mhz). setting the |