32bit tx system risc tx19a family TMP19A43CD/czxbg rev2.0 2007.aug.31
tmp19a43 tmp19a43 (rev2.0) 1-1 overview and features 32-bit risc microprocessor - tx19 family tmp19a43czxbg, cdxbg tmp19a43fzxbg, fdxbg 1. overview and features the tx19 family is a high-performance 32-bit risc pro cessor series that toshiba originally developed by integrating the mips16 tm ase (application specific extension), which is an extended instruction set of high code efficiency. tmp19a43 is a 32-bit risc microprocessor with a tx19a processor core and various peripheral functions integrated into one package. it can operate at low voltage with low power consumption. features of tmp19a43 are as follows: restrictions on product use 070122ebp ? the information contained herein is subject to change without notice. 021023_d ? toshiba is continually working to improve the quality a nd reliability of its products. nevertheless, semiconductor devices in general can malfunction or fail due to their inher ent electrical sensitivity and vulnerability to physical stress. it is the responsibility of the buyer, when utilizing toshiba pr oducts, to comply with the standards of safety in making a safe design for the entire system, and to avoid situations in which a malfunction or failure of such toshiba products could cause loss of human life, bodily injury or damage to property. in developing your designs, please ensure that toshiba produc ts are used within specified operating ranges as set forth in the most recent toshiba produc ts specifications. also, please keep in mind the precautions and conditions set forth in the ?handling guide for semiconductor device s,? or ?toshiba semiconductor reliability handbook? etc. 021023_a ? the toshiba products listed in this document are intend ed for usage in general electronics applications (computer, personal equipment, office equipment, measuring equipmen t, industrial robotics, domestic appliances, etc.). these toshiba products are neither intended nor warranted for usage in equipment that requires extraordinarily high quality and/or reliability or a malfunction or failure of which may ca use loss of human life or bodily injury (?unintended usage?). unintended usage include atomic energy control instrument s, airplane or spaceship in struments, transportation instruments, traffic signal instruments, combustion cont rol instruments, medical instru ments, all types of safety devices, etc. unintended usage of tosh iba products listed in this document shall be made at the customer?s own risk. 021023_b ? the products described in this document shall not be us ed or embedded to any downstream products of which manufacture, use and/or sale are prohibited und er any applicable laws and regulations. 060106_q ? the information contained herein is presented only as a guide for the applications of our products. no responsibility is assumed by toshiba for any infringements of patents or other rights of the third parties which may result from its use. no license is granted by implication or otherwise under any patents or other rights of to shiba or the third parties. 070122_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 ca n be predicted, please refer to section 1.3 of the chapter entitled quality and reliability assurance/handling precautions. 030619_s
tmp19a43 tmp19a43 (rev2.0) 1-2 overview and features (1) tx19a processor core 1) improved code efficiency and operating performance have been realized through the use of two isa (instruction set architecture) modes - 16- and 32-bit isa modes. the 16-bit isa mode instructions are compatible with the mips16 tm ase instructions of superior code efficiency at the object level. x the 32-bit isa mode instructions are compatible w ith the tx39 instructions of superior operating performance at the object level. 2) both high performance and low power dissipation have been achieved. z high performance almost all instructions can be executed with one clock. x high performance is possible via a th ree-operand operation instruction. x 5-stage pipeline x built-in high-speed memory x dsp function: a 32-bit multiplication and accumulation operation can be executed with one clock. z low power dissipation optimized design using a low power dissipation library x standby function that stops the op eration of the processor core 3) high-speed interrupt response suitable for real-time control independency of the entry address x automatic generation of factor -specific vector addresses x automatic update of interrupt mask levels (2) internal program memory and data memory product name built-in rom built-in ram tmp19a43czxbg 384kbyte 20kbyte TMP19A43CDxbg 512kbyte 24kbyte tmp19a43fzxbg 384kby te (flash) 20kbyte tmp19a43fdxbg 512kbyte (flash) 24kbyte x rom correction function: 1 word u 8 blocks, 8 words u 4 blocks (3) external memory expansion x expandable to 16 megabytes (for both programs and data) external data bus: separate bus/multiplexed bus : coexistence of 8- and 16-bit widths is possible. chip select/wait controller : 4 channels (4) dma controller : 8 channels (2 interrupt factors) x activated by an interrupt or software data to be transferred to internal memory, in ternal i/o, external memory, and external i/o (5) 16-bit timer : 16 channels x 16-bit interval timer mode 16-bit event counter mode 16-bit ppg output (every 4 channels, synchronous outputs are possible) input capture function 2-phase pulse input counter function (4 channels assigned to perform this function): multiplication- by-4 mode
tmp19a43 tmp19a43 (rev2.0) 1-3 overview and features (6) 32-bit timer ? 32-bit input capture register : 4 channels ? 32-bit compare register : 8 channels ? 32-bit time base timer : 1 channel (7) clock timer : 1 channel (8) general-purpose serial interface : 3 channels ? selectable between the uart m ode and the synchronization mode (9) high-speed serial interface : 3 channels ? selectable between the uart mode and the high -speed synchronization mode (maximum speed: 10 mbps in the high-speed synchronization mode @40mhz) (10) serial bus interface : 1 channel ? selectable between the i 2 c bus mode and the clock synchronization mode (11) 10-bit a/d converter (with s/h) : 16 channels ? start by an external trigger, and the internal timer activated by a trigger ? fixed channel/scan mode ? single/repeat mode ? top-priority conversion mode ? timer monitor function ? conversion time 1.15 sec(@ 40mhz) (12) 8-bit d/a converter : 2 channels (13) watchdog timer : 1 channel (14) interrupt function ? cpu: 2 factors ...................software interrupt instruction ? internal: 46 factors.............the order of precedence can be set over 7 levels (except the watchdog timer interrupt). ? external: 48 factors ..........the order of precedence can be set over 7 levels. because 32 factors are associated w ith kwup, the number of interrupt factors is one. (15) input and output ports ...............143 terminals (16) standby function ? three standby modes (idle, sleep, stop) (17) clock generator ? built-in pll (multiplication by 4) ? clock gear function: the high-speed clock can be divided into 3/4, 1/2, 1/4 or 1/8. ? sub-clock: slow and sleep modes (32.768 khz) (18) endian: bi-endian (big-endian/little-endian) (19) maximum operating frequency ? 40 mhz (pll multiplication) (20) operating voltage range ? core: 1.35 v to 1.65 v ? i/o and adc: 2.7 v to 3.6 v ? dac: 2.3 v to 2.7 v (21) package p-fbga193 (12 mm 12 mm, 0.65 mm pitch)
tmp19a43 tmp19a43 (rev2.0) 1-4 overview and features fig. 1-1 tmp19a43 block diagram tx19 processor core tx19a cpu mac ejtag 512k/384byte flash/mask 24k/20kbyte ram rom correction dmac (8ch) clock generator (cg) intc external bus interface i/o bus interface 16-bit tmrb 0 to 15 ( 16ch ) 32-bit tmrc tbt ( 1ch ) 32-bit tmrc input capture 0 to 3 (4ch) 32-bit tmrc compare 0 to 7 (8ch) 10-bit adc (16ch) sio/uart 0 to 2 ( 3ch ) i2c/sio ( 1ch ) port0 to port6 (also function as external bus i/f) wdt kwup (32ch) port7 to port8 (also function to receive adc inputs) port9 to porth (also function as functional pins) clock timer (1ch) 8-bit dac (2ch) hsio/uart 0 to 2 (3ch)
tmp19a43 2. pin la y o ut and pi n functions thi s sect i o n s h ows t h e pi n l a y out o f tm p 1 9 a 4 3 a n d descri bes t h e nam e s and f u nct i ons of i n put a n d ou t put pi ns . 2.1 pin lay o ut (t op vie w ) fig . 2- 1 pin layo u t d i agr a m ( p - f bg a193 ) show s the p i n layou t of tm p19 a 43 . a 1 a 2 a 3 a 4 a 5 a 6 a 7 a8 a9 a10 a 1 1 a12 a 1 3 a 1 4 a 1 5 a16 a 17 b 1 b 2 b 3 b 4 b 5 b 6 b 7 b8 b9 b10 b 1 1 b12 b 1 3 b 1 4 b 1 5 b16 b 17 c 1 c 2 c 1 6 c 1 7 d 1 d 2 d 4 d 5 d 6 d7 d8 d9 d10 d 1 1 d12 d 1 3 d 1 4 d16 d 17 e 1 e 2 e 4 e 5 e 6 e7 e8 e9 e10 e 1 1 e12 e 1 3 e 1 4 e16 e 17 f 1 f 2 f 4 f 5 f 6 f 1 3 f 1 4 f16 f17 g 1 g 2 g 4 g 5 g 1 3 g 1 4 g16 g 17 h 1 h 2 h 4 h 5 h 1 3 h 1 4 h16 h 17 j 1 j 2 j 4 j 5 j 1 3 j 1 4 j16 j 17 k 1 k 2 k 4 k 5 k 1 3 k 1 4 k16 k 17 l 1 l 2 l 4 l 5 l 1 3 l 1 4 l16 l17 m 1 m 2 m 4 m 5 m 1 3 m 1 4 m16 m 17 n 1 n 2 n 4 n 5 n 6 n7 n8 n9 n10 n 1 1 n12 n 1 3 n 1 4 n16 n 17 p 1 p 2 p 4 p 5 p 6 p7 p8 p9 p10 p 1 1 p12 p 1 3 p 1 4 p16 p 17 r 1 r 2 r 1 6 r 1 7 t 1 t 2 t 3 t 4 t 5 t 6 t 7 t8 t9 t10 t1 1 t12 t 1 3 t 1 4 t 1 5 t16 t17 u 1 u 2 u 3 u 4 u 5 u 6 u 7 u8 u9 u10 u 1 1 u12 u 1 3 u 1 4 u 1 5 u16 u 17 fig. 2-1 pin layout dia g ram (p-fbga 1 93) tmp19a43 (rev2.0) 2-1 pin layout and pin functions
tmp19a43 2.2 pin numbers and names t a bl e 2 - 1 s h o w s t h e pi n n u m b ers an d nam e s o f tm p 1 9a 4 3 . t able 2-1 pi n numbe rs an d name s pin no. pin name pin no. pin name pin no. pin name pin no. pin name pin no. pin name a 1 d v s s d 2 pf3/ke y 19/dac k 4 g2 p95/sclk2/cts 2 m 1 p b 5 / h t x d 1 r 2 p33/wait/rd y a 2 p 8 1 / a n 9 / k e y 05 d 4 p 7 1 / a n 1 g4 p 9 4 / r x d 2 m2 pb4/hsclk0/h c t s 0 r 1 6 p 4 5 / b u s m d a 3 p 8 3 / a n 1 1 / k e y 0 7 d 5 p 7 3 / a n 3 g5 p 9 3 / t x d 2 m4 p b 3 / h r x d 0 r 1 7 p 4 6 / e n d i a n a 4 p 8 5 / a n 1 3 / i n t7 d 6 p74/an4/ke y 00 g13 p h1/tpc1/ tpd1 m5 t e s t 4 t 1 p37/ale/tc3i n a 5 p 8 7 / a n 1 5 / i n t9 d 7 p76/an6/ke y 02 g14 p h7/tpc7/ tpd7 m13 f v c c 3 t 2 p34/busrq / tbeo ut a 6 d a 0 d 8 pd5/tbd o u t g16 p c s t 4 m14 p g3/tpd 3 t 3 p 3 0 / r d a 7 c v r e f 0 d 9 p d 3 / t b b o u t g17 d c l k m16 p g4/tpd 4 t 4 p 0 2 / d 2 / a d 2 a 8 d a 1 d 1 0 p d 0 / h t x d 2 h1 pc1/tc o u t 0 m17 p g5/tpd 2 t 5 p 0 6 / d 6 / a d 6 a 9 c v r e f 1 d 1 1 pe0/ke y 8 h2 pc0/tbti n /ke y 30 n1 pb7/hsclk1/h c t s 1 t 6 p12/d10/ad10/a 10 a 1 0 p d 2 / h s c l k 2 / h c t s 2 d 1 2 pe3/ke y 1 1 h4 p 9 7 / t b a o u t n2 p b 6 / h r x d 1 t 7 p16/d14/ad14/a 14 a 1 1 p e 2 / k e y 1 0 d 1 3 pa2/int2/tb 7in 0 h5 d v c c 3 n4 p 0 0 / d 0 / a d 0 t 8 p21/a17/a1/tb0 in1 a 1 2 pe5/ke y 1 3 d 1 4 p h 4 / t p c 4 / tpd4 h 1 3 p h2/tpc2/ tpd2 n5 p 0 4 / d 4 / a d 4 t 9 p24/a20/a4/tb4 in0 a 1 3 pe7/ke y 1 5 d 1 6 p a 3 / i n t 3 / t b 7in 1 h 1 4 t r s t n6 p10/d8/ad8/a8 t 1 0 p26/a22/a6/tb5 in0 a 1 4 x 1 d 1 7 x t 1 h16 t m s n7 p14/d12/ad12/a 1 2 t 1 1 p 5 2 / a 2 / i n t e a 1 5 x 2 e 1 pf6/ke y 22/tc o ut6 h 17 e j e n8 f v c c 3 t 1 2 p56/a6 /tb2out/k e y 2 8 a 1 6 c v c c h e 2 pf5/ke y 21/tc o ut5 j 1 p c4/tc o u t 3 n9 d v s s t 1 3 p62/a10 / sclk0 / c t s0 a 1 7 c v s s e 4 p 7 0 / a n 0 j2 pc3/tc o u t 2 n10 d v c c 1 5 t 1 4 p66/a14/tb4 ou t b 1 p f 0 / k e y 16/dre q 0 e 5 p 7 2 / a n 2 j4 pc2/tc o u t 1 n11 p 5 0 / a 0 / i n t c t 1 5 p40/cs0/ke y 24 b 2 p 8 0 / a n 8 / k e y 04 e 6 v r e f h j5 d v c c 1 5 n12 p 54/a4/tb0 out t 1 6 p42/cs2/ke y 26 b 3 p 8 2 / a n 1 0 / k e y 0 6 e 7 a v s s j13 p h3/tpc3/ tpd3 n13 p 6 0 / a 8 / t x d 0 t 1 7 p44/scou t b 4 p 8 4 / a n 1 2 / i n t6 e 8 d a v c c j14 d i n t n14 p 64/a12/rxd1/i n t b u 1 t e s t 2 b 5 p 8 6 / a n 1 4 / i n t8 e 9 d a v r e f j16 t d o n16 p g6/tpd 6 u 2 p35/busak/tc1 in b 6 p 7 5 / a n 5 / k e y 01 e 1 0 d a g n d j17 d v s s n17 p g7/tpd 7 u 3 p 3 1 / w r b 7 p 7 7 / a n 7 / k e y 03 e 1 1 d v c c 3 k1 p c 7 / s c k p1 b o o t u 4 p 0 3 / d 3 / a d 3 b 8 p d 6 / k e y 31 /aft r g e 1 2 pa0/int0/tb 6in 0 k2 p c 6 / s i / s c l p2 p32/hwr/tc 0in u 5 p 0 7 / d 7 / a d 7 b 9 p d 4 / t b c o u t e 1 3 pa1/int1/tb 6in 1 k4 p c 5 / s o / s d a p4 p 0 1 / d 1 / a d 1 u 6 p13/d11/ad11/a 11 b 1 0 p d 1 / h r x d 2 e 1 4 ph5/tpc5/ tpd5 k5 d v s s p5 p 0 5 / d 5 / a d 5 u 7 p17/d15/ad15/a 15 b 1 1 p e 1 / k e y 0 9 e 1 6 p c s t 0 k13 d v c c 1 5 p6 p11/d9/ad9/a9 u 8 p22/a18/a2/tb1 in0 b 1 2 p e 4 / k e y 1 2 e 1 7 p c s t 1 k14 t ovr/ tsta p 7 p15/d13/ad13/a 1 3 u 9 p25/a21/a5/tb4 in1 b 1 3 p e 6 / k e y 1 4 f 1 pf7/ke y 23/tc o ut7 k 16 t d i p8 p20/a16/a0/tb0 i n 0 u 1 0 p27/a23/a7/tb5 in1 b 1 4 p a 5 / i n t 5 / t b 8in 1 f 2 p92/tb8 o u t k17 t c k p9 p23/a19/a3/tb1 i n 1 u 1 1 p53/a3/int f b 1 5 p a 6 / t b 2 i n 0 f 4 p91/tb7 o u t l1 p b 2 / h t x d 0 p10 t e s t 0 u 1 2 p57/a7 /tb3out/k e y 2 9 b 1 6 p a 7 / t b 2 i n 1 f 5 p90/tb6 o u t l2 p b 1 / t b 3 i n 1 p11 p 5 1 / a 1 / i n t d u 1 3 p63/a11/txd1 b 1 7 c v c c l f 6 a v c c 3 l4 p b 0 / t b 3 i n 0 p12 p 55/a5/tb1 out u 1 4 p67/a15/tb5 ou t c 1 p f 2 / k e y 18/dre q 4 f 1 3 ph0/tpc0/ tpd0 l5 t e s t 1 p13 p 61/a9/rxd0/in t a u 1 5 p41/cs1/ke y 25 c 2 p f 1 / k e y 17/dac k 0 f 1 4 ph6/tpc6/ tpd6 l13 d v s s p14 p65/a13 / sclk1 / c t s1 u 1 6 p 4 3 / c s 3 / k e y 27 c 1 6 p a 4 / i n t 4 / t b 8in 0 f 1 6 p c s t 2 l14 pg0/tpd 0 p 1 6 p 47/tbf ou t u 1 7 t e s t 3 c 1 7 x t 2 f 1 7 p c s t 3 l16 pg 1 / t p d 1 p17 r e s e t d 1 p f 4 / k e y 20/tc o u t 4 g 1 p96/tb9 o u t l17 pg2/tpd 2 r1 p36/rw/tc2i n tmp19a43 (rev2.0) 2-2 pin layout and pin functions
tmp19a43 2.3 pin names and functions t a bl e 2 - 2 t h ro ug h t a bl e 2- 7 sho w t h e nam e s an d fu nct i o ns o f i n p u t an d o u t p ut pi ns. t able 2-2 pi n name s an d function s (1 of 6) pin na me num b er of pi ns inpu t or outp u t func tio n p00-p07 8 i nput/outp u t por t 0: i nput/outpu t por t ( w ith pull- up) th at allows input/output to be set in units of bits d0-d7 i nput/outp u t data ( l ower ) : data bus 0 to 7 ( s epar ate bus m ode) ad0-d7 input/output address data (low er): addre ss data b u s 0 to 7 (m ultiple xed bus m ode) p10-p17 8 i nput/outp u t por t 1: i nput/outpu t por t ( w ith pull- up) th at allows input/output to be set in units of bits d8-d15 i nput/outp u t data ( upper ) : data bus 8 to 15 ( s epar ate bus m ode) ad8-ad15 i n p u t / o u t p u t address data (upper): address data b u s 8 to 15 (m ultipl e xed bus m ode) a8-a15 o u t p u t address: address bus 8 to 15 (m ultip lexed bus m ode) p20-p27 8 i nput/outp u t por t 2: i nput/outpu t por t ( w ith pull- up) th at allows input/output to be set in units of bits a16-a23 o u t p u t addr ess: addr ess bus 15 to 23 ( s epar ate bus m ode) a0-a7 o u t p u t address: address bus 0 to 7 (m ultipl e xed bus m ode) t b 0in 0 ,t b0 in 1 input 16-bit ti m e r 0 input 0,1: for inputting the count/capture trigger of a 16-bit ti m e r 0 t b 1in 0 ,t b1 in 1 input 16-bit ti m e r 1 input 0,1: for inputting the count/capture trigger of a 16-bit ti m e r 1 t b 4in 0 ,t b4 in 1 input 16-bit ti m e r 4 input 0,1: for inputting the count/capture trigger of a 16-bit ti m e r 4 t b 5in 0 ,t b5 in 1 input 16-bit ti m e r 5 input 0,1: for inputting the count/capture trigger of a 16-bit ti m e r 5 p30 1 output por t 30: por t used exclusively for output rd output read: str obe signal for r eading external m e m o ry p31 1 output por t 31: por t used exclusively for output wr output w r ite: str obe sign al for wr iting data of d0 to d7 pins p32 1 i nput/outp u t por t 32: i nput/outp u t por t ( w ith pull- up) hwr output w r ite upper - p in data: str obe signal for wr iting data of d8 to d15 pins tc0in input for inputting the captu re trigger for 3 2 -bit ti m e r p33 1 i nput/outp u t por t 33: i nput/outp u t por t ( w ith pull- up) wait input w a it: pin for requesting cpu to put a bus in a wait st at e rd y i nput ready : pin for notify i ng cpu that a b u s is r eady p34 1 i nput/outp u t por t 34: i nput/outp u t por t ( w ith pull- up) busrq i n p u t bus request: signal requesting cp u to allow an ex ternal m a ster to t a ke the bus contr o l authority tbeo ut output 16- bit tim e r e output: pin for outputti ng 16- bit tim e r e p35 1 i nput/outp u t por t 35: i nput/outp u t por t ( w ith pull- up) busak output bus acknowledge: signal notify i ng th at cpu ha s r e leased the bus contr o l author ity in r e sponse to busrq tc1in input for inputting the captu re trigger for 3 2 -bit ti m e r p36 1 i nput/outp u t por t 36: i nput/outp u t por t ( w ith pull- up) w / r output read/write: "1" sh ows a read cycl e o r a du mmy c y cle . " 0 " shows a writ e c y cle. tc2in input for inputting the captu re trigger for 3 2 -bit ti m e r p37 1 i nput/outp u t por t 37: i nput/outp u t por t ( w ith pull- up) ale o u t p u t address latch enable (address la tch is enabled only i f access to external m e m o ry is taki ng place) tc3in input for inputting the captu re trigger for 3 2 -bit ti m e r p40 1 i nput/outp u t por t 40: i nput/outp u t por t ( w ith pull- up) cs0 output chip select 0: " 0 " is output if the addr ess is in a designated addr ess ar ea. ke y 24 i n p u t ke y on wake up input 24: ( d y n am ic pull up is selectable) i nput with sch m itt tr igger wit h noise filter p41 1 i nput/outp u t por t 41: i nput/outp u t por t ( w ith pull- up) cs1 output chip select 1: " 0 " is output if the addr ess is in a designated addr ess ar ea. ke y 25 i nput ke y on wake up input 25: ( d y n am ic pull up is selectable) i nput with sch m itt tr igger wit h noise filter p42 1 i nput/outp u t por t 42: i nput/outp u t por t ( w ith pull- up) cs2 output chip select 2: " 0 " is output if the addr ess is in a designated addr ess ar ea. ke y 26 i nput ke y on wake up input 26: ( d y n am ic pull up is selectable) i nput with sch m itt tr igger wit h noise filter tmp19a43 (rev2.0) 2-3 pin layout and pin functions
tmp19a43 t able 2-3 pi n name s an d function s (2 of 6) pin na me num b er of pi ns inpu t or outp u t func tio n p43 1 i nput/outp u t por t 43: i nput/outp u t por t ( w ith pull- up) cs3 output chip select 3: " 0 " is output if the addr ess is in a designated addr ess ar ea. ke y 27 i n p u t ke y on wake up input 27: ( d y n am ic pull up is selectable) i nput with sch m itt tr igger wit h noise filter p44 1 i nput/outp u t por t 44: i nput/outp u t por t ( w ith pull- up) sco u t output sy ste m clock output: selectable between high- and low- speed clock output s, as in the case of cpu p45 1 i nput/outp u t por t 45: i nput/outp u t por t ( w ith pull- up) busmd input pin for setting an external bus m ode: this pin functio ns as a m u ltiplexed b u s by sa m p ling the "h ( dvcc3 ) lev e l " at th e rise o f a re set sig n a l. i t also functions as a separ a te bus by sa m p lin g "l" at the rise of a reset signal. when per f orm i ng a r e set oper a tion, pull it up or down according to a bus m ode to be us ed. input with sch m i tt trigger. ( a fter a r e set oper a tion is per f orm e d, it can be used as a por t. ) p46 1 i nput/outp u t por t 46: i nput/outp u t por t ( w ith pull- up) endian i nput t h is pin is used to set a m ode. i t pe r f orm s a big- endian oper a tion by sam p ling the " h (dvcc3) level " at the rise of a reset signal, and perform s a l ittle-endi an operation by sa m p l i ng "l" at the rise of a reset signal. when per f orm i ng a r e set oper a tion, pull it up or down according to the type of endian to be used. (after a reset operation is perform e d, it can be used as a port.) input with sch m itt trigger p47 1 i nput/outp u t por t 47: i nput/outp u t por t ( w ith pull- up) tbf o ut output 16- bit tim e r f output: pin for outputti ng a 16- bit tim e r f p50-p53 4 i nput/outp u t por t 5: i nput/outpu t por t ( w ith pull- up) th at allows input/output to be set in units of bits a0-a3 output addr ess: addr ess buses 0 to 3 ( s epar ate bus m ode) intc-i nt f input interrupt request pi ns c to f: select able be tween "h" level, "l" leve l, rising edge, and falling edge input pin with sch m itt t r igger with noise filter p54,p55 2 i nput/outp u t por t 5: i nput/outpu t por t ( w ith pull- up) th at allows input/output to be set in units of bits a4,a5 o u t p u t addr ess: addr ess buses 4 and 5 ( s epar ate bus m ode) tb0o ut output 16- bit tim e r 0 output: pin for outputti ng a 16- bit tim e r 0 tb1o ut output 16- bit tim e r 1 output: pin for outputti ng a 16- bit tim e r 1 p56,p57 2 i nput/outp u t por t 5: i nput/outpu t por t ( w ith pull- up) th at allows input/output to be set in units of bits a6,a7 o u t p u t addr ess: addr ess buses 6 and 7 ( s epar ate bus m ode) tb2o ut output 16- bit tim e r 2 output: pin for outputti ng a 16- bit tim e r 2 tb3o ut output 16- bit tim e r 3 output: pin for outputti ng a 16- bit tim e r 3 ke y 28,ke y 29 i nput ke y on wake up input 28 and 2 9 : ( d y n am ic pull up is selectable) i nput pin with sch m itt trigger with no ise filter p60 1 i nput/outp u t por t 60: i nput/outp u t por t ( w ith pull- up) a8 output addr ess: addr ess bus 8 ( s epar ate bus m ode) txd0 output sending ser i al data 0: open dr ai n output pin depen d ing on the pr ogr am used p61 1 i nput/outp u t por t 61: i nput/outp u t por t ( w ith pull- up) a9 output addr ess: addr ess bus 9 ( s epar ate bus m ode) rxd0 input receiving serial da ta 0 inta input interrupt request pi n a: select able bet ween "h " level , "l" level, rising edge, falling edge, and both r i sing and fall ing edges. input pin with sch m itt t r igger with noise filter p62 1 i nput/outp u t por t 62: i nput/outp u t por t ( w ith pull- up) a10 output addr ess: addr ess bus 10 ( s epar ate bus m ode) sclk0 i nput/outp u t ser i al clock input/output 0 cts0 i nput handshake input p i n open dr ain output pin depen d ing on the pr ogr am used p63 1 i nput/outp u t por t 63: i nput/outp u t por t ( w ith pull- up) a11 output addr ess: addr ess bus 11 ( s epar ate bus m ode) txd1 output sending ser i al data 1: open dr ai n output pin depen d ing on the pr ogr am used p64 1 i nput/outp u t por t 64: i nput/outp u t por t ( w ith pull- up) a12 output addr ess: addr ess bus 12 ( s epar ate bus m ode) rxd1 input receiving serial da ta 1 intb input interrupt request pi n b: selectable bet ween "h " level , "l" level, rising edge, falling edge, and both r i sing and fall ing edges. input pin with sch m itt t r igger with noise filter tmp19a43 (rev2.0) 2-4 pin layout and pin functions
tmp19a43 t able 2-4 pi n name s an d function s (3 of 6) pin na me num b er of pi ns inpu t or outp u t func tio n p65 1 i nput/outp u t por t 65: i nput/outp u t por t ( w ith pull- up) a13 output addr ess: addr ess bus 13 ( s epar ate bus m ode) sclk1 i nput/outp u t ser i al clock input/output 1 cts1 i nput handshake input p i n. open dr ain output pin depen d ing on the pr ogr am used p66,p67 2 i nput/outp u t por t 6: i nput/outpu t por t ( w ith pull- up) th at allows input/output to be set in units of bits a14,a15 o u t p u t addr ess: addr ess buses 14 and 1 5 ( s epar ate bus m ode) tb4o ut output 16- bit tim e r 4 output: pin for outputti ng a 16- bit tim e r 4 tb5o ut output 16- bit tim e r 5 output: pin for outputti ng a 16- bit tim e r 5 p70-p73 4 i nput por t 7: por t used exclusively for inpu t ( w ith pull- up) ain0-ain3 i nput analog input: i npu t fr o m a/d converter p74-p77 4 i nput por t 7: por t used exclusively for inpu t ( w ith pull- up) ain4-ain7 i nput analog input: i npu t fr o m a/d converter key 00-key 03 i nput ke y on wake up input 00 to 0 3 : ( d ynam i c pull up is selectable) input pin with sch m itt t r igger with noise filter p80-p83 4 i nput por t 8: por t used exclusively for inpu t ( w ith pull- up) ain8-ain11 i nput analog input: i npu t fr o m a/d converter key 04-key 07 i nput ke y on wake up input 04 to 0 7 : ( d ynam i c pull up is selectable) input pin with sch m itt t r igger with noise filter p84-p87 4 i nput por t 8: por t used exclusively for inpu t ( w ith pull- up) ain12-ain1 5 i nput analog input: i npu t fr o m a/d converter int6-9 interrupt request pi ns 6 to 9: selectabl e bet ween " h " level, " l " level, rising edge, f a lling edge, and both r i sing an d falling edges. input pin with sch m itt t r igger with noise filter p90-p92 3 i nput/outp u t por t 9: i nput/outpu t por t ( w ith pull- up) th at allows input/output to be set in units of bits tb6o ut output 16- bit tim e r 6 output: pin for outputti ng a 16- bit tim e r 6 tb7o ut output 16- bit tim e r 7 output: pin for outputti ng a 16- bit tim e r 7 tb8o ut output 16- bit tim e r 8 output: pin for outputti ng a 16- bit tim e r 8 p93 1 i nput/outp u t por t 93: i nput/outp u t por t ( w ith pull- up) txd2 output sending ser i al data 2: open dr ai n output pin depen d ing on the pr ogr am used p94 1 i nput/outp u t por t 94: i nput/outp u t por t ( w ith pull- up) rxd2 input receiving serial da ta 2 p95 1 i nput/outp u t por t 95: i nput/outp u t por t ( w ith pull- up) sclk2 i nput/outp u t ser i al clock input/output 2 cts2 i nput handshake input p i n open dr ain output pin depen d ing on the pr ogr am used p96,p97 2 i nput/outp u t por t s 96 and 97: i nput/out put por t ( w ith pull- up) that allows input/out put t o be set in units of bits tb9o ut output 16- bit tim e r 9 output: pin for outputti ng a 16- bit tim e r 9 tbao ut output 16- bit tim e r a output: pin for outp u tting a 16- bit tim e r a pa0 1 i nput/outp u t por t a0: i nput/output por t ( w ith pull- up) tb6in0 input 16-bit ti m e r 6 input 0: for inputti ng the capture trigger of a 16-bit ti m e r 6 int0 input interrupt request pi n 0: selectable bet ween "h " level , "l" level, rising edge, falling edge, and both r i sing and fall ing edges. i nput pin with schm itt tr igger wit h noise filter pa1 1 i nput/outp u t por t a1: i nput/output por t ( w ith pull- up) tb6in1 input 16-bit ti m e r 6 input 1: for inputti ng the capture trigger of a 16-bit ti m e r 6 int1 input interrupt request pi n 1: selectable bet ween "h " level , "l" level, rising edge, falling edge, and both r i sing and fall ing edges i nput pin with schm itt tr igger wit h noise filter pa2 1 i nput/outp u t por t a2: i nput/output por t ( w ith pull- up) tb7in0 input 16-bit ti m e r 7 input 0: for inputti ng the capture trigger of a 16-bit ti m e r 7 int2 input interrupt request pi n 0: selectable "h" le vel, "l" level, ri sing e dge, falling e dge, and both r i sing and falling e dges. i nput pin with schm itt tr igger wit h noise filter pa3 1 i nput/outp u t por t a3: i nput/output por t ( w ith pull- up) tb7in1 input 16-bit ti m e r 7 input 1: for inputti ng the capture trigger of a 16-bit ti m e r 7 int3 input interrupt request pi n 1: selectable bet ween "h " level , "l" level, rising edge, falling edge, and both r i sing and fall ing edges. i nput pin with schm itt tr igger wit h noise filter tmp19a43 (rev2.0) 2-5 pin layout and pin functions
tmp19a43 t able 2-5 pi n name s an d function s (4 of 6) pin na me num b er of pi ns inpu t or outp u t func tio n pa4 1 i nput/outp u t por t a4: i nput/output por t ( w ith pull- up) tb8in0 input 16-bit ti m e r 8 input 0: for inputti ng the capture trigger of a 16-bit ti m e r 8 int4 input interrupt request pi n 0: selectable bet ween "h " level , "l" level, rising edge, falling edge, and both r i sing and fall ing edges i nput pin with schm itt tr igger wit h noise filter pa5 1 i nput/outp u t por t a5: i nput/output por t ( w ith pull- up) tb8in1 input 16-bit ti m e r 8 input 1: for inputti ng the capture trigger of a 16-bit ti m e r 8 int5 input interrupt request pi n 1: selectable bet ween "h " level , "l" level, rising edge, falling edge, and both r i sing and fall ing edges i nput pin with schm itt tr igger wit h noise filter pa6 1 i nput/outp u t por t a6: i nput/output por t ( w ith pull- up) tb2in0 input 16-bit ti m e r 2 input 0: for inputti ng the capture trigger of a 16-bit ti m e r 2 pa7 i nput/outp u t por t a7: i nput/output por t ( w ith pull- up) tb2in1 input 16-bit ti m e r 2 input 1: for inputti ng the capture trigger of a 16-bit ti m e r 2 pb0 1 i nput/outp u t por t b0: i nput/out put por t ( w ith pull- up) tb3in0 input 16-bit ti m e r 3 input 0: for inputti ng the capture trigger of a 16-bit ti m e r 3 pb1 1 i nput/outp u t por t b1: i nput/out put por t ( w ith pull- up) tb3in1 input 16-bit ti m e r 3 input 1: for inputti ng the capture trigger of a 16-bit ti m e r 3 pb2 1 i nput/outp u t por t b2: i nput/out put por t ( w ith pull- up) htxd0 output sending ser i al data 0 at high speeds: op en dr ain output pin dependi ng on t h e pr ogr am used pb3 1 i nput/outp u t por t b3: i nput/out put por t ( w ith pull- up) hrxd0 input receiving serial da ta 0 at high speeds pb4 1 i nput/outp u t por t b4: i nput/out put por t ( w ith pull- up) hsclk0 i nput/outp u t high- speed se r i al clock input/out put 0 hcts0 i nput handshake input p i n: open dr ain output pin depen d ing on the pr ogr am used pb5 1 i nput/outp u t por t b5: i nput/out put por t ( w ith pull- up) htxd1 output sending ser i al data 1 at high speeds: op en dr ain output pin dependi ng on t h e pr ogr am used pb6 1 i nput/outp u t por t b6: i nput/out put por t ( w ith pull- up) hrxd1 input receiving serial da ta 1 at high speeds pb7 1 i nput/outp u t por t b7: i nput/out put por t ( w ith pull- up) hsclk1 i nput/outp u t high- speed se r i al clock input/out put 1 hcts1 i nput handshake input p i n: open dr ain output pin depen d ing on the pr ogr am used pc0 1 i nput/outp u t por t c0: i nput/out put por t ( w ith pull- up) tbtin input 32-bit ti m e base ti m e r input: for inputting a 32-bit ti m e base ti m e r ke y 30 ke y on wake up input 30: ( d y n am ic pull up is selectable) i nput with sch m itt tr igger wit h noise filter pc1-pc4 4 i nput/outp u t por t s c1 to c4: i nput/out put por ts ( w ith pu ll- up) that allow input/out put to be set in units of bits tco u t0 - output outputting 32-bit ti m e r if th e result o f a co m p arison is a m a tch tco u t3 pc5 1 i nput/outp u t por t c5: i nput/out put por t ( w ith pull- up) so output pin f o r sending dat a if the serial bus interf ace operates i n the sio m ode sda input/output pin f o r sending and r eceiving data if the serial bus inter f ace operates in th e i2c m ode open dr ain output pin depen d ing on the pr ogr am used i nput with sch m itt tr igger pc6 1 i nput/outp u t por t c6: i nput/out put por t ( w ith pull- up) si input pin for receiving data if the seri al bus interface operates in the sio m ode scl input/output pin f o r inputting and outputting a clock if the serial bus interf ace operates i n the i2c m ode open dr ain output pin depen d ing on the pr ogr am used i nput with sch m itt tr igger pc7 1 i nput/outp u t por t c7: i nput/out put por t ( w ith pull- up) sck input/output pin f o r inputting and outputting a clock if the serial bus interf ace operates i n the sio m ode open dr ain output pin dependi ng on t h e pr ogr am used tmp19a43 (rev2.0) 2-6 pin layout and pin functions
tmp19a43 t able 2-6 pi n name s an d function s (5 of 6) pin na me num b er of pi ns inpu t or outp u t func tio n pd0 1 i nput/outp u t por t d0: i nput/output por t ( w ith pull- up) htxd2 output sending ser i al data 2 at high speeds: op en dr ain output pin dependi ng on t h e pr ogr am used pd1 1 i nput/outp u t por t d1: i nput/output por t ( w ith pull- up) hrxd2 input receiving serial da ta 2 at high speeds pd2 1 i nput/outp u t por t d2: i nput/output por t ( w ith pull- up) hsclk2 i nput/outp u t high- speed se r i al clock input/out put 2 hcts2 i nput handshake input p i n: open dr ain output pin depen d ing on the pr ogr am used pd3-pd5 3 i nput/outp u t por t s d3 to d5: i nput/out put por ts ( w ith pu ll- up) that allow input/out put to be set in units of bits tbbo ut- output 16-bit ti m e rs b , c and d outputs: pin for outputting 16- bit ti m e rs b, c and d tbdout pd6 1 i nput/outp u t por t d6: i nput/output por t ( w ith pull- up) th at allows input/output to be set in units of bits adtrg input pin (with sch m itt t r igger) for starting a/d tri gger or a/ d converter fro m a n external source ke y 31 i nput ke y on wake up input 31: ( d y n am ic pull up is selectable) i nput with sch m itt tr igger wit h noise filter pe0-pe7 8 i nput/outp u t por t e : i nput/outp u t por t ( w ith pull- up) th at allows input/output to be set in units of bits key 08-key 15 i nput ke y on wake up input 08 to 1 5 : ( d ynam i c pull up is selectable) i nput with sch m itt tr igger wit h noise filter pf0,pf2 2 i nput/outp u t por t f: i nput/outp u t por t ( w ith pull- up) that allows input/output to be set in units of bits dreq0, 4 input dma request signals 0 and 4: for in putting the request to transfer data b y dma fro m an external i/o device to dmac0 or d m ac4 key 16,key 18 i nput ke y on wake up input 16 to 1 9 : ( d ynam i c pull up is selectable) i nput with sch m itt tr igger wit h noise filter pf1,pf3 2 i nput/outp u t por t f: i nput/outp u t por t ( w ith pull- up) that allows input/output to be set in units of bits dack0,4 output dm a acknowledge signals 0 and 4: signal showing tha t dre q 0 and dr e q 4 have acknowledged a dm a tr ansfer r e quest key 17,key 19 i nput ke y on wake up input 16 to 1 9 : ( d ynam i c pull up is selectable) i nput with sch m itt tr igger wit h noise filter pf4-pf7 4 i nput/outp u t por t f: i nput/outp u t por t ( w ith pull- up) that allows input/output to be set in units of bits key 20 - key 23 i nput ke y on wake up input 20 to 2 3 : ( d ynam i c pull up is selectable) tcout4 - i nput with sch m itt tr igger tcout7 output outputting 32-bit ti m e r if th e result o f a co m p arison is a m a tch with noise filter pg 0-p g 7 8 i nput/outp u t por t g: i nput/outp u t por t ( w ith pull- up) th at allows input/output to be set in units of bits tpd0- t pd7 output outputting trace data f r o m the dat a a ccess address: sig nal f o r dsu- ice ph0-ph7 8 i nput/outp u t por t h: i nput/outp u t por t ( w ith pull- up) th at allows input/output to be set in units of bits tpc0- t pc7 output outputting trace data fro m th e p r ogra m counter: signal for dsu-ice tpd0- t pd7 output outputting trace data f r o m the dat a a ccess address: sig nal f o r dsu- ice dclk 1 output debug clock: sign a l for dsu-i c e eje 1 i nput dsu-i c e enable: signal for dsu- i c e ( w ith sch m itt tr igger ) ( w ith pull- up ) with noise filter pcst4-0 4 output pc trace status: si gnal for dsu-ic e dint 1 i nput debug inter r upt: signal for dsu- i c e ( i nput with sch m itt tr igger and pull- up) with noise filter to vr/ t sr 1 output outputting the stat us of pd data over f low status: signal for dsu-i c e tck 1 i nput t e st clock input: signal fo r testing dsu- i c e (with sch m itt tr igger and pull- up) with noise filter tms 1 input test m ode se lect i nput: signal for te s ting dsu-ic e (wit h sch m itt t r igger a nd pull-up) tdi 1 i nput t e st data input e : signal for tes ting jt ag ( w ith sch m itt tr igger and pull- up) tdo 1 output t e st data output: s i gnal for testing dsu-ic e trst 1 input test res e t input: si gnal for testing dsu-ice (w ith sch m itt trigger and pull-down) with noise filte r reset 1 input reset: initializing lsi (with pull-up) i nput with sch m itt tr igger wit h noise filter x1/x2 2 input/outp u t pin for connecting a high-speed oscillator (x1: input with sch m itt t r igger) xt1/xt2 2 input/outp u t pin for connecting a low-speed oscilla tor (x t1: input wi th sch m itt t r igger) tmp19a43 (rev2.0) 2-7 pin layout and pin functions
tmp19a43 t able 2-7 pi n name s an d function s (6 of 6) pin na me num b er of pi ns inpu t or outp u t func tio n bo ot 1 input pin for setting a single boot m ode: this pin goes into si ngle boot m ode by sa m p ling "l" at the rise o f a reset sig n a l. it is u s ed to o v e rwrite in tern al f l as h m e m o ry . b y sa mp lin g "h (dvcc3 ) level" at the r i se of a r e set signal, it p e r f orm s a nor m a l o p er ation. t h is pin should be p u lled u p under norm a l operating condition s . pull it up when reset ting. (with pull-up) vrefh 1 i nput pin ( h ) for supply i ng the a/d c onverter with a r e ference power supply connect this pin to avcc3 if the a/d conver t er is not used. avcc3 1 ? pin for supply i ng t h e a/d conver t er with a power supply . connect it to a p o wer supply even if the a/d conver t er is not used. avss 1 ? a/d conver t er gnd pin ( 0 v). connect this pin to gnd even if the a/d conver t er is not used. pin ( l ) for supply i ng the a/d converter with a r e ference power supply test0 1 input test pin: to be fi xed to dvcc3 (wi t h sch m itt t r igger) test1 1 i nput t e s t pin: t o be fixed to dvcc3 test2 1 i nput t e s t pin: set to ope n . test3 1 i nput t e s t pin: set to ope n . test4 1 i nput t e s t pin: set to ope n . cvcch 1 ? pin for supply i ng a high-frequency oscilla tor with power: 1.5 v power supp ly cvccl 1 ? pin for supply i ng a low-frequency osc illator with power: 3 v power supply cvss 1 ? oscillator g nd pi n (0 v) dvcc15 3 ? power supply pin: 1. 5 v power supply dvcc3 4 ? power supply pin: 3 v power supply dvss 5 ? power supply pin: gnd pin (0 v) davcc 1 ? power supply pin for the d/a conver t er : 2. 5 v power su pply if the d/a convert er is not used , connect (fix) this pin to gnd. cvref 1 ? refer e nce power s upply pin for the d/a conver t er if the d/a convert er is not used , connect (fix) this pin to gnd. dagnd 1 ? gnd pin (0 v) for the d/a converter connect this pin to gnd even if the d/a conver t er is n o t used. cvref0 1 ? pin for connecting a stabilizing capaci tor to the d/a converter cvref1 1 ? pin for connecting a stabilizing capaci tor to the d/a converter da0 1 o u t p u t d/a conver t er 0 output pin da1 1 o u t p u t d/a conver t er 1 output pin tmp19a43 (rev2.0) 2-8 pin layout and pin functions
tmp19a43 2.4 pin names and pow e r suppl y pins t able 2-8 pi n name s an d power sup p l i es pin name power sup p l y p i n name power sup p ly p 0 d v c c 3 pcst4-0 dvc c 3 p1 dvc c 3 dc lk dvc c 3 p2 d v c c 3 e j e d v c c 3 p3 dvc c 3 t r s t dvc c 3 p4 dvc c 3 tdi dvc c 3 p5 dvc c 3 tdo dvc c 3 p6 dvc c 3 tms dvc c 3 p7 av c c 3 tck dvc c 3 p8 a v cc 3 d i n t dvc c 3 p9 dvc c 3 t o vr/tst a dvc c 3 pa dvc c 3 b u s m d d v c c 3 pb dvc c 3 b o o t dvc c 3 pc dvc c 3 x1, x2 cvc ch pd dvc c 3 xt1, xt2 c vccl pe d v c c 3 r e s e t dvc c 3 pf dvc c 3 d a 0 , 1 d a vc c pg dvc c 3 ph dvc c 3 2.5 pin numbers and pow e r supply pins t able 2-9 pi n numb ers a n d powe r su pplie s power supply pin number v o lt age range dvcc15 j5, k13, n10 1.35 v to 1.65 v d v c c 3 e 1 1 , h 5 1.65 v to 3.6 v a v c c 3 f 6 2.7 v to 3.6 v f v c c 3 m 1 3 , n 8 2.7 v to 3.6 v cvcc h a 1 6 1.35 v to 1.65 v c v c c l b 1 7 2.7 v to 3.6 v da v c c e 8 2.3 v to 2.7 v tmp19a43 (rev2.0) 2-9
tmp19a43 3. processor core the tm p19a43 has a high-perform ance 32 - b it p r oce sso r core (t x 1 9 a pr ocess o r co re ). fo r i n f o rm ation on the ope rat i o ns of t h i s pr ocess o r c o re , pl ease re fer to th e "tx1 9a fam ily architectu r e." th is ch ap ter describ e s th e fun c tio ns u n i q u e to th e tmp19a43 t h at are no t exp l ain e d in th at do cu m e n t . 3.1 reset operation t o reset th e d e v i ce, en su re that th e po wer su pp ly v o ltag e i s in th e op eratin g v o ltag e rang e, th e o s cillatio n of t h e in tern al h i g h -freq u e n c y o s cillato r h a s stab ilized at th e sp ecified frequ en cy an d t h at th e reset in pu t h a s b e en "0 " for at least 12 s y ste m clocks (2.4 s duri ng e x ternal 10 m h z operation). no te th at th e pll m u lt ip licati o n cl o c k is q u ad rup l ed and t h e clo c k g e ar is in itialized to th e 1 / 8 m o d e du ri n g th e reset pe rio d . whe n t h e reset re quest is aut h orized, the syste m contr o l c o p r ocess o r (c p0 ) re gister o f the t x 19 a p r o cesso r core is in itialized . for furth e r d e t a ils, p l ease refer to th e ch ap ter ab ou t arch itectu r e. after th e reset ex cep tion h a ndlin g is ex ecu ted , th e p r o g ram bra n ches of f to t h e exce p t i o n ha ndl e r . t h e add r ess t o whic h the program branches of f to (add ress wh ere ex cep tion h a nd lin g starts) is called an exception vector a d dress . thi s e x cept i o n vect o r ad d r ess of a reset e x ce pt i o n ( f o r e x a m pl e, nonm askabl e i n t e r r u p t ) i s 0xb fc 0 _ 0 0 0 0 h (vi r t u al address ) . th e reg i ster of th e in tern al i/ o is in itialized . the p o r t pi n (i ncl u di n g t h e pi n t h at can al so be use d by t h e i n t e rnal i/ o) i s set t o a genera l - p u r p o s e i n p u t or out put po rt m ode. (no t e 1 ) set the reset pin to "0" before turning th e po w e r on. perform the r e s e t after the po w e r supply v o ltage has stabiliz ed suffic ientl y w i thin the operating range. (no t e 2 ) after tur n ing the po w e r on, make sure that the po w e r supply v o ltage and oscillation hav e stabilized, w a it for 500 s or longer, and perform the reset. (no t e 3 ) in the fl ash progr a m , the res e t period o f 0.5 us or longer is required independ ently of the s y st em clock. (no t e 4 ) the rese t opera ti on can alter the inter n al ram st ate, but does no t alter dat a in the backu p ram . tmp19a43 (rev2.0) 3-1 processor c o re
tmp19a43 tmp19a43 (rev2.0) 4-1 memory ma p 4. memor y map fig . 4- 1 show s th e m e m o r y map o f th e tm p1 9a4 3 fdx b g/tmp1 9a4 3 c d x b g . ph y s ical address v i rtual address 0 x ff ff ff ff 16 mb reserved kseg1 (cash disabled) kseg2 (1 gb ) kuseg (cash enabled) kseg2 (cash enabled) kuseg (2 gb ) kseg0 (cash enabled) 16 mb reserved 16 mb reserved internal r o m are a projection internal i/ o built-in ram area (24 kb) user prog ram area exception vector area maskable interrupt area r e ser v ed f o r d ebug g i ng (2 mb ) inaccessib l e inaccessib l e 512 mb internal r o m inaccessib l e 16 mb reserved 0xf f f f e000 0 x ff ff d f f f 0xf f 00 000 0 0xf f f f 8000 0xbfc7 0xbfc 0 0000 0xf f 3f ff ff 0xa000 00 00 0xf f 20 000 0 0x8000 0000 0xf f 00 000 0 0x4007 ff ff 0x1f c7 f f f f 0x4000 0000 0x1f c7 f f f f 0x1f c0 0400 0x1f c0 0000 0x0007 ff ff 0x1f c0 0000 0x0000 0000 fig. 4-1 me mory map fig . 4- 2 show s th e m e m o r y map o f th e tm p1 9a4 3 fzx b g/tmp1 9a4 3 c zx bg . 0 x ff ff ff ff 16 mb reserved kseg1 (cash disabled) kseg2 (1 gb ) 0 xbf c 5 ff ff 0xf f 00 000 0 kuseg (cash enabled) kseg2 (cash enabled) kuseg (2 gb ) kseg0 (cash enabled) 16 mb reserved 16 mb reserved internal r o m are a projection internal i/ o built-in ram area (20 kb) user prog ram area exception vector area maskable interrupt area r e ser v ed f o r d ebug g i ng (2 mb ) inaccessib l e inaccessib l e 384 mb internal r o m inaccessib l e 16 mb reserved ph y s ical address v i rtual address 0xf f f f e000 0 x ff ff d f f f 0xf f f f 9000 0xbfc 0 0000 0xf f 3f ff ff 0xa000 00 00 0xf f 20 000 0 0x8000 0000 0xf f 00 000 0 0x1f c5 f f f f 0x4005 ff ff 0x4000 0000 0x1f c0 0400 0x1f c5 f f f f 0x1f c0 0000 0x0005 ff ff 0x1f c0 0000 0x0000 0000 fig. 4-2 me mory map
tmp19a43 tmp19a43 (rev2.0) 4-2 memory map (note 1) the internal rom is mapped to: 0x1fc0_0000-0x1fc5_ffff (384 kb) 0x1fc0_0000-0x1fc7_ffff (512 kb) the internal ram is mapped to: 0xffff_9000-0xffff_dfff (20 kb) 0xffff_8000-0xffff_dfff (24 kb) (note 2) for the tmp19a43, a physical space of only 16 mb is available as external address space to be accessed. it is possible to place this 16-mb physical address space in a chip select area of your choice inside the 3.5-gb physical address space of the cpu. access to internal memory, internal i/o space and reserved areas is given priority over access to the external address space. therefore, access to the external address space is denied if any of the internal memory, internal i/o space or reserved areas are being accessed. (note 3) do not place an instruction in the last four words of a physical area, specifically the last four words of an area where memory is mounted for external rom extension (this varies depending on the system of the user). internal rom: 0x1fc5_fff0-0x1fc5_ffff (384 kb) internal rom: 0x1fc7_fff0-0x1fc7_ffff (512 kb)
tmp19a43 5. clock/s t andb y control the sy st em operat i on m odes cont ai n t h e st a n d b y m odes i n whi c h t h e p r o cesso r co re op erat i ons are st op pe d t o redu ce po wer d i ssip a tion . fi g . 5-1 s t ate t r an sitio n diag ram o f each op eratio n mod e is sho w n b e low . res e t norm a l m ode (f c / gear val ue) res e t ha s been perf o r m ed i d le m ode (cp u st op) (i / o s e l e c t i v e operat i on) i n st ruc t i on in te r r u p t s t o p m ode (e nt i r e c i rc u i t st op) i n st ruc t i on in te r r u p t (a) s t ate t r an sition di ag ra m of single clock mod e sle e p m ode ( f s o n l y ) no rm al m ode ( fc / g ea r value ) i d le mode (c pu s t o p ) ( i / o s e l e c t iv e o p e r at i o n) res e t reset h a s b een perf o r m e d i n s t ruc t i on in te r r u p t st o p mo de (e nti r e c i rc u i t st op ) i n s t ruc t i on i n st ructi on i n terru p t in te r r u p t slo w mo de (fs ) in te r r u p t in s t r u ct io n i n s t ructi on in te r r u p t inst r u c- ti o n (b) s t ate t r an sition di ag ra m of dual cl o ck m ode fig. 5-1 s t ate t r an sition di agram of each ope r ation mode re s e t norm al m ode fc = fpl l = fo sc 4 f s ys = f c /8 fs ys = fo s c /2 fperi ph = fgear = fs ys res e t ha s been perf o r m e d fig. 5-2 defa ult s t ate of th e system clo c k tmp19a43 (rev2.0) 5-1 clock/s t andby control
tmp19a43 fosc : clock frequ e nc y to be in put v i a the x1 and x2 pins f p ll: clock frequ e nc y multiplie d (quadr uple d ) b y the pl l fc: high-freq ue nc y clock frequency fs: lo w -freq uen c y clock freq uenc y fgear: clock frequenc y selected b y the s y s t em control register syscr1 in the cloc k ge nera tor fs y s : sy stem cloc k frequ e ncy the cpu, rom, ram, dmac, intc a nd hsio all opera te ac c ording to thi s clock. the intern al peripher a l i/o opera tes a ccording to the fs y s /2 clock. f p eriph: clock frequenc y select ed b y syscr1 (clock to be input to the peri pheral i/o prescaler ) 5.1 clock syst em block diagram 5.1.1 main sy ste m clock ? allo ws for o s cillato r con n ecti o n or ex tern al clo c k i n pu t. ? c l ock gear ( 3 / 4 , 1/ 2 , 1/ 4, 1/ 8 ) (defau lt is 1 / 8.) ? i npu t fr equ e n c y ( h i g h fr equ e n c y) input fre que n c y ra nge ma x i mum ope ra ting fre que ncy l o w est o p eratin g fre q ue ncy 8 to 10 (mhz)* 40 mhz 4 mhz * c l oc k gear 1/ 8 (de f aul t ) i s u s ed w h en 8 m h z (m i n ) i s i n put . ? i npu t fr equ e n c y ( l ow fr eq u e ncy) input fre que n c y ra nge ma x i mum ope ra ting fre que ncy l o w est o p eratin g fre q ue ncy 30 khz to 34 k h z 34 khz 15 khz z whe n t h e l o w - spee d cl oc k ge ar 1/ 2 i s use d : 15 k h z (m i n ) (no t e ) (pre cau tions for s w i t c h ing the high-s p eed cloc k gear) s w i t ching of clock gear is execu ted w h en a v a lu e is w r itten to the syscr1 register . the re are cas es w h e r e s w i t c h ing does not occur immediately af ter the cha n g e in the regis t er se tting bu t the o r iginal clock gea r is used for ex ecution o f in stru ctions. if it is necess ar y to use the ne w cloc k for exec uti on of the instru ctions follo w i ng to the clock gea r s w i t ching instruction, inse rt a dummy instru ction (to execu t e a w r i t e c y cle). t o use the clock gear , ensur e that y o u make the time setting such th at tn of the presc aler output from ea ch block in t h e periphera l i/o is calib rate d to t n tmp19a43 5.1.2 clock gear ? the hi g h - s pee d cl oc k i s di vi d e d i n t o 3/ 4, 1/ 2 , 1/ 4 or 1/ 8. ? the i n ternal i/ o prescale r clock t0: fpe r i p h/ 2, f p eri ph/ 4, fpe r i p h/ 8 a n d f p eri ph/ 16 f osc 2 4 8 16 fs fc fp ll = fo s c 4 i npu t t o peri p hera l i / o presc a l e r tm r b /c , si o , s b i, 2- phase pu l s e input c oun t e r p e ri p hera l i / o a d c, tm rb/ c , si o , s b i, w d t, po r t 2-p h a s e pul se i n p u t count e r cl o c k t i m e r fsy s f s ge ar l o w - s p ee d o scilla t o r h i gh - s pe e d osci l l at or xt 1 xt 2 x1 x2 sy s c r0< w u e f> sy s c r2< w u p t1: 0 > wa r m - u p t i m e r 3 / 4 1 / 2 1/ 4 1/ 8 f periph (t o p e ri ph eral i / o) pll sy sc r 1 < f ps e l > sy sc r 1 < g e a r 2 : 0 > e i g h t f r e que nc y di vi si on s af t e r t he reset ha s be en p e r f or m e d cp u rom ra m dma c intc s y scr0 fs y s f p eri p h 2 sy sc r 0 f s g ear sy s c r 3 < s c o se l 1 :0 > sc o u t f g ear sy s c r1 < s y s c k > t0 s y sc r 1 < s g e ar > a d c c o nver si on cl oc k cl o c k t i m e r kw up hs i o 1/2 sy s c r0 f s gear fsy s /2 fs to w a r m - u p t i m e r fig. 5-3 cl ock and s t a ndb y related blo ck diag ram tmp19a43 (rev2.0) 5-3 clock/s t andby control
tmp19a43 5.2 cg registers 5.2.1 sy stem co ntrol registers 7 6 5 4 3 2 1 0 bit s y mbol x e n x t en rx en rx ten w u ef prck1 prck0 read/w r i t e r/w r / w r / w r / w r r/w r/w r/w af ter re set 1 0 functio n h i g h - s p e e d oscillator 0: s t op 1: oscilla- tion low -speed oscillator 0: s t op 1: oscilla- tion high-spee d oscillator af ter th e st op mode is r e lea s ed 0: s t op 1: oscilla- tion low -speed oscillator af ter th e st op mode is r e lea s ed 0: s t op 1: oscilla- tion this c a n be read a s "0 ." control of w a rm-up t i me r (w up ) for oscilla tor 0 w r ite: don't care 1 w r ite: w u p st a r t 0 read : wu p fini shed 1 read : wu p operati ng selec t pres cal e r clo ck 00: f periph / 16 01: f periph / 8 10: f periph / 4 1 1 : f p eriph / 2 7 6 5 4 3 2 1 0 bit sy mbol sy sc kflg sy s c k f p s e l s g e a r g e a r 2 g e a r 1 g e a r 0 read/w r i t e r r r/w r / w r/w r / w r/w r/w af ter re set 0 0 0 1 1 1 functio n t h i s can be read a s "0 ." sy stem c l oc k st atus flag 0: high speed (fc) 1: l o w speed ( f s) select sy stem clo ck 0: high speed (fgear) 1: l o w speed ( f s) select f periph 0: fgear 1: fc select gear of low - speed clo ck 0: fs / 1 1: fs / 2 select gear of high- speed clock (fc) 000: fc 100: fc/2 001: re serv ed 101: re serv ed 010: fc3 / 4 1 10: fc/4 01 1: re serv ed 1 1 1 : fc/8 7 6 5 4 3 2 1 0 bit sy mbol dr vosch w u pt1 w u pt0 stby 1 stby 0 dr ve read/w r i t e r/w r / w r / w r / w r/w r / w r r/w af ter re s e t 0 0 1 0 1 1 0 functio n h i g h - s p e e d oscillator curren t con t rol 0: high cap abili ty 1: l o w cap abili ty this c a n be read a s "0 ." select oscilla tor w a rm-up tim e 00: no w u p 01: 2 /inp u t fr eque ncy 10: 2 14 /input freque ncy 11 : 2 16 /inp u t fr eque ncy select st a ndby mode 00: re serv ed 01: st op 10: sleep 1 1 : id le this c a n be read a s "0 ." 1: driv e th e pin ev en in the st op mode . 7 6 5 4 3 2 1 0 bit sy mbol scosel1 s cosel0 a lesel read/w r i t e r r/w r / w r / w r af ter re set 0 1 1 0 sy scr0 (0x f f ff_ee00 ) (0x f f ff_ee03 ) sy scr1 (0x f f ff_ee01 ) (0x f f ff_ee02 ) sy scr2 (0x f f ff_ee02 ) (0x f f ff_ee01 ) sy scr3 (0x f f ff_ee03 ) (0x f f ff_ee00 ) functio n t h i s can be read a s "0 ." select scout ou tp ut 00: fsgear 01: fsy s /2 10: fsy s 11 : t0 set ale outpu t wi dt h 0: fs y s 1 1: fs y s 2 this can be read a s "0 ." l i tt le big l i tt le big l i tt le big l i tt le big ? don't s w itch th e sysck an d th e ge a r <2 :0> si mul t a ne ous l y . ? if the s y s t e m e n ters the st op mo de w i th syscr2 set at 1 (l o w cap abilit y ) , the se ttin g w ill chan ge to 0 (hig h ca p a bili t y ) a f ter the st op mo de is release d. ? sysck can be s w itched w h en both o f xen a n d xten are s e t to "1." ? be sure to set t h e rxen and t h e rxten to 1 (o scillati on) f o r th e oscillat or sele cted at t h e sysck. if a w r ong setti ng is mad e , the oscilla tor s elected b y the s ysck w ill oscillate. ? the cl ock t h at h as bee n selec te d w i th sysck o scillates w i thou t fail a f ter maki n g clear t h e st op mode. tmp19a43 (rev2.0) 5-4 clock/s t andby control
tmp19a43 tmp19a43 (rev2.0) 5-5 clock/standby control 5.3 system clock controller by resetting the system clock controller, the controller status is initialized to = "1," = "0" and = "111," and the system clock fsys changes to fc/8. (fc = fosc (original oscillation frequency) 4, because the original oscillation is quadrupled by pll.) for exam ple, when a 10-mhz oscillator is connected to the x1 or x2 pin, fsys becomes 5 mhz (=10 4 1/8) after the reset. similarly, when the oscillator is not connected and an external oscillator is used to input a clock instead, fsys becomes the frequency obtained from the calculation "input frequency 4 1/8." 5.3.1 oscillation stabilization time (switching between the normal and slow modes) the warm-up timer is provided to confirm the oscillation stability of the oscillator when it is connected to the oscillator connection pin. the warm-up time can be sel ected by setting the syscr2 depending on the characteristics of the oscillator. th e syscr0 is used to confirm the start and completion of warm-up through software (instruction). after the completion of warm-up is confirmed, switch the system clock (syscr1). when clock switching occurs, the current system clock can be checked by monitoring the syscr1. table 5-1 shows the warm-up time when switching occurs. (note 1) the time for warm-up is required even when an external clock (oscillator, etc.) is used and providing stable oscillation because the internal pll is used even in this case. (note 2) the warm-up timer operates accordi ng to the oscillation clock, and it can contain errors if there is any fluctuation in the oscillation frequency. therefore, the warm-up time should be taken as approximate time. table 5-1 warm-up time warm-up time options syscr2 high-speed clock (fosc) low-speed clock (fs) 01 (2 8 /oscillation frequency) 25.6 ( s) 7.8 (ms) 10 (2 14 /oscillation frequency) 1.638 (ms) 500 (ms) 11 (2 16 / oscillation frequency) 6.554 (ms) 2000 (ms) these values are calculated under the following conditions: fosc = 10 mhz, fs = 32.768 khz
tmp19a43 t r an sition from th e normal m o d e t o the slow m o d e syscr 2 < w upt1: 0 >="xx": select the wa rm -up tim e syscr 0 ="1 " : en ab le th e l o w-sp eed o s cillatio n (fs) syscr 0 < w uef>="1": s t art the warm -up timer (wup) syscr 0 read : w a i t u n til th e state b e co m e s "0 " (wup is fin i sh ed ) syscr 1 ="1": swi t ch the sy ste m clock t o low speed (fs) syscr 1 read: confirm that the c u rrent state is " 1 " (the curre nt system clock is fs ) syscr 0 ="0": disable the hi gh-speed oscillation (fosc) t r an sition from th e slow m o d e to th e normal m o d e syscr 2 < w upt1: 0 >="xx": select the wa rm -up tim e syscr 0 ="1": enab l e the high-speed oscillation (fosc) syscr 0 < w uef>="1": s t art the warm -up timer (wup) syscr 0 read : w a i t u n til th e state b e co m e s "0 " (wup is fin i sh ed ) syscr 1 ="0": swi t ch the syst e m clock t o high speed (fgea r) syscr 1 read: confirm th at the c u rre nt st ate is "0" (t he current system cloc k is fgea r) syscr 0 ="0 " : disab l e th e l o w-sp eed o s cillatio n (fs) (no t e ) in the slo w mode, the cpu o p era t e s w i th the lo w - s p eed clock, and the i n t c , the clock ti mer , the 2-p h ase pulse input coun te r , the kwup (d y n amic p u ll-up), the io port and the ebi f (external bus interfac e) are oper a ble. s t op other internal peri pheral fun c ti ons before the s y stem enter s the sl ow mode. 5.3.2 sy stem clo c k pin outp ut function th e syste m clo c k , fsys, fsys/2 o r fs, can b e outp u t fro m th e p4 4 / sc out p i n. by settin g the po rt 4 related reg i sters, p4c r < p 44c > t o " 1 " an d p 4 f c t o " 1 ," t h e p 4 4/ sc ou t pi n beco m e s t h e sc o u t out put pi n. the o u t p ut clo c k is selected b y settin g th e syscr3 . t a bl e 5 - 2 s h o w s t h e pi n st at es i n eac h st a n dby m ode w h e n t h e p 44/ sc o u t pi n i s set t o t h e sc out out put . t able 5-2 scout o u tput s t ate in each s t andby mod e sta n dby mode mode sco u t selectio n norm a l s l o w i d l e s l e e p s t o p = "00" output th e fs ge a r clo c k. = "01" output th e fs y s /2 clo c k. = "10" output th e fs y s clock. fixed to "0" or " 1 ." = "11" output th e t0 clock . (no t e ) the phase differ e nc e (ac timing) bet w e e n the s y stem clo ck outpu t by the sco u t and the inte rnal clock is not guaran t e e d. tmp19a43 (rev2.0) 5-6 clock/s t andby control
tmp19a43 5.3.3 reducing the oscillator driving cap ability th is fun c tio n is in tend ed fo r restrictin g o s ci llatio n no ise gen e rated fro m th e o s c illato r an d red u c i n g the po wer d i ssip a tion o f th e o s cillato r wh en it is conn ected to t h e o s ci llato r conn ectio n p i n . settin g th e syscr2 to "1" redu ces t h e d r i v ing cap ab ility o f th e h i gh -sp e ed oscillato r . (low cap ab ility) th is is reset to th e d e fau lt settin g "0 ." wh en th e power is tu rn ed on, oscillat i o n st arts with th e normal d r i v ing cap ab ility (h igh cap a b ility). th is is au to m a ticall y set to t h e h i gh d r iv i n g cap a b ility state ( ="0 " ) wh en ev er th e oscillato r starts o s cillatio n d u e to m o d e tran sitio n . z redu cing t h e driv ing cap a b ility o f th e h i g h -sp eed oscillato r os c illa to r c2 c1 e nabl e o s c i l l a t i on x1 p i n s y s cr2 f os c x 2 pin fig. 5-4 oscill ator driving cap a bility 5.3.4 clock frequenc y divis i on for low-s peed sy s t em clock th e low-sp eed clo c k (fs) can b e d i v i d e d i n to two b y settin g th e system co n t ro l reg i ster syscr1 t o "1 ." th is redu ces t h e po wer d i ssipatio n in th e slow m o d e . set th e clo c k freq u e n c y d i v i si o n during h i gh-sp eed o s cillatio n. tmp19a43 (rev2.0) 5-7 clock/s t andby control
tmp19a43 5.4 prescaler clock con t roller each in ter n al i/o ( t mrb0 -f , tmrc, si o0 -2 an d sbi) has a prescaler for divi ding a cl ock. the cloc k t0 to be in pu t to each prescaler is ob tain ed b y selectin g t h e "f peri ph" cl ock at t h e s y sc r 1 < fps e l > an d t h e syscr 0 an d t h en d i v i d i n g t h e clo c k accord i n g to th e settin g of syscr 0 . after th e co n t ro ller is reset, fp eri p h / 1 6 is selected as t0 . for d e t a ils, p l ease refer to fi g . 5-5 syste m clo c k t r an sition diag ram . 5.5 clock multiplication circuit (pll) th is circu it o u t p u t s t h e fp ll clo c k t h at is qu ad rup l e o f t h e hi g h -sp e ed o s cillato r ou tpu t clock , fo sc. th is lo wers th e o s cillato r inpu t frequ en cy wh ile in creasing t h e in tern al clo c k sp eed . tmp19a43 (rev2.0) 5-8 clock/s t andby control
tmp19a43 5.6 s t andby controller the tx 1 9 a c o re has se veral l o w - di ssi pat i o n m odes. t o sh i f t to th e st op , sleep or idle (halt o r doze) m o d e , set th e rp b it i n th e cpo statu s reg i ster , and then exec ute t h e w a it in st ru ctio n. before sh ifting to th e m o d e , y o u n e ed t o select th e st an d b y m ode at t h e sy st em cont r o l re gi st er (s ysc r 2) . the id le, sl eep a n d st o p m odes ha ve t h e f o l l o wi ng fea t ures: i d le: on ly the cpu is stopped in th is m o d e . th e in tern al i/ o h a s o n e b it of t h e on/off settin g reg i ster for operation in t h e idle m ode i n the re gist er of eac h m odule. t h is enables operati o n settings for the idle m ode. whe n the i n ternal i/o ha s bee n set not to operate i n th e idle m o d e , it stop s o p e ratio n an d ho lds th e state wh en th e system en ters th e idle m o d e . t a b l e 5-3 sh ows a list o f idle settin g reg i sters. t able 5-3 internal i/o settin g regi sters for the idle mode internal i/o idle m o d e settin g reg i ster t m r b 0 - f t b xrun tmrc tccr sio0 -3 s c x m od1 < i2 sx > h s i o 0 - 3 h s c x m o d 1 < i 2 s x > i2c/sio(sbi) s b i b r 1 < i 2 s b i x > a/d converter admo d1< i 2ad> wd t w d mod < i2 w d t > (no t e 1 ) the halt mo de is activ ated b y setting the rp bit in the st atus register to "0," exec uting th e w a it com m and and shif ting to the st andb y mo de. in this mode, the tx1 9 a proce ssor c ore s t op s the proc ess e r opera tion w h ile h o lding the st atus o f th e pipeline. the tx19 a giv e s no res pon se to the b u s contr o l auth orit y reque st from the intern al dm a, so the bus control autho r it y is maint a ined in this mode. (no t e 2 ) the do ze mode is activ a t ed b y settin g the rp bit in the st atus register to "1" and shif ting to th e st an db y mode. in this mode, the t x 19a proc es sor cor e s t o p s the proce sser o p era t ion w h i l e holding the st a t us of the pip e line. the tx19 a c a n respon d to the bus co n t rol autho r ity request giv e n from the out side of the proce ssor c ore. sleep: only t h e inte rnal lo w-speed oscillator , the cl ock tim er , the 2- phase pulse i n put c o unter a n d the dy nam i c p u ll-up circu it (kwup) op erate. st op: all th e in tern al circu its are b r o ugh t to a stop. the stand b y mod e select ion ..status< r p > of cp 0.. is se le cte d by the co mbinatio n. pleas e d o not execut e the w a it instru ction in th e sett ing of " x " in the follow ing tab l e. s tby h alt d oze 1 : 0 r p=0 r p=1 re s e r v ed 00 x x s top 0 1 s top x sl e ep 10 sl e ep x i dle 1 1 h alt d oze tmp19a43 (rev2.0) 5-9 clock/s t andby control
tmp19a43 5.6.1 cg operations in each mode t able 5-4 s t atus of cg in e a ch o p e r atio n mode cloc k s ourc e mode oscillation circu i t pll clo ck su p p l y to p e rip h eral i/o clock supply to cpu o s c i l l a t o r n o r m a l { { { { s l o w { partial supply ( n ote) { idle (halt) { { s e lect abl e idle (doze) { { s e lect abl e s l e e p fs onl y clock timer, 2-p h ase pulse inpu t counter and kwup s t o p { : on or clo c k supply : off or no clo c k supply (no t e) peripheral function s th at c a n w o r k in the slo w mode : intc, ex tern al bu s interface, io port, clock ti mer , 2-pha se pulse input counter and kwup 5.6.2 block operations in each mode t able 5-5 block o p e r ating s t atus in each ope r ation mode b l o c k n o r m a l slow idle (doze) idle (halt) sleep stop tx19a processor core dmac intc extern al bus i/f io port { { { { { { { { { { { { { { adc dac sio hs io i2c tmrb tmrc wdt { { { { { { { { 2-phase pulse input counter { { on/of f s e lecta b le for e ach module { (fs only ) d y namic pull-up (kwup) { { { { { { sta t ic pull-up rtc { { { { { cg { { { { { high-speed oscilla tor (f c) { ? (note) { { low-s p eed oscilla tor (fs) { { { { { { : on : off (note) when the sy stem enters the slow mode, the high-speed oscillator m u st be stopp ed b y setting the s yscr1 . tmp19a43 (rev2.0) 5-10 clock/s t andby control
tmp19a43 5.6.3 releasing the s t andb y s t ate the standby state can be rele ased by a n i n terru p t req u e st wh en th e in terrup t lev e l is h i g h er th an th e i n terru p t m a sk level, or by the reset. the sta n dby release s o urce t h at ca n be use d i s det e rm i n ed by a c o m b i n at i on o f t h e st a n d b y m ode and t h e st at e of t h e i n t e rr upt m a sk re gi st er assi gne d t o t h e st at us regi st er i n t h e sy st e m cont r o l cop r ocess o r (c po ) of t h e t x 19 a p r oce sso r core . details are s h own in t a ble 5-6. z release by an interrupt re ques t o p er ation s of r e leasin g th e st an db y state usin g an in terr up t r e qu est v a r y dep e nd ing on the in terr up t en ab led state. if th e i n t e rru p t lev e l specified b e fo re th e system en ters th e standb y m o d e is equ a l to o r h i gh er th an th e val u e of t h e i n t e rr upt m a sk re gi st er , a n i n t e r r upt ha ndl i n g o p erat i o n i s e x e c ut ed by t h e t r i gge r a f t e r t h e s t and b y is released , and th e pro cessin g is started at th e in stru ctio n n e x t to the stan db y sh ift in stru ction (w ait in stru ction). if th e i n terrup t req u e st lev e l is lo wer th an t h e val u e o f t h e i n t e rr upt m a sk re gi st er , t h e pr oc essi ng is started with th e in stru ctio n n e x t to th e stan db y sh i f t in stru ction (w ait in stru ction) with ou t ex ecu t in g an in terru p t h a n d l in g op eration . (th e i n terrup t req u e st flag is main tain ed at "1 .") for a no n m askab l e in terrup t, an in terru p t h a n d ling is ex ec uted after the standby state is re leased irrespec tively of t h e m a sk re gi st er val u e. z release by the reset any standby st ate can be released by the res e t. no te th at releasin g o f th e st op m o d e req u i res suf f icien t reset ti m e to all o w th e o s cillato r o p e ration t o b eco m e stable. (t a b le 5 - 1 w a rm -up t i m e ). please refer t o "6 . in terrup t" fo r d e tails of i n terru p t s fo r st op , slee p a n d idl e rel ease an d or di na ry i n t e rr u p t s . tmp19a43 (rev2.0) 5-1 1 clock/s t andby control
tmp19a43 s t andb y release sour ce s and s t and b y release opera t ions (interrupt level)>(interrupt mask) t able 5-6 in terru p t acce p t in g state in terru p t en abled ei= "1" in terru p t d i sa b l ed ei= "0" sta ndby mode idle (progra mma ble ) sleep stop idle (programmable) slee p stop intwdt ? ? int0-b (note 1) { { { (note 1) kwup00-31 (note 1) { { { (note 1) intrtc { { inttb2-3 (note 2) { { inttb0-f { intrx0-2,inttx0-2 hintrx00-2,hinttx0-2 { ints0 { standby release source interrupt intad/intadhp/intadm { : starts th e in terru pt hand ling aft e r the standb y m o de is r e l eased . ( t he lsi is initi al ized b y th e r e set . ) { : starts th e pro ces sing at the addr ess next to th e standb y instruction (without execu ting the interrupt handling) after the standb y mode is released. : cannot b e used f o r releasing the standb y mode ? : cannot execu te masking with an interruption mask when a nonmaskable interrupt is selected. (no t e 1 ) the st an db y mode is released af ter th e w a rm-u p time has elap sed. (no t e 2 ) these op era t ions are ap plicable only w h e n the 2-phase puls e input coun te r mode is selected. if an y other modes are selec ted, the operations w ill be the same as thos e for th e inttb0 to intt bf . (no t e 3 ) t o rele ase th e st an db y mode b y using the lev e l mode inte rrup t in th e inte r ruptible st ate, keep the lev e l until the interru pt handling is st arted. chan ging th e le v e l befor e the n w i ll pr ev ent the interru pt proce ssing from st arting properly . (no t e 4 ) t o recov e r from the st an db y mode w h en the cp u has disable d the acce pt ance of interrup t s , set the interr upt le v e l hig h er than the interrupt mask (inte rrup t le v e l > interrup t ma sk). if th e in terru pt lev e l is equal to o r lo w e r than the in terru pt mask (inter rupt le v e l inte rru pt mas k ), th e s y stem ca nnot r ecov e r from the s t andb y mode. tmp19a43 (rev2.0) 5-12 clock/s t andby control
tmp19a43 5.6.4 st op mode in th e st op m o d e , all th e i n tern al circu its, i n clu d i ng t h e in t e rn al o s cillato rs, are bro ugh t to a stop . th e pin states in th e st op m o de v a ry d e p e nd in g o n th e setting o f th e sysc r2 . t a b l e 5.8 sho w s th e p i n states in th e st op m ode. when t h e st op m ode is released, the system clock o u t p u t is started after th e elapse o f warm -u p ti m e at th e warm -u p coun ter to allo w th e in tern al o s cillato rs t o stab ilize. after th e st op m o d e is rel eased , th e syst e m ret u r n s to th e o p e ration m o d e th at was activ e imm e d i ately b e fo re th e st op m o de (norm a l o r slow), and starts th e ope rat i o n. it is necessary to m a ke these settings before the inst ructi o n to e n ter the st op m ode is e x ecute d. specify t h e warm -u p ti m e at th e syscr2. (no t e ) t o shif t from the norm al mode to the st op mod e on the tmp19a43, do not set the syscr2 to "00" or "01" for the w a r m -u p time setting. the internal sy stem recov e r y time can no t be satis fie d w h en the s y stem reco v e rs from the st op mode. t able 5-7 w a rm-up setting s for t r an sitio n s of ope r ati on mod e s tra n s i tion of ope ra tion mo de wa rm-up s e tting normal idle not requir e d normal s leep not requir e d normal sl ow not requir e d normal st op not requir e d idle normal not requir e d s leep normal required s leep sl o w not requir e d sl ow nor mal required (note 1) sl ow s lee p not requir e d sl ow st op not requir e d st op normal required st op sl ow required (note 1) when the high-speed os cill ator is stopped in the slow mode tmp19a43 (rev2.0) 5-13 clock/s t andby control
tmp19a43 5.6.5 recovery from the st op or sleep mode 1 . t r an sition o f op eration m o d e s: norm a l st op norma l n or m a l n or m a l st o p fsy s (hi gh-s peed c l o c k ) m ode cg (hi gh-s peed c l o c k ) sy ste m cl o c k o f f wa r m -up ( w -up) s t art of hi gh-s peed c l o c k osc i l l at i o n s t art of w a rm -up e nd of w a rm -up whe n @fosc= 10 m h z se le c t ion of w a rm-up time syscr2 wa rm-up time (fosc) 01 (2 8 / f o s c ) s e t t i n g d i sabled 10 (2 14 / f o s c ) 1 . 6 3 8 m s 11 (2 16 / f o s c ) 6 . 5 5 4 m s (no t e ) the inte rnal s y stem reco v e r y time cannot b e sa tisfied. do no t se t to " 01." 2 . t r an sition o f op eration m o d e s: norm a l slee p no rm al n or m a l n or m a l sl e e p s y s t em c l oc k o f f fsy s ( h igh - sp ee d c l o c k ) mo d e cg ( h igh - sp ee d c l o c k ) cg (lo w -s peed c l o c k ) wa r m -up ( w -u p) l o w - s p ee d c l o c k ( f s ) con t in u e s o s cilla t i o n s t art of h i g h -s p e e d c l o c k osc i l l at io n s t a r t of w a r m -u p e n d of w a r m -u p whe n @fosc= 10 m h z se le c t ion of w a rm-up time syscr2 wa rm-up time (fosc) 01 (2 8 / f o s c ) s e t t i n g d i sabled 10 (2 14 / f o s c ) 1 . 6 3 8 m s 11 (2 16 / f o s c ) 6 . 5 5 4 m s (no t e ) the inte rnal s y stem reco v e r y time cannot b e sa tisfied. do no t se t to " 01." tmp19a43 (rev2.0) 5-14 clock/s t andby control
tmp19a43 3. t r an sition o f op eration m o d e s: slow st o p sl ow sl ow sl ow st o p sy ste m cl o c k o f f fsy s (lo w -s peed c l o c k ) m ode cg (lo w -s peed c l o c k ) wa r m -up ( w -up) s t art of l o w - s peed c l o c k osc i l l at i o n s t art of w a rm -up e nd of w a rm -up w h en @fs=32 .7 68 kh z se le c t ion of w a rm-up time syscr2 warm-up time (fs) 11 (2 16 / f s ) 2 0 0 0 m s 4 . t r an sition o f op eration m o d e s: slow s l eep sl ow sl ow sl ow s l eep sy ste m cl o c k o f f fsy s (lo w -s peed c l o c k ) m ode cg (f s ) (lo w -s peed c l o c k ) (note) the lo w - speed clock (fs) continues os cillation. there is no need to make a w a r m -u p setting. tmp19a43 (rev2.0) 5-15 clock/s t andby control
tmp19a43 t able 5-8 pin s t ates in the st op mode i n each s t ate of syscr2 (1/2) pin na me input /ou t put = 0 < d r v e > = 1 p 0 0 - p 0 7 i n p u t m o d e output mode a d 0-ad7, d0-d7 ? ? ? output p 1 0 - p 1 7 i n p u t m o d e output mode, a8-a15 ad8-ad15, d8-d15 a8-a7 (output mode) ? ? output ? output output p 2 0 - p 2 7 i n p u t m o d e output mode, a0-a7/a16-a23 (output mode) ? ? output input output output p30 (/rd), p31 (/wr) output pin /rd,/wr(output mode) ? output output output p32(/hwr) p35(/busak, p36(r/w) input mode output mode /hwr,/busak r/w(output mode) ? ? output input output output p37 (ale) input mode output mode ale (output mode) ? ? "l" lev e l output input output "l" lev e l ou tput p 4 0 - p 4 3 i n p u t m o d e output mode /cs0-/cs2 (output mode) key24-key27 (input mode) ? ? output input input output output input p44 ?p47 input mode output mode ? ? input output p 5 0 - p 5 5 i n p u t m o d e output mode, a0-a5 (output mode) ? ? output input output p56, p57 input mode output mode a6, a7 (outp u t mode) key28, key29 (input mode) ? ? output input input output input p61, p64 input mode output mode a9, a12 (outpu t mode) inta, intb ( i n put mode) ? ? output input ? output input p60, p62, p63, p65-p67 input mode output mode, a8 , a1 0 , a11 , a13 - a1 5 (output mod e ) ? ? output ? output p 7 0 - 7 3 i n p u t m o d e ? ? p 7 4 - 7 7 i n p u t m o d e key00-key03 (input mode) input input ? input p 8 0 - p 8 3 i n p u t m o d e key04-key07 (input mode) input input ? input p 8 4 - p 8 7 i n p u t m o d e int6-int9 (inp u t mode) input input ? input p 9 i n p u t m o d e output mode ? ? input output p a 0 - p a 5 i n p u t m o d e output mode int0-int5 (inp u t mode) ? ? input input output input pa6, pa7 input mode output mode ? ? input output p b 0 - p b 7 i n p u t m o d e output mode ? ? input output p c 0 i n p u t m o d e output mode key30 (input m ode) ? ? input input output input p c 1 - p c 7 i n p u t m o d e output mode ? ? input output tmp19a43 (rev2.0) 5-16 clock/s t andby control
tmp19a43 pin na me input /out put = 0 < d r v e > = 1 p d 0 - p d 5 i n p u t m o d e output mode ? ? input output p d 6 i n p u t m o d e output mode key30 (input m ode) ? ? input input output input p e 0 - p e 7 i n p u t m o d e output mode key08-key15 (input mode) ? ? input input output input p f 0 - p f 7 i n p u t m o d e output mode key16-key23 (input mode) ? ? input input output input pg, ph input mode output mode ? ? input output reset input pin input input t e s t i n p u t p i n i n p u t i n p u t x 1 i n p u t p i n ? ? x2 output pin "h" leve l output "h" level output x t 1 i n p u t p i n ? ? xt2 output pin "h" leve l output "h" level output ? : in di cat es t h at t h e i n put i s di sa bl ed fo r t h e i n p u t m ode an d t h e i n p u t pi n an d t h e i m pedance becom e s hi g h fo r t h e o u t p ut m ode and t h e out put pi n . n o t e t h at t h e i n put i s e n a b l e d whe n t h e po rt fu nct i o n re gi st er (p xfc) is "1" a n d the p o rt c o n t rol re gister (p xcr) is " 0 ." inpu t : th e inpu t g a te is activ e. t o prev en t th e i n put p i n fr om fl oat i ng, fi x t h e i n put v o l t a ge t o t h e "l" or "h" lev e l. ou t p u t : th e p i n is in t h e ou tpu t state. pu * : th is is th e p r og ramm ab le p u l l-up p i n. th e in pu t g a te is al w a ys d i sab l ed . no f e ed thr oug h cu rr en t f l ow s even if t h e high im pedance is selected. tmp19a43 (rev2.0) 5-17 clock/s t andby control
tmp19a43 tmp19a43 (rev2.0) 5-18 clock/s t andby control ( n ote) 1 9 a43 r eq ui re s a r ec ov er y t im e fr om wa rm in g up st at e as f oll ow i ng sle ep m o de ( f s ) no rm al m ode ( f c / g ear) i d l e m ode reset res e t r e l e a s e so f t w a r e in te r r u p t s t o p m ode so f t w a r e so f t w a r in te r r u p t (cpu s t op) (s e l ect i ve i/o ) int e rr upt s l o w m o de (fs ) in te r r u p t so f t w a r soft w a r i n terrup t so f t al l s t oped a b c d e f g h st ate t r ansit i on d i agr a m wu p tr ig ge r st at e tr an si ti on r u n n i n g m ode a ft er w up m i n i m u m r equ ir ed o pe rat io n ti me b e f o r e w a it in st ru ct ion d on e ( sec ) a st op /s le ep 64 / fsy s i n no ma l mo de stop release b st op /s le ep 16 / fsy s i n sl ow mod e c st op /s le ep 64 / fsy s i n no ma l mo de sleep release d st op /s le ep - wu p tr ig ge r st at e t r a n s i t i on m i n i m u m r equ ir ed o pe rat io n ti me b e f o r e w a it in st ru ct ion d on e ( sec ) e st op 16 / f s i n no mal mode so ft wa re re le as e f sl ee p 16 x f s in nom al m ode
tmp19a43 tmp19a43 (rev2.0) 6-1 exceptions/interrupts 6. exceptions/interrupts 6.1 overview the tmp19a43 device is configured with the following 50 maskable interrupt factors and 15 exceptions including nmi. in this section, general exceptions and debug exceptions are described simply as "exceptions" and interrupts are described as "interrupts." ? general exceptions reset exception non-maskable interrupt (nmi) address error exception (instruction fetch) address error exception (load/store) bus error exception (instruction fetch) bus error excep tion (data access) co-processor unusable exception reserved instruction exception integer overflow exception trap exception system call exception breakpoint exception ? debug exception single step exception debug breakpoint exception ? interrupts maskable software interrupts (2 factors) maskable hardware interrupts: 46 internal fact ors and 48 external factors (int0 - f, key00 - 31) the tmp19a43 device not only processes interrupt requests from internal hardware peripherals and external inputs but also forces transition to exception handling processes as a means of notifying any error status generated in normal instruction sequences. by using the register bank called "shadow register set" newly implemented in the tx19a processor core, it is now unnecessary to save the general purpose register (gpr) contents elsewhere upon interrupt response thus leading to very fast interrupt response. the device is capable of handling multiple interrupts accord ing to seven programmable interrupt levels (priority orders). also, it can mask interrupt requests with a priority level the same or lower than a specified mask level.
tmp19a43 tmp19a43 (rev2.0) 6-2 exceptions/interrupts 6.2 exception vector the starting address of an exception handler is defined to be "exception vector address." the exception vector address for a reset exceptio n and non-maskable interrupts is 0xbfc0_0000. the exception vector address for a debug exception can be either 0xbfc0_0480 (ejtag proben = 0) or 0xff20_0200 (ejtag proben = 1) depending on the internal signal . for other exceptions, the corresponding exception vector addresses are determined depending on the values of status and cause of the system control coprocessor register (cp0). table 6.21 exception vector table (virtual address) exception bev=0 bev=1 reset, nmi 0xbfc0_0000 0xbfc0_0000 debug exceptions (en=0) 0xbfc0_0480 0xbfc0_0480 debug exceptions (en=1) 0xff20_0200 0xff20_0200 interrupts (iv=0) 0x8000_0180 0xbfc0_0380 interrupts (iv=1) 0x8000_0200 0xbfc0_0400 others general exceptions 0x8000_0180 0xbfc0_0380 (note 1) if exception vector addresses are to be placed in internal rom, set the status bit of the system control coprocessor register (cp0) to "1." 6.3 reset exception a reset exception is generated by either setting the ex ternal reset pin to "l" or counting the wdt beyond a "reset" count. when a reset exception is generated, pe ripheral hardware registers and the cp0 register are initialized and it jumps to the exception vector address 0xbfc0_0000. the pc value of reset exception generation will be stored in errorepc of the cp0 register. since a reset exception causes to set the status bit of the cp0 register to "1" disabling interrupt requests, the status bit must be cleared to "0" in a start up routine (reset exception handler) or by any other means if interrupts are to be used. refer to the section "exception handling, reset exceptio n" of the separate volume "tx19a core architecture" for detailed operation upon generation of reset exception.
tmp19a43 tmp19a43 (rev2.0) 6-3 exceptions/interrupts 6.4 non-maskable interrupt (nmi) an nmi interrupt is generated when wdt is counted to an nmi set count or when a bus error area is accessed by store access including dma transfer. when an nmi interrupt is generated, the status bits and of the cp0 register are set to "1" and it jump s to the exception vector address 0xbfc0_0000. the pc value of nmi generation will be stored in errorepc of the cp0 register. note that any nmi due to a bus error upon a store instruction causes an exception that is not synchroni zed with instruction sequence. therefore, the pc value of an instruction being executed at the time of error generation will be stored instead of the pc value for the instruction that actually caused the error. upon nmi generation, when the shadow register set is enabled, sscr will be overwritten by the value of sscr but the register bank will not be switched because the value of sscr is not updated. the reason why only the sscr value is updated is because it is necessary to prevent the regi ster bank from being changed when sscr is overwritten by the value of sscr due to an eret instruction executed upon returning from nmi. the cause of nmi generation can be determined by nmiflg and of cg. (refer to the section 6.10, nmi flag register reference.) refer to the section "exception handling, non-maskable interruptions" of the separate volume "tx19a core architecture" for detailed operation upon generation of nmi. 6.5 general exceptions (other than reset exception and nmi) a general exception will be generated when a specific in struction such as syscall is executed or when any abnormalities such as an illegal instruction fetch is detected. when a general exception is generated and if status of the cp0 register is "1," it jumps to the ex ception vector address 0xbfc0_ 380. the cause of a general exception can be determined by cause of the cp0 register. the pc value at a general exception will be stored in epc of the cp0 register. note that any bus error exception (data access) is not synchronized with instruction sequence so the pc value of an instruction being executed at the time of error generation will be stored instead of the pc value for the instruction that actually caused the error. upon a general exception, when the shadow regi ster set is enabled, sscr will be overwritten by the value of sscr but the register bank will not be switched because the value of sscr is not updated. the reason why only the ssc r value is updated is becaus e it is necessary to prevent the register bank from being changed when sscr is overwritten by the value of sscr due to an eret instruction executed upon returning from the exception. any illegal address that caused an address error exce ption (instruction fetch or load/store) or bus error (instruction fetch/data access) will be stored in badvad dr of the cp0 register. refer to the corresponding sections of "exception handlin g" of the separate volume "tx19a core architecture" for detailed operation upon generation of general exceptions. (note 1) address error exceptions (load/store) will not be generated in dms transfer operations. in dma transfer, address errors can be detected as configuration errors (csrx of dmac). (note 2) bus errors (data access) may be generated either by load instructions or by load accesses of dma transfer operations.
tmp19a43 tmp19a43 (rev2.0) 6-4 exceptions/interrupts fig. 6-1 example sequence of general exceptions (other than reset exception and nmi) (note 1) since general exceptions (other than reset exception/nmi and excluding trap exceptions, system call exceptions, and breakpoint exceptions ) indicate some sort of abnormal conditions, the system tends to be reset. (note 2) upon generation of a general exception other than reset exception/nmi, excluding bus error exceptions (instruction fetch/data access), the pc that caused the exception will be stored in epc. therefore, returning the system by si mply using eret may cause the same exception again. read cause to determine the factor of generation jump to exception handling return necessary registers eret return to exception generation address read table for the address of exception handling if necessary processes of tx19a core processes of user software automatically jump to exception vector address exception handling (note 1) save registers as necessary
tmp19a43 tmp19a43 (rev2.0) 6-5 exceptions/interrupts 6.6 debug exceptions single step exceptions and debug breakpoint exceptions are the types of debug exceptions. these types of exceptions are seldom used in user programs. also note that enabling the shadow register set will not be effective in debug exceptions. refer to the section "exception handling, debug exception" of the separate volume "tx19a core architecture" for detailed operation upon generation of debug exceptions. 6.7 maskable software interrupts two-factor maskable software interrupts (hereinafter referred to simply as "software interrupts") can be generated by individually setting "1" to the cause bits of the cp0 register. software interrupts can be accepted in no less than three clocks after setting values to the cause bits of the cp0 register. in order for a software interrupt reques t to be accepted, it is necessary regarding the cp0 register that its status is set to "1" and status is cleared to "0" while status is "1." also, software interrupts can be individually masked by setting status of the cp0 register to "0." if software and hardware interrupts coincide, the hardware interrupt overrides the software interrupt. upon software interrupts, when the shadow register set is enabled, sscr will be overwritten by the value of sscr but the register bank will not be switched because the value of sscr is not updated. the reason why only the ssc r value is updated is becaus e it is necessary to prevent the register bank from being changed when sscr is overwritten by the value of sscr due to an eret instruction executed upon returning from the softwa re interrupt. software in terrupts are processed in a process flow such as shown in fig. 6-2. (note 1) please read out the data in ivr after a software in terrupt is generated. to read out the data is a trigger to notify the core of a hardware interrupt. (note 2) the "software interrupt," which is a maskable interrupt, can be generated by setting ip [1:0] of the cause register of cp0. this "software interr upt" is different from th e "software set," which is one of the hardware interrupt factors. the "software set" interrupt is generated by setting of the imc0 register in the interrupt controller (intc) to any value other than "0."
tmp19a43 tmp19a43 (rev2.0) 6-6 exceptions/interrupts fig. 6-2 example of software interrupt operation (note 1) a software interrupt is accepted in no less than th ree clocks after the instruction that enabled the interrupt and the pc at the time of acceptance is stored in epc. processes of tx19a core processes of user software processes of user software automatically jump to exception vector address read cause to determi ne the factor of generation jump to interrupt handler interrupt processing return necessary registers eret instruction return to interrupt generation address save registers as necessary set cause =1 to generate interrupt set cause = 0 to clear interrupt
tmp19a43 tmp19a43 (rev2.0) 6-7 exceptions/interrupts 6.8 maskable hardware interrupts 6.8.1 features the maskable hardware interrupts (h ereinafter referred to as "hardware interrupts") are 64 factor interrupt requests for which the interrupt controller (intc) can individually assign an interrupt level out of seven interrupt (priority) levels. in order for a hardware interrupt request to be accepted , it is necessary regarding the cp0 register that its status is set to "1" and status is cleared to "0" while status is set to "1." if more than one interrupts are generated at the sa me time, the hardware interrupts are accepted in accordance with the priority or der of the interrupt levels. if more th an one interrupts of a same interrupt level are generated at the same time, these interrupt s are accepted in the order of the interrupt number as listed in table 6.8.1. when an interrupt request is accepted, the status bit of the cp0 register is set to "1," further interrupts are disabled, and ilev of intc is automatically updated to the interrupt level set for the interrupt request. note that status of the cp 0 register remains set to "1" in interrupt response operations. in processing hardware interrupts, each interrupt level is associated w ith a register bank called a "shadow register set." when an interrupt reque st is accepted, the register bank is switched to the register bank of which number is the same as with the corresponding interrupt level. through this mechanism, it is unnecessary for the user program to save the general purpose register (gpr) contents elsewhere upon interrupt response thus ensuring fast interrupt response. cp0 register sscr=0) for accepting multiple interrupts, status of th e cp0 register is cleared to "0" to permit further interrupts. in this, because ilev of intc has been updated to the interrupt level set for the interrupt request already accepted, only further interrupts of which level is higher than the present interrupt level can be accepted. refer to section 6.8.7 "example of multiple interrupt setting" for more details of multiple interrupts. also, by appropriately setting the ilev register of intc, you can mask interrupt requests of which interrupt level is lower than a programmed mask level. any interrupt request can be used as a tr igger to start a dma transfer sequence. while detailed operation of hardware interrupts is provided below, please also refer to the section "exception handling, maskable interrupts (interrupts)" of the separate volume "tx19a core architecture" for more details. fig. 6-3 interrupt notification diagram tx19a core intc cg interrupts to clear standby other interrupts notification response
tmp19a43 tmp19a43 (rev2.0) 6-8 exceptions/interrupts table 6.8.1 list of hardware interrupt factors interrupt number ivr[7:0] interrupt factor interrupt control register address 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 0x000 0x004 0x008 0x00c 0x010 0x014 0x018 0x01c 0x020 0x024 0x028 0x02c 0x030 0x034 0x038 0x03c 0x040 0x044 0x048 0x04c 0x050 0x054 0x058 0x05c 0x060 0x064 0x068 0x06c 0x070 0x074 0x078 0x07c 0x080 0x084 0x088 0x08c 0x090 0x094 0x098 0x09c 0x0a0 0x0a4 0x0a8 0x0ac 0x0b0 0x0b4 0x0b8 0x0bc 0x0c0 0x0c4 0x0c8 0x0cc 0x0d0 0x0d4 0x0d8 0x0dc 0x0e0 0x0e4 0x0e8 0x0ec 0x0f0 0x0f4 0x0f8 0x0fc software set int0 pin int1 pin int2 pin int3 pin int4 pin int5 pin int6 pin int7 pin int8 pin int9 pin inta pin intb pin intc pin intd pin inte pin intf pin kwup intrx0 : serial receive (channel.0) inttx0 : serial transmit (channel.0) intrx1 : serial receive (channel.1) inttx1 : serial transmit (channel.1) intrx2 : serial receive (channel.2) inttx2 : serial transmit (channel.2) hintrx0 : high speed serial receive (hchannel.0) hinttx0 : high speed serial transmit (hchannel.0) hintrx1 : high speed serial receive (hchannel.1) hinttx1 : high speed serial transmit (hchannel.1) hintrx2 : high speed serial receive (hchannel.2) hinttx2 : high speed serial transmit (hchannel.2) ints0 : serial bus interface 0 intadhp : highest priority adc complete interrupt intadm : adc monitor function interrupt inttb0 : 16-bit timer 0 inttb1 : 16-bit timer 1 inttb2 : 16-bit timer 2 inttb3 : 16-bit timer 3 inttb4 : 16-bit timer 4 inttb5 : 16-bit timer 5 inttb6 : 16-bit timer 6 inttb7 : 16-bit timer 7 inttb8 : 16-bit timer 8 inttb9 : 16-bit timer 9 inttba : 16-bit timer a inttbb : 16-bit timer b inttbc : 16-bit timer c inttbd : 16-bit timer d inttbe : 16-bit timer e inttbf : 16-bit timer f intcapg0 : input capture group 0 reserved intcmp0 : compare interrupt 0 intcmp1 : compare interrupt 1 intcmp2 : compare interrupt 2 intcmp3 : compare interrupt 3 intcmp4 : compare interrupt 4 intcmp5 : compare interrupt 5 intcmp6 : compare interrupt 6 intcmp7 : compare interrupt 7 inttbt : overflow interrupt intrtc : clock timer interrupt intad : adc completed intdma0 : completion of dma transfer (channel.0) intdma1 : completion of dma transfer (channel.1) imc0 imc1 imc2 imc3 imc4 imc5 imc6 imc7 imc8 imc9 imca imcb imcc imcd imce imcf 0xffff_e000 0xffff_e004 0xffff_e008 0xffff_e00c 0xffff_e010 0xffff_e014 0xffff_e018 0xffff_e01c 0xffff_e020 0xffff_e024 0xffff_e028 0xffff_e02c 0xffff_e030 0xffff_e034 0xffff_e038 0xffff_e03c
tmp19a43 tmp19a43 (rev2.0) 6-9 exceptions/interrupts (note 1) while imcxx is a 32 bit register, 8 bit/16 bit access is also accepted. (note 2) each factor can clear the idle mode. table 6.8.2 interrupt factors to cancel stop/sleep modes number interrupt factor note 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 int0 int1 int2 int3 int4 int5 int6 int7 int8 int9 inta intb kwup intrtc inttb2 inttb3 external interrupt 0 external interrupt 1 external interrupt 2 external interrupt 3 external interrupt 4 external interrupt 5 external interrupt 6 external interrupt 7 external interrupt 8 external interrupt 9 external interrupt a external interrupt b key on wake up interrupt clock timer interrupt two-phase pulse input counter interrupt 2 two-phase pulse input counter interrupt 3 * number 0 to 12 interrupt factors can cancel stop, sleep, and idle modes. * number 13 to 15 interrupt factors can cancel the sleep mode.
tmp19a43 tmp19a43 (rev2.0) 6-10 exceptions/interrupts 6.8.2 detecting interrupt requests each of interrupt factors has its own interrupt detectio n sequence as described in table 6.8. upon detection, an interrupt request is notified to intc for priority arbitration and then notified to the tx19a processor core. refer to table 6.8 for the detection level available for each interrupt factor. table 6.8.3 location of interrupt request detection interrupt detected by interrupt notification route cg port cg (detection) intc (arbitration) tx19a core (1) interrupts from external pins int0 - intb intc port intc (detection/arbitration) tx19a core (2) interrupts from external pins intc - intf intc port intc (detection/arbitration) tx19a core cg port cg (detection) intc (arbitration) tx19a core (3) key on wakeup interrupt kwup00-31 intc port intc (detection/arbitration) tx19a core (4) rtc interrupt rtc cg port cg (detection) intc (arbitration) tx19a core (5) other interrupts intc peripheral circuit intc (detection/arbitration) tx19a core 6.8.3 interrupt priority arbitration 1. seven levels of interrupt priority each of interrupt factors can be individually set to one of the seven interrupt priority levels by intc. the interrupt level to be applied is set by imcxx of intc. the higher the interrupt level set, the higher the priority. if the value is set to "000" meaning interrupt level of 0, no interrupts will be generated by the factor. also note that any factors of interrupt level 0 are not suspended. 2. interrupt level notification when an interrupt request is generated, intc compar es the interrupt level with the mask level. if the interrupt level is higher than the mask level set in ilev , it notifies the tx19a processor of the interrupt request. if more than one interrupts are generated at the same time, the interrupts are notified in accordance with the priority order of these interrupt levels. if more than one interrupts of a same interrupt level are generated at the same time, these interrupts are notif ied in the order of the interrupt number as listed in table 6.8.1. when an interrupt request of the same interrupt factor is received again before the previous interrupt has been cleared, only the first interrupt can be accepted. 3. intc register update when an interrupt request is accepte d by the tx19a core, the highest in terrupt level at that point in time will be set to ilev and the correspon ding vector value is set to ivr. once cmask and ivr are set, any interrupt with a higher interrupt level cannot update them or cause notification to the core until the ivr value is read. (note 1) so, be sure to read the ivr value before atte mpting to change the ilev value. if the ilev value is changed before reading ivr, an unexpected interrupt request may be generated.
tmp19a43 tmp19a43 (rev2.0) 6-11 exceptions/interrupts 6.8.4 hardware interrupt operation when a hardware interrupt is generated, the tx19a core will go through the following steps to jump to the corresponding exception vector address as given in table 6.21 according to the status and cause bits of the cp0 register. (1) sets status of cp0 register to "1." (2) sets the pc value at the interrupt generation to epc of the cp0 register. (3) if the shadow register set is enabled (cp0 register sscr = 0), sscr of the cp0 register will be updated and it switches to the re gister bank of the same interrupt level number. (4) the values of ilev of intc will be updated and the mask level is set to the interrupt level of the interrupt request accepted. (5) sets ivr [7:0] to the corresponding value listed in table 6.8.1.
tmp19a43 tmp19a43 (rev2.0) 6-12 exceptions/interrupts fig. 6.8.4 basic operation of hardware interrupts (example) (note 1) by using the shadow register set (setting cp 0 register sscr = 0), most of general purpose register contents can be automatically saved in tx19a core. processes of tx19a core processes of user software clear interrupt factor by intclr automatically jump to the exception vector address after interrupt generation read ivr to generate interrupt vector address read interrupt handler address from interrupt vector jump to interrupt handler interrupt processing return necessary registers (note 1) eret instruction return the mask level by setting ilev = 0 save necessary registers (note 1) return to interrupt generation address
tmp19a43 tmp19a43 (rev2.0) 6-13 exceptions/interrupts 6.8.5 initialization for interrupts before using interrupts, it is necessary to appropriatel y configure them. necessary settings that have to be made regardless of the interrupt factors are descri bed in section 6.8.5.1 "common initialization" and settings specifically required for certain factors and applications are described in section 6.8.5.2 "initialization for individual interrupt factors." 6.8.5.1 common initialization in order to use interrupts, the following settings are necessary: (1) set status of cp0 register to "111." (2) set the base address of the interrupt vector table to ivr [31:8] of intc. (3) set the interrupt handler addresses for the respec tive interrupt factors to the addresses obtained as the sum of the base address of "the interrupt vect or table and the ivr [7:0] values corresponding to the respective interrupt factors." example of the above step (1): when the interrupt exception vector address 0xbfc00400 is used lui r2,0x1040 ; cu0=1, bev =1 (r2 =0x1040_xxxx) addiu r2,r2,0x1c00 ; im4,im3,im2 =1 (r2 =0x1040_1c00) mtc0 r2,r12 example of the above step (2): if vector table is used as the label of the interrupt vector table lui r3,hi(vectortable) addiu r3,r3,lo(vectortable) ; r3 = vectortable address lui r2,hi(ivr) ; r2 =0xffff_xxxx (upper 16 bits of ivr address) sw r3,lo(ivr)(r2) ; set address of vectortable to ivr[31:8] example of the above step (3): if the base address of interrupt vector is set to 0xbfc20000 _vectortable section code isa32 abs=0xbfc20000 vectortable: dw _swint ; 0 --- software interrupt dw _int0 ; 1 --- int0 dw _int1 ; 2 --- int1 dw _int2 ; 3 --- int2 dw _int3 ; 4 --- int3 dw _int4 ; 5 --- int4 dw _int5 ; 6 --- int5 dw _int6 ; 7 --- int6 dw _int7 ; 8 --- int7 (note 1) the above examples assume the use of asse mbler made by toshiba. if any third party assembler is used, it may generate syntax errors; you are advised to modify the above statements according to the assembler to be used.
tmp19a43 tmp19a43 (rev2.0) 6-14 exceptions/interrupts 6.8.5.2 initialization for individual interrupt factors the registers to be set in using different interrupt factors are as listed below: table 6.8.4 registers to be set for detecting interrupts interrupt registers to be set interrupt detection levels available (setting in active condition) pxfc(port) pxcr(port) imcxx(intc) with intc, "l" and "h" levels and falling and rising edges can be set. (1) interrupts from external pins int0 - intb pxfc(port) pxcr(port) imcgx(cg) imcxx(intc) if it is to be used for recovery from standby mode, set "l" and "h" levels and falling and rising edges for cg while intc must be set to "h." (2) interrupts from external pins intc - intf pxfc(port) pxcr(port) imcxx(intc) with intc, "l" and "h" levels and falling and rising edges can be set. pxfc(port) pxcr(port) imcxx(intc) with intc and kwup circuit, "l " and "h" levels and falling and rising edges can be set. (3) key on wakeup interrupt kwup00 - 31 pxfc(port) pxcr(port) imcgx(cg) imcxx(intc) if it is to be used for recovery from standby mode, it must be set to "h" with intc. with the kwup ci rcuit, "l" and "h" levels and falling/rising edges can be set. (4) intrtc interrupt pxfc(port) pxcr(port) imcgx(cg) imcxx(intc) set for rising edge with cg; it must be set to "h" with intc. (5) other interrupts imcxx(intc) with intc, "l" and "h" levels and falling/rising edges can be set. (note 1) in level detection, the value is checked at in ternal clock timing each time. edge detection is made by comparing the previous value with the current value at internal clock timing. in interrupt initialization, follow the order of the in terrupt detection route as indicated in table 6.8 before enabling the interrupts with the cp0 register. if any diff erent setting order is used, an unexpected interrupt may be generated. so, be sure to clear interrupt factor s before setting interrupt permission. similarly, if interrupts are to be disabled, first disable the interr upt by the cp0 register and then set the registers accordingly in the reverse order of interrupt detection. (1) interrupts from external pins (int0 to intb) ? use port pxcr to enable an input por t. (refer to 7. port function) ? use port pxfc to set pin functions to int0 - intb. (refer to 7. port function) ? use port pxpe to set pull-up connections as appropriate. (refer to 7. port function) ? use intc imcx to set active state. (r efer to 5.3.3 interrupt-related registers) ? use imcgx of cg for setting to enable/d isable clearing of standby modes. (refer to intcg registers, interrupts to clear stop, sleep, and idle) ? use intc imcx to set active state of internal interrupt signals to be notified from cg. if rising or falling edge is set with intc im cx , set it to falling edge (set imcx to "10"). for h/l level setting, set it to "l" level (set imcx to "00"). (refer to 6.8.8 registers.)
tmp19a43 tmp19a43 (rev2.0) 6-15 exceptions/interrupts ? an example setting when an external interrupt "int3" is used to clear stop by the falling edge: status = "0" ; interrupt is disabled pacr = "0" ; the port is set to an input port pafc ="0" ; the port is assigned to int3 imcga ="010" ; int3 is set to falling edge imcga ="1" ; int3 is set to clear standby mode eicrcg ="0011" ; clears the int3 standby clear request imc1 ="01" ; int3 is set to level detection intclr ="010" ; clear s the int3 interrupt request imc1 ="101" ; interrupt level of int3 is set to "5." ilev/ ="1"/"xxx" ; ma sk level is set to "xxx." (to be set simultaneously with ilev ) sync instruction ; stall until interrupt settings are enabled. status = "1" ; interrupt is enabled ? an example setting when an external interrupt "int3" is to be disabled: status = "0" ; interrupt is disabled imc1 = "000" ; int3 interrupt is disabled. intclr ="010" ; clear s the int3 interrupt request (2) interrupts from external pins (intc to intf) ? use port pxier to enable an input port. (refer to 7. port function) ? use port pxfr to set pin functions to in tc - intf. (refer to 7. port function) ? use intc imcx to set active state. (refer to 6.8.8 registers.) ? an example setting when an external interrupt "intf" is detected by the "h" level: status = "0" ; interrupt is disabled p5cr = "0" ; the port is set to an input port p5fc = "0" ; the port is set to an input port imc4 = "01" ; intf is set to "h" level intclr = "0x040" ; clears the intf interrupt request imc4 = "010" ; interrupt level of intf is set to "2." ilev/ = "1"/ "xxx" ; mask level is set to "xxx." (to be set simultaneously with ilev ) status = "1" ; interrupt is enabled
tmp19a43 tmp19a43 (rev2.0) 6-16 exceptions/interrupts (3) key on wakeup interrupt, kwup00 to 31 ? use port pxcr to enable the input por t. (refer to 7. port function) ? use port pxfc to set the pin function to key. (refer to 7. port function) ? use port pxpe to set pull-up connections as appropriate. (refer to 7. port function) ? use kwupstxx to enable key on wakeup. (refer to 20. key on wakeup circuit) ? set active state of key. (refer to 20. key on wakeup circuit.) ? use intc imcx to set active state. (r efer to 5.3.3 interrupt-related registers) ? use imcgx of cg for setting to enab le/disable clearing of standby. (refer to intcg registers, interrupts to clear stop, sleep, and idle) ? an example setting when key08 is used as an in put to clear stop (dynamic pull-up, falling edge): status = "0" ; interrupt is disabled pecr = "0" ; the port is set to work as an input port. pefc = "0" ; the port is set to key input. pepe = "1" ; pull-up is set to the port. kwupcnt = "0x24" ; the period of dynamic pull-up is set. (example: period; 10:1024/fs, duration: 01:4/fs) kwupst08 = "1" ; dy namic pull-up is set. kwupst08 = "010" ; it is set to falling edge. kwupst08 = "1" ; key input is enabled. kwupclr = "1010" ; key input factor is cleared. imcgd = "10" ; standby clear setting is set to "h" level imcgd = "1" ; kwup is set to clear standby mode. eicrcg = "1100" ; clear s kwup standby clear request imc4 = "01" ; kwup is set to h level. imc4 = "110" ; interrupt level of kwup is set to "6." ilev/ ="1"/"xxx" ; ma sk level is set to "xxx." (to be set simultaneously with ilev ) sync instruction ; stall until interrupt settings are enabled. status = "1" ; interrupt is enabled
tmp19a43 tmp19a43 (rev2.0) 6-17 exceptions/interrupts (4) other hardware interrupts ? settings are made to use peripheral hardware devices. ? set intc imcxx to "10." (refer to 6.8.8 registers.) (note 1) in interrupt initialization, set intc registers before enabling interrupts with the cp0 register. similarly, if interrupt is to be disabled, first disable interrupt by the cp0 register and then set intc. 6.8.5.3 interrupt enable in order for an interrupt request to be accepted, all the following parameters must be set to enable the interrupt in addition to the initial settings described in section 6.8.5 "initialization for interrupts." ? set status of the cp0 register to "0." ? set status of the cp0 register to "0." ? set status of the cp0 register to "1." by these settings, interrupt is enabled two clocks after execution of the instruction and the registers are set. note that one of the following methods may be used in setting status of the cp0 register to "1." ? set ier of the cp0 register to any value other than "0" using the mtc0 instruction (32 bit isa instruction). (note 1) ? execute the ei instruction of 16 bit isa. (note 2) (note 1) if toshiba c compiler is used, this is executed by the 32 bit isa instruction "_ _ei ( ) embedded function." (note 2) if toshiba c compiler is used, this instruction is executed by the 16 bit isa instruction "_ _ei ( ) embedded function." (note 3) the following different methods may also be used to set status of the cp0 register to "1." ? set status of the cp0 register to "1" using the mtc0 instruction of 32 bit isa. ? set status of the cp0 register to "1" using the mtc0 instruction of 16 bit isa.
tmp19a43 tmp19a43 (rev2.0) 6-18 exceptions/interrupts 6.8.5.4 interrupt disable to disable interrupts, either one of the following se tting procedures must be performed in addition to the settings described in section 6.8.5 "initialization for interrupts." when interrupts are disabled, any interrupt request will be suspended. also note that tmp19a43 doesn't suspend any interrupt factor that is set to interrupt level 0. ? set status of the cp0 register to "1." ? set status of the cp0 register to "1." ? set status of the cp0 register to "0." by these settings, interrupts are disabled immediately af ter execution of the instruction and the registers are set two clocks later. note that either of the followi ng methods may be used in setting status of the cp0 register to "0." ? set ier of the cp0 register to "0" using the mtc0 instruction of 32 bit isa. (note 1) ? execute the di instruction of 16-bit mode isa. (note 2) (note 1) if toshiba c compiler is used, this instruction is executed by the 32 bit isa instruction "_ _di ( ) embedded function." (note 2) if toshiba c compiler is used, this instruction is executed by the 16 bit isa instruction "_ _di ( ) embedded function." (note 3) the following different methods may also be used to set status of the cp0 register to "0." ? set status of the cp0 register to "0" using the mtc0 instruction of 32 bit isa. ? set status of the cp0 register to "0" using the mtc0 instruction of 16 bit isa.
tmp19a43 tmp19a43 (rev2.0) 6-19 exceptions/interrupts if the factors once enabled are to be individually disabled again after setting interrupt levels by imcx of intc, first set the status bits of the cp0 register to disable interrupts and then disable relevant factors individually. example statements to individua lly disable interrupt factors: mtc0 r0, ier ; interrupt is disabled (status = "0") sb r0, imcxx ; disable interrupt factors sync ; stall until it is write-enabled. mtc0 r29, ier ; interrupt is enabled (status = "1") (note 4) the above examples assume use of assembler made by toshiba. if any third party assembler is used, it may generate syntax errors; you are advised to modify the above statements according to the assembler to be used.
tmp19a43 tmp19a43 (rev2.0) 6-20 exceptions/interrupts 6.8.6 interrupt processing this section describes detailed operation of interrupt processing using the basic flow chart of fig. 6.8. 6.8.6.1 interrupt response and return c hardware processes to accept interrupts after interrupt request arbitration, intc sets the interr upt vector and interrupt level of the interrupt request accepted to ivr and ilev, respectively, to notify the tx19a processor core of the interrupt level. when the interrupt level is notified, the tx19a processor core sets status of the cp0 register to "1" to disable interrupts and saves the pc value at th e interrupt generation to epc. if the shadow register set is enabled (cp0 register sscr = 0), the processor core sets the interrupt level to sscr of the cp0 register and switches the register bank. when an interrupt is accepted, an y ongoing execution is suspended and it automatically jumps to the exception vector address (for interrupts). fig. 6-4 shows the sequence of accepting interrupts. fig. 6-4 hardware process flow to accept interrupts ? set 1 to cause ? set the pc of jump or branch instruction to epc ? set 0 to cause ? set pc to epc if cause =0, then set 0xbfc0_0380 to pc if cause = 1, then set 0xbfc0_0400 to pc set 0x00 to cause set status = 1 set interrupt level to sscr . yes interrupt detection branch delay within slot? no jump to exception vector address 1 compared to ilev , interrupt level is higher lower interrupt suspended status? 0 yes no the highest priority interrupt request? yes no both status and are 0?
tmp19a43 tmp19a43 (rev2.0) 6-21 exceptions/interrupts d processes to be performed by the exception handler after an interrupt request is accepted, it automatically jumps to the exception ha ndler where the interrupt vector address is read from intc ivr and the user program generates the address of the interrupt handler. as in the example statements presented in section 6.8. 5, "initialization for interrupts," the interrupt vector base address is set to ivr[31:8] so that the ivr value becomes the interrupt vector address. after reading the intc ivr value, the interrupt factor is cleared. if the interrupt factor is cleared before ivr is read, correct value cannot be read because the ivr value is also cleared. example exception handler statem ent: exception vector address (interrupt) is 0xbfc0_0400. vector_int section code isa32 abs=0xbfc00400 __interruptvector: lui r26,hi(ivr) lw r26,lo(ivr)(r26) ; read ivr for interrupt vector address lui r27,hi(intclr) sh r26,lo(intclr)(r27) ; interrupt request is cleared lw r26,0(r26) ; read interrupt handler address from interrupt vector jr r26 ; jump to interrupt handler nop (note 1) the above example assumes use of assembler made by toshiba. if any third party assembler is used, it may generate syntax errors; you are advised to modify the above statement according to the assembler to be used. e processes to be performed by the interrupt handler typical tasks of the interrupt handler are to save ap propriate registers and to process interrupts. if the shadow register set is enabled (cp0 register sscr = 0), the general purpose register values other than r26, r27, r28, and r29 (shadow register set number 1 to 7) are automatically saved so the user program doesn't have to save these. refer to the separate volume "tx19a core architecture" for details of general purpose registers that are to be automatically saved. in general, registers other than gpr are dependent on user programs. the status, epc, sscr, hi, lo, cause, and config values of the cp0 register shall be saved as appropriate. for using multiple interrupts, interr upts are enabled by clearing status of the cp0 register to "0" after appropriate saving processes. (note 1) note that general exceptions can be accepted even when interrupts are disabled. so, even when you don't use multiple interrupts, it is desirable to save any general purpose register and the cp0 register that could be overwritten by general exceptions.
tmp19a43 tmp19a43 (rev2.0) 6-22 exceptions/interrupts example interrupt handler settings to be necessary: save from sscr to stack ; save sscr values (as appropriate) nop instruction ; stall until sscr is switched nop instruction ; stall until sscr is switched save from epc to stack ; save epc values (as appropriate) save from status to stack ; save status values (as appropriate) nop instruction ; stall before executing eret instruction nop instruction ; stall before executing eret instruction status = "0" ; interrupt enable (only for multiple interrupts) (note 1) after overwriting sscr of the cp0 register, wait for two cycles to allow for register bank switching before attempting a register access. f returning from the interrupt handler for returning from the interrupt handler to the main process, return the register values saved at the top of the interrupt handler process and set "0" to intc il ev to clear the interrupt mask level. by executing the eret instruction after all the return tasks are completed, status of the cp0 register is cleared to "0" and the epc address returns to pc for th e main process to be resume d. if the shadow register set has been enabled (cp0 register sscr = 0), sscr is updated by the eret instruction and the shadow register set number is automatically decremented for automatically returning the general purpose registers saved in the register bank. if multiple interrupts are used, it is necessary to set status of th e cp0 register to "1" to disable interrupts prior to executing the return process. example settings to return from the interrupt hander: status = "1" ; interrupt disable (only for multiple interrupts) ilev = "0" ; decrement the mask level sync instruction ; stall until mask level is decremented return to sscr ; return sscr values saved (as appropriate) nop instruction ; stall until sscr is switched nop instruction ; stall until sscr is switched return to epc ; return sscr values saved (as appropriate) return to status ; return status values saved (as appropriate) nop instruction ; stall before executing eret instruction nop instruction ; stall before executing eret instruction eret instruction ; status = "0," epc to pc, sscr to sscr (note 1) after overwriting sscr of the cp0 register, wait for two cycles to allow for register bank switching before attempting a register access. (note 2) don't access the cp0 register two instructions prior to executing th e eret instruction.
tmp19a43 tmp19a43 (rev2.0) 6-23 exceptions/interrupts 6.8.7 example of multiple interrupt setting in "multiple interrupt" processing, a higher interrupt le vel interrupt is processed while an interrupt is being processed. with tmp19a43, multiple interrupts are pr ocessed through the interrupt priority arbitration function of intc. when an interrupt request is accepted, ilev of intc is automatically updated to the interrupt level of the interrupt accepted to enable arbitration to use the priority preset by the user program. c additional processes required for multiple interrupts when an interrupt is accepted, status of the cp0 register is set to "1" disabling furthe r interrupts. in order to allow multiple interrupts, it is necessary to save the registers that could be overwritten by the second and the following interrupts before enabling the multiple interrupt process. for this purpose, in addition to the typical exception handler and interrupt handler processes, save the following registers before setting status of the cp0 register to "0" to enable interrupts. cp0 registers that must be saved: ? epc ? sscr ? status (note 1) some of the registers may be automatically saved and returned by using some interrupt function of toshiba c compiler. refer to "tx19a c compiler reference" provided with the toshiba c compiler for more details. d additional return processes required for multiple interrupts before returning registers in the interrupt return proc ess, it is necessary to disable interrupts using the method described in section 6.8.5.4 "interrupt disable." this is to prevent the returned register values from being corrupted by multiple interrupts. note that the eret instruction automatically clears status of the cp0 register to "0." so, by setting status of the cp0 register to "1" to disable interrupts in the returning process, you can return from the interrupt with interrupts enabled automatically. e proper use of status and status while there is no significant distinction between th e status and status parameters, status is automatically set to "1" upon interrupt generation and cleared to "0" by the eret instruction automatically. in saving and returning register values at the initial and final phases of an interrupt process, where interrupts have to be disabled, hardware controlled status is normally used. status is used for other general interrupt enable/disable control functions. applicable interrupt enable/disable control sequences are described in section 6.8.7.1, "interrupt control for multiple interrupts." save the hi, lo, cause, and conf ig registers as appropriate.
tmp19a43 tmp19a43 (rev2.0) 6-24 exceptions/interrupts 6.8.7.1 interrupt control for multiple interrupts fig. 6-5 interrupt enable/disable control sequence for multiple interrupts c status = 1 interrupts can be enabled by setting status of the cp0 register to "1" while status is set to "0." this optional setting is made by the software program when it is necessary. d interrupt generation when an interrupt is generated, status of the cp0 register is set to "1" disabling further interrupts. this process is automatically performed by hardware. e status = 0 if multiple interrupts are to be enabled, it is necessary to set status of the cp0 register to "0" to enable interrupts after relevant registers are saved. if interrupts are enabled before saving registers, a higher priority level interrupt could corrupt the register data . this optional setting is made by the software program when it is necessary. f multiple interrupts enabled this is the period multiple interrupts are enabled. inte rrupts with a level higher than the present interrupt level (ilev ) are to be accepted. if it is de sired to disable interrupts during this period, set status of the cp0 register to "0." g status = 1 if multiple interrupts are enabled, it is necessary to se t status of the cp0 register to "1" to disable interrupts before returning relevant register values. if registers are saved before disabling interrupts, a higher priority level interrupt could corrupt the register data. this optional setting is made by the software program when it is necessary. h eret instruction this instruction returns the system to the state before th e interrupt generation. if this instruction is executed while status of the cp0 register is set to "1," the status will be automatically set to "0" and interrupt is enabled (provided that status of the cp0 register is set to "1"). i status=0 interrupts can be disabled by setting status of the cp0 register to "0." this optional setting is made by the software program when it is necessary.
tmp19a43 tmp19a43 (rev2.0) 6-25 exceptions/interrupts 6.8.8 registers 6.8.8.1 register map table 6.8.5 intc register map address register symbol register corresponding interrupt number 0xffff_e000 imc0 interrupt mode control register 00 0 to 3 0xffff_e004 imc1 interrupt mode control register 04 4 to 7 0xffff_e008 imc2 interrupt mode control register 08 8 to 11 0xffff_e00c imc3 interrupt mode control register 12 12 to 15 0xffff_e010 imc4 interrupt mode control register 16 16 to 19 0xffff_e014 imc5 interrupt mode control register 20 20 to 23 0xffff_e018 imc6 interrupt mode control register 24 24 to 27 0xffff_e01c imc7 interrupt mode control register 28 28 to 31 0xffff_e020 imc8 interrupt mode control register 32 32 to 35 0xffff_e024 imc9 interrupt mode control register 36 36 to 39 0xffff_e028 imca interrupt mode control register 40 40 to 43 0xffff_e02c imcb interrupt mode control register 44 44 to 47 0xffff_e030 imcc interrupt mode control register 48 48 to 51 0xffff_e034 imcd interrupt mode control register 52 52 to 55 0xffff_e038 imce interrupt mode control register 56 56 to 9 0xffff_e03c imcf interrupt mode control register 60 60 to 63 0xffff_e040 ivr interrupt vector register 0xffff_e060 intclr interrupt request clear register 0xffff_e10c ilev interrupt mask level register (note 1) while the interrupt mode control register (imcxx) is a 32 bit register, 8 bit/16 bit access is also accepted.
tmp19a43 tmp19a43 (rev2.0) 6-26 exceptions/interrupts 6.8.8.2 interrupt vector registers (ivr) for an interrupt generated, the ivr register indicates the interrupt vector address of the corresponding interrupt factor. when an interrupt request is accep ted, the corresponding value as listed in table 6.8.1 is set to ivr [7:0]. by setting the base address of interrupt vectors to ivr [3 1:8], a read/write register, simply reading the ivr value can provide the corresponding interrupt vector address. table 6.8.6 interrupt vector register 7 6 5 4 3 2 1 0 ivr bit symbol ivr7 ivr6 ivr5 ivr4 ivr3 ivr2 ivr1 ivr0 (0xffff_e040) read/write r after reset 0 0 0 0 0 0 0 0 function the vector of the interrupt facto r generated is set. always reads "0." 15 14 13 12 11 10 9 8 bit symbol ivr15 ivr14 ivr13 ivr12 ivr11 ivr10 ivr9 ivr8 read/write r/w r after reset 0 0 0 0 0 0 0 0 function 23 22 21 20 19 18 17 16 bit symbol ivr23 ivr22 ivr21 ivr20 ivr19 ivr18 ivr17 ivr16 read/write r/w after reset 0 0 0 0 0 0 0 0 function 31 30 29 28 27 26 25 24 bit symbol ivr31 ivr30 ivr29 ivr28 ivr27 ivr26 ivr25 ivr24 read/write r/w after reset 0 0 0 0 0 0 0 0 function
tmp19a43 tmp19a43 (rev2.0) 6-27 exceptions/interrupts 6.8.8.3 interrupt level register (ilev) ilev is the register to control the interrupt level to be used by intc in notifying interrupt requests to the tx19a processor core. interrupts with interrupt levels not higher than ilev are suspended. the interrupt priority level "7" is the highest priority and "1" the lowest. note that any interrupt with interrupt level 0 is not suspended. when a new interrupt is generated, the correspond ing interrupt level is stored in and any previously stored values are incremented in mask levels such that the previous cmask is saved in pmask0 and pmask0 is saved in pmask1 and so on . for writing a new value to , set "1" to and write simultaneously. writing a new value to cannot be made. when |