Part Number Hot Search : 
AT27C 0800348 12C5204 SR510 7156B FX003QZS 1620C B8262
Product Description
Full Text Search
 

To Download ELANSC520 Datasheet File

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


  Datasheet File OCR Text:
  lan ? sc520 microcontroller register set manual order #22005b
? 2001 advanced micro devices, inc. all rights reserved. the contents of this document are provided in connection with advanced micro devices, inc. ("amd") products. amd makes no repr esentations or warranties with respect to the accuracy or completeness of the contents of this publication and reserves the right to make c hanges to speci- fications and product descriptions at any time without notice. no license, whether express, implied, arising by estoppel or oth erwise, to any in- tellectual property rights is granted by this publication. except as set forth in amd's standard terms and conditions of sale, amd assumes no liability whatsoever, and disclaims any express or implied warranty, relating to its products including, but not limited to, th e implied warranty of merchantability, fitness for a particular purpose, or infringement of any intellectual property right. amd's products are not designed, intended, authorized or warranted for use as components in systems intended for surgical impla nt into the body, or in other applications intended to support or sustain life, or in any other application in which the failure of amd's p roduct could create a situation where personal injury, death, or severe property or environmental damage may occur. amd reserves the right to discont inue or make changes to its products at any time without notice. trademarks amd, the amd logo, and combinations thereof, amdebug , e86, and lan are trademarks, am486 and am5 x 86 are registered trademarks, and fusione86 is a service mark of advanced micro devices, inc. product names used in this publication are for identification purposes only and may be trademarks of their respective companies .
lan?sc520 microcontroller register set manual iii if you have questions, were here to help you. the amd customer service network includes u.s. offices, international offices, and a customer training center. expert technical assistance is available from the amd worldwide staff of field application engineers and factory support staff to answer e86? family hardware and software development questions. frequently accessed numbers are listed below. additional contact information is listed on the back of this manual. amds www site lists the latest phone numbers. technical support answers to technical questions are available online, through e-mail, and by telephone. go to amds home page at www.amd.com and follow the support link for the latest amd technical support phone numbers, software, and frequently asked questions. for technical support questions on all e86 products, send e-mail to epd.support@amd.com (in the us and canada) or euro.tech@amd.com (in europe and the uk). you can also call the amd corporate applications hotline at: (800) 222-9323 toll-free for u.s. and canada 44-(0) 1276-803-299 u.k. and europe hotline www support for specific information on e86 products, access the amd home page at www.amd.com and follow the embedded processors link. these pages provide information on upcoming product releases, overviews of existing products, information on product support and tools, and a list of technical documentation. support tools include online benchmarking tools and codekit softwaretested source code example applications. many of the technical documents are available online in pdf form. questions, requests, and input concerning amds www pages can be sent via e-mail to web.feedb ack@amd.com . documentation and literature support data books, users manuals, data sheets, application notes, and product cds are free with a simple phone call. internationally, contact your local amd sales office for product literature. to order literature, go to www.amd.com/support/literature.html or, in the u.s. and canada, call (800) 222-9323. third-party support amd fusione86 sm partners provide an array of products designed to meet critical time-to-market needs. products and solutions available include emulators, hardware and software debuggers, board-level products, and software development tools, among others. the www site and the e86? family products development tools cd , order #21058, describe these solutions. in addition, mature development tools and applications for the x86 platform are widely available in the general marketplace.
iv lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual v table of contents preface introduction xv lan?sc520 microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xv purpose of this manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xv intended audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xv overview of this manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xv related documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi amd documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi additional information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii documentation conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii chapter 1 configuration register overview 1-1 1.1 memory-mapped configuration region (mmcr) registers. . . . . . . . . . . . 1-1 1.2 direct-mapped i/o registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 1.3 pci host bridge indexed configuration registers . . . . . . . . . . . . . . . . . . 1-10 1.4 rtc and cmos ram indexed registers. . . . . . . . . . . . . . . . . . . . . . . . . 1-11 chapter 2 system address mapping registers 2-1 2.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 2.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 address decode control (adddecctl) . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 write-protect violation status (wpvsta) . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 programmable address region 0 (par0) . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 1 (par1) . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 2 (par2) . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 3 (par3) . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 4 (par4) . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 5 (par5) . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 6 (par6) . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 7 (par7) . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 8 (par8) . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 9 (par9) . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 10 (par10) . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 11 (par11) . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 12 (par12) . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 13 (par13) . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 14 (par14) . . . . . . . . . . . . . . . . . . . . . . . 2-5 programmable address region 15 (par15) . . . . . . . . . . . . . . . . . . . . . . . 2-5 configuration base address (cbar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 chapter 3 reset generation registers 3-1 3.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 3.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 system board information (sysinfo). . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 reset configuration (rescfg) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 reset status (ressta) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5 scp data port (scpdata). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7 scp command port (scpcmd) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 system control port a (sysctla) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
table of contents vi lan?sc520 microcontroller register set manual chapter 4 am5 x 86 ? cpu registers 4-1 4.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 4.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 lan?sc520 microcontroller revision id (revid) . . . . . . . . . . . . . . . . . . 4-2 am5 x 86? cpu control (cpuctl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 chapter 5 system arbitration registers 5-1 5.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 5.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 system arbiter control (sysarbctl) . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 pci bus arbiter status (pciarbsta) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 system arbiter master enable (sysarbmenb) . . . . . . . . . . . . . . . . . . . . 5-4 arbiter priority control (arbprictl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 chapter 6 pci bus host bridge registers 6-1 6.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 6.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 host bridge control (hbctl). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 host bridge target interrupt control (hbtgtirqctl) . . . . . . . . . . . . . . . 6-5 host bridge target interrupt status (hbtgtirqsta) . . . . . . . . . . . . . . . . 6-7 host bridge master interrupt control (hbmstirqctl) . . . . . . . . . . . . . . 6-9 host bridge master interrupt status (hbmstirqsta) . . . . . . . . . . . . . . 6-12 host bridge master interrupt address (mstintadd) . . . . . . . . . . . . . . . 6-14 pci configuration address (pcicfgadr) . . . . . . . . . . . . . . . . . . . . . . . 6-15 pci configuration data (pcicfgdata) . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17 device/vendor id (pcidevid) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18 status/command (pcistacmd) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19 class code/revision id (pciccrevid) . . . . . . . . . . . . . . . . . . . . . . . . . 6-22 header type (pciheadtype) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23 master retry time-out (pcimretryto) . . . . . . . . . . . . . . . . . . . . . . . . 6-24 chapter 7 sdram controller registers 7-1 7.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 7.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 sdram control (drcctl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 sdram timing control (drctmctl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4 sdram bank configuration (drccfg) . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 sdram bank 0C3 ending address (drcbendadr) . . . . . . . . . . . . . . . . 7-7 ecc control (eccctl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9 ecc status (eccsta) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10 ecc check bit position (eccckbpos) . . . . . . . . . . . . . . . . . . . . . . . . . 7-11 ecc check code test (ecccktest) . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12 ecc single-bit error address (eccsbadd) . . . . . . . . . . . . . . . . . . . . . . 7-14 ecc multi-bit error address (eccmbadd). . . . . . . . . . . . . . . . . . . . . . . 7-15 chapter 8 write buffer and read buffer register 8-1 8.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1 8.2 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1 sdram buffer control (dbctl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2 chapter 9 rom/flash controller registers 9-1 9.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 9.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 bootcs control (bootcsctl). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2 romcs1 control (romcs1ctl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4 romcs2 control (romcs2ctl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6
table of contents lan?sc520 microcontroller register set manual vii chapter 10 general-purpose bus controller registers 10-1 10.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1 10.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1 gp echo mode (gpecho) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 gp chip select data width (gpcsdw). . . . . . . . . . . . . . . . . . . . . . . . . . 10-3 gp chip select qualification (gpcsqual) . . . . . . . . . . . . . . . . . . . . . . . 10-5 gp chip select recovery time (gpcsrt) . . . . . . . . . . . . . . . . . . . . . . . 10-7 gp chip select pulse width (gpcspw) . . . . . . . . . . . . . . . . . . . . . . . . . 10-8 gp chip select offset (gpcsoff) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-9 gp read pulse width (gprdw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10 gp read offset (gprdoff) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11 gp write pulse width (gpwrw). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-12 gp write offset (gpwroff). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-13 gpale pulse width (gpalew) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14 gpale offset (gpaleoff) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-15 chapter 11 gp dma controller registers 11-1 11.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1 11.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1 gp-dma control (gpdmactl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-4 gp-dma memory-mapped i/o (gpdmammio). . . . . . . . . . . . . . . . . . . . 11-5 gp-dma resource channel map a (gpdmaextchmapa) . . . . . . . . . 11-6 gp-dma resource channel map b (gpdmaextchmapb) . . . . . . . . . 11-8 gp-dma channel 0 extended page (gpdmaextpg0) . . . . . . . . . . . . 11-10 gp-dma channel 1 extended page (gpdmaextpg1) . . . . . . . . . . . . 11-11 gp-dma channel 2 extended page (gpdmaextpg2) . . . . . . . . . . . . 11-12 gp-dma channel 3 extended page (gpdmaextpg3) . . . . . . . . . . . . 11-13 gp-dma channel 5 extended page (gpdmaextpg5) . . . . . . . . . . . . 11-14 gp-dma channel 6 extended page (gpdmaextpg6) . . . . . . . . . . . . 11-15 gp-dma channel 7 extended page (gpdmaextpg7) . . . . . . . . . . . . 11-16 gp-dma channel 3 extended transfer count (gpdmaexttc3). . . . . 11-17 gp-dma channel 5 extended transfer count (gpdmaexttc5). . . . . 11-18 gp-dma channel 6 extended transfer count (gpdmaexttc6). . . . . 11-19 gp-dma channel 7 extended transfer count (gpdmaexttc7). . . . . 11-20 buffer chaining control (gpdmabcctl) . . . . . . . . . . . . . . . . . . . . . . . 11-21 buffer chaining status (gpdmabcsta) . . . . . . . . . . . . . . . . . . . . . . . . 11-22 buffer chaining interrupt enable (gpdmabsintenb) . . . . . . . . . . . . . 11-24 buffer chaining valid (gpdmabcval) . . . . . . . . . . . . . . . . . . . . . . . . . 11-25 gp-dma channel 3 next address low (gpdmanxtaddl3). . . . . . . . 11-26 gp-dma channel 3 next address high (gpdmanxtaddh3) . . . . . . . 11-27 gp-dma channel 5 next address low (gpdmanxtaddl5). . . . . . . . 11-28 gp-dma channel 5 next address high (gpdmanxtaddh5) . . . . . . . 11-29 gp-dma channel 6 next address low (gpdmanxtaddl6). . . . . . . . 11-30 gp-dma channel 6 next address high (gpdmanxtaddh6) . . . . . . . 11-31 gp-dma channel 7 next address low (gpdmanxtaddl7). . . . . . . . 11-32 gp-dma channel 7 next address high (gpdmanxtaddh7) . . . . . . . 11-33 gp-dma channel 3 next transfer count low (gpdmanxttcl3) . . . . 11-34 gp-dma channel 3 next transfer count high (gpdmanxttch3) . . . 11-35 gp-dma channel 5 next transfer count low (gpdmanxttcl5) . . . . 11-36 gp-dma channel 5 next transfer count high (gpdmanxttch5) . . . 11-37 gp-dma channel 6 next transfer count low (gpdmanxttcl6) . . . . 11-38 gp-dma channel 6 next transfer count high (gpdmanxttch6) . . . 11-39 gp-dma channel 7 next transfer count low (gpdmanxttcl7) . . . . 11-40 gp-dma channel 7 next transfer count high (gpdmanxttch7) . . . 11-41 slave dma channel 0 memory address (gpdma0mar) . . . . . . . . . . . 11-42 slave dma channel 0 transfer count (gpdma0tc) . . . . . . . . . . . . . . 11-43 slave dma channel 1 memory address (gpdma1mar) . . . . . . . . . . . 11-44 slave dma channel 1 transfer count (gpdma1tc) . . . . . . . . . . . . . . 11-45 slave dma channel 2 memory address (gpdma2mar) . . . . . . . . . . . 11-46 slave dma channel 2 transfer count (gpdma2tc) . . . . . . . . . . . . . . 11-47
table of contents viii lan?sc520 microcontroller register set manual slave dma channel 3 memory address (gpdma3mar) . . . . . . . . . . . 11-48 slave dma channel 3 transfer count (gpdma3tc) . . . . . . . . . . . . . . 11-49 slave dma channel 0C3 status (sldmasta). . . . . . . . . . . . . . . . . . . . 11-50 slave dma channel 0C3 control (sldmactl) . . . . . . . . . . . . . . . . . . . 11-51 slave software drq(n) request (sldmaswreq) . . . . . . . . . . . . . . . 11-53 slave dma channel 0C3 mask (sldmamsk) . . . . . . . . . . . . . . . . . . . . 11-54 slave dma channel 0C3 mode (sldmamode) . . . . . . . . . . . . . . . . . . 11-55 slave dma clear byte pointer (sldmacbp). . . . . . . . . . . . . . . . . . . . . 11-57 slave dma controller reset (sldmarst) . . . . . . . . . . . . . . . . . . . . . . 11-58 slave dma controller temporary (sldmatmp) . . . . . . . . . . . . . . . . . . 11-59 slave dma mask reset (sldmamskrst) . . . . . . . . . . . . . . . . . . . . . . 11-60 slave dma general mask (sldmagenmsk) . . . . . . . . . . . . . . . . . . . . 11-61 general 0 (gpdmagr0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-62 slave dma channel 2 page (gpdma2pg) . . . . . . . . . . . . . . . . . . . . . . 11-63 slave dma channel 3 page (gpdma3pg) . . . . . . . . . . . . . . . . . . . . . . 11-64 slave dma channel 1 page (gpdma1pg) . . . . . . . . . . . . . . . . . . . . . . 11-65 general 1 (gpdmagr1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-66 general 2 (gpdmagr2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-67 general 3 (gpdmagr3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-68 slave dma channel 0 page (gpdma0pg) . . . . . . . . . . . . . . . . . . . . . . 11-69 general 4 (gpdmagr4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-70 master dma channel 6 page (gpdma6pg) . . . . . . . . . . . . . . . . . . . . . 11-71 master dma channel 7 page (gpdma7pg) . . . . . . . . . . . . . . . . . . . . . 11-72 master dma channel 5 page (gpdma5pg) . . . . . . . . . . . . . . . . . . . . . 11-73 general 5 (gpdmagr5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-74 general 6 (gpdmagr6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-75 general 7 (gpdmagr7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-76 general 8 (gpdmagr8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-77 master dma channel 4 memory address (gpdma4mar) . . . . . . . . . . 11-78 master dma channel 4 transfer count (gpdma4tc) . . . . . . . . . . . . . 11-79 master dma channel 5 memory address (gpdma5mar) . . . . . . . . . . 11-80 master dma channel 5 transfer count (gpdma5tc) . . . . . . . . . . . . . 11-81 master dma channel 6 memory address (gpdma6mar) . . . . . . . . . . 11-82 master dma channel 6 transfer count (gpdma6tc) . . . . . . . . . . . . . 11-83 master dma channel 7 memory address (gpdma7mar) . . . . . . . . . . 11-84 master dma channel 7 transfer count (gpdma7tc) . . . . . . . . . . . . . 11-85 master dma channel 4C7 status (mstdmasta) . . . . . . . . . . . . . . . . . 11-86 master dma channel 4C7 control (mstdmactl) . . . . . . . . . . . . . . . . 11-87 master software drq(n) request (mstdmaswreq) . . . . . . . . . . . . . 11-89 master dma channel 4C7 mask (mstdmamsk) . . . . . . . . . . . . . . . . . 11-90 master dma channel 4C7 mode (mstdmamode) . . . . . . . . . . . . . . . 11-91 master dma clear byte pointer (mstdmacbp) . . . . . . . . . . . . . . . . . . 11-93 master dma controller reset (mstdmarst) . . . . . . . . . . . . . . . . . . . 11-94 master dma controller temporary (mstdmatmp). . . . . . . . . . . . . . . . 11-95 master dma mask reset (mstdmamskrst) . . . . . . . . . . . . . . . . . . . 11-96 master dma general mask (mstdmagenmsk) . . . . . . . . . . . . . . . . . 11-97 chapter 12 programmable interrupt controller registers 12-1 12.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1 12.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1 interrupt control (picicr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4 master pic interrupt mode (mpicmode) . . . . . . . . . . . . . . . . . . . . . . . . 12-6 slave 1 pic interrupt mode (sl1picmode) . . . . . . . . . . . . . . . . . . . . . . 12-8 slave 2 pic interrupt mode (sl2picmode) . . . . . . . . . . . . . . . . . . . . . . 12-9 software interrupt 16C1 control (swint16_1) . . . . . . . . . . . . . . . . . . . 12-10 software interrupt 22C17/nmi control (swint22_17). . . . . . . . . . . . . . 12-13 interrupt pin polarity (intpinpol). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-15 pci host bridge interrupt mapping (pcihostmap) . . . . . . . . . . . . . . . 12-17 ecc interrupt mapping (eccmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-19
table of contents lan?sc520 microcontroller register set manual ix gp timer 0 interrupt mapping (gptmr0map) . . . . . . . . . . . . . . . . . . . 12-21 gp timer 1 interrupt mapping (gptmr1map) . . . . . . . . . . . . . . . . . . . 12-21 gp timer 2 interrupt mapping (gptmr2map) . . . . . . . . . . . . . . . . . . . 12-21 pit 0 interrupt mapping (pit0map) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 pit 1 interrupt mapping (pit1map) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 pit 2 interrupt mapping (pit2map) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 uart 1 interrupt mapping (uart1map) . . . . . . . . . . . . . . . . . . . . . . . . 12-21 uart 2 interrupt mapping (uart2map) . . . . . . . . . . . . . . . . . . . . . . . . 12-21 pci interrupt a mapping (pciintamap) . . . . . . . . . . . . . . . . . . . . . . . . 12-21 pci interrupt b mapping (pciintbmap) . . . . . . . . . . . . . . . . . . . . . . . . 12-21 pci interrupt c mapping (pciintcmap) . . . . . . . . . . . . . . . . . . . . . . . . 12-21 pci interrupt d mapping (pciintdmap) . . . . . . . . . . . . . . . . . . . . . . . . 12-21 dma buffer chaining interrupt mapping (dmabcintmap). . . . . . . . . . 12-21 ssi interrupt mapping (ssimap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 watchdog timer interrupt mapping (wdtmap). . . . . . . . . . . . . . . . . . . 12-21 rtc interrupt mapping (rtcmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 write-protect violation interrupt mapping (wpvmap) . . . . . . . . . . . . . . 12-21 amdebug? technology rx/tx interrupt mapping (icemap) . . . . . . . . 12-21 floating point error interrupt mapping (ferrmap) . . . . . . . . . . . . . . . 12-21 gpirq0 interrupt mapping (gp0imap) . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 gpirq1 interrupt mapping (gp1imap) . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 gpirq2 interrupt mapping (gp2imap) . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 gpirq3 interrupt mapping (gp3imap) . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 gpirq4 interrupt mapping (gp4imap) . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 gpirq5 interrupt mapping (gp5imap) . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 gpirq6 interrupt mapping (gp6imap) . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 gpirq7 interrupt mapping (gp7imap) . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 gpirq8 interrupt mapping (gp8imap) . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 gpirq9 interrupt mapping (gp9imap) . . . . . . . . . . . . . . . . . . . . . . . . . 12-21 gpirq10 interrupt mapping (gp10imap) . . . . . . . . . . . . . . . . . . . . . . . 12-21 master pic interrupt request (mpicir). . . . . . . . . . . . . . . . . . . . . . . . . 12-24 master pic in-service (mpicisr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25 master pic initialization control word 1 (mpicicw1) . . . . . . . . . . . . . . 12-26 master pic operation control word 2 (mpicocw2) . . . . . . . . . . . . . . 12-28 master pic operation control word 3 (mpicocw3) . . . . . . . . . . . . . . 12-30 master pic initialization control word 2 (mpicicw2) . . . . . . . . . . . . . . 12-32 master pic initialization control word 3 (mpicicw3) . . . . . . . . . . . . . . 12-33 master pic initialization control word 4 (mpicicw4) . . . . . . . . . . . . . . 12-35 master pic interrupt mask (mpicintmsk) . . . . . . . . . . . . . . . . . . . . . . 12-36 slave 2 pic interrupt request (s2picir) . . . . . . . . . . . . . . . . . . . . . . . 12-37 slave 2 pic in-service (s2picisr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-38 slave 2 pic initialization control word 1 (s2picicw1) . . . . . . . . . . . . . 12-39 slave 2 pic operation control word 2 (s2picocw2) . . . . . . . . . . . . . 12-41 slave 2 pic operation control word 3 (s2picocw3) . . . . . . . . . . . . . 12-43 slave 2 pic initialization control word 2 (s2picicw2) . . . . . . . . . . . . . 12-45 slave 2 pic initialization control word 3 (s2picicw3) . . . . . . . . . . . . . 12-46 slave 2 pic initialization control word 4 (s2picicw4) . . . . . . . . . . . . . 12-47 slave 2 pic interrupt mask (s2picintmsk) . . . . . . . . . . . . . . . . . . . . . 12-48 slave 1 pic interrupt request (s1picir) . . . . . . . . . . . . . . . . . . . . . . . 12-49 slave 1 pic in-service (s1picisr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-50 slave 1 pic initialization control word 1 (s1picicw1) . . . . . . . . . . . . . 12-51 slave 1 pic operation control word 2 (s1picocw2) . . . . . . . . . . . . . 12-53 slave 1 pic operation control word 3 (s1picocw3) . . . . . . . . . . . . . 12-55 slave 1 pic initialization control word 2 (s1picicw2) . . . . . . . . . . . . . 12-57 slave 1 pic initialization control word 3 (s1picicw3) . . . . . . . . . . . . . 12-58 slave 1 pic initialization control word 4 (s1picicw4) . . . . . . . . . . . . . 12-59 slave 1 pic interrupt mask (s1picintmsk) . . . . . . . . . . . . . . . . . . . . . 12-60 floating point error interrupt clear (fpuerrclr) . . . . . . . . . . . . . . . . 12-61
table of contents x lan?sc520 microcontroller register set manual chapter 13 programmable interval timer registers 13-1 13.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-1 13.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-1 pit channel 0 count (pit0cnt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2 pit channel 1 count (pit1cnt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3 pit channel 2 count (pit2cnt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4 pit 0 status (pit0sta) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5 pit 1 status (pit1sta) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5 pit 2 status (pit2sta) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5 pit mode control (pitmodectl). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-7 pit counter latch command (pitcntlat) . . . . . . . . . . . . . . . . . . . . . 13-10 pit read-back command (pitrdback) . . . . . . . . . . . . . . . . . . . . . . . 13-11 system control port b (sysctlb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-13 chapter 14 general-purpose timer registers 14-1 14.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-1 14.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-1 gp timers status (gptmrsta) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2 gp timer 0 mode/control (gptmr0ctl) . . . . . . . . . . . . . . . . . . . . . . . . 14-3 gp timer 0 count (gptmr0cnt). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-6 gp timer 0 maxcount compare a (gptmr0maxcmpa) . . . . . . . . . . . . 14-7 gp timer 0 maxcount compare b (gptmr0maxcmpb). . . . . . . . . . . . 14-8 gp timer 1 mode/control (gptmr1ctl) . . . . . . . . . . . . . . . . . . . . . . . . 14-9 gp timer 1 count (gptmr1cnt). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-12 gp timer 1 maxcount compare a (gptmr1maxcmpa) . . . . . . . . . . . 14-13 gp timer 1 maxcount compare b (gptmr1maxcmpb). . . . . . . . . . . 14-14 gp timer 2 mode/control (gptmr2ctl) . . . . . . . . . . . . . . . . . . . . . . . 14-15 gp timer 2 count (gptmr2cnt). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-17 gp timer 2 maxcount compare a (gptmr2maxcmpa) . . . . . . . . . . . 14-18 chapter 15 software timer registers 15-1 15.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1 15.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1 software timer millisecond count (swtmrmilli) . . . . . . . . . . . . . . . . . 15-2 software timer microsecond count (swtmrmicro) . . . . . . . . . . . . . . 15-3 software timer configuration (swtmrcfg) . . . . . . . . . . . . . . . . . . . . . 15-4 chapter 16 watchdog timer registers 16-1 16.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1 16.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1 watchdog timer control (wdtmrctl). . . . . . . . . . . . . . . . . . . . . . . . . . 16-2 watchdog timer count low (wdtmrcntl). . . . . . . . . . . . . . . . . . . . . . 16-4 watchdog timer count high (wdtmrcnth) . . . . . . . . . . . . . . . . . . . . . 16-5
table of contents lan?sc520 microcontroller register set manual xi chapter 17 real-time clock registers 17-1 17.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-1 17.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-1 rtc/cmos ram index (rtcidx) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-2 rtc/cmos ram data port (rtcdata) . . . . . . . . . . . . . . . . . . . . . . . . . 17-3 rtc current second (rtccursec) . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-4 rtc alarm second (rtcalmsec) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-5 rtc current minute (rtccurmin) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-6 rtc alarm minute (rtcalmmin) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-7 rtc current hour (rtccurhr). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-8 rtc alarm hour (rtcalmhr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-9 rtc current day of the week (rtccurdow). . . . . . . . . . . . . . . . . . . 17-10 rtc current day of the month (rtccurdom) . . . . . . . . . . . . . . . . . . 17-11 rtc current month (rtccurmon) . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-12 rtc current year (rtccuryr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-13 rtc control a (rtcctla) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-14 rtc control b (rtcctlb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-16 rtc status c (rtcstac) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-18 rtc status d (rtcstad) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-20 general-purpose cmos ram (114 bytes) (rtccmos) . . . . . . . . . . . . 17-21 chapter 18 uart serial port registers 18-1 18.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-1 18.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-1 uart 1 general control (uart1ctl) . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-3 uart 2 general control (uart2ctl) . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-3 uart 1 general status (uart1sta) . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-4 uart 2 general status (uart2sta) . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-4 uart 1 fifo control shadow (uart1fcrshad) . . . . . . . . . . . . . . . . . 18-5 uart 2 fifo control shadow (uart2fcrshad) . . . . . . . . . . . . . . . . . 18-5 uart 2 transmit holding (uart2thr) . . . . . . . . . . . . . . . . . . . . . . . . . . 18-7 uart 1 transmit holding (uart1thr) . . . . . . . . . . . . . . . . . . . . . . . . . . 18-7 uart 2 receive buffer (uart2rbr) . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-8 uart 1 receive buffer (uart1rbr) . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-8 uart 2 baud clock divisor latch lsb (uart2bcdl) . . . . . . . . . . . . . . 18-9 uart 1 baud clock divisor latch lsb (uart1bcdl) . . . . . . . . . . . . . . 18-9 uart 2 baud clock divisor latch msb (uart2bcdh) . . . . . . . . . . . . 18-10 uart 1 baud clock divisor latch msb (uart1bcdh) . . . . . . . . . . . . 18-10 uart 2 interrupt enable (uart2intenb) . . . . . . . . . . . . . . . . . . . . . . 18-11 uart 1 interrupt enable (uart1intenb) . . . . . . . . . . . . . . . . . . . . . . 18-11 uart 2 interrupt id (uart2intid) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-12 uart 1 interrupt id (uart1intid) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-12 uart 2 fifo control (uart2fcr). . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-15 uart 1 fifo control (uart1fcr). . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-15 uart 2 line control (uart2lcr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-17 uart 1 line control (uart1lcr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-17 uart 2 modem control (uart2mcr) . . . . . . . . . . . . . . . . . . . . . . . . . 18-19 uart 1 modem control (uart1mcr) . . . . . . . . . . . . . . . . . . . . . . . . . 18-19 uart 2 line status (uart2lsr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-21 uart 1 line status (uart1lsr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-21 uart 2 modem status (uart2msr) . . . . . . . . . . . . . . . . . . . . . . . . . . 18-23 uart 1 modem status (uart1msr) . . . . . . . . . . . . . . . . . . . . . . . . . . 18-23 uart 2 scratch pad (uart2scratch). . . . . . . . . . . . . . . . . . . . . . . . 18-25 uart 1 scratch pad (uart1scratch). . . . . . . . . . . . . . . . . . . . . . . . 18-25
table of contents xii lan?sc520 microcontroller register set manual chapter 19 synchronous serial interface registers 19-1 19.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-1 19.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-1 ssi control (ssictl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-2 ssi transmit (ssixmit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-4 ssi command (ssicmd). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-5 ssi status (ssista). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-6 ssi receive (ssircv) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-7 chapter 20 programmable input/output registers 20-1 20.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-1 20.2 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-1 pio15Cpio0 pin function select (piopfs15_0) . . . . . . . . . . . . . . . . . . 20-3 pio31Cpio16 pin function select (piopfs31_16) . . . . . . . . . . . . . . . . 20-5 chip select pin function select (cspfs) . . . . . . . . . . . . . . . . . . . . . . . . 20-7 clock select (clksel) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-9 drive strength control (dsctl). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-10 pio15Cpio0 direction (piodir15_0) . . . . . . . . . . . . . . . . . . . . . . . . . . 20-12 pio31Cpio16 direction (piodir31_16) . . . . . . . . . . . . . . . . . . . . . . . . 20-14 pio15Cpio0 data (piodata15_0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-16 pio31Cpio16 data (piodata31_16) . . . . . . . . . . . . . . . . . . . . . . . . . . 20-18 pio15Cpio0 set (pioset15_0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-20 pio31Cpio16 set (pioset31_16) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-22 pio15Cpio0 clear (pioclr15_0). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-24 pio31Cpio16 clear (pioclr31_16). . . . . . . . . . . . . . . . . . . . . . . . . . . 20-26 index index-1
table of contents lan?sc520 microcontroller register set manual xiii list of figures figure 7-1 examples of bank ending address configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8 figure 7-2 ecc check bit and data bit positions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-11 figure 10-1 gp bus signal timing adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-7 list of tables table 0-1 documentation notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii table 1-1 memory-mapped configuration region (mmcr) registers (by offset) . . . . . . . . . . . . . 1-2 table 1-2 direct-mapped i/o registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 table 1-3 pci indexed registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-11 table 1-4 real-time clock indexed registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11 table 2-1 system address mapping mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 table 2-2 system address mapping direct-mapped register . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 table 3-1 reset generation mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 table 3-2 reset generation direct-mapped registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 table 3-3 microcontroller reset sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 -6 table 4-1 am5 x 86? cpu mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 table 5-1 system arbiter mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 table 6-1 pci bus host bridge mmcr registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 table 6-2 pci bus host bridge direct-mapped registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 table 6-3 pci bus host bridge indexed registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 table 7-1 sdram controller mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 table 7-2 example ecc check codes and associated data. . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13 table 8-1 write buffer and read buffer mmcr register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1 table 9-1 rom controller mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 table 10-1 gp bus mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10- 1 table 10-2 gp bus echo mode minimum timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 table 11-1 gp-dma mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1 table 11-2 gp-dma direct-mapped registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2 table 12-1 programmable interrupt controller mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1 table 12-2 programmable interrupt controller direct-mapped registers . . . . . . . . . . . . . . . . . . . . 12-2 table 12-3 master pic i/o port 0020h access summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-27 table 12-4 master pic i/o port 0020h access summary (same as table 12-3) . . . . . . . . . . . . . 12-29 table 12-5 master pic i/o port 0020h access summary (same as table 12-3) . . . . . . . . . . . . . 12-31 table 12-6 slave 2 pic i/o port 0024h access summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-40 table 12-7 slave 2 pic i/o port 0024h access summary (same as table 12-6) . . . . . . . . . . . . 12-42 table 12-8 slave 2 pic i/o port 0024h access summary (same as table 12-6) . . . . . . . . . . . . 12-44 table 12-9 slave 1 pic i/o port 00a0h access summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-52 table 12-10slave 1 pic i/o port 00a0h access summary (same as table 12-9) . . . . . . . . . . . . 12-54 table 12-11slave 1 pic i/o port 00a0h access summary (same as table 12-9) . . . . . . . . . . . . 12-56 table 13-1 programmable interval timer direct-mapped registers . . . . . . . . . . . . . . . . . . . . . . . . 13-1 table 13-2 pit counter mode settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3-9 table 14-1 general-purpose timer mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-1 table 15-1 software timer mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1 table 16-1 watchdog timer mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1 table 16-2 watchdog timer exponent selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3 table 17-1 real-time clock direct-mapped registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-1 table 17-2 real-time clock indexed registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-1 table 18-1 uart mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 -1 table 18-2 uart direct-mapped registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-1 table 18-3 baud rates, divisors, and clock source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-9 table 18-4 uart interrupt identification and priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-13 table 18-5 uart interrupt programming summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-14 table 19-1 ssi mmcr registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19-1 table 19-2 ssi clock speed selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 -2 table 20-1 programmable i/o mmcr registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-1 table 20-2 pio register programming summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-2
table of contents xiv lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual xv preface introduction lan?sc520 microcontroller the lan?sc520 microcontroller is a full-featured microcontroller developed for the general embedded market. the lansc520 microcontroller combines a 32-bit, low-voltage am5 x 86? cpu with a complete set of integrated peripherals suitable for both real-time and pc/at-compatible embedded applications. purpose of this manual this manual includes in reference format the complete set of registers required to configure the lansc520 microcontroller and control its peripherals. this manual does not document the am5 x 86 processor registers. intended audience this reference manual is intended primarily for programmers who are developing code for the lansc520 microcontroller. computer software and hardware architects and system engineers who are designing or are considering designing systems based on this microcontroller may also be interested in the information contained in this document. for more information on programming this microcontroller, see the lan?sc520 microcontroller users manual , order #22004. overview of this manual the manual is organized into the following chapters: n chapter 1 contains an overview of all the microcontrollers configuration registers . n chapter 2 describes the system address mapping registers . n chapter 3 describes the reset generation registers . n chapter 4 describes the am5 x 86 cpu registers . n chapter 5 describes the system arbitration registers . n chapter 6 describes the pci host bridge registers . n chapter 7 describes the synchronous dram (sdram) controller registers . n chapter 8 describes the write buffer and read buffer register . n chapter 9 describes the rom/flash memory controller registers . n chapter 10 describes the general-purpose (gp) bus controller registers . n chapter 11 describes the gp bus dma controller registers . n chapter 12 describes the programmable interrupt controller (pic) registers . n chapter 13 describes the programmable interval timer (pit) registers . n chapter 14 describes the general-purpose (gp) timer registers . n chapter 15 describes the software timer registers . n chapter 16 describes the watchdog timer (wdt) registers . n chapter 17 describes the real-time clock (rtc) registers .
introduction xvi lan?sc520 microcontroller register set manual n chapter 18 describes the uart registers . n chapter 19 describes the synchronous serial interface (ssi) registers . n chapter 20 describes the programmable i/o (pio) registers . n the index lists all registers and bits alphabetically by name and mnemonic. each chapter describes the functions memory-mapped configuration region (mmcr) registers first, followed by direct-mapped and then indexed register descriptions, if any. within each chapter, the registers of each type are listed in ascending hexadecimal order unless descriptions for identical registers (for example, direct-mapped uart registers) are combined. related documents the following documents contain additional information that will be useful in designing an embedded application based on the lansc520 microcontroller. amd documentation in addition to this manual, the documentation set for the lansc520 microcontroller includes the following documents: n lan?sc520 microcontroller users manual , order #22004, provides a functional description of the microcontroller for both hardware and software designers. n lan?sc520 microcontroller data sheet , order #22003, includes complete pin lists, pin state tables, timing and thermal characteristics, and package dimensions for the lansc520 microcontroller. other information of interest: n the am486? microprocessor software users manual , order #18497, includes the complete instruction set for the integrated am5 x 86 cpu. n am5x86? microprocessor family data sheet , order #19751 n am486?dx/dx2 microprocessor hardware reference manual , order #17965 n e86? family products and development tools cd , order #21058, provides a single- source multimedia tool for customer evaluation of amd products, as well as fusione86 partner tools and technologies that support the e86 family. technical documentation is included on the cd in pdf format. to order literature, contact the nearest amd sales office or call the literature center at one of the numbers listed on the back cover of this manual. in addition, all these documents are available in pdf form on the amd web site. to access the amd home page, go to www.amd.com . then follow the embedded processor link for information about amds e86 family of microcontrollers.
introduction lan?sc520 microcontroller register set manual xvii additional information the following non-amd documents and sources provide additional information that may be of interest to lansc520 microcontroller users: n pci local bus specification, revision 2.2, december 18, 1998, pci special interest group, 800-433-5177 (us), 503-693-6360 (international), www.pcisig.com. n ieee std 1149.1-1990 standard test access port and boundary-scan architecture, (order #sh16626-nyf), institute of electrical and electronic engineers, inc., 800-678- 4333, www.ieee.org. n pci system architecture , mindshare, inc., reading, ma: addison-wesley, 1995, isbn 0-201-40993-3. n isa system architecture , mindshare, inc., reading, ma: addison-wesley, 1995, isbn 0-201-40996-8. n 80486 system architecture , mindshare, inc., reading, ma: addison-wesley, 1995, isbn 0-201-40994-1 n the indispensable pc hardware book , hans-peter messmer, wokingham, england: addison-wesley, 1995, isbn 0-201-87697-3.
introduction xviii lan?sc520 microcontroller register set manual documentation conventions table 0-1 lists the documentation conventions used throughout this manual. table 0-1 documentation notation notation meaning reset default values default value after a system reset 0low 1 active or high x no value is guaranteed ? determined by sources external to the lansc520 microcontroller read/write attributes r the bit field is read-only. a write to the register at this bit field has no effect. the contents may or may not be changed by hardware. w the bit field is write-only. reading this register at this bit field does not return a meaningful value and has no side effects. r/w the bit field is read/write. reading the register at this bit field always returns the last value written. reads have no side effects. r/w! the bit field is read/write with conditions. the ! indicates that there are side effects to using this bit. for example, reading a bit or register might not always return the last value written. note that both reads and writes can have side effects. if you see a !, be sure to read the bit description and programming notes. rsv the bit field is reserved for internal test/debug or future expansion. this bit field should be written to 0 for normal system operation. this bit field always returns 0 when read. rsv! the bit field is reserved for compatibility purposes. for example, the bit field might be ignored during writes to maintain software compatibility. if you see a !, be sure to read the bit description and programming notes. reference notation mmcr offset 00h lansc520 microcontroller memory-mapped configuration region (mmcr) offset register 00h pci index 00h pci indexed register 00h port 00h direct-mapped i/o register 00h rtc index 00h rtc and configuration ram indexed register 00h
introduction lan?sc520 microcontroller register set manual xix pin naming { } pin function during hardware reset [ ] alternative pin function selected by software configuration romcs1 an overbar indicates that the signal assumes the logic low state when asserted. gpreset the absence of an overbar indicates that the signal assumes the logic high state when asserted. ads , hold a signal name in all lowercase indicates an internal signal. romcs2 Cromcs1 two rom chip select signals romcsx any of the two rom chip select signals numbers b binary number d decimal number decimal is the default radix h hexadecimal number x in register address any of several legal values; e.g., using 0xf8h for the uart transmit holding register is either 02f8h or 03f8h, depending on the uart [xCy] the bit field that consists of bits x through y. example: the sb_addr[23C16] bit field. 33 mhz refers to the system clock frequency being used. this can be either 33.000 mhz or 33.333 mhz. see the lan?sc520 microcontroller users manual , order #22004, for more information about clock generation. general field bit field in a register (one or more consecutive and related bits) can it is possible to perform an action if properly configured will a certain action is going to occur set the enb bit. write the enb bit to 1. note: the bit referred to is either in the register being described, or the register is referred to explicitly in the surrounding text. clear the enb bit. change the enb bit to 0. usually a bit is cleared by writing a 0 to it; however, some bits are cleared by writing a 1. reset the enb bit. context-sensitive. can refer either to resetting the bit to its default value or to clearing the bit. table 0-1 documentation notation (continued) notation meaning
introduction xx lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 1-1 chapter 1 configuration register overview the lan?sc520 microcontroller has four different types of configuration registers: n memory-mapped configuration region (mmcr) registers these are memory- mapped peripherals and configuration registers that are specific to the lansc520 microcontrollers control and status functions, such as the sdram and gp bus controllers. these registers are 8-bits, 16-bits, or 32-bits wide and reside in memory space. n direct-mapped registers these include the configuration base address (cbar) register, the pci configuration address and data (pcicfgadr and pcicfgdata) registers, and pc/at-compatible peripherals. all direct-mapped i/o registers reside in fixed i/o space. the cbar, pcicfgadr, and pcicfgdata registers are 32 bits wide. all other direct-mapped peripheral configuration registers are 8 bits wide. n pci host bridge indexed configuration registers these registers are located in the pci bus configuration space, which is defined in the pci local bus specification, revision 2.2, to be accessed through two 32-bit i/o locations at 0cf8h (index) and 0cfch (data). n rtc indexed registers these registers are located in the pc/at-compatible real- time clock (rtc) configuration space, which is accessed using i/o ports 0070h (index) and 0071h (data). register descriptions are organized within this manual by function, e.g., gp bus, sdram, or uart. each functions chapter describes the mmcr registers first, followed by direct- mapped, and then indexed register descriptions, if any. in each chapter, registers of each type are listed in ascending hexadecimal order unless descriptions for identical registers (for example, direct-mapped uart registers) are combined. the remainder of this chapter presents an overview of the registers by type. 1.1 memory-mapped configuration region (mmcr) registers the lansc520 microcontrollers memory-mapped configuration region (mmcr) contains all internal peripheral control and configuration registers that are not defined as direct- mapped i/o, pci indexed, or rtc indexed registers. after reset, the mmcr registers are located in the 4-kbyte region in memory address space from fffef000Cfffeffffh. the mmcr registers can be aliased to any 4-kbyte region in the lower 1-gbyte address space (00000000hC1ffffffh) via the i/o-mapped cbar register (see page 2-9). the mmcr is available at its original location in high memory even if it is aliased via the cbar register. see the memory and i/o space chapter in the lan?sc520 microcontroller users manual , order #22004, for more detail. table 1-1 on page 1-2 lists all the mmcr registers included in the lansc520 microcontroller.
configuration register overview 1-2 lan?sc520 microcontroller register set manual table 1-1 memory-mapped configuration region (mmcr) registers (by offset) register name mnemonic mmcr offset page number cpu 00C02h lansc520 microcontroller revision id revid 00h page 4-2 am5 x 86? cpu control cpuctl 02h page 4-3 sdram controller 10C28h sdram control drcctl 10h page 7-4 sdram timing control drctmctl 12h page 7-4 sdram bank configuration drccfg 14h page 7-5 sdram bank 0C3 ending address drcbendadr 18h page 7-7 ecc control eccctl 20h page 7-9 ecc status eccsta 21h page 7-10 ecc check bit position eccckbpos 22h page 7-11 ecc check code test ecccktest 23h page 7-12 ecc single-bit error address eccsbadd 24h page 7-14 ecc multi-bit error address eccmbadd 28h page 7-15 sdram buffer 40h sdram buffer control dbctl 40h page 8-2 rom/flash controller 50C56h bootcs control bootcsctl 50h page 9-2 romcs1 control romcs1ctl 54h page 9-4 romcs2 control romcs2ctl 56h page 9-6 pci bus host bridge 60C6ch host bridge control hbctl 60h page 6-3 host bridge target interrupt control hbtgtirqctl 62h page 6-5 host bridge target interrupt status hbtgtirqsta 64h page 6-7 host bridge master interrupt control hbmstirqctl 66h page 6-9 host bridge master interrupt status hbmstirqsta 68h page 6-12 host bridge master interrupt address mstintadd 6ch page 6-14 system arbitration 70C74h system arbiter control sysarbctl 70h page 5-2 pci bus arbiter status pciarbsta 71h page 5-3 system arbiter master enable sysarbmenb 72h page 5-4 arbiter priority control arbprictl 74h page 5-6
configuration register overview lan?sc520 microcontroller register set manual 1-3 system address mapping 80Cc4h address decode control adddecctl 80h page 2-2 write-protect violation status wpvsta 82h page 2-4 programmable address region 0 par0 88h page 2-5 programmable address region 1 par1 8ch page 2-5 programmable address region 2 par2 90h page 2-5 programmable address region 3 par3 94h page 2-5 programmable address region 4 par4 98h page 2-5 programmable address region 5 par5 9ch page 2-5 programmable address region 6 par6 a0h page 2-5 programmable address region 7 par7 a4h page 2-5 programmable address region 8 par8 a8h page 2-5 programmable address region 9 par9 ach page 2-5 programmable address region 10 par10 b0h page 2-5 programmable address region 11 par11 b4h page 2-5 programmable address region 12 par12 b8h page 2-5 programmable address region 13 par13 bch page 2-5 programmable address region 14 par14 c0h page 2-5 programmable address region 15 par15 c4h page 2-5 gp bus controller c00Cc10h gp echo mode gpecho c00h page 10-2 gp chip select data width gpcsdw c01h page 10-3 gp chip select qualification gpcsqual c02h page 10-5 gp chip select recovery time gpcsrt c08h page 10-7 gp chip select pulse width gpcspw c09h page 10-8 gp chip select offset gpcsoff c0ah page 10-9 gp read pulse width gprdw c0bh page 10-10 gp read offset gprdoff c0ch page 10-11 gp write pulse width gpwrw c0dh page 10-12 gp write offset gpwroff c0eh page 10-13 gpale pulse width gpalew c0fh page 10-14 gpale offset gpaleoff c10h page 10-15 table 1-1 memory-mapped configuration region (mmcr) registers (by offset) (continued) register name mnemonic mmcr offset page number
configuration register overview 1-4 lan?sc520 microcontroller register set manual programmable input/output c20Cc3ah pio15Cpio0 pin function select piopfs15_0 c20h page 20-3 pio31Cpio16 pin function select piopfs31_16 c22h page 20-5 chip select pin function select cspfs c24h page 20-7 clock select clksel c26h page 20-9 drive strength control dsctl c28h page 20-10 pio15Cpio0 direction piodir15_0 c2ah page 20-12 pio31Cpio16 direction piodir31_16 c2ch page 20-14 pio15Cpio0 data piodata15_0 c30h page 20-16 pio31Cpio16 data piodata31_16 c32h page 20-18 pio15Cpio0 set pioset15_0 c34h page 20-20 pio31Cpio16 set pioset31_16 c36h page 20-22 pio15Cpio0 clear pioclr15_0 c38h page 20-24 pio31Cpio16 clear pioclr31_16 c3ah page 20-26 software timer c60Cc62h software timer millisecond count swtmrmilli c60h page 15-2 software timer microsecond count swtmrmicro c62h page 15-3 software timer configuration swtmrcfg c64h page 15-4 general-purpose timers c70Cc8eh gp timers status gptmrsta c70h page 14-2 gp timer 0 mode/control gptmr0ctl c72h page 14-3 gp timer 0 count gptmr0cnt c74h page 14-6 gp timer 0 maxcount compare a gptmr0maxcmpa c76h page 14-7 gp timer 0 maxcount compare b gptmr0maxcmpb c78h page 14-8 gp timer 1 mode/control gptmr1ctl c7ah page 14-9 gp timer 1 count gptmr1cnt c7ch page 14-12 gp timer 1 maxcount compare a gptmr1maxcmpa c7eh page 14-13 gp timer 1 maxcount compare b gptmr1maxcmpb c80h page 14-14 gp timer 2 mode/control gptmr2ctl c82h page 14-15 gp timer 2 count gptmr2cnt c84h page 14-17 gp timer 2 maxcount compare a gptmr2maxcmpa c8eh page 14-18 watchdog timer cb0Ccb6h watchdog timer control wdtmrctl cb0h page 16-2 watchdog timer count low wdtmrcntl cb2h page 16-4 watchdog timer count high wdtmrcnth cb4h page 16-5 reserved cb6h table 1-1 memory-mapped configuration region (mmcr) registers (by offset) (continued) register name mnemonic mmcr offset page number
configuration register overview lan?sc520 microcontroller register set manual 1-5 uart serial ports cc0Ccc6h uart 1 general control uart1ctl cc0h page 18-3 uart 1 general status uart1sta cc1h page 18-4 uart 1 fifo control shadow uart1fcrshad cc2h page 18-5 uart 2 general control uart2ctl cc4h page 18-3 uart 2 general status uart2sta cc5h page 18-4 uart 2 fifo control shadow uart2fcrshad cc6h page 18-5 synchronous serial interface cd0Ccd4h ssi control ssictl cd0h page 19-2 ssi transmit ssixmit cd1h page 19-4 ssi command ssicmd cd2h page 19-5 ssi status ssista cd3h page 19-6 ssi receive ssircv cd4h page 19-7 programmable interrupt controller d00Cd5ah interrupt control picicr d00h page 12-4 master pic interrupt mode mpicmode d02h page 12-6 slave 1 pic interrupt mode sl1picmode d03h page 12-8 slave 2 pic interrupt mode sl2picmode d04h page 12-9 software interrupt 16C1 control swint16_1 d08h page 12-10 software interrupt 22C17/nmi control swint22_17 d0ah page 12-13 interrupt pin polarity intpinpol d10h page 12-15 pci host bridge interrupt mapping pcihostmap d14h page 12-17 ecc interrupt mapping eccmap d18h page 12-19 gp timer 0 interrupt mapping gptmr0map d1ah page 12-21 gp timer 1 interrupt mapping gptmr1map d1bh page 12-21 gp timer 2 interrupt mapping gptmr2map d1ch page 12-21 pit 0 interrupt mapping pit0map d20h page 12-21 pit 1 interrupt mapping pit1map d21h page 12-21 pit 2 interrupt mapping pit2map d22h page 12-21 uart 1 interrupt mapping uart1map d28h page 12-21 uart 2 interrupt mapping uart2map d29h page 12-21 pci interrupt a mapping pciintamap d30h page 12-21 pci interrupt b mapping pciintbmap d31h page 12-21 pci interrupt c mapping pciintcmap d32h page 12-21 pci interrupt d mapping pciintdmap d33h page 12-21 dma buffer chaining interrupt mapping dmabcintmap d40h page 12-21 ssi interrupt mapping ssimap d41h page 12-21 watchdog timer interrupt mapping wdtmap d42h page 12-21 rtc interrupt mapping rtcmap d43h page 12-21 write-protect violation interrupt mapping wpvmap d44h page 12-21 amdebug? technology rx/tx interrupt mapping icemap d45h page 12-21 table 1-1 memory-mapped configuration region (mmcr) registers (by offset) (continued) register name mnemonic mmcr offset page number
configuration register overview 1-6 lan?sc520 microcontroller register set manual floating point error interrupt mapping ferrmap d46h page 12-21 gpirq0 interrupt mapping gp0imap d50h page 12-21 gpirq1 interrupt mapping gp1imap d51h page 12-21 gpirq2 interrupt mapping gp2imap d52h page 12-21 gpirq3 interrupt mapping gp3imap d53h page 12-21 gpirq4 interrupt mapping gp4imap d54h page 12-21 gpirq5 interrupt mapping gp5imap d55h page 12-21 gpirq6 interrupt mapping gp6imap d56h page 12-21 gpirq7 interrupt mapping gp7imap d57h page 12-21 gpirq8 interrupt mapping gp8imap d58h page 12-21 gpirq9 interrupt mapping gp9imap d59h page 12-21 gpirq10 interrupt mapping gp10imap d5ah page 12-21 reset generation d70Cd74h system board information sysinfo d70h page 3-2 reset configuration rescfg d72h page 3-3 reset status ressta d74h page 3-5 gp dma controller d80Cdbeh gp-dma control gpdmactl d80h page 11-4 gp-dma memory-mapped i/o gpdmammio d81h page 11-5 gp-dma resource channel map a gpdmaextchmapa d82h page 11-6 gp-dma resource channel map b gpdmaextchmapb d84h page 11-8 gp-dma channel 0 extended page gpdmaextpg0 d86h page 11-10 gp-dma channel 1 extended page gpdmaextpg1 d87h page 11-11 gp-dma channel 2 extended page gpdmaextpg2 d88h page 11-12 gp-dma channel 3 extended page gpdmaextpg3 d89h page 11-13 gp-dma channel 5 extended page gpdmaextpg5 d8ah page 11-14 gp-dma channel 6 extended page gpdmaextpg6 d8bh page 11-15 gp-dma channel 7 extended page gpdmaextpg7 d8ch page 11-16 gp-dma channel 3 extended transfer count gpdmaexttc3 d90h page 11-17 gp-dma channel 5 extended transfer count gpdmaexttc5 d91h page 11-18 gp-dma channel 6 extended transfer count gpdmaexttc6 d92h page 11-19 gp-dma channel 7 extended transfer count gpdmaexttc7 d93h page 11-20 buffer chaining control gpdmabcctl d98h page 11-21 buffer chaining status gpdmabcsta d99h page 11-22 buffer chaining interrupt enable gpdmabsintenb d9ah page 11-24 buffer chaining valid gpdmabcval d9bh page 11-25 gp-dma channel 3 next address low gpdmanxtaddl3 da0h page 11-26 gp-dma channel 3 next address high gpdmanxtaddh3 da2h page 11-27 gp-dma channel 5 next address low gpdmanxtaddl5 da4h page 11-28 gp-dma channel 5 next address high gpdmanxtaddh5 da6h page 11-29 gp-dma channel 6 next address low gpdmanxtaddl6 da8h page 11-30 table 1-1 memory-mapped configuration region (mmcr) registers (by offset) (continued) register name mnemonic mmcr offset page number
configuration register overview lan?sc520 microcontroller register set manual 1-7 1.2 direct-mapped i/o registers the direct-mapped i/o registers include the configuration base address (cbar) register and pc/at-compatible peripheral registers, such as the programmable interval timer (pit), programmable interrupt controller (pic), direct memory access (dma) controller, the real- time clock (rtc) index and data registers, the pci configuration address and data registers, two universal asynchronous receive/transmit (uart) devices, and miscellaneous control registers defined for compatibility. (the microcontrollers third pic and the cbar register are not found in pc/at-compatible systems.) table 1-2 lists all of the direct-mapped i/o registers in the lansc520 microcontroller. gp-dma channel 6 next address high gpdmanxtaddh6 daah page 11-31 gp-dma channel 7 next address low gpdmanxtaddl7 dach page 11-32 gp-dma channel 7 next address high gpdmanxtaddh7 daeh page 11-33 gp-dma channel 3 next transfer count low gpdmanxttcl3 db0h page 11-34 gp-dma channel 3 next transfer count high gpdmanxttch3 db2h page 11-35 gp-dma channel 5 next transfer count low gpdmanxttcl5 db4h page 11-36 gp-dma channel 5 next transfer count high gpdmanxttch5 db6h page 11-37 gp-dma channel 6 next transfer count low gpdmanxttcl6 db8h page 11-38 gp-dma channel 6 next transfer count high gpdmanxttch6 dbah page 11-39 gp-dma channel 7 next transfer count low gpdmanxttcl7 dbch page 11-40 gp-dma channel 7 next transfer count high gpdmanxttch7 dbeh page 11-41 table 1-2 direct-mapped i/o registers register name mnemonic i/o address page number slave dma 0000C000fh slave dma channel 0 memory address gpdma0mar 0000h page 11-42 slave dma channel 0 transfer count gpdma0tc 0001h page 11-43 slave dma channel 1 memory address gpdma1mar 0002h page 11-44 slave dma channel 1 transfer count gpdma1tc 0003h page 11-45 slave dma channel 2 memory address gpdma2mar 0004h page 11-46 slave dma channel 2 transfer count gpdma2tc 0005h page 11-47 slave dma channel 3 memory address gpdma3mar 0006h page 11-48 slave dma channel 3 transfer count gpdma3tc 0007h page 11-49 slave dma channel 0C3 status sldmasta 0008h page 11-50 slave dma channel 0C3 control sldmactl 0008h page 11-51 slave software drq(n) request sldmaswreq 0009h page 11-53 slave dma channel 0C3 mask sldmamsk 000ah page 11-54 slave dma channel 0C3 mode sldmamode 000bh page 11-55 slave dma clear byte pointer sldmacbp 000ch page 11-57 slave dma controller reset sldmarst 000dh page 11-58 slave dma controller temporary sldmatmp 000dh page 11-59 slave dma mask reset sldmamskrst 000eh page 11-60 slave dma general mask sldmagenmsk 000fh page 11-61 table 1-1 memory-mapped configuration region (mmcr) registers (by offset) (continued) register name mnemonic mmcr offset page number
configuration register overview 1-8 lan?sc520 microcontroller register set manual master programmable interrupt controller 0020, 0021h master pic interrupt request mpicir 0020h page 12-24 master pic in-service mpicisr 0020h page 12-25 master pic initialization control word 1 mpicicw1 0020h page 12-26 master pic operation control word 2 mpicocw2 0020h page 12-28 master pic operation control word 3 mpicocw3 0020h page 12-30 master pic initialization control word 2 mpicicw2 0021h page 12-32 master pic initialization control word 3 mpicicw3 0021h page 12-33 master pic initialization control word 4 mpicicw4 0021h page 12-35 master pic interrupt mask mpicintmsk 0021h page 12-36 slave 2 pic 0024h, 0025h slave 2 pic interrupt request s2picir 0024h page 12-37 slave 2 pic in-service s2picisr 0024h page 12-38 slave 2 pic initialization control word 1 s2picicw1 0024h page 12-39 slave 2 pic operation control word 2 s2picocw2 0024h page 12-41 slave 2 pic operation control word 3 s2picocw3 0024h page 12-43 slave 2 pic initialization control word 2 s2picicw2 0025h page 12-45 slave 2 pic initialization control word 3 s2picicw3 0025h page 12-46 slave 2 pic initialization control word 4 s2picicw4 0025h page 12-47 slave 2 pic interrupt mask s2picintmsk 0025h page 12-48 programmable interval timer 0040C0043h pit channel 0 count pit0cnt 0040h page 13-2 pit channel 1 count pit1cnt 0041h page 13-3 pit channel 2 count pit2cnt 0042h page 13-4 pit 0 status pit0sta 0040 h page 13-5 pit 1 status pit1sta 0041h page 13-5 pit 2 status pit2sta 0042h page 13-5 pit mode control pitmodectl 0043h page 13-7 pit counter latch command pitcntlat 0043h page 13-10 pit read-back command pitrdback 0043h page 13-11 scp data port scpdata 0060h page 3-7 system control port b sysctlb 0061h page 13-13 scp command port scpcmd 0064h page 3-8 rtc index, data 0070h, 0071h rtc/cmos ram index rtcidx 0070h page 17-2 rtc/cmos ram data port rtcdata 0071h page 17-3 dma page and general registers 0080C008fh general 0 gpdmagr0 0080h page 11-62 slave dma channel 2 page gpdma2pg 0081h page 11-63 slave dma channel 3 page gpdma3pg 0082h page 11-64 slave dma channel 1 page gpdma1pg 0083h page 11-65 table 1-2 direct-mapped i/o registers (continued) register name mnemonic i/o address page number
configuration register overview lan?sc520 microcontroller register set manual 1-9 general 1 gpdmagr1 0084h page 11-66 general 2 gpdmagr2 0085h page 11-67 general 3 gpdmagr3 0086h page 11-68 slave dma channel 0 page gpdma0pg 0087h page 11-69 general 4 gpdmagr4 0088h page 11-70 master dma channel 6 page gpdma6pg 0089h page 11-71 master dma channel 7 page gpdma7pg 008ah page 11-72 master dma channel 5 page gpdma5pg 008bh page 11-73 general 5 gpdmagr5 008ch page 11-74 general 6 gpdmagr6 008dh page 11-75 general 7 gpdmagr7 008eh page 11-76 general 8 gpdmagr8 008fh page 11-77 system control port a sysctla 0092h page 3-9 slave 1 pic 00a0C00a1h slave 1 pic interrupt request s1picir 00a0h page 12-49 slave 1 pic in-service s1picisr 00a0h page 12-50 slave 1 pic initialization control word 1 s1picicw1 00a0h page 12-51 slave 1 pic operation control word 2 s1picocw2 00a0h page 12-53 slave 1 pic operation control word 3 s1picocw3 00a0h page 12-55 slave 1 pic initialization control word 2 s1picicw2 00a1h page 12-57 slave 1 pic initialization control word 3 s1picicw3 00a1h page 12-58 slave 1 pic initialization control word 4 s1picicw4 00a1h page 12-59 slave 1 pic interrupt mask s1picintmsk 00a1h page 12-60 master dma 00c0C00deh master dma channel 4 memory address gpdma4mar 00c0h page 11-78 master dma channel 4 transfer count gpdma4tc 00c2h page 11-79 master dma channel 5 memory address gpdma5mar 00c4h page 11-80 master dma channel 5 transfer count gpdma5tc 00c6h page 11-81 master dma channel 6 memory address gpdma6mar 00c8h page 11-82 master dma channel 6 transfer count gpdma6tc 00cah page 11-83 master dma channel 7 memory address gpdma7mar 00cch page 11-84 master dma channel 7 transfer count gpdma7tc 00ceh page 11-85 master dma channel 4C7 status mstdmasta 00d0h page 11-86 master dma channel 4C7 control mstdmactl 00d0h page 11-87 master software drq(n) request mstdmaswreq 00d2h page 11-89 master dma channel 4C7 mask mstdmamsk 00d4h page 11-90 master dma channel 4C7 mode mstdmamode 00d6h page 11-91 master dma clear byte pointer mstdmacbp 00d8h page 11-93 master dma controller reset mstdmarst 00dah page 11-94 master dma controller temporary mstdmatmp 00dah page 11-95 master dma mask reset mstdmamskrst 00dch page 11-96 master dma general mask mstdmagenmsk 00deh page 11-97 table 1-2 direct-mapped i/o registers (continued) register name mnemonic i/o address page number
configuration register overview 1-10 lan?sc520 microcontroller register set manual 1.3 pci host bridge indexed configuration registers the lansc520 microcontrollers pci host bridge supports the required pci configuration space header registers, plus a host bridge-specific master retry time-out (pcimretryto) register defined in the pci configuration space. note that additional microcontroller-specific pci host bridge configuration registers are provided in the mmcr space (see table 1-1). pci indexed registers are accessed via two 32-bit direct-mapped i/o locations: port 0cf8h and port 0cfch. the pci configuration mechanism can be used to access either the host bridge-specific pci indexed registers, or the device-specific pci indexed registers for any floating point error interrupt clear fpuerrclr f0h page 12-61 uart 2 02f8C02ffh uart 2 transmit holding uart2thr 02f8h page 18-7 uart 2 receive buffer uart2rbr 02f8h page 18-8 uart 2 baud clock divisor latch lsb uart2bcdl 02f8h page 18-9 uart 2 baud clock divisor latch msb uart2bcdh 02f9h page 18-10 uart 2 interrupt enable uart2intenb 02f9h page 18-11 uart 2 interrupt id uart2intid 02fah page 18-12 uart 2 fifo control uart2fcr 02fah page 18-15 uart 2 line control uart2lcr 02fbh page 18-17 uart 2 modem control uart2mcr 02fch page 18-19 uart 2 line status uart2lsr 02fdh page 18-21 uart 2 modem status uart2msr 02feh page 18-23 uart 2 scratch pad uart2scratch 02ffh page 18-25 uart 1 03f8C03ffh uart 1 transmit holding uart1thr 03f8h page 18-7 uart 1 receive buffer uart1rbr 03f8h page 18-8 uart 1 baud clock divisor latch lsb uart1bcdl 03f8h page 18-9 uart 1 baud clock divisor latch msb uart1bcdh 03f9h page 18-10 uart 1 interrupt enable uart1intenb 03f9h page 18-11 uart 1 interrupt id uart1intid 03fah page 18-12 uart 1 fifo control uart1fcr 03fah page 18-15 uart 1 line control uart1lcr 03fbh page 18-17 uart 1 modem control uart1mcr 03fch page 18-19 uart 1 line status uart1lsr 03fdh page 18-21 uart 1 modem status uart1msr 03feh page 18-23 uart 1 scratch pad uart1scratch 03ffh page 18-25 pci bus configuration space index/data (32-bit) 0cf8h, 0cfch pci configuration address pcicfgadr 0cf8h page 6-15 pci configuration data pcicfgdata 0cfch page 6-17 configuration base address cbar fffch page 2-9 table 1-2 direct-mapped i/o registers (continued) register name mnemonic i/o address page number
configuration register overview lan?sc520 microcontroller register set manual 1-11 other device that is connected to the pci bus. refer to the pci local bus specification, revision 2.2, for details on pci configuration. table 1-3 lists all of the pci indexed registers in the lansc520 microcontroller. 1.4 rtc and cmos ram indexed registers real-time clock and cmos ram indexed registers are accessed using i/o ports 0070h (index) and 0071h (data). these registers provide pc/at-compatible setup, control, and status functions for the rtc, as well as user cmos ram locations. table 1-4 lists all of the rtc indexed registers in the lansc520 microcontroller. table 1-3 pci indexed registers register name mnemonic i/o address pci index page number device/vendor id pcidevid 0cf8h/0cfch 00h page 6-18 status/command pcistacmd 0cf8h/0cfch 04h page 6-19 class code/revision id pciccrevid 0cf8h/0cfch 08h page 6-22 header type pciheadtype 0cf8h/0cfch 0eh page 6-23 master retry time-out pcimretryto 0cf8h/0cfch 41h page 6-24 table 1-4 real-time clock indexed registers register name mnemonic i/o address rtc index page number rtc current second rtccursec 70h/71h 00h page 17-4 rtc alarm second rtcalmsec 70h/71h 01h page 17-5 rtc current minute rtccurmin 70h/71h 02h page 17-6 rtc alarm minute rtcalmmin 70h/71h 03h page 17-7 rtc current hour rtccurhr 70h/71h 04h page 17-8 rtc alarm hour rtcalmhr 70h/71h 05h page 17-9 rtc current day of the week rtccurdow 70h/71h 06h page 17-10 rtc current day of the month rtccurdom 70h/71h 07h page 17-11 rtc current month rtccurmon 70h/71h 08h page 17-12 rtc current year rtccuryr 70h/71h 09h page 17-13 rtc control a rtcctla 70h/71h 0ah page 17-14 rtc control b rtcctlb 70h/71h 0bh page 17-16 rtc status c rtcstac 70h/71h 0ch page 17-18 rtc status d rtcstad 70h/71h 0dh page 17-20 general-purpose cmos ram (114 bytes) rtccmos 70h/71h 0eC7fh page 17-21
configuration register overview 1-12 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 2-1 chapter 2 system address mapping registers 2.1 overview this chapter describes the system memory and i/o address mapping registers of the lansc520 microcontroller. the system address mapping register set consists of 18 memory-mapped configuration region (mmcr) registers and one direct-mapped i/o register used to define the memory and i/o map in an lansc520 microcontroller-based system, and to control specific attributes of sdram and rom regions. see the lan?sc520 microcontroller users manual , order #22004, for details about memory and i/o space. table 2-1 and table 2-2 list each type of memory and i/o space register in offset order, with the corresponding descriptions page number. 2.2 registers table 2-1 system address mapping mmcr registers register name mnemonic mmcr offset page number address decode control adddecctl 80h page 2-2 write-protect violation status wpvsta 82h page 2-4 programmable address region 0 par0 88h page 2-5 programmable address region 1 par1 8ch page 2-5 programmable address region 2 par2 90h page 2-5 programmable address region 3 par3 94h page 2-5 programmable address region 4 par4 98h page 2-5 programmable address region 5 par5 9ch page 2-5 programmable address region 6 par6 a0h page 2-5 programmable address region 7 par7 a4h page 2-5 programmable address region 8 par8 a8h page 2-5 programmable address region 9 par9 ach page 2-5 programmable address region 10 par10 b0h page 2-5 programmable address region 11 par11 b4h page 2-5 programmable address region 12 par12 b8h page 2-5 programmable address region 13 par13 bch page 2-5 programmable address region 14 par14 c0h page 2-5 programmable address region 15 par15 c4h page 2-5 table 2-2 system address mapping direct-mapped register register name mnemonic i/o address page number configuration base address cbar fffch page 2-9
system address mapping registers 2-2 lan?sc520 microcontroller register set manual address decode control (adddecctl) memory-mapped mmcr offset 80h register description this register controls miscellaneous functions in the lansc520 microcontroller address decode block. bit definitions 7 6 5 4 3 2 1 0 bit wpv_int_ enb reserved io_hole_ dest reserved rtc_dis uart2_dis uart1_dis reset 00000000 r/w r/w rsv r/w rsv r/w r/w r/w bit name function 7 wpv_int_ enb write-protect violation interrupt enable this bit enables an interrupt request to be generated when a write-protect violation occurs. 0 = write-protect violations do not generate an interrupt request to the cpu. 1 = write-protect violations generate an interrupt request to the cpu. before the wpv_int_enb bit is set, the wpvmap register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. the initiator of the access that caused the write-protect violation can be the am5 x 86 cpu, any pci bus master, or the gp bus dma controller. this interrupt can only be generated if at least one of the parx register windows is enabled and has the write-protect attribute selected (see page 2-6). 6-5 reserved reserved this bit field should be written to 0 for normal system operation. 4io_hole_ dest i/o hole access destination this bit determines the destination of accesses performed by the am5 x 86 cpu to certain i/o addresses in the range 0000h to 03ffh. 0 = the accesses are forwarded to the external gp bus (default). 1 = the accesses are forwarded to the pci bus i/o space. i/o addresses in the range 0000h to 03ffh that are not occupied by the internal gp bus peripherals are normally reserved for pc/at-compatible peripherals. such addresses are referred to as holes in the i/o address space. see the memory and i/o chapter of the lan?sc520 microcontroller users manual , order #22004, for details about these holes. if a parx register (see page 2-6) is configured to address gp bus i/o space within a hole, accesses in the defined region are forwarded to the gp bus regardless of the io_hole_dest bit value. the parx window must not overlap any of the internal peripherals direct-mapped i/o addresses. 3 reserved reserved this bit field should be written to 0 for normal system operation.
system address mapping registers lan?sc520 microcontroller register set manual 2-3 programming notes when the lansc520 microcontroller comes out of reset, the internal rtc and uarts are enabled. if the system application requires the use of an external rtc or uarts, the internal devices should be disabled during the boot process and initialization to prevent potential conflicts. when the integrated uarts are disabled, only the i/o space accesses associated with these peripherals are forwarded externally. the accesses to the mmcr registers for the uarts are not forwarded externally because these registers are specific to the integrated peripherals. therefore, the uart mmcr registers should not be used while the integrated uarts are disabled. even if the internal rtc or uarts are disabled, setting the io_hole_dest bit does not redirect accesses to the disabled peripherals to pci bus i/o space. 2rtc_dis rtc disable this bit causes the integrated rtc to be disabled. 0 = the integrated rtc is enabled. 1 = the integrated rtc is not used, and accesses to the rtc address space are forwarded externally to the gp bus. when the internal rtc is disabled, the corresponding interrupt request is not automatically disconnected from the pic. if an external rtc is to drive the rtc interrupt request, then all interrupt enables in the rtcctlb register must be cleared prior to disabling the internal rtc (see page 17-16). after the internal rtc is disabled, a parx window can be defined to target a gpcsx chip select in the rtc i/o address space. if a parx window is not used, the external rtc must fully decode the addresses. 1 uart2_dis uart 2 disable this bit causes the integrated uart 2 to be disabled. 0 = the integrated uart 2 is enabled. 1 = the integrated uart 2 is not used, and accesses to the uart 2 i/o address space are forwarded externally to the gp bus. when the internal uart 2 is disabled, the corresponding interrupt request is not automatically disconnected from the pic. if an external uart is to drive the uart 2 interrupt request, then all interrupt enables in the uart2ctl and uart2intenb registers must be cleared (see page 18-3 and page 18-11). after the internal uart 2 is disabled, a parx window can be defined to target a gpcsx chip select in the uart 2 i/o address space. if a parx window is not used, the external uart must fully decode the addresses. 0 uart1_dis uart 1 disable this bit causes the integrated uart 1 to be disabled. 0 = the integrated uart 1 is enabled. 1 = the integrated uart 1 is not used, and accesses to the uart 1 i/o address space are forwarded externally to the gp bus. when the internal uart 1 is disabled, the corresponding interrupt request is not automatically disconnected from the pic. if an external uart is to drive the uart 1 interrupt request, then all interrupt enables in the uart1ctl and uart1intenb registers must be cleared (see page 18-3 and page 18-11). after the internal uart 1 is disabled, a parx window can be defined to target a gpcsx chip select in the uart 1 i/o address space. if a parx window is not used, the external uart must fully decode the addresses. bit name function
system address mapping registers 2-4 lan?sc520 microcontroller register set manual write-protect violation status (wpvsta) memory-mapped mmcr offset 82h register description this register provides write-protect violation status for the lansc520 microcontrollers address decode block. bit definitions programming notes 15 14 13 12 11 10 9 8 bit wpv_sta reserved wpv_mstr [1C0] reset 00000000 r/w r/w! rsv r 7 6 5 4 3 2 1 0 bit reserved wpv_window[3C0] reset 00000000 r/w rsv r bit name function 15 wpv_sta write-protect violation interrupt status this bit indicates whether an interrupt request is pending due to a write-protect violation. 0 = write-protect violations interrupt request not pending. 1 = write-protect violations interrupt request pending. software must write a 1 to this bit to clear the interrupt (and the status bit) before the hardware can latch subsequent write-protect violations. this bit provides the status of the interrupt regardless of the setting of the wpv_int_enb bit in the adddecctl register (see page 2-2). 14 C 10 reserved reserved this bit field should be written to 0 for normal system operation. 9 C 8 wpv_mstr [1C0] write-protect violation master this bit field identifies the master that caused the write-protect violation. 00 = the am5 x 86 cpu caused the violation. 01 = a pci bus master caused the violation. 10 = the gp bus dma controller caused the violation. 11 = reserved. this bit field contains valid information only while the wpv_sta bit is set. the masters identity is latched when a write-protect violation occurs. subsequent write-protect violations are not captured until software clears the interrupt by writing a 1 to the wpv_sta bit. 7 C 4 reserved reserved this bit field should be written to 0 for normal system operation. 3 C 0 wpv_window [3C0] write-protect violation window number this bit field identifies the programmable address region window (par0Cpar15) in which the write-protect violation occurred. this bit field contains valid information only while the wpv_sta bit is set. the parx window number is latched when a write-protect violation occurs. subsequent write-protect violations are not captured until software clears the interrupt by writing a 1 to the wpv_sta bit.
system address mapping registers lan?sc520 microcontroller register set manual 2-5 memory-mapped programmable address region 0 (par0) mmcr offset 88h programmable address region 1 (par1) mmcr offset 8ch programmable address region 2 (par2) mmcr offset 90h programmable address region 3 (par3) mmcr offset 94h programmable address region 4 (par4) mmcr offset 98h programmable address region 5 (par5) mmcr offset 9ch programmable address region 6 (par6) mmcr offset a0h programmable address region 7 (par7) mmcr offset a4h programmable address region 8 (par8) mmcr offset a8h programmable address region 9 (par9) mmcr offset ach programmable address region 10 (par10) mmcr offset b0h programmable address region 11 (par11) mmcr offset b4h programmable address region 12 (par12) mmcr offset b8h programmable address region 13 (par13) mmcr offset bch programmable address region 14 (par14) mmcr offset c0h programmable address region 15 (par15) mmcr offset c4h 31 30 29 28 27 26 25 24 bit ta r g e t [ 2 C 0] attr[2 C 0] pg_sz sz_st_ad r[24] reset 00000000 r/w r/w r/w r/w r/w 23 22 21 20 19 18 17 16 bit sz_st_adr[23 C 16] reset 00000000 r/w r/w 15 14 13 12 11 10 9 8 bit sz_st_adr[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit sz_st_adr[7 C 0] reset 00000000 r/w r/w
system address mapping registers 2-6 lan?sc520 microcontroller register set manual register description these registers can be used to map windows of memory address space to sdram, rom, pci bus, or gp bus; or to map windows of i/o space to the gp bus. these registers are also used to apply noncacheability, write-protect, and nonexecutable attributes to sdram and rom regions. bit definitions bit name function 31 C 29 target[2 C 0] target of the parx window this bit field defines the target (destination) of the parx window being configured. if no parx window is enabled (i.e., the target bit field is 000b in all parx registers), the default memory map for the lower 1 gbyte address range (00000000hC3fffffffh) is either sdram (if enabled) or pci. accesses to any external gp bus devices or devices connected to romcs1 or romcs2 require a parx window to be enabled and configured to access them. 000 = the window is disabled. all other bits in the parx register are ignored. 001 = the window targets a gp bus i/o region. this is the only i/o space access possible through a parx window. all other settings refer to the memory address space. for gp bus windows, the attr bit field selects a gp bus chip select. see the programming notes for this register, on page 2-8, for gp-bus i/o address restrictions. 010 = the window targets a gp bus memory region. for gp bus windows, the attr bit field selects a gp bus chip select. 011 = the window targets a pci bus memory region. only par0 and par1 support a pci bus memory region as a target. define a pci bus window only when attempting to forward cycles to the pci bus in the lower 256 mbyte address range (00000000h to 0fffffffh). 100 = the window targets a bootcs region (boot rom or flash memory device). the lansc520 microcontroller forces the bootcs signal active at system reset, but the boot code must initialize a parx register to decode the required space for the rom. refer to the lan?sc520 microcontroller users manual , order #22004, for details on configuring the boot rom during system initialization. 101 = the window targets a romcs1 region (rom or flash memory devices). 110 = the window targets a romcs2 region (rom or flash memory devices). 111 = the window targets an sdram region. a parx register is not required to access sdram. target an sdram region only when applying one of the attributes described in the attr bit field.
system address mapping registers lan?sc520 microcontroller register set manual 2-7 28 C 26 attr[2 C 0] attribute if the target bit field selects the pci bus (for par0 and par1 only), this bit field (attr) is ignored. if the target bit field selects gp bus i/o or memory, this bit field (attr) specifies the gp bus chip select that is targeted, as follows: 000 = gpcs0 001 = gpcs1 010 = gpcs2 011 = gpcs3 100 = gpcs4 101 = gpcs5 110 = gpcs6 111 = gpcs7 if the target bit field selects sdram or one of the rom/flash chip selects, each bit in this bit field (attr) specifies an attribute. the attribute bits for the region can be set or cleared independently, with the following effect: 0xx = code execution is allowed in programmed memory region. 1xx = code execution is prevented in programmed memory region. an attempt to execute code results in a processor exception and returns an illegal operand code (ffffh). this attribute is useful for debugging software; for example, to prevent a program from erroneously executing out of a data region. x0x = caching is enabled for the programmed memory region (am5 x 86 cpu cache). x1x = caching is disabled for the programmed memory region. this attribute can be used to minimize cache write-back cycle overhead in regions that are shared between the am5 x 86 cpu and pci bus masters or gp bus dma devices. software must flush the cache immediately after setting this attribute. xx0 = writes are enabled in the programmed memory region. xx1 = write protection is enabled (writes are disabled) in the programmed memory region. write protection prevents writes from occurring in the regions address range. write- protect violations are reported by the wpvsta register (see page 2-4), and a corresponding interrupt can be enabled via the wpv_int_enb bit in the adddecctl register (see page 2-2). 25 pg_sz page size this bit selects the page size of the memory region defined by the sz_st_adr bit field. this bit is ignored during i/o cycles. 0 = 4-kbyte page size selected 1 = 64-kbyte page size selected each parx windows total size in memory space is defined by the combined settings of the pg_sz and sz_st_adr bit fields. the pg_sz bit value affects the window start address resolution, the window size resolution, and the total size that is possible for the window. bit name function
system address mapping registers 2-8 lan?sc520 microcontroller register set manual programming notes each parx register must be written as a full 32-bit doubleword. the basic trade-off with setting the page size in a parx register is the granularity of the memory region. the smaller page size restricts the total size of the region, but allows the smaller granularity of 4 kbytes. the larger 64-kbyte page size is an option when the total region size must be larger than 512 kbytes, but this requires the pages to start on 64-kbyte boundaries. if two parx windows overlap, the lower-numbered parx registers target has priority. for example, if a memory or i/o address falls within the windows defined by both the par4 register and the par 13 register, reads or writes to that address go to the par4 registers target, not the one defined in the par13 register. if a parx window overlaps the mmcr alias defined by the cbar register (see page 2-9), the mmcr alias has priority, with the following exception: if a par window is configured for pci, and the cbar register is programmed to overlap with this par window, and the par window is placed below the top of dram, then the mmcr is not given priority over the pci access. this configuration could result in system errors due to concurrence of both pci and internal mmcr accesses. parx windows in the gp bus i/o space must not include any of the following direct-mapped register addresses: cbar (port fffch), pcicfgadr (port 0cf8h), or pcicfgdata (port 0cfch). also, the parx window must not overlap any direct-mapped i/o address belonging to an internal peripheral (i.e., gp bus dma, pic, pit, system control ports, rtc, or uart i/o registers). when programming a parx register for gp bus i/o space, it is best to start the space on a doubleword boundary. if an unaligned byte region is specified for i/o access, the software that accesses the region must directly address the correct byte or bytes. for example, if a parx register is programmed for an i/o region starting at address xxx1h (i.e., byte1 of the associated doubleword), then when the cpu performs a word or doubleword access, the entire access is redirected to the pci bus, and byte 1 is not accessed on the gp bus as programmed. in this case the byte requested must be directly accessed by the cpu at i/o address xxx1h. 24 C 0 sz_st_adr [24 C 0] region size/start address this bit field, in conjunction with the pg_sz bit, is used to specify the total region size and the starting address of the programmed address space. this bit field is used in one of three ways: for memory space regions with 4-kbyte pages: n the pg_sz bit is 0. n the sz_st_adr[24 C 18] bit field is used to specify a memory space size of up to 128 pages, each 4 kbytes in size, for a maximum parx window size of 512 kbytes. pages start on 4-kbyte boundaries. (a value of 00h specifies one page; 7fh specifies 128 pages.) n the sz_st_adr[17 C 0] bit field is used to define the starting page of the region within the memory address space. the sz_st_adr[17 C 0] bit field is compared to internal am5 x 86 cpu bus signals a29 C a12. for memory space regions with 64-kbyte pages: n the pg_sz bit is 1. n the sz_st_adr[24 C 14] bit field is used to specify a memory space size of up to 2048 pages, each 64 kbytes in size, for a maximum parx window size of 128 mbytes. pages start on 64-kbyte boundaries. (a value of 000h specifies one page; 7ffh specifies 2048 pages.) n the s z_st_adr[13 C 0] bit field is used to define the starting page of the region within the memory address space. the sz_st_adr[13 C 0] bit field is compared to internal am5 x 86 cpu bus signals a29 C a16. for i/o space regions: n the pg_sz bit is ignored. n the sz_st_adr[24 C 16] bit field is used to specify an i/o space size of byte granularity, for a total size up to 512 bytes. (a value of 000h specifies one byte; 1ffh specifies 512 bytes.) n the sz_st_adr[15 C 0] bit field is used to define the starting address of the window within the 64 -kbyte i/o space. the sz_st_adr[15 C 0] bit field is compared to internal am5 x 86 cpu bus signals a15 C a0. note: if a larger window than the maximum size is required, multiple parx registers can be used. bit name function
system address mapping registers lan?sc520 microcontroller register set manual 2-9 configuration base address (cbar) direct-mapped i/o address fffch register description this register can be used to alias the memory-mapped configuration region (mmcr) that is used to access many of the lansc520 microcontrollers integrated peripheral functions. the mmcr is always accessible at fffef000C fffeffffh, in the region directly below the boot rom space, but it can also be aliased to any 4-kbyte boundary within the first 1 gbyte of memory space. bit definitions 31 30 29 28 27 26 25 24 bit enable reserved adr[29 C 24] reset 00000000 r/w r/w! rsv r/w 23 22 21 20 19 18 17 16 bit adr[23 C 16] reset 00000000 r/w r/w 15 14 13 12 11 10 9 8 bit adr[15 C 12] reserved reset 00000000 r/w r/w rsv 7 6 5 4 3 2 1 0 bit match [7C0] reset 00000000 r/w w bit name function 31 enable enable this bit must be set to enable write access to the cbar register. upon reading, the enable bit returns the state of the mmcr alias. 0 = mmcr alias is disabled. 1 = mmcr alias is enabled. writes to this bit are ignored if the value cbh is not written to the match bit field in the same write cycle. 30 reserved reserved this bit field should be written to 0 for normal system operation. 29 C 12 adr[29 C 12] start address this bit field defines the starting address of the memory-mapped configuration region on a 4-kbyte boundary. the address programmed in this bit field is compared to internal am5 x 86 cpu bus signals a29 C a12. writes to this bit field are ignored unless the enable bit set and the value cbh is written to the match bit field in the same write cycle. both of these conditions are required for the write to take effect.
system address mapping registers 2-10 lan?sc520 microcontroller register set manual programming notes this register must be written as a full 32-bit doubleword. when the mmcr alias is enabled, the 4-kbyte address range to which the alias is mapped becomes the mmcr, regardless of any parx registers that are enabled in the same 4-kbyte address range. in effect, the mmcr alias has higher priority than any of the parx windows that are enabled. 11 C 8 reserved reserved this bit field should be written to 0 for normal system operation. 7 C 0 match[7 C 0] match the bit field is used to prevent illegal writes to this register. the data pattern written to this byte must be cbh. if any other data pattern is written to these bits, the entire 32-bit write is ignored. this bit field returns 0 when read. bit name function
lan?sc520 microcontroller register set manual 3-1 chapter 3 reset generation registers 3.1 overview this chapter describes the reset generation and reset-related registers of the lansc520 microcontroller. the lansc520 microcontroller provides several microcontroller-specific and pc/at- compatible reset functions. the reset generation register set includes two groups of registers: n three memory-mapped configuration region (mmcr) registers are used to provide system board information at reset, configure reset behavior, and provide reset status. n three direct-mapped i/o registers are used to provide pc/at-compatible reset-related functions. see the lan?sc520 microcontroller users manual , order #22004, for details about reset generation. table 3-1 and table 3-2 list each type of reset register in offset order, with the corresponding descriptions page number. 3.2 registers table 3-1 reset generation mmcr registers register name mnemonic mmcr offset page number system board information sysinfo d70h page 3-2 reset configuration rescfg d72h page 3-3 reset status ressta d74h page 3-5 table 3-2 reset generation direct-mapped registers register name mnemonic i/o address page number scp data port scpdata 0060h page 3-7 scp command port scpcmd 0064h page 3-8 system control port a sysctla 0092h page 3-9
reset generation registers 3-2 lan?sc520 microcontroller register set manual system board information (sysinfo) memory-mapped mmcr offset d70h register description this read-only register contains the state that was latched on the rstld7Crstld0 pins at the assertion of pwrgood. bit definitions programming notes these are status-only bits used to provide static information to software. for example, the system hardware designer can configure pullup resistors as needed on the rstld7Crstld0 pins to provide board revision information to software. the pullup resistors value should be approximately 10 k w. 7 6 5 4 3 2 1 0 bit rst_ld [7C0] reset ???????? r/w r bit name function 7 C 0 rst_ld [7C0] reset latched input data the microcontroller initializes this bit field at the assertion of the pwrgood signal by latching the state of the shared rstld7 C rstld0 pins. the information in this bit field remains static after it is latched.
reset generation registers lan?sc520 microcontroller register set manual 3-3 reset configuration (rescfg) memory-mapped mmcr offset d72h register description this register provides a direct read/write port to program system reset and gp bus reset. it also provides a control bit to enable or disable the programmable system reset function of the prgreset pin and another control bit to enable the amdebug? technology. bit definitions 7 6 5 4 3 2 1 0 bit reserved ice_on_ rst prg_rst_ enb gp_rst sys_rst reset 00000000 r/w rsv r/w! r/w r/w r/w! bit name function 7 C 4 reserved reserved this bit field should be written to 0 for normal system operation. 3 ice_on_rst enter amdebug? technology mode on next reset setting this bit enables the microprocessor to enter amdebug technology mode after a hard or soft reset has been asserted to the am5 x 86 cpu. writes to this bit are ignored if the amdebug technology mode is not active. (the amdebug technology mode is controlled by the software that drives the amdebug technology port.) 0 = do not enter amdebug technology mode on a cpu hard or soft reset. 1 = enable the microprocessor to enter amdebug technology mode on a cpu hard or soft reset. 2 prg_rst_ enb programmable reset enable 0 = programmable reset is disabled. 1 = programmable reset is enabled. setting this bit enables programmable resets, during which sdram configuration and sdram contents are preserved. after this bit is set, programmable resets can be generated by one of four sources: n prgreset pin n watchdog timer time-out-generated reset n software write to the sys_rst bit (with the prg_rst_enb bit set in the same write) n amdebug technology system reset if this bit (prg_rst_enb) is cleared, the prgreset pin has no function. the other programmable reset sources, if generated, initiate non-sdram-preserving system resets. this bit is cleared by default, so a toggle on the prgreset pin does not affect the lansc520 microcontroller. 1 gp_rst software gp bus reset software can write to this bit to control the gpreset pin and read back the pins state. the internal registers are not affected. 0 = deassert gp bus reset. 1 = assert gp bus reset.
reset generation registers 3-4 lan?sc520 microcontroller register set manual programming notes after a pwrgood reset, the programmable system reset feature is disabled and can be enabled only by software writing a 1 to the prg_rst_enb bit. if the prgreset pin is asserted after it has been enabled as a programmable reset, it causes a programmable reset, which does not reset the sdram controller configuration or contents. this allows the contents of sdram to be preserved. the pwrgood pin always has higher priority than the prgreset pin. for example, if the prgreset pin is asserted and pwrgood deasserted, pwrgood is serviced, and the pwrgood reset event disables the prgreset function. unlike most other registers, the bits in this register (rescfg) are only returned to their reset value by a pwrgood reset. they are not cleared by any other kind of reset. the amdebug technology trace information is preserved only if a soft reset is generated to the cpu. see the lan?sc520 microcontroller users manual , order #22004, for details about reset generation. table 3-3 on page 3-6 provides a summary of lansc520 microcontroller reset sources and effects. 0 sys_rst software system reset software can write to this bit to trigger a one-shot system reset. the last value written is what is read. 0 = do not cause a one-shot system reset event to be generated. 1 = cause a one-shot system reset event to be generated. setting the sys_rst bit also causes gp bus and pci-bus resets to be generated. if the prg_rst_enb bit is 1, setting the sys_rst bit results in a system reset in which the sdram configuration is maintained. bit name function
reset generation registers lan?sc520 microcontroller register set manual 3-5 reset status (ressta) memory-mapped mmcr offset d74h register description this register provides status information on the various reset sources implemented in the lansc520 microcontroller: emulated system control processor (scp)-generated reset, cpu shutdown, amdebug technology system reset, amdebug technology hard reset, watchdog timer, pwrgood signal, and prgreset signal. bit definitions 7 6 5 4 3 2 1 0 bit reserved scp_rst_ det ice_hrst_ det ice_srst_ det wdt_rst_ det sd_rst_ det prgrst_ det pwrgood_ det reset 00000001 r/w rsv r/w! r/w! r/w! r/w! r/w! r/w! r/w! bit name function 7 reserved reserved this bit field should be written to 0 for normal system operation. 6 scp_rst_ det scp reset detect this bit is set when a soft reset is generated by the scp emulation logic. software clears this bit by writing a 1. 0 = no scp reset was detected. 1 = the cpu soft reset event was from an scp reset command. (see the scpcmd register description on page 3-8). a soft reset event clears the nmi_enb bit in the picicr register (see page 12-4). this allows software to initialize the stack pointer before setting the nmi_enb bit again after a soft reset. 5 ice_hrst_ det amdebug ? technology hard reset detect this bit is set when a amdebug technology hard reset is detected. software clears this bit by writing a 1. 0 = no amdebug technology hard reset was detected. 1 = the cpu hard reset event was from an amdebug technology hard reset. 4 ice_srst_ det amdebug? technology system reset detect this bit is set when an amdebug technology system reset is detected. software clears this bit by writing a 1. 0 = no amdebug technology system reset was detected. 1 = the system reset event was from an amdebug technology system reset. if the prg_rst_enb bit is 1 in the rescfg register (see page 3-3), an amdebug technology system reset results in a programmable reset in which the sdram configuration is maintained. 3 wdt_rst_ det watchdog timer reset detect this bit is set when a watchdog timer system reset is detected. software clears this bit by writing a 1. 0 = no watchdog timer reset was detected. 1 = the system reset event was from a watchdog timer time-out. if the prg_rst_enb bit is 1 in the rescfg register (see page 3-3), a watchdog timer reset results in a programmable reset in which the sdram configuration is maintained.
reset generation registers 3-6 lan?sc520 microcontroller register set manual programming notes unlike most other registers, the bits in this register are only returned to their reset value by a pwrgood reset. they are not cleared by any other kind of reset. the amdebug technology trace information is preserved only if a soft reset is generated to the cpu. see the lan?sc520 microcontroller users manual , order #22004, for details about reset generation. table 3-3 provides a summary of lansc520 microcontroller reset sources and effects. 2 sd_rst_det cpu shutdown reset detect this bit is set when a cpu shutdown cycle (typically caused by a software triple-fault) is detected. software clears this bit by writing a 1. 0 = no cpu shutdown cycle was detected. 1 = the cpu soft reset event was from a shutdown cycle. a soft reset event clears the nmi_enb bit in the picicr register (see page 12-4). this allows software to initialize the stack pointer before setting the nmi_enb bit again after a soft reset. 1 prgrst_det prgreset detect this bit is set when a reset from prgreset pin is detected. software clears this bit by writing a 1. 0 = no prgreset pin reset was detected. 1 = the system reset event was from the prgreset pin. if the prg_rst_enb bit is 1 in the rescfg register (see page 3-3), assertion of the prgreset pin while pwrgood is asserted results in a programmable reset in which the sdram configuration is maintained. 0 pwrgood_ det powergood reset detect this bit is set when a reset from the pwrgood pin is detected. software clears this bit by writing a 1. 0 = no pwrgood pin reset was detected. 1 = the system reset event was from the pwrgood pin. this reset event has higher priority over prgreset and disables the prgreset function (if it is enabled) by clearing the prg_rst_enb bit in the rescfg register (see page 3-3). table 3-3 microcontroller reset sources source cpu (hard/soft) gpreset pin rst pin (pci) internal registers notes pwrgood pin hard 444 prgreset pin hard 444 1,2 notes: 1. the prg_rst_enb bit must be set in the rescfg register (see page 3-3) to enable the reset function on this pin. 2. if the prg_rst_enb bit is set, the sdram controller configuration is maintained to support system reset in which sdram contents are also maintained. sys_rst bit, rescfg register (see page 3-4) hard 444 2 watchdog timer reset event (page 16-2) hard 444 2 amdebug technology system reset hard 444 2 cpu_rst bit, sysctla register (page 3-9) soft 3 3. any write of a 1 to the cpu_rst bit causes a soft reset, regardless of whether the bit was previously 1 or 0. scp soft reset, scpcmd register (page 3-7) soft cpu shutdown (typically caused by a triple-fault) soft gp_rst bit, rescfg register (page 3-3) 4 pci_rst bit, hbctl register (page 6-3) 4 bit name function
reset generation registers lan?sc520 microcontroller register set manual 3-7 scp data port (scpdata) direct-mapped i/o address 0060h register description this register is used to emulate system control processor (scp) a20 gate control. bit definitions programming notes there is no internal storage element associated with this address. all accesses to this address go to the gp bus. additionally, writes to this address are snooped by the lansc520 microcontroller. 7 6 5 4 3 2 1 0 bit scp_data reserved a20_gate cpu_rst reset 00000010 r/w w! bit name function 7 C 0 scp_data system control processor data all reads and writes to this port are echoed to the gp bus. 1 a20_gate a20 gate data the lansc520 microcontroller has no external input pin for the a20 gate signal that would normally be driven by an external pc/at-compatible system control processor (scp). in order to maintain software compatibility, internal logic is provided to watch the gp bus for scp a20 gate pin control command sequences. following a write of d1h to the scpcmd register (see page 3-8), a write to this bit (a20_gate) has the following effect: 0 = internal a20 propagation is disabled (address space wraps at 1 mbyte). 1 = internal a20 propagation is enabled (addresses above 1 mbyte can be accessed). this bit (a20_gate) provides one of two sources of a20 gate control. the other source is the a20g_ctl bit in the sysctla register (see page 3-9). a logical or of these two sources is used to drive the am5 x 86 cpu a20m signal. therefore, a20 propagates if either source enables a20 to propagate. note that this bit (a20_gate) defaults to enabling a20 propagation. 0 cpu_rst cpu reset control on the lansc520 microcontroller, writing to this bit has no effect. on a pc/at-compatible system, setting this bit to 1 after a write of d1h to the scp command port (scpcmd) register would hold the system in reset indefinitely.
reset generation registers 3-8 lan?sc520 microcontroller register set manual scp command port (scpcmd) direct-mapped i/o address 0064h register description this register is used to emulate system control processor (scp) a20 gate and cpu reset commands. bit definitions programming notes there is no internal storage element associated with this address. all accesses to this address go to the gp bus. additionally, writes to this address are snooped by the lansc520 microcontroller. 7 6 5 4 3 2 1 0 bit scp_cmd reset 00000000 r/w w! bit name function 7 C 0 scp_cmd scp command the lansc520 microcontroller has no external input pins for the a20 gate and cpu reset signals that are normally driven by an external pc/at-compatible system control processor (scp). in order to maintain software compatibility, internal logic is provided to watch this port for scp command sequences. d1h = to control the a20 signal, write the value d1h to this port, then write to the a20_gate bit of the scpdata register (see page 3-7). feh = to reset the cpu, write the value feh to this port. this pulses the internal cpu sreset signal, generating a cpu soft reset. the am5 x 86 cpu cache state and the lansc520 microcontroller mmcr, indexed, and direct-mapped registers are not affected by this soft reset, with the exception that the nmi_enb bit in the picicr register is cleared (see page 12-4). clearing the nmi_enb bit allows software to initialize the stack pointer before setting the nmi_enb bit again after a soft reset. following this reset, the scp_rst_det bit in the ressta register is set to indicate the source of this reset (see page 3-5).
reset generation registers lan?sc520 microcontroller register set manual 3-9 system control port a (sysctla) direct-mapped i/o address 0092h register description this register is used for fast, alternative control of the cpu soft reset and the a20 signal. bit definitions programming notes using a read-modify-write operation to change the a20g_ctl bit can cause an unintended soft reset. this happens if the cpu_rst bit has been previously set and not cleared by software. always write 0 to the cpu_rst bit unless a soft reset is desired. 7 6 5 4 3 2 1 0 bit reserved a20g_ctl cpu_rst reset 00000000 r/w rsv r/w r/w bit name function 7 C 2 reserved reserved this bit field should be written to 0 for normal system operation. 1a20g_ctl a20 gate control this bit can be used to cause the same type of masking of the cpu a20 signal that was historically performed by an external system control processor (scp) in a pc/at-compatible system, but much faster: 0 = internal a20 propagation is disabled (address space wraps at 1 mbyte). 1 = internal a20 propagation is enabled (addresses above 1 mbyte can be accessed). this bit (a20g_ctl) provides one of two sources of a20 gate control. the other source is the a20_gate bit in the scpdata register (see page 3-7). a logical or of these two sources is used to drive the am5 x 86 cpu a20m signal. therefore, a20 propagates if either source enables a20 to propagate. note that this bit (a20g_ctl) defaults to disabling a20 propagation. however, because the default state of the a20_gate bit enables a20 propagation, a20 propagates by default. 0 cpu_rst alternate cpu core reset control writing a 1 to this bit pulses the internal cpu sreset signal. this causes the same type of cpu soft reset to occur that was historically performed by an external system control processor (scp) in a pc/at-compatible system, but much faster. the am5 x 86 cpu cache state and lansc520 microcontroller mmcr, indexed, and direct- mapped registers are not affected by this soft reset, with the exception that the nmi_enb bit in the picicr register is cleared (see page 12-4). clearing the nmi_enb bit allows software to initialize the stack pointer before setting the nmi_enb bit again after a soft reset. following the reset, this bit (cpu_rst) remains set until software clears it. this feature can be used by the bios as an indication that this bit generated the reset. however, writing a 1 to the cpu_rst bit always generates a soft reset, even if the bit was not cleared after a previous reset. 0 = do not generate a soft reset to the cpu core. 1 = pulse the internal cpu sreset signal.
reset generation registers 3-10 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 4-1 chapter 4 am5 x 86 ? cpu registers 4.1 overview this chapter describes the am5 x 86? cpu configuration registers of the lansc520 microcontroller. am5 x 86 cpu includes a 16-kbyte unified write-back cache and an integrated floating-point unit (fpu). the am5 x 86 cpu operates at 100 or 133 mhz . the am5 x 86 cpu configuration register set consists of two memory-mapped configuration region (mmcr) registers used to control some of the am5 x 86 cpu features and read the lansc520 microcontroller revision id. see the lan?sc520 microcontroller users manual , order #22004, for details about the am5 x 86 cpu. table 4-1 lists the am5 x 86 cpu configuration registers in offset order, with the corresponding descriptions page number. this chapter does not document am5 x 86 processor registers. 4.2 registers table 4-1 am5 x 86? cpu mmcr registers register name mnemonic mmcr offset page number lansc520 microcontroller revision id revid 00h page 4-2 am5 x 86? cpu control cpuctl 02h page 4-3
am5 x 86 ? cpu registers 4-2 lan?sc520 microcontroller register set manual lan?sc520 microcontroller revision id (revid) memory-mapped mmcr offset 00h register description this register provides bit fields that identify the amd microcontroller and its version. these values are hard-wired in the device. different revisions of a product can be distinguished by the majorstep and minorstep bit fields. bit definitions programming notes the value that is read back depends on the current major and minor revision level of the specific lansc520 microcontroller. contact your amd representative for information about available revision levels. 15 14 13 12 11 10 9 8 bit product_id [7C0] reset 00000000 r/w r 7 6 5 4 3 2 1 0 bit majorstep[3 C 0] minorstep[3 C 0] reset xxxxxxxx r/w rr bit name function 15 C 8 product_id [7C0] product type of lan?sc520 microcontroller 00000000 = identifies the product as the lansc520 microcontroller . 7 C 4 majorstep [3 C 0] major stepping level this bit field represents the microcontrollers major revision level. a different majorstep bit field value is assigned to each major revision of the microcontroller. 3 C 0 minorstep [3 C 0] minor stepping level this bit field represents the microcontrollers minor revision level. a larger minorstep bit field value indicates a later revision within a particular majorstep bit field level.
am5 x 86 ? cpu registers lan?sc520 microcontroller register set manual 4-3 am5 x 86? cpu control (cpuctl) memory-mapped mmcr offset 02h register description this register controls the am5 x 86 cpu s cache write-back mode and clock speed. bit definitions programming notes the am5 x 86 cpu core is reset during a hard reset, and the am5 x 86 cpu core clock frequency defaults to 100 mhz. the am5 x 86 cpu core clock frequency remains the same and the cache state and policy are unaffected by a soft reset. see the lan?sc520 microcontroller users manual , order #22004, for details about hard and soft resets. table 3-3 on page 3-6 provides a summary of lansc520 microcontroller reset sources and effects. 7 6 5 4 3 2 1 0 bit reserved cache_ wr_mode reserved cpu_clk_spd [1C0] reset 00000001 r/w rsv r/w rsv r/w bit name function 7 C 5 reserved reserved this bit field should be written to 0 for normal system operation. 4 cache_wr_ mode cache write mode this bit enables the write-back mode of the am5 x 86 cpu cache. 0 = write-back mode (default). 1 =write-through mode. if this bit is set, the cache operates in write-through mode regardless of the setting of the nw bit i n the processors internal cr0 register, or the pwt bit of the corresponding page table entry. 3 C 2 reserved reserved this bit field should be written to 0 for normal system operation. 1 C 0 cpu_clk_spd [1C0] cpu clock speed this bit field specifies the clock speed at which the am5 x 86 cpu runs. note that there is a 1 ms delay for the am5 x 86 cpu pll to switch to the new frequency after this bit field is changed. 00 = reserved 01 = 100 mhz (default) 10 = 133 mhz 11 = reserved
am5 x 86 ? cpu registers 4-4 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 5-1 chapter 5 system arbitration registers 5.1 overview this chapter describes the system arbiter registers of the lansc520 microcontroller. the lansc520 microcontrollers system arbiter controls access to the pci bus and the internal cpu bus. the system arbiter register set consists of four memory-mapped configuration region (mmcr) registers that provide control and status functions. see the lan?sc520 microcontroller users manual , order #22004, for details about the system arbiter. table 5-1 lists the system arbiter registers in offset order, with the corresponding descriptions page number. 5.2 registers table 5-1 system arbiter mmcr registers register name mnemonic mmcr offset page number system arbiter control sysarbctl 70h page 5-2 pci bus arbiter status pciarbsta 71h page 5-3 system arbiter master enable sysarbmenb 72h page 5-4 arbiter priority control arbprictl 74h page 5-6
system arbitration registers 5-2 lan?sc520 microcontroller register set manual system arbiter control (sysarbctl) memory-mapped mmcr offset 70h register description this register contains control bits for the cpu bus arbiter and the pci bus arbiter. bit definitions programming notes 7 6 5 4 3 2 1 0 bit reserved bus_ park_sel cncr_ mode_ enb gnt_to_ int_enb reset 00000000 r/w rsv r/w r/w r/w bit name function 7C3 reserved reserved this bit field should be written to 0 for normal system operation. 2 bus_park_ sel pci bus arbiter bus park this bit controls which pci master the pci bus arbiter parks on when the pci bus is idle. 0 = park the pci bus on the am5 x 86 cpu. 1 = park the pci bus on the last pci master that acquired the bus. this bit must be 0 when operating in nonconcurrent mode. the bus_park_sel bit must not be changed except when the pci bus is currently parked on the am5 x 86 cpu. this is the default state after a system reset. see the lan?sc520 microcontroller users manual , order #22004, for information about system arbiter initialization. 1 cncr_mode_ enb system arbiter concurrent mode enable this bit enables the system arbiter to operate in concurrent mode. when operating in nonconcurrent mode, the bus_park_sel bit must be configured to park on the am5 x 86 cpu. 0 = the system arbiter operates in nonconcurrent mode. 1 = the system arbiter operates in concurrent mode. the cncr_mode_enb bit must not be changed except during system arbiter initialization after a system reset. see the lan?sc520 microcontroller users manual , order #22004, for information about system arbiter initialization. 0 gnt_to_int_ enb pci bus arbiter grant time-out interrupt enable this bit is used to enable interrupts that are generated when the pci bus arbiter detects a grant time-out. 0 = disable pci bus arbiter interrupts. 1 = enable pci bus arbiter interrupts. note that the gnt_to_sta bit of the pciarbsta register (see page 5-3) is set on pci bus arbiter grant time-outs regardless of the gnt_to_int_enb bit value. this interrupt source shares the interrupt controller input used by any host bridge interrupts enabled in the hbtgtirqctl and hbmstirqctl registers (see page 6-5 and page 6-9). before the gnt_to_int_enb bit is set, the pcihostmap register (see page 12-17) must be configured to route the interrupt to the appropriate interrupt request level and priority.
system arbitration registers lan?sc520 microcontroller register set manual 5-3 pci bus arbiter status (pciarbsta) memory-mapped mmcr offset 71h register description this register provides grant time-out status of the pci bus arbiter. bit definitions programming notes 7 6 5 4 3 2 1 0 bit gnt_to_ sta reserved gnt_to_id [3C0] reset 00001111 r/w r/w! rsv r bit name function 7 gnt_to_sta pci bus arbiter grant time-out status this bit is set when the pci bus arbiter detects a grant time-out (transaction not started within 16 clocks of the pci bus going idle). the gnt that was asserted when this condition occurs can be read in the gnt_to_id bit field. 0 = grant time-out has not occurred. 1 = grant time-out has occurred. this bit (gnt_to_sta) is cleared by writing a 1. this bit operates regardless of the corresponding interrupt enable bit (gnt_to_int_enb in the sysarbctl register, see page 5-2). when enabled as an interrupt, this source shares the interrupt controller input used by any host bridge interrupts enabled in the hbtgtirqctl and hbmstirqctl registers (see page 6-5 and page 6-9). 6C4 reserved reserved this bit field should be written to 0 for normal system operation. 3C0 gnt_to_id [3C0] pci bus arbiter grant time-out identification this bit field identifies which gnt was asserted when the pci arbiter detected a grant time- out. this bit field is reset to ones by writing a one to the gnt_to_sta bit. 0000 = gnt0 was asserted when a grant time-out was detected. 0001 = gnt1 was asserted when a grant time-out was detected. 0010 = gnt2 was asserted when a grant time-out was detected. 0011 = gnt3 was asserted when a grant time-out was detected. 0100 = gnt4 was asserted when a grant time-out was detected. 0101C1101 = reserved 1110 = the am5 x 86 cpu gnt was asserted when a grant time-out was detected. 1111 = no grant time-out was detected, or gnt was asserted when a grant time-out was detected but not latched.
system arbitration registers 5-4 lan?sc520 microcontroller register set manual system arbiter master enable (sysarbmenb) memory-mapped mmcr offset 72h register description this register selects the masters that are enabled for arbitration. bit definitions 15 14 13 12 11 10 9 8 bit reserved reset 00000000 r/w rsv 7 6 5 4 3 2 1 0 bit reserved req4_enb req3_enb req2_enb req1_enb req0_enb reset 00000000 r/w rsv r/w r/w r/w r/w r/w bit name function 15C5 reserved reserved this bit field should be written to 0 for normal system operation. 4 req4_enb pci bus arbiter request #4 enable this bit enables the pci master request connected to the req4 pin. if this request is disabled, the pci bus arbiter does not assert gnt4 to allow the pci master connected to req4 and gnt4 to access the pci bus. 0 = the pci master request connected to the req4 pin is disabled. 1 = the pci master request connected to the req4 pin is enabled. 3 req3_enb pci bus arbiter request #3 enable this bit enables the pci master request connected to the req3 pin. if this request is disabled, the pci bus arbiter does not assert gnt3 to allow the pci master connected to the req3 and gnt3 pins to access the pci bus. 0 = the pci master request connected to the req3 pin is disabled. 1 = the pci master request connected to the req3 pin is enabled. 2 req2_enb pci bus arbiter request #2 enable this bit enables the pci master request connected to the req2 pin. if this request is disabled, the pci bus arbiter does not assert gnt2 to allow the pci master connected to the req2 and gnt2 pins to access the pci bus. 0 = the pci master request connected to the req2 pin is disabled. 1 = the pci master request connected to the req2 pin is enabled. 1 req1_enb pci bus arbiter request #1 enable this bit enables the pci master request connected to the req1 pin. if this request is disabled, the pci bus arbiter does not assert gnt1 to allow the pci master connected to the req1 and gnt1 pins to access the pci bus. 0 = the pci master request connected to the req1 pin is disabled. 1 = the pci master request connected to the req1 pin is enabled.
system arbitration registers lan?sc520 microcontroller register set manual 5-5 programming notes 0 req0_enb pci bus arbiter request #0 enable this bit enables the pci master request connected to the req0 pin. if this request is disabled, the pci bus arbiter does not assert gnt0 to allow the pci master connected to the req0 and gnt0 pins to access the pci bus. 0 = the pci master request connected to the req0 pin is disabled. 1 = the pci master request connected to the req0 pin is enabled. bit name function
system arbitration registers 5-6 lan?sc520 microcontroller register set manual arbiter priority control (arbprictl) memory-mapped mmcr offset 74h register description this register defines priorities for the pci bus arbiter. bit definitions 31 30 29 28 27 26 25 24 bit cpu_pri [1C0] reserved reset 01000000 r/w r/w rsv 23 22 21 20 19 18 17 16 bit reserved reset 00000000 r/w rsv 15 14 13 12 11 10 9 8 bit reserved hi_pri_1_sel[3C0] reset 00001111 r/w rsv r/w r/w r/w r/w 7 6 5 4 3 2 1 0 bit reserved hi_pri_0_sel[3C0] reset 00001111 r/w rsv r/w r/w r/w r/w bit name function 31C30 cpu_pri[1C0] pci bus arbiter cpu priority this bit field defines the relative am5 x 86 cpu pci master priority. 00 = reserved. 01 = the am5 x 86 cpu is granted the pci bus after every one external pci master cycle. 10 = the am5 x 86 cpu is granted the pci bus after every two external pci master cycles. 11 = the am5 x 86 cpu is granted the pci bus after every three external pci master cycles. 29C12 reserved reserved this bit field should be written to 0 for normal system operation.
system arbitration registers lan?sc520 microcontroller register set manual 5-7 programming notes 11C8 hi_pri_1_sel [3C0] pci bus arbiter high priority 1 this bit defines which pci master is in position 1 of the high-priority queue. 0000 = pci master connected to req0 and gnt0 is in position 1 of the high-priority queue. 0001 = pci master connected to req1 and gnt1 is in position 1 of the high-priority queue. 0010 = pci master connected to req2 and gnt2 is in position 1 of the high-priority queue. 0011 = pci master connected to req3 and gnt3 is in position 1 of the high-priority queue. 0100 = pci master connected to req4 and gnt4 is in position 1 of the high-priority queue. 0101C1110 = reserved. 1111 = no master is in position 1 of the high-priority queue. 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3C0 hi_pri_0_sel [3C0] pci bus arbiter high priority 0 this bit defines which pci master is in position 0 of the high-priority queue. 0000 = pci master connected to req0 and gnt0 is in position 0 of the high-priority queue. 0001 = pci master connected to req1 and gnt1 is in position 0 of the high-priority queue. 0010 = pci master connected to req2 and gnt2 is in position 0 of the high-priority queue. 0011 = pci master connected to req3 and gnt3 is in position 0 of the high-priority queue. 0100 = pci master connected to req4 and gnt4 is in position 0 of the high-priority queue. 0101C1110 = reserved. 1111 = no master is in position 0 of the high-priority queue. bit name function
system arbitration registers 5-8 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 6-1 chapter 6 pci bus host bridge registers 6.1 overview this chapter describes the pci bus host bridge controller registers of the lansc520 microcontroller. the lansc520 microcontroller includes an integrated pci bus host bridge controller. the host bridge allows the am5 x 86 cpu to generate pci bus master cycles and allows pci bus masters to access the lansc520 microcontrollers sdram. the host bridge register set includes three groups of registers: n six memory-mapped configuration region (mmcr) registers are used to configure and control most functions specific to the lansc520 microcontroller host bridge. n two direct-mapped i/o addresses are used to access the pci bus configuration space for both the host bridge and for any other devices present on the pci bus. n five host bridge-specific pci bus indexed registers in the pci bus configuration space provide the mandatory header registers that are required for any pci bus device, plus the master retry time-out register. in addition to the host bridge, the pci bus can contain several other devices, each with its own pci configuration space that is also accessed via the two pci direct-mapped registers. access from other pci bus masters to the host bridge registers is not supported. the host bridge implements only those configuration registers that are related to the host bridge functions. see the lan?sc520 microcontroller users manual , order #22004, for details about the host bridge controller. table 6-1, table 6-2 on page 6-2, and table 6-3 on page 6-2 list each type of host bridge controller register in offset order with the corresponding descriptions page number. 6.2 registers table 6-1 pci bus host bridge mmcr registers register name mnemonic mmcr offset page number host bridge control hbctl 60h page 6-3 host bridge target interrupt control hbtgtirqctl 62h page 6-5 host bridge target interrupt status hbtgtirqsta 64h page 6-7 host bridge master interrupt control hbmstirqctl 66h page 6-9 host bridge master interrupt status hbmstirqsta 68h page 6-12 host bridge master interrupt address mstintadd 6ch page 6-14
pci bus host bridge registers 6-2 lan?sc520 microcontroller register set manual table 6-2 pci bus host bridge direct-mapped registers register name mnemonic i/o address page number pci configuration address pcicfgadr 0cf8h page 6-15 pci configuration data pcicfgdata 0cfch page 6-17 table 6-3 pci bus host bridge indexed registers register name mnemonic i/o address pci index page number device/vendor id pcidevid 0cf8h/0cfch 00h page 6-18 status/command pcistacmd 0cf8h/0cfch 04h page 6-19 class code/revision id pciccrevid 0cf8h/0cfch 08h page 6-22 header type pciheadtype 0cf8h/0cfch 0eh page 6-23 master retry time-out pcimretryto 0cf8h/0cfch 41h page 6-24
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-3 host bridge control (hbctl) memory-mapped mmcr offset 60h register description this register contains bit fields for configuring the host bridge controller. bit definitions 15 14 13 12 11 10 9 8 bit pci_rst reserved t_purge_ rd_enb t_dlytr_enb[ 1C0] reset 00000000 r/w r/w! rsv r/w r/w 7 6 5 4 3 2 1 0 bit reserved m_ wpost_ enb reserved reset 00000000 r/w rsv r/w rsv bit name function 15 pci_rst pci bus reset this bit controls the pci bus rst signal pin. reading this bit returns the value that was written to it. 0 = deassert the pci bus reset signal. 1 = assert the pci bus reset signal. note that a pci bus reset affects the host bridge-specific registers in the pci configuration space. see the pci-indexed register descriptions beginning on page 6-18. the pci_rst bit must be cleared only in accordance with the pci bus specification. 14 C 11 reserved reserved this bit field should be written to 0 for normal system operation. 10 t_purge_ rd_enb target fifo purge enable this bit is provided for data coherency. it forces the host bridge target controller to snoop the target read fifos when a pci bus write transaction occurs. 0 = the target read fifos are not snooped during write transactions. 1 = the target read fifos are snooped during pci bus write transactions. the target controller purges any data in the read fifos when the write transaction falls within the same cache line for a read or read-line command, or within the same 64 doublewords for a read-multiple command. the t_purge_rd_enb bit must not be changed except during pci bus initialization after a system reset. see the lan?sc520 microcontroller users manual , order #22004, for information about pci bus initialization.
pci bus host bridge registers 6-4 lan?sc520 microcontroller register set manual programming notes this register is reset by a system reset. the bits in this register are not affected by a pci bus reset. a pci bus reset is initiated by setting the pci_rst bit. 9 C 8 t_dlytr_enb [1 C0] automatic delayed transaction enable this bit forces all pci bus master reads of microcontroller sdram to be treated as delayed transactions unless the host bridge has already completed the transaction from a previous request. setting this bit allows unused pci bus bandwidth to be used by other pci bus masters while the read transaction from the first master is being serviced. 00 = pci bus reads to sdram are not automatically retried as delayed transactions. instead, the originating pci bus master is held in wait states while the host bridge begins the sdram read transaction. if 32 pci bus clock cycles pass before the first doubleword has been read from sdram by the host bridge target controller, the bridge then issues a retry (as required for pci compliance). 01 = all pci bus reads to sdram are automatically retried as delayed transactions unless the host bridge has already completed the transaction from a previous request. this occurs when a pci bus master has already issued the transaction previously, and was issued a retry by the host bridge target controller. 10 = reserved 11 = reserved 7 C 4 reserved reserved this bit field should be written to 0 for normal system operation. 3 m_wpost_ enb master controller write posting enable this bit enables am5 x 86 cpu-to-pci bus memory write cycles to be posted writes. 0 = disables am5 x 86 cpu-to-pci bus write posting. 1 = enables am5 x 86 cpu-to-pci bus write posting. note that this bit should not be set while the microcontroller is configured for non-concurrent arbitration mode (i.e., while the cncr_mode_enb bit is clear in the sysarbctl register, see page page 5-2). 2 C 0 reserved reserved this bit field should be written to 0 for normal system operation. bit name function
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-5 host bridge target interrupt control (hbtgtirqctl) memory-mapped mmcr offset 62h register description this register contains bit fields for configuring and enabling host bridge target interrupts. bit definitions 15 14 13 12 11 10 9 8 bit reserved t_dlyto_ irq_sel t_aper_ irq_sel t_dper_ irq_sel reset 00000000 r/w rsv r/w r/w r/w 7 6 5 4 3 2 1 0 bit reserved t_dlyto_ irq_enb t_aper_ irq_enb t_dper_ irq_enb reset 00000000 r/w rsv r/w r/w r/w bit name function 15 C 11 reserved reserved this bit field should be written to 0 for normal system operation. 10 t_dlyto_ irq_sel target delayed transaction time-out interrupt select this bit allows delayed transaction time-outs to generate an nmi instead of a maskable interrupt. 0 = delayed transaction time-outs generate a maskable interrupt. 1 = delayed transaction time-outs generate an nmi. 9 t_aper_ irq_sel target address parity interrupt select this bit allows address parity errors detected by the target controller to generate an nmi instead of a maskable interrupt. 0 = address parity errors generate a maskable interrupt. 1 = address parity errors generate an nmi. 8 t_dper_ irq_sel target data parity interrupt select this bit allows data parity errors detected by the target controller to generate an nmi instead of a maskable interrupt. 0 = data parity errors generate a maskable interrupt. 1 = data parity errors generate an nmi. 7 C 3 reserved reserved this bit field should be written to 0 for normal system operation. 2t_dlyto_ irq_enb target delayed transaction time-out interrupt enable this bit allows delayed transaction time-outs to generate an interrupt. 0 = delayed transaction time-outs do not generate an interrupt. 1 = delayed transaction time-outs generate an interrupt. 1 t_aper_ irq_enb target address parity interrupt enable this bit allows address parity errors detected by the target controller to generate an interrupt. 0 = address parity errors do not generate an interrupt. 1 = address parity errors generate an interrupt.
pci bus host bridge registers 6-6 lan?sc520 microcontroller register set manual programming notes this register is reset by a system reset. the bits in this register are not affected by a pci bus reset. a pci bus reset is initiated by setting the pci_rst bit in the hbctl register (see page 6-3). interrupt status bits are set whenever the associated event occurs regardless of the corresponding interrupt enable bit. for a host bridge nmi to propagate to the cpu, host bridge nmis must be enabled via the pci_nmi_enb bit in the pcihostmap register (see page 12-17), and nmis must be enabled via the nmi_enb bit in the picicr register (see page 12-4). before host bridge interrupts are enabled, the pcihostmap register (see page 12-17) must be configured to route the interrupt to the appropriate interrupt request level and priority. the interrupt enabled via the gnt_to_int_enb bit in the sysarbctl register (see page 5-2) shares the interrupt controller input used by host bridge interrupts. 0 t_dper_ irq_enb target data parity interrupt enable this bit allows data parity errors detected by the target controller to generate an interrupt. 0 = data parity errors do not generate an interrupt. 1 = data parity errors generate an interrupt. bit name function
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-7 host bridge target interrupt status (hbtgtirqsta) memory-mapped mmcr offset 64h register description this register contains the host bridge target interrupt status bits and active master identification. bit definitions 15 14 13 12 11 10 9 8 bit reserved t_irq_id[ 3C0] reset 00001111 r/w rsv r 7 6 5 4 3 2 1 0 bit reserved t_dlyto_ irq_sta t_aper_ irq_sta t_dper_ irq_sta reset 00000000 r/w rsv r/w! r/w! r/w! bit name function 15 C 12 reserved reserved this bit field should be written to 0 for normal system operation. 11 C 8 t_irq_id[ 3C0] target interrupt identification this bit field reports which pci bus master was active when the target controller detected an error condition (delay transaction time-out, address parity error, data parity error). this bit field is only valid when an interrupt status bit is set. it is reset to 1111b when the interrupt status is cleared. 0000 = pci bus master 0 was active when the error was detected. 0001 = pci bus master 1 was active when the error was detected. 0010 = pci bus master 2 was active when the error was detected. 0011 = pci bus master 3 was active when the error was detected. 0100 = pci bus master 4 was active when the error was detected. 1111 = no error was detected or the bus master value was not latched. for example, a bus master value is not latched if multiple interrupts are pending and one interrupt status was cleared. other =reserved. when multiple interrupts are pending, this bit field represents the pci bus master active when the first interrupt occurred, but there is no way for software to detect which interrupt this is. 7 C 3 reserved reserved this bit field should be written to 0 for normal system operation. 2t_dlyto_ irq_sta target delayed transaction time-out interrupt status this bit is set when the target controller issues a delayed transaction retry, the pci bus master does not retry the transaction within 2 15 clocks, and the target controller is idle (i.e., no pci-to- sdram transaction is active on the pci bus). 0 = delayed transaction time-out has not occurred. 1 = delayed transaction time-out has occurred. this bit is cleared by writing a 1. the target controller discards the delayed transaction request when this bit is set. this bit operates regardless of the corresponding interrupt enable bit (t_dlyto_irq_enb in the hbtgtirqctl register, see page 6-5).
pci bus host bridge registers 6-8 lan?sc520 microcontroller register set manual programming notes this register is reset by a system reset. the bits in this register are not affected by a pci bus reset. a pci bus reset is initiated by setting the pci_rst bit in the hbctl register (see page 6-3). 1 t_aper_ irq_sta target address parity interrupt status this bit is set when the target controller detects an address parity error. 0 = address parity error has not occurred. 1 = address parity error has occurred. this bit is cleared by writing a 1. this bit operates regardless of the corresponding interrupt enable bit (t_aper_irq_enb in the hbtgtirqctl register, see page 6-5), or the parity error response bit (perr_res in the pcistacmd register, see page 6-21). 0 t_dper_ irq_sta target data parity interrupt status this bit is set when the target controller detects a data parity error. 0 = data parity error has not occurred. 1 = data parity error has occurred. this bit is cleared by writing a 1. this bit operates regardless of the corresponding interrupt enable bit (t_dper_irq_enb in the hbtgtirqctl register, see page 6-6), or the parity error response bit (perr_res in the pcistacmd register, see page 6-21). bit name function
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-9 host bridge master interrupt control (hbmstirqctl) memory-mapped mmcr offset 66h register description this register contains bit fields for configuring and enabling host bridge master interrupts. bit definitions 15 14 13 12 11 10 9 8 bit reserved m_rtrto_ irq_sel m_tabrt_ irq_sel m_mabrt_ irq_sel m_serr_ irq_sel m_rper_ irq_sel m_dper_ irq_sel reset 00000000 r/w rsv r/w r/w r/w r/w r/w r/w 7 6 5 4 3 2 1 0 bit reserved m_rtrto_ irq_enb m_tabrt_ irq_enb m_mabrt_ irq_enb m_serr_ irq_enb m_rper_ irq_enb m_dper_ irq_enb reset 00000000 r/w rsv r/w r/w r/w r/w r/w r/w bit name function 15 C 14 reserved reserved this bit field should be written to 0 for normal system operation. 13 m_rtrto_ irq_sel master retry time-out interrupt select this bit allows master retry time-outs to generate an nmi instead of a maskable interrupt. 0 = master retry time-outs generate a maskable interrupt. 1 = master retry time-outs generate an nmi. 12 m_tabrt_ irq_sel master target abort interrupt select this bit allows master controller transactions that are terminated with a target abort to generate an nmi instead of a maskable interrupt. 0 = master transactions that are terminated with a master abort generate a maskable interrupt. 1 = master transactions that are terminated with a master abort generate an nmi. 11 m_mabrt_ irq_sel master abort interrupt select this bit allows master controller transactions that are terminated with a master abort to generate an nmi instead of a maskable interrupt. 0 = master transactions that are terminated with a master abort generate a maskable interrupt. 1 = master transactions that are terminated with a master abort generate an nmi. 10 m_serr_ irq_sel master system error interrupt select this bit allows the assertion of the system error signal (serr ) to generate an nmi instead of a maskable interrupt. 0 = assertion of the system error signal generates a maskable interrupt. 1 = assertion of the system error signal generates an nmi.
pci bus host bridge registers 6-10 lan?sc520 microcontroller register set manual programming notes this register is reset by a system reset. the bits in this register are not affected by a pci bus reset. a pci bus reset is initiated by setting the pci_rst bit in the hbctl register (see page 6-3). interrupt status bits are set whenever the associated event occurs regardless of the corresponding interrupt enable bit. 9 m_rper_ irq_sel master received parity error interrupt select this bit allows the assertion of the parity error signal (perr ) during a master controller write transaction or during the address phase of a master controller read transaction to generate an nmi instead of a maskable interrupt. 0 = master write transactions or master read address phase cycles that detect the parity error signal asserted generate a maskable interrupt. 1 = master write transactions or master read address phase cycles that detect the parity error signal asserted generate an nmi. 8 m_dper_ irq_sel master detected parity error interrupt select this bit allows parity errors detected by the master controller during a read transaction to generate an nmi instead of a maskable interrupt. 0 = master read transactions that detect a parity error generate a maskable interrupt. 1 = master read transactions that detect a parity error generate an nmi. 7 C 6 reserved reserved this bit field should be written to 0 for normal system operation. 5m_rtrto_ irq_enb master retry time-out interrupt enable this bit allows master retry time-outs to generate an interrupt. 0 = master retry time-outs do not generate an interrupt. 1 = master retry time-outs generate an interrupt. 4 m_tabrt_ irq_enb master target abort interrupt enable this bit allows master controller transactions that are terminated with a target abort to generate an interrupt. 0 = master transactions that are terminated with a target abort do not generate an interrupt. 1 = master transactions that are terminated with a target abort generate an interrupt. 3 m_mabrt_ irq_enb master abort interrupt enable this bit allows master controller transactions that are terminated with a master abort to generate an interrupt. 0 = master transactions that are terminated with a master abort do not generate an interrupt. 1 = master transactions that are terminated with a master abort generate an interrupt. 2 m_serr_ irq_enb master system error interrupt enable this bit allows the assertion of the system error signal (serr ) by a pci bus agent to generate an interrupt. 0 = assertion of the system error signal does not generate an interrupt. 1 = assertion of the system error signal generates an interrupt. 1 m_rper_ irq_enb master received parity error interrupt enable this bit allows the assertion of the parity error signal (perr ) during a master controller write transaction or during the address phase of a master controller read transaction to generate an interrupt. 0 = master write transactions or master read address phase cycles that detect the parity error signal asserted do not generate an interrupt. 1 = master write transactions or master read address phase cycles that detect the parity error signal asserted generate an interrupt. 0 m_dper_ irq_enb master detected parity error interrupt enable this bit allows parity errors detected by the master controller during a read transaction to generate an interrupt. 0 = master read transactions that detect a parity error do not generate an interrupt. 1 = master read transactions that detect a parity error generate an interrupt. bit name function
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-11 for a host bridge nmi to propagate to the cpu, host bridge nmis must be enabled via the pci_nmi_enb bit in the pcihostmap register (see page 12-17), and nmis must be enabled via the nmi_enb bit in the picicr register (see page 12-4). before host bridge interrupts are enabled, the pcihostmap register (see page 12-17) must be configured to route the interrupt to the appropriate interrupt request level and priority. the interrupt enabled via the gnt_to_int_enb bit in the sysarbctl register (see page 5-2) shares the interrupt controller input used by host bridge interrupts.
pci bus host bridge registers 6-12 lan?sc520 microcontroller register set manual host bridge master interrupt status (hbmstirqsta) memory-mapped mmcr offset 68h register description this register contains host bridge master controller interrupt status bits and command interrupt identification. bit definitions 15 14 13 12 11 10 9 8 bit reserved m_cmd_irq_id[ 3C0] reset 00000000 r/w rsv r 7 6 5 4 3 2 1 0 bit reserved m_rtrto_ irq_sta m_tabrt_ irq_sta m_mabrt_ irq_sta m_serr_ irq_sta m_rper_ irq_sta m_dper_ irq_sta reset 00000000 r/w rsv r/w! r/w! r/w! r/w! r/w! r/w! bit name function 15 C 12 reserved reserved this bit field should be written to 0 for normal system operation. 11 C 8 m_cmd_ irq_id[ 3C0] master command interrupt identification this bit field reports the command of the transaction during which the master controller detected an error condition. this bit field is valid only when an interrupt status bit is set. it is cleared when the interrupt status is cleared. 0000 = the command was not latched. for example, the command is not latched if multiple interrupts are pending and one interrupt status was cleared. 0001 = special cycle (not used by the lansc520 microcontroller). 0010 = i/o read. 0011 = i/o write. 0100C0101 = reserved. 0110 = memory read. 0111 = memory write. 1000C1001 = reserved. 1010 = configuration read. 1011 = configuration write. 1100 = memory read multiple (not used by the lansc520 microcontroller). 1101 = dual-address cycle (not used by the lansc520 microcontroller). 1110 = memory read line (not used by the lansc520 microcontroller). 1111 = memory write and invalidate (not used by the lansc520 microcontroller). if multiple errors are detected, only the command of the first error is latched. when multiple error interrupts are pending, there is no indication of which interrupt the command corresponds to. the mstintadd register (see page 6-14) contains the address of the transaction during which the master controller detected an error condition. 7 C 6 reserved reserved this bit field should be written to 0 for normal system operation.
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-13 programming notes this register is reset by a system reset. the bits in this register are not affected by a pci bus reset. a pci bus reset is initiated by setting the pci_rst bit in the hbctl register (see page 6-3). 5m_rtrto_ irq_sta master retry time-out interrupt status this bit is set when the master controller retry time-out counter expires. 0 = master retry time-out has not occurred. 1 = master retry time-out has occurred. this bit is cleared by writing a 1. this bit operates regardless of the corresponding interrupt enable bit (m_rtrto_irq_enb in the hbmstirqctl register, see page 6-10). 4 m_tabrt_ irq_sta master target abort interrupt status this bit is set when a master controller transaction is terminated with a target abort. 0 = master controller transaction has not been terminated with a target abort. 1 = master controller transaction has been terminated with a target abort. this bit is cleared by writing a 1. this bit operates regardless of the corresponding interrupt enable bit (m_tabrt_irq_enb in the hbmstirqctl register, see page 6-10). 3 m_mabrt_ irq_sta master abort interrupt status this bit is set when a master controller transaction is terminated with a master abort. 0 = master controller transaction has not been terminated with a master abort. 1 = master controller transaction has been terminated with a master abort. this bit is cleared by writing a 1. this bit operates regardless of the corresponding interrupt enable bit (m_mabrt_irq_enb in the hbmstirqctl register, see page 6-10). 2 m_serr_ irq_sta master system error interrupt status this bit is set when the master controller detects the system error signal asserted. 0 = master controller has not detected the system error signal asserted. 1 = master controller has detected the system error signal asserted. this bit is cleared by writing a 1. this bit operates regardless of the corresponding interrupt enable bit (m_serr_irq_enb in the hbmstirqctl register, see page 6-10). 1 m_rper_ irq_sta master received parity error interrupt status this bit is set when the master controller detects the parity error signal asserted during a master controller write transaction or during the address phase of a master controller read transaction. 0 = master controller has not detected the parity error signal asserted. 1 = master controller has detected the parity error signal asserted. this bit is cleared by writing a 1. this bit operates regardless of the corresponding interrupt enable bit (m_rper_irq_enb in the hbmstirqctl register, see page 6-10). 0 m_dper_ irq_sta master detected parity error interrupt status this bit is set when the master controller detects a parity error during a master controller read transaction. 0 = master controller has not detected a parity error. 1 = master controller has detected a parity error. this bit is cleared by writing a 1. this bit operates regardless of the corresponding interrupt enable bit (m_dper_irq_enb in the hbmstirqctl register, see page 6-10). bit name function
pci bus host bridge registers 6-14 lan?sc520 microcontroller register set manual host bridge master interrupt address (mstintadd) memory-mapped mmcr offset 6ch register description this bit field reports the address of the transaction during which the master controller detected an error condition. bit definitions programming notes this register is reset by a system reset. the bits in this register are not affected by a pci bus reset. a pci bus reset is initiated by setting the pci_rst bit in the hbctl register (see page 6-3). 31 30 29 28 27 26 25 24 bit m_ad_irq_id[31 C 24] reset 00000000 r/w r 23 22 21 20 19 18 17 16 bit m_ad_irq_id[23 C 16] reset 00000000 r/w r 15 14 13 12 11 10 9 8 bit m_ad_irq_id[15 C 8] reset 00000000 r/w r 7 6 5 4 3 2 1 0 bit m_ad_irq_id[7 C 0] reset 00000000 r/w r bit name function 31 C 0 m_ad_irq_id [31 C 0] master address interrupt identification this bit field reports the address of the transaction during which the master controller detected an error condition. if multiple errors are detected, only the address of the first error is latched. this bit field is only valid when an interrupt status bit is set. it is cleared when any interrupt status bit is cleared. a value of 00000000h means the address was not latched (unless the error happened to occur at address 00000000h). for example, the address is not latched if multiple interrupts are pending and one interrupt status was cleared. when multiple interrupts are pending, there is no indication of which interrupt the address corresponds to. the m_cmd_irq_id bit field in the hbmstirqsta register (see page 6-12) contains the command of the transaction during which the master controller detected an error condition.
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-15 pci configuration address (pcicfgadr) direct-mapped i/o address 0cf8h register description this register is used to specify the information to be driven out during the address phase of the next configuration cycle, which is initiated by a subsequent read or write of the pcicfgdata register (see page 6-17). bit definitions 31 30 29 28 27 26 25 24 bit enable reserved reset 00000000 r/w r/w! rsv 23 22 21 20 19 18 17 16 bit bus_num[7C0] reset 00000000 r/w r/w! 15 14 13 12 11 10 9 8 bit device_num[4C0] function_num[2C0] reset 00000000 r/w r/w! r/w! 7 6 5 4 3 2 1 0 bit register_num[5C0] reserved reset 00000000 r/w r/w! rsv! bit name function 31 enable enable 0 = accesses to the pcicfgdata register (see page 6-17) are not converted to configuration cycles on the pci bus. they remain normal i/o cycles. 1 = accesses to the pcicfgdata register are converted to configuration cycles on the pci bus. 30C24 reserved reserved this bit field should be written to 0 for normal system operation. 23C16 bus_num[7C0] bus number this bit field specifies the pci bus number to which the configuration cycle is addressed. 00h = specifies the pci bus that is connected to the lansc520 microcontrollers host bridge. this causes the host bridge to perform a type zero configuration cycle. other values = the host bridge performs a type one configuration cycle. in a type one configuration cycle, the contents of this bit field (bus_num) are driven unchanged on the pci bus during the address phase of the cycle. if the bus_num and device_num bit fields are both 0, the configuration cycle does not appear on the pci bus because this combination addresses the internal pci-indexed registers of the host bridge.
pci bus host bridge registers 6-16 lan?sc520 microcontroller register set manual programming notes after this register (pcicfgadr) is written with the requisite information, an access must be made to the pcicfgdata register (see page 6-17) to cause the pci bus configuration cycle to occur on the pci bus. this register is reset by a system reset. the bits in this register are not affected by a pci bus reset. a pci bus reset is initiated by setting the pci_rst bit in the hbctl register (see page 6-3). this register must be accessed as a doubleword. accesses that are less than a doubleword in width are treated as normal pci bus i/o or (if so mapped) gp bus i/o accesses. no configuration cycles are generated if the access is not to the entire doubleword. in the lansc520 microcontroller, the doubleword starting at 0cf8h must not be mapped to the gp bus. the lansc520 microcontroller does not generate special cycles. in other words, setting the bus_num bit field to 00h, the device_num bit field to 11111b, the function_num bit field to 111b, and the register_num field to 00000b does not generate a special cycle. instead, this setup generates a pci bus configuration write cycle. 15C11 device_num [4C0] device number this bit field specifies the device to address on the bus that is specified by the bus_num bit field. for type zero configuration cycles (if the bus_num bit field is 00h), the device_num bit field value selects one of the following bit patterns to be driven on the pci bus ad31Cad11 pins during the address phase of the cycle: 00d = address the lansc520 microcontrollers host bridge (if the bus_num bit field is 00h). the cycle is not visible on the pci bus. (i.e., no bit pattern is driven externally.) 01d = the ad12 pin is driven high, and the other pins of ad31Cad11 are driven low. 02d = the ad13 pin is driven high, and the other pins of ad31Cad11 are driven low. 03d = the ad14 pin is driven high, and the other pins of ad31Cad11 are driven low. . . . . . 19d = the ad30 pin is driven high, and the other pins of ad31Cad11 are driven low. 20d = the ad31 pin is driven high, and the other pins of ad31Cad11 are driven low. 21C31d = all pins ad31Cad11 are driven low (to 0); but the host bridge does not accept configuration accesses using these device_num bit field values, so configuration reads or writes with these values result in a master abort. performing a configuration read with these values returns ffffh in the data. in a typical system design, one of the address pins ad31Cad12 is resistively coupled to each pci bus devices idsel input, so a device_num bit field value in the range 1C20d selects the corresponding pci bus device during a type zero configuration cycle. for type one configuration cycles (if the bus_num bit field is not 00h), the contents of this bit field are driven unchanged on the pci bus during the address phase of the cycle. 10C8 function_ num[2 C 0] function number this bit field specifies the function number within the device specified by the device_num bit field. for host bridge configuration cycles (if the bus_num and device_num bit fields are both 0), the function number is ignored because the host bridge is a single-function device. for all other configuration cycles (type zero or type one), the contents of this bit field are driven unchanged on the pci bus during the address phase of the configuration cycle. 7C2 register_ num[5 C 0] register number this bit field specifies the register number within the function specified by the function_num bit field. for host bridge configuration cycles (if the bus_num and device_num bit fields are both 0), the register_num bit field is used to address the host bridge pci-indexed registers (see the descriptions beginning on page 6-18). register_num bits 5C0 are used as bits 7C2 of the pci index address to address doublewords in the configuration space. byte locations within a doubleword are addressed by accessing the corresponding bytes of the pcicfgdata register (see page 6-17). for all other configuration cycles (type zero or type one), the contents of this bit field are driven unchanged on the pci bus during the address phase of the configuration cycle. 1C0 reserved reserved this bit field is ignored during writes to this register. it always returns 0 when read. during the address phase of a configuration cycle, address pins ad1Cad0 are driven to 00b to indicate a type zero configuration cycle, or to 01b to indicate a type one configuration cycle, depending on value of the bus_num bit field. bit name function
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-17 pci configuration data (pcicfgdata) direct-mapped i/o address 0cfch register description software reads or writes this register to initiate a pci bus configuration cycle after setting up the pcicfgadr register (see page 6-15). bit definitions programming notes the enable bit must be set in the pcicfgadr register for an access to this register (pcicfgdata) to result in a pci bus configuration cycle. otherwise the cycle accesses the pci bus i/o space. this register can be accessed as a doubleword, word, or byte. the appropriate cbex signal combinations are driven on the pci bus during the data phase of the configuration cycle. in the lansc520 microcontroller, the doubleword starting at 0cfch must not be mapped to the gp bus. 31 30 29 28 27 26 25 24 bit cfg_data[31C24] reset xxxxxxxx r/w r/w 23 22 21 20 19 18 17 16 bit cfg_data[23C16] reset xxxxxxxx r/w r/w 15 14 13 12 11 10 9 8 bit cfg_data[15C8] reset xxxxxxxx r/w r/w 7 6 5 4 3 2 1 0 bit cfg_data[7C0] reset xxxxxxxx r/w r/w bit name function 31C0 cfg_data [31C0] configuration data this bit field contains the data for the configuration access cycle (read or write).
pci bus host bridge registers 6-18 lan?sc520 microcontroller register set manual device/vendor id (pcidevid) i/o address 0cf8h/0cfch pci index 00h register description this register contains the pci configuration header space vendor and device identification for the lansc520 microcontroller host bridge. bit definitions programming notes this register (pcidevid) is register number 0 in the host bridge-specific pci configuration space. 31 30 29 28 27 26 25 24 bit dev_id[15 C 8] reset 00110000 r/w r 23 22 21 20 19 18 17 16 bit dev_id[7 C 0] reset 00000000 r/w r 15 14 13 12 11 10 9 8 bit vdr_id[15 C 8] reset 00010000 r/w r 7 6 5 4 3 2 1 0 bit vdr_id[7 C 0] reset 00100010 r/w r bit name function 31 C 16 dev_id[15 C 0] device id 3000h = this bit field identifies the lansc520 microcontroller host bridge pci bus device. 15C0 vdr_id[15 C 0] vendor id 1022h = this bit field identifies advanced micro devices, inc., as the vendor of the lansc520 microcontroller host bridge pci bus device.
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-19 status/command (pcistacmd) i/o address 0cf8h/0cfch pci index 04h register description this register contains the pci configuration header space command and status register bits. bit definitions 31 30 29 28 27 26 25 24 bit perr_det sig_serr r_mst_ abt r_tgt_ abt s_tgt_ abt s_dvsl_ tim[1C0] d_perr_ det reset 00000010 r/w r/w! r r/w! r/w! r/w! r r r/w! 23 22 21 20 19 18 17 16 bit fbtb udfs 66m_cap reserved reset 10000000 r/w rrr rsv 15 14 13 12 11 10 9 8 bit reserved serr_enb reset 00000000 r/w rsv r 7 6 5 4 3 2 1 0 bit reserved perr_res reserved bus_mas mem_enb io_enb reset 00000100 r/w rsv r/w rsv r r/w r bit name function 31 perr_det parity error detected this bit is set when a parity error is detected by the host bridge master or target controller. 0 = parity error not detected. 1 = parity error detected. this bit is cleared by writing a 1. 30 sig_serr signaled system error this bit is normally used to indicate that the pci bus agent has asserted the serr pin, however the host bridge does not drive serr because the interrupt logic is integrated within the lansc520 microcontroller. 0 = serr pin not asserted by the host bridge. this bit is internally fixed to 0.
pci bus host bridge registers 6-20 lan?sc520 microcontroller register set manual 29 r_mst_abt received master abort this bit is set by the host bridge master controller when its transaction is terminated with a master abort. 0 = transaction was not terminated with a master abort. 1 = transaction was terminated with a master abort. this bit is cleared by writing a 1. 28 r_tgt_abt received target abort this bit is set by the host bridge master controller when its transaction is terminated with a target abort. 0 = transaction was not terminated with a target abort. 1 = transaction was terminated with a target abort. this bit is cleared by writing a 1. 27 s_tgt_abt signaled target abort this bit is set by the host bridge target controller when it terminates a transaction with a target abort. the host bridge responds with a target abort when an address parity error is detected. 0 = target controller did not end a transaction with a target abort. 1 = target controller ended a transaction with a target abort. this bit is cleared by writing a 1. 26 C 25 s_dvsl_tim [1 C 0] device select (devsel ) timing these read only bits define the slowest devsel timing for the host bridge target controller. 01 = the host bridge target controller always uses medium devsel timing. this bit field is internally fixed to 01b. 24 d_perr_det data parity reported this bit is set by the host bridge master controller when, during a host bridge master controller pci bus cycle, perr is asserted by the host bridge or a pci bus target, and the parity error response bit (perr_res in the pcistacmd register, see page 6-21) is also set. 0 = the master controller did not detect parity error. 1 = the master controller detect parity error. this bit is cleared by writing a 1. 23 fbtb fast back-to-back capable this read-only bit indicates the host bridge target controller is capable of fast back-to-back transactions. 1 = the host bridge target controller is capable of fast back-to-back transactions. 22 udfs udf supported this read-only bit indicates the host bridge does not support user-definable features. 0 = the host bridge does not support user-definable features. 21 66m_cap 66 mhz capable this-read only bit indicates the host bridge is not 66-mhz capable. 0 = the host bridge is not 66-mhz capable. 20 C 9 reserved reserved this bit field should be written to 0 for normal system operation. 8 serr_enb serr enable this bit is normally used to enable the pci bus agent to drive the serr pin, however the host bridge does not drive the serr pin because all interrupt control is integrated within the lansc520 microcontroller. 0 = the serr pin is not driven by the lansc520 microcontroller. this bit is internally fixed to 0. 7 reserved reserved this bit field should be written to 0 for normal system operation. bit name function
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-21 programming notes this register is reset by a system reset or by a pci bus reset. a pci bus reset is initiated by setting the pci_rst bit in the hbctl register (see page 6-3). this register (pcistacmd) is register number 1 in the host bridge-specific pci configuration space. the pci local bus specification, revision 2.2, defines four bit fields in the status/command register that are reserved in the lansc520 microcontroller. these pci bus functions do not apply to the host bridge controller: n wait cycle control (bit 7): the host bridge controller does not support address/data stepping. n vga palette snoop enable (bit 5): the host bridge is not a graphics device. n memory write and invalidate enable (bit 4): the host bridge does not generate memory write and invalidate commands as a pci bus master. n special cycle recognition (bit 3): the host bridge ignores pci bus special cycles. 6 perr_res parity error response this bit controls the host bridge s response to parity errors. 0 = the host bridge master and target controllers ignore parity errors. the host bridge treats transactions that have a parity error (address or data) as normal transactions. in other words, it behaves as if nothing is wrong. the d_perr_det bit (see page 6-20) is not set for data parity errors, and a target abort is not issued for address parity errors. 1 = the host bridge master and target controllers report parity errors. the host bridge responds to data parity errors by setting the d_perr_det bit. the host bridge target controller responds to address parity errors by terminating the transaction with a target abort. the perr_res bit must not be changed except during pci bus initialization after a system reset. see the lan?sc520 microcontroller users manual , order #22004, for information about pci bus initialization. 5 C 3 reserved reserved this bit field should be written to 0 for normal system operation. 2bus_mas master enable this enables the host bridge master controller to generate cycles on the pci bus. 1 = the host bridge master controller is always enabled. this bit is internally fixed to 1. 1mem_enb memory access enable this bit enables the host bridge target controller to respond to pci bus master memory cycles. 0 = the host bridge target controller is disabled. 1 = the host bridge target controller is enabled to respond to pci bus master memory cycles. the mem_enb bit must not be changed except during pci bus initialization after a system reset. see the lan?sc520 microcontroller users manual , order #22004, for information about pci bus initialization. 0io_enb i/o space enable this bit is normally used to enable the host bridge target controller to respond to pci bus master i/o cycles, however the lansc520 microcontroller host bridge ignores all i/o cycles from pci bus masters. 0 = the host bridge does not respond to pci bus i/o cycles. this bit is internally fixed to 0. bit name function
pci bus host bridge registers 6-22 lan?sc520 microcontroller register set manual class code/revision id (pciccrevid) i/o address 0cf8h/0cfch pci index 08h register description this register contains the pci configuration header space class code, program interface and revision identification. bit definitions programming notes this register (pciccrevid) is register number 2 in the host bridge-specific pci configuration space. 31 30 29 28 27 26 25 24 bit cl_cd[7 C 0] reset 00000110 r/w r 23 22 21 20 19 18 17 16 bit sbcl_cd[7 C 0] reset 00000000 r/w r 15 14 13 12 11 10 9 8 bit prg_if[7 C 0] reset 00000000 r/w r 7 6 5 4 3 2 1 0 bit rev_id[7 C 0] reset 00000000 r/w r bit name function 31 C 24 cl_cd[7 C 0] base class code this bit field defines the pci bus base class code of the host bridge. 06h = bridge device 23 C 16 sbcl_cd [7 C 0] sub class code this bit field defines the pci bus sub-class code for the host bridge. 00h = host-pci bridge 15 C 8prg_if[7 C 0] program interface this bit field defines the pci bus program interface type of the host bridge. 00h = host-pci bridge 7 C 0 rev_id[7 C 0] revision i.d. this bit field defines the host bridge revision number. 00h = revision number
pci bus host bridge registers lan?sc520 microcontroller register set manual 6-23 header type (pciheadtype) i/o address 0cf8h/0cfch pci index 0eh register description this register contains the pci configuration header space header type. bit definitions programming notes this register (pciheadtype) is byte 2 of register number 3 in the host bridge-specific pci configuration space. 7 6 5 4 3 2 1 0 bit hdr_typ[7 C 0] reset 00000000 r/w r bit name function 7 C 0 hdr_typ [7 C 0] header type this bit field defines the pci configuration space header format. 00h = single-function device, not pci-to-pci bridge
pci bus host bridge registers 6-24 lan?sc520 microcontroller register set manual master retry time-out (pcimretryto) i/o address 0cf8h/0cfch pci index 41h register description this register contains the pci master retry time-out. bit definitions programming notes this register is reset by a system reset or by a pci bus reset. a pci bus reset is initiated by setting the pci_rst bit in the hbctl register (see page 6-3). this register (pcimretryto) is byte 1 of register number 16d in the host bridge-specific pci configuration space. this register must not be changed except when there is no outstanding cpu-to-pci bus transaction pending. this is the default state after a system reset. see the lan?sc520 microcontroller users manual , order #22004, for information about pci bus initialization. 7 6 5 4 3 2 1 0 bit m_retry_to[7 C 0] reset 00000000 r/w r bit name function 7 C 0 m_retry_to [7 C 0] master retry time-out this bit field defines the number of times the master controller retries a transaction before aborting the cycle. for read transactions that are aborted due to a time-out, a data value of ffffffffh is returned to the am5 x 86 cpu. 00h = retry time-out disabled. the master controller continues to retry the transaction until the target responds. this is the default value. other = the master controller continues to retry the transaction for the number of times programmed into this bit field. for example, if this bit field is set to 80h, the number of retries is 128. therefore the total number of attempts (including the initial attempt) is the number of retries programmed in this bit field plus 1.
lan?sc520 microcontroller register set manual 7-1 chapter 7 sdram controller registers 7.1 overview this chapter describes the synchronous dynamic random-access memory (sdram) controller registers of the lansc520 microcontroller. the lansc520 microcontroller includes an integrated sdram controller. the following are some of the sdram controllers main features: n synchronous dram support n support for up to 4 banks n up to 256 megabytes of sdram n ecc (single-bit correction/multiple-bit detection) support the sdram controller register set consists of ten memory-mapped configuration region (mmcr) registers used for configuration, control, and status. see the lan?sc520 microcontroller users manual , order #22004, for details about using the sdram controller. table 7-1 lists the sdram controller registers in offset order, with the corresponding descriptions page number. 7.2 registers table 7-1 sdram controller mmcr registers register name mnemonic mmcr offset page number sdram control drcctl 10h page 7-2 sdram timing control drctmctl 12h page 7-4 sdram bank configuration drccfg 14h page 7-5 sdram bank 0C3 ending address drcbendadr 18h page 7-7 ecc control eccctl 20h page 7-9 ecc status eccsta 21h page 7-10 ecc check bit position eccckbpos 22h page 7-11 ecc check code test ecccktest 23h page 7-12 ecc single-bit error address eccsbadd 24h page 7-14 ecc multi-bit error address eccmbadd 28h page 7-15
sdram controller registers 7-2 lan?sc520 microcontroller register set manual sdram control (drcctl) memory-mapped mmcr offset 10h register description this register controls various features of the sdram controller. note: a programmable reset preserves this registers state. see the prg_rst_enb bit description on page 3-3. bit definitions 7 6 5 4 3 2 1 0 bit wb_tst_ enb reserved rfsh_spd [1C0] rfsh_enb opmode_sel[2C0] reset 00010000 r/w r/w! res r/w r/w r/w bit name function 7 wb_tst_ enb write buffer test mode enable this bit selects the source of the debugging information available on the three system test pins. 0 = write buffer test mode is disabled. (system test mode.) the three system test pins function as cf_dram , datastrb and cf_rom_gpcs pins. 1 = write buffer test mode is enabled. the three system test pins function as wbmstr2 C wbmstr0 for write buffer master trace purposes. if the write buffer is enabled (wb_enb is set in the dbctl register, see page 8-3), the wbmstr2 C wbmstr0 signals provide write buffer master trace information during write cycles from the write buffer to sdram. master trace information specifies which masters contributed to the level (rank) that is currently being written to sdram from the write buffer. contributing masters can be one or more of: am5 x 86 cpu, pci, or gp bus dma. if the write buffer is disabled, or during read cycles if the write buffer is enabled, the wbmstr2 C wbmstr0 signals reflect the master that is currently requesting sdram access. software writes to this bit are ignored when the amdebug? technology mode is active. this ensures that microcontroller software cannot remove control of the pins from the software driving the amdebug technology port. if amdebug technology mode is not active, software can write to this bit. refer to the lan?sc520 microcontroller users manual , order #22004, for more information about system test mode and write buffer test mode. 6 reserved reserved this bit field should be written to 0 for normal system operation. 5 C 4 rfsh_spd [1C0] sdram refresh request speed these two bits determine the sdram refresh request rate. 00 = 7.8 m s 01 = 15.6 m s (default) 10 = 31.2 m s 11 = 62.5 m s 3 rfsh_enb refresh enable 0 = sdram refresh is disabled. this mode should be used for sdram detection and sizing algorithms. disabling sdram refresh should not be done in normal operation. 1 = sdram refresh is enabled. note: refresh cycles are not generated to sdram banks that are not enabled via the bnkx_enb bits in the drcbendadr register (see page 7-7).
sdram controller registers lan?sc520 microcontroller register set manual 7-3 programming notes sdram refresh cycles should only be enabled (via the rfsh_enb bit) when the opmode_sel bit is 000b. this register (drcctl) should be modified only when the write buffer and the read-ahead feature of the read buffer are disabled in the dbctl register (see page 8-3). 2 C 0 opmode_sel [2C0] sdram operation mode select these commands are used in the sdram initialization and detection algorithm. 000 = normal sdram mode. 001 = nop command enabled. 010 = cpu-to-sdram cycles are converted to all banks precharge commands. 011 = cpu-to-sdram cycles are converted to a load mode register command. the data to be loaded is driven on ma12Cma0. 100 = auto refresh enabled. 101C111 = reserved. when specifying nop, all banks precharge, load mode register, or auto refresh commands, the command is not actually applied to the sdram devices until a cpu access to sdram occurs (either a read or write cycle). the specified command is issued to the sdram devices during the cpu access rather than the typical sdram read or write access. before using a write cycle to apply any of these sdram commands, make sure the wb_enb bit is clear in the dbctl register (see page 8-3). because the command is not issued to the sdram until the cpu accesses sdram, code executing out of rom must specifically access sdram after selecting a command in the opmode_sel bit field to properly configure the sdram device. the load mode register command must be issued to the sdram for the setting of the cas_lat bit of the drctmctl register to take effect (see page 7-4). in addition to setting the cas latency as programmed in the cas_lat bit, the following fixed parameters are also written to the sdram devices mode register when a load mode register command is issued. n burst length: always read burst 4. n burst type: follow non-linear burst. n operating mode: standard operation. n write burst mode: single mode. after a command is issued, the opmode_sel bit field must be cleared to 000b (normal sdram mode) before any further sdram access.
sdram controller registers 7-4 lan?sc520 microcontroller register set manual sdram timing control (drctmctl) memory-mapped mmcr offset 12h register description this register controls the sdram device timing. note: a programmable reset preserves this registers state. see the prg_rst_enb bit description on page 3-3. bit definitions programming notes this register (drctmctl) should be modified only when the write buffer and the read-ahead feature of the read buffer are disabled in the dbctl register (see page 8-3). 7 6 5 4 3 2 1 0 bit reserved cas_lat ras_pchg_dly [1C0] ras_cas_dly[1C0] reset 00011010 r/w rsv r/w r/w r/w bit name function 7 C 5 reserved reserved this bit field should be written to 0 for normal system operation. 4 cas_lat sdram cas latency this bit controls the s cas x signal latency timing to all the sdram banks. 0 = cycle latency is 2t. 1 = cycle latency is 3t (default). where t is 15 ns (one half of the 33-mhz clock cycle). to make the cas_lat bit setting take effect, a load mode register command must be issued to the sdram devices via the opmode_sel bit field of the drcctl register (see page 7-3). incorrect operation can occur if the cas_lat bit is modified and the load mode register command is not issued to the sdram devices. 3 C 2 ras_pchg_ dly [1C0] sdram ras precharge delay this bit field determines the s rasx signal precharge delay. 00 = 2t 01 = 3t 10 = 4t (default) 11 = 6t where t is 15 ns (one half of the 33-mhz clock cycle). 1 C 0 ras_cas_ dly [1C0] sdram ras-to-cas delay this bit field determines the s rasx -to-s casx delay. 00 = 2t 01 = 3t 10 = 4t (default) 11 = reserved where t is 15 ns (one half of the 33-mhz clock cycle).
sdram controller registers lan?sc520 microcontroller register set manual 7-5 sdram bank configuration (drccfg) memory-mapped mmcr offset 14h register description this register controls the address column width configuration and sdram internal bank count for devices installed in each bank. note: a programmable reset preserves this registers state.see the prg_rst_enb bit description on page 3-3. bit definitions 15 14 13 12 11 10 9 8 bit bnk3_ bnk_cnt reserved bnk3_colwdth [1C0] bnk2_ bnk_cnt reserved bnk2_colwdth[1C0] reset 00000000 r/w r/w rsv r/w r/w rsv r/w 7 6 5 4 3 2 1 0 bit bnk1_ bnk_cnt reserved bnk1_colwdth[1C0] bnk0_ bnk_cnt reserved bnk0_colwdth[1C0] reset 00000000 r/w r/w rsv r/w r/w rsv r/w bit name function 15 bnk3_bnk_ cnt bank 3 internal sdram bank count this bit specifies the number of internal banks supported by the sdram devices. 0 = 2-bank device 1 = 4-bank device 14 reserved reserved this bit field should be written to 0 for normal system operation. 13 C 12 bnk3_ colwdth [1C0] bank 3 column address width these two bits specify the column address width of the sdram devices populated in bank 3. 00 = 8-bit column address 01 = 9-bit column address 10 = 10-bit column address 11 = 11-bit column address 11 bnk2_bnk_ cnt bank 2 internal sdram bank count this bit specifies the number of internal banks supported by the sdram devices. 0 = 2-bank device 1 = 4-bank device 10 reserved reserved this bit field should be written to 0 for normal system operation. 9 C 8 bnk2_ colwdth [1C0] bank 2 column address width these two bits specify the column address width of the sdram devices populated in bank 2. 00 = 8-bit column address 01 = 9-bit column address 10 = 10-bit column address 11 = 11-bit column address
sdram controller registers 7-6 lan?sc520 microcontroller register set manual programming notes this register (drccfg) should be modified only when the write buffer and the read-ahead feature of the read buffer are disabled in the dbctl register (see page 8-3). before changing the bnkx_bnk_cnt or bnkx_colwdth bit fields, software must issue an all banks precharge command to the sdram devices via the opmode_sel bit field in the dbcctl register (see page 7-3). this command returns the sdram devices to an idle state and also clears the sdram controllers page table entries. 7 bnk1_bnk_ cnt bank 1 internal sdram bank count this bit specifies the number of internal banks supported by the sdram devices. 0 = 2-bank device 1 = 4-bank device 6 reserved reserved this bit field should be written to 0 for normal system operation. 5 C 4 bnk1_ colwdth [1C0] bank 1 column address width these two bits specify the column address width of the sdram devices populated in bank 1. 00 = 8-bit column address 01 = 9-bit column address 10 = 10-bit column address 11 = 11-bit column address 3 bnk0_bnk_ cnt bank 0 internal sdram bank count this bit specifies the number of internal banks supported by the sdram devices. 0 = 2-bank device 1 = 4-bank device 2 reserved reserved this bit field should be written to 0 for normal system operation. 1 C 0 bnk0_ colwdth [1C0] bank 0 column address width these two bits specify the column address width of the sdram devices populated in bank 0. 00 = 8-bit column address 01 = 9-bit column address 10 = 10-bit column address 11 = 11-bit column address bit name function
sdram controller registers lan?sc520 microcontroller register set manual 7-7 sdram bank 0C3 ending address (drcbendadr) memory-mapped mmcr offset 18h register description this register controls the sdram bank enable and bank ending address that specifies the boundary between the banks. note: a programmable reset preserves this registers state.see the prg_rst_enb bit description on page 3-3. bit definitions 31 30 29 28 27 26 25 24 bit bnk3_enb bnk3_end[28 C 22] reset 00000000 r/w r/w r/w 23 22 21 20 19 18 17 16 bit bnk2_enb bnk2_end[28 C 22] reset 00000000 r/w r/w r/w 15 14 13 12 11 10 9 8 bit bnk1_enb bnk1_end[28 C 22] reset 00000000 r/w r/w r/w 7 6 5 4 3 2 1 0 bit bnk0_enb bnk0_end[28 C 22] reset 00000000 r/w r/w r/w bit name function 31 bnk3_enb bank 3 enable this bit enables bank 3. 0 = disabled 1 = enabled 30 C 24 bnk3_end [28 C 22] bank 3 ending address this bit field determines the bank 3 boundary, defined in 4-mbyte increments. this value is compared to physical address bits 28 C 22 during an sdram request to select a bank. bank 3 is selected if physical address bits 28C22 are less than the bnk3_end bit field value, but greater than or equal to the value specified by the bnk2_end bit field (or the next lower enabled banks end value if bank 2 is disabled). 23 bnk2_enb bank 2 enable this bit enables bank 2. 0 = disabled 1 = enabled
sdram controller registers 7-8 lan?sc520 microcontroller register set manual programming notes this register (drcbendadr) should be modified only when the write buffer and the read-ahead feature of the read buffer are disabled in the dbctl register (see page 8-3). the value specified in each bnkx_end bit field determines the upper address boundary of the corresponding sdram bank in 4mbyte increments. each banks lower boundary is determined by the end of the next-lower enabled bank, so the addressable sdram space is the concatenation of the enabled banks. the top of the highest configured bank is the top of memory. if any particular bank is disabled (via its bnkx_enb bit), the associated bnkx_end bit field value has no effect. banks do not have to be enabled contiguously. figure 7-1 gives a few examples of sdram bank configuration. figure 7-1 examples of bank ending address configuration 22 C 16 bnk2_end [28 C 22] bank 2 ending address this bit field determines the bank 2 boundary, defined in 4-mbyte increments. this value is compared to physical address bits 28 C 22 during an sdram request to select a bank. bank 2 is selected if physical address bits 28C22 are less than the bnk2_end bit field value but greater than or equal to the value specified by the bnk1_end bit field (or the next lower enabled banks end value if bank 1 is disabled. 15 bnk1_enb bank 1 enable this bit enables bank 1. 0 = disabled 1 = enabled 14 C 8 bnk1_end [28 C 22] bank 1 ending address this bit field determines the bank 1 boundary, defined in 4-mbyte increments. this value is compared to physical address bits 28 C 22 during an sdram request to select a bank. bank 1 is selected if physical address bits 28C22 are less than the bnk1_end bit field value but greater than or equal to the value specified by the bnk0_end bit field (or 0 if bank 0 is disabled). 7 bnk0_enb bank 0 enable this bit enables bank 0. 0 = disabled 1 = enabled 6 C 0 bnk0_end [28 C 22] bank 0 ending address this bit field determines the bank 0 boundary, defined in 4-mbyte increments. this value is compared to physical address bits 28 C 22 during an sdram request to select a bank. bank 0 is selected if physical address bits 28C22 are less than the bnk0_end bit field value. bit name function bank 0 bank 1 bank 2 bank 3 example 1 total 32 mbytes example 2 56 mbytes example 3 192 mbytes bnk0_end = 02h 7fffffh (8 mbytes) 000000h bnk1_end = 04h ffffffh (8 mbytes) 800000h bnk2_end = 06h 17fffffh (8 mbytes) 1000000h bnk3_end = 08h 1ffffffh (8 mbytes) 1800000h bnk0_end = 08h 1ffffffh (32 mbytes) 0000000h bnk1_end = 10h 3ffffffh (32 mbytes) 2000000h bnk2_end = 20h 7ffffffh (64 mbytes) 4000000h bnk3_end = 30h bffffffh (64 mbytes) 8000000h bnk0_end = 04h ffffffh (16 mbytes) 000000h bnk1_end = 06h 17fffffh (8 mbytes) 1000000h bnk2_end = dont care disabled (bnk2_enb = 0) bnk3_end = 0eh 37fffffh (32 mbytes) 1800000h
sdram controller registers lan?sc520 microcontroller register set manual 7-9 ecc control (eccctl) memory-mapped mmcr offset 20h register description this register controls all the error correction code (ecc) functions. note: a programmable reset preserves this registers state.see the prg_rst_enb bit description on page 3-3. bit definitions programming notes this register (eccctl) should be modified only when the write buffer and the read-ahead feature of the read buffer are disabled in the dbctl register (see page 8-3). before ecc multi-bit or single-bit interrupts are enabled, the eccmap register (see page 12-19) must be configured to route the interrupt to the appropriate interrupt request level and priority. 7 6 5 4 3 2 1 0 bit reserved mult_int_ enb sgl_int_ enb ecc_enb reset 00000000 r/w rsv r/w r/w r/w bit name function 7 C 3 reserved reserved this bit field should be written to 0 for normal system operation. 2 mult_int_ enb enable multi-bit interrupt this bit enables the ecc non-maskable interrupt (nmi) source to go active on the detection of a multi-bit error. 0 = disabled 1 = enabled the ecc nmi source must also be enabled via the ecc_nmi_enb bit in the eccmap register (see page 12-19). 1sgl_int_ enb enable single-bit interrupt this bit enables the ecc maskable interrupt source to go active on the detection of a single- bit error. 0 = disabled 1 = enabled the ecc single-bit interrupt source must also be mapped to an interrupt channel via the ecc_irq_map bit field in the eccmap register (see page 12-20). 0 ecc_enb ecc enable for all four banks this bit enables ecc for all four banks. 0 = disabled 1 = enabled when ecc is enabled, writes to sdram include a write of the error correction code (ecc) to the sdram devices ecc location, and reads from sdram are checked for a correct ecc. any ecc mismatch is reported in the appropriate registers and the appropriate interrupt is generated if enabled via the mult_int_enb and sgl_int_enb bits.
sdram controller registers 7-10 lan?sc520 microcontroller register set manual ecc status (eccsta) memory-mapped mmcr offset 21h register description this register maintains status of the ecc functions if ecc is enabled. note: a programmable reset does not preserve this registers state. bit definitions programming notes software should write to this register (eccsta) only to clear the error status, and only after a status bit was read as 1. 7 6 5 4 3 2 1 0 bit reserved mbit_err sbit_err reset 00000000 r/w rsv r/w! r/w! bit name function 7 C 2 reserved reserved this bit field should be written to 0 for normal system operation. 1 mbit_err multi-bit error detected 0 = the event has not occurred, or software cleared this bit by writing a 1. 1 = a multi-bit ecc error has occurred. software must write a 1 to clear this bit and rearm the logic that captures the physical address where the multi-bit error occurred. the multi-bit error physical address can be read from the eccmbadd register (see page 7-15). 0 sbit_err single-bit ecc error 0 = the event has not occurred, or software cleared this bit by writing a 1. 1 = a single-bit ecc error has occurred. software must write a 1 to clear this bit and rearm the logic that captures the physical address and bit position where the single-bit error occurred. the single-bit error physical address can be read from the eccsbadd register (see page 7-14). the single-bit error bit position can be read from the eccckbpos register (see page 7-11).
sdram controller registers lan?sc520 microcontroller register set manual 7-11 ecc check bit position (eccckbpos) memory-mapped mmcr offset 22h register description this register indicates the particular bit in the 32-bit data word or 7-bit check word that caused the single-bit error. note: a programmable reset does not preserve this registers state. bit definitions programming notes figure 7-2 shows the concatenated check and data bit fields, and the corresponding ecc_chk_pos values. bit 5 of the ecc_chk_pos bit field can be used to identify whether the check bit field or the data bit field contains the bit error. if bit 5 is 0, the error is in the data bit field. if bit 5 is 1, the error is in the check bit field. figure 7-2 ecc check bit and data bit positions 7 6 5 4 3 2 1 0 bit reserved ecc_chk_pos [5C0] reset 00000000 r/w rsv r bit name function 7 C 6 reserved reserved this bit field should be written to 0 for normal system operation. 5 C 0 ecc_chk_ pos [5C0] ecc data bit position this bit field reports the bit location of the single-bit ecc error in either the check bit or data bit field. the bit position is captured upon the detection of a single-bit error, and the bit field is inhibited from capturing subsequent error positions until the sbit_err bit in the eccsta register is cleared by writing a 1 (see page 7-10). the data bit field is 32 bits in length and the check bit field is 7 bits in length. combined, these two bit fields form a 39-bit word. the ecc_chk_pos bit field contains the numbered bit position in this 39-bit word of the bit that caused the single-bit error. figure 7-2 relates the encoded bit position to the data and check bit fields. check bits data bits (7-bit) 0 38 32 31 ecc_chk_pos values 0 0 631 (32-bit)
sdram controller registers 7-12 lan?sc520 microcontroller register set manual ecc check code test (ecccktest) memory-mapped mmcr offset 23h register description this register provides user control of the ecc check code that is written during an sdram write cycle. this feature is to be used for test and error-handler development. note: a programmable reset does not preserve this registers state. bit definitions programming notes during a master write access to sdram, the lansc520 microcontroller generates an ecc check code (sometimes referred to as a syndrome code) that is written to the ecc sdram devices. during a read cycle, the requested data is read from sdram along with the stored ecc check code. a new check code is then generated from the read data and compared to the read ecc check code. 7 6 5 4 3 2 1 0 bit bad_chk_ enb frc_bad_chk [6C0] reset 00000000 r/w r/w! r/w bit name function 7 bad_chk_ enb enable bad ecc check bits this bit can be used by test software to enable the frc_bad_chk bit field to replace the correct ecc codes generated by the lansc520 microcontroller ecc logic for only the next single write cycle to sdram. 0 = the frc_bad_chk bit field does not replace the generated check bits. the binary pattern in the frc_bad_chk bit field has no effect on the ecc codes written to sdram during a write cycle. 1 = the frc_bad_chk bit field replaces the generated check bits for the next sdram write. the binary pattern written to the frc_bad_chk bit field is written out as the 7-bit ecc code during the next write cycle to sdram. this bit is automatically reset after the frc_bad_chk bit field value is written to the ecc sdram during the following write cycle. if this bit (bad_chk_enb) was previously set, then reading 1 from this bit implies that a write cycle to sdram did not occur yet, and so the frc_bad_chk bit field value was not yet applied. if the bad_chk_enb bit is read as a 0 after it was previously set, then a write cycle did occur in which the frc_bad_chk bit field value was applied. 6 C 0 frc_bad_ chk [6C0] force bad ecc check bits this register provides a way for users to specify their own ecc code for error test purposes. during write cycles to sdram, a 7-bit encoded ecc check code (sometimes referred to as a syndrome code) that represents the associated write data is written to ecc sdram. this code is automatically generated by the lansc520 microcontroller when ecc is enabled. if the bad_chk_enb bit is set, the pattern in the frc_bad_chk bit field is written to the ecc storage location on the following write cycle to sdram. note: the write buffer should be disabled and the write access should not be cacheable in the am5 x 86 cpu write-back cache during this procedure to ensure that the write cycle is propagated to the sdram when intended. the write buffer is disabled via the wb_enb bit in the dbctl register (see page 8-3).the write can be made non-cacheable, among other ways, by putting the cache in write-through mode or by disabling the cache completely.
sdram controller registers lan?sc520 microcontroller register set manual 7-13 if there is an ecc mismatch, either a single-bit or multiple-bit error has been detected. single-bit errors are corrected as data is returned to the requesting master (and an interrupt is generated if enabled). multi-bit errors are not corrected, but an nmi is generated if enabled. this register (ecccktest) provides a way for the user to alter the ecc check code that is written to the ecc sdram. if the ecc check code is altered so that it reflects a single-bit or multiple-bit error, it is detected by the lansc520 microcontroller when that location is read (if ecc is enabled). this feature can be used for test purposes and also for ecc error-handler development. because the write buffer decouples master write requests from the actual sdram access, it is advisable to disable the write buffer when using the feature provided by this register. otherwise, the ecc check code specified in this register might be applied to a write-buffer write access to sdram and not the particular access intended. in addition, care should be taken to ensure that the am5 x 86 cpu cache allows the write cycle to propagate to the sdram. so that test software need not reproduce the ecc algorithm, table 7-2 provides a few example ecc check codes that are correct for the associated data. table 7-2 example ecc check codes and associated data 32-bit data write (hexadecimal) correct ecc check code (binary) 00000000 0000000 ffffffff 0000000 000000bc 1111111 a5a5a5a5 1100011 c0c0c0c0 0101110 00ab0000 1001100 00bc0000 0100000
sdram controller registers 7-14 lan?sc520 microcontroller register set manual ecc single-bit error address (eccsbadd) memory-mapped mmcr offset 24h register description this register contains the physical address of the location in sdram that caused a single-bit ecc error. note: a programmable reset does not preserve this registers state. bit definitions programming notes 31 30 29 28 27 26 25 24 bit reserved sb_addr[27 C 24] reset 00000000 r/w rsv r 23 22 21 20 19 18 17 16 bit sb_addr[23 C 16] reset 00000000 r/w r 15 14 13 12 11 10 9 8 bit sb_addr[15 C 8] reset 00000000 r/w r 7 6 5 4 3 2 1 0 bit sb_addr[7 C 2] reserved reset 00000000 r/w rrsv bit name function 31 C 28 reserved reserved this bit field should be written to 0 for normal system operation. 27 C 2 sb_addr [27 C 2] ecc single-bit error address this bit field contains the physical address (bits 27 C 2) of the location where a single-bit error occurred. the address is captured upon the detection of a single-bit error, and the bit field is inhibited from capturing subsequent error addresses until the sbit_err bit in the eccsta register is cleared by writing a 1 (see page 7-10). note: this register does not include byte enables (be) from the requesting master, therefore only doubleword resolution is provided by the indication. use the eccckbpos register to determine which bit was in error (see page 7-11). 1 C 0 reserved reserved this bit field should be written to 0 for normal system operation.
sdram controller registers lan?sc520 microcontroller register set manual 7-15 ecc multi-bit error address (eccmbadd) memory-mapped mmcr offset 28h register description this register contains the physical address of the location in sdram that caused a multi-bit ecc error. note: a programmable reset does not preserve this registers state. bit definitions programming notes 31 30 29 28 27 26 25 24 bit reserved mb_addr[27 C 24] reset 00000000 r/w rsv r 23 22 21 20 19 18 17 16 bit mb_addr[23 C 16] reset 00000000 r/w r 15 14 13 12 11 10 9 8 bit mb_addr[15 C 8] reset 00000000 r/w r 7 6 5 4 3 2 1 0 bit mb_addr[7 C 2] reserved reset 00000000 r/w rrsv bit name function 31 C 28 reserved reserved this bit field should be written to 0 for normal system operation. 27 C 2 mb_addr [27 C 2] ecc multi-bit error address this register contains the physical address (bits 27 C 2) of the location where a multi-bit error occurred. the address is captured upon the detection of a multi-bit error, and the bit field is inhibited from capturing subsequent error addresses until the mbit_err bit in the eccsta register is cleared by writing a 1 (see page 7-10). note: this register does not include byte enables (be) from the requesting master, therefore only doubleword resolution is provided in the indication. 1 C 0 reserved reserved this bit field should be written to 0 for normal system operation.
sdram controller registers 7-16 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 8-1 chapter 8 write buffer and read buffer register 8.1 overview this chapter describes the write buffer and read buffer register of the lansc520 microcontroller. the write buffer and read buffer are two buffering techniques integrated in the lansc520 microcontroller to increase sdram system performance. although both of these features are tightly integrated with the sdram controller, the write buffer and the read buffers read- ahead feature can be independently enabled via the sdram buffer control (dbctl) register. the write buffer and read buffer register set consists of one memory-mapped configuration region (mmcr) register. see the lan?sc520 microcontroller users manual , order #22004, for details about the write buffer and read buffer. table 8-1 lists the dbctl register and the corresponding descriptions page number. 8.2 register table 8-1 write buffer and read buffer mmcr register register name mnemonic mmcr offset page number sdram buffer control dbctl 40h page 8-2
write buffer and read buffer register 8-2 lan?sc520 microcontroller register set manual sdram buffer control (dbctl) memory-mapped mmcr offset 40h register description this register controls all the read buffer read-ahead and write buffer functions. note: a programmable reset does not preserve this registers state. bit definitions 7 6 5 4 3 2 1 0 bit reserved rab_enb wb_wm [1C0] wb_flush wb_enb reset 00000000 r/w rsv r/w r/w r/w! r/w bit name function 7 C 5 reserved reserved this bit field should be written to 0 for normal system operation. 4 rab_enb read-ahead feature enable this bit is used to enable the read-ahead feature of the read buffer. 0 = the read-ahead feature is disabled. 1 = the read-ahead feature is enabled. if the master request is a burst cycle (two or more doublewords), when the current cache line is fetched from sdram and stored in the read buffer, the following cache line is also prefetched to take advantage of space locality. if the master request is not a burst cycle, only the rest of the current cache line is fetched from sdram into the read buffer. when enabled, the read-ahead feature applies for all bursted read requests from either the am5 x 86 cpu or the pci bus. (the gp bus dma controller does not perform bursted reads.) during sdram sizing or test, disabling the read-ahead feature might improve performance of the sizing or test algorithm. because most such algorithms test various non-contiguous points in sdram, excessive read-ahead thrashing can result. although this does not result in false indications, it can result in a slight performance degradation of the test algorithm. after the sdram sizing or test process is complete, the user is free to enable the read-ahead feature of the read buffer when desired. 3-2 wb_wm [1C0] write buffer watermark this bit field specifies the write buffers watermark setting (i.e., the amount of allocated buffer space above which the write buffer initiates a write to sdram). 00 = 28 doublewords (default) 01 = 24 doublewords 10 = 16 doublewords 11 = 8 doublewords as data is written into the write buffer, a new rank of storage is allocated unless the written data can be merged or collapsed into previous ranks. when a write cycle results in a rank allocation that exceeds the watermark setting, the write buffer requests service from the sdram controller to initiate write transfers to sdram. a higher watermark setting allows the write buffer to fill higher (acquire more master write data) before requesting sdram service, resulting in a greater chance of write data merging or collapsing. this is desirable if a large amount of incomplete doubleword writes (i.e., byte, word or three-byte writes) is expected from either the am5 x 86 cpu, pci bus, or gp bus dma. a lower watermark setting can be used if more complete doublewords are expected, and so merging or collapsing of data is less likely. a lower watermark causes the write buffer to request sdram service at a lower threshold, reducing the chance of filling the write buffer.
write buffer and read buffer register lan?sc520 microcontroller register set manual 8-3 programming notes software must disable the write buffer (i.e., clear the wb_enb bit) before changing the write buffer watermark (wb_wm bit field). 1 wb_flush write buffer flush this bit provides manual control over flushing of the write buffer. 0 = writing 0 has no effect. reading 0 after first writing 1 indicates that the flush has completed. 1 = writing 1 causes the write buffer to flush. reading 1 indicates that the write buffer is still in the process of being flushed. flushing the write buffer implies that all write buffer data is written out to sdram as a high priority before any other sdram write or read cycle activity is allowed to take place. 0 wb_enb write buffer enable this bit is used to enable the write buffer. 0 = the write buffer is disabled. 1 = the write buffer is enabled. the write buffer buffers all write activity from either the am5 x 86 cpu, pci bus, or gp bus dma. when enabled, the write buffer merges or collapses write data during write cycles and merges read data during read cycles. during sdram sizing or test, the write buffer must be disabled to prevent an invalid sdram size indicator or false pass status during an sdram test algorithm. a false pass is possible because the write buffer supports read merging, so that previously written data is returned (read merged) from the write buffer if the read-back occurs before the data has migrated to sdram. this can appear as though sdram exists even though it might not. if ecc memory is used, the write buffer must also be disabled while the sdram initialization software initializes ecc memory by writing to each sdram location. after the sdram sizing or test process is complete, the user is free to enable the write buffer when desired. bit name function
write buffer and read buffer register 8-4 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 9-1 chapter 9 rom/flash controller registers 9.1 overview this chapter describes the read-only memory (rom) or flash memory controller registers of the lansc520 microcontroller. the rom/flash controller supports up to three rom device chip select signals, which can be separately enabled. note that a bank of rom devices can be accessed with a single chip select (e.g., for building a 32-bit rom space from four 8-bit rom devices). the rom controller register set consists of three memory-mapped configuration region (mmcr) registers used to configure the rom controller by programming details about the connected rom devices operation mode, device width, device location, and timing. configuration information is provided for each chip select. see the lan?sc520 microcontroller users manual , order #22004, for details about the rom controller. table 9-1 lists the rom controller registers in offset order, with the corresponding descriptions page number. 9.2 registers table 9-1 rom controller mmcr registers register name mnemonic mmcr offset page number bootcs control bootcsctl 50h page 9-2 romcs1 control romcs1ctl 54h page 9-4 romcs2 control romcs2ctl 56h page 9-6
rom/flash controller registers 9-2 lan?sc520 microcontroller register set manual bootcs control (bootcsctl) memory-mapped mmcr offset 50h register description this register contains configuration information about the location (i.e., sdram bus or gp bus), width, operation mode, and timing of the boot rom that is attached to the lansc520 microcontroller bootcs signal. bit definitions 15 14 13 12 11 10 9 8 bit reserved dgp width [1C0] mode reserved reset 000???00 r/w rsv r r r/w rsv 7 6 5 4 3 2 1 0 bit reserved sub_dly[1C0] reserved first_dly[2C0] reset 00110111 r/w rsv r/w rsv r/w bit name function 15 C 13 reserved reserved this bit field should be written to 0 for normal system operation 12 dgp bootcs device sdram/gp bus select this bit reflects the location of the boot rom device that is enabled with the bootcs signal. this bits value is latched from the cfg2 pinstrap when the pwrgood pin is asserted. the rom can be connected to either the sdram data bus or to the gp bus. 0 = rom is on the gp bus. 1 = rom is on the sdram data bus. 11 C 10 width [1C0] bootcs device width select this bit field reflects the width of the boot rom. this bit fields value is latched from the cfg1 C cfg0 pinstraps when the pwrgood pin is asserted. 00 = rom is 8 bits wide. 01 = rom is 16 bits wide. 10 = rom is 32 bits wide. 11 = rom is 32 bits wide (same as 10b). 9mode bootcs device mode this bit is used to configure the mode of the boot rom device. 0 = rom is non-page mode. 1 = rom is page mode. 8 C 6 reserved reserved this bit field should be written to 0 for normal system operation 5 C 4 sub_dly [1C0] bootcs device delay for subsequent access this bit field is used to configure the number of wait states for all page-mode accesses to the rom that are subsequent to the first access. this bit field applies only if the mode bit is 1. 00 = 0 wait states 01 = 1 wait state 10 = 2 wait states 11 = 3 wait states
rom/flash controller registers lan?sc520 microcontroller register set manual 9-3 programming notes the device attached to the bootcs chip select signal is used as the boot device. therefore, upon reset this devices dgp and width bit field values must be delivered to the rom controller via the cfg2Ccfg0 pinstraps. for all other rom devices, this configuration information is programmed by the initialization software. 3 reserved reserved this bit field should be written to 0 for normal system operation. 2 C 0 first_dly [2C0] bootcs device delay for first access this bit field is used to configure the number of wait states for the first access to the rom, and for subsequent accesses if the mode bit is 0. 000 = 0 wait states 001 = 1 wait state 010 = 2 wait states 011 = 3 wait states 100 = 4 wait states 101 = 5 wait states 110 = 6 wait states 111 = 7 wait states bit name function
rom/flash controller registers 9-4 lan?sc520 microcontroller register set manual romcs1 control (romcs1ctl) memory-mapped mmcr offset 54h register description this register contains configuration information about the location (i.e., sdram bus or gp bus), width, operation mode, and timing of the rom devices that are attached to the lansc520 microcontroller romcs1 signal. bit definitions 15 14 13 12 11 10 9 8 bit reserved dgp width [1C0] mode reserved reset 00000000 r/w rsv r/w r/w r/w rsv 7 6 5 4 3 2 1 0 bit reserved sub_dly[1C0] reserved first_dly[2C0] reset 00110111 r/w rsv r/w rsv r/w bit name function 15 C 13 reserved reserved this bit field should be written to 0 for normal system operation. 12 dgp chip select 1 device sdram/gp bus select this bit is used to configure the location of the rom devices that are enabled by romcs1 . the rom can be connected either to the sdram data bus or to the gp bus. 0 = rom is on the gp bus. 1 = rom is on the sdram data bus. 11 C 10 width [1C0] chip select 1 device width select this bit field is used to configure the width of the rom selected by romcs1 . 00 = rom is 8 bits wide. 01 = rom is 16 bits wide. 10 = rom is 32 bits wide. 11 = rom is 32 bits wide. 9mode chip select 1 device mode this bit is used to configure the mode of the rom selected by romcs1 . 0 = rom is non-page mode. 1 = rom is page mode. 8 C 6 reserved reserved this bit field should be written to 0 for normal system operation. 5 C 4 sub_dly [1C0] chip select 1 device delay for subsequent accesses this bit field is used to configure the number of wait states for all page-mode accesses to the rom that are subsequent to the first access. this bit field applies only if the mode bit is 1. 00 = 0 wait states 01 = 1 wait state 10 = 2 wait states 11 = 3 wait states 3 reserved reserved this bit field should be written to 0 for normal system operation.
rom/flash controller registers lan?sc520 microcontroller register set manual 9-5 programming notes 2 C 0 first_dly [2C0] chip select 1 device delay for first access this bit field is used to configure the number of wait states for the first access to the rom, and for subsequent accesses if the mode bit is 0. 000 = 0 wait states 001 = 1 wait state 010 = 2 wait states 011 = 3 wait states 100 = 4 wait states 101 = 5 wait states 110 = 6 wait states 111 = 7 wait states bit name function
rom/flash controller registers 9-6 lan?sc520 microcontroller register set manual romcs2 control (romcs2ctl) memory-mapped mmcr offset 56h register description this register contains configuration information about the location (i.e., sdram bus or gp bus), width, operation mode, and timing of the rom devices that are attached to the lansc520 microcontroller romcs2 signal. bit definitions 15 14 13 12 11 10 9 8 bit reserved dgp width[1 C0] mode reserved reset 00000000 r/w rsv r/w r/w r/w rsv 7 6 5 4 3 2 1 0 bit reserved sub_dly[1C0] reserved first_dly[2C0] reset 00110111 r/w rsv r/w rsv r/w bit name function 15 C 13 reserved reserved this bit field should be written to 0 for normal system operation. 12 dgp chip select 2 device sdram/gp bus select this bit is used to configure the location of the rom devices that are enabled by romcs2 . the rom can be connected either to the sdram data bus or to the gp bus. 0 = rom is on the gp bus. 1 = rom is on the sdram data bus. 11 C 10 width[ 1C0] chip select 2 device width select this bit field is used to configure the width of the rom selected by romcs2 . 00 = rom is 8 bits wide. 01 = rom is 16 bits wide. 10 = rom is 32 bits wide. 11 = rom is 32 bits wide. 9mode chip select 2 device mode this bit is used to configure the mode of the rom selected by romcs2 . 0 = rom is non-page mode. 1 = rom is page mode. 8 C 6 reserved reserved this bit field should be written to 0 for normal system operation. 5 C 4 sub_dly[ 1C0] chip select 2 device delay for subsequent accesses this bit field is used to configure the number of wait states for all page-mode accesses to the rom that are subsequent to the first access. this bit field applies only if the mode bit is 1. 00 = 0 wait states 01 = 1 wait state 10 = 2 wait states 11 = 3 wait states 3 reserved reserved this bit field should be written to 0 for normal system operation.
rom/flash controller registers lan?sc520 microcontroller register set manual 9-7 programming notes 2 C 0 first_dly [ 2C0] chip select 2 device delay for first access this bit field is used to configure the number of wait states for the first access to the rom, and for subsequent accesses if the mode bit is 0. 000 = 0 wait states 001 = 1 wait state 010 = 2 wait states 011 = 3 wait states 100 = 4 wait states 101 = 5 wait states 110 = 6 wait states 111 = 7 wait states bit name function
rom/flash controller registers 9-8 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 10-1 chapter 10 general-purpose bus controller registers 10.1 overview this chapter describes the general-purpose (gp) bus registers of the lansc520 microcontroller. the gp bus is used for glueless connection of 8- and 16-bit devices to the lansc520 microcontroller. to provide the glueless interface, the gp bus interface timing and data bus width is programmable. the gp bus register set consists of 12 memory-mapped configuration region (mmcr) registers used to configure the gp bus timing and data bus width. see the lan?sc520 microcontroller users manual , order #22004, for details about the gp bus. table 10-1 lists the gp bus registers in offset order, with the corresponding descriptions page number. 10.2 registers table 10-1 gp bus mmcr registers register name mnemonic mmcr offset page number gp echo mode gpecho c00h page 10-2 gp chip select data width gpcsdw c01h page 10-3 gp chip select qualification gpcsqual c02h page 10-5 gp chip select recovery time gpcsrt c08h page 10-7 gp chip select pulse width gpcspw c09h page 10-8 gp chip select offset gpcsoff c0ah page 10-9 gp read pulse width gprdw c0bh page 10-10 gp read offset gprdoff c0ch page 10-11 gp write pulse width gpwrw c0dh page 10-12 gp write offset gpwroff c0eh page 10-13 gpale pulse width gpalew c0fh page 10-14 gpale offset gpaleoff c10h page 10-15
general-purpose bus controller registers 10-2 lan?sc520 microcontroller register set manual gp echo mode (gpecho) memory-mapped mmcr offset c00h register description this register is used to enable the gp bus echo mode. bit definitions programming notes while echo mode is enabled, the access timing to internal peripherals is modified to adhere to the external timings programmed by the user. this ensures that external peripherals connected to the gp bus still work as programmed by the user. thus it is possible that access to internal peripherals are slower in echo mode than in normal mode. while echo mode is enabled, the system designer must ensure that the gp bus timing is not faster than that shown in table 10-2. the table shows the minimum gp bus timing register values allowed in echo mode. see the corresponding register descriptions beginning on page 10-7. : 7 6 5 4 3 2 1 0 bit reserved gp_echo_ enb reset 00000000 r/w rsv r/w bit name function 7 C 1 reserved reserved this field should be written to 0 for normal system operation. 0 gp_echo_ enb gp bus echo mode enable this bit is used to enable the echo mode of gp bus. 0 = echo mode is disabled. 1 = echo mode is enabled. accesses to the microcontrollers integrated peripherals are echoed to the external gp bus table 10-2 gp bus echo mode minimum timing signal type offset register value 1 notes: 1. the actual time value is the register value plus one. times are in units of one internal (33-mhz) clock period. pulse width register value 1 recovery time register value 1 gp chip select 1 3 1 gp read 1 3 gp write 1 3 gpale 0 0
general-purpose bus controller registers lan?sc520 microcontroller register set manual 10-3 gp chip select data width (gpcsdw) memory-mapped mmcr offset c01h register description this register is used to select the default data width for each of the eight gp bus chip selects. bit definitions 7 6 5 4 3 2 1 0 bit gpcs7_ dw gpcs6_ dw gpcs5_ dw gpcs4_ dw gpcs3_ dw gpcs2_ dw gpcs1_ dw gpcs0_ dw reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 7 gpcs7_dw data width select for gpcs7 this bit is used to select the default data width for the gp bus chip select 7 signal. 0 = 8-bit data 1 = 16-bit data 6 gpcs6_dw data width select for gpcs6 this bit is used to select the default data width for the gp bus chip select 6 signal. 0 = 8-bit data 1 = 16-bit data 5 gpcs5_dw data width select for gpcs5 this bit is used to select the default data width for the gp bus chip select 5 signal. 0 = 8-bit data 1 = 16-bit data 4 gpcs4_dw data width select for gpcs4 this bit is used to select the default data width for the gp bus chip select 4 signal. 0 = 8-bit data 1 = 16-bit data 3 gpcs3_dw data width select for gpcs3 this bit is used to select the default data width for the gp bus chip select 3 signal. 0 = 8-bit data 1 = 16-bit data 2 gpcs2_dw data width select for gpcs2 this bit is used to select the default data width for the gp bus chip select 2 signal. 0 = 8-bit data 1 = 16-bit data 1 gpcs1_dw data width select for gpcs1 this bit is used to select the default data width for the gp bus chip select 1 signal. 0 = 8-bit data 1 = 16-bit data 0 gpcs0_dw data width select for gpcs0 this bit is used to select the default data width for the gp bus chip select 0 signal. 0 = 8-bit data 1 = 16-bit data
general-purpose bus controller registers 10-4 lan?sc520 microcontroller register set manual programming notes the gpcsx_dw bits are ignored if the gpiocs16 signal is asserted during an i/o access, or if the gpmem cs 16 signal is asserted during a memory access. the gpiocs16 signal is ignored if it is asserted during a memory access. similarly, the gpmem cs 16 signal is ignored if it is asserted during an i/o access. before using one of the gpcs7 Cgpcs0 signals, software must set the corresponding gpcsx_sel bit in the cspfs register (see page 20-7).
general-purpose bus controller registers lan?sc520 microcontroller register set manual 10-5 gp chip select qualification (gpcsqual) memory-mapped mmcr offset c02h register description this register is used to qualify the gp bus chip selects with gpiord , gpiowr , gpmemrd or gpmemwr . the qualifiers that can be used depend on the target bit field in the parx register for the addressed region (see page 2-6). if the target bit field selects gp bus i/o, the gp bus chip selects can be qualified with gpiord or gpiowr . if the target bit field selects gp bus memory, the gp bus chip selects can be qualified with gpmemrd or gpmemwr . bit definitions 15 14 13 12 11 10 9 8 bit gpcs7_rw [1C0] gpcs6_rw[1C0] gpcs5_rw[1C0] gpcs4_rw[1C0] reset 00000000 r/w r/w r/w r/w r/w 7 6 5 4 3 2 1 0 bit gpcs3_rw[1C0] gpcs2_rw[1C0] gpcs1_rw[1C0] gpcs0_rw[1C0] reset 00000000 r/w r/w r/w r/w r/w bit name function 15 C 14 gpcs7_rw [1C0] gpcs7 qualifier selection this field is used to qualify the gp bus chip select 7 with gpiord , gpiowr , gpmemrd or gpmemwr . 00 = no qualification. 01 = qualify the chip select with write strobes (gpiowr or gpmemwr ) 10 = qualify the chip select with read strobes (gpiord or gpmemrd ) 11 = qualify the chip select with both strobes (gpiord and gpiowr , or gpmemrd and gpmemwr ) 13 C 12 gpcs6_rw [1C0] gpcs6 qualifier selection this field is used to qualify the gp bus chip select 6 with gpiord , gpiowr , gpmemrd or gpmemwr . 00 = no qualification. 01 = qualify the chip select with write strobes (gpiowr or gpmemwr ) 10 = qualify the chip select with read strobes (gpiord or gpmemrd ) 11 = qualify the chip select with both strobes (gpiord and gpiowr , or gpmemrd and gpmemwr ) 11 C 10 gpcs5_rw [1C0] gpcs5 qualifier selection this field is used to qualify the gp bus chip select 5 with gpiord , gpiowr , gpmemrd or gpmemwr . 00 = no qualification. 01 = qualify the chip select with write strobes (gpiowr or gpmemwr ) 10 = qualify the chip select with read strobes (gpiord or gpmemrd ) 11 = qualify the chip select with both strobes (gpiord and gpiowr , or gpmemrd and gpmemwr )
general-purpose bus controller registers 10-6 lan?sc520 microcontroller register set manual programming notes when this register (gpcsqual) is used to qualify a gp bus chip select signal, the external timing relationship between the qualifier and the chip select is not guaranteed. for example, deassertion of the chip select signal could precede the qualifiers deassertion on the external gp bus. if a single qualifier type (only read or only write) is used to qualify a gp bus chip select signal, the corresponding chip select is not asserted for accesses of the other type. for example, if the gpcs0_rw bit field is set to 01b to qualify gp chip select 0 with write strobes only, gp chip select 0 is not asserted for read accesses. before using one of the gpcs7 Cgpcs1 signals, software must set the corresponding gpcsx_sel bit in the cspfs register (see page 20-7). before using the gpcs0 signal, software must set the pio27_sel bit in the piopfs31C 16 register (see page 20-5). 9 C 8 gpcs4_rw [1C0] gpcs4 qualifier selection this field is used to qualify the gp bus chip select 4 with gpiord , gpiowr , gpmemrd or gpmemwr . 00 = no qualification. 01 = qualify the chip select with write strobes (gpiowr or gpmemwr ) 10 = qualify the chip select with read strobes (gpiord or gpmemrd ) 11 = qualify the chip select with both strobes (gpiord and gpiowr , or gpmemrd and gpmemwr ) 7 C 6 gpcs3_rw [1C0] gpcs3 qualifier selection this field is used to qualify the gp bus chip select 3 with gpiord , gpiowr , gpmemrd or gpmemwr . 00 = no qualification. 01 = qualify the chip select with write strobes (gpiowr or gpmemwr ) 10 = qualify the chip select with read strobes (gpiord or gpmemrd ) 11 = qualify the chip select with both strobes (gpiord and gpiowr , or gpmemrd and gpmemwr ) 5 C 4 gpcs2_rw [1C0] gpcs2 qualifier selection this field is used to qualify the gp bus chip select 2 with gpiord , gpiowr , gpmemrd or gpmemwr . 00 = no qualification. 01 = qualify the chip select with write strobes (gpiowr or gpmemwr ) 10 = qualify the chip select with read strobes (gpiord or gpmemrd ) 11 = qualify the chip select with both strobes (gpiord and gpiowr , or gpmemrd and gpmemwr ) 3 C 2 gpcs1_rw [1C0] gpcs1 qualifier selection this field is used to qualify the gp bus chip select 1 with gpiord , gpiowr , gpmemrd or gpmemwr . 00 = no qualification. 01 = qualify the chip select with write strobes (gpiowr or gpmemwr ) 10 = qualify the chip select with read strobes (gpiord or gpmemrd ) 11 = qualify the chip select with both strobes (gpiord and gpiowr , or gpmemrd and gpmemwr ) 1 C 0 gpcs0_rw [1C0] gpcs0 qualifier selection this field is used to qualify the gp bus chip select 0 with gpiord , gpiowr , gpmemrd or gpmemwr . 00 = no qualification. 01 = qualify the chip select with write strobes (gpiowr or gpmemwr ) 10 = qualify the chip select with read strobes (gpiord or gpmemrd ) 11 = qualify the chip select with both strobes (gpiord and gpiowr , or gpmemrd and gpmemwr ) bit name function
general-purpose bus controller registers lan?sc520 microcontroller register set manual 10-7 gp chip select recovery time (gpcsrt) memory-mapped mmcr offset c08h register description this register is used to program the chip select recovery time for all gp bus cycles. bit definitions programming notes before using one of the gpcs7 Cgpcs1 signals, software must set the corresponding gpcsx_sel bit in the cspfs register (see page 20-7). before using the gpcs0 signal, software must set the pio27_sel bit in the piopfs31C 16 register (see page 20-5). figure 10-1 shows the relationships between the various adjustable gp bus timing parameters. figure 10-1 gp bus signal timing adjustment 7 6 5 4 3 2 1 0 bit gpcs_recovr [7C0] reset 00000000 r/w r/w bit name function 7 C 0 gpcs_ recovr [7C0] chip select recovery time this field adjusts the recovery time for all the gp bus chip selects. the resolution of this parameter is one internal (33-mhz) clock period. the recovery time used is (gpcs_recovr + 1) internal clock periods; i.e., if gpcs_recovr is 0, the recovery time is one clock period. gpa25Cgpa0 gpcsx gpmemrd or gpiord gpmemwr or gpiowr gpale gpcsoff + 1 gprdoff + 1 gpwroff + 1 gpcspw + 1 gprdw + 1 gpwrw + 1 gpalew + 1 gpcsrt + 1 bus cycle duration beginning of a bus cycle gpaleoff + 1 address valid notes: 1. timing parameter values are in units of one internal (33-mhz) clock period. 2. timing parameters in the diagram can be adjusted via the corresponding gp bus registers. 3. gpcsoff + gpcspw + gpcsrt must be greater than or equal to gprdoff + gprdw, gpwroff + gpwrw, and gpaleoff + gpalew. 4. very long gp bus cycles can cause the pci host bridge target controller to violate the 10 s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. in pci bus 2.2-compliant designs, software must limit the length of gp bus cycles.
general-purpose bus controller registers 10-8 lan?sc520 microcontroller register set manual gp chip select pulse width (gpcspw) memory-mapped mmcr offset c09h register description this register is used to program the pulse width for all the gp bus chip selects. bit definitions programming notes before using one of the gpcs7 Cgpcs1 signals, software must set the corresponding gpcsx_sel bit in the cspfs register (see page 20-7). before using the gpcs0 signal, software must set the pio27_sel bit in the piopfs31C 16 register (see page 20-5). figure 10-1 on page 10-7 shows the relationships between the various adjustable gp bus timing parameters. 7 6 5 4 3 2 1 0 bit gpcs_width [7C0] reset 00000000 r/w r/w bit name function 7 C 0 gpcs_width [7C0] signal width for the gp bus chip selects this field adjusts the signal pulse width (time) of all the gp bus chip selects. the resolution of this parameter is one internal (33-mhz) clock period. the width used is (gpcs_width + 1) internal clock periods; i.e., if gpcs_width is 0, the pulse is one clock period wide.
general-purpose bus controller registers lan?sc520 microcontroller register set manual 10-9 gp chip select offset (gpcsoff) memory-mapped mmcr offset c0ah register description this register is used to program the offset time from the beginning of a gp bus cycle for all the gp bus chip selects. bit definitions programming notes before using one of the gpcs7 Cgpcs1 signals, software must set the corresponding gpcsx_sel bit in the cspfs register (see page 20-7). before using the gpcs0 signal, software must set the pio27_sel bit in the piopfs31C 16 register (see page 20-5). figure 10-1 on page 10-7 shows the relationships between the various adjustable gp bus timing parameters. 7 6 5 4 3 2 1 0 bit gpcs_off [7C0] reset 00000000 r/w r/w bit name function 7 C 0 gpcs_off [7C0] offset time for the gp bus chip select this field adjusts the offset time of all the gp bus chip selects. the resolution of this parameter is one internal (33-mhz) clock period. the offset time used is (gpcs_off + 1) internal clock periods; i.e., if gpcs_off is 0, the offset time is one clock period.
general-purpose bus controller registers 10-10 lan?sc520 microcontroller register set manual gp read pulse width (gprdw) memory-mapped mmcr offset c0bh register description this register is used to program the signal width for the read strobes (gpiord and gpmemrd ). bit definitions programming notes figure 10-1 on page 10-7 shows the relationships between the various adjustable gp bus timing parameters. 7 6 5 4 3 2 1 0 bit gp_rd_width [7C0] reset 00000000 r/w r/w bit name function 7 C 0 gp_rd_ width [7C0] signal width for gpiord and gpmemrd this field adjusts the signal pulse width (time) of the gp bus read strobes. the resolution of this parameter is one internal (33-mhz) clock period. the width used is (gp_rd_width + 1) internal clock periods; i.e., if gp_rd_width is 0, the pulse is one clock period wide.
general-purpose bus controller registers lan?sc520 microcontroller register set manual 10-11 gp read offset (gprdoff) memory-mapped mmcr offset c0ch register description this register is used to program the offset time from beginning of a gp bus cycle for gpiord and gpmemrd . bit definitions programming notes figure 10-1 on page 10-7 shows the relationships between the various adjustable gp bus timing parameters. 7 6 5 4 3 2 1 0 bit gp_rd_off [7C0] reset 00000000 r/w r/w bit name function 7 C 0 gp_rd_off [7C0] offset time for gpiord and gpmemrd this field adjusts the offset time of the gp bus read strobes. the resolution of this parameter is one internal (33-mhz) clock period. the offset time used is (gp_rd_off + 1) internal clock periods; i.e., if gp_rd_off is 0, the offset time is one clock period.
general-purpose bus controller registers 10-12 lan?sc520 microcontroller register set manual gp write pulse width (gpwrw) memory-mapped mmcr offset c0dh register description this register is used to program the pulse width for the write strobes (gpio w r and gpmemwr ). bit definitions programming notes figure 10-1 on page 10-7 shows the relationships between the various adjustable gp bus timing parameters. 7 6 5 4 3 2 1 0 bit gp_wr_width [7C0] reset 00000000 r/w r/w bit name function 7 C 0 gp_wr_ width [7C0] signal width for (gpio w r and gpmemwr ) this field adjusts the signal pulse width (time) of the gp bus write strobes. the resolution of this parameter is one internal (33-mhz) clock period. the width used is (gp_wr_width + 1) internal clock periods; i.e., if gp_wr_width is 0, the pulse is one clock period wide.
general-purpose bus controller registers lan?sc520 microcontroller register set manual 10-13 gp write offset (gpwroff) memory-mapped mmcr offset c0eh register description this register is used to program the offset from beginning of a gp bus cycle for gpiowr and gpmemwr . bit definitions programming notes figure 10-1 on page 10-7 shows the relationships between the various adjustable gp bus timing parameters. 7 6 5 4 3 2 1 0 bit gp_wr_off [7C0] reset 00000000 r/w r/w bit name function 7 C 0 gp_wr_off [7C0] offset time for gpiowr and gpmemwr this field adjusts the offset time of the gp bus write strobes. the resolution of this parameter is one internal (33-mhz) clock period. the offset time used is (gp_wr_off + 1) internal clock periods; i.e., if gp_wr_off is 0, the offset time is one clock period.
general-purpose bus controller registers 10-14 lan?sc520 microcontroller register set manual gpale pulse width (gpalew) memory-mapped mmcr offset c0fh register description this register is used to program the signal width for gpale. bit definitions programming notes figure 10-1 on page 10-7 shows the relationships between the various adjustable gp bus timing parameters. 7 6 5 4 3 2 1 0 bit gp_ale_width [7C0] reset 00000000 r/w r/w bit name function 7 C 0 gp_ale_ width [7C0] signal width for gpale this field adjusts the signal pulse width (time) of the gpale signal. the resolution of this parameter is one internal (33-mhz) clock period. the width used is (gp_ale_width + 1) internal clock periods; i.e., if gp_ale_width is 0, the pulse is one clock period wide.
general-purpose bus controller registers lan?sc520 microcontroller register set manual 10-15 gpale offset (gpaleoff) memory-mapped mmcr offset c10h register description this register is used to program the offset from the beginning of a gp bus cycle for gpale. bit definitions programming notes figure 10-1 on page 10-7 shows the relationships between the various adjustable gp bus timing parameters. 7 6 5 4 3 2 1 0 bit gp_ale_off [7C0] reset 00000000 r/w r/w bit name function 7 C 0 gp_ale_off [7C0] offset time for gpale this field adjusts the offset time of the gpale signal. the resolution of this parameter is one internal (33-mhz) clock period. the offset time used is (gp_ale_off + 1) internal clock periods; i.e., if gp_ale_off is 0, the offset time is one clock period.
general-purpose bus controller registers 10-16 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 11-1 chapter 11 gp dma controller registers 11.1 overview this chapter describes the general-purpose bus direct-memory access (gp bus dma) registers of the lansc520 microcontroller. the lansc520 microcontrollers gp dma controller consists of two cascaded dma controller devices that provide a total of seven independent channels. channels 0C3 are on the slave controller device, and channels 5C7 are on the master controller device. (channel 4 is used for cascading the two devices.) the gp bus dma register set includes two groups of registers: n 35 memory-mapped configuration region (mmcr) registers are used to specify the extended page address and the operation of each channel in the enhanced mode. n 52 direct-mapped i/o registers are used to configure the operation of each dma controller device (master and slave) within the dma controller, and to set up the memory address and transfer count for each channel. see the lan?sc520 microcontroller users manual , order #22004, for details about the gp bus dma controller. table 11-1 and table 11-2 list each type of gp bus dma register in offset order, with the corresponding descriptions page number. 11.2 registers table 11-1 gp-dma mmcr registers register name mnemonic mmcr offset page number gp-dma control gpdmactl d80h page 11-4 gp-dma memory-mapped i/o gpdmammio d81h page 11-5 gp-dma resource channel map a gpdmaextchmapa d82h page 11-6 gp-dma resource channel map b gpdmaextchmapb d84h page 11-8 gp-dma channel 0 extended page gpdmaextpg0 d86h page 11-10 gp-dma channel 1 extended page gpdmaextpg1 d87h page 11-11 gp-dma channel 2 extended page gpdmaextpg2 d88h page 11-12 gp-dma channel 3 extended page gpdmaextpg3 d89h page 11-13 gp-dma channel 5 extended page gpdmaextpg5 d8ah page 11-14 gp-dma channel 6 extended page gpdmaextpg6 d8bh page 11-15 gp-dma channel 7 extended page gpdmaextpg7 d8ch page 11-16 gp-dma channel 3 extended transfer count gpdmaexttc3 d90h page 11-17 gp-dma channel 5 extended transfer count gpdmaexttc5 d91h page 11-18
gp dma controller registers 11-2 lan?sc520 microcontroller register set manual gp-dma channel 6 extended transfer count gpdmaexttc6 d92h page 11-19 gp-dma channel 7 extended transfer count gpdmaexttc7 d93h page 11-20 buffer chaining control gpdmabcctl d98h page 11-21 buffer chaining status gpdmabcsta d99h page 11-22 buffer chaining interrupt enable gpdmabsintenb d9ah page 11-24 buffer chaining valid gpdmabcval d9bh page 11-25 gp-dma channel 3 next address low gpdmanxtaddl3 da0h page 11-26 gp-dma channel 3 next address high gpdmanxtaddh3 da2h page 11-27 gp-dma channel 5 next address low gpdmanxtaddl5 da4h page 11-28 gp-dma channel 5 next address high gpdmanxtaddh5 da6h page 11-29 gp-dma channel 6 next address low gpdmanxtaddl6 da8h page 11-30 gp-dma channel 6 next address high gpdmanxtaddh6 daah page 11-31 gp-dma channel 7 next address low gpdmanxtaddl7 dach page 11-32 gp-dma channel 7 next address high gpdmanxtaddh7 daeh page 11-33 gp-dma channel 3 next transfer count low gpdmanxttcl3 db0h page 11-34 gp-dma channel 3 next transfer count high gpdmanxttch3 db2h page 11-35 gp-dma channel 5 next transfer count low gpdmanxttcl5 db4h page 11-36 gp-dma channel 5 next transfer count high gpdmanxttch5 db6h page 11-37 gp-dma channel 6 next transfer count low gpdmanxttcl6 db8h page 11-38 gp-dma channel 6 next transfer count high gpdmanxttch6 dbah page 11-39 gp-dma channel 7 next transfer count low gpdmanxttcl7 dbch page 11-40 gp-dma channel 7 next transfer count high gpdmanxttch7 dbeh page 11-41 table 11-2 gp-dma direct-mapped registers register name mnemonic i/o address page number slave dma channel 0 memory address gpdma0mar 0000h page 11-42 slave dma channel 0 transfer count gpdma0tc 0001h page 11-43 slave dma channel 1 memory address gpdma1mar 0002h page 11-44 slave dma channel 1 transfer count gpdma1tc 0003h page 11-45 slave dma channel 2 memory address gpdma2mar 0004h page 11-46 slave dma channel 2 transfer count gpdma2tc 0005h page 11-47 slave dma channel 3 memory address gpdma3mar 0006h page 11-48 slave dma channel 3 transfer count gpdma3tc 0007h page 11-49 slave dma channel 0C3 status sldmasta 0008h page 11-50 slave dma channel 0C3 control sldmactl 0008h page 11-51 slave software drq(n) request sldmaswreq 0009h page 11-53 slave dma channel 0C3 mask sldmamsk 000ah page 11-54 slave dma channel 0C3 mode sldmamode 000bh page 11-55 slave dma clear byte pointer sldmacbp 000ch page 11-57 table 11-1 gp-dma mmcr registers (continued) register name mnemonic mmcr offset page number
gp dma controller registers lan?sc520 microcontroller register set manual 11-3 slave dma controller reset sldmarst 000dh page 11-58 slave dma controller temporary sldmatmp 000dh page 11-59 slave dma mask reset sldmamskrst 000eh page 11-60 slave dma general mask sldmagenmsk 000fh page 11-61 general 0 gpdmagr0 0080h page 11-62 slave dma channel 2 page gpdma2pg 0081h page 11-63 slave dma channel 3 page gpdma3pg 0082h page 11-64 slave dma channel 1 page gpdma1pg 0083h page 11-65 general 1 gpdmagr1 0084h page 11-66 general 2 gpdmagr2 0085h page 11-67 general 3 gpdmagr3 0086h page 11-68 slave dma channel 0 page gpdma0pg 0087h page 11-69 general 4 gpdmagr4 0088h page 11-70 master dma channel 6 page gpdma6pg 0089h page 11-71 master dma channel 7 page gpdma7pg 008ah page 11-72 master dma channel 5 page gpdma5pg 008bh page 11-73 general 5 gpdmagr5 008ch page 11-74 general 6 gpdmagr6 008dh page 11-75 general 7 gpdmagr7 008eh page 11-76 general 8 gpdmagr8 008fh page 11-77 master dma channel 4 memory address gpdma4mar 00c0h page 11-78 master dma channel 4 transfer count gpdma4tc 00c2h page 11-79 master dma channel 5 memory address gpdma5mar 00c4h page 11-80 master dma channel 5 transfer count gpdma5tc 00c6h page 11-81 master dma channel 6 memory address gpdma6mar 00c8h page 11-82 master dma channel 6 transfer count gpdma6tc 00cah page 11-83 master dma channel 7 memory address gpdma7mar 00cch page 11-84 master dma channel 7 transfer count gpdma7tc 00ceh page 11-85 master dma channel 4C7 status mstdmasta 00d0h page 11-86 master dma channel 4C7 control mstdmactl 00d0h page 11-87 master software drq(n) request mstdmaswreq 00d2h page 11-89 master dma channel 4C7 mask mstdmamsk 00d4h page 11-90 master dma channel 4C7 mode mstdmamode 00d6h page 11-91 master dma clear byte pointer mstdmacbp 00d8h page 11-93 master dma controller reset mstdmarst 00dah page 11-94 master dma controller temporary mstdmatmp 00dah page 11-95 master dma mask reset mstdmamskrst 00dch page 11-96 master dma general mask mstdmagenmsk 00deh page 11-97 table 11-2 gp-dma direct-mapped registers (continued) register name mnemonic i/o address page number
gp dma controller registers 11-4 lan?sc520 microcontroller register set manual gp-dma control (gpdmactl) memory-mapped mmcr offset d80h register description this register provides control for the enhanced mode and selects the clock frequency. bit definitions programming notes 7 6 5 4 3 2 1 0 bit ch7_alt_ size ch6_alt_ size ch5_alt_ size ch3_alt_ size clk_mode reserved enh_ mode_ enb reset 00000000 r/w r/w r/w r/w r/w r/w rsv r/w bit name function 7 ch7_alt_size alternate size for channel 7 0 = channel 7 is 16 bits wide. 1 = channel 7 is 8 bits wide. this bit field is ignored if the enh_mode_enb bit is 0. 6 ch6_alt_size alternate size for channel 6 0 = channel 6 is 16 bits wide. 1 = channel 6 is 8 bits wide. this bit field is ignored if the enh_mode_enb bit is 0. 5 ch5_alt_size alternate size for channel 5 0 = channel 5 is 16 bits wide. 1 = channel 5 is 8 bits wide. this bit field is ignored if the enh_mode_enb bit is 0. 4 ch3_alt_size alternate size for channel 3 0 = channel 3 is 8 bits wide. 1 = channel 3 is 16 bits wide. this bit field is ignored if the enh_mode_enb bit is 0. note that the channel 3 default size differs from the channel 5C7 default size. do not set the ch3_alt_size bit if an internal uart is mapped to channel 3 via the gpdmaextchmapb register (see page 11-8). 3C2 clk_mode clock mode 00 = operate the gp bus dma controller at 4 mhz. 01 = operate the gp bus dma controller at 8 mhz. 10 = operate the gp bus dma controller at 16 mhz. 11 = reserved. the frequencies shown here are nominal. the exact gp bus dma frequency is derived by dividing the microcontrollers 33-mhz crystal input, which can be 33.000 or 33.333 mhz. 1 reserved reserved this bit field should be written to 0 for normal system operation. 0 enh_mode_ enb enhanced mode enable 0 = disable enhanced gp-dma mode (use normal gp-dma mode). 1 = enable enhanced gp-dma mode.
gp dma controller registers lan?sc520 microcontroller register set manual 11-5 gp-dma memory-mapped i/o (gpdmammio) memory-mapped mmcr offset d81h register description this register provides the selection of an i/o device (enabled by the gpiord and gpiowr signals) or a memory- mapped i/o device (enabled by the gpmemrd or gpmemwr signals) for each channel. bit definitions programming notes a bit field in this register (gpdmammio) is ignored if the corresponding channel is mapped to an internal uart via the gpdmaextchmapb register (see page 11-8). 7 6 5 4 3 2 1 0 bit dma7_ mmap dma6_ mmap dma5_ mmap reserved dma3_ mmap dma2_ mmap dma1_ mmap dma0_ mmap reset 00000000 r/w r/w r/w r/w rsv r/w r/w r/w r/w bit name function 7dma7_mmap memory-mapped device for dma channel 7 0 = dma channel 7 connects to a direct-mapped i/o device. 1 = dma channel 7 connects to a memory-mapped device. 6dma6_mmap memory-mapped device for dma channel 6 0 = dma channel 6 connects to a direct-mapped i/o device. 1 = dma channel 6 connects to a memory-mapped device. 5dma5_mmap memory-mapped device for dma channel 5 0 = dma channel 5 connects to a direct-mapped i/o device. 1 = dma channel 5 connects to a memory-mapped device. 4 reserved reserved this bit field should be written to 0 for normal system operation. 3dma3_mmap memory-mapped device for dma channel 3 0 = dma channel 3 connects to a direct-mapped i/o device. 1 = dma channel 3 connects to a memory-mapped device. 2dma2_mmap memory-mapped device for dma channel 2 0 = dma channel 2 connects to a direct-mapped i/o device. 1 = dma channel 2 connects to a memory-mapped device. 1dma1_mmap memory-mapped device for dma channel 1 0 = dma channel 1 connects to a direct-mapped i/o device. 1 = dma channel 1 connects to a memory-mapped device. 0dma0_mmap memory-mapped device for dma channel 0 0 = dma channel 0 connects to a direct-mapped i/o device. 1 = dma channel 0 connects to a memory-mapped device.
gp dma controller registers 11-6 lan?sc520 microcontroller register set manual gp-dma resource channel map a (gpdmaextchmapa) memory-mapped mmcr offset d82h register description this register indicates the channel mapping for the gpdrq3 Cgpdrq0 and gpdack3 Cgpdack0 pins. bit definitions 15 14 13 12 11 10 9 8 bit gpdrq3_chsel [3C0] gpdrq2_chsel[3C0] reset 11111111 r/w r/w r/w 7 6 5 4 3 2 1 0 bit gpdrq1_chsel[3C0] gpdrq0_chsel[3C0] reset 11111111 r/w r/w r/w bit name function 15C12 gpdrq3_ chsel[3C0] gpdrq3 channel mapping map the gpdrq3 and gpdack3 pins to a gp-dma channel: 0000 = channel 0 0001 = channel 1 0010 = channel 2 0011 = channel 3 0101 = channel 5 0110 = channel 6 0111 = channel 7 all other values are treated as unconnected. 11C8 gpdrq2_ chsel[3C0] gpdrq2 channel mapping map the gpdrq2 and gpdack2 pins to a gp-dma channel: 0000 = channel 0 0001 = channel 1 0010 = channel 2 0011 = channel 3 0101 = channel 5 0110 = channel 6 0111 = channel 7 all other values are treated as unconnected.
gp dma controller registers lan?sc520 microcontroller register set manual 11-7 programming notes 7 C 4 gpdrq1_ chsel [3C0] gpdrq1 channel mapping map the gpdrq1 and gpdack1 pins to a gp-dma channel: 0000 = channel 0 0001 = channel 1 0010 = channel 2 0011 = channel 3 0101 = channel 5 0110 = channel 6 0111 = channel 7 all other values are treated as unconnected. 3 C 0 gpdrq0_ chsel [3C0] gpdrq0 channel mapping map the gpdrq0 and gpdack0 pins to a gp-dma channel: 0000 = channel 0 0001 = channel 1 0010 = channel 2 0011 = channel 3 0101 = channel 5 0110 = channel 6 0111 = channel 7 all other values are treated as unconnected. bit name function
gp dma controller registers 11-8 lan?sc520 microcontroller register set manual gp-dma resource channel map b (gpdmaextchmapb) memory-mapped mmcr offset d84h register description this register indicates the channel mapping for the internal serial port request signals: txdrq2 Ctxdrq1 and rxdrq2C rxdrq1. bit definitions 15 14 13 12 11 10 9 8 bit txdrq2_chsel [3C0] txdrq1_chsel[3C0] reset 11111111 r/w r/w r/w 7 6 5 4 3 2 1 0 bit rxdrq2_chsel[3C0] rxdrq1_chsel[3C0] reset 11111111 r/w r/w r/w bit name function 15C12 txdrq2_ chsel[3C0] txdrq2 channel mapping map the txdrq2 and txdack2 internal signals to a gp-dma channel: 0000 = channel 0 0001 = channel 1 0010 = channel 2 0011 = channel 3 all other values are treated as unconnected. 11C8 txdrq1_ chsel[3C0] txdrq1 channel mapping map the txdrq1 and txdack1 internal signals to a gp-dma channel: 0000 = channel 0 0001 = channel 1 0010 = channel 2 0011 = channel 3 all other values are treated as unconnected. 7C4 rxdrq2_ chsel[3C0] rxdrq2 channel mapping map rxdrq2 and rxdack2 internal signals to a gp-dma channel: 0000 = channel 0 0001 = channel 1 0010 = channel 2 0011 = channel 3 all other values are treated as unconnected.
gp dma controller registers lan?sc520 microcontroller register set manual 11-9 programming notes 3 C 0 rxdrq1_ chsel [3C0] rxdrq1 channel mapping map the rxdrq1 and rxdack1 internal signals to a gp-dma channel: 0000 = channel 0 0001 = channel 1 0010 = channel 2 0011 = channel 3 all other values are treated as unconnected. bit name function
gp dma controller registers 11-10 lan?sc520 microcontroller register set manual gp-dma channel 0 extended page (gpdmaextpg0) memory-mapped mmcr offset d86h register description this register provides the extended page address for channel 0. bit definitions programming notes the extended page address is used in conjunction with the memory address and the page address registers for the associated channel to make up a 28-bit address (a27Ca0). the channel 0 extended page address bit field (dma0adr[27C24]) does not increment or decrement during dma because this channel does not support enhanced mode. 7 6 5 4 3 2 1 0 bit reserved dma0adr[27 C 24] reset 00000000 r/w rsv r/w bit name function 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3C0 dma0adr [27C24] dma channel 0 extended page address this bit field specifies the highest four memory address bits (a27Ca24) for channel 0.
gp dma controller registers lan?sc520 microcontroller register set manual 11-11 gp-dma channel 1 extended page (gpdmaextpg1) memory-mapped mmcr offset d87h register description this register provides the extended page address for channel 1. bit definitions programming notes the extended page address is used in conjunction with the memory address and the page address registers for the associated channel to make up a 28-bit address (a27Ca0). the channel 1 extended page address bit field (dma1adr[27C24]) does not increment or decrement during dma because this channel does not support enhanced mode. 7 6 5 4 3 2 1 0 bit reserved dma1adr[27 C 24] reset 00000000 r/w rsv r/w bit name function 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3C0 dma1adr [27C24] dma channel 1 extended page address this bit field specifies the highest four memory address bits (a27Ca24) for channel 1.
gp dma controller registers 11-12 lan?sc520 microcontroller register set manual gp-dma channel 2 extended page (gpdmaextpg2) memory-mapped mmcr offset d88h register description this register provides the extended page address for channel 2. bit definitions programming notes the extended page address is used in conjunction with the memory address and the page address registers for the associated channel to make up a 28-bit address (a27Ca0). the channel 2 extended page address bit field (dma2adr[27C24]) does not increment or decrement during dma because this channel does not support enhanced mode. 7 6 5 4 3 2 1 0 bit reserved dma2adr[27 C 24] reset 00000000 r/w rsv r/w bit name function 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3C0 dma2adr [27C24] dma channel 2 extended page address this bit field specifies the highest four memory address bits (a27Ca24) for channel 2.
gp dma controller registers lan?sc520 microcontroller register set manual 11-13 gp-dma channel 3 extended page (gpdmaextpg3) memory-mapped mmcr offset d89h register description this register provides the extended page address for channel 3. bit definitions programming notes the extended page address is used in conjunction with the memory address and the page address registers for the associated channel to make up a 28-bit address (a27Ca0). in enhanced mode, the channel 3 extended page address bit field (dma3adr[27C24]) increments or decrements if the memory address crosses the 16-mbyte boundary. in normal mode, these bits remain constant during the dma transfer. enhanced mode is enabled by setting the enh_mode_enb bit in the gpdmactl register (see page 11-4). 7 6 5 4 3 2 1 0 bit reserved dma3adr[27 C 24] reset 00000000 r/w rsv r/w! bit name function 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3C0 dma3adr [27C24] dma channel 3 extended page address this bit field specifies the highest four memory address bits (a27Ca24) for channel 3.
gp dma controller registers 11-14 lan?sc520 microcontroller register set manual gp-dma channel 5 extended page (gpdmaextpg5) memory-mapped mmcr offset d8ah register description this register provides the extended page address for channel 5. bit definitions programming notes the extended page address is used in conjunction with the memory address and the page address registers for the associated channel to make up a 28-bit address (a27Ca0). in enhanced mode, the channel 5 extended page address bit field (dma5adr[27C24]) increments or decrements if the memory address crosses the 16-mbyte boundary. in normal mode, these bits remain constant during the dma transfer. enhanced mode is enabled by setting the enh_mode_enb bit in the gpdmactl register (see page 11-4). 7 6 5 4 3 2 1 0 bit reserved dma5adr[27 C 24] reset 00000000 r/w rsv r/w! bit name function 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3C0 dma5adr [27C24] dma channel 5 extended page address this bit field specifies the highest four memory address bits (a27Ca24) for channel 5.
gp dma controller registers lan?sc520 microcontroller register set manual 11-15 gp-dma channel 6 extended page (gpdmaextpg6) memory-mapped mmcr offset d8bh register description this register provides the extended page address for channel 6. bit definitions programming notes the extended page address is used in conjunction with the memory address and the page address registers for the associated channel to make up a 28-bit address (a27Ca0). in enhanced mode, the channel 6 extended page address bit field (dma6adr[27C24]) increments or decrements if the memory address crosses the 16-mbyte boundary. in normal mode, these bits remain constant during the dma transfer. enhanced mode is enabled by setting the enh_mode_enb bit in the gpdmactl register (see page 11-4). 7 6 5 4 3 2 1 0 bit reserved dma6adr[27 C 24] reset 00000000 r/w rsv r/w! bit name function 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3C0 dma6adr [27C24] dma channel 6 extended page address this bit field specifies the highest four memory address bits (a27Ca24) for channel 6.
gp dma controller registers 11-16 lan?sc520 microcontroller register set manual gp-dma channel 7 extended page (gpdmaextpg7) memory-mapped mmcr offset d8ch register description this register provides the extended page address for channel 7. bit definitions programming notes the extended page address is used in conjunction with the memory address and the page address registers for the associated channel to make up a 28-bit address (a27Ca0). in enhanced mode, the channel 7 extended page address bit field (dma7adr[27C24]) increments or decrements if the memory address crosses the 16-mbyte boundary. in normal mode, these bits remain constant during the dma transfer. enhanced mode is enabled by setting the enh_mode_enb bit in the gpdmactl register (see page 11-4). 7 6 5 4 3 2 1 0 bit reserved dma7adr[27 C 24] reset 00000000 r/w rsv r/w! bit name function 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3C0 dma7adr [27C24] dma channel 7 extended page address this bit field specifies the highest four memory address bits (a27Ca24) for channel 7.
gp dma controller registers lan?sc520 microcontroller register set manual 11-17 gp-dma channel 3 extended transfer count (gpdmaexttc3) memory-mapped mmcr offset d90h register description this register provides extended transfer count bits for channel 3. bit definitions programming notes enhanced mode is enabled by setting the enh_mode_enb bit in the gpdmactl register (see page 11-4). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma3tc[23 C 16] reset 00000000 r/w r/w! bit name function 7C0 dma3tc [23C16] dma channel 3 transfer count extension this bit field provides the higher 8 bits of the transfer count for dma channel 3. in enhanced mode, this bit field is used with the dma3tc[15 C 0] bit field in the gpdma3tc register (see page 11-49) to allow counts up to 16 m (16,777,216) transfers. in normal mode, the value of this bit field (dma3tc[23C16]) is ignored.
gp dma controller registers 11-18 lan?sc520 microcontroller register set manual gp-dma channel 5 extended transfer count (gpdmaexttc5) memory-mapped mmcr offset d91h register description this register provides the extended transfer count bits for channel 5. bit definitions programming notes enhanced mode is enabled by setting the enh_mode_enb bit in the gpdmactl register (see page 11-4). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma5tc[23 C 16] reset 00000000 r/w r/w! bit name function 7C0 dma5tc [23C16] dma channel 5 transfer count extension this bit field provides the higher 8 bits of the transfer count for dma channel 5. in enhanced mode, this bit field is used with the dma5tc[15 C 0] bit field in the gpdma5tc register (see page 11-81) to allow counts up to 16 m (16,777,216) transfers. in normal mode, the value of this bit field (dma5tc[23C16]) is ignored.
gp dma controller registers lan?sc520 microcontroller register set manual 11-19 gp-dma channel 6 extended transfer count (gpdmaexttc6) memory-mapped mmcr offset d92h register description this register provides the extended transfer count bits for channel 6. bit definitions programming notes enhanced mode is enabled by setting the enh_mode_enb bit in the gpdmactl register (see page 11-4). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma6tc[23 C 16] reset 00000000 r/w r/w! bit name function 7C0 dma6tc [23C16] dma channel 6 transfer count extension this bit field provides the higher 8 bits of the transfer count for dma channel 6. in enhanced mode, this bit field is used with the dma6tc[15 C 0] bit field in the gpdma6tc register (see page 11-83) to allow counts up to 16 m (16,777,216) transfers. in normal mode, the value of this bit field (dma6tc[23C16]) is ignored.
gp dma controller registers 11-20 lan?sc520 microcontroller register set manual gp-dma channel 7 extended transfer count (gpdmaexttc7) memory-mapped mmcr offset d93h register description this register provides the extended transfer count bits for channel 7. bit definitions programming notes enhanced mode is enabled by setting the enh_mode_enb bit in the gpdmactl register (see page 11-4). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma7tc[23 C 16] reset 00000000 r/w r/w! bit name function 7C0 dma7tc [23C16] dma channel 7 transfer count extension this bit field provides the higher 8 bits of the transfer count for dma channel 7. in enhanced mode, this bit field is used with the dma7tc[15 C 0] bit field in the gpdma7tc register (see page 11-85) to allow counts up to 16 m (16,777,216) transfers. in normal mode, the value of this bit field (dma7tc[23C16]) is ignored.
gp dma controller registers lan?sc520 microcontroller register set manual 11-21 buffer chaining control (gpdmabcctl) memory-mapped mmcr offset d98h register description this register controls the buffer chaining feature in enhanced mode. bit definitions programming notes this register is ignored unless enhanced mode is enabled. enhanced mode is enabled by setting the enh_mode_enb bit in the gpdmactl register (see page 11-4). 7 6 5 4 3 2 1 0 bit reserved ch7_ bchn_enb ch6_ bchn_enb ch5_ bchn_enb ch3_ bchn_enb reset 00000000 r/w rsv r/w r/w r/w r/w bit name function 7 C 4 reserved reserved this bit field should be written to 0 for normal system operation. 3 ch7_bchn_ enb buffer chaining enable for channel 7 this bit enables buffer chaining via the channel 7 next address and channel 7 next transfer count registers. see the register descriptions beginning on page 11-32 and page 11-40. when this bit is set, the ch7_cbuf_val bit in the in the gpdmabcval register becomes effective (see page 11-25). 0 = disable buffer chaining. 1 = enable buffer chaining (enhanced mode only). 2 ch6_bchn_ enb buffer chaining enable for channel 6 this bit enables buffer chaining via the channel 6 next address and channel 6 next transfer count registers. see the register descriptions beginning on page 11-30 and page 11-38. when this bit is set, the ch6_cbuf_val bit in the in the gpdmabcval register becomes effective (see page 11-25). 0 = disable buffer chaining. 1 = enable buffer chaining (enhanced mode only). 1 ch5_bchn_ enb buffer chaining enable for channel 5 this bit enables buffer chaining via the channel 5 next address and channel 5 next transfer count registers. see the register descriptions beginning on page 11-28 and page 11-36. when this bit is set, the ch5_cbuf_val bit in the in the gpdmabcval register becomes effective (see page 11-25). 0 = disable buffer chaining. 1 = enable buffer chaining (enhanced mode only). 0 ch3_bchn_ enb buffer chaining enable for channel 3 this bit enables buffer chaining via the channel 3 next address and channel 3 next transfer count registers. see the register descriptions beginning on page 11-26 and page 11-34. when this bit is set, the ch3_cbuf_val bit in the in the gpdmabcval register becomes effective (see page 11-25). 0 = disable buffer chaining. 1 = enable buffer chaining (enhanced mode only).
gp dma controller registers 11-22 lan?sc520 microcontroller register set manual buffer chaining status (gpdmabcsta) memory-mapped mmcr offset d99h register description this register provides the status of channels 3, 5, 6, and 7 when buffer chaining is enabled. bit definitions 7 6 5 4 3 2 1 0 bit reserved ch7_eob_ sta ch6_eob_ sta ch5_eob_ sta ch3_eob_ sta reset 00000000 r/w rsv r/w! r/w! r/w! r/w! bit name function 7 C 4 reserved reserved this bit field should be written to 0 for normal system operation. 3 ch7_eob_ sta end of current buffer in channel 7 this bit is set by the gp bus dma controller when the current buffer transfer is completed. 0 = the event has not occurred, or software cleared this bit by writing a 1. 1= the current buffer transfer is completed. in addition, an interrupt is generated if bit ch7_int_enb is 1 in the gpdmabsintenb register (see page 11-24). software should write a 1 to this bit (ch7_eob_sta) to acknowledge the transfer completion and clear the interrupt condition. this acknowledgment is usually done in the interrupt handling routine if the interrupt is enabled. writing 0 to this bit has no effect. if this bit is 0, writing a 1 to it has no effect. this bits value (when read) is meaningful only if buffer chaining is enabled. 2 ch6_eob_ sta end of current buffer in channel 6 this bit is set by the gp bus dma controller when the current buffer transfer is completed. 0 = the event has not occurred, or software cleared this bit by writing a 1. 1= the current buffer transfer is completed. in addition, an interrupt is generated if bit ch6_int_enb is 1 in the gpdmabsintenb register (see page 11-24). software should write a 1 to this bit (ch6_eob_sta) to acknowledge the transfer completion and clear the interrupt condition. this acknowledgment is usually done in the interrupt handling routine if the interrupt is enabled. writing 0 to this bit has no effect. if this bit is 0, writing a 1 to it has no effect. this bits value (when read) is meaningful only if buffer chaining is enabled. 1 ch5_eob_ sta end of current buffer in channel 5 this bit is set by the gp bus dma controller when the current buffer transfer is completed. 0 = the event has not occurred, or software cleared this bit by writing a 1. 1= the current buffer transfer is completed. in addition, an interrupt is generated if bit ch5_int_enb is 1 in the gpdmabsintenb register (see page 11-24). software should write a 1 to this bit (ch5_eob_sta) to acknowledge the transfer completion and clear the interrupt condition. this acknowledgment is usually done in the interrupt handling routine if the interrupt is enabled. writing 0 to this bit has no effect. if this bit is 0, writing a 1 to it has no effect. this bits value (when read) is meaningful only if buffer chaining is enabled.
gp dma controller registers lan?sc520 microcontroller register set manual 11-23 programming notes the interrupt output is shared between the four channels 3, 5, 6, and 7. if more than one interrupt is asserted and software acknowledges one of the interrupts (by setting the corresponding chx_eob_sta bit), any other pending interrupts remain asserted. software has the option of acknowledging all pending chx_eob_sta bits and handling all of the interrupts. buffer chaining is enabled separately for each channel in the gpdmabcctl register (see page 11-21). 0 ch3_eob_ sta end of current buffer in channel 3 this bit is set by the gp bus dma controller when the current buffer transfer is completed. 0 = the event has not occurred, or software cleared this bit by writing a 1. 1= the current buffer transfer is completed. in addition, an interrupt is generated if bit ch3_int_enb is 1 in the gpdmabsintenb register (see page 11-24). software should write a 1 to this bit (ch3_eob_sta) to acknowledge the transfer completion and clear the interrupt condition. this acknowledgment is usually done in the interrupt handling routine if the interrupt is enabled. writing 0 to this bit has no effect. if this bit is 0, writing a 1 to it has no effect. this bits value (when read) is meaningful only if buffer chaining is enabled. bit name function
gp dma controller registers 11-24 lan?sc520 microcontroller register set manual buffer chaining interrupt enable (gpdmabsintenb) memory-mapped mmcr offset d9ah register description this register provides the interrupt enable bits for the buffer chaining interrupts. an interrupt is generated when the gp bus dma controller completes the transfer that is in progress. software can use this interrupt to queue up a subsequent transfer. bit definitions programming notes before buffer chaining interrupts are enabled, the dmabcintmap register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. buffer chaining is enabled separately for each channel in the gpdmabcctl register (see page 11-21). 7 6 5 4 3 2 1 0 bit reserved ch7_int_ enb ch6_int_ enb ch5_int_ enb ch3_int_ enb reset 00000000 r/w rsv r/w r/w r/w r/w bit name function 7 C 4 reserved reserved this bit field should be written to 0 for normal system operation. 3 ch7_int_ enb interrupt enable for channel 7 this bit is applicable only if the buffer chaining feature is enabled for this channel. 0 = end-of-buffer interrupt for this channel is disabled. 1 = end-of-buffer interrupt for this channel is enabled. 2 ch6_int_ enb interrupt enable for channel 6 this bit is applicable only if the buffer chaining feature is enabled for this channel. 0 = end-of-buffer interrupt for this channel is disabled. 1 = end-of-buffer interrupt for this channel is enabled. 1 ch5_int_ enb interrupt enable for channel 5 this bit is applicable only if the buffer chaining feature is enabled for this channel. 0 = end-of-buffer interrupt for this channel is disabled. 1 = end-of-buffer interrupt for this channel is enabled. 0 ch3_int_ enb interrupt enable for channel 3 this bit is applicable only if the buffer chaining feature is enabled for this channel. 0 = end-of-buffer interrupt for this channel is disabled. 1 = end-of-buffer interrupt for this channel is enabled.
gp dma controller registers lan?sc520 microcontroller register set manual 11-25 buffer chaining valid (gpdmabcval) memory-mapped mmcr offset d9bh register description this register provides the operating interface with the buffer chaining feature. bit definitions programming notes a channels chx_cbuf_val bit is ignored if buffer chaining is not enabled for the channel. buffer chaining is enabled separately for each channel in the gpdmabcctl register (see page 11-21). if buffer chaining is enabled for a channel, and if the channels chx_cbuf_val bit is set when the end of the buffer is reached (i.e., when the channels transfer count register reaches 0), then the channels memory address and transfer count registers are loaded with the values in the channels next address and next count registers, respectively. then the channels chx_cbuf_val bit is cleared by the gp bus dma controller. an interrupt is also generated if the chx_int_enb bit is set in the gpdmabsintenb register (see page 11-24). if buffer chaining is enabled and software has not set the channels chx_cbuf_val bit before the end of the buffer is reached, then the gptc signal is asserted. note that software can only set the chx_cbuf_val bit to indicate to the hardware that the next address and transfer count registers contain valid information. the chx_cbuf_val bit can be cleared only by hardware. 7 6 5 4 3 2 1 0 bit reserved ch7_ cbuf_val ch6_ cbuf_val ch5_ cbuf_val ch3_ cbuf_val reset 00000000 r/w rsv r/w! r/w! r/w! r/w! bit name function 7 C 4 reserved reserved this bit field should be written to 0 for normal system operation. 3 ch7_cbuf_ val chaining buffer valid for channel 7 0 = the channels next address registers and next transfer count registers are not valid. only hardware can clear this bit. writing a 0 has no effect. 1 = software sets this bit to indicate that the values of the channels next address registers and next transfer count registers are valid. 2 ch6_cbuf_ val chaining buffer valid for channel 6 0 = the channels next address registers and next transfer count registers are not valid. only hardware can clear this bit. writing a 0 has no effect. 1 = software sets this bit to indicate that the values of the channels next address registers and next transfer count registers are valid. 1 ch5_cbuf_ val chaining buffer valid for channel 5 0 = the channels next address registers and next transfer count registers are not valid. only hardware can clear this bit. writing a 0 has no effect. 1 = software sets this bit to indicate that the values of the channels next address registers and next transfer count registers are valid. 0 ch3_cbuf_ val chaining buffer valid for channel 3 0 = the channels next address registers and next transfer count registers are not valid. only hardware can clear this bit. writing a 0 has no effect. 1 = software sets this bit to indicate that the values of the channels next address registers and next transfer count registers are valid.
gp dma controller registers 11-26 lan?sc520 microcontroller register set manual gp-dma channel 3 next address low (gpdmanxtaddl3) memory-mapped mmcr offset da0h register description this register provides address bits a15Ca0 of the next memory address for channel 3 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). bit 0 of this register (gpdmanxtaddl3) is ignored for 16-bit mode transfers, so the buffer address used is always even in 16-bit mode. software should ensure that 16-bit mode buffers always begin on an even word boundary. 15 14 13 12 11 10 9 8 bit dma3_nxt_adr[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit dma3_nxt_adr[7 C 0] reset 00000000 r/w r/w bit name function 15C0 dma3_nxt_ adr[15 C 0] dma channel 3 next address low this bit field provides address bits a15Ca0 of the next memory buffer to be used by channel 3 in the buffer chaining mode.
gp dma controller registers lan?sc520 microcontroller register set manual 11-27 gp-dma channel 3 next address high (gpdmanxtaddh3) memory-mapped mmcr offset da2h register description this register provides address bits a27Ca16 of the next memory address for channel 3 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). 15 14 13 12 11 10 9 8 bit reserved dma3_nxt_adr[27 C 24] reset 00000000 r/w rsv r/w 7 6 5 4 3 2 1 0 bit dma3_nxt_adr[23 C 16] reset 00000000 r/w r/w bit name function 15 C 12 reserved reserved this bit field should be written to 0 for normal system operation. 11C0 dma3_nxt_ adr[27 C 16] dma channel 3 next address high this bit field provides address bits a27Ca16 of the next memory buffer to be used by channel 3 in the buffer chaining mode.
gp dma controller registers 11-28 lan?sc520 microcontroller register set manual gp-dma channel 5 next address low (gpdmanxtaddl5) memory-mapped mmcr offset da4h register description this register provides address bits a15Ca0 of the next memory address for channel 5 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). bit 0 of this register (gpdmanxtaddl5) is ignored for 16-bit mode transfers, so the buffer address used is always even in 16-bit mode. software should ensure that 16-bit mode buffers always begin on an even word boundary. 15 14 13 12 11 10 9 8 bit dma5_nxt_adr[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit dma5_nxt_adr[7 C 0] reset 00000000 r/w r/w bit name function 15C0 dma5_nxt_ adr[15 C 0] dma channel 5 next address low this bit field provides address bits a15Ca0 of the next memory buffer to be used by channel 5 in the buffer chaining mode.
gp dma controller registers lan?sc520 microcontroller register set manual 11-29 gp-dma channel 5 next address high (gpdmanxtaddh5) memory-mapped mmcr offset da6h register description this register provides address bits a27Ca16 of the next memory address for channel 5 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). 15 14 13 12 11 10 9 8 bit reserved dma5_nxt_adr[27 C 24] reset 00000000 r/w rsv r/w 7 6 5 4 3 2 1 0 bit dma5_nxt_adr[23 C 16] reset 00000000 r/w r/w bit name function 15 C 12 reserved reserved this bit field should be written to 0 for normal system operation. 11C0 dma5_nxt_ adr[27 C 16] dma channel 5 next address high this bit field provides address bits a27Ca16 of the next memory buffer to be used by channel 5 in the buffer chaining mode.
gp dma controller registers 11-30 lan?sc520 microcontroller register set manual gp-dma channel 6 next address low (gpdmanxtaddl6) memory-mapped mmcr offset da8h register description this register provides address bits a15Ca0 of the next memory address for channel 6 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). bit 0 of this register (gpdmanxtaddl6) is ignored for 16-bit mode transfers, so the buffer address used is always even in 16-bit mode. software should ensure that 16-bit mode buffers always begin on an even word boundary. 15 14 13 12 11 10 9 8 bit dma6_nxt_adr[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit dma6_nxt_adr[7 C 0] reset 00000000 r/w r/w bit name function 15C0 dma6_nxt_ adr[15 C 0] dma channel 6 next address low this bit field provides address bits a15Ca0 of the next memory buffer to be used by channel 6 in the buffer chaining mode.
gp dma controller registers lan?sc520 microcontroller register set manual 11-31 gp-dma channel 6 next address high (gpdmanxtaddh6) memory-mapped mmcr offset daah register description this register provides address bits a27Ca16 of the next memory address for channel 6 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). 15 14 13 12 11 10 9 8 bit reserved dma6_nxt_adr[27 C 24] reset 00000000 r/w rsv r/w 7 6 5 4 3 2 1 0 bit dma6_nxt_adr[23 C 16] reset 00000000 r/w r/w bit name function 15 C 12 reserved reserved this bit field should be written to 0 for normal system operation. 11C0 dma6_nxt_ adr[27 C 16] dma channel 6 next address high this bit field provides address bits a27Ca16 of the next memory buffer to be used by channel 6 in the buffer chaining mode.
gp dma controller registers 11-32 lan?sc520 microcontroller register set manual gp-dma channel 7 next address low (gpdmanxtaddl7) memory-mapped mmcr offset dach register description this register provides address bits a15Ca0 of the next memory address for channel 7 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). bit 0 of this register (gpdmanxtaddl7) is ignored for 16-bit mode transfers, so the buffer address used is always even in 16-bit mode. software should ensure that 16-bit mode buffers always begin on an even word boundary. 15 14 13 12 11 10 9 8 bit dma7_nxt_adr[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit dma7_nxt_adr[7 C 0] reset 00000000 r/w r/w bit name function 15C0 dma7_nxt_ adr[15 C 0] dma channel 7 next address low this bit field provides address bits a15Ca0 of the next memory buffer to be used by channel 7 in the buffer chaining mode.
gp dma controller registers lan?sc520 microcontroller register set manual 11-33 gp-dma channel 7 next address high (gpdmanxtaddh7) memory-mapped mmcr offset daeh register description this register provides address bits a27Ca16 of the next memory address for channel 7 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). 15 14 13 12 11 10 9 8 bit reserved dma7_nxt_adr[27 C 24] reset 00000000 r/w rsv r/w 7 6 5 4 3 2 1 0 bit dma7_nxt_adr[23 C 16] reset 00000000 r/w r/w bit name function 15 C 12 reserved reserved this bit field should be written to 0 for normal system operation. 11C0 dma7_nxt_ adr[27 C 16] dma channel 7 next address high this bit field provides address bits a27Ca16 of the next memory buffer to be used by channel 7 in the buffer chaining mode.
gp dma controller registers 11-34 lan?sc520 microcontroller register set manual gp-dma channel 3 next transfer count low (gpdmanxttcl3) memory-mapped mmcr offset db0h register description this register provides bits 15C0 of the next transfer count for channel 3 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 15 14 13 12 11 10 9 8 bit dma3_nxt_tc[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit dma3_nxt_tc[7 C 0] reset 00000000 r/w r/w bit name function 15C0 dma3_nxt_ tc[15 C 0] dma channel 3 next transfer count low this bit field provides bits 15C0 of the next transfer count to be used by channel 3 in the buffer chaining mode.
gp dma controller registers lan?sc520 microcontroller register set manual 11-35 gp-dma channel 3 next transfer count high (gpdmanxttch3) memory-mapped mmcr offset db2h register description this register provides bits 23C16 of the next transfer count for channel 3 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma3_nxt_tc[23 C 16] reset 00000000 r/w r/w bit name function 7C0 dma3_nxt_ tc[23 C 16] dma channel 3 next transfer count high this bit field provides bits 23C16 of the next transfer count to be used by channel 3 in the buffer chaining mode.
gp dma controller registers 11-36 lan?sc520 microcontroller register set manual gp-dma channel 5 next transfer count low (gpdmanxttcl5) memory-mapped mmcr offset db4h register description this register provides bits 15C0 of the next transfer count for channel 5 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 15 14 13 12 11 10 9 8 bit dma5_nxt_tc[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit dma5_nxt_tc[7 C 0] reset 00000000 r/w r/w bit name function 15C0 dma5_nxt_ tc[15 C 0] dma channel 5 next transfer count low this bit field provides bits 15C0 of the next transfer count to be used by channel 5 in the buffer chaining mode.
gp dma controller registers lan?sc520 microcontroller register set manual 11-37 gp-dma channel 5 next transfer count high (gpdmanxttch5) memory-mapped mmcr offset db6h register description this register provides bits 23C16 of the next transfer count for channel 5 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma5_nxt_tc[23 C 16] reset 00000000 r/w r/w bit name function 7C0 dma5_nxt_ tc[23 C 16] dma channel 5 next transfer count high this bit field provides bits 23C16 of the next transfer count to be used by channel 5 in the buffer chaining mode.
gp dma controller registers 11-38 lan?sc520 microcontroller register set manual gp-dma channel 6 next transfer count low (gpdmanxttcl6) memory-mapped mmcr offset db8h register description this register provides bits 15C0 of the next transfer count for channel 6 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 15 14 13 12 11 10 9 8 bit dma6_nxt_tc[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit dma6_nxt_tc[7 C 0] reset 00000000 r/w r/w bit name function 15C0 dma6_nxt_ tc[15 C 0] dma channel 6 next transfer count low this bit field provides bits 15C0 of the next transfer count to be used by channel 6 in the buffer chaining mode.
gp dma controller registers lan?sc520 microcontroller register set manual 11-39 gp-dma channel 6 next transfer count high (gpdmanxttch6) memory-mapped mmcr offset dbah register description this register provides bits 23C16 of the next transfer count for channel 6 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma6_nxt_tc[23 C 16] reset 00000000 r/w r/w bit name function 7C0 dma6_nxt_ tc[23 C 16] dma channel 6 next transfer count high this bit field provides bits 23C16 of the next transfer count to be used by channel 6 in the buffer chaining mode.
gp dma controller registers 11-40 lan?sc520 microcontroller register set manual gp-dma channel 7 next transfer count low (gpdmanxttcl7) memory-mapped mmcr offset dbch register description this register provides bits 15C0 of the next transfer count for channel 7 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 15 14 13 12 11 10 9 8 bit dma7_nxt_tc[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit dma7_nxt_tc[7 C 0] reset 00000000 r/w r/w bit name function 15C0 dma7_nxt_ tc[15 C 0] dma channel 7 next transfer count low this bit field provides bits 15C0 of the next transfer count to be used by channel 7 in the buffer chaining mode.
gp dma controller registers lan?sc520 microcontroller register set manual 11-41 gp-dma channel 7 next transfer count high (gpdmanxttch7) memory-mapped mmcr offset dbeh register description this register provides bits 23C16 of the next transfer count for channel 7 in buffer chaining mode. bit definitions programming notes the value of this register is ignored if buffer chaining mode is not enabled for this channel in the gpdmabcctl register (see page 11-21). in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma7_nxt_tc[23 C 16] reset 00000000 r/w r/w bit name function 7C0 dma7_nxt_ tc[23C16] dma channel 7 next transfer count high this bit field provides bits 23C16 of the next transfer count to be used by channel 7 in the buffer chaining mode.
gp dma controller registers 11-42 lan?sc520 microcontroller register set manual slave dma channel 0 memory address (gpdma0mar) direct-mapped i/o address 0000h register description this register contains bits 15 C0 of the memory address for channel 0 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma0mar) is always accessed first, software should precede any access to this register with a write to the sldmacbp register (see page 11-57) to clear the slave dma byte pointer. the value in this register (gpdma0mar) is used with the values in the gpdma0pg register (see page 11-69) and the gpdmaextpg0 register (see page 11-10) to generate dma address bits 27C0. 7 6 5 4 3 2 1 0 bit dma0mar[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma0mar [15C0] lower 16 bits of dma channel 0 memory address this 8-bit field is used in two successive i/o accesses to read or write the channels memory address bits 15C0. bits 7C0 of the channels memory address can be read from or written to this bit field immediately after a write to the sldmacbp register (see page 11-57). bits 15C8 of the channels memory address can be read from or written to this bit field immediately after memory address bits 7C0 are read from or written to this bit field.
gp dma controller registers lan?sc520 microcontroller register set manual 11-43 slave dma channel 0 transfer count (gpdma0tc) direct-mapped i/o address 0001h register description this register contains bits 15 C0 of the transfer count for channel 0 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma0tc) is always accessed first, software should precede any access to this register with a write to the sldmacbp register (see page 11-57) to clear the slave dma byte pointer. in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma0tc[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma0tc [15C0] dma channel 0 transfer count (16-bit register) this 8-bit field is used in two successive i/o accesses to read or write the channels transfer count bits 15C0. bits 7C0 of the channels transfer count can be read from or written to this bit field immediately after a write to the sldmacbp register (see page 11-57). bits 15C8 of the channels transfer count can be read from or written to this bit field immediately after transfer count bits 7C0 are read from or written to this bit field. the actual number of transfers is one more than the programmed transfer count value.
gp dma controller registers 11-44 lan?sc520 microcontroller register set manual slave dma channel 1 memory address (gpdma1mar) direct-mapped i/o address 0002h register description this register contains bits 15 C0 of the memory address for channel 1 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma1mar) is always accessed first, software should precede any access to this register with a write to the sldmacbp register (see page 11-57) to clear the slave dma byte pointer. the value in this register (gpdma1mar) is used with the values in the gpdma1pg register (see page 11-65) and the gpdmaextpg1 register (see page 11-11) to generate dma address bits 27C0. 7 6 5 4 3 2 1 0 bit dma1mar[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma1mar [15C0] lower 16 bits of dma channel 1 memory address this 8-bit field is used in two successive i/o accesses to read or write the channels memory address bits 15C0. bits 7C0 of the channels memory address can be read from or written to this bit field immediately after a write to the sldmacbp register (see page 11-57). bits 15C8 of the channels memory address can be read from or written to this bit field immediately after memory address bits 7C0 are read from or written to this bit field.
gp dma controller registers lan?sc520 microcontroller register set manual 11-45 slave dma channel 1 transfer count (gpdma1tc) direct-mapped i/o address 0003h register description this register contains bits 15 C0 of the transfer count for channel 1 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma1tc) is always accessed first, software should precede any access to this register with a write to the sldmacbp register (see page 11-57) to clear the slave dma byte pointer. in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma1tc[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma1tc [15C0] dma channel 1 transfer count (16-bit register) this 8-bit field is used in two successive i/o accesses to read or write the channels transfer count bits 15C0. bits 7C0 of the channels transfer count can be read from or written to this bit field immediately after a write to the sldmacbp register (see page 11-57). bits 15C8 of the channels transfer count can be read from or written to this bit field immediately after transfer count bits 7C0 are read from or written to this bit field. the actual number of transfers is one more than the programmed transfer count value.
gp dma controller registers 11-46 lan?sc520 microcontroller register set manual slave dma channel 2 memory address (gpdma2mar) direct-mapped i/o address 0004h register description this register contains bits 15 C0 of the memory address for channel 2 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma2mar) is always accessed first, software should precede any access to this register with a write to the sldmacbp register (see page 11-57) to clear the slave dma byte pointer. the value in this register (gpdma2mar) is used with the values in the gpdma2pg register (see page 11-63) and the gpdmaextpg2 register (see page 11-12) to generate dma address bits 27C0. 7 6 5 4 3 2 1 0 bit dma2mar[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma2mar [15C0] lower 16 bits of dma channel 2 memory address this 8-bit field is used in two successive i/o accesses to read or write the channels memory address bits 15C0. bits 7C0 of the channels memory address can be read from or written to this bit field immediately after a write to the sldmacbp register (see page 11-57). bits 15C8 of the channels memory address can be read from or written to this bit field immediately after memory address bits 7C0 are read from or written to this bit field.
gp dma controller registers lan?sc520 microcontroller register set manual 11-47 slave dma channel 2 transfer count (gpdma2tc) direct-mapped i/o address 0005h register description this register contains bits 15 C0 of the transfer count for channel 2 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma2tc) is always accessed first, software should precede any access to this register with a write to the sldmacbp register (see page 11-57) to clear the slave dma byte pointer. in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma2tc[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma2tc [15C0] dma channel 2 transfer count (16-bit register) this 8-bit field is used in two successive i/o accesses to read or write the channels transfer count bits 15C0. bits 7C0 of the channels transfer count can be read from or written to this bit field immediately after a write to the sldmacbp register (see page 11-57). bits 15C8 of the channels transfer count can be read from or written to this bit field immediately after transfer count bits 7C0 are read from or written to this bit field. the actual number of transfers is one more than the programmed transfer count value.
gp dma controller registers 11-48 lan?sc520 microcontroller register set manual slave dma channel 3 memory address (gpdma3mar) direct-mapped i/o address 0006h register description this register contains bits 15 C0 of the memory address for channel 3 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma3mar) is always accessed first, software should precede any access to this register with a write to the sldmacbp register (see page 11-57) to clear the slave dma byte pointer. the value in this register (gpdma3mar) is used with the values in the gpdma3pg register (see page 11-64) and the gpdmaextpg3 register (see page 11-13) to generate dma address bits 27C0. in enhanced mode, this channel can be programmed for 16-bit dma transfers (see the descriptions for gpdmactl register bits ch3_alt_size and enh_mode_enb, on page 11-4). for 16-bit transfers, this register (gpdma3mar) holds address bits 16C1 and address bit 0 is always 0 (i.e., the 16-bit transfers are word-aligned). because of this, software must load this register with the desired memory address divided by 2 for 16-bit transfers. 7 6 5 4 3 2 1 0 bit dma3mar[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma3mar [15C0] lower 16 bits of dma channel 3 memory address this 8-bit field is used in two successive i/o accesses to read or write the channels memory address bits 15C0. bits 7C0 of the channels memory address can be read from or written to this bit field immediately after a write to the sldmacbp register (see page 11-57). bits 15C8 of the channels memory address can be read from or written to this bit field immediately after memory address bits 7C0 are read from or written to this bit field.
gp dma controller registers lan?sc520 microcontroller register set manual 11-49 slave dma channel 3 transfer count (gpdma3tc) direct-mapped i/o address 0007h register description this register contains bits 15 C0 of the transfer count for channel 3 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma3tc) is always accessed first, software should precede any access to this register with a write to the sldmacbp register (see page 11-57) to clear the slave dma byte pointer. the value in this register (gpdma3tc) can be used with the value in the gpdmaexttc3 register (see page 11-17) to allow counts of up to 16 m (16,777,216) transfers. in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma3tc[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma3tc [15C0] dma channel 3 transfer count (16-bit register) this 8-bit field is used in two successive i/o accesses to read or write the channels transfer count bits 15C0. bits 7C0 of the channels transfer count can be read from or written to this bit field immediately after a write to the sldmacbp register (see page 11-57). bits 15C8 of the channels transfer count can be read from or written to this bit field immediately after transfer count bits 7C0 are read from or written to this bit field. the actual number of transfers is one more than the programmed transfer count value.
gp dma controller registers 11-50 lan?sc520 microcontroller register set manual slave dma channel 0C3 status (sldmasta) direct-mapped i/o address 0008h register description this register indicates the request status and terminal count status for channels 0C3. bit definitions programming notes bits 3C0 of this register are reset when read. any read from this register (sldmasta) clears bits 3C0. 7 6 5 4 3 2 1 0 bit dmar3 dmar2 dmar1 dmar0 tc3 tc2 tc1 tc0 reset ????0000 r/w rrrrr!r!r!r! bit name function 7dmar3 channel 3 dma request 0 = channel 3 dma request not pending 1 = channel 3 dma request pending 6dmar2 channel 2 dma request 0 = channel 2 dma request not pending 1 = channel 2 dma request pending 5dmar1 channel 1 dma request 0 = channel 1 dma request not pending 1 = channel 1 dma request pending 4dmar0 channel 0 dma request 0 = channel 0 dma request not pending 1 = channel 0 dma request pending 3tc3 channel 3 terminal count 0 = channel 3 terminal count not detected 1 = channel 3 terminal count detected 2tc2 channel 2 terminal count 0 = channel 2 terminal count not detected 1 = channel 2 terminal count detected 1tc1 channel 1 terminal count 0 = channel 1 terminal count not detected 1 = channel 1 terminal count detected 0tc0 channel 0 terminal count 0 = channel 0 terminal count not detected 1 = channel 0 terminal count detected
gp dma controller registers lan?sc520 microcontroller register set manual 11-51 slave dma channel 0C3 control (sldmactl) direct-mapped i/o address 0008h register description this register provides the control function for channels 0C3. bit definitions 7 6 5 4 3 2 1 0 bit daksen drqsen wrtsel pritype comptim dma_dis reserved reset 00000000 r/w wwwwww rsv bit name function 7 daksen internal dackx sense in a discrete dma controller, this bit controls the polarity of all dackx outputs from the slave dma controller: 0 = asserted low 1 = asserted high system logic external to the dma controller expects the dma controller to drive active low dackx outputs. this bit must be written to 0 for proper system operation. 6 drqsen internal drqx sense in a discrete dma controller, this bit controls the polarity of all drqx inputs to the slave dma controller: 0 = asserted high 1 = asserted low system logic external to the dma controller expects the dma controller to respond to active high drqx inputs. this bit must be written to 0 for proper system operation. 5 wrtsel write selection control 0 = late write selection. 1 = extended (early) write selection. write command signals (gpiowr and gpmemwr ) are asserted one clock early. enabling this feature results in timing changes on the gp bus that can violate the isa specification. this bit has no effect when the comptim bit is 1. 4 pritype priority type 0 = fixed priority 1 = rotating priority 3 comptim compressed timing 0 = normal timing. 1 = compressed timing. read command signals (gpiord and gpmemrd ) have a one clock pulse width. enabling this feature results in timing changes on the gp bus that can violate the isa specification. 2dma_dis disable dma controller 0 = dma requests are enabled. 1 = dma requests are ignored but dma registers are available to the cpu. the dma controller should be disabled prior to programming it in order to prevent unintended transfers from occurring during the dma controller programming operation. care should also be taken to ensure that the dma controller is idle before disabling it. if the dma controller is performing a transfer when software disables it, abnormal system operation can occur.
gp dma controller registers 11-52 lan?sc520 microcontroller register set manual programming notes if dma channel 0, 1, 2, or 3 is used by an internal uart, the daksen, drqsen, wrtsel, and comptim bit fields must be 0 (the default). 1C0 reserved reserved this bit field should be written to 0 for normal system operation. bit name function
gp dma controller registers lan?sc520 microcontroller register set manual 11-53 slave software drq(n) request (sldmaswreq) direct-mapped i/o address 0009h register description this register is used to initiate a software dma request for one of channels 0 C3. bit definitions programming notes 7 6 5 4 3 2 1 0 bit reserved reqdma reqsel [1C0] reset 00000xxx r/w rsv w w bit name function 7C3 reserved reserved this bit field should be written to 0 for normal system operation. 2 reqdma software dma request 0 = clear the request bit for the channel selected by the reqsel bit field. 1 = set the request bit for the channel selected by the reqsel bit field. the request bit is cleared internally after the corresponding channel has reached the end of its transfer count. 1C0 reqsel[1C0] dma channel select this bit field selects the dma channel that is to latch the reqdma bit internally to assert or deassert a dma request via software: 00 = select channel 0 for internal dma request per the reqdma bit. 01 = select channel 1 for internal dma request per the reqdma bit. 10 = select channel 2 for internal dma request per the reqdma bit. 11 = select channel 3 for internal dma request per the reqdma bit.
gp dma controller registers 11-54 lan?sc520 microcontroller register set manual slave dma channel 0C3 mask (sldmamsk) direct-mapped i/o address 000ah register description this register provides a mask or unmask capability for the dma request signal to each of channels 0C3. bit definitions programming notes the same dma channel masks can be controlled via dma registers sldmamsk, sldmamskrst (see page 11-60), and sldmagenmsk (see page 11-61). before masking an active dma channel, software must ensure that the dma request is deasserted. masking an active channel while it is being granted might cause the system to hang. 7 6 5 4 3 2 1 0 bit reserved chmask msksel [1C0] reset 00000xxx r/w rsv w w bit name function 7C3 reserved reserved this bit field should be written to 0 for normal system operation. 2 chmask dma channel mask 0 = clear the mask bit for the channel selected by the msksel bit field. 1 = set the mask bit for the channel selected by the msksel bit field. if the ainit bit is 0 in the sldmamode register (see page 11-55), the mask bit is set internally when the corresponding channel reaches the end of its transfer count. if the ainit bit is 1, the mask bit remains clear when the transfer ends. 1C0 msksel[1C0] dma channel mask select this bit field selects the dma channel that is to latch the chmask bit internally to mask or unmask the dma request signal into the specified dma channel: 00 = mask or unmask dma channel 0 per the chmask bit. 01 = mask or unmask dma channel 1 per the chmask bit. 10 = mask or unmask dma channel 2 per the chmask bit. 11 = mask or unmask dma channel 3 per the chmask bit.
gp dma controller registers lan?sc520 microcontroller register set manual 11-55 slave dma channel 0C3 mode (sldmamode) direct-mapped i/o address 000bh register description this register indicates the transfer mode for channels 0C3. bit definitions 7 6 5 4 3 2 1 0 bit trnmod [1C0] adddec ainit opsel[1C0] modsel[1C0] reset xxxxxxxx r/w wwww w bit name function 7C6 trnmod[1C0] transfer mode this bit field selects the transfer mode for the channel selected by the modsel bit field. 00 = demand transfer mode 01 = single transfer mode 10 = block transfer mode 11 = cascade mode. (only channel 4 should be programmed for cascade mode. all other channels should be programmed for one of the other modes). 5 adddec address decrement this bit field selects increment or decrement counting for the channel selected by the modsel bit field. 0 = increment the dma memory address after each transfer. 1 = decrement the dma memory address after each transfer. 4ainit automatic initialization control this bit field enables automatic initialization for the channel selected by the modsel bit field. 0 = automatic initialization is disabled. 1 = automatic initialization is enabled. automatic initialization causes the channels base address and transfer count registers to be restored to the values they contained prior to the dma transfer when the transfer count ends. the channel is then ready to perform another dma transfer without processor intervention as soon as the next dma request is detected. automatic initialization must be disabled when buffer chaining mode is used; otherwise unexpected results may occur. 3C2 opsel[1C0] operation select this bit field selects the dma operation for the channel selected by the modsel bit field. 00 = verify mode. the dma controller acts normally except that no i/o or memory commands are generated, and no data is transferred. 01 = write transfer. data is transferred from a dma-capable i/o or memory-mapped device into system memory. 10 = read transfer. data is transferred from system memory to a dma-capable i/o or memory-mapped device. 11 = reserved.
gp dma controller registers 11-56 lan?sc520 microcontroller register set manual programming notes 1C0 modsel[1C0] dma channel select this bit field selects the channel that is to internally latch the other bits written to this register: 00 = select channel 0 01 = select channel 1 10 = select channel 2 11 = select channel 3 bit name function
gp dma controller registers lan?sc520 microcontroller register set manual 11-57 slave dma clear byte pointer (sldmacbp) direct-mapped i/o address 000ch register description this register channel provides a mechanism to adjust the byte pointer to the low byte of the memory address and transfer count registers for channels 0C3. bit definitions programming notes 7 6 5 4 3 2 1 0 bit slave_cbp [7C0] reset xxxxxxxx r/w w! bit name function 7C0 slave_cbp [7C0] slave dma clear byte pointer the dma controllers 16-bit memory address and terminal count registers are accessed by writing or reading consecutive 8-bit values to the same direct-mapped i/o address. a single byte pointer is used across the slave dma controller to determine which byte is accessed if any of these 16-bit registers is read or written. any access to one of these registers toggles the byte pointer between the low and high bytes. a write of any data to this bit field (slave_cbp) clears the byte pointer so that the next memory address or transfer count register access is to the low byte.
gp dma controller registers 11-58 lan?sc520 microcontroller register set manual slave dma controller reset (sldmarst) direct-mapped i/o address 000dh register description this register provides a reset mechanism for channels 0 C3. bit definitions programming notes 7 6 5 4 3 2 1 0 bit slave_rst [7C0] reset 00000000 r/w w! bit name function 7C0 slave_rst [7C0] slave dma controller reset a write of any data to this address resets the dma controller to the same state as a system reset.
gp dma controller registers lan?sc520 microcontroller register set manual 11-59 slave dma controller temporary (sldmatmp) direct-mapped i/o address 000dh register description this register has no real use in the lansc520 microcontroller. it is included for compatibility only. bit definitions programming notes 7 6 5 4 3 2 1 0 bit slave_tmp [7C0] reset 00000000 r/w r bit name function 7C0 slave_tmp [7C0] slave dma controller temporary register in a discrete dma controller, this bit field is used as a temporary storage buffer when doing memory-to-memory dma. memory-to-memory dma transfers are not supported in the lansc520 microcontroller, so this register is included for compatibility reasons only.
gp dma controller registers 11-60 lan?sc520 microcontroller register set manual slave dma mask reset (sldmamskrst) direct-mapped i/o address 000eh register description this register provides a mechanism to reset the sldmagenmsk register (see page 11-61). bit definitions programming notes the same dma channel masks can be controlled via dma registers sldmamsk (see page 11-54), sldmamskrst, and sldmagenmsk (see page 11-61). before masking an active dma channel, software must ensure that the dma request is deasserted. masking an active channel while it is being granted might cause the system to hang. 7 6 5 4 3 2 1 0 bit slave_msk_rst [7C0] reset xxxxxxxx r/w w! bit name function 7C0 slave_msk_ rst[7C0] slave dma reset mask writing any data to this i/o address resets the sldmagenmsk register (see page 11-61), thereby activating the four slave dma channels.
gp dma controller registers lan?sc520 microcontroller register set manual 11-61 slave dma general mask (sldmagenmsk) direct-mapped i/o address 000fh register description this register provides a mechanism to mask or unmask the dma request signal to each of channels 0C3. bit definitions programming notes the same dma channel masks can be controlled via dma registers sldmamsk (see page 11-54), sldmamskrst (see page 11-60), and sldmagenmsk. before masking an active dma channel, software must ensure that the dma request is deasserted. masking an active channel while it is being granted might cause the system to hang. 7 6 5 4 3 2 1 0 bit reserved ch3_dis ch2_dis ch1_dis ch0_dis reset 00001111 r/w rsv wwww bit name function 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3 ch3_dis dma channel 3 mask 0 = enable dma channel 3 for servicing dma requests. 1 = disable dma channel 3 from servicing dma requests. 2 ch2_dis dma channel 2 mask 0 = enable dma channel 2 for servicing dma requests. 1 = disable dma channel 2 from servicing dma requests. 1 ch1_dis dma channel 1 mask 0 = enable dma channel 1 for servicing dma requests. 1 = disable dma channel 1 from servicing dma requests. 0 ch0_dis dma channel 0 mask 0 = enable dma channel 0 for servicing dma requests. 1 = disable dma channel 0 from servicing dma requests.
gp dma controller registers 11-62 lan?sc520 microcontroller register set manual general 0 (gpdmagr0) direct-mapped i/o address 0080h register description this is a general-purpose register. bit definitions programming notes in a discrete dma controller, this register would be the dma channel 4 page register, but in pc/at-compatible systems dma channel 4 is used for the cascade function, so this register is not used by the dma subsystem. in a pc/at-compatible system, this i/o address (port 0080h) is typically used to send bios power - on self test (post) codes to the isa bus where special hardware can be used to decode the address and display the post codes. in the lansc520 microcontroller, writes to this register are propagated to the gp bus to allow pc/at- compatible operation. reads from this register return the internally-stored value only. 7 6 5 4 3 2 1 0 bit port80 [7C0] reset 0 0000000 r/w r/w bit name function 7C0 port80[7C0] general-purpose r/w register writes to this bit field are stored internally and propagated to the gp bus. reads from this bit field return the internal register value, but are not propagated to the gp bus.
gp dma controller registers lan?sc520 microcontroller register set manual 11-63 slave dma channel 2 page (gpdma2pg) direct-mapped i/o address 0081h register description this register provides bits 23 C16 of the memory address for channel 2. bit definitions programming notes 7 6 5 4 3 2 1 0 bit dma2mar[23C16] reset 0 0000000 r/w r/w bit name function 7C0 dma2mar [23C16] dma channel 2 memory address bits [23C16] this bit field is used with the values in the gpdma2mar register (see page 11-46) and the gpdmaextpg2 register (see page 11-12) to generate dma address bits 27 C0.
gp dma controller registers 11-64 lan?sc520 microcontroller register set manual slave dma channel 3 page (gpdma3pg) direct-mapped i/o address 0082h register description this register provides bits 23 C16 of the memory address for channel 3. bit definitions programming notes in enhanced mode, this channel can be programmed for 16-bit dma transfers (see the descriptions for gpdmactl register bits ch3_alt_size and enh_mode_enb, on page 11-4). in the enhanced mode, this register is updated during dma cycles if the dma addresses cross the 64-kbyte boundary for 8-bit transfers, or cross the 128-kbyte boundary for 16-bit transfers. 7 6 5 4 3 2 1 0 bit dma3mar[23C16] reset 0 0000000 r/w r/w! bit name function 7C0 dma3mar [23C16] dma channel 3 memory address bits [23C16] for 8-bit transfers, the value in this bit field is used with the values in the gpdma3mar register (see page 11-48) and the gpdmaextpg3 register (see page 11-13) to generate dma address bits 27C0. for 16-bit transfers (enhanced mode only), bits 7C1 of this bit field hold address bits 23C17, and address bit 16 is located in the gpdma3mar register (see page 11-48). bit 0 of this bit field is not used in 16-bit dma operation. the bit 0 value read back is always the last value written, but the bit is not applied to the system address unless 8-bit operation is selected.
gp dma controller registers lan?sc520 microcontroller register set manual 11-65 slave dma channel 1 page (gpdma1pg) direct-mapped i/o address 0083h register description this register provides bits 23 C16 of the memory address for channel 1. bit definitions programming notes 7 6 5 4 3 2 1 0 bit dma1mar[23C16] reset 0 0000000 r/w r/w bit name function 7C0 dma1mar [23C16] dma channel 1 memory address bits [23C16] this bit field is used with the values in the gpdma1mar register (see page 11-44) and the gpdmaextpg1 register (see page 11-11) to generate dma address bits 27 C0.
gp dma controller registers 11-66 lan?sc520 microcontroller register set manual general 1 (gpdmagr1) direct-mapped i/o address 0084h register description this is a general-purpose register. bit definitions programming notes 7 6 5 4 3 2 1 0 bit port84 [7C0] reset 0 0000000 r/w r/w bit name function 7C0 port84[7C0] general-purpose r/w register writes to this bit field are stored internally and propagated to the gp bus. reads from this bit field return the internal register value, but are not propagated to the gp bus.
gp dma controller registers lan?sc520 microcontroller register set manual 11-67 general 2 (gpdmagr2) direct-mapped i/o address 0085h register description this is a general-purpose register. bit definitions programming notes 7 6 5 4 3 2 1 0 bit port85 [7C0] reset 0 0000000 r/w r/w bit name function 7C0 port85[7C0] general-purpose r/w register writes to this bit field are stored internally and propagated to the gp bus. reads from this bit field return the internal register value, but are not propagated to the gp bus.
gp dma controller registers 11-68 lan?sc520 microcontroller register set manual general 3 (gpdmagr3) direct-mapped i/o address 0086h register description this is a general-purpose register. bit definitions programming notes 7 6 5 4 3 2 1 0 bit port86 [7C0] reset 0 0000000 r/w r/w bit name function 7C0 port86[7C0] general-purpose r/w register writes to this bit field are stored internally and propagated to the gp bus. reads from this bit field return the internal register value, but are not propagated to the gp bus.
gp dma controller registers lan?sc520 microcontroller register set manual 11-69 slave dma channel 0 page (gpdma0pg) direct-mapped i/o address 0087h register description this register provides bits 23 C16 of the memory address for channel 0. bit definitions programming notes 7 6 5 4 3 2 1 0 bit dma0mar[23C16] reset 0 0000000 r/w r/w bit name function 7C0 dma0mar [23C16] dma channel 0 memory address bits [23C16] this bit field is used with the values in the gpdma0mar register (see page 11-42) and the gpdmaextpg0 register (see page 11-10) to generate dma address bits 27 C0.
gp dma controller registers 11-70 lan?sc520 microcontroller register set manual general 4 (gpdmagr4) direct-mapped i/o address 0088h register description this is a general-purpose register. bit definitions programming notes 7 6 5 4 3 2 1 0 bit port88 [7C0] reset 0 0000000 r/w r/w bit name function 7C0 port88[7C0] general-purpose r/w register writes to this bit field are stored internally and propagated to the gp bus. reads from this bit field return the internal register value, but are not propagated to the gp bus.
gp dma controller registers lan?sc520 microcontroller register set manual 11-71 master dma channel 6 page (gpdma6pg) direct-mapped i/o address 0089h register description this register provides bits 23 C16 of the memory address for channel 6. bit definitions programming notes in enhanced mode, this channel can be programmed for 8-bit dma transfers (see the descriptions for gpdmactl register bits ch6_alt_size and enh_mode_enb, on page 11-4). in enhanced mode, this register is updated during dma cycles if the dma addresses cross the 64-kbyte boundary for 8-bit transfers, or cross the 128-kbyte boundary for 16-bit transfers. 7 6 5 4 3 2 1 0 bit dma6mar[23C16] reset 00000000 r/w r/w! bit name function 7C1 dma6mar [23C16] dma channel 6 memory address bits [23C16] for 8-bit transfers (enhanced mode only), the value in this bit field is used with the values in the gpdma6mar register (see page 11-82) and the gpdmaextpg6 register (see page 11-15) to generate dma address bits 27C0. for 16-bit transfers, bits 7C1 of this bit field hold address bits 23C17, and address bit 16 is located in the gpdma6mar register (see page 11-82). bit 0 of this bit field is not used in 16-bit dma operation. the bit 0 value read back is always the last value written, but the bit is not applied to the system address unless 8-bit operation is selected.
gp dma controller registers 11-72 lan?sc520 microcontroller register set manual master dma channel 7 page (gpdma7pg) direct-mapped i/o address 008ah register description this register provides bits 23 C16 of the memory address for channel 7. bit definitions programming notes in enhanced mode, this channel can be programmed for 8-bit dma transfers (see the descriptions for gpdmactl register bits ch7_alt_size and enh_mode_enb, on page 11-4). in enhanced mode, this register is updated during dma cycles if the dma addresses cross the 64-kbyte boundary for 8-bit transfers, or cross the 128-kbyte boundary for 16-bit transfers. 7 6 5 4 3 2 1 0 bit dma7mar[23C16] reset 00000000 r/w r/w! bit name function 7C1 dma7mar [23C16] dma channel 7 memory address bits [23C17] for 8-bit transfers (enhanced mode only), the value in this bit field is used with the values in the gpdma7mar register (see page 11-84) and the gpdmaextpg7 register (see page 11-16) to generate dma address bits 27C0. for 16-bit transfers, bits 7C1 of this bit field hold address bits 23C17, and address bit 16 is located in the gpdma7mar register (see page 11-84). bit 0 of this bit field is not used in 16-bit dma operation. the bit 0 value read back is always the last value written, but the bit is not applied to the system address unless 8-bit operation is selected.
gp dma controller registers lan?sc520 microcontroller register set manual 11-73 master dma channel 5 page (gpdma5pg) direct-mapped i/o address 008bh register description this register provides bits 23 C16 of the memory address for channel 5. bit definitions programming notes in enhanced mode, this channel can be programmed for 8-bit dma transfers (see the descriptions for gpdmactl register bits ch5_alt_size and enh_mode_enb, on page 11-4). in enhanced mode, this register is updated during dma cycles if the dma addresses cross the 64-kbyte boundary for 8-bit transfers, or cross the 128-kbyte boundary for 16-bit transfers. 7 6 5 4 3 2 1 0 bit dma5mar[23C16] reset 00000000 r/w r/w! bit name function 7C1 dma5mar [23C16] dma channel 5 memory address bits [23C16] for 8-bit transfers (enhanced mode only), the value in this bit field is used with the values in the gpdma5mar register (see page 11-80) and the gpdmaextpg5 register (see page 11-14) to generate dma address bits 27C0. for 16-bit transfers, bits 7C1 of this bit field hold address bits 23C17, and address bit 16 is located in the gpdma5mar register (see page 11-80). bit 0 of this bit field is not used in 16-bit dma operation. the bit 0 value read back is always the last value written, but the bit is not applied to the system address unless 8-bit operation is selected.
gp dma controller registers 11-74 lan?sc520 microcontroller register set manual general 5 (gpdmagr5) direct-mapped i/o address 008ch register description this is a general-purpose register. bit definitions programming notes 7 6 5 4 3 2 1 0 bit port8c [7C0] reset 0 0000000 r/w r/w bit name function 7C0 port8c[7C0] general-purpose r/w register writes to this bit field are stored internally and propagated to the gp bus. reads from this bit field return the internal register value, but are not propagated to the gp bus.
gp dma controller registers lan?sc520 microcontroller register set manual 11-75 general 6 (gpdmagr6) direct-mapped i/o address 008dh register description this is a general-purpose register. bit definitions programming notes 7 6 5 4 3 2 1 0 bit port8d [7C0] reset 0 0000000 r/w r/w bit name function 7C0 port8d[7C0] general-purpose r/w register writes to this bit field are stored internally and propagated to the gp bus. reads from this bit field return the internal register value, but are not propagated to the gp bus.
gp dma controller registers 11-76 lan?sc520 microcontroller register set manual general 7 (gpdmagr7) direct-mapped i/o address 008eh register description this is a general-purpose register. bit definitions programming notes 7 6 5 4 3 2 1 0 bit port8e [7C0] reset 0 0000000 r/w r/w bit name function 7C0 port8e[7C0] general-purpose r/w register writes to this bit field are stored internally and propagated to the gp bus. reads from this bit field return the internal register value, but are not propagated to the gp bus.
gp dma controller registers lan?sc520 microcontroller register set manual 11-77 general 8 (gpdmagr8) direct-mapped i/o address 008fh register description this is a general-purpose register. bit definitions programming notes this general register is slightly different from the other direct-mapped general registers. no gp bus cycles are generated on writes to this i/o address (port 008fh). 7 6 5 4 3 2 1 0 bit port8f [7C0] reset 0 0000000 r/w r/w bit name function 7C0 port8f[7C0] general-purpose r/w register writes to this bit field are stored internally. reads from this bit field return the internal register value.
gp dma controller registers 11-78 lan?sc520 microcontroller register set manual master dma channel 4 memory address (gpdma4mar) direct-mapped i/o address 00c0h register description because channel 4 is used to cascade the slave dma controller to the master dma controller, this register has no real use. bit definitions programming notes 7 6 5 4 3 2 1 0 bit dma4mar[16 C 1] reset xxxxxxxx r/w r/w! bit name function 7C0 dma4mar [16C1] dma channel 4 memory address in a discrete dma controller, this bit field holds the lower 16 bits of memory address for dma channel 4. because the drq and dack internal signals for this dma channel are used to cascade to the slave dma controller in a pc/at-compatible system, dma channel 4 is not used directly for dma transfers. so this register has no real function; it is documented only for completeness. for the same reason, there is no corresponding page register for dma channel 4.
gp dma controller registers lan?sc520 microcontroller register set manual 11-79 master dma channel 4 transfer count (gpdma4tc) direct-mapped i/o address 00c2h register description because channel 4 is used to cascade the slave dma controller to the master dma controller, this register has no real use. bit definitions programming notes 7 6 5 4 3 2 1 0 bit dma4tc[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma4tc [15C0] dma channel 4 transfer count in a discrete dma controller, this bit field holds the 16-bit transfer count for dma channel 4. because the drq and dack internal signals for this dma channel are used to cascade to the slave dma controller in a pc/at-compatible system, dma channel 4 is not used directly for dma transfers. so this register has no real function; it is documented only for completeness.
gp dma controller registers 11-80 lan?sc520 microcontroller register set manual master dma channel 5 memory address (gpdma5mar) direct-mapped i/o address 00c4h register description this register contains bits 16 C1 of the memory address for channel 5 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma5mar) is always accessed first, software should precede any access to this register with a write to the mstdmacbp register (see page 11-93) to clear the master dma byte pointer. the value in this register (gpdma5mar) is used with the values in the gpdma5pg register (see page 11-73) and the gpdmaextpg5 register (see page 11-14) to generate dma address bits 27C0. by default, this channel is set up for pc/at compatibility (16-bit dma transfers on the master dma controller). for 16-bit transfers, this register (gpdma5mar) holds address bits 16C1 and address bit 0 is always 0 (i.e., the 16-bit transfers are word-aligned). because of this, software must load this register with the desired memory address divided by 2 for 16-bit transfers. in enhanced mode, this channel can be programmed for 8-bit dma transfers (see the descriptions for gpdmactl register bits ch5_alt_size and enh_mode_enb, on page 11-4). for 8-bit transfers, this register (gpdma5mar) holds address bits 15C0, and address bit 16 is controlled via the gpdma5pg register (see page 11-73). 7 6 5 4 3 2 1 0 bit dma5mar[16 C 1] reset xxxxxxxx r/w r/w! bit name function 7C0 dma5mar [16C1] lower 16 bits of dma channel 5 memory address this 8-bit field is used in two successive i/o accesses to read or write the channels memory address bits 16C1 for 16-bit dma transfers. bits 8C1 of the channels memory address can be read from or written to this bit field immediately after a write to the mstdmacbp register (see page 11-93). bits 16C9 of the channels memory address can be read from or written to this bit field immediately after memory address bits 8C1 are read from or written to this bit field.
gp dma controller registers lan?sc520 microcontroller register set manual 11-81 master dma channel 5 transfer count (gpdma5tc) direct-mapped i/o address 00c6h register description this register contains bits 15 C0 of the transfer count for channel 5 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma5tc) is always accessed first, software should precede any access to this register with a write to the mstdmacbp register (see page 11-93) to clear the master dma byte pointer. by default, this channel is set up for pc/at compatibility (16-bit dma transfers on the master dma controller). for 16-bit transfers, each transfer is two bytes, so a transfer count of ffffh results in a transfer of 128 kbytes. the value in this register (gpdma5tc) can be used with the value in the gpdmaexttc5 register (see page 11-18) to allow counts of up to 16 m (16,777,216) transfers. in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma5tc[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma5tc [15C0] dma channel 5 transfer count (16-bit register) this 8-bit field is used in two successive i/o accesses to read or write the channels transfer count bits 15C0. bits 7C0 of the channels transfer count can be read from or written to this bit field immediately after a write to the mstdmacbp register (see page 11-93). bits 15C8 of the channels transfer count can be read from or written to this bit field immediately after transfer count bits 7C0 are read from or written to this bit field. the actual number of transfers is one more than the programmed transfer count value.
gp dma controller registers 11-82 lan?sc520 microcontroller register set manual master dma channel 6 memory address (gpdma6mar) direct-mapped i/o address 00c8h register description this register contains bits 16 C1 of the memory address for channel 6 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma6mar) is always accessed first, software should precede any access to this register with a write to the mstdmacbp register (see page 11-93) to clear the master dma byte pointer. the value in this register (gpdma6mar) is used with the values in the gpdma6pg register (see page 11-71) and the gpdmaextpg6 register (see page 11-15) to generate dma address bits 27C0. by default, this channel is set up for pc/at compatibility (16-bit dma transfers on the master dma controller). for 16-bit transfers, this register (gpdma6mar) holds address bits 16C1 and address bit 0 is always 0 (i.e., the 16-bit transfers are word-aligned). because of this, software must load this register with the desired memory address divided by 2 for 16-bit transfers. in enhanced mode, this channel can be programmed for 8-bit dma transfers (see the descriptions for gpdmactl register bits ch6_alt_size and enh_mode_enb, on page 11-4). for 8-bit transfers, this register (gpdma6mar) holds address bits 15C0, and address bit 16 is controlled via the gpdma6pg register (see page 11-71). 7 6 5 4 3 2 1 0 bit dma6mar[16 C 1] reset xxxxxxxx r/w r/w! bit name function 7C0 dma6mar [16C1] lower 16 bits of dma channel 6 memory address this 8-bit field is used in two successive i/o accesses to read or write the channels memory address bits 16C1 for 16-bit dma transfers. bits 8C1 of the channels memory address can be read from or written to this bit field immediately after a write to the mstdmacbp register (see page 11-93). bits 16C9 of the channels memory address can be read from or written to this bit field immediately after memory address bits 8C1 are read from or written to this bit field.
gp dma controller registers lan?sc520 microcontroller register set manual 11-83 master dma channel 6 transfer count (gpdma6tc) direct-mapped i/o address 00cah register description this register contains bits 15 C0 of the transfer count for channel 6 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma6tc) is always accessed first, software should precede any access to this register with a write to the mstdmacbp register (see page 11-93) to clear the master dma byte pointer. by default, this channel is set up for pc/at compatibility (16-bit dma transfers on the master dma controller). for 16-bit transfers, each transfer is two bytes, so a transfer count of ffffh results in a transfer of 128 kbytes. the value in this register (gpdma6tc) can be used with the value in the gpdmaexttc6 register (see page 11-19) to allow counts of up to 16 m (16,777,216) transfers. in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma6tc[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma6tc [15C0] dma channel 6 transfer count (16-bit register) this 8-bit field is used in two successive i/o accesses to read or write the channels transfer count bits 15C0. bits 7C0 of the channels transfer count can be read from or written to this bit field immediately after a write to the mstdmacbp register (see page 11-93). bits 15C8 of the channels transfer count can be read from or written to this bit field immediately after transfer count bits 7C0 are read from or written to this bit field. the actual number of transfers is one more than the programmed transfer count value.
gp dma controller registers 11-84 lan?sc520 microcontroller register set manual master dma channel 7 memory address (gpdma7mar) direct-mapped i/o address 00cch register description this register contains bits 16 C1 of the memory address for channel 7 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma7mar) is always accessed first, software should precede any access to this register with a write to the mstdmacbp register (see page 11-93) to clear the master dma byte pointer. the value in this register (gpdma7mar) is used with the values in the gpdma7pg register (see page 11-72) and the gpdmaextpg7 register (see page 11-16) to generate dma address bits 27C0. by default, this channel is set up for pc/at compatibility (16-bit dma transfers on the master dma controller). for 16-bit transfers, this register (gpdma7mar) holds address bits 16C1 and address bit 0 is always 0 (i.e., the 16-bit transfers are word-aligned). because of this, software must load this register with the desired memory address divided by 2 for 16-bit transfers. in enhanced mode, this channel can be programmed for 8-bit dma transfers (see the descriptions for gpdmactl register bits ch7_alt_size and enh_mode_enb, on page 11-4). for 8-bit transfers, this register (gpdma7mar) holds address bits 15C0, and address bit 16 is controlled via the gpdma7pg register (see page 11-72). 7 6 5 4 3 2 1 0 bit dma7mar[16 C 1] reset xxxxxxxx r/w r/w! bit name function 7C0 dma7mar [16C1] lower 16 bits of dma channel 7 memory address this 8-bit field is used in two successive i/o accesses to read or write the channels memory address bits 16C1 for 16-bit dma transfers. bits 8C1 of the channels memory address can be read from or written to this bit field immediately after a write to the mstdmacbp register (see page 11-93). bits 16C9 of the channels memory address can be read from or written to this bit field immediately after memory address bits 8C1 are read from or written to this bit field.
gp dma controller registers lan?sc520 microcontroller register set manual 11-85 master dma channel 7 transfer count (gpdma7tc) direct-mapped i/o address 00ceh register description this register contains bits 15 C0 of the transfer count for channel 7 during dma operation. bit definitions programming notes to ensure that the lower byte of this register (gpdma7tc) is always accessed first, software should precede any access to this register with a write to the mstdmacbp register (see page 11-93) to clear the master dma byte pointer. by default, this channel is set up for pc/at compatibility (16-bit dma transfers on the master dma controller). for 16-bit transfers, each transfer is two bytes, so a transfer count of ffffh results in a transfer of 128 kbytes. the value in this register (gpdma7tc) can be used with the value in the gpdmaexttc7 register (see page 11-20) to allow counts of up to 16 m (16,777,216) transfers. in pci bus 2.2-compliant designs, software must limit the length of gp bus dma demand- or block-mode transfers. very large transfers could cause the pci host bridge target controller to violate the 10-s memory write maximum completion time limit set in the pci local bus specification, revision 2.2. 7 6 5 4 3 2 1 0 bit dma7tc[15 C 0] reset xxxxxxxx r/w r/w! bit name function 7C0 dma7tc [15C0] dma channel 7 transfer count (16-bit register) this 8-bit field is used in two successive i/o accesses to read or write the channels transfer count bits 15C0. bits 7C0 of the channels transfer count can be read from or written to this bit field immediately after a write to the mstdmacbp register (see page 11-93). bits 15C8 of the channels transfer count can be read from or written to this bit field immediately after transfer count bits 7C0 are read from or written to this bit field. the actual number of transfers is one more than the programmed transfer count value.
gp dma controller registers 11-86 lan?sc520 microcontroller register set manual master dma channel 4C7 status (mstdmasta) direct-mapped i/o address 00d0h register description this register indicates the request status and terminal count status for channels 4C7. bit definitions programming notes bits 3C0 of this register are reset when read. any read from this register (mstdmasta) clears bits 3C0. 7 6 5 4 3 2 1 0 bit dmar7 dmar6 dmar5 dmar4 tc7 tc6 tc5 tc4 reset ????0000 r/w rrrrr!r!r!r! bit name function 7dmar7 channel 7 dma request 0 = channel 7 dma request not pending 1 = channel 7 dma request pending 6dmar6 channel 6 dma request 0 = channel 6 dma request not pending 1 = channel 6 dma request pending 5dmar5 channel 5 dma request 0 = channel 5 dma request not pending 1 = channel 5 dma request pending 4dmar4 channel 4 dma request 0 = channel 4 dma request not pending 1 = channel 4 dma request pending 3tc7 channel 7 terminal count 0 = channel 7 terminal count not detected 1 = channel 7 terminal count detected 2tc6 channel 6 terminal count 0 = channel 6 terminal count not detected 1 = channel 6 terminal count detected 1tc5 channel 5 terminal count 0 = channel 5 terminal count not detected 1 = channel 5 terminal count detected 0tc4 channel 4 terminal count 0 = channel 4 terminal count not detected 1 = channel 4 terminal count detected
gp dma controller registers lan?sc520 microcontroller register set manual 11-87 master dma channel 4C7 control (mstdmactl) direct-mapped i/o address 00d0h register description this register provides the control function for channels 4C7. bit definitions 7 6 5 4 3 2 1 0 bit daksen drqsen wrtsel pritype comptim dma_dis reserved reset 00000000 r/w wwwwww rsv bit name function 7 daksen internal dackx sense in a discrete dma controller, this bit controls the polarity of all dackx outputs from the slave dma controller: 0 = asserted low 1 = asserted high system logic external to the dma controller expects the dma controller to drive active low dackx outputs. this bit must be written to 0b for proper system operation. 6 drqsen internal drqx sense in a discrete dma controller, this bit controls the polarity of all drqx inputs to the slave dma controller: 0 = asserted high 1 = asserted low system logic external to the dma controller expects the dma controller to respond to active high drqx inputs. this bit must be written to 0b for proper system operation. 5 wrtsel write selection control 0 = late write selection 1 = extended (early) write selection. write command signals (gpiowr and gpmemwr ) are asserted one clock early. enabling this feature results in timing changes on the gp bus that can violate the isa specification. this bit has no effect when the comptim bit is 1. 4 pritype priority type 0 = fixed priority 1 = rotating priority 3 comptim compressed timing 0 = normal timing. 1 = compressed timing. read command signals (gpiord and gpmemrd ) have a one clock pulse width. enabling this feature results in timing changes on the gp bus that can violate the isa specification. 2dma_dis disable dma controller 0 = dma requests are enabled. 1 = dma requests are ignored but dma registers are available to the cpu. the dma controller should be disabled prior to programming it in order to prevent unintended transfers from occurring during the dma controller programming operation. care should also be taken to ensure that the dma controller is idle before disabling it. if the dma controller is performing a transfer when software disables it, abnormal system operation can occur.
gp dma controller registers 11-88 lan?sc520 microcontroller register set manual programming notes 1C0 reserved reserved this bit field should be written to 0 for normal system operation. bit name function
gp dma controller registers lan?sc520 microcontroller register set manual 11-89 master software drq(n) request (mstdmaswreq) direct-mapped i/o address 00d2h register description this register is used to initiate a software dma request for one of channels 4 C7. bit definitions programming notes 7 6 5 4 3 2 1 0 bit reserved reqdma reqsel [1C0] reset 00000xxx r/w rsv w w bit name function 7C3 reserved reserved this bit field should be written to 0 for normal system operation. 2 reqdma software dma request 0 = clear the request bit for the channel selected by the reqsel bit field. 1 = set the request bit for the channel selected by the reqsel bit field. the request bit is cleared internally after the corresponding channel has reached the end of its transfer count. 1C0 reqsel[1C0] dma channel select this bit field selects dma channel that is to latch the reqdma bit internally to assert or deassert a dma request via software: 00 = select channel 4 for internal dma request per the reqdma bit. 01 = select channel 5 for internal dma request per the reqdma bit. 10 = select channel 6 for internal dma request per the reqdma bit. 11 = select channel 7 for internal dma request per the reqdma bit.
gp dma controller registers 11-90 lan?sc520 microcontroller register set manual master dma channel 4C7 mask (mstdmamsk) direct-mapped i/o address 00d4h register description this register provides a mask or unmask capability for the dma request signal to each of channels 4C7. bit definitions programming notes the same dma channel masks can be controlled via dma registers mstdmamsk, mstdmamskrst (see page 11-96), and mstdmagenmsk (see page 11-97). before masking an active dma channel, software must ensure that the dma request is deasserted. masking an active channel while it is being granted might cause the system to hang. 7 6 5 4 3 2 1 0 bit reserved chmask msksel [1C0] reset 00000xxx r/w rsv w w bit name function 7C3 reserved reserved this bit field should be written to 0 for normal system operation. 2 chmask dma channel mask 0 = clear the mask bit for the channel selected by the msksel bit field. 1 = set the mask bit for the channel selected by the msksel bit field. if the ainit bit is 0 in the mstdmamode register (see page 11-91), the mask bit is set internally when the corresponding channel reaches the end of its transfer count. if the ainit bit is 1, the mask bit remains clear when the transfer ends. 1C0 msksel[1C0] dma channel mask select this bit field selects the dma channel that is to latch the chmask bit internally to mask or unmask the dma request signal into the specified dma channel: 00 = mask or unmask dma channel 4 per the chmask bit. 01 = mask or unmask dma channel 5 per the chmask bit. 10 = mask or unmask dma channel 6 per the chmask bit. 11 = mask or unmask dma channel 7 per the chmask bit.
gp dma controller registers lan?sc520 microcontroller register set manual 11-91 master dma channel 4C7 mode (mstdmamode) direct-mapped i/o address 00d6h register description this register indicates the transfer mode for channels 4C7. bit definitions 7 6 5 4 3 2 1 0 bit trnmod [1C0] adddec ainit opsel[1C0] modsel[1C0] reset xxxxxxxx r/w wwww w bit name function 7C6 trnmod[1C0] transfer mode this bit field selects the transfer mode for the channel selected by the modsel bit field. 00 = demand transfer mode 01 = single transfer mode 10 = block transfer mode 11 = cascade mode. (only channel 4 should be programmed for cascade mode. all other channels should be programmed for one of the other modes). 5 adddec address decrement this bit field selects increment or decrement counting for the channel selected by the modsel bit field. 0 = increment the dma memory address after each transfer. 1 = decrement the dma memory address after each transfer. 4ainit automatic initialization control this bit field enables automatic initialization for the channel selected by the modsel bit field. 0 = automatic initialization is disabled. 1 = automatic initialization is enabled. automatic initialization causes the channels base address and transfer count registers to be restored to the values they contained prior to the dma transfer when the transfer count ends. the channel is then ready to perform another dma transfer without processor intervention as soon as the next dma request is detected. automatic initialization must be disabled when buffer chaining mode is used; otherwise unexpected results may occur. 3C2 opsel[1C0] operation select this bit field selects the dma operation for the channel selected by the modsel bit field. 00 = verify mode. the dma controller acts normally except that no i/o or memory commands are generated, and no data is transferred. 01 = write transfer. data is transferred from a dma-capable i/o or memory-mapped device into system memory. 10 = read transfer. data is transferred from system memory to a dma-capable i/o or memory-mapped device. 11 = reserved.
gp dma controller registers 11-92 lan?sc520 microcontroller register set manual programming notes 1C0 modsel[1C0] dma channel select this bit field selects the channel that is to internally latch the other bits written to this register: 00 = select channel 4 01 = select channel 5 10 = select channel 6 11 = select channel 7 bit name function
gp dma controller registers lan?sc520 microcontroller register set manual 11-93 master dma clear byte pointer (mstdmacbp) direct-mapped i/o address 00d8h register description this register channel provides a mechanism to adjust the byte pointer to the low byte of the memory address and transfer count registers for channels 4C7. bit definitions programming notes 7 6 5 4 3 2 1 0 bit mastr_cbp [7C0] reset xxxxxxxx r/w w! bit name function 7C0 mastr_cbp [7C0] master dma clear byte pointer the dma controllers 16-bit memory address and terminal count registers are accessed by writing or reading consecutive 8-bit values to the same direct-mapped i/o address. a single byte pointer is used across the master dma controller to determine which byte is accessed if any of these 16-bit registers is read or written. any access to one of these registers toggles the byte pointer between the low and high bytes. a write of any data to this bit field (mastr_cbp) clears the byte pointer so that the next memory address or transfer count register access is to the low byte.
gp dma controller registers 11-94 lan?sc520 microcontroller register set manual master dma controller reset (mstdmarst) direct-mapped i/o address 00dah register description this register provides a reset mechanism for channels 4 C7. bit definitions programming notes 7 6 5 4 3 2 1 0 bit mastr_rst [7C0] reset 00000000 r/w w! bit name function 7C0 mastr_rst [7C0] master dma controller reset a write of any data to this address resets the dma controller to the same state as a system reset.
gp dma controller registers lan?sc520 microcontroller register set manual 11-95 master dma controller temporary (mstdmatmp) direct-mapped i/o address 00dah register description this register has no real use in the lansc520 microcontroller. it is included for compatibility only. bit definitions programming notes 7 6 5 4 3 2 1 0 bit mastr_tmp [7C0] reset 00000000 r/w r bit name function 7C0 mastr_tmp [7C0] master dma controller temporary register in a discrete dma controller, this bit field is used as a temporary storage buffer when doing memory-to-memory dma. memory-to-memory dma transfers are not supported in the lansc520 microcontroller, so this register is included for compatibility reasons only.
gp dma controller registers 11-96 lan?sc520 microcontroller register set manual master dma mask reset (mstdmamskrst) direct-mapped i/o address 00dch register description this register provides a mechanism to reset the mstdmagenmsk register (see page 11-97). bit definitions programming notes the same dma channel masks can be controlled via dma registers mstdmamsk (see page 11-90), mstdmamskrst, and mstdmagenmsk (see page 11-97). before masking an active dma channel, software must ensure that the dma request is deasserted. masking an active channel while it is being granted might cause the system to hang. 7 6 5 4 3 2 1 0 bit mastr_msk_rst [7C0] reset xxxxxxxx r/w w! bit name function 7C0 mastr_msk_ rst[7C0] master dma reset mask writing any data to this i/o address resets the mstdmagenmsk register (see page 11-97), thereby activating the four slave dma channels.
gp dma controller registers lan?sc520 microcontroller register set manual 11-97 master dma general mask (mstdmagenmsk) direct-mapped i/o address 00deh register description this register provides a mechanism to mask or unmask the dma request signal to each of channels 4 C7. bit definitions programming notes the same dma channel masks can be controlled via dma registers mstdmamsk (see page 11-90), mstdmamskrst (see page 11-96), and mstdmagenmsk. before masking an active dma channel, software must ensure that the dma request is deasserted. masking an active channel while it is being granted might cause the system to hang. 7 6 5 4 3 2 1 0 bit reserved ch7_dis ch6_dis ch5_dis ch4_dis reset 00001111 r/w rsv wwww bit name function 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3 ch7_dis dma channel 7 mask 0 = enable dma channel 7 for servicing dma requests. 1 = disable dma channel 7 from servicing dma requests. 2 ch6_dis dma channel 6 mask 0 = enable dma channel 6 for servicing dma requests. 1 = disable dma channel 6 from servicing dma requests. 1 ch5_dis dma channel 5 mask 0 = enable dma channel 5 for servicing dma requests. 1 = disable dma channel 5 from servicing dma requests. 0 ch4_dis dma channel 4 mask 0 = enable dma channel 4 for servicing dma requests. 1 = disable dma channel 4 from servicing dma requests.
gp dma controller registers 11-98 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 12-1 chapter 12 programmable interrupt controller registers 12.1 overview this chapter describes the programmable interrupt controller (pic) registers of the lansc520 microcontroller. the lansc520 microcontrollers programmable interrupt controller (pic) consists of three industry-standard controllers, integrated with a highly programmable interrupt router. the pic register set includes two groups of registers: n 39 memory-mapped configuration region (mmcr) registers are used to configure and control pic functions specific to the lansc520 microcontroller. n 28 direct-mapped i/o registers are used for industry-standard pic configuration, control, and status functions. see the lan?sc520 microcontroller users manual , order #22004, for details about the interrupt controller. table 12-1 and table 12-2 on page 12-2 list each type of pic register in offset order, with the corresponding descriptions page number. 12.2 registers table 12-1 programmable interrupt controller mmcr registers register name mnemonic mmcr offset page n umber interrupt control picicr d00h page 12-4 master pic interrupt mode mpicmode d02h page 12-6 slave 1 pic interrupt mode sl1picmode d03h page 12-8 slave 2 pic interrupt mode sl2picmode d04h page 12-9 software interrupt 16C1 control swint16_1 d08h page 12-10 software interrupt 22C17/nmi control swint22_17 d0ah page 12-13 interrupt pin polarity intpinpol d10h page 12-15 pci host bridge interrupt mapping pcihostmap d14h page 12-17 ecc interrupt mapping eccmap d18h page 12-19 gp timer 0 interrupt mapping gptmr0map d1ah page 12-21 gp timer 1 interrupt mapping gptmr1map d1bh page 12-21 gp timer 2 interrupt mapping gptmr2map d1ch page 12-21 pit 0 interrupt mapping pit0map d20h page 12-21 pit 1 interrupt mapping pit1map d21h page 12-21 pit 2 interrupt mapping pit2map d22h page 12-21 uart 1 interrupt mapping uart1map d28h page 12-21 uart 2 interrupt mapping uart2map d29h page 12-21 pci interrupt a mapping pciintamap d30h page 12-21
programmable interrupt controller registers 12-2 lan?sc520 microcontroller register set manual pci interrupt b mapping pciintbmap d31h page 12-21 pci interrupt c mapping pciintcmap d32h page 12-21 pci interrupt d mapping pciintdmap d33h page 12-21 dma buffer chaining interrupt mapping dmabcintmap d40h page 12-21 ssi interrupt mapping ssimap d41h page 12-21 watchdog timer interrupt mapping wdtmap d42h page 12-21 rtc interrupt mapping rtcmap d43h page 12-21 write-protect violation interrupt mapping wpvmap d44h page 12-21 amdebug? technology rx/tx interrupt mapping icemap d45h page 12-21 floating point error interrupt mapping ferrmap d46h page 12-21 gpirq0 interrupt mapping gp0imap d50h page 12-21 gpirq1 interrupt mapping gp1imap d51h page 12-21 gpirq2 interrupt mapping gp2imap d52h page 12-21 gpirq3 interrupt mapping gp3imap d53h page 12-21 gpirq4 interrupt mapping gp4imap d54h page 12-21 gpirq5 interrupt mapping gp5imap d55h page 12-21 gpirq6 interrupt mapping gp6imap d56h page 12-21 gpirq7 interrupt mapping gp7imap d57h page 12-21 gpirq8 interrupt mapping gp8imap d58h page 12-21 gpirq9 interrupt mapping gp9imap d59h page 12-21 gpirq10 interrupt mapping gp10imap d5ah page 12-21 table 12-2 programmable interrupt controller direct-mapped registers register name mnemonic i/o address page number master pic interrupt request mpicir 0020h page 12-24 master pic in-service mpicisr 0020h page 12-25 master pic initialization control word 1 mpicicw1 0020h page 12-26 master pic operation control word 2 mpicocw2 0020h page 12-28 master pic operation control word 3 mpicocw3 0020h page 12-30 master pic initialization control word 2 mpicicw2 0021h page 12-32 master pic initialization control word 3 mpicicw3 0021h page 12-33 master pic initialization control word 4 mpicicw4 0021h page 12-35 master pic interrupt mask mpicintmsk 0021h page 12-36 slave 2 pic interrupt request s2picir 0024h page 12-37 slave 2 pic in-service s2picisr 0024h page 12-38 slave 2 pic initialization control word 1 s2picicw1 0024h page 12-39 slave 2 pic operation control word 2 s2picocw2 0024h page 12-41 slave 2 pic operation control word 3 s2picocw3 0024h page 12-43 slave 2 pic initialization control word 2 s2picicw2 0025h page 12-45 slave 2 pic initialization control word 3 s2picicw3 0025h page 12-46 slave 2 pic initialization control word 4 s2picicw4 0025h page 12-47 table 12-1 programmable interrupt controller mmcr registers (continued) register name mnemonic mmcr offset page n umber
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-3 slave 2 pic interrupt mask s2picintmsk 0025h page 12-48 slave 1 pic interrupt request s1picir 00a0h page 12-49 slave 1 pic in-service s1picisr 00a0h page 12-50 slave 1 pic initialization control word 1 s1picicw1 00a0h page 12-51 slave 1 pic operation control word 2 s1picocw2 00a0h page 12-53 slave 1 pic operation control word 3 s1picocw3 00a0h page 12-55 slave 1 pic initialization control word 2 s1picicw2 00a1h page 12-57 slave 1 pic initialization control word 3 s1picicw3 00a1h page 12-58 slave 1 pic initialization control word 4 s1picicw4 00a1h page 12-59 slave 1 pic interrupt mask s1picintmsk 00a1h page 12-60 fpu error interrupt clear fpuerrclr 00f0h page 12-61 table 12-2 programmable interrupt controller direct-mapped registers (continued) register name mnemonic i/o address page number
programmable interrupt controller registers 12-4 lan?sc520 microcontroller register set manual interrupt control (picicr) memory-mapped mmcr offset d00h register description this register controls the global interrupt mode for the master, slave 1 and slave 2 programmable interrupt controllers, slave controller bypass, and the global nonmaskable interrupt (nmi) mask bit. bit definitions 7 6 5 4 3 2 1 0 bit nmi_done nmi_enb reserved s2_gint_ mode s1_gint_ mode m_gint_ mode reset 00000111 r/w r/w! r/w rsv r/w r/w r/w bit name function 7nmi_done nmi routine done 0 = after this bit is set, it is cleared automatically by interrupt controller logic. 1 = software sets this bit to indicate that the nmi routine is completed. subsequent nmi events are blocked by the interrupt controller until the nmi_done bit is set by software, but if an nmi source is active at the time when the handler for another nmi sets this bit, then the interrupt controller generates an nmi for the second source shortly after returning from the first handler. 6nmi_enb master nmi enable this bit is a read/write version of the nmi enable bit that typically resides at direct-mapped port 0070h, bit 7, on a pc/at-compatible system. it has been moved here to facilitate internal design integration with the lansc520 microcontroller. 0 = nmi is gated off from reaching the cpu core. 1 = nmi propagates to the cpu core. if any nmi interrupt sources are active when this bit is set, an nmi is generated immediately. the nmi_enb bit is cleared by a cpu soft reset event. this allows software to initialize the stack pointer before setting the nmi_enb bit again after a soft reset. see table 3-3 on page 3-6 for a summary of lansc520 microcontroller reset sources. 5 C 3 reserved reserved this bit field should be written to 0 for normal system operation. 2s2_gint_ mode slave 2 pic global interrupt mode enable this bit provides a global or individual channel interrupt mode for the slave 2 pic. 0 = slave 2 pic global interrupt mode disabled. 1 = slave 2 pic global interrupt mode enabled. if the s2_gint_mode bit is set, bit ltim of the s2picicw1 register (see page 12-39) determines the interrupt mode for the slave 2 pic channels. if the s2_gint_mode bit and the ltim bit are set, all the slave 2 pic interrupt channels recognize level-sensitive interrupt requests. if the s2_gint_mode bit is set and the ltim bit is cleared, all the slave 2 pic interrupt channels recognize edge-sensitive interrupt requests. if the s2_gint_mode bit is cleared, the slave 2 ltim bit has no meaning, and the slave 2 pic channels can be programmed individually via the sl2picmode register (see page 12-9) to select either edge- or level-sensitive interrupt recognition.
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-5 programming notes for pc/at compatibility, bits m_gint_mode and s1_gint_mode in this register (picicr) should be set, and bit s2 should be set and bit s5 cleared in the mpicicw3 register (see page 12-34). in this configuration, the slave 2 controller is bypassed and any interrupt sources mapped to the slave 2 controller have no effect; also, interrupt sources can be mapped directly to master pic interrupt channel 5 by mapping them to priority p13. 1s1_gint_ mode slave 1 pic global interrupt mode enable this bit provides a global or individual channel interrupt mode for the slave 1 pic. 0 = slave 1 pic global interrupt mode disabled. 1 = slave 1 pic global interrupt mode enabled. if the s1_gint_mode bit is set, bit ltim of the s1picicw1 register (see page 12-51) determines the interrupt mode for the slave 1 pic channels. if the s1_gint_mode bit and the ltim bit are set, all the slave 1 pic interrupt channels recognize level-sensitive interrupt requests. if the s1_gint_mode bit is set and the ltim bit is cleared, all the slave 1 pic interrupt channels recognize edge-sensitive interrupt requests. if the s1_gint_mode bit is cleared, the slave 1 ltim bit has no meaning, and the slave 1 pic channels can be programmed individually via the sl1picmode register (see page 12-8) to select either edge- or level-sensitive interrupt recognition. 0 m_gint_ mode master pic global interrupt mode enable this bit provides a global or individual channel interrupt mode for the master pic. 0 = master pic global interrupt mode disabled. 1 = master pic global interrupt mode enabled. if the m_gint_mode bit is set, bit ltim of the mpicicw1 register (see page 12-26) determines the interrupt mode for the master pic channels. if the m_gint_mode bit and the ltim bit are set, all the master pic interrupt channels recognize level-sensitive interrupt requests. if the m_gint_mode bit is set and the ltim bit is cleared, all the master pic interrupt channels recognize edge-sensitive interrupt requests. if the m_gint_mode bit is cleared, the master ltim bit has no meaning, and the master pic channels can be programmed individually via the mpicmode register (see page 12-6) to select either edge- or level-sensitive interrupt recognition. bit name function
programmable interrupt controller registers 12-6 lan?sc520 microcontroller register set manual master pic interrupt mode (mpicmode) memory-mapped mmcr offset d02h register description this register controls the individual master pic channel interrupt mode. bit definitions 7 6 5 4 3 2 1 0 bit ch7_int_ mode ch6_int_ mode ch5_int_ mode ch4_int_ mode ch3_int_ mode ch2_int_ mode ch1_int_ mode ch0_int_ mode reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 7 ch7_int_ mode master pic channel 7 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 6 ch6_int_ mode master pic channel 6 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 5 ch5_int_ mode master pic channel 5 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection if the sngl bit in the mpicicw1 register is set (see page 12-26), and the m_gint_mode bit of the picicr register is cleared (see page 12-5), setting the ch5_int_mode bit causes interrupts to be recognized as level-sensitive on channel 5. clearing the ch5_int_mode bit under the same condition causes channel 5 interrupts to be recognized as edge-sensitive. however, if both the sngl bit and the m_gint_mode bit are cleared, the ch5_int_mode bit value has no meaning because the channel is used for cascading with the slave 2 controller. 4 ch4_int_ mode master pic channel 4 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 3 ch3_int_ mode master pic channel 3 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 2 ch2_int_ mode master pic channel 2 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection if the sngl bit in the mpicicw1 register is set (see page 12-26), and the m_gint_mode bit of the picicr register is cleared (see page 12-5), setting the ch2_int_mode bit causes interrupts to be recognized as level-sensitive on channel 2. clearing the ch2_int_mode bit under the same condition causes channel 2 interrupts to be recognized as edge-sensitive. however, if both the sngl bit and the m_gint_mode bit are cleared, the ch2_int_mode bit value has no meaning because the channel is used for cascading with the slave 1 controller. 1 ch1_int_ mode master pic channel 1 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-7 programming notes there is a global overriding bit, m_gint_mode in the picicr register (see page 12-5). when set, the m_gint_mode bit causes this register (mpicmode) to have no effect on the interrupt mode programmed for each channel. if the m_gint_mode bit is set, the overriding global interrupt mode for the master pic channels is determined by the ltim bit in the mpicicw1 register (see page 12-26). if the m_gint_mode bit is cleared, the ltim bit has no meaning, and the mpicmode register bits take effect for determining each master pic channels interrupt mode. 0 ch0_int_ mode master pic channel 0 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection bit name function
programmable interrupt controller registers 12-8 lan?sc520 microcontroller register set manual slave 1 pic interrupt mode (sl1picmode) memory-mapped mmcr offset d03h register description this register controls the individual slave 1 pic channel interrupt mode. bit definitions programming notes there is a global overriding bit, s1_gint_mode in the picicr register (see page 12-5). when set, the s1_gint_mode bit causes this register (sl1picmode) to have no effect on the interrupt mode programmed for each channel. if the s1_gint_mode bit is set, the overriding global interrupt mode for the slave 1 pic channels is determined by the ltim bit in the s1picicw1 register (see page 12-51). if the s1_gint_mode bit is cleared, the ltim bit has no meaning, and the sl1picmode register bits take effect for determining each slave 1 pic channels interrupt mode. 7 6 5 4 3 2 1 0 bit ch7_int_ mode ch6_int_ mode ch5_int_ mode ch4_int_ mode ch3_int_ mode ch2_int_ mode ch1_int_ mode ch0_int_ mode reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 7 ch7_int_ mode slave 1 pic channel 7 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 6 ch6_int_ mode slave 1 pic channel 6 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 5 ch5_int_ mode slave 1 pic channel 5 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 4 ch4_int_ mode slave 1 pic channel 4 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 3 ch3_int_ mode slave 1 pic channel 3 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 2 ch2_int_ mode slave 1 pic channel 2 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 1 ch1_int_ mode slave 1 pic channel 1 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 0 ch0_int_ mode slave 1 pic channel 0 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-9 slave 2 pic interrupt mode (sl2picmode) memory-mapped mmcr offset d04h register description this register controls the individual slave 2 pic channel interrupt mode. bit definitions programming notes there is a global overriding bit, s2_gint_mode in the picicr register (see page 12-5). when set, the s2_gint_mode bit causes this register (sl2picmode) to have no effect on the interrupt mode programmed for each channel. if the s2_gint_mode bit is set, the overriding global interrupt mode for the slave 2 pic channels is determined by the ltim bit in the s2picicw1 register (see page 12-51). if the s2_gint_mode bit is cleared, the ltim bit has no meaning, and the sl2picmode register bits take effect for determining each slave 2 pic channels interrupt mode. 7 6 5 4 3 2 1 0 bit ch7_int_ mode ch6_int_ mode ch5_int_ mode ch4_int_ mode ch3_int_ mode ch2_int_ mode ch1_int_ mode ch0_int_ mode reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 7 ch7_int_ mode slave 2 pic channel 7 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 6 ch6_int_ mode slave 2 pic channel 6 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 5 ch5_int_ mode slave 2 pic channel 5 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 4 ch4_int_ mode slave 2 pic channel 4 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 3 ch3_int_ mode slave 2 pic channel 3 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 2 ch2_int_ mode slave 2 pic channel 2 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 1 ch1_int_ mode slave 2 pic channel 1 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection 0 ch0_int_ mode slave 2 pic channel 0 interrupt mode 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection
programmable interrupt controller registers 12-10 lan?sc520 microcontroller register set manual software interrupt 16C1 control (swint16_1) memory-mapped mmcr offset d08h register description this register allows software to generate interrupt priority levels p1Cp16 to the cpu. bit definitions 15 14 13 12 11 10 9 8 bit sw_p16_ trig sw_p15_ trig sw_p14_ trig sw_p13_ trig sw_p12_ trig sw_p11_ trig sw_p10_ trig sw_p9_ trig reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w 7 6 5 4 3 2 1 0 bit sw_p8_ trig sw_p7_ trig sw_p6_ trig sw_p5_ trig sw_p4_ trig sw_p3_ trig sw_p2_ trig sw_p1_ trig reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 15 sw_p16_trig directly trigger priority level p16 setting this bit directly asserts a maskable interrupt of priority level p16. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 14 sw_p15_trig directly trigger priority level p15 setting this bit directly asserts a maskable interrupt of priority level p15. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 13 sw_p14_trig directly trigger priority level p14 setting this bit directly asserts a maskable interrupt of priority level p14. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 12 sw_p13_trig directly trigger priority level p13 setting this bit directly asserts a maskable interrupt of priority level p13. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 11 sw_p12_trig directly trigger priority level p12 setting this bit directly asserts a maskable interrupt of priority level p12. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt.
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-11 10 sw_p11_trig directly trigger priority level p11 setting this bit directly asserts a maskable interrupt of priority level p11. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 9 sw_p10_trig directly trigger priority level p10 setting this bit directly asserts a maskable interrupt of priority level p10. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 8 sw_p9_trig directly trigger priority level p9 setting this bit directly asserts a maskable interrupt of priority level p9. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 7 sw_p8_trig directly trigger priority level p8 setting this bit directly asserts a maskable interrupt of priority level p8. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 6 sw_p7_trig directly trigger priority level p7 setting this bit directly asserts a maskable interrupt of priority level p7. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 5 sw_p6_trig directly trigger priority level p6 setting this bit directly asserts a maskable interrupt of priority level p6. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 4 sw_p5_trig directly trigger priority level p5 setting this bit directly asserts a maskable interrupt of priority level p5. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 3 sw_p4_trig directly trigger priority level p4 setting this bit directly asserts a maskable interrupt of priority level p4. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 2 sw_p3_trig directly trigger priority level p3 setting this bit directly asserts a maskable interrupt of priority level p3. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 1 sw_p2_trig directly trigger priority level p2 setting this bit directly asserts a maskable interrupt of priority level p2. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. bit name function
programmable interrupt controller registers 12-12 lan?sc520 microcontroller register set manual programming notes this register (swint16C1) and register swint22C17 provide access to all 22 maskable interrupt priority levels. priority level p1 is the highest priority, and priority level p22 is the lowest. setting an interrupt trigger bit causes an interrupt to be asserted on the corresponding pics interrupt channel for as long as the bit is set. to use these bits effectively, the interrupt service routines should clear the interrupt trigger bit early in the routine. note that for the internal pc/at-compatible peripherals, and for many pci peripherals, existing drivers in off-the- shelf operating systems are not aware of these interrupt trigger bits. for peripherals with these kinds of interrupt service routines, care must be taken not to set the interrupt trigger bits. if this occurs, the interrupt gets stuck in the asserted state and the system loops in the interrupt service routine because the routine does not clear the trigger bit. 0 sw_p1_trig directly trigger priority level p1 setting this bit directly asserts a maskable interrupt of priority level p1. clearing this bit removes this direct interrupt assertion. this is the highest interrupt priority level. 0 = do not assert the interrupt. 1 = assert the interrupt. bit name function
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-13 software interrupt 22C17/nmi control (swint22_17) memory-mapped mmcr offset d0ah register description this register allows software to generate interrupt priority levels p17Cp22 or the nonmaskable interrupt (nmi) to the cpu. bit definitions 7 6 5 4 3 2 1 0 bit reserved nmi_trig sw_p22_ trig sw_p21_ trig sw_p20_ trig sw_p19_t rig sw_p18_ trig sw_p17_ trig reset 00000000 r/w rsv r/w r/w r/w r/w r/w r/w r/w bit name function 7 reserved reserved this bit field should be written to 0 for normal system operation. 6nmi_trig software nmi source setting this bit directly asserts an nmi to the cpu. this bit should be cleared by software prior to setting the nmi_done bit of the picicr register (see page 12-4). 0 = nmi not directly asserted (other sources can still assert an nmi). 1 = directly assert the nmi to the cpu. 5 sw_p22_trig directly trigger priority level p22 setting this bit directly asserts a maskable interrupt of priority level p22. clearing this bit removes this direct interrupt assertion. this is the lowest interrupt priority level. 0 = do not assert the interrupt. 1 = assert the interrupt. 4 sw_p21_trig directly trigger priority level p21 setting this bit directly asserts a maskable interrupt of priority level p21. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 3 sw_p20_trig directly trigger priority level p20 setting this bit directly asserts a maskable interrupt of priority level p20. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 2 sw_p19_trig directly trigger priority level p19 setting this bit directly asserts a maskable interrupt of priority level p19. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. 1 sw_p18_trig directly trigger priority level p18 setting this bit directly asserts a maskable interrupt of priority level p18. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt.
programmable interrupt controller registers 12-14 lan?sc520 microcontroller register set manual programming notes this register (swint22-17) and register swint16C1 provide access to all 22 maskable interrupt priority levels. priority level p1 is the highest priority, and priority level p22 is the lowest. setting an interrupt trigger bit causes an interrupt to be asserted on the corresponding pics interrupt channel for as long as the bit is set. to use these bits effectively, the interrupt service routines should clear the interrupt trigger bit early in the routine. note that for the internal pc/at-compatible peripherals, and for many pci peripherals, existing drivers in off-the- shelf operating systems are not aware of these interrupt trigger bits. for peripherals with these kinds of interrupt service routines, care must be taken not to set the interrupt trigger bits. if this occurs, the interrupt gets stuck in the asserted state and the system loops in the interrupt service routine because the routine does not clear the trigger bit. 0 sw_p17_trig directly trigger priority level p17 setting this bit directly asserts a maskable interrupt of priority level p17. clearing this bit removes this direct interrupt assertion. 0 = do not assert the interrupt. 1 = assert the interrupt. bit name function
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-15 interrupt pin polarity (intpinpol) memory-mapped mmcr offset d10h register description this register determines the polarity to be used for each external interrupt source. bit definitions 15 14 13 12 11 10 9 8 bit intd_pol intc_pol intb_pol inta_pol reserved gpint10 _pol gpint9_ pol gpint8_ pol reset 00000000 r/w r/w r/w r/w r/w rsv r/w r/w r/w 7 6 5 4 3 2 1 0 bit gpint7_ pol gpint6_ pol gpint5_ pol gpint4_ pol gpint3_ pol gpint2_ pol gpint1_ pol gpint0_ pol reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 15 intd_pol pci interrupt request intd polarity 0 = high-to-low transition or low-level-sensitive interrupt 1 = low-to-high transition or high-level-sensitive interrupt 14 intc_pol pci interrupt request intc polarity 0 = high-to-low transition or low-level-sensitive interrupt 1 = low-to-high transition or high-level-sensitive interrupt 13 intb_pol pci interrupt request intb polarity 0 = high-to-low transition or low-level-sensitive interrupt 1 = low-to-high transition or high-level-sensitive interrupt 12 inta_pol pci interrupt request inta polarity 0 = high-to-low transition or low-level-sensitive interrupt 1 = low-to-high transition or high-level-sensitive interrupt 11 reserved reserved this bit field should be written to 0 for normal system operation. 10 gpint10_pol general-purpose interrupt request gpirq10 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt 9 gpint9_pol general-purpose interrupt request gpirq9 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt 8 gpint8_pol general-purpose interrupt request gpirq8 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt 7 gpint7_pol general-purpose interrupt request gpirq7 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt
programmable interrupt controller registers 12-16 lan?sc520 microcontroller register set manual programming notes this register should be programmed only when the corresponding interrupt channel mask bits are enabled. at system reset, the intx_pol bits (bits 15C12 of this register, intpinpol) are cleared to enable the active low pci interrupt to be used as a default so that no inversion is necessary for the pci interrupt to be recognized correctly. if the intx pins are to be configured for use as general-purpose interrupt sources (as opposed to pci interrupt sources), then the correct polarity can be programmed as necessary using this register. 6 gpint6_pol general-purpose interrupt request gpirq6 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt 5 gpint5_pol general-purpose interrupt request gpirq5 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt 4 gpint4_pol general-purpose interrupt request gpirq4 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt 3 gpint3_pol general-purpose interrupt request gpirq3 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt 2 gpint2_pol general-purpose interrupt request gpirq2 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt 1 gpint1_pol general-purpose interrupt request gpirq1 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt 0 gpint0_pol general-purpose interrupt request gpirq0 polarity 0 = low-to-high transition or high-level-sensitive interrupt 1 = high-to-low transition or low-level-sensitive interrupt bit name function
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-17 pci host bridge interrupt mapping (pcihostmap) memory-mapped mmcr offset d14h register description this register maps the internally-generated pci host bridge interrupt to any of the desired interrupt channels or as an nmi. it also enables the pci host bridge nmi request as an nmi source. bit definitions 15 14 13 12 11 10 9 8 bit reserved pci_nmi_ enb reset 00000000 r/w rsv r/w 7 6 5 4 3 2 1 0 bit reserved pci_irq_map[4C0] reset 00000000 r/w rsv r/w bit name function 15 C 9 reserved reserved this bit field should be written to 0 for normal system operation. 8 pci_nmi_enb pci host bridge nmi enable this bit enables the pci host bridge nmi request as an nmi source. 0 = pci host bridge nmi request disabled as an nmi source 1 = pci host bridge nmi request enabled as an nmi source this bit (pci_nmi_enb) has no effect on the pci bus host bridge interrupt request, which can configured to generate an nmi by setting the pci_irq_map bit field to 11111b. 7 C 5 reserved reserved this bit field should be written to 0 for normal system operation.
programmable interrupt controller registers 12-18 lan?sc520 microcontroller register set manual programming notes this register should be programmed only when the corresponding interrupt channel mask bits are set in the pic. for nmis, this register should be programmed only when bit nmi_enb is cleared in the picicr register (see page 12-4). nmi_enb can be set immediately after programming this register (pcihostmap) to allow nmis to be passed to the cpu. programming more than one interrupt source to an interrupt channel results in interrupt sharing on that channel. programming more than one interrupt source as an nmi source results in nmi sharing on the cpus nmi input. all interrupt and nmi sources can be found in the following register descriptions: n software interrupt 16C1 control, page 12-10 n software interrupt 22C17/nmi control, page 12-13 n pci host bridge interrupt mapping, page 12-17 n ecc interrupt mapping, page 12-19 n other interrupt mapping registers (30), page 12-21 4 C 0 pci_irq_map [4C0] pci host bridge interrupt mapping the value in this 5-bit field maps the internally-generated pci host bridge interrupt to one of the following interrupt priority channels on the microcontroller or as an nmi. 00000 = disables the internally-generated pci interrupt from reaching the pic 00001 = priority p1 (master pic ir0) (highest priority) 00010 = priority p2 (master pic ir1) 00011 = priority p3 (slave 1 pic ir0/master pic ir2) 00100 = priority p4 (slave 1 pic ir1) 00101 = priority p5 (slave 1 pic ir2) 00110 = priority p6 (slave 1 pic ir3) 00111 = priority p7 (slave 1 pic ir4) 01000 = priority p8 (slave 1 pic ir5) 01001 = priority p9 (slave 1 pic ir6) 01010 = priority p10 (slave 1 pic ir7) 01011 = priority p11 (master pic ir3) 01100 = priority p12 (master pic ir4) 01101 = priority p13 (slave 2 pic ir0/master pic ir5) 01110 = priority p14 (slave 2 pic ir1) 01111 = priority p15 (slave 2 pic ir2) 10000 = priority p16 (slave 2 pic ir3) 10001 = priority p17 (slave 2 pic ir4) 10010 = priority p18 (slave 2 pic ir5) 10011 = priority p19 (slave 2 pic ir6) 10100 = priority p20 (slave 2 pic ir7) 10101 = priority p21 (master pic ir6) 10110 = priority p22 (master pic ir7) (lowest priority) 10111C11110 = disables the internally-generated pci interrupt from reaching the pic 11111 = nmi source for example, if pci_irq_map = 01101b, the pci interrupt request is mapped to interrupt priority p13 in the microcontroller. if pci_irq_map = 00000b or any binary value from 10111C11110b, the pci interrupt request is disabled from reaching the microcontrollers pic. if this field is set to 11111b, then the pci interrupt is routed and enabled as an nmi source. if bit s2 in the mpicicw3 register is cleared (see page 12-34), the slave 1 pic is bypassed, so programming the pci_irq_map bit field to a value in the range 00100C01010b does not pass the interrupt request to the cpu. however, if this bit field is programmed to 00011b with the s2 bit cleared, the pci interrupt request is routed to the master pic ir2 input. if bit s5 in the mpicicw3 register is cleared (see page 12-33), the slave 2 pic is bypassed, so programming the pci_irq_map bit field to a value in the range 01110C10100b does not pass the interrupt request to the cpu. however, if this field is programmed to 01101b with the s5 bit cleared, the pci interrupt request is routed to master pic ir5 input. bit name function
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-19 ecc interrupt mapping (eccmap) memory-mapped mmcr offset d18h register description this register maps the internally-generated ecc single-bit interrupt to any of the desired interrupt channels. it also enables the ecc multi-bit error as an nmi source. bit definitions 15 14 13 12 11 10 9 8 bit reserved ecc_nmi_ enb reset 00000000 r/w rsv r/w 7 6 5 4 3 2 1 0 bit reserved ecc_irq_map[4C0] reset 00000000 r/w rsv r/w bit name function 15 C 9 reserved reserved this bit field should be written to 0 for normal system operation. 8 ecc_nmi_ enb ecc nmi enable this bit enables the ecc multiple-bit error as an nmi source. 0 = ecc multiple-bit error disabled as an nmi source. 1 = ecc multiple-bit error enabled as an nmi source. 7 C 5 reserved reserved this bit field should be written to 0 for normal system operation.
programmable interrupt controller registers 12-20 lan?sc520 microcontroller register set manual programming notes this register should be programmed only when the corresponding interrupt channel mask bits are set in the pic. for nmis, this register should be programmed only when bit nmi_enb is cleared in the picicr register (see page 12-4). nmi_enb can be set immediately after programming this register (eccmap) to allow nmis to be passed to the cpu. programming more than one interrupt source to an interrupt channel results in interrupt sharing on that channel. programming more than one interrupt source as an nmi source results in nmi sharing on the cpus nmi input. all interrupt and nmi sources can be found in the following register descriptions: n software interrupt 16C1 control, page 12-10 n software interrupt 22C17/nmi control, page 12-13 n pci host bridge interrupt mapping, page 12-17 n ecc interrupt mapping, page 12-19 n other interrupt mapping registers (30), page 12-21 4 C 0 ecc_irq_map [4C0] sdram ecc interrupt mapping the value in this 5-bit field maps the internally-generated sdram ecc single-bit interrupt to one of the following interrupt priority channels on the microcontroller. 00000 = disables the internally-generated ecc interrupt from reaching the pic 00001 = priority p1 (master pic ir0) (highest priority) 00010 = priority p2 (master pic ir1) 00011 = priority p3 (slave 1 pic ir0/master pic ir2) 00100 = priority p4 (slave 1 pic ir1) 00101 = priority p5 (slave 1 pic ir2) 00110 = priority p6 (slave 1 pic ir3) 00111 = priority p7 (slave 1 pic ir4) 01000 = priority p8 (slave 1 pic ir5) 01001 = priority p9 (slave 1 pic ir6) 01010 = priority p10 (slave 1 pic ir7) 01011 = priority p11 (master pic ir3) 01100 = priority p12 (master pic ir4) 01101 = priority p13 (slave 2 pic ir0/master pic ir5) 01110 = priority p14 (slave 2 pic ir1) 01111 = priority p15 (slave 2 pic ir2) 10000 = priority p16 (slave 2 pic ir3) 10001 = priority p17 (slave 2 pic ir4) 10010 = priority p18 (slave 2 pic ir5) 10011 = priority p19 (slave 2 pic ir6) 10100 = priority p20 (slave 2 pic ir7) 10101 = priority p21 (master pic ir6) 10110 = priority p22 (master pic ir7) (lowest priority) 10111C11111 = disables the internally-generated ecc interrupt from reaching the pic for example, if ecc_irq_map = 01101b, the ecc interrupt request is mapped to interrupt priority p13 in the microcontroller. if ecc_irq_map = 00000b or any binary value from 10111C11111b, the ecc interrupt request is disabled from reaching the microcontrollers pic. the single-bit ecc interrupt request cannot be routed as a source for generating an nmi. if bit s2 in the mpicicw3 register is cleared (see page 12-34), the slave 1 pic is bypassed, so programming the ecc_irq_map bit field to a value in the range 00100C01010b does not pass the interrupt request to the cpu. however, if this bit field is programmed to 00011b with the s2 bit cleared, the ecc interrupt request is routed to the master pic ir2 input. if bit s5 in the mpicicw3 register is cleared (see page 12-33), the slave 2 pic is bypassed, so programming the ecc_irq_map bit field to a value in the range 01110C10100b does not pass the interrupt request to the cpu. however, if this field is programmed to 01101b with the s5 bit cleared, the ecc interrupt request is routed to master pic ir5 input. bit name function
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-21 memory-mapped gp timer 0 interrupt mapping (gptmr0map) mmcr offset d1ah gp timer 1 interrupt mapping (gptmr1map) mmcr offset d1bh gp timer 2 interrupt mapping (gptmr2map) mmcr offset d1ch pit 0 interrupt mapping (pit0map) mmcr offset d20h pit 1 interrupt mapping (pit1map) mmcr offset d21h pit 2 interrupt mapping (pit2map) mmcr offset d22h uart 1 interrupt mapping (uart1map) mmcr offset d28h uart 2 interrupt mapping (uart2map) mmcr offset d29h pci interrupt a mapping (pciintamap) mmcr offset d30h pci interrupt b mapping (pciintbmap) mmcr offset d31h pci interrupt c mapping (pciintcmap) mmcr offset d32h pci interrupt d mapping (pciintdmap) mmcr offset d33h dma buffer chaining interrupt mapping (dmabcintmap) mmcr offset d40h ssi interrupt mapping (ssimap) mmcr offset d41h watchdog timer interrupt mapping (wdtmap) mmcr offset d42h rtc interrupt mapping (rtcmap) mmcr offset d43h write-protect violation interrupt mapping (wpvmap) mmcr offset d44h amdebug? technology rx/tx interrupt mapping (icemap) mmcr offset d45h floating point error interrupt mapping (ferrmap) mmcr offset d46h gpirq0 interrupt mapping (gp0imap) mmcr offset d50h gpirq1 interrupt mapping (gp1imap) mmcr offset d51h gpirq2 interrupt mapping (gp2imap) mmcr offset d52h gpirq3 interrupt mapping (gp3imap) mmcr offset d53h gpirq4 interrupt mapping (gp4imap) mmcr offset d54h gpirq5 interrupt mapping (gp5imap) mmcr offset d55h gpirq6 interrupt mapping (gp6imap) mmcr offset d56h gpirq7 interrupt mapping (gp7imap) mmcr offset d57h gpirq8 interrupt mapping (gp8imap) mmcr offset d58h gpirq9 interrupt mapping (gp9imap) mmcr offset d59h gpirq10 interrupt mapping (gp10imap) mmcr offset d5ah 7 6 5 4 3 2 1 0 bit reserved int_map [4C0] reset 00000000 r/w rsv r/w
programmable interrupt controller registers 12-22 lan?sc520 microcontroller register set manual register description these registers map each of the interrupt sources (except for ecc and pci host bridge interrupts, see page 12-19 and page 12-17, respectively) to their desired interrupt channel or nmi. bit definitions programming notes this register should be programmed only when the corresponding interrupt channel mask bits are set in the pic. for nmis, this register should be programmed only when bit nmi_enb is cleared in the picicr register (see page 12-4). nmi_enb can be set immediately after programming this mapping register to allow nmis to be passed to the cpu. bit name function 7 C 5 reserved reserved this bit field should be written to 0 for normal system operation. 4 C 0 int_map [4C0] interrupt mapping the value in this 5-bit field maps the interrupt source for the register to one of the following interrupt priority channels on the microcontroller or as an nmi. 00000 = disables the interrupt source as an input 00001 = priority p1 (master pic ir0) (highest priority) 00010 = priority p2 (master pic ir1) 00011 = priority p3 (slave 1 pic ir0/master pic ir2) 00100 = priority p4 (slave 1 pic ir1) 00101 = priority p5 (slave 1 pic ir2) 00110 = priority p6 (slave 1 pic ir3) 00111 = priority p7 (slave 1 pic ir4) 01000 = priority p8 (slave 1 pic ir5) 01001 = priority p9 (slave 1 pic ir6) 01010 = priority p10 (slave 1 pic ir7) 01011 = priority p11 (master pic ir3) 01100 = priority p12 (master pic ir4) 01101 = priority p13 (slave 2 pic ir0/master pic ir5) 01110 = priority p14 (slave 2 pic ir1) 01111 = priority p15 (slave 2 pic ir2) 10000 = priority p16 (slave 2 pic ir3) 10001 = priority p17 (slave 2 pic ir4) 10010 = priority p18 (slave 2 pic ir5) 10011 = priority p19 (slave 2 pic ir6) 10100 = priority p20 (slave 2 pic ir7) 10101 = priority p21 (master pic ir6) 10110 = priority p22 (master pic ir7) (lowest priority) 10111 C 11110 = disables the interrupt source as an input 11111 = nmi source for example, if int_map = 01101b, the interrupt request is mapped to interrupt priority p13 in the microcontroller. if int_map = 00000b or any binary value from 10111C11110b, the interrupt request is disabled from reaching the microcontrollers pic. if this field is set to 11111b, then the interrupt is routed to generate an nmi. if bit s2 in the mpicicw3 register is cleared (see page 12-34), the slave 1 pic is bypassed, so programming the int_map bit field to a value in the range 00100C01010b does not pass the interrupt request to the cpu. however, if this bit field is programmed to 00011b with the s2 bit cleared, the interrupt request is routed to the master pic ir2 input. if bit s5 in the mpicicw3 register is cleared (see page 12-33), the slave 2 pic is bypassed, so programming the int_map bit field to a value in the range 01110C10100b does not pass the interrupt request to the cpu. however, if this field is programmed to 01101b with the s5 bit cleared, the interrupt request is routed to master pic ir5 input.
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-23 programming more than one interrupt source to an interrupt channel results in interrupt sharing on that channel. programming more than one interrupt source as an nmi source results in nmi sharing on the cpus nmi input. all interrupt and nmi sources can be found in the following register descriptions: n software interrupt 16C1 control, page 12-10 n software interrupt 22C17/nmi control, page 12-13 n pci host bridge interrupt mapping, page 12-17 n ecc interrupt mapping, page 12-19 n other interrupt mapping registers (30), page 12-21
programmable interrupt controller registers 12-24 lan?sc520 microcontroller register set manual master pic interrupt request (mpicir) direct-mapped i/o address 0020h register description this register provides a real-time status of the interrupt request inputs to the master pic. this register latches all incoming interrupt requests and provides individual status of the requests to be acknowledged. bit definitions programming notes this register (mpicir) is accessed by first writing a value of 0ah to port 0020h followed by a read-back from port 0020h. because the slave 1 pic cascades into channel 2 of the master pic, the ir2 bit is a real-time status indication that one of the slave 1 interrupt request inputs is asserted. because the slave 2 pic cascades into channel 5 of the master pic, the ir5 bit is a real-time status indication that one of the slave 2 interrupt request inputs is asserted. 7 6 5 4 3 2 1 0 bit ir7 ir6 ir5 ir4 ir3 ir2 ir1 ir0 reset xxxxxxxx r/w rrrrrrrr bit name function 7ir7 interrupt request 7 0 = the ir7 input to the master pic is not asserted. 1 = the ir7 input is asserted. 6ir6 interrupt request 6 0 = the ir6 input to the master pic is not asserted. 1 = the ir6 input is asserted. 5ir5 interrupt request 5 0 = the ir5 input to the master pic is not asserted. 1 = the ir5 input is asserted. 4ir4 interrupt request 4 0 = the ir4 input to the master pic is not asserted. 1 = the ir4 input is asserted. 3ir3 interrupt request 3 0 = the ir3 input to the master pic is not asserted. 1 = the ir3 input is asserted. 2ir2 interrupt request 2 0 = the ir2 input to the master pic is not asserted. 1 = the ir2 input is asserted. 1ir1 interrupt request 1 0 = the ir1 input to the master pic is not asserted. 1 = the ir1 input is asserted. 0ir0 interrupt request 0 0 = the ir0 input to the master pic is not asserted. 1 = the ir0 input is asserted.
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-25 master pic in-service (mpicisr) direct-mapped i/o address 0020h register description this register indicates the master interrupt priority levels that are being serviced. bit definitions programming notes this register (mpicisr) is accessed by first writing a value of 0bh to port 0020h followed by a read-back from port 0020h. because the slave 1 pic cascades into channel 2 of the master pic, the is2 bit is asserted if any of the slave 1 interrupt request levels is asserted. because the slave 2 pic cascades into channel 5 of the master pic, the is5 bit is asserted if any of the slave 2 interrupt request levels is asserted. 7 6 5 4 3 2 1 0 bit is7is6is5is4is3is2is1is0 reset xxxxxxxx r/w rrrrrrrr bit name function 7is7 interrupt request 7 in - service 0 = interrupt request 7 is not being serviced. 1 = interrupt request 7 is being serviced. 6is6 interrupt request 6 in - service 0 = interrupt request 6 is not being serviced. 1 = interrupt request 6 is being serviced. 5is5 interrupt request 5 in - service 0 = interrupt request 5 is not being serviced. 1 = interrupt request 5 is being serviced. 4is4 interrupt request 4 in - service 0 = interrupt request 4 is not being serviced. 1 = interrupt request 4 is being serviced. 3is3 interrupt request 3 in - service 0 = interrupt request 3 is not being serviced. 1 = interrupt request 3 is being serviced. 2is2 interrupt request 2 in - service 0 = interrupt request 2 is not being serviced. 1 = interrupt request 2 is being serviced. 1is1 interrupt request 1 in - service 0 = interrupt request 1 is not being serviced. 1 = interrupt request 1 is being serviced. 0is0 interrupt request 0 in - service 0 = interrupt request 0 is not being serviced. 1 = interrupt request 0 is being serviced.
programmable interrupt controller registers 12-26 lan?sc520 microcontroller register set manual master pic initialization control word 1 (mpicicw1) direct-mapped i/o address 0020h register description this register is the first initialization register of the master controller. bit definitions 7 6 5 4 3 2 1 0 bit reserved slct_ icw1 ltim adi sngl ic4 reset xxxxx1xx r/w rsv! wwwww bit name function 7C5 reserved reserved this bit field should be written to 0 for normal system operation. this i/o address changes functions when read. see the programming notes for this register (mpicicw1) on page 12-27. 4 slct_icw1 select icw1 software must set this bit to 1 when writing this address (port 0020h) to access this register (mpicicw1). 0 = the write does not access this register (mpicicw1). instead, either the mpicocw2 register (see page 12-28) or the mpicocw3 register (see page 12-30) is written, depending on the state of bit 3. 1 = the write accesses this register (mpicicw1). subsequent writes to port 0021h access additional initialization control words. see the programming notes for this register (mpicicw1) on page 12-27. 3 ltim level - triggered interrupt mode this bit is the global interrupt mode selection for the master pic. 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection if the m_gint_mode bit in the picicr register is set (see page 12-5), the ltim bit determines the interrupt mode for the master pic channels. if the m_gint_mode bit is cleared, the master ltim bit has no meaning, and the master pic channel modes can be programmed individually via the mpicmode register (see page 12-6). 2adi address interval 0 = interrupt vectors are separated by eight locations (not valid in the lansc520 microcontroller). 1 = interrupt vectors are separated by four locations. in the lansc520 microcontroller design, this pc/at-compatible bit (adi) is internally fixed to 1. 1sngl single pic 0 = cascade mode; mpicicw3 is expected. 1 = single pic in the system; mpicicw3 is not expected. setting this bit logically removes the slave 1 and slave 2 controllers from the master pic. this routes the interrupt requests that were hooked to ir0 of the slave 1 and slave 2 controllers directly to interrupt requests ir2 and ir5 of the master pic, respectively. if this bit is set, then the internal register pointer skips mpicicw3 and points to mpicicw4 if mpicicw4 was selected to be programmed via the ic4 bit. see the programming notes for this register (mpicicw1) on page 12-27.
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-27 programming notes the pics initialization control word (mpicicwx) registers 1C4 must be programmed in sequence. writing to port 0020h with bit 4 = 1 causes the mpicicw1 register to be written and also resets the pics internal state machine and the internal mpicicwx register pointer. then mpicicwx registers 2C4 can be programmed by sequential writes to port 0021h. each time port 0021h is written to (following the write to mpicicw1), the internal register pointer points to the next mpicicwx register. mpicicw1 and mpicicw2 must always be programmed. the mpicicw3 register is skipped if the sngl bit in mpicicw1 is 1. the mpicicw4 register is skipped if the ic4 bit in mpicicw1 is 0. i/o port 0020h provides access to different master pic registers based on the data that is written. table 12-3 provides a summary of bit patterns to write for access to each register. 0ic4 initialization control word 4 software uses this bit to indicate whether it intends to explicitly program the mpicicw4 register (see page 12-35) after writing to the mpicicw3 register (see page 12-33). see the programming notes on this page for details. 0 = the mpicicw4 register is initialized internally when this register (mpicicw1) is written. the pic does not expect software to write to the mpicicw4 register after writing to the mpicicw3 register. 1 = the mpicicw4 register is not initialized by the write to this register (mpicicw1). software is expected to initialize the mpicicw4 register. table 12-3 master pic i/o port 0020h access summary bits port 0020h register written next port 0020h read returns 76543210 x x x 0 0 x x x mpicocw2 (page 12-28) 0xx01x0xmpicocw3 (page12-30) 00001010mpicocw3 mpicir (page12-24) 00001011mpicocw3 mpicisr (page12-25) 0001xxxxmpicicw1 (page12-26) bit name function
programmable interrupt controller registers 12-28 lan?sc520 microcontroller register set manual master pic operation control word 2 (mpicocw2) direct-mapped i/o address 0020h register description this register provides control for various interrupt priority and end-of-interrupt (eoi) modes. it also controls write access for this register (mpicocw2) and for the mpicocw3 and mpicicw1 registers (see page 12-30 and page 12-26). bit definitions 7 6 5 4 3 2 1 0 bit r_sl_eoi [2C0] slct_ icw1 is_ocw3 ls[2C0] reset xxxxxxxx r/w wwww bit name function 7C5 r_sl_eoi[2C0] interrupt request eoi and priority rotation controls 000 = rotate in auto eoi mode (clear) 001 = nonspecific eoi 010 = no operation 011 = specific eoi 100 = rotate in auto eoi mode (set) 101 = rotate on nonspecific eoi command 110 = set priority command 111 = rotate on specific eoi command 4 slct_icw1 select icw1 software must clear this bit to 0 when writing this address (port 0020h) to access either this register (mpicocw2) or the mpicocw3 register. 0 = the write accesses either this register (mpicocw2) or the mpicocw3 register (see page 12-30), depending on the state of bit 3. 1 = the write accesses the mpicicw1 register (see page 12-26). 3is_ocw3 access is ocw3 software must clear this bit (is_ocw3) and clear slct_icw1 when writing this address (port 0020h) to access this register (mpicocw2). 0 = the write accesses this register (mpicocw2) if the slct_icw1 bit is cleared. 1 = the write accesses the mpicocw3 register (see page 12-30) if the slct_icw1 bit is cleared. 2C0 ls[2C0] specific eoi level select interrupt level that is acted upon when the sl bit = 1 (see bits 7C5 of this register): 000 = ir0 001 = ir1 010 = ir2 011 = ir3 100 = ir4 101 = ir5 110 = ir6 111 = ir7
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-29 programming notes i/o port 0020h provides access to different master pic registers based on the data that is written. table 12-4 provides a summary of bit patterns to write for access to each register. table 12-4 master pic i/o port 0020h access summary (same as table 12-3) bits port 0020h register written next port 0020h read returns 76543210 x x x 0 0 x x x mpicocw2 (page 12-28) 0xx01x0xmpicocw3 (page12-30) 00001010mpicocw3 mpicir (page12-24) 00001011mpicocw3 mpicisr (page12-25) 0001xxxxmpicicw1 (page12-26)
programmable interrupt controller registers 12-30 lan?sc520 microcontroller register set manual master pic operation control word 3 (mpicocw3) direct-mapped i/o address 0020h register description this register controls the pics mask and poll modes. it also controls read access for the mpicir and mpicisr registers (see page 12-24 and page 12-25), and write access for this register (mpicocw3) and for the mpicocw2 and mpicicw1 registers (see page 12-28 and page 12-26). bit definitions 7 6 5 4 3 2 1 0 bit reserved esmm_smm [1C0] slct_ icw1 is_ocw3 p rr_ris[1C0] reset x1xxxxxx r/w rsv! w w w w w bit name function 7 reserved reserved this bit field should be written to 0 for normal system operation. this i/o address changes functions when read. see the programming notes for this register (mpicocw3) on page 12-31. 6C5 esmm_smm [1C0] special mask mode 00 = no operation 01 = no operation 10 = reset special mask 11 =set special mask 4 slct_icw1 initialization control word 1 select software must clear this bit to 0 when writing this address (port 0020h) to access either this register (mpicocw3) or the mpicocw2 register. 0 = the write accesses either this register (mpicocw3) or the mpicocw2 register (see page 12-28), depending on the state of bit 3. 1 = the write accesses the mpicicw1 register (see page 12-26). 3is_ocw3 access is ocw3 software must set this bit (is_ocw3) and clear slct_icw1 when writing this address (port 0020h) to access this register (mpicocw3). 0 = the write accesses the mpicocw2 register (see page 12-28) if the slct_icw1 bit is cleared. 1 = the write accesses this register (mpicocw3) if the slct_icw1 bit is cleared. 2p pic poll command a system designer can choose to use the pic in a non-interrupting mode. in this case, the interrupt controller can be polled for the status of pending interrupts. to support this pc/at- incompatible mode of operation, the pic supports a special poll command that is invoked by setting this bit. 0 = not poll command 1 = poll command 1C0 rr_ris[1C0] status register select 00 = no change from last state 01 = no change from last state 10 = next port 0020h read returns the mpicir registers contents (see page 12-24). 11 = next port 0020h read returns the mpicisr registers contents (see page 12-25).
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-31 programming notes i/o port 0020h provides access to different master pic registers based on the data that is written. table 12-5 provides a summary of bit patterns to write for access to each register. table 12-5 master pic i/o port 0020h access summary (same as table 12-3) bits port 0020h register written next port 0020h read returns 76543210 x x x 0 0 x x x mpicocw2 (page 12-28) 0xx01x0xmpicocw3 (page12-30) 00001010mpicocw3 mpicir (page12-24) 00001011mpicocw3 mpicisr (page12-25) 0001xxxxmpicicw1 (page12-26)
programmable interrupt controller registers 12-32 lan?sc520 microcontroller register set manual master pic initialization control word 2 (mpicicw2) direct-mapped i/o address 0021h register description this register is the second initialization register of the master controller. bit definitions programming notes the pics initialization control word (mpicicwx) registers 1C4 must be programmed in sequence. writing to port 0020h with bit 4 = 1 causes the mpicicw1 register to be written and also resets the pics internal state machine and the internal mpicicwx register pointer. then mpicicwx registers 2C4 can be programmed by sequential writes to port 0021h. each time port 0021h is written to (following the write to mpicicw1), the internal register pointer points to the next mpicicwx register. mpicicw1 and mpicicw2 must always be programmed. the mpicicw3 register is skipped if the sngl bit in mpicicw1 is 1. the mpicicw4 register is skipped if the ic4 bit in mpicicw1 is 0. 7 6 5 4 3 2 1 0 bit t7Ct3 a10Ca8 reset xxxxxxxx r/w ww bit name function 7C3 t7Ct3 bits 7C3 of base interrupt vector number for this pic the pic concatenates the t7Ct3 bit field value to the 3-bit pic interrupt request level (in the bit 2C0 position) to form the interrupt vector. for example, in a pc/at-compatible system, bits t7Ct3 for the master pic are programmed to 00001b so the master pic ir0 channel generates an interrupt 08h vector (pc/at irq0); and bits t7Ct3 for the slave 1 pic are programmed to 01110b so the slave 1 pic ir0 channel generates an interrupt 70h (pc/at irq8). 2C0 a10Ca8 a10Ca8 of interrupt vector this bit field should be written to 0 for normal operation. (it is always = 0 in a pc/at-compatible system.)
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-33 master pic initialization control word 3 (mpicicw3) direct-mapped i/o address 0021h register description this register is the 3rd initialization register of the master controller. bit definitions 7 6 5 4 3 2 1 0 bit s7 s6 s5 s4 s3 s2 s1 s0 reset 00x00x00 r/w wwwwwwww bit name function 7s7 channel 7 slave cascade select 0 = i/o device attached to ir7 input 1 = ir7 input used for slave cascading (not valid in the lansc520 microcontroller) in the lansc520 microcontroller, this bit is internally fixed to 0. 6s6 channel 6 slave cascade select 0 = i/o device attached to ir6 input 1 = ir6 input used for slave cascading (not valid in the lansc520 microcontroller) in the lansc520 microcontroller, this bit is internally fixed to 0. 5s5 channel 5 slave cascade select 0 = i/o device attached to ir5 input 1 = ir5 input used for slave cascading this bit allows the slave 2 controller to be logically cascaded or removed from the master pic. since the output of the slave 2 controller is hard-wired to interrupt channel 5 of the master pic, this bit can be used to make the slave 2 controller transparent to the user. if this bit is set, slave 2 controller is cascaded to the master pic. if this bit is cleared, slave 2 is logically removed from the cascade chain. the interrupt request that is hooked to ir0 of the slave 2 controller is now routed directly to interrupt channel 5 of the master pic, bypassing the slave 2 controller. this is useful where fewer than eight interrupts are needed in a system. in this case, a single eoi would need to be generated instead of two. 4s4 channel 4 slave cascade select 0 = i/o device attached to ir4 input 1 = ir4 input used for slave cascading (not valid in the lansc520 microcontroller) in the lansc520 microcontroller, this bit is internally fixed to 0.
programmable interrupt controller registers 12-34 lan?sc520 microcontroller register set manual programming notes if bits s5 and s2 of this register (mpicicw3) are cleared, both the slave controllers are logically removed from the cascade chain to the master controller and only eight interrupt request priority levels are available to the user. the pics initialization control word (mpicicwx) registers 1C4 must be programmed in sequence. writing to port 0020h with bit 4 = 1 causes the mpicicw1 register to be written and also resets the pics internal state machine and the internal mpicicwx register pointer. then mpicicwx registers 2C4 can be programmed by sequential writes to port 0021h. each time port 0021h is written to (following the write to mpicicw1), the internal register pointer points to the next mpicicwx register. mpicicw1 and mpicicw2 must always be programmed. the mpicicw3 register is skipped if the sngl bit in mpicicw1 is 1. the mpicicw4 register is skipped if the ic4 bit in mpicicw1 is 0. 3s3 channel 3 slave cascade select 0 = i/o device attached to ir3 input 1 = ir3 input used for slave cascading (not valid in the lansc520 microcontroller) in the lansc520 microcontroller, this bit is internally fixed to 0. 2s2 channel 2 slave cascade select 0 = i/o device attached to ir2 input 1 = ir2 input used for slave cascading this bit allows the slave 1 controller to be logically cascaded or removed from the master pic. since the output of the slave 1 controller is hard-wired to interrupt channel 2 of the master pic, this bit can be used to make the slave 1 controller transparent to the user. if this bit is set, slave 1 controller is cascaded to the master pic. if this bit is cleared, slave 1 is logically removed from the cascade chain. the interrupt request that is hooked to ir0 of the slave 1 controller is now routed directly to interrupt channel 2 of the master pic, bypassing the slave 1 controller. this is useful where fewer than eight interrupts are needed in a system. in this case, a single eoi would need to be generated instead of two. 1s1 channel 1 slave cascade select 0 = i/o device attached to ir1 input 1 = ir1 input used for slave cascading (not valid in the lansc520 microcontroller) in the lansc520 microcontroller, this bit is internally fixed to 0. 0s0 channel 0 slave cascade select 0 = i/o device attached to ir0 input 1 = ir0 input used for slave cascading (not valid in the lansc520 microcontroller) in the lansc520 microcontroller, this bit is internally fixed to 0. bit name function
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-35 master pic initialization control word 4 (mpicicw4) direct-mapped i/o address 0021h register description this register is the fourth initialization register of the master controller. bit definitions programming notes initialization of this register is optional unless the ic4 bit is set in the mpicicw1 register (see page 12-27). if the ic4 bit is cleared, the lansc520 microcontroller uses 01h for the value of this register (mpicicw4). the pics initialization control word (mpicicwx) registers 1C4 must be programmed in sequence. writing to port 0020h with bit 4 = 1 causes the mpicicw1 register to be written and also resets the pics internal state machine and the internal mpicicwx register pointer. then mpicicwx registers 2C4 can be programmed by sequential writes to port 0021h. each time port 0021h is written to (following the write to mpicicw1), the internal register pointer points to the next mpicicwx register. mpicicw1 and mpicicw2 must always be programmed. the mpicicw3 register is skipped if the sngl bit in mpicicw1 is 1. the mpicicw4 register is skipped if the ic4 bit in mpicicw1 is 0. note that aeoi mode is not supported by the slave 1 pic or slave 2 pic. 7 6 5 4 3 2 1 0 bit reserved sfnm buf_m/s [1C0] aeoi pm reset xxxx00x1 r/w rsv! w w w w bit name function 7C5 reserved reserved this bit field should be written to 0 for normal system operation. this bit field is write-only. 4sfnm special fully nested mode enable 0 = normal nested mode 1 = special fully nested mode 3C2 buf_m/s[1C0] buffered mode and master/slave select 00 = non-buffered mode 01 = non-buffered mode 10 = buffered mode/slave 11 = buffered mode/master in the lansc520 microcontroller design, these bits are internally fixed to 00b. 1 aeoi automatic eoi mode 0 = normal eoi: the interrupt handler must send an end of interrupt command to the pic(s). 1 = auto eoi: the eoi is automatically performed after the second interrupt acknowledge signal from the cpu. 0pm microprocessor mode 0 = 8080/8085 mode 1 = 8086 mode in the lansc520 microcontroller design, this pc/at-compatible bit is internally fixed to 1.
programmable interrupt controller registers 12-36 lan?sc520 microcontroller register set manual master pic interrupt mask (mpicintmsk) direct-mapped i/o address 0021h register description this register provides masking of individual interrupt requests for the master controller. this register is also known as operation control word 1 in other pc/at-compatible designs. bit definitions programming notes this register (mpicintmsk) cannot be accessed during a master pic initialization control sequence, which is initiated by setting the slct_icw1 bit in the mpicicw1 register (see page 12-26). when the mpicicwx register initialization sequence is not in effect, any read or write of port 0021h accesses the mpicintmsk register. 7 6 5 4 3 2 1 0 bit im7 im6 im5 im4 im3 im2 im1 im0 reset xxxxxxxx r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 7im7 ir7 mask 0 = unmask ir7 1 = mask ir7 6im6 ir6 mask 0 = unmask ir6 1 = mask ir6 5im5 ir5 mask 0 = unmask ir5 1 = mask ir5 if the s5 bit in the mpicicw3 register is set (see page 12-33), setting the im5 bit inhibits interrupt requests assigned to slave 2 controller inputs from reaching the cpu. clearing this bit allows interrupts from slave 2 controller to be propagated to the cpu. 4im4 ir4 mask 0 = unmask ir4 1 = mask ir4 3im3 ir3 mask 0 = unmask ir3 1 = mask ir3 2im2 ir2 mask 0 = unmask ir2 1 = mask ir2 if the s2 bit in the mpicicw3 register is set (see page 12-34), setting the im2 bit inhibits interrupt requests assigned to slave 1 controller inputs from reaching the cpu. clearing this bit allows interrupts from slave 1 controller to be propagated to the cpu. 1im1 ir1 mask 0 = unmask ir1 1 = mask ir1 0im0 ir0 mask 0 = unmask ir0 1 = mask ir0
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-37 slave 2 pic interrupt request (s2picir) direct-mapped i/o address 0024h register description this register provides a real-time status of the interrupt request inputs to the slave 2 pic. this register latches all incoming interrupt requests and provides individual status of the requests to be acknowledged. bit definitions programming notes this register (s2picir) is accessed by first writing a value of 0ah to port 0024h followed by a read-back from port 0024h. if the s5 bit in the mpicicw3 register is cleared (see page 12-33), then the slave 2 controller is bypassed and any interrupt requests latched in this register (s2picir) are not propagated to the cpu. 7 6 5 4 3 2 1 0 bit ir7 ir6 ir5 ir4 ir3 ir2 ir1 ir0 reset xxxxxxxx r/w rrrrrrrr bit name function 7ir7 interrupt request 7 0 = the ir7 input to the slave 2 pic is not asserted. 1 = the ir7 input is asserted. 6ir6 interrupt request 6 0 = the ir6 input to the slave 2 pic is not asserted. 1 = the ir6 input is asserted. 5ir5 interrupt request 5 0 = the ir5 input to the slave 2 pic is not asserted. 1 = the ir5 input is asserted. 4ir4 interrupt request 4 0 = the ir4 input to the slave 2 pic is not asserted. 1 = the ir4 input is asserted. 3ir3 interrupt request 3 0 = the ir3 input to the slave 2 pic is not asserted. 1 = the ir3 input is asserted. 2ir2 interrupt request 2 0 = the ir2 input to the slave 2 pic is not asserted. 1 = the ir2 input is asserted. 1ir1 interrupt request 1 0 = the ir1 input to the slave 2 pic is not asserted. 1 = the ir1 input is asserted. 0ir0 interrupt request 0 0 = the ir0 input to the slave 2 pic is not asserted. 1 = the ir0 input is asserted.
programmable interrupt controller registers 12-38 lan?sc520 microcontroller register set manual slave 2 pic in-service (s2picisr) direct-mapped i/o address 0024h register description this register indicates the slave 2 interrupt priority levels that are being serviced. bit definitions programming notes this register (s2picisr) is accessed by first writing a value of 0bh to port 0024h followed by a read-back from port 0024h. if the s5 bit in the mpicicw3 register is cleared (see page 12-33), then the slave 2 controller is bypassed and interrupt requests latched are not serviced. 7 6 5 4 3 2 1 0 bit is7is6is5is4is3is2is1is0 reset xxxxxxxx r/w rrrrrrrr bit name function 7is7 interrupt request 7 in - service 0 = interrupt request 7 is not being serviced. 1 = interrupt request 7 is being serviced. 6is6 interrupt request 6 in - service 0 = interrupt request 6 is not being serviced. 1 = interrupt request 6 is being serviced. 5is5 interrupt request 5 in - service 0 = interrupt request 5 is not being serviced. 1 = interrupt request 5 is being serviced. 4is4 interrupt request 4 in - service 0 = interrupt request 4 is not being serviced. 1 = interrupt request 4 is being serviced. 3is3 interrupt request 3 in - service 0 = interrupt request 3 is not being serviced. 1 = interrupt request 3 is being serviced. 2is2 interrupt request 2 in - service 0 = interrupt request 2 is not being serviced. 1 = interrupt request 2 is being serviced. 1is1 interrupt request 1 in - service 0 = interrupt request 1 is not being serviced. 1 = interrupt request 1 is being serviced. 0is0 interrupt request 0 in - service 0 = interrupt request 0 is not being serviced. 1 = interrupt request 0 is being serviced.
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-39 slave 2 pic initialization control word 1 (s2picicw1) direct-mapped i/o address 0024h register description this register is the first initialization register of the slave 2 controller. bit definitions 7 6 5 4 3 2 1 0 bit reserved slct_ icw1 ltim adi sngl ic4 reset xxxxx10x r/w rsv! wwwww bit name function 7C5 reserved reserved this bit field should be written to 0 for normal system operation. this i/o address changes functions when read. see the programming notes for this register (s2picicw1) on page 12-40. 4 slct_icw1 initialization control word 1 select software must set this bit to 1 when writing this address (port 0024h) to access this register (s2picicw1). 0 = the write does not access this register (s2picicw1). instead, either the s2picocw2 register (see page 12-41) or the s2picocw3 register (see page 12-43) is written, depending on the state of bit 3. 1 = the write accesses this register (s2picicw1). subsequent writes to port 0025h access additional initialization control words. see the programming notes for this register (s2picicw1) on page 12-40. 3 ltim level-triggered interrupt mode this bit is the global interrupt mode selection for the slave 2 pic. 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection if the s2_gint_mode bit in the picicr register is set (see page 12-4), the ltim bit determines the interrupt mode for the slave 2 pic channels. if the s2_gint_mode bit is cleared, the slave 2 ltim bit has no meaning, and the slave 2 pic channel modes can be programmed individually via the sl2picmode register (see page 12-9). 2adi address interval 0 = interrupt vectors are separated by eight locations. 1 = interrupt vectors are separated by four locations. in the lansc520 microcontroller design, this bit is internally fixed to 1.
programmable interrupt controller registers 12-40 lan?sc520 microcontroller register set manual programming notes the pics initialization control word (s2picicwx) registers 1C4 must be programmed in sequence. writing to port 0024h with bit 4 = 1 causes the s2picicw1 register to be written and also resets the pics internal state machine and the internal s2picicwx register pointer. then, s2picicwx registers 2C4 can be programmed by sequential writes to port 0025h. each time port 0025h is written to (following the write to s2picicw1), the internal register pointer points to the next s2picicwx register. s2picicw1 and s2picicw2 must always be programmed. also, the s2picicw3 register must always be programmed in this design because the sngl bit in s2picicw1 is internally fixed to 0. the s2picicw4 register is skipped if the ic4 bit in s2picicw1 is 0. if the s5 bit in the mpicicw3 register is cleared (see page 12-33), then the slave 2 controller is bypassed and programming this register does not affect other registers. i/o port 0024h provides access to different slave 2 pic registers based on the data that is written. table 12-6 provides a summary of bit patterns to write for access to each register. 1sngl single pic 0 = cascade mode; s2picicw3 is expected. 1 = single pic in the system; s2picicw3 is not expected (not valid in the lansc520 microcontroller). in the lansc520 microcontroller design, this bit is internally fixed to 0. because this bit is internally fixed to 0, software must always write the s2picicw3 register after writing s1picicw2. see the programming notes on this page for details. 0ic4 initialization control word 4 software uses this bit to indicate whether it intends to explicitly program the s2picicw4 register (see page 12-47) after writing to the s2picicw3 register (see page 12-46). see the programming notes on this page for details. 0 = the s2picicw4 register is initialized internally when this register (s2picicw1) is written. the pic does not expect software to write to the s2picicw4 register. 1 = the s2picicw4 register is not initialized by the write to this register (s2picicw1). software is expected to initialize the s2picicw4 register after writing to the s2picicw3 register. table 12-6 slave 2 pic i/o port 0024h access summary bits port 0024h register written next port 0024h read returns 76543210 x x x 0 0 x x x s2picocw2 (page 12-41) 0 x x 0 1 x 0 x s2picocw3 (page 12-43) 00001010s2picocw3 s2picir (page12-37) 00001011s2picocw3 s2picisr (page12-38) 0001xxxxs2picicw1 (page12-39) bit name function
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-41 slave 2 pic operation control word 2 (s2picocw2) direct-mapped i/o address 0024h register description this register provides control for various interrupt priority and end-of-interrupt (eoi) modes. it also controls write access for this register (s2picocw2) and for the s2picocw3 and s2picicw1 registers (see page 12-43 and page 12-39). bit definitions 7 6 5 4 3 2 1 0 bit r_sl_eoi [2C0] slct_ icw1 is_ocw3 ls[2C0] reset xxxxxxxx r/w wwww bit name function 7C5 r_sl_eoi[2C0] interrupt request eoi and priority rotation controls 000 = rotate in auto eoi mode (clear) 001 = nonspecific eoi 010 = no operation 011 = specific eoi 100 = rotate in auto eoi mode (set) 101 = rotate on nonspecific eoi command 110 = set priority command 111 = rotate on specific eoi command 4 slct_icw1 initialization control word 1 select software must clear this bit to 0 when writing this address (port 0024h) to access either this register (s2picocw2) or the s2picocw3 register. 0 = the write accesses either this register (s2picocw2) or the s2picocw3 register (see page 12-43), depending on the state of bit 3. 1 = the write accesses the s2picicw1 register (see page 12-39). 3is_ocw3 access is ocw3 software must clear this bit (is_ocw3) and clear slct_icw1 when writing this address (port 0024h) to access this register (s2picocw2). 0 = the write accesses this register (s2picocw2) if the slct_icw1 bit is cleared. 1 = the write accesses the s2picocw3 register (see page 12-43) if the slct_icw1 bit is cleared. 2C0 ls[2C0] specific eoi level select interrupt level that is acted upon when the sl bit = 1 (see bits 7C5 of this register): 000 = ir0 001 = ir1 010 = ir2 011 = ir3 100 = ir4 101 = ir5 110 = ir6 111 = ir7
programmable interrupt controller registers 12-42 lan?sc520 microcontroller register set manual programming notes if the s5 bit in the mpicicw3 register is cleared (see page 12-33), then the slave 2 controller is bypassed and programming this register does not affect other registers. i/o port 0024h provides access to different slave 2 pic registers based on the data that is written. table 12-7 provides a summary of bit patterns to write for access to each register. table 12-7 slave 2 pic i/o port 0024h access summary (same as table 12-6) bits port 0024h register written next port 0024h read returns 76543210 x x x 0 0 x x x s2picocw2 (page 12-41) 0 x x 0 1 x 0 x s2picocw3 (page 12-43) 00001010s2picocw3 s2picir (page12-37) 00001011s2picocw3 s2picisr (page12-38) 0001xxxxs2picicw1 (page12-39)
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-43 slave 2 pic operation control word 3 (s2picocw3) direct-mapped i/o address 0024h register description this register controls the pics mask and poll modes. it also controls read access for the s2picir and s2picisr registers (see page 12-37 and page 12-38), and write access for this register (s2picocw3) and for the s2picocw2 and s2picicw1 registers (see page 12-41 and page 12-39). bit definitions 7 6 5 4 3 2 1 0 bit reserved esmm_smm [1C0] slct_ icw1 is_ocw3 p rr_ris[1C0] reset x1xxxxxx r/w rsv! w w w w w bit name function 7 reserved reserved this bit field should be written to 0 for normal system operation. this i/o address changes functions when read. see the programming notes for this register (s2picocw3) on page 12-44. 6C5 esmm_smm [1C0] special mask mode 00 = no operation 01 = no operation 10 = reset special mask 11 =set special mask 4 slct_icw1 initialization control word 1 select software must clear this bit to 0 when writing this address (port 0024h) to access either this register (s2picocw3) or the s2picocw2 register. 0 = the write accesses either this register (s2picocw3) or the s2picocw2 register (see page 12-41), depending on the state of bit 3. 1 = the write accesses the s2picicw1 register (see page 12-39). 3is_ocw3 access is ocw3 software must set this bit (is_ocw3) and clear slct_icw1 when writing this address (port 0024h) to access this register (s2picocw3). 0 = the write accesses the s2picocw2 register (see page 12-41) if the slct_icw1 bit is cleared. 1 = the write accesses this register (s2picocw3) if the slct_icw1 bit is cleared. 2p pic poll command a system designer can choose to use the pic in a non-interrupting mode. in this case, the interrupt controller can be polled for the status of pending interrupts. to support this mode of operation, the pic supports a special poll command that is invoked by setting this bit. 0 = not poll command 1 = poll command 1C0 rr_ris[1C0] status register select 00 = no change from last state 01 = no change from last state 10 = next port 0024h read returns the s2picir registers contents (see page 12-37). 11 = next port 0024h read returns in the s2picisr registers contents (see page 12-38).
programmable interrupt controller registers 12-44 lan?sc520 microcontroller register set manual programming notes if the s5 bit in the mpicicw3 register is cleared (see page 12-33), then the slave 2 controller is bypassed and programming this register does not affect other registers. i/o port 0024h provides access to different slave 2 pic registers based on the data that is written. table 12-8 provides a summary of bit patterns to write for access to each register. table 12-8 slave 2 pic i/o port 0024h access summary (same as table 12-6) bits port 0024h register written next port 0024h read returns 76543210 x x x 0 0 x x x s2picocw2 (page 12-41) 0 x x 0 1 x 0 x s2picocw3 (page 12-43) 00001010s2picocw3 s2picir (page12-37) 00001011s2picocw3 s2picisr (page12-38) 0001xxxxs2picicw1 (page12-39)
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-45 slave 2 pic initialization control word 2 (s2picicw2) direct-mapped i/o address 0025h register description this register is the second initialization register of the slave 2 controller. bit definitions programming notes if the s5 bit in the mpicicw3 register is cleared (see page 12-33), then the slave 2 controller is bypassed and programming this register does not affect other registers. the pics initialization control word (s2picicwx) registers 1C4 must be programmed in sequence. writing to port 0024h with bit 4 = 1 causes the s2picicw1 register to be written and also resets the pics internal state machine and the internal s2picicwx register pointer. then, s2picicwx registers 2C4 can be programmed by sequential writes to port 0025h. each time port 0025h is written to (following the write to s2picicw1), the internal register pointer points to the next s2picicwx register. s2picicw1 and s2picicw2 must always be programmed. also, the s2picicw3 register must always be programmed in this design because the sngl bit in s2picicw1 is internally fixed to 0. the s2picicw4 register is skipped if the ic4 bit in s2picicw1 is 0. 7 6 5 4 3 2 1 0 bit t7Ct3 a10Ca8 reset xxxxxxxx r/w ww bit name function 7C3 t7Ct3 bits 7C3 of base interrupt vector number for this pic the pic concatenates the t7Ct3 bit field value to the 3-bit pic interrupt request level (in the bit 2C0 position) to form the interrupt vector. for example, if bits t7Ct3 are programmed to 11110b, the ir0 channel generates an interrupt f0h vector. 2C0 a10Ca8 a10Ca8 of interrupt vector software should write these to 0.
programmable interrupt controller registers 12-46 lan?sc520 microcontroller register set manual slave 2 pic initialization control word 3 (s2picicw3) direct-mapped i/o address 0025h register description this register is the third initialization register of the slave 2 controller. bit definitions programming notes the pics initialization control word (s2picicwx) registers 1C4 must be programmed in sequence. writing to port 0024h with bit 4 = 1 causes the s2picicw1 register to be written and also resets the pics internal state machine and the internal s2picicwx register pointer. then, s2picicwx registers 2C4 can be programmed by sequential writes to port 0025h. each time port 0025h is written to (following the write to s2picicw1), the internal register pointer points to the next s2picicwx register. s2picicw1 and s2picicw2 must always be programmed. also, the s2picicw3 register must always be programmed in this design because the sngl bit in s2picicw1 is internally fixed to 0. the s2picicw4 register is skipped if the ic4 bit in s2picicw1 is 0. if the s5 bit is set in the mpicicw3 register (see page 12-33), a write to this register (s2picicw3) is always expected in the lansc520 microcontroller because the sngl bit is fixed to 0 in the s2picicw1 register (page 12-40). if the s5 bit is cleared in the mpicicw3 register, then the slave 2 controller is bypassed and the value of this register (s2picicw3) has no effect. 7 6 5 4 3 2 1 0 bit reserved id2Cid0 reset xxxxx101 r/w rsv! w bit name function 7C3 reserved reserved this bit field should be written to 0 for normal system operation. this bit field is write-only. 2C0 id2Cid0 slave 2 pic id 2C0 these bits contain the binary slave 2 pic id (000bC111b) that the pic responds to on the cascade bus. in the lansc520 microcontroller, these bits are internally fixed to 101b.
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-47 slave 2 pic initialization control word 4 (s2picicw4) direct-mapped i/o address 0025h register description this register is the fourth initialization register of the slave 2 controller. bit definitions programming notes the pics initialization control word (s2picicwx) registers 1C4 must be programmed in sequence. writing to port 0024h with bit 4 = 1 causes the s2picicw1 register to be written and also resets the pics internal state machine and the internal s2picicwx register pointer. then, s2picicwx registers 2C4 can be programmed by sequential writes to port 0025h. each time port 0025h is written to (following the write to s2picicw1), the internal register pointer points to the next s2picicwx register. s2picicw1 and s2picicw2 must always be programmed. also, the s2picicw3 register must always be programmed in this design because the sngl bit in s2picicw1 is internally fixed to 0. the s2picicw4 register is skipped if the ic4 bit in s2picicw1 is 0. software is expected to initialize this register (s2picicw4) if the ic4 bit is set in the s2picicw1 register (see page 12-40). if the ic4 bit is cleared, the lansc520 microcontroller uses 01h for the value of this register (s2picicw4). however, if the s5 bit in the mpicicw3 register is cleared (see page 12-33), then the slave 2 controller is bypassed and the value of this register (s2picicw4) has no effect. 7 6 5 4 3 2 1 0 bit reserved sfnm buf_m/s [1C0] aeoi pm reset xxxx 0001 r/w rsv! w w w w bit name function 7C5 reserved reserved this bit field should be written to 0 for normal system operation. this bit field is write-only. 4sfnm special fully nested mode enable 0 = normal nested mode 1 = special fully nested mode 3C2 buf_m/s[1C0] buffered mode and master/slave select 00 = non buffered mode 01 = non buffered mode 10 = buffered mode/slave 11 = buffered mode/master in the lansc520 microcontroller, these bits are internally fixed to 00b. 1 aeoi automatic eoi mode 0 = normal eoi: the interrupt handler must send an end of interrupt command to the pic(s). 1 = auto eoi: the eoi is automatically performed after the second interrupt acknowledge signal from the cpu. in the lansc520 microcontroller, this bit is internally fixed to 0. the slave 1 pic and slave 2 pic do not support automatic eoi mode. 0pm microprocessor mode 0 = 8080/8085 mode 1 = 8086 mode in the lansc520 microcontroller design, this bit is internally fixed to 1.
programmable interrupt controller registers 12-48 lan?sc520 microcontroller register set manual slave 2 pic interrupt mask (s2picintmsk) direct-mapped i/o address 0025h register description this register provides masking of individual interrupt requests for the slave 2 controller. this register is also known as operation control word 1 in other pc/at-compatible designs. bit definitions programming notes if the s5 bit in the mpicicw3 register is cleared (see page 12-33), then the slave 2 controller is bypassed and the value of this register (s2picintmsk) has no effect. this register (s2picintmsk) cannot be accessed during a slave 2 pic initialization control sequence, which is initiated by setting the slct_icw1 bit in the s2picicw1 register (see page 12-39). when the s2picicwx register initialization sequence is not in effect, any read or write of port 0025h accesses the s2picintmsk register. 7 6 5 4 3 2 1 0 bit im7 im6 im5 im4 im3 im2 im1 im0 reset xxxxxxxx r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 7im7 ir7 mask 0 = unmask ir7 1 = mask ir7 6im6 ir6 mask 0 = unmask ir6 1 = mask ir6 5im5 ir5 mask 0 = unmask ir5 1 = mask ir5 4im4 ir4 mask 0 = unmask ir4 1 = mask ir4 3im3 ir3 mask 0 = unmask ir3 1 = mask ir3 2im2 ir2 mask 0 = unmask ir2 1 = mask ir2 1im1 ir1 mask 0 = unmask ir1 1 = mask ir1 0im0 ir0 mask 0 = unmask ir0 1 = mask ir0
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-49 slave 1 pic interrupt request (s1picir) direct-mapped i/o address 00a0h register description this register provides a real-time status of the interrupt request inputs to the slave 1 pic. this register latches all incoming interrupt requests and provides individual status of the requests to be acknowledged. bit definitions programming notes this register (s1picir) is accessed by first writing a value of 0ah to port 00a0h followed by a read-back from port 00a0h. if the s2 bit in the mpicicw3 register is cleared (see page 12-34), then the slave 1 controller is bypassed and any interrupt requests latched in this register (s1picir) are not propagated to the cpu. 7 6 5 4 3 2 1 0 bit ir7 ir6 ir5 ir4 ir3 ir2 ir1 ir0 reset xxxxxxxx r/w rrrrrrrr bit name function 7ir7 interrupt request 7 0 = the ir7 input to the slave 1 pic is not asserted. 1 = the ir7 input is asserted. 6ir6 interrupt request 6 0 = the ir6 input to the slave 1 pic is not asserted. 1 = the ir6 input is asserted. 5ir5 interrupt request 5 0 = the ir5 input to the slave 1 pic is not asserted. 1 = the ir5 input is asserted. 4ir4 interrupt request 4 0 = the ir4 input to the slave 1 pic is not asserted. 1 = the ir4 input is asserted. 3ir3 interrupt request 3 0 = the ir3 input to the slave 1 pic is not asserted. 1 = the ir3 input is asserted. 2ir2 interrupt request 2 0 = the ir2 input to the slave 1 pic is not asserted. 1 = the ir2 input is asserted. 1ir1 interrupt request 1 0 = the ir1 input to the slave 1 pic is not asserted. 1 = the ir1 input is asserted. 0ir0 interrupt request 0 0 = the ir0 input to the slave 1 pic is not asserted. 1 = the ir0 input is asserted.
programmable interrupt controller registers 12-50 lan?sc520 microcontroller register set manual slave 1 pic in-service (s1picisr) direct-mapped i/o address 00a0h register description this register indicates the slave 1 interrupt priority levels that are being serviced. bit definitions programming notes this register (s1picisr) is accessed by writing a value of 0bh to port 00a0h followed by a read back from port 00a0h. if the s2 bit in the mpicicw3 register is cleared (see page 12-34), then the slave 1 controller is bypassed and interrupt requests latched are not serviced. 7 6 5 4 3 2 1 0 bit is7is6is5is4is3is2is1is0 reset xxxxxxxx r/w rrrrrrrr bit name function 7is7 interrupt request 7 in - service 0 = interrupt request 7 is not being serviced. 1 = interrupt request 7 is being serviced. 6is6 interrupt request 6 in - service 0 = interrupt request 6 is not being serviced. 1 = interrupt request 6 is being serviced. 5is5 interrupt request 5 in - service 0 = interrupt request 5 is not being serviced. 1 = interrupt request 5 is being serviced. 4is4 interrupt request 4 in - service 0 = interrupt request 4 is not being serviced. 1 = interrupt request 4 is being serviced. 3is3 interrupt request 3 in - service 0 = interrupt request 3 is not being serviced. 1 = interrupt request 3 is being serviced. 2is2 interrupt request 2 in - service 0 = interrupt request 2 is not being serviced. 1 = interrupt request 2 is being serviced. 1is1 interrupt request 1 in - service 0 = interrupt request 1 is not being serviced. 1 = interrupt request 1 is being serviced. 0is0 interrupt request 0 in - service 0 = interrupt request 0 is not being serviced. 1 = interrupt request 0 is being serviced.
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-51 slave 1 pic initialization control word 1 (s1picicw1) direct-mapped i/o address 00a0h register description this register is the first initialization register of the slave 1 controller. bit definitions 7 6 5 4 3 2 1 0 bit reserved slct_ icw1 ltim adi sngl ic4 reset xxxxx10x r/w rsv! wwwww bit name function 7C5 reserved reserved this bit field should be written to 0 for normal system operation. this i/o address changes functions when read. see the programming notes for this register (s1picicw1) on page 12-52. 4 slct_icw1 initialization control word 1 select software must set this bit to 1 when writing this address (port 00a0h) to access this register (s1picicw1). 0 = the write does not access this register (s1picicw1). instead, either the s1picocw2 register (see page 12-53) or the s1picocw3 register (see page 12-55) is written, depending on the state of bit 3. 1 = the write accesses this register (s1picicw1). subsequent writes to port 00a1h access additional initialization control words. see the programming notes for this register (s1picicw1) on page 12-52. 3 ltim level-triggered interrupt mode this bit is the global interrupt mode selection for the slave 1 pic. 0 = edge-sensitive interrupt request detection 1 = level-sensitive interrupt request detection if the s1_gint_mode bit in the picicr register is set (see page 12-5), the ltim bit determines the interrupt mode for the slave 1 pic channels. if the s1_gint_mode bit is cleared, the slave 1 ltim bit has no meaning, and the slave 1 pic channel modes can be programmed individually via the sl1picmode register (see page 12-8). 2adi address interval 0 = interrupt vectors are separated by eight locations. 1 = interrupt vectors are separated by four locations. in the lansc520 microcontroller design, this pc/at-compatible bit is internally fixed to 1.
programmable interrupt controller registers 12-52 lan?sc520 microcontroller register set manual programming notes the pics initialization control word (s1picicwx) registers 1C4 must be programmed in sequence. writing to port 00a0h with bit 4 = 1 causes the s1picicw1 register to be written and also resets the pics internal state machine and the internal s1picicwx register pointer. then, s1picicwx registers 2C4 can be programmed by sequential writes to port 00a1h. each time port 00a1h is written to (following the write to s1picicw1), the internal register pointer points to the next s1picicwx register. s1picicw1 and s1picicw2 must always be programmed. also, the s1picicw3 register must always be programmed in this design because the sngl bit in s1picicw1 is internally fixed to 0. the s1picicw4 register is skipped if the ic4 bit in s1picicw1 is 0. if the s2 bit in the mpicicw3 register is cleared (see page 12-34), then the slave 1 controller is bypassed and programming this register does not affect other registers. i/o port 00a0h provides access to different slave 1 pic registers based on the data that is written. table 12-9 provides a summary of bit patterns to write for access to each register. 1sngl single pic 0 = cascade mode; s1picicw3 is expected. 1 = single pic in the system; s1picicw3 is not expected (not valid in the lansc520 microcontroller). in the lansc520 microcontroller design, this bit is internally fixed to 0. because this bit is internally fixed to 0, software must always write the s1picicw3 register after writing s1picicw2. see the programming notes on this page for details. 0ic4 initialization control word 4 software uses this bit to indicate whether it intends to explicitly program the s1picicw4 register (see page 12-59) after writing to the s1picicw3 register (see page 12-58). see the programming notes on this page for details. 0 = the s1picicw4 register is initialized internally when this register (s1picicw1) is written. the pic does not expect software to write to the s1picicw4 register. 1 = the s1picicw4 register is not initialized by the write to this register (s1picicw1). software is expected to initialize the s1picicw4 register after writing to the s1picicw3 register. table 12-9 slave 1 pic i/o port 00a0h access summary bits port 00a0h register written next port 00a0h read returns 76543210 x x x 0 0 x x x s1picocw2 (page 12-53) 0 x x 0 1 x 0 x s1picocw3 (page 12-55) 00001010s1picocw3 s1picir (page12-49) 00001011s1picocw3 s1picisr (page12-50) 0001xxxxs1picicw1 (page12-51) bit name function
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-53 slave 1 pic operation control word 2 (s1picocw2) direct-mapped i/o address 00a0h register description this register provides control for various interrupt priority and end-of-interrupt (eoi) modes. it also controls write access for this register (s1picocw2) and for the s1picocw3 and s1picicw1 registers (see page 12-55 and page 12-51). bit definitions 7 6 5 4 3 2 1 0 bit r_sl_eoi [1C0] slct_ icw1 is_ocw3 ls[2C0] reset xxxxxxxx r/w wwww bit name function 7C5 r_sl_eoi[1C0] interrupt request eoi and priority rotation controls 000 = rotate in auto eoi mode (clear) 001 = nonspecific eoi 010 = no operation 011 = specific eoi 100 = rotate in auto eoi mode (set) 101 = rotate on nonspecific eoi command 110 = set priority command 111 = rotate on specific eoi command 4 slct_icw1 initialization control word 1 select software must clear this bit to 0 when writing this address (port 00a0h) to access either this register (s1picocw2) or the s1picocw3 register. 0 = the write accesses either this register (s1picocw2) or the s1picocw3 register (see page 12-55), depending on the state of bit 3. 1 = the write accesses the s1picicw1 register (see page 12-51). 3is_ocw3 access is ocw3 software must clear this bit (is_ocw3) and clear slct_icw1 when writing this address (port 00a0h) to access this register (s1picocw2). 0 = the write accesses this register (s1picocw2) if the slct_icw1 bit is cleared. 1 = the write accesses the s1picocw3 register (see page 12-55) if the slct_icw1 bit is cleared.
programmable interrupt controller registers 12-54 lan?sc520 microcontroller register set manual programming notes if the s2 bit in the mpicicw3 register is cleared (see page 12-34), then the slave 1 controller is bypassed and programming this register does not affect other registers. i/o port 00a0h provides access to different slave 1 pic registers based on the data that is written. table 12-10 provides a summary of bit patterns to write for access to each register. 2C0 ls[2C0] specific eoi level select interrupt level that is acted upon when the sl bit = 1 (see bits 7C5] below: 000 = ir0 001 = ir1 010 = ir2 011 = ir3 100 = ir4 101 = ir5 110 = ir6 111 = ir7 table 12-10 slave 1 pic i/o port 00a0h access summary (same as table 12-9) bits port 00a0h register written next port 00a0h read returns 76543210 x x x 0 0 x x x s1picocw2 (page 12-53) 0 x x 0 1 x 0 x s1picocw3 (page 12-55) 00001010s1picocw3 s1picir (page12-49) 00001011s1picocw3 s1picisr (page12-50) 0001xxxxs1picicw1 (page12-51) bit name function
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-55 slave 1 pic operation control word 3 (s1picocw3) direct-mapped i/o address 00a0h register description this register controls the pics mask and poll modes. it also controls read access for the s1picir and s1picisr registers (see page 12-49 and page 12-50), and write access for this register (s1picocw3) and for the s1picocw2 and s1picicw1 registers (see page 12-53 and page 12-51). bit definitions 7 6 5 4 3 2 1 0 bit reserved esmm_smm [1C0] slct_ icw1 is_ocw3 p rr_ris[1C0] reset x1xxxxxx r/w rsv! w w w w w bit name function 7 reserved reserved this bit field should be written to 0 for normal system operation. this i/o address changes functions when read. see the programming notes for this register (s1picicw1) on page 12-56. 6C5 esmm_smm [1C0] special mask mode 00 = no operation 01 = no operation 10 = reset special mask 11 =set special mask 4 slct_icw1 initialization control word 1 select software must clear this bit to 0 when writing this address (port 00a0h) to access either this register (s1picocw3) or the s1picocw2 register. 0 = the write accesses either this register (s1picocw3) or the s1picocw2 register (see page 12-53), depending on the state of bit 3. 1 = the write accesses the s1picicw1 register (see page 12-51). 3is_ocw3 access is ocw3 software must set this bit (is_ocw3) and clear slct_icw1 when writing this address (port 00a0h) to access this register (s1picocw3). 0 = the write accesses the s1picocw2 register (see page 12-53) if the slct_icw1 bit is cleared. 1 = the write accesses this register (s1picocw3) if the slct_icw1 bit is cleared. 2p pic poll command a system designer can choose to use the pic in a non-interrupting mode. in this case, the interrupt controller can be polled for the status of pending interrupts. to support this pc/at- incompatible mode of operation, the pic supports a special poll command that is invoked by setting this bit. 0 = not poll command 1 = poll command 1C0 rr_ris[1C0] status register select 00 = no change from last state 01 = no change from last state 10 = next port 00a0h read returns the s1picir registers contents (see page 12-49). 11 = next port 00a0h read returns the s1picisr registers contents (see page 12-50).
programmable interrupt controller registers 12-56 lan?sc520 microcontroller register set manual programming notes if the s2 bit in the mpicicw3 register is cleared (see page 12-34), then the slave 1 controller is bypassed and programming this register does not affect other registers. i/o port 00a0h provides access to different slave 1 pic registers based on the data that is written. table 12-11 provides a summary of bit patterns to write for access to each register. table 12-11 slave 1 pic i/o port 00a0h access summary (same as table 12-9) bits port 00a0h register written next port 00a0h read returns 76543210 x x x 0 0 x x x s1picocw2 (page 12-53) 0 x x 0 1 x 0 x s1picocw3 (page 12-55) 00001010s1picocw3 s1picir (page12-49) 00001011s1picocw3 s1picisr (page12-50) 0001xxxxs1picicw1 (page12-51)
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-57 slave 1 pic initialization control word 2 (s1picicw2) direct-mapped i/o address 00a1h register description this register is the second initialization register of the slave 1 controller. bit definitions programming notes if the s2 bit in the mpicicw3 register is cleared (see page 12-34), then the slave 1 controller is bypassed and programming this register does not affect other registers. the pics initialization control word (s1picicwx) registers 1C4 must be programmed in sequence. writing to port 00a0h with bit 4 = 1 causes the s1picicw1 register to be written and also resets the pics internal state machine and the internal s1picicwx register pointer. then, s1picicwx registers 2C4 can be programmed by sequential writes to port 00a1h. each time port 00a1h is written to (following the write to s1picicw1), the internal register pointer points to the next s1picicwx register. s1picicw1 and s1picicw2 must always be programmed. also, the s1picicw3 register must always be programmed in this design because the sngl bit in s1picicw1 is internally fixed to 0. the s1picicw4 register is skipped if the ic4 bit in s1picicw1 is 0. 7 6 5 4 3 2 1 0 bit t7Ct3 a10Ca8 reset xxxxxxxx r/w ww bit name function 7C3 t7Ct3 bits 7C3 of base interrupt vector number for this pic the pic concatenates the t7Ct3 bit field value to the 3-bit pic interrupt request level (in the bit 2C0 position) to form the interrupt vector. for example, in a pc/at-compatible system, bits t7Ct3 for the master pic are programmed to 00001b so the master pic ir0 channel generates an interrupt 08h vector (pc/at irq0); and bits t7Ct3 for the slave 1 pic are programmed to 01110b so the slave 1 pic ir0 channel generates an interrupt 70h (pc/at irq8). 2C0 a10Ca8 a10Ca8 of interrupt vector this bit field should always be written to 0 for normal operation. (it is always 0 in a pc/at-compatible system.)
programmable interrupt controller registers 12-58 lan?sc520 microcontroller register set manual slave 1 pic initialization control word 3 (s1picicw3) direct-mapped i/o address 00a1h register description this register is the third initialization register of the slave 1 controller. bit definitions programming notes the pics initialization control word (s1picicwx) registers 1C4 must be programmed in sequence. writing to port 00a0h with bit 4 = 1 causes the s1picicw1 register to be written and also resets the pics internal state machine and the internal s1picicwx register pointer. then, s1picicwx registers 2C4 can be programmed by sequential writes to port 00a1h. each time port 00a1h is written to (following the write to s1picicw1), the internal register pointer points to the next s1picicwx register. s1picicw1 and s1picicw2 must always be programmed. also, the s1picicw3 register must always be programmed in this design because the sngl bit in s1picicw1 is internally fixed to 0. the s1picicw4 register is skipped if the ic4 bit in s1picicw1 is 0. if the s2 bit in the mpicicw3 register is cleared (see page 12-34), a write to this register (s1picicw3) is always expected in the lansc520 microcontroller because the sngl bit is fixed to 0 in the s1picicw1 register (page 12-52). if the s2 bit in the mpicicw3 register is cleared, then the slave 1 controller is bypassed and the value of this register (s1picicw3) has no effect. 7 6 5 4 3 2 1 0 bit reserved id2Cid0 reset xxxxx010 r/w rsv! w bit name function 7C3 reserved reserved this bit field should be written to 0 for normal system operation. this bit field is write-only. 2C0 id2Cid0 slave 1 pic id 2C0 these bits contain the binary slave 1pic id (000bC111b) that the pic responds to on the cascade bus. in the lansc520 microcontroller design, these bits are internally fixed to 010b.
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-59 slave 1 pic initialization control word 4 (s1picicw4) direct-mapped i/o address 00a1h register description this register is the fourth initialization register of the slave 1 controller. bit definitions programming notes the pics initialization control word (s1picicwx) registers 1C4 must be programmed in sequence. writing to port 00a0h with bit 4 = 1 causes the s1picicw1 register to be written and also resets the pics internal state machine and the internal s1picicwx register pointer. then, s1picicwx registers 2C4 can be programmed by sequential writes to port 00a1h. each time port 00a1h is written (following the write to s1picicw1), the internal register pointer points to the next s1picicwx register. s1picicw1 and s1picicw2 must always be programmed. also, the s1picicw3 register must always be programmed in this design because the sngl bit in s1picicw1 is internally fixed to 0. the s1picicw4 register is skipped if the ic4 bit in s1picicw1 is 0. software is expected to initialize this register (s1picicw4) if the ic4 bit is set in the s1picicw1 register (see page 12-52). if the ic4 bit is cleared, the lansc520 microcontroller uses 01h for the value of this register (s1picicw4). however, if the s2 bit is cleared in the mpicicw3 register (see page 12-34), then the slave 1 controller is bypassed and programming this register (s1picicw4) does not affect other registers. 7 6 5 4 3 2 1 0 bit reserved sfnm buf_m/s [1C0] aeoi pm reset xxxx 0001 r/w rsv! w w w w bit name function 7C5 reserved reserved this bit field should be written to 0 for normal system operation. this bit field is write-only. 4sfnm special fully nested mode enable 0 = normal nested mode 1 = special fully nested mode for pc/at compatibility, this bit should be programmed as 0. 3C2 buf_m/s[1C0] buffered mode and master/slave select 00 = non buffered mode 01 = non buffered mode 10 = buffered mode/slave 11 = buffered mode/master in the lansc520 microcontroller, these pc/at-compatible bits are internally fixed to 00b. 1 aeoi automatic eoi mode 0 = normal eoi: the interrupt handler must send an end of interrupt command to the pic(s). 1 = auto eoi: the eoi is automatically performed after the second interrupt acknowledge signal from the cpu. in the lansc520 microcontroller, this bit is internally fixed to 0. the slave 1 pic and slave 2 pic do not support automatic eoi mode. 0pm microprocessor mode 0 = 8080/8085 mode 1 = 8086 mode in the lansc520 microcontroller design, this pc/at-compatible bit is internally fixed to 1.
programmable interrupt controller registers 12-60 lan?sc520 microcontroller register set manual slave 1 pic interrupt mask (s1picintmsk) direct-mapped i/o address 00a1h register description this register provides masking of individual interrupt requests for the slave 1 controller. this register is also known as operation control word 1 in other pc/at-compatible designs. bit definitions programming notes if the s2 bit in the mpicicw3 register is cleared (see page 12-34), then the slave 1 controller is bypassed and the value of this register (s1picintmsk) has no effect. this register (s1picintmsk) cannot be accessed during a slave 1 pic initialization control sequence, which is initiated by setting the slct_icw1 bit in the s1picicw1 register (see page 12-51). when the s1picicwx register initialization sequence is not in effect, any read or write of port 00a1h accesses the s1picintmsk register. 7 6 5 4 3 2 1 0 bit im7 im6 im5 im4 im3 im2 im1 im0 reset xxxxxxxx r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 7im7 ir7 mask 0 = unmask ir7 1 = mask ir7 6im6 ir6 mask 0 = unmask ir6 1 = mask ir6 5im5 ir5 mask 0 = unmask ir5 1 = mask ir5 4im4 ir4 mask 0 = unmask ir4 1 = mask ir4 3im3 ir3 mask 0 = unmask ir3 1 = mask ir3 2im2 ir2 mask 0 = unmask ir2 1 = mask ir2 1im1 ir1 mask 0 = unmask ir1 1 = mask ir1 0im0 ir0 mask 0 = unmask ir0 1 = mask ir0
programmable interrupt controller registers lan?sc520 microcontroller register set manual 12-61 floating point error interrupt clear (fpuerrclr) direct-mapped i/o address 00f0h register description this register is used to clear the am5 x 86 cpu floating point unit (fpu) error interrupt request for dos-compatible error handling. bit definitions programming notes 7 6 5 4 3 2 1 0 bit fpuerr_rst reset 00000000 r/w w bit name function 7 C 0 fpuerr_rst clear fpu error interrupt request any write to this register address clears the interrupt request that is generated by an am5 x 86 cpu floating point unit error. (the cpu asserts the ferr signal internally.) at the conclusion of the write to this register, the cpus ignne signal is asserted internally to allow non-control instructions to be executed. this function is provided for systems that require dos- compatible fpu error handling.
programmable interrupt controller registers 12-62 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 13-1 chapter 13 programmable interval timer registers 13.1 overview this chapter describes the programmable interval timer (pit) registers of the lansc520 microcontroller. there are three pit channels. the pit module is one of four lansc520 microcontroller timer modules. the other timer modules are described in the following chapters: n chapter 15, software timer registers n chapter 14, general-purpose timer registers n chapter 16, watchdog timer registers the pit register set consists of 10 direct-mapped i/o registers used to configure, control, and read status for the three pit channels. it also includes the system control port b (sysctlb), which provides certain pit-related functions. see the lan?sc520 microcontroller users manual , order #22004, for details about the pit channels. table 13-1 lists the pit registers in offset order, with the corresponding descriptions page number. 13.2 registers table 13-1 programmable interval timer direct-mapped registers register name mnemonic i/o address page number pit channel 0 count pit0cnt 0040h page 13-2 pit channel 1 count pit1cnt 0041h page 13-3 pit channel 2 count pit2cnt 0042h page 13-4 pit 0 status pit0sta 0040 h page 13-5 pit 1 status pit1sta 0041h page 13-5 pit 2 status pit2sta 0042h page 13-5 pit mode control pitmodectl 0043h page 13-7 pit counter latch command pitcntlat 0043h page 13-10 pit read-back command pitrdback 0043h page 13-11 system control port b sysctlb 0061h page 13-13
programmable interval timer registers 13-2 lan?sc520 microcontroller register set manual pit channel 0 count (pit0cnt) direct-mapped i/o address 0040h register description this register stores the current count values for pit channel 0. bit definitions programming notes if a read - back command is issued by writing the pitrdback register with the lstat bit clear and the cnt0 bit set (see page 13-11), the subsequent read to this address (port 0040h) returns the pit0sta register status byte (see page 13-5). if a read - back command is issued in which pitrdback register bits lstat and lcnt are clear and bit cnt0 is set, the first subsequent read from this address (port 0040h) returns the status byte, and the following one or two reads return latched count data as defined by the ctr_rw_latch bit field of the pitmodectl register (see page 13-7). this counter can be configured for either binary-coded decimal (bcd) or 16 - bit binary operation via the pitmodectl registers bcd bit (see page 13-8). the counter range is 0Cffffh in binary mode or 0C9999d in bcd. however, the maximum value in either mode can be achieved by clearing this register (pit0cnt) to 0. all three pit counters run at the same rate. if the clk_pin_dir bit is 0 in the clksel register (see page 20-9), the clktimer input signal drives the pit counters. otherwise the pit counters run at 1.1892 mhz. 7 6 5 4 3 2 1 0 bit ch0_cnt[15 C 0] reset 00000000 r/w r/w bit name function 7C0 ch0_cnt[15 C 0] 16-bit counter for programmable interval timer, channel 0 this bit field provides read or write access to either the counter high byte only, low byte only, or low byte followed by high byte, as defined by the ctr_rw_latch bit field of the pitmodectl register (see page 13-7). either a latched or unlatched (free-running) count value can be read from this bit field (ch0_cnt). a latched count can be read immediately after a counter latch command is issued via the pitcntlat register (see page 13-10). after the one or two bytes of latched count data are read, subsequent reads return the unlatched count. a latched count can also be read immediately following a read-back command, issued via the pitrdback register, in which the lcnt bit is 0 and the cnt0 bit is 1 (see page 13-11). in this case also, after the one or two bytes of latched count are read, subsequent reads return the unlatched count.
programmable interval timer registers lan?sc520 microcontroller register set manual 13-3 pit channel 1 count (pit1cnt) direct-mapped i/o address 0041h register description this register stores the current count values for pit channel 1. bit definitions programming notes if a read - back command is issued by writing the pitrdback register with the lstat bit clear and the cnt1 bit set (see page 13-11), the subsequent read to this address (port 0041h) returns the pit1sta register status byte (see page 13-5). if a read - back command is issued in which pitrdback register bits lstat and lcnt are clear and bit cnt1 is set, the first subsequent read from this address (port 0041h) returns the status byte, and the following one or two reads return latched count data as defined by the ctr_rw_latch bit field of the pitmodectl register (see page 13-7). this counter can be configured for either binary-coded decimal (bcd) or 16 - bit binary operation via the pitmodectl registers bcd bit (see page 13-8). the counter range is 0Cffffh in binary mode or 0C9999d in bcd. however, the maximum value in either mode can be achieved by clearing this register (pit1cnt) to 0. all three pit counters run at the same rate. if the clk_pin_dir bit is 0 in the clksel register (see page 20-9), the clktimer input signal drives the pit counters. otherwise the pit counters run at 1.1892 mhz. 7 6 5 4 3 2 1 0 bit ch1_cnt[15 C 0] reset 00000000 r/w r/w bit name function 7C0 ch1_cnt[15 C 0] 16 - bit counter for programmable interval timer, channel 1 this bit field provides read or write access to either the counter high byte only, low byte only, or low byte followed by high byte, as defined by the ctr_rw_latch bit field of the pitmodectl register (see page 13-7). either a latched or unlatched (free-running) count value can be read from this bit field (ch1_cnt). a latched count can be read immediately after a counter latch command is issued via the pitcntlat register (see page 13-10). after the one or two bytes of latched count data are read, subsequent reads return the unlatched count. a latched count can also be read immediately following a read-back command, issued via the pitrdback register, in which the lcnt bit is 0 and the cnt1 bit is 1 (see page 13-11). in this case also, after the one or two bytes of latched count are read, subsequent reads return the unlatched count.
programmable interval timer registers 13-4 lan?sc520 microcontroller register set manual pit channel 2 count (pit2cnt) direct-mapped i/o address 0042h register description this register stores the current count values for pit channel 2. bit definitions programming notes if a read - back command is issued by writing the pitrdback register with the lstat bit clear and the cnt2 bit set (see page 13-11), the subsequent read to this address (port 0042h) returns the pit2sta register status byte (see page 13-5). if a read - back command is issued in which pitrdback register bits lstat and lcnt are clear and bit cnt2 is set, the first subsequent read from this address (port 0042h) returns the status byte, and the following one or two reads return latched count data as defined by the ctr_rw_latch bit field of the pitmodectl register (see page 13-7). this counter can be configured for either binary-coded decimal (bcd) or 16 - bit binary operation via the pitmodectl registers bcd bit (see page 13-8). the counter range is 0Cffffh in binary mode or 0C9999d in bcd. however, the maximum value in either mode can be achieved by clearing this register (pit2cnt) to 0. all three pit counters run at the same rate. if the clk_pin_dir bit is 0 in the clksel register (see page 20-9), the clktimer input signal drives the pit counters. otherwise the pit counters run at 1.1892 mhz. 7 6 5 4 3 2 1 0 bit ch2_cnt[15 C 0] reset 00000000 r/w r/w bit name function 7C0 ch2_cnt[15 C 0] 16 - bit counter for programmable interval timer, channel 2 this bit field provides read or write access to either the counter high byte only, low byte only, or low byte followed by high byte, as defined by the ctr_rw_latch bit field of the pitmodectl register (see page 13-7). either a latched or unlatched (free-running) count value can be read from this bit field (ch2_cnt). a latched count can be read immediately after a counter latch command is issued via the pitcntlat register (see page 13-10). after the one or two bytes of latched count data are read, subsequent reads return the unlatched count. a latched count can also be read immediately following a read-back command, issued via the pitrdback register, in which the lcnt bit is 0 and the cnt2 bit is 1 (see page 13-11). in this case also, after the one or two bytes of latched count are read, subsequent reads return the unlatched count.
programmable interval timer registers lan?sc520 microcontroller register set manual 13-5 direct-mapped pit 0 status (pit0sta) i/o address 0040h pit 1 status (pit1sta) i/o address 0041h pit 2 status (pit2sta) i/o address 0042h register description these registers contain the programmed mode and the null count value for each timer channel. bit definitions 7 6 5 4 3 2 1 0 bit output null_cnt rw[1C0] ctr_mode_sta[2C0] bcd reset 00000000 r/w rr r r r bit name function 7 output output state output signal state for the timer channel. each timer channel has an output that is driven high or low based on the current mode. see the ctr_mode_sta bit description on page 13-6 for a list of modes. 0 = output is low. 1 = output is high. the three pit outputs can be mapped individually to the microcontrollers internal programmable interrupt controller inputs. in addition, the pit channel 2 output can be enabled to drive the pitout2 pin. see the pit_out2_enb bit description on page 13-13. 6 null_cnt null count when programming a new count value into one of the timers, the new value does not take effect until it has actually been transferred to the counting element, which can take some time. when attempting to read back a count value, software can test this bit to determine whether the read-back value is valid or not. 0 = counter is available for reading. 1 = null count; read-back of the counter is invalid. 5C4 rw[1C0] counter read/write operation control or counter latch command reflects the last bit setting that was programmed into the corresponding bits (5C4) of the pitmodectl or pitcntlat register for this pit channel (see page 13-7 and page 13-10). 00 = counter latch command (pitcntlat register). 01 = read/write counter bits 7C0 only (pitmodectl register). 10 = read/write counter bits 15C8 only (pitmodectl register). 11 = read/write counter bits 7C0 followed immediately by bits 15C8 (pitmodectl register).
programmable interval timer registers 13-6 lan?sc520 microcontroller register set manual programming notes the pitxsta register is available only after a read - back command is issued by writing the pitrdback register with the lstat bit clear and the appropriate cntx bit set (see page 13-11). 3C1 ctr_mode_sta [2C0] counter mode status reflects the last counter mode setting for counters 0, 1, or 2 that was programmed into this channel via the ctr_mode bit field of the pitmodectl register (see page 13-8). gate = high unless noted 000 = mode 0: interrupt on terminal count 001 = mode 1: hardware retriggerable one-shot 010 = mode 2: rate generator 011 = mode 3: square wave generator 100 = mode 4: software retriggerable strobe 101 = mode 5: hardware retriggerable strobe 110 = alias for mode 2 111 = alias for mode 3 see table 13-2 on page 13-9 for more detail on counter modes. 0bcd binary coded decimal select status reflects the last bcd setting for counters 0, 1, or 2 that was programmed into this channel via the bcd bit field of the pitmodectl register (see page 13-8). 0 = 16-bit binary counter with a range of 0Cffffh 1 = bcd counter with a range of 0C9999d bit name function
programmable interval timer registers lan?sc520 microcontroller register set manual 13-7 pit mode control (pitmodectl) direct-mapped i/o address 0043h register description this register stores the control word used to define the operation of the channels, including mode. bit definitions 7 6 5 4 3 2 1 0 bit ctr_sel[1C0] ctr_rw_latch[1C0] ctr_mode[2C0] bcd reset 00000000 r/w ww ww bit name function 7C6 ctr_sel[1C0] pit counter select when this address (port 0043h) is written with bits 7C6 ? 11b and bits 5C4 ? 00b, the pitmodectl register is addressed, and this ctr_sel bit field specifies which of the three pit channels is affected by the settings written to bits 5C0. 00 = select pit counter 0. 01 = select pit counter 1. 10 = select pit counter 2. 11 = the pitrdback register is addressed (see page 13-11). when this address (port 0043h) is written with bits 7C6 = 11b, this address is redefined (for the duration of the current i/o write) as the pitrdback register (see page 13-11). when this address (port 0043h) is written with bits 7C6 ? 11b, and bits 5C4 = 00b, this address is redefined (for the duration of the current i/o write) as the pitcntlat register (see page 13-10). 5C4 ctr_rw_latch [1C0] counter read/write operation control when this address (port 0043h) is written with bits 7C6 ? 11b and bits 5C4 ? 00b, the pitmodectl register is addressed, and these ctr_rw_latch bits define what can be written to the pitxcnt register, where x is selected by bits 7C6 of this pitmodectl register. 00 = the pitcntlat register is addressed (see page 13-10). 01 = read/write counter bits 7C0 only. 10 = read/write counter bits 15C8 only. 11 = read/write counter bits 7C0 followed immediately by bits 15C8. see the pitxcnt register descriptions starting on page 13-2. note that if a given pit counter (as specified by the ctr_sel bit field) is programmed for only eight bit accesses (i.e., this ctr_rw_latch bit field is 01b or 10b), a subsequent write to the count register automatically clears the eight bits of the associated internal 16-bit counting element that were not explicitly written to.
programmable interval timer registers 13-8 lan?sc520 microcontroller register set manual programming notes writing to this register (pitmodectl) to change the mode for a particular counter resets the control logic and the associated output. reads of this register return an undefined value. when a counters current value is required, software should obtain it by issuing a counter latch or read-back command via the pitcntlat or pitrdback register (see page 13-10 or page 13-11). a counter latch or read-back command does not stop a counter from running, but rather takes a snapshot of the current value. once the count has been latched, further latch commands are ignored until all latched count data is read back from the associated count register. a read-back command is a higher priority command than the counter latch command. the counter latch command is a subset of the read-back command because only one channel can have its counter latched per counter latch command. the programmable interval timer does not provide any way to read back the original count programmed into any of the three count registers. 3C1 ctr_mode[2C0] counter mode when this address (port 0043h) is written with bits 7C6 ? 11b and bits 5C4 ? 00b, the pitmodectl register is addressed, and these bits control the counter operation: 000 = mode 0: interrupt on terminal count 001 = mode 1: hardware retriggerable one-shot (for pit channel 2) 010 = mode 2: rate generator 011 = mode 3: square wave generator 100 = mode 4: software retriggerable strobe 101 = mode 5: hardware retriggerable strobe (for pit channel 2) 110 = alias for mode 2 111 = alias for mode 3 see table 13-2 on page 13-9 for more detail on this bit field. 0bcd binary coded decimal select when this address (port 0043h) is written with bits 7C6 ? 11b and bits 5C4 ? 00b, the pitmodectl register is addressed, and this bit controls whether the counter indicated by bits 7C6 of this register counts in binary with a range of 0Cffffh or in binary coded decimal (bcd) with a range of 0C9999d. 0 = 16-bit binary counter 1 = bcd counter bit name function
programmable interval timer registers lan?sc520 microcontroller register set manual 13-9 table 13-2 pit counter mode settings ctr_mode bit field setting mode name description 000b = mode 0 interrupt on terminal count when the counter is programmed, the counter output transitions to 0. when the counter reaches 0, the counter output transitions to 1 and remains there until another count value is written. before a counter is programmed to generate interrupts, the corresponding pitxmap register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. 001b = mode 1 hardware retriggerable one-shot 1 notes: 1. modes 1 and 5 require a rising edge on the gate input for each timer channel. only pit channel 2 has a gate control (see the pit_gate2 bit in the sysctlb register, page 13-13) so only pit channel 2 is capable of running all modes. the gate controls for pit channels 0 and 1 are fixed internally to 1, so they are capable of operation only in modes 0, 2, 3 and 4. available for pit channel 2 only. when the channel 2 counter is programmed, the channel 2 output transitions to 1. after a low-to-high transition of the internal gate 2 signal (controlled by the pitgate2 signal or the pit_gate2 bit of the sysctlb register, see page 13-13), the counter output transitions to 0 until the count reaches 0, then the counter output transitions to 1 until the next low-to-high transition on the gate input. 010b = mode 2 rate generator each time the count transitions to 1, the counter output transitions to 0 and remains there for one cycle of the input clock, and then the counter output transitions to 1. the count is automatically reloaded, and the process repeats. by default, pc/at-compatible systems program channel 0 for this mode. 011b = mode 3 square wave generator when the count is loaded, the counter output transitions to 1. when 1/2 of the count has expired, the counter output transitions to 0. when count transitions to 0, the counter output transitions to 1, and count is automatically reloaded. by default, pc/at-compatible systems program channels 1 and 2 to use this mode to drive dram refresh and the speaker, respectively. 100b = mode 4 software retriggerable strobe when the count is loaded, the counter output transitions to 1. when count transitions to 0, the counter output transitions to 0 for one clock period and then transitions to 1. 101b = mode 5 hardware retriggerable strobe 1 available for pit channel 2 only. the counter output behaves just as in mode 4 except that the triggering is done on a low-to-high transition of the internal gate 2 signal (controlled by the pitgate2 signal or the pit_gate2 bit of the sysctlb register, see page 13-13). a trigger seen during the count reloads the count to the initial value and then counting continues. 110b same as mode 2 111b same as mode 3
programmable interval timer registers 13-10 lan?sc520 microcontroller register set manual pit counter latch command (pitcntlat) direct-mapped i/o address 0043h register description this register allows the current count of the selected channel to be read. bit definitions programming notes reads of this register (pitcntlat) return an undefined value. when a counters current value is required, software should obtain it by issuing a counter latch or read-back command via the pitcntlat or pitrdback register (see page 13-10 or page 13-11). a counter latch or read-back command does not stop a counter from running, but rather takes a snapshot of the current value. once the count has been latched, further latch commands are ignored until all latched count data is read back from the associated count register. a read-back command is a higher priority command than the counter latch command. the counter latch command is a subset of the read-back command because only one channel can have its counter latched per counter latch command. the programmable interval timer does not provide any way to read back the original count programmed into any of the three count registers. 7 6 5 4 3 2 1 0 bit ctr_sel[1C0] ctr_cmd[1C0] reserved reset 00000000 r/w ww rsv bit name function 7C6 ctr_sel[1C0] pit counter select when this address (port 0043h) is written with bits 7C6 ? 11b and bits 5C4 = 00b, the pitcntlat register is addressed, and this ctr_sel bit field specifies which of the three counter elements to latch for read back from the associated count register: 00 = select pit counter 0. 01 = select pit counter 1. 10 = select pit counter 2. 11 = the pitrdback register is addressed (see page 13-11). when this address (port 0043h) is written with bits 7C6 = 11b, this address is redefined (for the duration of the current i/o write) as the pitrdback register (see page 13-11). when this address (port 0043h) is written with bits 7C6 ? 11b and bits 5C4 ? 00b, this address is redefined (for the duration of the current i/o write) as the pitmodectl register (see page 13-7). 5C4 ctr_cmd[1C0] counter latch command when this address (port 0043h) is written with bits 7C6 ? 11b and bits 5C4 = 00b, the pitcntlat register is addressed, and this ctr_cmd bit field invokes the counter latch command. 00 = the counter latch command is invoked. 01C11 = the pitmodectl or pitrdback register is addressed (see page 13-7 and page 13-11). latched counts are read back from the pitxcnt registers (see the descriptions starting on page 13-2) based on the current read/write mode selected for each counter via the ctr_rw_latch bit field of the pitmodectl register (see page 13-7). 3C0 reserved reserved this bit field should be written to 0 for normal system operation.
programmable interval timer registers lan?sc520 microcontroller register set manual 13-11 pit read-back command (pitrdback) direct-mapped i/o address 0043h register description this register allows the status and current count of each channel to be read. bit definitions 7 6 5 4 3 2 1 0 bit ctr_sel[1C0] lcnt lstat cnt2 cnt1 cnt0 reserved reset 00000000 r/w w wwwwwrsv bit name function 7C6 ctr_sel[1C0] pit counter select/read - back command when this address (port 0043h) is written with bits 7C6 = 11b, the pitrdback register is addressed, and this ctr_sel bit field invokes the read-back command. 00C10 = the pitmodectl or pitcntlat register is addressed (see page 13-7 and page 13-10). 11 = read-back command: the values selected by bits 5C1 of this register are made available to be read back from the pitxcnt registers (see the descriptions starting on page 13-2) immediately following completion of the i/o write that invokes this read-back command. latched counts are read back from the pitxcnt registers (see the descriptions starting on page 13-2) based on the current read/write mode selected for each counter via the ctr_rw_latch bit field of the pitmodectl register (see page 13-7). the latched status bytes are returned in the pitxsta register format (see page 13-5). if both lstat and lcnt = 0b, the status byte is made available at the respective pitxcnt register first. when this byte has been read, the latched count bytes are made available, bits 7C0 first, and then bits 15C8 (if the channel is set up to read back all 16 bits of count via the ctr_rw_latch bit field of the pitmodectl). when this address (port 0043h) is written with bits 7C6 ? 11b and bits 5C4 ? 00b, this address is redefined (for the duration of the current i/o write) as the pitmodectl register (see page 13-7) when this address (port 0043h) is written with bits 7C6 ? 11b, and bits 5C4 = 00b, this address is redefined (for the duration of the current i/o write) as the pitcntlat register (see page 13-10). 5lcnt latch count (low true) 0 = latch count data for the counters selected via bits cnt2Ccnt0. 1 = do not latch count data for the counters selected via bits cnt2Ccnt0. 4lstat latch status (low true) 0 = latch the status byte for the counters selected via bits cnt2Ccnt0. 1 = do not latch the status byte for the counters selected via bits cnt2Ccnt0. 3 cnt2 select counter 2 0 = counter 2 is not selected for operations specified by bits lcnt and lstat. 1 = counter 2 is selected for operations specified by bits lcnt and lstat. 2 cnt1 select counter 1 0 = counter 1 is not selected for operations specified by bits lcnt and lstat. 1 = counter 1 is selected for operations specified by bits lcnt and lstat. 1 cnt0 select counter 0 0 = counter 0 is not selected for operations specified by bits lcnt and lstat. 1 = counter 0 is selected for operations specified by bits lcnt and lstat.
programmable interval timer registers 13-12 lan?sc520 microcontroller register set manual programming notes reads of this register (pitrdback) return an undefined value. when a counters current value is required, software should obtain it by issuing a counter latch or read-back command via the pitcntlat or pitrdback register (see page 13-10 or page 13-11). a counter latch or read-back command does not stop a counter from running, but rather takes a snapshot of the current value. once the count has been latched, further latch commands are ignored until all latched count data is read back from the associated count register. a read-back command is a higher priority command than the counter latch command. the counter latch command is a subset of the read-back command because only one channel can have its counter latched per counter latch command. the programmable interval timer does not provide any way to read back the original count programmed into any of the three count registers. 0 reserved reserved this bit field should be written to 0 for normal system operation. bit name function
programmable interval timer registers lan?sc520 microcontroller register set manual 13-13 system control port b (sysctlb) direct-mapped i/o address 0061h register description this register contains the pc/at-compatible system control port b register bits that pertain to the programmable interval timer (pit). bit definitions 7 6 5 4 3 2 1 0 bit perr iochck pitout2_ sta rfd reserved pit_out2_ enb pit_gate2 reset 001x 0 00 r/w rrrr rsv! r/wr/w bit name function 7 perr pc/at parity error indicator this pc/at-compatible bit is not supported (always reads back 0). 6 iochck pc/at channel check indicator this pc/at-compatible bit is not supported (always reads back 0). 5 pit_out2_sta pit timer 2 output pin state this status bit directly reflects the state of the output signal on channel 2 of the programmable interval timer (pit) and is sampled before the gate controlled by the pit_out2_enb bit. 0 = pit channel 2 output is low. 1 = pit channel 2 output is high. 4rfd dram refresh indicator on the original pc/at, the pit channel 1 output was used to generate the refresh signal. in this design, this bit is tied directly to the 32-khz clock source. 3C2 reserved reserved this bit field is ignored in the lansc520 microcontroller. on the original pc/at, this bit field was used to enable i/o channel check and ram parity check. for software using this register to remain pc/at-compatible, read-modify-write operations should be used to preserve this bit fields state. 1 pit_out2_enb pit output channel 2 enable this bit enables the pit channel 2 output to the pitout2 pin. 0 = do not propagate the pit channel 2 output to the pitout2 pin. the pitout2 pin is driven low. 1 = propagate the pit channel 2 output to the pitout2 pin. the pitout2 pin is connected to the system speaker in pc/at-compatible systems. 0pit_gate2 timer 2 gate input control this bit drives the gate input signal for pit channel 2. the pit channel 2 gate input controls the channels operation if the mode is set appropriately via the channels ctr_mode bit field in the pitmodectl register (see page 13-8). 0 = the pit channel 2 gate input is controlled by the pitgate2 pin. 1 = the pit channel 2 gate input is asserted. if the pitgate2 pin is configured for its alternate function, then the pins input to the or gate is held low, and this bit (pit_gate2) effectively controls the channel 2 gate input directly. note: this bit (pit_gate2) is logically ored with the pitgate2 signal. software using this bit should consider the configuration and state of the pitgate2 pin.
programmable interval timer registers 13-14 lan?sc520 microcontroller register set manual programming notes
lan?sc520 microcontroller register set manual 14-1 chapter 14 general-purpose timer registers 14.1 overview this chapter describes the general-purpose (gp) timer registers of the lansc520 microcontroller. there are three gp timers. the gp timer module is one of four lansc520 microcontroller timer modules. the other timer modules are described in the following chapters: n chapter 15, software timer registers n chapter 13, programmable interval timer registers n chapter 16, watchdog timer registers the gp timer register set consists of 12 memory-mapped configuration region (mmcr) registers used to configure and control each of the three gp timers. see the lan?sc520 microcontroller users manual , order #22004, for details about the gp timers. table 14-1 lists the gp timer registers in offset order, with the corresponding descriptions page number. 14.2 registers table 14-1 general-purpose timer mmcr registers register name mnemonic mmcr offset page number gp timers status gptmrsta c70h page 14-2 gp timer 0 mode/control gptmr0ctl c72h page 14-3 gp timer 0 count gptmr0cnt c74h page 14-6 gp timer 0 maxcount compare a gptmr0maxcmpa c76h page 14-7 gp timer 0 maxcount compare b gptmr0maxcmpb c78h page 14-8 gp timer 1 mode/control gptmr1ctl c7ah page 14-9 gp timer 1 count gptmr1cnt c7ch page 14-12 gp timer 1 maxcount compare a gptmr1maxcmpa c7eh page 14-13 gp timer 1 maxcount compare b gptmr1maxcmpb c80h page 14-14 gp timer 2 mode/control gptmr2ctl c82h page 14-15 gp timer 2 count gptmr2cnt c84h page 14-17 gp timer 2 maxcount compare a gptmr2maxcmpa c8eh page 14-18
general-purpose timer registers 14-2 lan?sc520 microcontroller register set manual gp timers status (gptmrsta) memory-mapped mmcr offset c70h register description this register contains the interrupt status information for the general-purpose timers. bit definitions programming notes 7 6 5 4 3 2 1 0 bit reserved t2_int_ sta t1_int_ sta t0_int_ sta reset 00000000 r/w rsv r/w! r/w! r/w! bit name function 7 C 3 reserved reserved this bit field should be written to 0 for normal system operation. 2 t2_int_sta gp timer 2 interrupt status 0 = gp timer 2 has not caused an interrupt, or software cleared this bit by writing 1. 1 = gp timer 2 has caused an interrupt. this bit is set when the gp timer 2 interrupt request is asserted. the interrupt request remains asserted until this status bit is cleared. software must write a 1 to clear this bit. 1 t1_int_sta gp timer 1 interrupt status 0 = gp timer 1 has not caused an interrupt, or software cleared this bit by writing 1. 1 = gp timer 1 has caused an interrupt. this bit is set when the gp timer 1 interrupt request is asserted. the interrupt request remains asserted until this status bit is cleared. software must write a 1 to clear this bit. 0 t0_int_sta gp timer 0 interrupt status 0 = gp timer 0 has not caused an interrupt, or software cleared this bit by writing 1. 1 = gp timer 0 has caused an interrupt. this bit is set when the gp timer 0 interrupt request is asserted. the interrupt request remains asserted until this status bit is cleared. software must write a 1 to clear this bit.
general-purpose timer registers lan?sc520 microcontroller register set manual 14-3 gp timer 0 mode/control (gptmr0ctl) memory-mapped mmcr offset c72h register description this register is used to control the functionality and modes of operation of gp timer 0 bit definitions 15 14 13 12 11 10 9 8 bit enb p_enb_wr int_enb max_cnt_ riu reserved reset 00000000 r/w r/w! w r/w r rsv 7 6 5 4 3 2 1 0 bit reserved max_cnt rtg psc_sel ext_clk alt_cmp cont_ cmp reset 00000000 r/w rsv r/w! r/w r/w r/w r/w r/w bit name function 15 enb gp timer 0 enable 0 = gp timer 0 is inhibited from counting. 1 = gp timer 0 counting is enabled. if gp timer 0 was previously enabled (via setting the enb bit) and is operating, and then software clears the enb bit by writing a 0, then gp timer 0 is inhibited from counting but is not reset. the various timer status bits and the tmrout0 output pin also remain stable. in this scenario, setting this enb bit again causes the timer to continue from the state that it was in just prior to being disabled. this bit can only be modified (set or cleared) via software, if the p_enb_wr bit of this register is set (i.e., written as 1) during the same write cycle access to this register. the enb bit is automatically cleared by hardware under certain circumstances if noncontinuous mode is selected. see the cont_cmp bit description on page 14-5. 14 p_enb_wr gp timer 0 permit enable bit write 0 = software cannot modify the enb bit in this write cycle. 1 = software can modify the enb bit in this write cycle. this bit allows selective software modifications of the enb bit. when the p_enb_wr bit is set during a write cycle access to this register, the enb bit can be modified in that same write cycle. when the p_enb_wr bit is written as a 0 during a write cycle access to this register, the enb bit cannot be modified. this bit is always read back as a 0.
general-purpose timer registers 14-4 lan?sc520 microcontroller register set manual 13 int_enb gp timer 0 interrupt enable this bit allows the timer to generate an interrupt when the timer counter value reaches a maximum count compare register value. 0 = gp timer 0 interrupt request generation is disabled. 1 = gp timer 0 interrupt request generation is enabled. if the int_enb bit is 1, the t0_int_sta bit is set in the gptmrsta register (see page 14-2) and an interrupt is generated when one of the following conditions occurs: n the alt_cmp bit is 1 (see page 14-5) and the gptmr0cnt register value (page 14-6) equals the value of either register gptmr0maxcmpa (page 14-7) or gptmr0maxcmpb (page 14-8). n the alt_cmp bit is 0 and the gptmr0cnt register value equals the value of the gptmr0maxcmpa register only. when the int_enb bit is 0, the timer does not cause the t0_int_sta bit to be set in the gptmrsta register (see page 14-2), and therefore a timer interrupt is not generated. before gp timer 0 interrupts are enabled, the gptmr0map register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. 12 max_cnt_riu gp timer 0 maxcount compare register in use this bit can be used by software with the max_cnt bit to determine where the timer is in its current count sequence. 0 = hardware clears this max_cnt_riu bit when the gptmr0maxcmpa register (see page 14-7) is being used for comparison to the gp timer 0 count value. 1 = hardware sets this max_cnt_riu bit when the gptmr0maxcmpb register (see page 14-8) is being used for comparison to the gp timer 0 count value. hardware also clears this bit any time hardware disables the timer by clearing the enb bit (i.e., at the end of the timer count when in noncontinuous mode). see the cont_cmp bit description on page 14-5. 11 C 6 reserved reserved this bit field should be written to 0 for normal system operation. 5 max_cnt gp timer 0 maximum count this bit can be used by software with the max_cnt_riu bit to determine where the timer is in its current count sequence. 0 = software must clear this bit by writing a 0 to it. this bit is never automatically cleared by hardware. 1 = this bit is set by hardware any time the timer count value reaches a maximum count value (maximum count value a or maximum count value b). this bit cannot be set by software. when gp timer 0 is in alternate compare mode (the alt_cmp bit = 1), the max_cnt bit is set whenever the timer 0 count value equals the value of either register gptmr0maxcmpa (see page 14-7) or gptmr0maxcmpb (page 14-8). the max_cnt bit is set for this condition regardless of the state of the int_enb bit. the max_cnt bit can be used to monitor timer status through software polling instead of making use of interrupt generation. 4rtg gp timer 0 retrigger this bit determines the control function provided by the gp timer 0 input pin (tmrin0) when tmrin0 is not configured as the timer clock source (i.e., when the ext_clk bit is 0). 0 = a high level on the tmrin0 input pin allows the timer to count and a low level on this pin holds the timer count value constant. 1 = if the timer is enabled, a 0 to 1 edge transition on the tmrin0 pin resets the existing gp timer 0 count value and then counting continues. this bit is ignored when external clocking is selected (i.e., when the ext_clk bit is 1). bit name function
general-purpose timer registers lan?sc520 microcontroller register set manual 14-5 programming notes 3 psc_sel gp timer 0 prescaler this bit selects the gp timer 0 clock source when the tmrin0 input pin is not configured as the timer clock source (i.e., when the ext_clk bit is 0). 0 = the gp timer 0 clock source is the internal clock (33.000 mhz or 33.333 mhz, depending on the crystal frequency). 1 = the gp timer 0 is pre-scaled by gp timer 2 (i.e., the internal gp timer 2 output is used as the input clock source for gp timer 0). this bit is ignored when external clocking is enabled (i.e., when the ext_clk bit is 1). 2 ext_clk gp timer 0 external clock this bit selects the external gp timer 0 clock source. 0 = an internal gp timer 0 clock source is used as configured via the psc_sel bit. when the timer clock is not being sourced from gp timer 2, the timer advances every 4th cpu clock period. 1 = an external gp timer 0 clock source is used (i.e., the tmrin0 pin). gp timer 0 advances upon every positive edge driven on the tmrin0 input pin. in this mode, the maximum timer input clock frequency is 1/4th of the cpu clock speed. 1alt_cmp gp timer 0 alternate compare this bit selects whether the gp timer 0 count is compared to a single maximum count register value, or alternately to both maximum count register values. 0 = single compare mode: the timer counts to the gptmr0maxcmpa register value (see page 14-7) and then resets the gptmr0cnt register value to 0 (page 14-6). in this mode, the gptmr0maxcmpb register is not used. in single compare mode, the tmrout0 pin is high while the counter is counting and being compared to the gptmr0maxcmpa register. the tmrout0 pin is pulsed low for a single cpu clock cycle after the maximum value is reached. 1 = alternate compare (square wave) mode: if the timer is enabled, the timer counts to the gptmr0maxcmpa register value and then resets the gptmr0cnt register to 0. then the timer counts to the gptmr0maxcmpb register value (page 14-8) and then resets the gptmr0cnt register value to 0. in alternate compare mode, the tmrout0 pin is high while the counter is counting and being compared to the gptmr0maxcmpa register. the tmrout0 pin is low while the counter is counting and being compared to the gptmr0maxcmpb register. if the cont_cmp bit is set, alternate compare mode generates a square wave signal on the tmrout0 pin with a frequency and duty cycle determined by the two maximum count register values. note: if external clocking is used and the clock is stopped during a count sequence, the timer output remains in its previous state (i.e., the state it was in prior to the clock stopping). the remaining timer status also remains the same and normal operation commences upon the external clock being driven again. see the cont_cmp bit description for a more detailed description of how the comparison registers are used in continuous and noncontinuous modes. 0cont_cmp gp timer 0 continuous mode this bit is used to configure gp timer 0 for continuous or noncontinuous mode. 0 = noncontinuous mode: the gptmr0cnt register (see page 14-12) is cleared and the timer halts whenever the count reaches the maximum count value. the enb bit is also cleared by hardware after every counter sequence. 1 = continuous mode: the timer count is reset to 0 after it reaches the maximum count value (a or b), and the timer immediately begins counting again. if the cont_cmp bit is cleared and the alt_cmp bit is set, gp timer 0 counts to the gptmr0maxcmpa register value (see page 14-13) and then resets the count value. after the timer count has been reset, the timer continues operation by counting to the gptmr0maxcmpb register value (page 14-14). when the timer count reaches the gptmr0maxcmpb register value, the timer clears its count value, clears the enb bit and then halts. bit name function
general-purpose timer registers 14-6 lan?sc520 microcontroller register set manual gp timer 0 count (gptmr0cnt) memory-mapped mmcr offset c74h register description this register contains the current count of gp timer 0. bit definitions programming notes each time this gptmr0cnt register is incremented, its value is compared with the value of register gptmr0maxcmpa or gptmr0maxcmpb (see page 14-7 and page 14-8) and various actions are taken when a maximum count is reached. for details, see the gptmr0ctl register bits int_enb, max_cnt_riu, max_cnt, alt_cmp, and cont_cmp, starting on page 14-4. 15 14 13 12 11 10 9 8 bit cnt[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit cnt[7 C 0] reset 00000000 r/w r/w bit name function 15 C 0 cnt[15 C 0] gp timer 0 count register this bit field contains the current count of gp timer 0. the count rate depends on the value of the psc_sel and ext_clk bits in the gptmr0ctl register (see page 14-5 and page 14-5). n if the ext_clk and psc_sel bits are both 0, the count is incremented every fourth processor clock cycle. n if the ext_clk bit is 0 and the psc_sel bit is 1, the count is incremented each time the gp timer 2 maxcount is reached. n if the ext_clk bit is 1, the count is incremented on every positive edge driven on the tmrin0 input pin (up to 1/4 of the cpu clock speed). this register (gptmr0cnt) can be read at any time to determine the remaining count duration until a maximum count value is reached, at which time this register is reset by hardware. this register can also be written at any time. if this register is written while the counter is enabled, the new value is latched into the gp timer 0 counter and counting proceeds from this new value.
general-purpose timer registers lan?sc520 microcontroller register set manual 14-7 gp timer 0 maxcount compare a (gptmr0maxcmpa) memory-mapped mmcr offset c76h register description this register contains one of the compare values for the gptmr0cnt register (see page 14-6). bit definitions programming notes gp timer 0 and gp timer 1 each have two maxcount compare registers, gptmrxmaxcmpa and gptmrxmaxcmpb. if the maxcount compare register that is in use contains the value 0000h and the timer is enabled, the timer counts to ffffh, at which point the appropriate action occurs based on the timer configuration options that are set. for details, see the gptmr0ctl register bits int_enb, max_cnt_riu, max_cnt, alt_cmp, and cont_cmp, starting on page 14-4. if the maxcount compare register that is in use contains a value other than 0000h and the timer is enabled, the timer counts to the programmed maxcount value. 15 14 13 12 11 10 9 8 bit mca[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit mca[7 C 0] reset 00000000 r/w r/w bit name function 15 C 0mca[15 C 0] gp timer 0 maxcount compare register a this register contains one of the maximum values that gp timer 0 can count to before resetting its count register to 0.
general-purpose timer registers 14-8 lan?sc520 microcontroller register set manual gp timer 0 maxcount compare b (gptmr0maxcmpb) memory-mapped mmcr offset c78h register description this register contains one of the compare values for the gptmr0cnt register (see page 14-6). bit definitions programming notes gp timer 0 and gp timer 1 each have two maxcount compare registers, gptmrxmaxcmpa and gptmrxmaxcmpb. if the maxcount compare register that is in use contains the value 0000h and the timer is enabled, the timer counts to ffffh, at which point the appropriate action occurs based on the timer configuration options that are set. for details, see the gptmr0ctl register bits int_enb, max_cnt_riu, max_cnt, alt_cmp, and cont_cmp, starting on page 14-4. if the maxcount compare register that is in use contains a value other than 0000h and the timer is enabled, the timer counts to the programmed maxcount value. 15 14 13 12 11 10 9 8 bit mcb[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit mcb[7 C 0] reset 00000000 r/w r/w bit name function 15 C 0mcb[15 C 0] gp timer 0 maxcount compare register b this register contains one of the maximum values that gp timer 0 can count to before resetting its count register to 0.
general-purpose timer registers lan?sc520 microcontroller register set manual 14-9 gp timer 1 mode/control (gptmr1ctl) memory-mapped mmcr offset c7ah register description this register is used to control the functionality and modes of operation of gp timer 1. bit definitions 15 14 13 12 11 10 9 8 bit enb p_enb_wr int_enb max_cnt_ riu reserved reset 00000000 r/w r/w! w r/w r rsv 7 6 5 4 3 2 1 0 bit reserved max_cnt rtg psc_sel ext_clk alt_cmp cont_ cmp reset 00000000 r/w rsv r/w! r/w r/w r/w r/w r/w bit name function 15 enb gp timer 1 enable 0 = gp timer 1 is inhibited from counting. 1 = gp timer 1 counting is enabled. if gp timer 1 was previously enabled (via setting the enb bit) and is operating, and then software clears the enb bit by writing a 0, then gp timer 1 is inhibited from counting but is not reset. the various timer status bits and the tmrout1 output pin also remain stable. in this scenario, setting this enb bit again causes the timer to continue from the state that it was in just prior to being disabled. this bit can only be modified (set or cleared) via software, if the p_enb_wr bit of this register is set (i.e., written as 1) during the same write cycle access to this register. the enb bit is automatically cleared by hardware under certain circumstances if noncontinuous mode is selected. see the cont_cmp bit description on page 14-11. 14 p_enb_wr gp timer 1 permit enable bit write 0 = software cannot modify the enb bit in this write cycle. 1 = software can modify the enb bit in this write cycle. this bit allows selective software modifications of the enb bit. when the p_enb_wr bit is set during a write cycle access to this register, the enb bit can be modified in that same write cycle. when the p_enb_wr bit is written as a 0 during a write cycle access to this register, the enb bit cannot be modified. this bit is always read back as a 0.
general-purpose timer registers 14-10 lan?sc520 microcontroller register set manual 13 int_enb gp timer 1 interrupt enable this bit allows the timer to generate an interrupt when the timer counter value reaches a maximum count compare register value. 0 = gp timer 1 interrupt request generation is disabled. 1 = gp timer 1 interrupt request generation is enabled. if the int_enb bit is 1, the t1_int_sta bit is set in the gptmrsta register (see page 14-2) and an interrupt is generated when one of the following conditions occurs: n the alt_cmp bit is 1 (see page 14-11) and the gptmr1cnt register value (page 14-12) equals the value of either register gptmr1maxcmpa (page 14-13) or gptmr1maxcmpb (page 14-14). n the alt_cmp bit is 0 and the gptmr1cnt register value equals the value of the gptmr1maxcmpa register only. when the int_enb bit is 0, the timer does not cause the t1_int_sta bit to be set in the gptmrsta register (see page 14-2), and therefore a timer interrupt is not generated. before gp timer 1 interrupts are enabled, the gptmr1map register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. 12 max_cnt_riu gp timer 1 maxcount compare register in use this bit can be used by software with the max_cnt bit to determine where the timer is in its current count sequence. 0 = hardware clears this max_cnt_riu bit when the gptmr1maxcmpa register (see page 14-13) is being used for comparison to the gp timer 1 count value. 1 = hardware sets this max_cnt_riu bit when the gptmr1maxcmpb register (see page 14-14) is being used for comparison to the gp timer 1 count value. hardware also clears this bit any time hardware disables the timer by clearing the enb bit (i.e., at the end of the timer count when in noncontinuous mode). see the cont_cmp bit description on page 14-11. 11 C 6 reserved reserved this bit field should be written to 0 for normal system operation. 5 max_cnt gp timer 1 maximum count this bit can be used by software with the max_cnt_riu bit to determine where the timer is in its current count sequence. 0 = software must clear this bit by writing a 0 to it. this bit is never automatically cleared by hardware. 1 = this bit is set by hardware any time the timer count value reaches a maximum count value (maximum count value a or maximum count value b). this bit cannot be set by software. when gp timer 1 is in alternate compare mode (the alt_cmp bit = 1), the max_cnt bit is set whenever the gp timer 1 count value equals the value of either register gptmr1maxcmpa (see page 14-13) or gptmr1maxcmpb (page 14-14). the max_cnt bit is set for this condition regardless of the state of the int_enb bit. the max_cnt bit can be used to monitor timer status through software polling instead of making use of interrupt generation. 4rtg gp timer 1 retrigger this bit determines the control function provided by the gp timer 1 input pin (tmrin1) when tmrin1 is not configured as the timer clock source (i.e., when the ext_clk bit is 0). 0 = a high level on the tmrin1 input pin allows the timer to count and a low level on this pin holds the timer count value constant. 1 = if the timer is enabled, a 0 to 1 edge transition on the tmrin1 pin resets the existing gp timer 1 count value and then counting continues. this bit is ignored when external clocking is selected (i.e., when the ext_clk bit is 1). bit name function
general-purpose timer registers lan?sc520 microcontroller register set manual 14-11 programming notes 3 psc_sel gp timer 1 prescaler this bit selects the gp timer 1 clock source when the tmrin1 input pin is not configured as the timer clock source (i.e., when the ext_clk bit is 0). 0 = the gp timer 1 clock source is the internal clock (33.000 mhz or 33.333 mhz, depending on the crystal frequency). 1 = the gp timer 1 is pre-scaled by gp timer 2 (i.e., the internal gp timer 2 output is used as the input clock source for gp timer 1). this bit is ignored when external clocking is enabled (i.e., the ext_clk bit is 1). 2 ext_clk gp timer 1 external clock this bit selects the external gp timer 1 clock source. 0 = an internal gp timer 1 clock source is used as configured via the psc_sel bit. when the timer clock is not being sourced from gp timer 2, the timer advances every 4th cpu clock period. 1 = an external gp timer 1 clock source is used (i.e., the tmrin1 pin). gp timer 1 advances upon every positive edge driven on the tmrin1 input pin. in this mode, the maximum timer input clock frequency is 1/4th of the cpu clock speed. 1alt_cmp gp timer 1 alternate compare this bit selects whether the gp timer 1 count is compared to a single maximum count register value, or alternately to both maximum count register values. 0 = single compare mode: the timer counts to the gptmr1maxcmpa register value (see page 14-13) and then resets the gptmr1cnt register value to 0 (page 14-12). in this mode, the gptmr1maxcmpb register is not used. in single compare mode, the tmrout1 pin is high while the counter is counting and being compared to the gptmr1maxcmpa register. the tmrout1 pin is pulsed low for a single cpu clock cycle after the maximum value is reached. 1 = alternate compare (square wave) mode: if the timer is enabled, the timer counts to the gptmr1maxcmpa register value and then resets the gptmr1cnt register to 0. then the timer counts to the gptmr1maxcmpb register value (page 14-14) and then resets the gptmr1cnt register value to 0. in alternate compare mode, the tmrout1 pin is high while the counter is counting and being compared to the gptmr1maxcmpa register. the tmrout1 pin is low while the counter is counting and being compared to the gptmr1maxcmpb register. if the cont_cmp bit is set, alternate compare mode generates a square wave signal on the tmrout1 pin with a frequency and duty cycle determined by the two maximum count register values. note: if external clocking is used and the clock is stopped during a count sequence, the timer output remains in its previous state (i.e., the state it was in prior to the clock stopping). the remaining timer status also remains the same and normal operation commences upon the external clock being driven again. see the continuous mode bit description below for a more detailed description of how the comparison registers are used in continuous and noncontinuous modes. 0cont_cmp gp timer 1 continuous mode this bit is used to configure gp timer 1 for continuous or noncontinuous mode. 0 = noncontinuous mode: the gptmr1cnt register (see page 14-12) is cleared and the timer halts whenever the count reaches the maximum count value. the enb bit is also cleared by hardware after every counter sequence. 1 = continuous mode: the timer count is reset to 0 after it reaches the maximum count value (a or b), and the timer immediately begins counting again. if the cont_cmp bit is cleared and the alt_cmp bit is set, gp timer 1 counts to the gptmr1maxcmpa register value (see page 14-13) and then resets the count value. after the timer count has been reset, the timer continues operation by counting to the gptmr1maxcmpb register value (page 14-14). when the timer count reaches the gptmr1maxcmpb register value, the timer clears its count value, clears the enb bit and then halts. bit name function
general-purpose timer registers 14-12 lan?sc520 microcontroller register set manual gp timer 1 count (gptmr1cnt) memory-mapped mmcr offset c7ch register description this register contain the current count of gp timer 1. bit definitions programming notes each time this gptmr1cnt register is incremented, its value is compared with the value of register gptmr1maxcmpa or gptmr1maxcmpb (see page 14-13 and page 14-14) and various actions are taken when a maximum count is reached. for details, see the gptmr1ctl register bits int_enb, max_cnt_riu, max_cnt, alt_cmp, and cont_cmp, starting on page 14-10. 15 14 13 12 11 10 9 8 bit cnt[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit cnt[7 C 0] reset 00000000 r/w r/w bit name function 15 C 0 cnt[15 C 0] gp timer 1 count register this bit field contains the current count of gp timer 1. the count rate depends on the value of the psc_sel and ext_clk bits in the gptmr1ctl register (see page 14-11 and page 14-11). n if the ext_clk and psc_sel bits are both 0, the count is incremented every fourth processor clock cycle. n if the ext_clk bit is 0 and the psc_sel bit is 1, the count is incremented each time the gp timer 2 maxcount is reached. n if the ext_clk bit is 1, the count is incremented on every positive edge driven on the tmrin1 input pin (up to 1/4 of the cpu clock speed). this register (gptmr1cnt) can be read at any time to determine the remaining count duration until a maximum count value is reached, at which time this register is reset by hardware. this register can also be written at any time. if this register is written while the counter is enabled, the new value is latched into the gp timer 1 counter and counting proceeds from this new value.
general-purpose timer registers lan?sc520 microcontroller register set manual 14-13 gp timer 1 maxcount compare a (gptmr1maxcmpa) memory-mapped mmcr offset c7eh register description this register contains one of the compare values for the gptmr1cnt register (see page 14-12). bit definitions programming notes gp timer 0 and gp timer 1 each have two maxcount compare registers, gptmrxmaxcmpa and gptmrxmaxcmpb. if the maxcount compare register that is in use contains the value 0000h and the timer is enabled, the timer counts to ffffh, at which point the appropriate action occurs based on the timer configuration options that are set. for details, see the gptmr1ctl register bits int_enb, max_cnt_riu, max_cnt, alt_cmp, and cont_cmp, starting on page 14-10. if the maxcount compare register that is in use contains a value other than 0000h and the timer is enabled, the timer counts to the programmed maxcount value. 15 14 13 12 11 10 9 8 bit mca[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit mca[7 C 0] reset 00000000 r/w r/w bit name function 15 C 0mca[15 C 0] gp timer 1 maxcount compare register a this register contains one of the maximum values that gp timer 1 can count to before resetting its count register to 0.
general-purpose timer registers 14-14 lan?sc520 microcontroller register set manual gp timer 1 maxcount compare b (gptmr1maxcmpb) memory-mapped mmcr offset c80h register description this register contains one of the compare values for the gptmr1cnt register (see page 14-12). bit definitions programming notes gp timer 0 and gp timer 1 each have two maxcount compare registers, gptmrxmaxcmpa and gptmrxmaxcmpb. if the maxcount compare register that is in use contains the value 0000h and the timer is enabled, the timer counts to ffffh, at which point the appropriate action occurs based on the timer configuration options that are set. for details, see the gptmr1ctl register bits int_enb, max_cnt_riu, max_cnt, alt_cmp, and cont_cmp, starting on page 14-10. if the maxcount compare register that is in use contains a value other than 0000h and the timer is enabled, the timer counts to the programmed maxcount value. 15 14 13 12 11 10 9 8 bit mcb[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit mcb[7 C 0] reset 00000000 r/w r/w bit name function 15 C 0mcb[15 C 0] gp timer 1 maxcount compare register b this register contains one of the maximum values that gp timer 1 can count to before resetting its count register to 0.
general-purpose timer registers lan?sc520 microcontroller register set manual 14-15 gp timer 2 mode/control (gptmr2ctl) memory-mapped mmcr offset c82h register description this register is used to control the functionality and modes of operation of gp timer 2. bit definitions 15 14 13 12 11 10 9 8 bit enb p_enb_wr int_enb reserved reset 00000000 r/w r/w! w r/w rsv 7 6 5 4 3 2 1 0 bit reserved max_cnt reserved cont_ cmp reset 00000000 r/w rsv r/w! rsv r/w bit name function 15 enb gp timer 2 enable 0 = gp timer 2 is inhibited from counting. 1 = gp timer 2 counting is enabled. if gp timer 2 was previously enabled (via setting the enb bit) and is operating, and then software clears the enb bit by writing a 0, then gp timer 2 is inhibited from counting but is not reset. the various timer status bits also remain stable. in this scenario, setting this enb bit again causes the timer to continue from the state that it was in just prior to being disabled. this bit can only be modified (set or cleared) via software, if the p_enb_wr bit of this register is set (i.e., written as 1) during the same write cycle access to this register. the enb bit is automatically cleared by hardware under certain circumstances if noncontinuous mode is selected. see the cont_cmp bit description on page 14-16. 14 p_enb_wr gp timer 2 permit enable bit write 0 = software cannot modify the enb bit in this write cycle. 1 = software can modify the enb bit in this write cycle. this bit allows selective software modifications of the enb bit. when the p_enb_wr bit is set during a write cycle access to this register, the enb bit can be modified in that same write cycle. when the p_enb_wr bit is written as a 0 during a write cycle access to this register, the enb bit cannot be modified. this bit is always read back as a 0.
general-purpose timer registers 14-16 lan?sc520 microcontroller register set manual programming notes 13 int_enb gp timer 2 interrupt enable this bit allows the timer to generate an interrupt when the timer count value reaches the maximum count compare register value. 0 = gp timer 2 interrupt request generation is disabled. 1 = gp timer 2 interrupt request generation is enabled. if the int_enb bit is 1, the t2_int_sta bit is set in the gptmrsta register (see page 14-2) and an interrupt is generated when the gptmr2cnt register value (page 14-17) equals the value of the gptmr2maxcmpa register (page 14-18). when the int_enb bit is 0, the timer does not cause the t2_int_sta bit to be set in the gptmrsta register (see page 14-2), and therefore a timer interrupt is not generated. before gp timer 2 interrupts are enabled, the gptmr2map register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. 12 C 6 reserved reserved this bit field should be written to 0 for normal system operation. 5 max_cnt gp timer 2 maximum count this bit can be used by software to determine where the timer is in its current count sequence. 0 = software must clear this bit by writing a 0 to it. this bit is never automatically cleared by hardware. 1 = this bit is set by hardware any time the timer count value reaches its maximum count value (gptmr2maxcmpa register, see page 14-18). the max_cnt bit is set for this condition regardless of the state of the int_enb bit. the max_cnt bit can be used to monitor timer status through software polling instead of making use of interrupt generation. 4 C 1 reserved reserved this bit field should be written to 0 for normal system operation. 0cont_cmp gp timer 2 continuous mode this bit is used to configure gp timer 2 for continuous or noncontinuous mode. 0 = noncontinuous mode: the gptmr2cnt register (see page 14-12) is cleared and the timer halts whenever the count reaches the maximum count value (gptmr2maxcmpa register, see page 14-18). the enb bit is also cleared by hardware after every counter sequence. 1 = continuous mode: the timer count is reset to 0 after it reaches the maximum count value, and the timer immediately begins counting again. bit name function
general-purpose timer registers lan?sc520 microcontroller register set manual 14-17 gp timer 2 count (gptmr2cnt) memory-mapped mmcr offset c84h register description this register contains the current count of gp timer 2. bit definitions programming notes each time this gptmr2cnt register is incremented, its value is compared with the gptmr2maxcmpa register (see page 14-18) and various actions are taken when a maximum count is reached. for details, see the gptmr2ctl register bits int_enb, max_cnt, and cont_cmp, starting on page 14-16. 15 14 13 12 11 10 9 8 bit cnt[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit cnt[7 C 0] reset 00000000 r/w r/w bit name function 15 C 0 cnt[15 C 0] gp timer 2 count register this bit field contains the current count of gp timer 2. the count is incremented every fourth processor clock cycle. this register (gptmr2cnt) can be read at any time to determine the remaining count duration until a maximum count value is reached, at which time this register is reset by hardware. this gptmr2cnt register can also be written at any time. if this register is written while the counter is enabled, the new value is latched into the gp timer 2 counter and counting proceeds from this new value.
general-purpose timer registers 14-18 lan?sc520 microcontroller register set manual gp timer 2 maxcount compare a (gptmr2maxcmpa) memory-mapped mmcr offset c8eh register description this register contains the single compare values for the gptmr2cnt register (see page 14-17). bit definitions programming notes gp timer 2 has only one maxcount compare register. if this register (gptmr2maxcmpa) is written with the value 0000h and the timer is enabled, the timer counts to ffffh, at which point the appropriate action occurs based on the timer configuration options that are set. for details, see the gptmr2ctl register bits int_enb, max_cnt, and cont_cmp, starting on page 14-16. if the maxcount compare register contains a value other than 0000h and the timer is enabled, the timer counts to the programmed maxcount value. 15 14 13 12 11 10 9 8 bit mca[15 C 8] reset 00000000 r/w r/w 7 6 5 4 3 2 1 0 bit mca[7 C 0] reset 00000000 r/w r/w bit name function 15 C 0mca[15 C 0] gp timer 2 maxcount compare register a this register contains the maximum value that gp timer 2 can count to before resetting its count register to 0.
lan?sc520 microcontroller register set manual 15-1 chapter 15 software timer registers 15.1 overview this chapter describes the software timer registers of the lansc520 microcontroller. the software timer is one of four lansc520 microcontroller timer modules. the other timer modules are described in the following chapters: n chapter 14, general-purpose timer registers n chapter 13, programmable interval timer registers n chapter 16, watchdog timer registers the software timer register set consists of three memory-mapped configuration region (mmcr) registers used access and control the timer. see the lan?sc520 microcontroller users manual , order #22004, for details about the software timer. table 15-1 lists the software timer registers in offset order, with the corresponding descriptions page number. 15.2 registers table 15-1 software timer mmcr registers register name mnemonic mmcr offset page number software timer millisecond count swtmrmilli c60h page 15-2 software timer microsecond count swtmrmicro c62h page 15-3 software timer configuration swtmrcfg c64h page 15-4
software timer registers 15-2 lan?sc520 microcontroller register set manual software timer millisecond count (swtmrmilli) memory-mapped mmcr offset c60h register description this register contains the current millisecond count of the software timer. bit definitions programming notes a 32-bit read of the swtmrmilli register address is broken up into two 16-bit reads. the first 16-bit read returns the swtmrmilli register and latches the swtmrmicro register (see page 15-3). the second 16-bit read returns the (newly latched) swtmrmicro register contents. thus, the 32-bit value returned includes the correct millisecond and microsecond values at the tim e of softwares 32-bit read, with the millisecond value stored in the lower 16 bits and the microsecond value stored in the upper 16 bits. byte (8-bit) reads of the swtmrmilli register are not allowed. 15 14 13 12 11 10 9 8 bit ms_cnt[15 C 8] reset 00000000 r/w r! 7 6 5 4 3 2 1 0 bit ms_cnt[7 C 0] reset 00000000 r/w r! bit name function 15 C 0 ms_cnt[15 C 0] 16-bit millisecond count this read-only bit field increments at a rate of 1000 counts per second. this millisecond counter is set to zero at system reset. note: when read, this counter is automatically reset to 0. this millisecond counter is not reset when the us_cnt bit field in the swtmrmicro register is read (see page 15-3). in order to maintain a millisecond time base, this ms_cnt bit field must be read at least once every 65.5 seconds. when this ms_cnt bit field is read, the value in the internal free-running microsecond up counter is automatically latched into the us_cnt bit field in the swtmrmicro register. the internal microsecond counter increments at a rate of 1 mhz and counts from 0 to 999. it rolls over from 999 back to zero. every time the microsecond counter rolls over, the ms_cnt bit field is incremented. note that the xtal_freq bit in the swtmrcfg register (see page 15-4) must be set appropriately in order for the increment rate to be correct.
software timer registers lan?sc520 microcontroller register set manual 15-3 software timer microsecond count (swtmrmicro) memory-mapped mmcr offset c62h register description this register contains the current latched microsecond count of the software timer. bit definitions programming notes 15 14 13 12 11 10 9 8 bit reserved us_cnt[9 C 8] reset 00000000 r/w rsv r 7 6 5 4 3 2 1 0 bit us_cnt[7 C 0] reset 00000000 r/w r bit name function 15 C 10 reserved reserved this bit field should be written to 0 for normal system operation. 9 C 0 us_cnt [9C0] swt microsecond count this read-only bit field holds the latched microsecond count value from a free running microsecond counter. each read of this bit field returns the currently latched microsecond count value. on each read of the swtmrmilli register (see page 15-2), the value in the internal microsecond counter is latched into this bit field (us_cnt). this us_cnt bit field is reset to 0 at system reset. the internal microsecond counter increments at a rate of 1 mhz and counts from 0 to 999. it rolls over from 999 back to 0. every time the microsecond counter rolls over, the ms_cnt bit field in the swtmrmilli register is incremented (see page 15-2). note that the xtal_freq bit in the swtmrcfg register (see page 15-4) must be set appropriately in order for the increment rate to be correct.
software timer registers 15-4 lan?sc520 microcontroller register set manual software timer configuration (swtmrcfg) memory-mapped mmcr offset c64h register description this register is used to calibrate the software timer to the crystal frequency being used. bit definitions programming notes 7 6 5 4 3 2 1 0 bit reserved xtal_ freq reset 00000000 r/w rsv r/w bit name function 7 C 1 reserved reserved this bit field should be written to 0 for normal system operation. 0 xtal_freq crystal frequency this field is used to specify the frequency of the crystal used to drive the main system clock. configure this bit appropriately to ensure that the software timer increments at the correct rate for the system. 0 = specifies that the system is using a 33.333 mhz crystal. 1 = specifies that the system is using a 33.000 mhz crystal. note that this bit has no effect on the general-purpose timers, programmable interval timer, or watchdog timer.
lan?sc520 microcontroller register set manual 16-1 chapter 16 watchdog timer registers 16.1 overview this chapter describes the watchdog timer registers of the lansc520 microcontroller. the watchdog timer is one of four lansc520 microcontroller timer modules. the other timer modules are described in the following chapters: n chapter 15, software timer registers n chapter 14, general-purpose timer registers n chapter 13, programmable interval timer registers the watchdog timer register set consists of three memory-mapped configuration region (mmcr) registers used to configure, control, and monitor the status of the watchdog timer. see the lan?sc520 microcontroller users manual , order #22004, for details about the watchdog timer. table 16-1 lists the watchdog timer registers in offset order, with the corresponding descriptions page number. 16.2 registers table 16-1 watchdog timer mmcr registers register name mnemonic mmcr offset page number watchdog timer control wdtmrctl cb0h page 16-2 watchdog timer count low wdtmrcntl cb2h page 16-4 watchdog timer count high wdtmrcnth cb4h page 16-5 reserved cb6h
watchdog timer registers 16-2 lan?sc520 microcontroller register set manual watchdog timer control (wdtmrctl) memory-mapped mmcr offset cb0h register description this register is used to control the watchdog timer. this register can only be accessed after writing special keyed sequences as described in the programming notes. bit definitions 15 14 13 12 11 10 9 8 bit enb wrst_enb reserved irq_flg reserved reset 01000000 r/w r/w! r/w! rsv r/w! rsv 7 6 5 4 3 2 1 0 bit exp_sel[7C0] reset 10000000 r/w r/w! bit name function 15 enb watchdog timer enable this is the watchdog timer enable bit. 0 = the watchdog timer is disabled. 1 = the watchdog timer is enabled. when this bit is set, the current count is automatically reset to 0, the wrst_enb and exp_sel fields become read-only, and the watchdog timer counter begins counting. before the watchdog timer is enabled with the wrst_enb bit cleared, the wdtmap register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. 14 wrst_enb watchdog timer reset enable this is a programmable bit to select between a reset or interrupt as the time-out action. 0 = the watchdog timer time-out generates an interrupt request if the irq_flg bit is not already set. if irq_flg bit is set, a system reset is generated instead. 1 = the watchdog timer time-out always generates a system reset. when the watchdog timer generates a system reset, the wdt_rst_det bit is set in the ressta register (see page 3-5). 13 reserved reserved this bit field should be written to 0 for normal system operation. 12 irq_flg interrupt request flag this bit provides an indication of interrupt events generated by the watchdog timer time-out. this bit is accessible even after the enb bit is set. 0 = no watchdog timer interrupt has occurred. 1 = watchdog timer interrupt has occurred. this bit is cleared by writing a 1. after a watchdog timer time-out occurs, if this bit is not cleared before a second time-out of the watchdog timer, a watchdog timer system reset is generated instead of a second interrupt request. 11-8 reserved reserved this bit field should be written to 0 for normal system operation.
watchdog timer registers lan?sc520 microcontroller register set manual 16-3 programming notes the watchdog timer can only be programmed after special keyed sequences are written to this address. two special keyed sequences are recognized: n the key sequence of 3333h followed by cccch is called the write key and is used to open this watchdog timer control (wdtmrctl) register for a single write. n the key sequence of aaaah followed by 5555h is called the clear-count key and is used to clear the current watchdog timer counter. note: all keys are written to the wdtmrctl register address (mmcr offset cb0h). normally this register is read-only. the write key sequence must be written before a value can be programmed into this register; after this single value is written, the write key sequence must be applied again before another value can be programmed. the enb bit must be 0 before the wrst_enb bit or the exp_sel bit field can be written. when the microcontroller is in amdebug? technology mode, the wdtmrctl register can still be accessed in the normal manner. however, the amdebug technology stops the count registers from incrementing further to prevent the watchdog timer from causing an interrupt or reset in amdebug technology mode. 7-0 exp_sel[7C0] exponent select this bit field determines the duration of the watchdog timer time-out interval. table 16-2 shows the values for the exp_sel field. the bit values shown in the table are programmed to select a time-out exponent as shown in the exponent column. the selected exponent determines the time-out duration according to the following equation: time-out duration = 2 exponent / cpu frequency where time-out duration is the time-out period in seconds exponent is the value selected from table 16-2 cpu frequency is the operating speed of the cpu in hz. when multiple bits are set in the exp_sel field, the least significant bit set is used to select the exponent. for example, to program a maximum time-out of about 32 seconds, the exp_sel field is set to 80h. the time-out value can then be calculated as follows for the lansc520 microcontroller with a 33.000 mhz cpu clock. time-out interval = 2 30 / (33.000 mhz crystal frequency) = 2 30 / (33,000,000) = 32.54 seconds. bit name function table 16-2 watchdog timer exponent selections bits exponent time-out interval 33.000 mhz time-out interval 33.333 mhz 76543210 0 0 0 0 0 0 0 0 n/a infinity infinity x x x x x x x 1 14 496 m s492 m s x x x x x x 1 0 24 508 ms 503 ms x x x x x 1 0 0 25 1.02 s 1.01 s x x x x 1 0 0 0 26 2.03 s 2.01 s x x x 1 0 0 0 0 27 4.07 s 4.03 s x x 1 0 0 0 0 0 28 8.13 s 8.05 s x 1 0 0 0 0 0 0 29 16.27 s 16.11 s 1 0 0 0 0 0 0 0 30 32.54 s 32.21 s
watchdog timer registers 16-4 lan?sc520 microcontroller register set manual watchdog timer count low (wdtmrcntl) memory-mapped mmcr offset cb2h register description this read-only register contains the lower 16 bits of the watchdog timer counter. in normal operation the clear-count key sequence (aaaah followed by 5555h) clears the watchdog timer counter. note that the clear-count key is written to the wdtmrctl register address (see page 16-2). bit definitions programming notes although both the wdtmrcnth and wdtmrcntl registers can be read with a single 32-bit cpu instruction, the 32-bit access is split into two 16-bit accesses. see the gp timer chapter in the lan?sc520 microcontroller users manual , order #22004, for suggestions if it is necessary to read an accurate 32-bit value from the watchdog timer counter. 15 14 13 12 11 10 9 8 bit countl [15C8] reset 00000000 r/w r 7 6 5 4 3 2 1 0 bit countl[7C0] reset 00000000 r/w r bit name function 15C0 countl[15C0] current count low this field contains the low word [15C0] of the watchdog timer current count. the counter value is automatically reset when the watchdog timer is enabled.
watchdog timer registers lan?sc520 microcontroller register set manual 16-5 watchdog timer count high (wdtmrcnth) memory-mapped mmcr offset cb4h register description this read-only register contains the higher 15 bits of the watchdog timer counter. in normal operation the clear-count key sequence (aaaah followed by 5555h) clears the watchdog timer counter. note that the clear-count key is written to the wdtmrctl register address (see page 16-2). bit definitions programming notes although both the wdtmrcnth and wdtmrcntl registers can be read with a single 32-bit cpu instruction, the 32-bit access is split into two 16-bit accesses. see the gp timer chapter in the lan?sc520 microcontroller users manual , order #22004, for suggestions if it is necessary to read an accurate 32-bit value from the watchdog timer counter. 15 14 13 12 11 10 9 8 bit reserved counth [14C8] reset 00000000 r/w rsv r 7 6 5 4 3 2 1 0 bit counth[7C0] reset 00000000 r/w r bit name function 15 reserved reserved this bit field should be written to 0 for normal system operation. 14-0 counth[14C0] current count high this field contains the high word [30C16] of the watchdog timer current count. the counter value is automatically reset when the watchdog timer is enabled.
watchdog timer registers 16-6 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 17-1 chapter 17 real-time clock registers 17.1 overview this chapter describes the real-time clock (rtc) registers of the lansc520 microcontroller. the lansc520 microcontroller includes a pc/at-compatible rtc. the rtc register set includes two groups of registers: n two direct-mapped i/o addresses used to access the rtc configuration space. n 14 rtc-indexed configuration registers used to set, read, and configure the rtc. n 114 bytes of rtc-indexed nonvolatile ram locations used in pc/at-compatible systems to store various system parameters. see the lan?sc520 microcontroller users manual , order #22004, for details about the rtc. table 17-1 and table 17-2 list each type of rtc register in offset order, with the corresponding descriptions page number. 17.2 registers table 17-1 real-time clock direct-mapped registers register name mnemonic i/o address page number rtc/cmos ram index rtcidx 0070h page 17-2 rtc/cmos ram data port rtcdata 0071h page 17-3 table 17-2 real-time clock indexed registers register name mnemonic i/o address rtc index page number rtc current second rtccursec 70h/71h 00h page 17-4 rtc alarm second rtcalmsec 70h/71h 01h page 17-5 rtc current minute rtccurmin 70h/71h 02h page 17-6 rtc alarm minute rtcalmmin 70h/71h 03h page 17-7 rtc current hour rtccurhr 70h/71h 04h page 17-8 rtc alarm hour rtcalmhr 70h/71h 05h page 17-9 rtc current day of the week rtccurdow 70h/71h 06h page 17-10 rtc current day of the month rtccurdom 70h/71h 07h page 17-11 rtc current month rtccurmon 70h/71h 08h page 17-12 rtc current year rtccuryr 70h/71h 09h page 17-13 rtc control a rtcctla 70h/71h 0ah page 17-14 rtc control b rtcctlb 70h/71h 0bh page 17-16 rtc status c rtcstac 70h/71h 0ch page 17-18 rtc status d rtcstad 70h/71h 0dh page 17-20 general-purpose cmos ram (114 bytes) rtccmos 70h/71h 0eC7fh page 17-21
real-time clock registers 17-2 lan?sc520 microcontroller register set manual rtc/cmos ram index (rtcidx) direct-mapped i/o address 70h register description this register is used to specify the rtc index address to be accessed via the rtcdata register (see page 17-3). bit definitions programming notes bit 7 of this register is typically used as the nmi enable bit in pc/at-compatible systems. in the lansc520 microcontroller this function has been moved to the nmi_enb bit in the picicr register (see page 12-4). see the programmable interrupt controller chapter of the lan?sc520 microcontroller users manual , order #22004, for more information. 7 6 5 4 3 2 1 0 bit reserved cmosidx [6C0] reset x0000000 r/w rsv w bit name function 7 reserved reserved 6 C 0 cmosidx [6C0] rtc/cmos ram index this bit field is used to specify the rtc or cmos ram index to be read or written via the rtcdata register (see page 17-3).
real-time clock registers lan?sc520 microcontroller register set manual 17-3 rtc/cmos ram data port (rtcdata) direct-mapped i/o address 71h register description this register is the rtc data port used to access the rtc index specified in the rtcidx register (see page 17-2) bit definitions programming notes 7 6 5 4 3 2 1 0 bit cmosdata [7C0] reset xxxxxxxx r/w r/w bit name function 7 C 0 cmosdata [7C0] rtc/cmos data port this bit field is used to write to or read from the rtc index specified in the rtcidx register (see page 17-2).
real-time clock registers 17-4 lan?sc520 microcontroller register set manual rtc current second (rtccursec) i/o address 70h/71h rtc index 00h register description this register is the rtc current second initialization and read-back register. bit definitions programming notes software can suspend updating of this register via the set bit in the rtcctlb register (see page 17-16). software selects binary or bcd format via the date_mode bit in the rtcctlb register. 7 6 5 4 3 2 1 0 bit second [7C0] reset xxxxxxxx r/w r/w! bit name function 7 C 0 second [7C0] rtc current second software initializes the seconds value for the rtc by writing data to this bit field in binary or binary-coded decimal (bcd) format. the seconds component of the rtc time can be read from this bit field. the rtc logic updates this bit field once per second. valid values for this bit field range from 0 to 59d. if a value greater than 59d is programmed, the bit field value increments up to ffh, wraps around to 0, and only then does the value remain in the valid range.
real-time clock registers lan?sc520 microcontroller register set manual 17-5 rtc alarm second (rtcalmsec) i/o address 70h/71h rtc index 01h register description this register is used to initialize and read back the rtc alarm second. bit definitions programming notes software can suspend updating of the rtc via the set bit in the rtcctlb register (see page 17-16). software selects binary or bcd format via the date_mode bit in the rtcctlb register. software can enable the rtc alarm as an interrupt via the alm_int_enb bit in the rtcctlb register. the alm_int_flg bit in the rtcstac register indicates whether an alarm event has occurred (see page 17-18). 7 6 5 4 3 2 1 0 bit alm_second [7C0] reset xxxxxxxx r/w r/w! bit name function 7 C 0 alm_ second [7C0] rtc alarm second software initializes the alarm seconds value for the rtc by writing data to this bit field in either binary or binary-coded decimal (bcd) format. the alarm seconds component of the rtc time can be read from this bit field. writing any value from c0h to ffh to this bit field makes the seconds component of the alarm a wild card. for example, setting the hours, minutes, and seconds alarm registers to c0h causes an rtc alarm event to be generated once per second. the wild card based once-per- second alarm does not occur unless the hours and minutes alarm settings are also wild cards. the rtc logic checks once per second to see if an alarm has occurred. valid values for this bit field range from 0 to 59d and all wild card values.
real-time clock registers 17-6 lan?sc520 microcontroller register set manual rtc current minute (rtccurmin) i/o address 70h/71h rtc index 02h register description this register is used to initialize and read back the rtc current minute. bit definitions programming notes software can suspend updating of the rtc via the set bit in the rtcctlb register (see page 17-16). software selects binary or bcd format via the date_mode bit in the rtcctlb register. 7 6 5 4 3 2 1 0 bit minute [7C0] reset xxxxxxxx r/w r/w! bit name function 7 C 0 minute [7C0] rtc current minute software initializes the minutes value for the rtc by writing data to this bit field in either binary or binary-coded decimal (bcd) format. the minutes component of the rtc time can be read from this bit field. the rtc logic updates this bit field once per second. valid values for this bit field range from 0 to 59d. if a value greater than 59d is programmed, the bit field value increments up to ffh, wraps around to 0, and only then does the value remain in the valid range.
real-time clock registers lan?sc520 microcontroller register set manual 17-7 rtc alarm minute (rtcalmmin) i/o address 70h/71h rtc index 03h register description this register used to initialize and read back the rtc alarm minute. bit definitions programming notes software can suspend updating of the rtc via the set bit in the rtcctlb register (see page 17-16). software selects binary or bcd format via the date_mode bit in the rtcctlb register. software can enable the rtc alarm as an interrupt via the alm_int_enb bit in the rtcctlb register. the alm_int_flg bit in the rtcstac register indicates whether an alarm event has occurred (see page 17-18). 7 6 5 4 3 2 1 0 bit alm_minute [7C0] reset xxxxxxxx r/w r/w! bit name function 7 C 0 alm_ minute [7C0] rtc alarm minute software initializes the alarm minutes value for the rtc by writing data to this bit field in either binary or binary-coded decimal (bcd) format. the alarm minutes component of the rtc time can be read from this bit field. writing a value of c0Cffh to this bit field makes the minutes component of the alarm a wild card. for example, setting the hours and minutes alarm registers to c0h causes an rtc alarm event to be generated once per minute. the wild card based once-per-minute alarm does not occur unless the hours alarm setting is also a wild card. the rtc logic checks once per second to see if an alarm has occurred. valid values for this bit field range from 0 to 59d and all wild card values.
real-time clock registers 17-8 lan?sc520 microcontroller register set manual rtc current hour (rtccurhr) i/o address 70h/71h rtc index 04h register description this register used to initialize and read back the rtc current hour. bit definitions programming notes software selects 12-hour or 24-hour mode via the hour_mode_sel bit in the rtcctlb register (see page 17-17). software can suspend updating of the rtc via the set bit in the rtcctlb register. software selects binary or bcd format via the date_mode bit in the rtcctlb register. 7 6 5 4 3 2 1 0 bit am_pm hour [6C0] reset xxxxxxxx r/w r/w! r/w! bit name function 7am_pm rtc am/pm indicator if the hour_mode_sel bit is 0 in the rtcctlb register (see page 17-17), the am_pm bit is used to indicate whether the current hour is am or pm. 0 = the current hour is am (12-hour mode only). in 24-hour mode, always clear this bit to 0. 1 = the current hour is pm (12-hour mode only). the rtc logic updates this bit field once per second. 6 C 0 hour [6C0] rtc current hour software initializes the hours value for the rtc by writing data to this bit field in either binary or binary-coded decimal (bcd) format. the hours component of the rtc time can be read from this bit field. the rtc logic updates this bit field once per second. in 24-hour mode, valid values for this bit field range from 0 to 23d. in 12-hour mode, valid values for this bit field range from 1 to 12d. if a value outside of the valid range is programmed, the register value (including the am_pm bit) increments up to ffh, wraps around to 0, and only then does the value remain within the valid range.
real-time clock registers lan?sc520 microcontroller register set manual 17-9 rtc alarm hour (rtcalmhr) i/o address 70h/71h rtc index 05h register description this register used to initialize and read back the rtc alarm hour. bit definitions programming notes software selects 12-hour or 24-hour mode via the hour_mode_sel bit in the rtcctlb register (see page 17-17). software can suspend updating of the rtc via the set bit in the rtcctlb register. software selects binary or bcd format via the date_mode bit in the rtcctlb register. software can enable the rtc alarm as an interrupt via the alm_int_enb bit in the rtcctlb register. the alm_int_flg bit in the rtcstac register indicates whether an alarm event has occurred (see page 17-18). 7 6 5 4 3 2 1 0 bit alm_ am_pm alm_hour [6C0] reset xxxxxxxx r/w r/w! r/w! bit name function 7alm_ am_pm rtc alarm am/pm indicator if the hour_mode_sel bit is 0 in the rtcctlb register (see page 17-17), the alm_am_pm bit is used to indicate whether the alarm hour is am or pm. 0 = the alarm hour is am (12-hour mode only). in 24-hour mode, always clear this bit to 0 unless programming a wild card (see the alm_hour bit description). 1 = the alarm hour is pm (12-hour mode only). the rtc logic checks this bit field once per second. 6 C 0 alm_hour [6C0] rtc alarm hour software initializes the alarm hour value for the rtc by writing data to this bit field in either binary or binary-coded decimal (bcd) format. the alarm hours component of the rtc time can be read from this bit field. writing a value of c0Cffh to this register makes the hours component of the alarm a wild card. for example setting the hours alarm register to c0h causes an rtc alarm event to be generated once per hour. note that if this register is written with a wild card when 12-hour mode is selected, the alm_am_pm bit is a dont care because an alarm occurs every hour regardless. the rtc logic checks once per second to see if an alarm has occurred. in 24-hour mode, valid values for this bit field range from 0 to 23d and all wild card values. in 12-hour mode, valid values for this bit field range from 1 to 12d and all wild card values.
real-time clock registers 17-10 lan?sc520 microcontroller register set manual rtc current day of the week (rtccurdow) i/o address 70h/71h rtc index 06h register description this register used to initialize and read back the rtc current day of the week. bit definitions programming notes software can suspend updating of the rtc via the set bit in the rtcctlb register (see page 17-16). software selects binary or bcd format via the date_mode bit in the rtcctlb register. 7 6 5 4 3 2 1 0 bit day_of_week [7C0] reset xxxxxxxx r/w r/w! bit name function 7 C 0 day_of_ week [7C0] rtc current day of the week software initializes the day of week value for the rtc by writing data to this bit field in either binary or binary-coded decimal (bcd) formats. the rtc logic updates this bit field once per second. valid values for this bit field range from 1d to 7d where: 1d = sunday 2d = monday 3d = tuesday 4d = wednesday 5d = thursday 6d = friday 7d = saturday if a value greater than 7d is programmed, the bit field value increments up to ffh, wraps around to 0, and only then does the value remain within the valid range.
real-time clock registers lan?sc520 microcontroller register set manual 17-11 rtc current day of the month (rtccurdom) i/o address 70h/71h rtc index 07h register description this register used to initialize and read back the rtc current day of the month. bit definitions programming notes software can suspend updating of the rtc via the set bit in the rtcctlb register (see page 17-16). software selects binary or bcd format via the date_mode bit in the rtcctlb register. 7 6 5 4 3 2 1 0 bit day_of_mth [7C0] reset xxxxxxxx r/w r/w! bit name function 7 C 0 day_of_mth [7C0] rtc current day of the month software initializes the day of month value for the rtc by writing data to this bit field in either binary or binary-coded decimal (bcd) formats. the rtc logic updates this bit field once per second. valid values for this bit field range from 1 to 31. however, a value in this range is considered invalid if it is inappropriate for the month programmed in the month bit field in the rtccurmon register (see page 17-12). if a value greater than the number of days in the current month is programmed, the bit field value increments up to ffh, wraps around to 0, and only then does the value remain in the valid range. if the month bit field in the rtccurmon register is 2d (february), and the year bit field value in the rtccuryr register (see page 17-13) is a leap year, the day_of_mth bit field does leap year compensation automatically.
real-time clock registers 17-12 lan?sc520 microcontroller register set manual rtc current month (rtccurmon) i/o address 70h/71h rtc index 08h register description this register used to initialize and read back the rtc current month bit definitions programming notes software can suspend updating of the rtc via the set bit in the rtcctlb register (see page 17-16). software selects binary or bcd format via the date_mode bit in the rtcctlb register. 7 6 5 4 3 2 1 0 bit month [7C0] reset xxxxxxxx r/w r/w! bit name function 7 C 0 month [7C0] rtc current month software initializes current month value for the rtc by writing data to this bit field in either binary or binary-coded decimal (bcd) formats. the rtc logic updates this bit field once per second. valid values for this bit field range from 1d to 12d where: 1d = january 2d = february 3d = march 4d = april 5d = may 6d = june 7d = july 8d = august 9d = september 10d = october 11d = november 12d = december if a value greater than 12d is programmed, the bit field value increments up to ffh, wraps around to 0, and only then does the value remain within the valid range.
real-time clock registers lan?sc520 microcontroller register set manual 17-13 rtc current year (rtccuryr) i/o address 70h/71h rtc index 09h register description this register used to initialize and read back the rtc current year bit definitions programming notes software can suspend updating of the rtc via the set bit in the rtcctlb register (see page 17-16). software selects binary or bcd format via the date_mode bit in the rtcctlb register. refer to the rtc chapter in the lan?sc520 microcontroller users manual , order #22004, for guidelines on storing current century information to address year-2000 issues. 7 6 5 4 3 2 1 0 bit year [7C0] reset xxxxxxxx r/w r/w! bit name function 7 C 0 year [7C0] rtc current year software initializes current year value for the rtc by writing data to this bit field in either binary or binary-coded decimal (bcd) formats. the rtc logic updates this bit field once per second. valid values for this bit field range from 0 to 99d. if a value greater than 99d is programmed, the bit field value increments up to ffh, wraps around to 0, and only then does the value remain within the valid range.
real-time clock registers 17-14 lan?sc520 microcontroller register set manual rtc control a (rtcctla) i/o address 70h/71h rtc index 0ah register description the rtc control a register is used to determine if an rtc update is in progress, and to control the rtc internal oscillator and periodic interrupt rate. bit definitions 7 6 5 4 3 2 1 0 bit uip osc_ctl [2C0] rate_sel[3C0] reset xxxxxxxx r/w r! r/w r/w bit name function 7uip update in progress this bit is provided for use by software that needs to modify the time, calendar or alarm registers in the real-time clock. 0 = software has a guaranteed minimum window of 244 m s in which modifications to the time, calendar, and alarm registers are allowed. while the uip bit is 0, the time, calendar, and alarm information in rtc ram is not in transition, and are fully available to software. 1 = the time, calendar, and alarm registers are unavailable for access by software because internal rtc logic is using them. setting the set bit in the rtcctlb register (see page 17-16) inhibits rtc register update cycles and clears the uip status bit. the uip bit is a read-only bit and is not affected by reset. 6 C 4 osc_ctl [2C0] internal oscillator control bits 010 = enable the rtc divider chain to run at the internal time base frequency, which results in one time base update per second. this is the normal operational setting for the osc_ctl bit. 110 = hold the rtc divider chain in the reset state. in this mode, the time and date update cycles do not occur. this mode is useful for precision setting of the clock. time and date update cycles begin 500 milliseconds after the value of 010b is written to this field. 111 = same as 110b. all other values are reserved. setting the osc_ctl value to anything other than 11xb or 010b causes the rtc time base updates to occur at a frequency other than 1hz. these three bits are not affected by an rtc-only reset, and must be initialized to ensure correct operation.
real-time clock registers lan?sc520 microcontroller register set manual 17-15 programming notes 3 C 0 rate_sel [3C0] rate selection the periodic interrupt output of the rtc is internally tied to the programmable interrupt controller (pic) and is available for use. the rate_sel bit field controls the rate at which periodic interrupts are driven to pic as follows: 0000 = periodic interrupt disabled 0001 = 3.906 ms 0010 = 7.812 ms 0011 = 122.070 m s 0100 = 244.141 m s 0101 = 488.281 m s 0110 = 976.563 m s 0111 = 1.953 ms 1000 = 3.906 ms 1001 = 7.812 ms 1010 = 15.625 ms 1011 = 31.250 ms 1100 = 62.500 ms 1101 = 125.000 ms 1110 = 250.000 ms 1111 = 500.000 ms the periodic interrupt is enabled by the per_int_enb bit field in the rtcctlb register (see page 17-16). the per_int_flg bit in the rtcstac register provides latched status for the rtc periodic interrupt event (see page 17-18). bit name function
real-time clock registers 17-16 lan?sc520 microcontroller register set manual rtc control b (rtcctlb) i/o address 70h/71h rtc index 0bh register description the rtc control b register is used to temporarily inhibit rtc updates is in progress, to enable rtc interrupts, and to control date encoding, 12/24-hour mode, and daylight savings. . bit definitions 7 6 5 4 3 2 1 0 bit set per_ int_enb alm_ int_enb upd_ int_enb reserved date_ mode hour_ mode_sel ds_enb reset x0000xxx r/w r/w r/w r/w r/w rsv r/w r/w r/w bit name function 7 set set 0 = time and date update cycles are enabled and occur once per second. 1 = time and date update cycles are disabled, and any update in progress is aborted. the set bit feature is useful for allowing time and date registers to be updated by software without being disturbed by an automatic update cycle occurring during the change. neither internal functions nor rtc-only resets affect the set bit. the set bit should be set to 1 while changing the date_mode, hour_mode_sel, or ds_enb bits; and cleared afterward. 6 per_ int_enb periodic interrupt enable 0 = no rtc periodic interrupt is generated. 1 = the rtc periodic interrupt is enabled. when the per_int_flg bit in the rtcstac register transitions from 0 to 1 (see page 17-18), the rtc periodic interrupt latches the int_flg bit in the rtcstac register to 1 (see page 17-18). if the per_int_flg bit is 1 when the per_int_enb bit is set by software, the int_flg bit is asserted immediately. the per_int_enb bit is not modified by any internal rtc functions, but is cleared by an rtc-only reset. the periodic interrupt rate is configured with the rate_sel bit field in the rtcctla register (see page 17-15). the per_int_flg bit in the rtcstac register provides latched status for the rtc periodic event (see page 17-18). before any rtc interrupt is enabled, the rtcmap register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. 5alm_ int_enb alarm interrupt enable 0 = no rtc alarm interrupt is generated. 1 = the rtc alarm interrupt is enabled. when the alm_int_flg bit in the rtcstac register transitions from 0 to 1 (see page 17-18), the rtc alarm interrupt latches the int_flg bit in the rtcstac register to 1 (see page 17-18). if the alm_int_flg bit is 1 when the alm_int_enb bit is set by software, the int_flg bit is asserted immediately. the alm_int_enb bit is not modified by any internal rtc functions, but is cleared by an rtc-only reset. the alarm interrupt time is configured with the rtcalmsec (page 17-5), rtcalmmin (page 17-7), and rtcalmhr (page 17-9) registers. the alm_int_flg bit in the rtcstac register provides latched status for the rtc alarm event (see page 17-18). before any rtc interrupt is enabled, the rtcmap register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority.
real-time clock registers lan?sc520 microcontroller register set manual 17-17 programming notes 4 upd_ int_enb update-ended interrupt enable 0 = no rtc update ended interrupt is generated. 1 = the rtc update ended interrupt is enabled. when the upd_int_flg bit in the rtcstac register transitions from 0 to 1 (see page 17-19), the rtc update ended interrupt latches the int_flg bit in the rtcstac register to 1 (see page 17-18). if the upd_int_flg bit is 1 when the upd_int_enb bit is set by software, the int_flg bit is asserted immediately. the upd_int_enb bit is not modified by any internal rtc functions, but is cleared by an rtc-only reset, or by writing the set bit to 1. the upd_int_flg bit in the rtcstac register provides latched status for the rtc update ended event (see page 17-19). before any rtc interrupt is enabled, the rtcmap register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. 3 reserved reserved this bit field should be written to 0 for normal system operation. 2date_mode date mode the date_mode bit selects whether time and calendar updates are to use binary or binary- coded decimal (bcd) formats. 0 = rtc time and calendar data use bcd encoding. 1 = rtc time and calendar data use binary encoding. neither internal functions nor rtc-only resets affect this bit. the rtc time and date configuration registers (rtc indexes 0C9h) must be reinitialized after software changes the date_mode bit. software should set the set bit to 1 before changing the date_mode bit and then clear the set bit afterward. 1 hour_ mode_sel 12/24-hour mode select the hour_mode_sel bit selects whether the hours registers use 12- or 24-hour format. 0 = rtc hours registers use 12-hour format. the am/pm bit of each hours register represents pm when 1 and am when 0. 1 = rtc hours registers use 24-hour format. neither internal functions nor rtc-only resets affect this bit. the rtccurhr (page 17-8) and rtcalmhr (page 17-9) registers must be reinitialized after software changes the hour_mode_sel bit. software should set the set bit to 1 before changing the hour_mode_sel bit and then clear the set bit afterward. 0 ds_enb daylight savings enable the ds_enb bit enables special daylight savings time updates. 0 = special daylight savings time updates do not occur. 1 = two special time updates occur automatically when this bit is 1. on the first sunday in april, the time reading that follows 1:59:59 am is 3:00:00 am. on the last sunday in october, the time reading that follows 1:59:59 am is 1:00:00 am. neither internal functions nor rtc-only resets affect this bit. software should set the set bit to 1 before changing the ds_enb bit and then clear the set bit afterward. bit name function
real-time clock registers 17-18 lan?sc520 microcontroller register set manual rtc status c (rtcstac) i/o address 70h/71h rtc index 0ch register description the rtc status c provides rtc interrupt status. bit definitions 7 6 5 4 3 2 1 0 bit int_flg per_ int_flg alm_ int_flg upd_ int_flg reserved reset 0xxx0000 r/w r! rsv bit name function 7int_flg interrupt request flag 0 = the rtc interrupt request to the programmable interrupt controller (pic) is driven inactive. 1 = when this bit transitions from 0 to 1, the rtc interrupt request to the pic is driven active, which generates a cpu interrupt if the rtc interrupt source is enabled at the pic. the int_flg bit is set to 1 when any one (or more) of the per_int_flg, alm_int_flg, or upd_int_flg bits transition from 0 to 1 while the corresponding enable bit is asserted in the rtcctlb register (see page 17-16). the int_flg bit is also set to 1 if an rtc interrupt source enable bit is written to 1 when the associated flag bit is already asserted. the int_flg bit is cleared after read, and is also cleared by an rtc-only reset. if the internal rtc is disabled (via the rtc_dis bit in the adddecctl register, see page 2-3), the internal signal associated with the int_flg status bit is not automatically disconnected from the pic. if the intent is to use an external rtc to drive the rtc interrupt request, then all internal rtc interrupt enables (bits per_int_enb, alm_int_enb, and upd_int_enb) must be cleared in the rtcctlb register prior to disabling the internal rtc (see page 17-16). 6 per_int_flg periodic interrupt flag 0 = an rtc periodic event has not occurred since this bit was cleared. this bit is cleared after read and is also cleared by an rtc-only reset. 1 = an rtc periodic event has occurred. this bit is set when an rtc periodic event occurs regardless of the state of its interrupt enable bit (the per_int_enb bit in the rtcctlb register, page 17-16). the periodic interrupt rate is configured with the rate_sel bit field in the rtcctla register (see page 17-15). 5 alm_int_flg alarm interrupt flag 0 = an rtc alarm event has not occurred since this bit was cleared. this bit is cleared after read and is also cleared by an rtc-only reset. 1 = an rtc alarm event has occurred. this bit is set when an rtc alarm event occurs regardless of the state of its interrupt enable bit (the alm_int_enb bit in the rtcctlb register, page 17-16). alarm events can only occur with a time resolution of one second. an alarm event occurs when the current time contained in the rtccursec, rtccurmin, and rtccurhr registers is equal to the alarm setting configured in the rtcalmsec, rtcalmmin, and rtcalmhr registers (see page 17-4 through page 17-9). the alarm time can contain wildcards for hour, minute, or second settings. a wildcard is any value from c0h to ffh.
real-time clock registers lan?sc520 microcontroller register set manual 17-19 programming notes 4 upd_int_flg update-ended interrupt flag 0 = an rtc update-ended event has not occurred since this bit was cleared. this bit is cleared after read, and is also cleared by an rtc-only reset. 1 = an rtc update-ended event has occurred. this bit is set upon termination of each time/date update cycle. 3 C 0 reserved reserved this bit field should be written to 0 for normal system operation. bit name function
real-time clock registers 17-20 lan?sc520 microcontroller register set manual rtc status d (rtcstad) i/o address 70h/71h rtc index 0dh register description the rtc status d register provides rtc voltage monitor status. bit definitions programming notes the default value for this register (rtcstad) depends on whether an rtc-only reset has occurred. the rtc-only reset occurs when the bbatsen input is sampled to be below the rtc reference voltage prior to a power-on system reset. see the lan?sc520 microcontroller data sheet , order #22003, for the rtc voltage monitor reference voltage. 7 6 5 4 3 2 1 0 bit rtc_vrt reserved reset ?0000000 r/w rrsv bit name function 7rtc_vrt valid ram and time the valid ram and time (rtc_vrt) bit is used to determine the validity of the rtc time, date and cmos ram registers. 0 = indicates that the rtc backup battery, as sensed by the microcontrollers bbatsen pin, was below a fixed reference voltage prior to the application of main system power. (see the lan?sc520 microcontroller data sheet , order #22003, for the rtc voltage monitor reference voltage.) because the rtc reference voltage is too low to keep the rtc logic operational, the rtc date, time, and cmos ram are invalid, and the microcontroller performed an rtc-only reset as a result. an rtc-only reset clears this latched status bit. 1 = reading this bit causes it to be set to 1, and it remains set until an rtc-only reset occurs. note that this bit is not a real-time indication of the state of the external rtc backup battery, although there can be a relationship. for example, if the rtc backup battery is removed while main system power is still applied, this bit still reads back 1 until main system power is cycled. this bit is always set to 0 upon rtc-only reset. this bit is always set to 1 after an initial read to this register is performed. this bit remains set to 1 until an rtc-only reset occurs. rtc- only reset occurs any time the bbatsen input is sampled to be below the rtc reference voltage during a power-on reset. 6 C 0 reserved reserved this bit field should be written to 0 for normal system operation.
real-time clock registers lan?sc520 microcontroller register set manual 17-21 general-purpose cmos ram (114 bytes) (rtccmos) i/o address 70h/71h rtc indexes 0eC7fh register description these registers are the general-purpose cmos ram registers. bit definitions programming notes 7 6 5 4 3 2 1 0 bit rtc_cmos_reg_x [7C0] reset xxxxxxxx r/w r/w bit name function 7 C 0 rtc_cmos_ reg_x [7C0] cmos ram location these are 114 bytes of general-purpose, battery-backed (nonvolatile) cmos ram available for use by system software, applications, etc. in a pc/at-compatible system, many of these bytes can be used by the system bios. the number of bytes used and the meaning of data stored in a given cmos ram byte location can vary between different bios vendors or even between different versions of a single bios. accesses to cmos ram locations can be performed without any regard for rtc operations. for example, date_mode bit has no effect on cmos ram data. if the rtc is disabled (via the rtc_dis bit in the adddecctl register, see page 2-3), the cmos ram is unavailable, but not lost (unless both main and backup power to the internal rtc is removed). re-enabling the rtc allows access to the cmos ram with its contents intact.
real-time clock registers 17-22 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 18-1 chapter 18 uart serial port registers 18.1 overview this chapter describes the universal asynchronous receiver/transmitter (uart) registers of the lansc520 microcontroller. the lansc520 microcontroller includes two industry-standard 16550-compatible uarts. the uart register set includes two groups of registers: n six memory-mapped configuration region (mmcr) registers are used to configure and control uart functions specific to the lansc520 microcontroller. n 24 direct-mapped i/o registers are used for industry-standard uart configuration, control, and status functions. see the lan?sc520 microcontroller users manual , order #22004, for details about the uarts. table 18-1 and table 18-2 list each type of uart register in offset order, with the corresponding descriptions page number. 18.2 registers table 18-1 uart mmcr registers register name mnemonic mmcr offset page number uart 1 general control uart1ctl cc0h page 18-3 uart 1 general status uart1sta cc1h page 18-4 uart 1 fifo control shadow uart1fcrshad cc2h page 18-5 uart 2 general control uart2ctl cc4h page 18-3 uart 2 general status uart2sta cc5h page 18-4 uart 2 fifo control shadow uart2fcrshad cc6h page 18-5 table 18-2 uart direct-mapped registers register name mnemonic i/o address page number uart 2 transmit holding uart2thr 02f8h page 18-7 uart 2 receive buffer uart2rbr 02f8h page 18-8 uart 2 baud clock divisor latch lsb uart2bcdl 02f8h page 18-9 uart 2 baud clock divisor latch msb uart2bcdh 02f9h page 18-10 uart 2 interrupt enable uart2intenb 02f9h page 18-11 uart 2 interrupt id uart2intid 02fah page 18-12 uart 2 fifo control uart2fcr 02fah page 18-15 uart 2 line control uart2lcr 02fbh page 18-17 uart 2 modem control uart2mcr 02fch page 18-19 uart 2 line status uart2lsr 02fdh page 18-21 uart 2 modem status uart2msr 02feh page 18-23
uart serial port registers 18-2 lan?sc520 microcontroller register set manual uart 2 scratch pad uart2scratch 02ffh page 18-25 uart 1 transmit holding uart1thr 03f8h page 18-7 uart 1 receive buffer uart1rbr 03f8h page 18-8 uart 1 baud clock divisor latch lsb uart1bcdl 03f8h page 18-9 uart 1 baud clock divisor latch msb uart1bcdh 03f9h page 18-10 uart 1 interrupt enable uart1intenb 03f9h page 18-11 uart 1 interrupt id uart1intid 03fah page 18-12 uart 1 fifo control uart1fcr 03fah page 18-15 uart 1 line control uart1lcr 03fbh page 18-17 uart 1 modem control uart1mcr 03fch page 18-19 uart 1 line status uart1lsr 03fdh page 18-21 uart 1 modem status uart1msr 03feh page 18-23 uart 1 scratch pad uart1scratch 03ffh page 18-25 table 18-2 uart direct-mapped registers (continued) register name mnemonic i/o address page number
uart serial port registers lan?sc520 microcontroller register set manual 18-3 memory-mapped uart 1 general control (uart1ctl) mmcr offset cc0h uart 2 general control (uart2ctl) mmcr offset cc4h register description this register is used to enable or disable the transmit and receive transfer count (tc) interrupt and also select from two internal baud-rate clock sources. bit definitions programming notes each uart can generate an interrupt when the transfer count (gptc) signal associated with dma transfers is asserted. table 18-5 on page 18-14 provides a summary of uart interrupt sources. 7 6 5 4 3 2 1 0 bit reserved clk_src rxtc_enb txtc_enb reset 00000000 r/w rsv r/w r/w r/w bit name function 7C3 reserved reserved this bit field should be written to 0 for normal system operation. 2 clk_src uart x clock source enable 0 = 18.432 mhz 1 = 1.8432 mhz 1 rxtc_enb uart x receive tc interrupt enable 0 = receive tc interrupt disable 1 = receive tc interrupt enable 0 txtc_enb uart x transmit tc interrupt enable 0 = transmit tc interrupt disable 1 = transmit tc interrupt enable
uart serial port registers 18-4 lan?sc520 microcontroller register set manual memory-mapped uart 1 general status (uart1sta) mmcr offset cc1h uart 2 general status (uart2sta) mmcr offset cc5h register description this register shows the status of transfer count (tc) interrupt detected for the uart. these bits are cleared by writing a 1 to them. bit definitions programming notes each uart can generate an interrupt when the transfer count (gptc) signal associated with dma transfers is asserted. table 18-5 on page 18-14 provides a summary of uart interrupt sources. 7 6 5 4 3 2 1 0 bit reserved rxtc_det txtc_det reset 00000000 r/w rsv r/w! r/w! bit name function 7C2 reserved reserved this bit field should be written to 0 for normal system operation. 1 rxtc_det uart x receive tc detected when reading: 0 = tc not detected 1 = tc detected this bit is cleared by writing a 1. 0 txtc_det uart x transmit tc detected when reading: 0 = tc not detected 1 = tc detected this bit is cleared by writing a 1.
uart serial port registers lan?sc520 microcontroller register set manual 18-5 memory-mapped uart 1 fifo control shadow (uart1fcrshad) mmcr offset cc2h uart 2 fifo control shadow (uart2fcrshad) mmcr offset cc6h register description this register is provided for reading the information written to the uart x fifo control (uartxfcr) register (see page 18-15), because the uartxfcr register is write-only. writing to this shadow register has no effect. bit definitions 7 6 5 4 3 2 1 0 bit rfrt[1 C 0] reserved dma_ mode tf_clr rf_clr fifo_enb reset 00000000 r/w r rsv rrrr bit name function 7C6 rfrt[1C0] receiver fifo register trigger bits in 16550-compatible mode, this bit field specifies the trigger level at which the int_id bit field in the uartxintid register (see page 18-13) reports that a received data available interrupt is pending. if received data available interrupts are enabled in the uartxintenb register (page 18-11), the system is interrupted when the receive fifo fills to the trigger level as follows: 00 = 1 byte 01 = 4 bytes 10 = 8 bytes 11 = 14 bytes when the data in the receive fifo falls below the specified trigger level, the interrupt is cleared. 5C4 reserved reserved this bit field should be written to 0 for normal system operation. 3dma_mode dma mode this bit is valid only in 16550-compatible mode. in 16450-compatible mode, the dma operation is defined as if this bit were set to 0. 0 = the internal rxdrq signal to the dma controller goes high when there is at least one character in the receiver fifo or the uartx receive buffer register (see page 18-8). the internal txdrq signal goes high when the transmitter fifo (16550-compatible mode) or the uartx transmit holding register (page 18-7) (16450-compatible mode) is not full. 1 = the internal rxdrq signal goes high when the trigger level or the time-out has been reached, and then it goes inactive when there are no more characters in the fifo or holding register. for transmit, the internal txdrq signal goes high when the transmitter fifo is not full and remains high until the transmitter fifo is completely full. 2tf_clr transmitter fifo clear because the direct-mapped version of this bit is self-clearing, it always reads back 0. 1rf_clr receiver fifo clear because the direct-mapped version of this bit is self-clearing, it always reads back 0.
uart serial port registers 18-6 lan?sc520 microcontroller register set manual programming notes uartxfcrshad is a shadow register for the write-only uart x fifo control (uartxfcr) register (see page 18-15). 0 fifo_enb fifo enabled (16550-compatible mode enabled) 0 = the uart is in 16450-compatible mode. accesses to receive and transmit fifos and to all fifo control bits (except fifo_enb) in the write-only uart x fifo control (uartxfcr) register are disabled (see page 18-15). 1 = the uart is in 16550-compatible mode. accesses to receive and transmit fifos and to all fifo control bits in the write-only uartxfcr register are en abled. this bit must be 1 when other uartxfcr register bits are written to or they cannot be programmed. any mode switch clears both fifos. bit name function
uart serial port registers lan?sc520 microcontroller register set manual 18-7 direct-mapped uart 2 transmit holding (uart2thr) i/o address 02f8h uart 1 transmit holding (uart1thr) i/o address 03f8h register description this is a write-only register used to write data to be transmitted. this register can be accessed only when the dlab bit is 0 in the uartxlcr register (see page 18-17). bit definitions programming notes when the dlab bit is 0 in the uartxlcr register (see page 18-17), reads from this address access the uart x receive buffer (uartxrbr) register (see page 18-8), and writes to this address access the uart x transmit holding (uartxthr) register. when the dlab bit is 1 in the uartxlcr register, reads from and writes to this address access the uart x baud clock divisor latch lsb (uartxbcdl) register (see page 18-9). 7 6 5 4 3 2 1 0 bit thr [7C0] reset 00000000 r/w w! bit name function 7C0 thr[7C0] uart x transmit holding register when the dlab bit is 0 in the uart x line control (uartxlcr) register (see page 18-17) and the thre bit is 1 in the uart x line status (uartxlsr) register (see page 18-21), writing a byte to this bit field causes the byte to be transmitted.
uart serial port registers 18-8 lan?sc520 microcontroller register set manual direct-mapped uart 2 receive buffer (uart2rbr) i/o address 02f8h uart 1 receive buffer (uart1rbr) i/o address 03f8h register description this is a read-only register used to read received data. this register can be accessed only when the dlab bit is 0 in the uartxlcr register (see page 18-17). bit definitions programming notes when the dlab bit is 0 in the uartxlcr register (see page 18-17), reads from this address access the uart x receive buffer (uartxrbr) register, and writes to this address access the uart x transmit holding (uartxthr) register (see page 18-7). when the dlab bit is 1 in the uartxlcr register, reads from and writes to this address access the uart x baud clock divisor latch lsb (uartxbcdl) register (see page 18-9). 7 6 5 4 3 2 1 0 bit rbr [7C0] reset 00000000 r/w r! bit name function 7C0 rbr[7C0] uart x receive buffer when the dlab bit is 0 in the uart x line control (uartxlcr) register (see page 18-17) and the dr bit is 1 in the uart x line status (uartxlsr) register (see page 18-21), this bit field contains valid data received over the serial line. reading this bit field returns the last byte received (in 16450-compatible mode) or the head of the receive fifo (in 16550-compatible mode).
uart serial port registers lan?sc520 microcontroller register set manual 18-9 direct-mapped uart 2 baud clock divisor latch lsb (uart2bcdl) i/o address 02f8h uart 1 baud clock divisor latch lsb (uart1bcdl) i/o address 03f8h register description this register contains bits div[7C0] of the16-bit baud-rate clock divisor used to generate the 16x baud clock. the baud-rate clock divisor can only be accessed when the dlab bit is 1 in the uartxlcr register (see page 18-17). the div[15C8] bits are located in the uartxbcdh register (see page 18-10). bit definitions programming notes setting the div[15C0] bit field to 0000h is not supported. when the dlab bit is 0 in the uartxlcr register (see page 18-17), reads from this address access the uart x receive buffer (uartxrbr) register (see page 18-8), and writes to this address access the uart x transmit holding (uartxthr) register (see page 18-7). when the dlab bit is 1 in the uartxlcr register, reads from and writes to this address access the uart x baud clock divisor latch lsb (uartxbcdl) register. the clock source frequency is selected by the clk_src bit in the uartxctl register (see page 18-3). table 18- 3 lists the divisor value (in decimal and hexadecimal) to use with each clock frequency to achieve common baud rates. 7 6 5 4 3 2 1 0 bit div[7 C 0] reset 00000000 r/w r/w bit name function 7C0 div[7C0] uart x baud clock divisor latch when the dlab bit is 1 in the uartxlcr register (see page 18-17), this bit field holds the least significant byte of a 16-bit baud-rate clock divisor that is used to generate the 16x baud clock. table 18-3 baud rates, divisors, and clock source baud rate div[15C0] (decimal) div[15C0] (hexadecimal) 1.8432 mhz 18.432 mhz 1.8432 mhz 18.432 mhz 300 baud 384d 3840d 0180h 0f00h 600 baud 192d 1920d 00c0h 0780h 2400 baud 48d 480d 0030h 01e0h 4800 baud 24d 240d 0018h 00f0h 7200 baud 16d 160d 000fh 00a0h 9600 baud 12d 120d 000ch 0078h 14.4 kbaud 8d 80d 0008h 0050h 19.2 kbaud 6d 60d 0006h 003ch 57.6 kbaud 2d 20d 0002h 0014h 115.2 kbaud 1d 10d 0001h 000ah 144 kbaud 8d 0008h 192 kbaud 6d 0006h 288 kbaud 4d 0004h 576 kbaud 2d 0002h 1.152 mbaud 1d 0001h
uart serial port registers 18-10 lan?sc520 microcontroller register set manual direct-mapped uart 2 baud clock divisor latch msb (uart2bcdh) i/o address 02f9h uart 1 baud clock divisor latch msb (uart1bcdh) i/o address 03f9h register description this register contains bits div[15C8] of the16-bit baud-rate clock divisor used to generate the 16x baud clock. the baud-rate clock divisor can only be accessed when the dlab bit is 1 in the uartxlcr register (see page 18-17). the div[7C0] bits are located in the uartxbcdl register (see page 18-9). bit definitions programming notes setting the div[15C0] bit field to 0000h in the uartxbcdl and uartxbcdh registers is not supported. when the dlab bit is 0 in the uartxlcr register (see page 18-17), reads from and writes to this address access the uart x interrupt enable (uartxintenb) register (see page 18-11). when the dlab bit is 1 in the uartxlcr register, reads from and writes to this address access the uart x baud clock divisor latch msb (uartxbcdh) register. the clock source frequency is selected by the clk_src bit in the uartxctl register (see page 18-3). table 18- 3 on page 18-9 lists the divisor value (in decimal and hexadecimal) to use with each clock frequency to achieve common baud rates. 7 6 5 4 3 2 1 0 bit div[15 C 8] reset 00000000 r/w r/w bit name function 7C0 div[15C8] uart x baud clock divisor latch when the dlab bit is 1 in the uartxlcr register (see page 18-17), this bit field holds the most significant byte of the 16-bit baud-rate clock divisor that is used to generate the 16x baud clock.
uart serial port registers lan?sc520 microcontroller register set manual 18-11 direct-mapped uart 2 interrupt enable (uart2intenb) i/o address 02f9h uart 1 interrupt enable (uart1intenb) i/o address 03f9h register description this register enables the following serial port interrupts: modem status, receiver line status, transmitter holding register empty, received data available, and time-out interrupt. this register can be accessed only when the dlab bit is 0 in the uartxlcr register (see page 18-17). each interrupt can individually activate the interrupt request signal. bit definitions programming notes table 18-5 on page 18-14 provides a summary of uart interrupt sources. when the dlab bit is 0 in the uartxlcr register (see page 18-17), reads from and writes to this address access the uart x interrupt enable (uartxintenb) register. when the dlab bit is 1 in the uartxlcr register, reads from and writes to this address access the uart x baud clock divisor latch msb (uartxbcdh) register (see page 18-10). 7 6 5 4 3 2 1 0 bit reserved emsi erlsi ethrei erdai reset 00000000 r/w rsv r/w r/w r/w r/w bit name function 7C4 reserved reserved this bit field should be written to 0 for normal system operation. 3emsi enable modem status interrupt 0 = disable modem status interrupt. 1 = enable modem status interrupt. 2erlsi enable receiver line status interrupt 0 = disable receiver line status interrupt. 1 = enable receiver line status interrupt. 1 ethrei enable transmitter holding register empty interrupt 0 = disable transmitter holding register empty interrupt. 1 = enable transmitter holding register empty interrupt. 0erdai enable received data available interrupt 0 = disable data available interrupt in 16450-compatible mode; in 16550-compatible mode, disable fifo trigger level reached interrupt and time-out interrupt. 1 = enable received data available interrupt in 16450-compatible mode; in 16550-compatible mode, this bit also enables fifo trigger level reached interrupt and time-out interrupt. more detail on time-out interrupts can be found in the uartxintid register description (page 18-12).
uart serial port registers 18-12 lan?sc520 microcontroller register set manual direct-mapped uart 2 interrupt id (uart2intid) i/o address 02fah uart 1 interrupt id (uart1intid) i/o address 03fah register description this read-only register is used to identify uart interrupts and the current fifo mode. writes to this address access the uart x fifo control (uartxfcr) register (see page 18-15). bit definitions 7 6 5 4 3 2 1 0 bit fifo_mode[1 C0] reserved int_id[2C0] int_not_ pnd reset 00000001 r/w rr rsv rrrr bit name function 7C6 fifo_mode [1C0] fifo mode indication fifo is only present when 16550-compatible mode is enabled: 00 = 16450-compatible mode is enabled 01 = no significance 10 = no significance 11 = 16550-compatible mode is enabled the fifo mode is selected by the fifo_enb bit in the uartxfcr register (see page 18-16). 5C4 reserved reserved these bits always read back 00b.
uart serial port registers lan?sc520 microcontroller register set manual 18-13 programming notes table 18-5 on page 18-14 provides a summary of uart interrupt sources. interrupts generated by the uart are cleared in a variety of ways, depending on the source event. for details about clearing a particular event, see the events status bit description. table 18-5 on page 18-14 lists interrupt status registers and bits. for additional information, see the lan?sc520 microcontroller users manual , order #22004. 3C1 int_id[2C0] interrupt identification bit field the int_id bit field indicates only the highest priority interrupt (as defined in table 18-4) when two interrupt sources are pending simultaneously. when the interrupt source is cleared, a subsequent read from the int_id bit field returns the next highest priority interrupt source. the int_id bit field has no meaning if the int_not_pnd bit is 1. in 16450-compatible mode, the int_id[2] bit always reads back 0. a receiver fifo trigger occurs when the data in the receive fifo fills to the level set in the rfrt bit field of the uartxfcr register (see page 18-15). a fifo time-out occurs when the receive fifo is not empty, and more than four continuous character times have elapsed without more data being placed into or read out of the receive fifo. reading a character from the receive fifo clears the time-out interrupt. see the uartxlsr and uartxmsr register descriptions on page 18-21 and page 18-23 for information about the other interrupt events identified by the int_id bit field. 0int_not_ pnd no serial port interrupt pending 0 = interrupt pending 1 = no interrupt pending bit name function table 18-4 uart interrupt identification and priority int_id bit field description identification priority 000b modem status fourth (lowest) 001b transmit holding register empty (16540-compatible mode)/transmit fifo empty (16550-compatible mode) third 010b received data available (16540-compatible mode)/ receiver fifo trigger (16550-compatible mode) second 011b receive line status first (highest) 100b not used 101b not used 110b fifo time-out second 111b not used
uart serial port registers 18-14 lan?sc520 microcontroller register set manual table 18-5 uart interrupt programming summary interrupt description enable register 1, 2 notes: 1. before any uart interrupt is enabled, the corresponding uartxmap register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. 2. the out2 bit in the uartxmcr register (page 18-19) is used as a master control for uart interrupts. the out2 bit must be set for uart interrupts to be generated. status bits can be read even when interrupts are disabled. status register 3 3. if two of the interrupts enabled in the uartxintenb register are pending simultaneously, the highest-priority interrupt is i den- tified in the int_id bit field of the uartxintid register (see page 18-13). source event polled status bit receive dma transfer count uartxctl, page 18-3 uartxsta, page 18-4 uart x receive tc detected rxtc_det transmit dma transfer count uart x transmit tc detected txtc_det modem status change uartxintenb, page 18-11 uartxmsr, page 18-23 delta data carrier detect ddcd trailing edge ring indicator teri delta data set ready ddsr delta clear to send dcts receiver line status uartxlsr, page 18-21 break indicator bi framing error fe parity error pe overrun error oe transmitter holding register empty transmit holding register (16450- compatible mode) or transmitter fifo (16550-compatible mode) empty thre received data available data ready (16450-compatible mode) dr 4 4. there are no polled-status bits for the fifo trigger level and fifo time-out events. these events are indicated by the int_i d bit field only (see page 18-13). fifo trigger level reached (16550-compatible mode) fifo time-out 5 5. the fifo time-out interrupt is enabled with the received data available interrupt by the erdai bit in the uartxintenb regist er (see page 18-11). fifo time-out (16550-compatible mode)
uart serial port registers lan?sc520 microcontroller register set manual 18-15 direct-mapped uart 2 fifo control (uart2fcr) i/o address 02fah uart 1 fifo control (uart1fcr) i/o address 03fah register description this is a write-only register used to enable and control the fifo in 16550-compatible mode. reads to this address access the uart x interrupt id (uartxintid) register (see page 18-12). bit definitions 7 6 5 4 3 2 1 0 bit rfrt[1C0] reserved dma_ mode tf_clr rf_clr fifo_enb reset 00000000 r/w ww rsv wwww bit name function 7C6 rfrt[1C0] receiver fifo register trigger bits in 16550-compatible mode, this bit field specifies the trigger level at which the int_id bit field in the uartxintid register (see page 18-13) reports that a received data available interrupt is pending. if received data available interrupts are enabled in the uartxintenb register (page 18-11), the system is interrupted when the receive fifo fills to the trigger level as follows: 00 = 1 byte 01 = 4 bytes 10 = 8 bytes 11 = 14 bytes when the data in the receive fifo falls below the specified trigger level, the interrupt is cleared. 5C4 reserved reserved these bits should be written to 0 for normal system operation. 3dma_mode dma mode this bit is valid only in 16550-compatible mode. in 16450-compatible mode, the dma operation is defined as if this bit were set to 0. 0 = the internal rxdrq signal to the dma controller goes high when there is at least one character in the receiver fifo or the uartx receive buffer register (see page 18-8). the txdrq signal goes high when the transmitter fifo (16550-compatible mode) or the uartx transmit holding register (page 18-7) (16450-compatible mode) is not full. 1 = the internal rxdrq signal goes high when the trigger level or the time-out has been reached, and then it goes inactive when there are no more characters in the fifo or holding register. for transmit, the txdrq signal goes high when the transmitter fifo is not full and remains high until the transmitter fifo is completely full. 2tf_clr transmitter fifo clear 0 = writing a 0 to this bit has no effect. this bit is self-clearing and does not need to be reset by software. 1 = writing a 1 to this bit position clears the transmit fifo and resets the transmit fifo counter logic. it does not clear the transmitter shift register. 1rf_clr receiver fifo clear 0 = writing a 0 to this bit has no effect. this bit is self-clearing and does not need to be reset by software. 1= writing a 1 to this bit position clears the receive fifo and resets the receive fifo counter logic. it does not clear the receive shift register.
uart serial port registers 18-16 lan?sc520 microcontroller register set manual programming notes the contents of this write-only register can be read back via the uart x fifo control shadow (uartxfcrshad) register (see page 18-5). 0 fifo_enb fifo enable 0 = causes the uart to enter 16450-compatible mode. disables accesses to receive and transmit fifos and all fifo control bits, except this bit. 1 = causes the uart to enter 16550-compatible mode. enables receive and transmit fifo buffers, and enables accesses to other fifo control bits. bit name function
uart serial port registers lan?sc520 microcontroller register set manual 18-17 direct-mapped uart 2 line control (uart2lcr) i/o address 02fbh uart 1 line control (uart1lcr) i/o address 03fbh register description this register is used to configure the format of the uart frame for data transfer, including character length, stop bits, and parity. the dlab bit is used to gain access to the baud-rate divisor latches or the uartxthr and uartxrbr registers. bit definitions 7 6 5 4 3 2 1 0 bit dlab sb sp eps penb stp wls[1C0] reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w bit name function 7dlab divisor latch access 0 = software can access the transmit holding, receive buffer, and interrupt enable registers: uartxthr (page 18-7), uartxrbr (page 18-8), and uartxintenb (page 18-11). 1 = software can access the baud rate divisor latch registers: uartxbcdl (page 18-9) and uartxbcdh (page 18-10). 6sb set break enable setting this bit causes a break condition to be transmitted to the receiving uart. 0 = disable set break. 1 = force serial output to spacing state (logic 0) regardless of other transmitter activity. the break control acts on the soutx pin only and has no other effect on the transmitter logic. 5 sp stick parity enable stick parity forces the parity bit to be always 0 or 1. 0 = stick parity is disabled. if parity is enabled (by the penb bit), normal parity is used: the parity bit dynamically changes so the number of 1 bits in the transmitted data is always odd or even (depending on the eps bit). 1 = stick parity is enabled. if parity is enabled, the parity bit is always 0 or 1. if bits sp, eps, and penb are 1, the parity bit is generated and checked as 0. if bits sp and penb are 1 and eps is 0, the parity bit is generated and checked as 1. 4 eps even parity select parity must be enabled via the penb bit for this bit to have meaning: 0 = odd parity. the parity bit is manipulated to force an odd number of 1 bits in the transmitted data and the same condition is checked for in the received data. 1 = even parity. the parity bit is manipulated to force an even number of 1 bits in the transmitted data and the same condition is checked for in the received data. start and stop bits are not included in the parity generation and checking scheme. 3 penb parity enable 0 = parity is disabled. 1 = parity is enabled. a parity bit is generated in the transmitted data and checked in the received data. the parity bit is located between the last data-word bit and the first stop bit in the bit stream.
uart serial port registers 18-18 lan?sc520 microcontroller register set manual programming notes 2stp stop bits this bit sets the number of stop bits used, based on the character length set in the wsl bit field: if wsl = 00b (5-bit words): 0 = 1 stop bit 1 = 1.5 stop bits if wsl = 01C11b (6-, 7-, or 8-bit words): 0 = 1 stop bit 1 = 2 stop bits 1C0 wls[1C0] transmit/receive word length select this bit field sets the uart data word length. 00 = 5 bits 01 = 6 bits 10 = 7 bits 11 = 8 bits bit name function
uart serial port registers lan?sc520 microcontroller register set manual 18-19 direct-mapped uart 2 modem control (uart2mcr) i/o address 02fch uart 1 modem control (uart1mcr) i/o address 03fch register description this register is used to control the interface with the modem or peripheral device. it is used to enable interrupts from the uart, enable loopback diagnostic mode, or assert rtsx or dtrx . bit definitions 7 6 5 4 3 2 1 0 bit reserved loop out2 out1 rts dtr reset 00000000 r/w rsv r/w r/w r/w r/w r/w bit name function 7C5 reserved reserved this bit field should be written to 0 for normal system operation. 4loop loopback mode (diagnostic mode) enable 0 = loopback mode is disabled 1 = loopback mode is enabled the following internal connections are made by setting this diagnostic bit: rtsx is internally connected to ctsx . dtrx is internally connected to dsrx . out1 is internally connected to rinx . out2 is internally connected to dcdx . also, the soutx pin is driven high, the sin input line is blocked, and interrupt generation to the pic is disabled. the transmit shift register is directly connected to the receive shift register. in addition, the dtrx and rtsx signals, and the internal out1 and out2 signals are forced inactive. modem status events (uartxmsr register, see page 18-23) can be forced by setting the emsi bit in the uartxintenb register (see page 18-11), and changing one of the bits out2, out1, rts, or dtr in this register (uartxmcr) in loopback mode. 3out2 enable uart x interrupts this bit controls the internal out2 signal, which is used internally as a master enable for uart x interrupts when loopback mode is disabled. 0 = no uart x interrupt requests are sensed at the programmable interrupt controller (pic). 1 = uart x interrupt requests are enabled. in loopback mode, the internal out2 signal is internally connected to the dcdx signal, which can be read via the dcd bit in the uartxmsr register (see page 18-23). 0 = in loopback mode, the out2 signal forces dcdx high (deasserted). 1 = in loopback mode, the out2 signal forces dcdx low (asserted). 2out1 out1 control this bit controls the internal out1 signal, which is not used when loopback mode is disabled. it is provided for pc/at compatibility and for use as part of the loopback diagnostics. 0 = in loopback mode, the out1 signal forces rinx high (deasserted). 1 = in loopback mode, the out1 signal forces rinx low (asserted). in loopback mode, the internal out1 signal is internally connected to the rinx signal, which can be read via the rin bit in the uartxmsr register (see page 18-23). other than that, the out1 bit has no effect on system operation and can be used as a scratch pad during normal system operation.
uart serial port registers 18-20 lan?sc520 microcontroller register set manual programming notes 1rts request to send in normal operation (loopback mode disabled), this bit is the complement of the rtsx signal. 0 = rtsx is forced high, deasserting the signal. 1 = rtsx is forced low, asserting the signal. in loopback mode, the rtsx signal is internally connected to the ctsx signal, which can be read via the cts bit in the uartxmsr register (see page 18-23). 0dtr data terminal ready in normal operation (loopback mode disabled), this bit is the complement of the dtrx signal. 0 = dtrx is forced high, deasserting the signal. 1 = dtrx is forced low, asserting the signal. in loopback mode, the dtrx signal is internally connected to the dsrx signal, which can be read via the dsr bit in the uartxmsr register (see page 18-23). bit name function
uart serial port registers lan?sc520 microcontroller register set manual 18-21 direct-mapped uart 2 line status (uart2lsr) i/o address 02fdh uart 1 line status (uart1lsr) i/o address 03fdh register description this read-only register shows the status of the data transfer, with indicators for transmitter or transmit holding register empty, break detected, framing error, parity error, overrun error, and received data ready. bit definitions 7 6 5 4 3 2 1 0 bit err_in_ fifo temt thre bi fe pe oe dr reset 01100000 r/w r! r! r! r! r! r! r! r! bit name function 7 err_in_fifo 16550-compatible mode error 0 = in 16550-compatible mode, there is no parity error, framing error, or break condition in the receive fifo. in 16450-compatible mode, this bit always reads back 0. 1 = at least one parity error, framing error or break condition is present in the receive fifo (16550-compatible mode only). this bit is cleared by a read from this register (uartxlsr) or by a read from the receiver fifo when there are no more error conditions present in the fifo. 6 temt transmitter empty indicator 0 = the transmit shift register still has data to transmit. 1 = in 16450-compatible mode, both the transmit holding register and the transmit shift register are empty. in 16550-compatible mode, both the transmit fifo and the transmit shift register are empty. 5 thre transmit holding register (16450-compatible mode) or transmitter fifo (16550- compatible mode) empty 0 = the transmitter still has data to place in the transmit shift register. 1 = in 16450-compatible mode, the transmit holding register is ready to accept a new character. in 16550-compatible mode, the transmit fifo is completely empty. in 16450-compatible mode, this bit is automatically reset by a write to the uartxthr register (see page 18-7). in 16550-compatible mode, this interrupt is cleared when the transmit fifo is written to. this bit can be used to generate an interrupt if programmed to do so via the interrupt enable register. 4bi break indicator 0 = there is no break indication associated with the current character. 1 = in 16450-compatible mode, this bit is set when the uart has detected that the sending uart has transmitted a break condition for a period longer than the time it takes to receive start, data, parity and stop bits. in 16550-compatible mode, this bit is set when an entire word (start, data, parity, stop) that was received into the fifo with break indication present is now at the top of the fifo. only one break indication is loaded into the fifo regardless of the duration of the break condition. a new character is not loaded into the fifo until the next valid start bit is detected. this latched status bit is automatically cleared by a read from this register (uartxlsr).
uart serial port registers 18-22 lan?sc520 microcontroller register set manual programming notes when a receiver line status interrupt is enabled and detected, bits bi, fe, pe, and oe in this register indicate the reason for the interrupt. the status bits are valid even when line status interrupts are not enabled. 3fe framing error 0 = no framing error has been reported since line status was last read. 1 = in 16450-compatible mode, this bit is set to indicate that a received character did not have a valid stop bit. in 16550-compatible mode, this bit is set when a character that was received into the fifo with a framing error is at the top of the receive fifo. this latched status bit is automatically cleared by a read from this register (uartxlsr). 2pe parity error 0 = there is no parity error associated with the current character. 1 = in 16450-compatible mode, this bit is set upon receipt of data with incorrect parity. in 16550-compatible mode, this bit is set when a character that was received into the fifo with bad parity is at the top of the receive fifo. this latched status bit is automatically cleared by a read from this register (uartxlsr). 1oe overrun error 0 = no overrun error has been reported since line status was last read. 1 = in 16450-compatible mode, this bit is set if a new character is received into the receiver buffer before a previous character was read, thus resulting in lost data. in 16550- compatible mode, this bit is set if a new character is completely received into the shift register when the fifo is already 100% full. data in the fifo is not overwritten by this overrun. the data in the shift register is lost when the next character is received. this latched status bit is automatically cleared by a read from this register (uartxlsr). 0dr data ready 0 = there is no received data ready to read. 1 = in 16450-compatible mode, this bit is set when a character has been received and placed in the receive buffer register. in 16550-compatible mode, this bit is set when a character has been received and placed in the receive fifo. in 16450-compatible mode, this bit is automatically cleared by reading the uartxrbr register (see page 18-8). in 16550-compatible mode, this bit is automatically cleared by reading the receiver fifo, assuming that no more data is present in the fifo. bit name function
uart serial port registers lan?sc520 microcontroller register set manual 18-23 direct-mapped uart 2 modem status (uart2msr) i/o address 02feh uart 1 modem status (uart1msr) i/o address 03feh register description this read-only register contains both real-time and latched control line status bits for the uarts dcdx , rinx , dsrx and ctsx input signals. bit definitions 7 6 5 4 3 2 1 0 bit dcd ri dsr cts ddcd teri ddsr dcts reset ????0000 r/w rrrrr!r!r!r! bit name function 7 dcd data carrier detect in normal operation (loopback mode disabled), this bit is the complement of the dcd x signal. 0 = dcd x input signal is high (deasserted). 1 = dcd x input signal is low (asserted). if in loopback mode, this bit tracks the out2 bit in the uartxmcr register (see page 18-19). 6ri ring indicator in normal operation (loopback mode disabled), this bit is the complement of the rin x signal. 0 = rin x input signal is high (deasserted). 1 = rin x input signal is low (asserted). if in loopback mode, this bit tracks bit out1 bit in the uartxmcr register (see page 18-19). 5dsr data set ready in normal operation (loopback mode disabled), this bit is the complement of the dsr x signal. 0 = dsr x input signal is high (deasserted). 1 = dsr x input signal is low (asserted). if in loopback mode, this bit tracks bit dtr bit in the uartxmcr register (see page 18-20). 4cts clear to send in normal operation (loopback mode disabled), this bit is the complement of the cts x signal. 0 = cts x input signal is high (deasserted). 1 = cts x input signal is low (asserted). if in loopback mode, this bit tracks bit rts bit in the uartxmcr register (see page 18-20). 3 ddcd delta data carrier detect 0 = indicates that the dcd x signal has not changed since this register (uartxmsr) was last read. 1 = indicates that the dcd x signal changed since the uartxmsr register was last read. 2 teri trailing edge ring indicator 0 = indicates that the rin x signal has not changed from an active to an inactive state since this register (uartxmsr) was last read. 1 = indicates that the rin x signal changed from an active to an inactive state since the uartxmsr register was last read.
uart serial port registers 18-24 lan?sc520 microcontroller register set manual programming notes bits dcd, ri, dsr, and cts are real-time status indicators (inverted) for the corresponding uart input signals. ddcd, teri, ddsr, and dcts are latched status bits that generate an interrupt if modem status interrupts are unmasked in the uart x interrupt enable (uartxintenb) register. reading this register (uartxmsr) clears these bits and the associated interrupt. 1 ddsr delta data set ready 0 = indicates that the dsr x signal has not changed since this register (uartxmsr) was last read. 1 = indicates that the dsr x signal changed since the uartxmsr register was last read. 0 dcts delta clear to send 0 = indicates that the cts x signal has not changed since this register (uartxmsr) was last read. 1 = indicates that the cts x signal changed since the uartxmsr register was last read. bit name function
uart serial port registers lan?sc520 microcontroller register set manual 18-25 direct-mapped uart 2 scratch pad (uart2scratch) i/o address 02ffh uart 1 scratch pad (uart1scratch) i/o address 03ffh register description this location can be used to hold temporary data and is not required for serial data transfer. bit definitions programming notes 7 6 5 4 3 2 1 0 bit scratch[7 C 0] reset 00000000 r/w r/w bit name function 7C0 scratch [7C0] scratch bits general-purpose i/o location, not required for serial data transfer.
uart serial port registers 18-26 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 19-1 chapter 19 synchronous serial interface registers 19.1 overview this chapter describes the synchronous serial interface (ssi) registers of the lansc520 microcontroller. the ssi provides efficient full-duplex or half-duplex bidirectional communication with peripheral devices that use a 4-pin or 3-pin serial interface. the ssi register set consists of five memory-mapped configuration region (mmcr) registers used for ssi control, transmit, command, status, and receive functions. see the lan?sc520 microcontroller users manual , order #22004, for details about the ssi. table 19-1 lists the ssi registers in offset order, with the corresponding descriptions page number. 19.2 registers table 19-1 ssi mmcr registers register name mnemonic mmcr offset page number ssi control ssictl cd0h page 19-2 ssi transmit ssixmit cd1h page 19-4 ssi command ssicmd cd2h page 19-5 ssi status ssista cd3h page 19-6 ssi receive ssircv cd4h page 19-7
synchronous serial interface registers 19-2 lan?sc520 microcontroller register set manual ssi control (ssictl) memory-mapped mmcr offset cd0h register description this register controls the bit order, clock idle state, clock phase (for data drive and latch), interrupt enable, and clock speed of the ssi. bit definitions 7 6 5 4 3 2 1 0 bit reserved clk_sel [2C0] tc_int_ enb phs_inv_ enb clk_inv_ enb msbf_enb reset 00000000 r/w rsv r/w r/w r/w r/w r/w bit name function 7 reserved reserved this bit field should be written to 0 for normal system operation. 6 C 4 clk_sel [2C0] ssi clock speed select the ssi clock (ssi_clk pin) frequency is derived from the system clock. the clk_sel bit field selects the frequency of the ssi clock as shown in table 19-2. 3 tc_int_enb transaction complete interrupt enable this bit is used to enable the tc_int bit of the ssista register (see page 19-6) to generate an interrupt request. 0 = no interrupt is generated when the transaction is complete. 1 = the ssi issues an interrupt request when the transaction is complete. if the interrupt is disabled, software should poll the bsy bit in the ssista register (see page 19-6). before the ssi interrupt is enabled, the ssimap register (see page 12-21) must be configured to route the interrupt to the appropriate interrupt request level and priority. table 19-2 ssi clock speed selections clk_sel bit field selected divisor nominal bit rate actual bit rate with a 33.000-mhz system clock actual bit rate with a 33.333-mhz system clock 000b 4d 8 mhz 8.250 mhz 8.333 mhz 001b 8d 4 mhz 4.125 mhz 4.167 mhz 010b 16d 2 mhz 2.063 mhz 2.083 mhz 011b 32d 1 mhz 1.031 mhz 1.042 mhz 100b 64d 512 khz 516.6 khz 520.8 khz 101b 128d 256 khz 257.8 khz 260.4 khz 110b 256d 128 khz 128.9 khz 130.2 khz 111b 512d 64 khz 64.5 khz 65.1 khz
synchronous serial interface registers lan?sc520 microcontroller register set manual 19-3 programming notes this register should not be written while the bsy bit is set in the ssista register (see page 19-6). 2 phs_inv_enb ssi inverted phase mode enable this bit configures the ssi clock phase relationship with the incoming and outgoing data. 0 = non-inverted phase mode: data is driven on odd edges of the ssi_clk signal and latched on even edges. when writing data, the first bit of a transaction is shifted out on the ssi_do pin on the first (odd) ssi clock edge, and the remaining bits are shifted out on odd clock edges. when reading data, the ssi_di pin state is latched on the eight even edges (2,4,6,8,10,12,14,16) of the ssi clock. the transaction is complete one half of an ssi_clk period after the last clock transition. 1 = inverted-phase mode: data is driven on even edges of the ssi_clk signal and latched on odd edges. when writing data, the first bit of a transaction is shifted out on the ssi_do pin one half of an ssi_clk period before the first (odd) ssi clock edge, and the remaining bits are shifted out on even clock edges. when reading data, the ssi_di pin state is latched on the eight odd edges (1, 3, 5, 7, 9, 11, 13, 15) of the ssi clock. the transaction is complete on the last transition of the ssi clock. 1 clk_inv_enb ssi inverted clock mode enable this bit controls the idle state of the ssi clock. the clock idle state is independent of the phase of the ssi clock. 0 = the clock is not inverted, and the idle state is high. the ssi clock pulses low eight times. 1 = the clock is inverted, and the idle state is low. the ssi clock pulses high eight times. 0 msbf_enb ssi most significant bit first mode enable this bit controls the bit order of data transfers. 0 = bits are transmitted and received least significant bit (lsb) first. in this mode, the ssi shifts out the lsb of the transmit byte first. the first data bit received is stored in the lsb of the receive register and the last data bit received is stored in the most significant bit of the receive register. 1 = bits are transmitted and received most significant bit (msb) first. in this mode, the ssi shifts out the msb of the transmit byte first. the first data bit received is stored in the msb of the receive register and the last data bit received is stored in the lsb of the receive register. the configuration applies to both transmit and receive operations. bit name function
synchronous serial interface registers 19-4 lan?sc520 microcontroller register set manual ssi transmit (ssixmit) memory-mapped mmcr offset cd1h register description this register is used to write data to be transmitted. bit definitions programming notes this register should not be written while the bsy bit is set in the ssista register (see page 19-6). 7 6 5 4 3 2 1 0 bit dat_out [7C0] reset 00000000 r/w r/w bit name function 7 C 0 dat_out [7C0] ssi data out software uses this bit field to write eight bits to be shifted out on the ssi_do pin. after writing to this bit field, software must write a transmit command or a simultaneous transmit/receive command to the ssicmd register (see page 19-5) to send the data. the contents of this bit field (dat_out) are not destroyed when transmitted, so the user can repeatedly transmit the same data by writing the appropriate transmit command to the ssicmd register.
synchronous serial interface registers lan?sc520 microcontroller register set manual 19-5 ssi command (ssicmd) memory-mapped mmcr offset cd2h register description this register is used to write the transfer command to be executed. bit definitions programming notes this register should not be written while the bsy bit is set in the ssista register (see page 19-6). the cmd_sel bit field is decoded and the command executed after the command is written. software should load the ssixmit register (if necessary) before writing the command. the ssircv register can be read after the transaction is complete. there is at least one 33-mhz clock period idle time between transactions. a slave device should be enabled (if necessary) before a transmit or receive transaction is initiated, and the device should be disabled (if necessary) after the transaction is complete. software can use programmable i/o (pio) pins to implement device enable signals. see chapter 20, programmable input/output registers for details about configuring pio pins. 7 6 5 4 3 2 1 0 bit reserved cmd_sel [1C0] reset 00000000 r/w rsv r/w bit name function 7 C 2 reserved reserved this bit field should be written to 0 for normal system operation. 1 C 0 cmd_sel [1C0] ssi command select three commands are available to initiate an ssi transaction. 00 = reserved 01 = transmit command: initiate a transaction in which the contents of the ssixmit register are shifted out (see page 19-4). 10 = receive command: initiate a transaction in which data is shifted in to the ssircv register (see page 19-7). 11 = simultaneous transmit/receive command: initiate a transaction in which both transmit and receive happen simultaneously. when read, this bit field returns the last command written to it.
synchronous serial interface registers 19-6 lan?sc520 microcontroller register set manual ssi status (ssista) memory-mapped mmcr offset cd3h register description this register reports ssi port busy status and a latched transaction complete status. bit definitions programming notes this register (ssista) should not be written while the bsy bit is set. also, unreliable operation occurs if the ssictl, ssixmit, or ssicmd registers are written, or if the ssircv register is read, while the bsy bit is set. hardware updates the bsy and tc_int bits to indicate non-busy status (transaction complete) one half ssi_clk period after the last edge of a receive transaction, or one full ssi_clk period after the last edge of a transmit transaction. the tc_int bit should be used for interrupt operation, i.e., if the tc_int_enb bit is enabled in the ssictl register (see page 19-2). software must acknowledge (clear) the tc_int bit by writing a 1 to it after each ssi transaction. the bsy bit should be used for polled operation. although the tc_int bit can be used for polled operation, using the bsy bit is more efficient because it does not need to be cleared by software after each transaction. note that if only the polled operation is used, the tc_int_enb bit should not be enabled in the ssictl register (see page 19-2). 7 6 5 4 3 2 1 0 bit reserved bsy tc_int reset 00000000 r/w rsv r r/w! bit name function 7 C 2 reserved reserved this bit field should be written to 0 for normal system operation. 1 bsy ssi busy this bit reports ssi activity status. 0 = the port is not busy. 1 = the port is busy. the port is busy (active) while a receive or transmit operation is in progress. this bit is set by the ssi hardware after a command is written, and cleared by hardware when the transaction is complete. transaction complete status is also indicated by the tc_int bit. writes to the bsy bit have no effect. 0tc_int ssi transaction complete interrupt this bit indicates transaction complete status. 0 = no transaction has completed since software cleared this bit. 1 = a transaction has completed since software cleared this bit. software must clear this bit by writing a 1. the tc_int bit remains set until software acknowledges this completion by writing a 1. when the tc_int bit is set, an interrupt request is generated if enabled via the tc_int_enb bit in the ssictl register (see page 19-2). ssi activity is also indicated by the bsy bit.
synchronous serial interface registers lan?sc520 microcontroller register set manual 19-7 ssi receive (ssircv) memory-mapped mmcr offset cd4h register description this register is used to read data received from a peripheral device. bit definitions programming notes this register should not be read while the bsy bit is set in the ssista register (see page 19-6). 7 6 5 4 3 2 1 0 bit dat_in [7C0] reset 00000000 r/w r bit name function 7 C 0 dat_in [7C0] ssi data in software uses this bit field to read the eight bits shifted in from the ssi_di pin by the last receive command or simultaneous transmit/receive command that was issued via the ssicmd register (see page 19-5). after writing a receive command, software must wait until the receive transaction is complete before reading this bit field. transaction complete status is indicated by the bsy and tc_int bits in the ssista register (see page 19-6), or by an interrupt if enabled via the tc_int_enb bit in the ssictl register (see page 19-2). writes to this bit field (dat_in) have no effect.
synchronous serial interface registers 19-8 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual 20-1 chapter 20 programmable input/output registers 20.1 overview this chapter describes the programmable input/output (pio) pins and other multiplexed or configurable pins of the lansc520 microcontroller. the pio register set consists of 13 memory-mapped configuration region (mmcr) registers used to configure the programmable i/o pins (pio31Cpio0), to enable interface functions for pio pins and other multiplexed pins, and to adjust the drive strength of sdram interface pins. see the lan?sc520 microcontroller users manual , order #22004, for details about pio pins. table 20-1 lists the pio registers in offset order, with the corresponding descriptions page number. table 20-2 on page 20-2 provides an overview of how bits in the pio pin configuration registers are used to control individual pio pins. 20.2 registers table 20-1 programmable i/o mmcr registers register name mnemonic mmcr offset page number pio15Cpio0 pin function select piopfs15_0 c20h page 20-3 pio31Cpio16 pin function select piopfs31_16 c22h page 20-5 chip select pin function select cspfs c24h page 20-7 clock select clksel c26h page 20-9 drive strength control dsctl c28h page 20-10 pio15Cpio0 direction piodir15_0 c2ah page 20-12 pio31Cpio16 direction piodir31_16 c2ch page 20-14 pio15Cpio0 data piodata15_0 c30h page 20-16 pio31Cpio16 data piodata31_16 c32h page 20-18 pio15Cpio0 set pioset15_0 c34h page 20-20 pio31Cpio16 set pioset31_16 c36h page 20-22 pio15Cpio0 clear pioclr15_0 c38h page 20-24 pio31Cpio16 clear pioclr31_16 c3ah page 20-26
programmable input/output registers 20-2 lan?sc520 microcontroller register set manual table 20-2 pio register programming summary function select register bit direction register bit data register bit (writes) set register bit clear register bit data register bit (reads) 1 notes: 1. the data register bit (reads) column shows the resulting state of the data register bit and the corresponding pio pin. resulting programmable i/o pin function 1 x 2 2. x = not used in this operation. x x x ? 3 3. ? = input value. (the data register bit state always reflects the corresponding pin state, whether input or output.) the pin is not a pio; it uses its interface function. the value of the pin can be read at the data bit, but writes to the direction, data, set, and clear bits have no effect. 0 0 x x x ? the pio is an input. the state of the pin can be read at the data bit. writes to the data, set and clear bits have no effect. 0 1 xx 1 4 4. for a particular pio output operation, only one of the pins data, set, or clear bits can be used. the state of the unused bits is not important, but subsequent writes to these bits can change the pio pin state. 0 the pio is an output. the 1 that is written to the clear bit causes this pio pin to be driven low. the state of the pin can be read at the data bit, (in this case the pin is low). 0 1 x 1 x1 the pio is an output. the 1 that is written to the set bit causes this pio pin to be driven high. the state of the pin can be read at the data bit, (in this case the pin is high). 0 1 0xx 0 the pio is an output. the 0 that is written to the data bit causes this pio pin to be driven low. the state of the pin can be read at the data bit, (in this case the pin is low). 0 1 1xx 1 the pio is an output. the 1 that is written to the data bit causes this pio pin to be driven high. the state of the pin can be read at the data bit, (in this case the pin is high).
programmable input/output registers lan?sc520 microcontroller register set manual 20-3 pio15Cpio0 pin function select (piopfs15_0) memory-mapped mmcr offset c20h register description this register allows the programmer to choose the functionality of programmable i/o pins pio15-pio0. bit definitions 15 14 13 12 11 10 9 8 bit pio15_ fnc pio14_ fnc pio13_ fnc pio12_ fnc pio11_ fnc pio10_ fnc pio9_ fnc pio8_ fnc reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w 7 6 5 4 3 2 1 0 bit pio7_ fnc pio6_ fnc pio5_ fnc pio4_ fnc pio3_ fnc pio2_ fnc pio1_ fnc pio0_ fnc reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 15 pio15_fnc pio15 or gpirq8 function select this bit is used to select the functionality of the pio15 pin. 0 = the pin is pio15. 1 = the pin is gpirq8. 14 pio14_fnc pio14 or gpirq9 function select this bit is used to select the functionality of the pio14 pin. 0 = the pin is pio14. 1 = the pin is gpirq9. 13 pio13_fnc pio13 or gpirq10 function select this bit is used to select the functionality of the pio13 pin. 0 = the pin is pio13. 1 = the pin is gpirq10. 12 pio12_fnc pio12 or gpdack0 function select this bit is used to select the functionality of the pio12 pin. 0 = the pin is pio12. 1 = the pin is gpdack0 . 11 pio11_fnc pio11 or gpdack1 function select this bit is used to select the functionality of the pio11 pin. 0 = the pin is pio11. 1 = the pin is gpdack1 . 10 pio10_fnc pio10 or gpdack2 function select this bit is used to select the functionality of the pio10 pin. 0 = the pin is pio10. 1 = the pin is gpdack2 . 9 pio9_fnc pio9 or gpdack3 function select this bit is used to select the functionality of the pio9 pin. 0 = the pin is pio9. 1 = the pin is gpdack3 .
programmable input/output registers 20-4 lan?sc520 microcontroller register set manual programming notes this register (piopfs15_0) should be written early in the microcontrollers initialization routine. the bit values to write depend on which pins are to be used for pio functions, as opposed to interface functions. this depends on how the microcontroller is used in each particular system design. on reset, each pio pin is an input with a pullup or pulldown resistance for termination. see the pin list summary table in the lan?sc520 microcontroller data sheet , order #22003. software writes a 1 to the corresponding bit in this register to change a pin to its interface function. for example, pio2 shares a pin with the gp bus gprdy signal, so before gprdy can be used, a 1 must be written to the pio2_fnc bit. to summarize: n a bit must be cleared to use the corresponding pin as a programmable i/o pin. n a bit must be set to 1 to use the corresponding pin for its interface function. although software can perform a 32-bit access of mmcr offset c20h to select all 32 pio pin functions with a single instruction, the 32-bit access is split into two separate 16-bit accesses, with the piopfs15_0 register being accessed prior to the piopfs31_16 register. the two accesses are not simultaneous. 8 pio8_fnc pio8 or gpdrq0 function select this bit is used to select the functionality of the pio8 pin. 0 = the pin is pio8. 1 = the pin is gpdrq0. 7 pio7_fnc pio7 or gpdrq1 function select this bit is used to select the functionality of the pio7 pin. 0 = the pin is pio7. 1 = the pin is gpdrq1. 6 pio6_fnc pio6 or gpdrq2 function select this bit is used to select the functionality of the pio6 pin. 0 = the pin is pio6. 1 = the pin is gpdrq2. 5 pio5_fnc pio5 or gpdrq3 function select this bit is used to select the functionality of the pio5 pin. 0 = the pin is pio5. 1 = the pin is gpdrq3. 4 pio4_fnc pio4 or gptc function select this bit is used to select the functionality of the pio4 pin. 0 = the pin is pio4. 1 = the pin is gptc. 3 pio3_fnc pio3 or gpaen function select this bit is used to select the functionality of the pio3 pin. 0 = the pin is pio3. 1 = the pin is gpaen. 2 pio2_fnc pio2 or gprdy function select this bit is used to select the functionality of the pio2 pin. 0 = the pin is pio2. 1 = the pin is gprdy. 1 pio1_fnc pio1 or gpbhe function select this bit is used to select the functionality of the pio1 pin. 0 = the pin is pio1. 1 = the pin is gpbhe . 0 pio0_fnc pio0 or gpale function select this bit is used to select the functionality of the pio0 pin. 0 = the pin is pio0. 1 = the pin is gpale. bit name function
programmable input/output registers lan?sc520 microcontroller register set manual 20-5 pio31Cpio16 pin function select (piopfs31_16) memory-mapped mmcr offset c22h register description this register allows the programmer to choose the functionality of programmable i/o pins pio31Cpio16. bit definitions 15 14 13 12 11 10 9 8 bit pio31_ fnc pio30_ fnc pio29_ fnc pio28_ fnc pio27_ fnc pio26_ fnc pio25_ fnc pio24_ fnc reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w 7 6 5 4 3 2 1 0 bit pio23_ fnc pio22_ fnc pio21_ fnc pio20_ fnc pio19_ fnc pio18_ fnc pio17_ fnc pio16_ fnc reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 15 pio31_fnc pio31 or rin2 function select this bit is used to select the functionality of the pio31 pin. 0 = the pin is pio31. 1 = the pin is rin2 . 14 pio30_fnc pio30 or dcd2 function select this bit is used to select the functionality of the pio30 pin. 0 = the pin is pio30. 1 = the pin is dcd2 . 13 pio29_fnc pio29 or dsr2 function select this bit is used to select the functionality of the pio29 pin. 0 = the pin is pio29. 1 = the pin is dsr2 . 12 pio28_fnc pio28 or cts2 function select this bit is used to select the functionality of the pio28 pin. 0 = the pin is pio28. 1 = the pin is cts2 . 11 pio27_fnc pio27 or gpcs0 function select this bit is used to select the functionality of the pio27 pin. 0 = the pin is pio27. 1 = the pin is gpcs0 . 10 pio26_fnc pio26 or gpmemcs16 function select this bit is used to select the functionality of the pio26 pin. 0 = the pin is pio26. 1 = the pin is gpmemcs16 . 9 pio25_fnc pio25 or gpiocs16 function select this bit is used to select the functionality of the pio25 pin. 0 = the pin is pio25. 1 = the pin is gpiocs16 .
programmable input/output registers 20-6 lan?sc520 microcontroller register set manual programming notes this register (piopfs31_16) should be written early in the microcontrollers initialization routine. the bit values to write depend on which pins are to be used for pio functions, as opposed to interface functions. this depends on how the microcontroller is used in each particular system design. on reset, each pio pin is an input with a pullup or pulldown resistance for termination. see the pin list summary table in the lan?sc520 microcontroller data sheet , order #22003. software writes a 1 to the corresponding bit in this register to change a pin to its interface function. for example, pio18 shares a pin with the gp bus gpirq5 signal, so before gpirq5 can be used, a 1 must be written to the pio18_fnc bit. to summarize: n a bit must be cleared to use the corresponding pin as a programmable i/o pin. n a bit must be set to 1 to use the corresponding pin for its interface function. although software can perform a 32-bit access of mmcr offset c20h to select all 32 pio pin functions with a single instruction, the 32-bit access is split into two separate 16-bit accesses, with the piopfs15_0 register being accessed prior to the piopfs31_16 register. the two accesses are not simultaneous. 8 pio24_fnc pio24 or gpdbufoe function select this bit is used to select the functionality of the pio24 pin. 0 = the pin is pio24. 1 = the pin is gpdbufoe . 7 pio23_fnc pio23 or gpirq0 function select this bit is used to select the functionality of the pio23 pin. 0 = the pin is pio23. 1 = the pin is gpirq0. 6 pio22_fnc pio22 or gpirq1 function select this bit is used to select the functionality of the pio22 pin. 0 = the pin is pio22. 1 = the pin is gpirq1. 5 pio21_fnc pio21 or gpirq2 function select this bit is used to select the functionality of the pio21 pin. 0 = the pin is pio21. 1 = the pin is gpirq2. 4 pio20_fnc pio20 or gpirq3 function select this bit is used to select the functionality of the pio20 pin. 0 = the pin is pio20. 1 = the pin is gpirq3. 3 pio19_fnc pio19 or gpirq4 function select this bit is used to select the functionality of the pio19 pin. 0 = the pin is pio19. 1 = the pin is gpirq4. 2 pio18_fnc pio18 or gpirq5 function select this bit is used to select the functionality of the pio18 pin. 0 = the pin is pio18. 1 = the pin is gpirq5. 1 pio17_fnc pio17 or gpirq6 function select this bit is used to select the functionality of the pio17 pin. 0 = the pin is pio17. 1 = the pin is gpirq6. 0 pio16_fnc pio16 or gpirq7 function select this bit is used to select the functionality of the pio16 pin. 0 = the pin is pio16. 1 = the pin is gpirq7. bit name function
programmable input/output registers lan?sc520 microcontroller register set manual 20-7 chip select pin function select (cspfs) memory-mapped mmcr offset c24h register description this register selects the pin functionality for pins that have general-purpose chip selects (gpcsx ) as their alternate function. bit definitions 7 6 5 4 3 2 1 0 bit gpcs7_ sel gpcs6_ sel gpcs5_ sel gpcs4_ sel gpcs3_ sel gpcs2_ sel gpcs1_ sel reserved reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w rsv bit name function 7 gpcs7_sel tmrout0 or gpcs7 function select this bit is used to make either the tmrout0 signal or the gpcs7 signal available on the pin. the default on reset is tmrout0. 0 = the pin is tmrout0. 1 = the pin is gpcs7 . 6 gpcs6_sel tmrout1 or gpcs6 function select this bit is used to make either the tmrout1 signal or the gpcs6 signal available on the pin. the default on reset is tmrout1. 0 = the pin is tmrout1. 1 = the pin is gpcs6 . 5 gpcs5_sel tmrin0 or gpcs5 function select this bit is used to make either the tmrin0 signal or the gpcs5 signal available on the pin. the default on reset is tmrin0. 0 = the pin is tmrin0. 1 = the pin is gpcs5 . 4 gpcs4_sel tmrin1 or gpcs4 function select this bit is used to make either the tmrin1 signal or the gpcs4 signal available on the pin. the default on reset is tmrin1. 0 = the pin is tmrin1. 1 = the pin is gpcs4 . 3 gpcs3_sel pitgate2 or gpcs3 function select this bit is used to make either the pitgate2 signal or the gpcs3 signal available on the pin. the default on reset is pitgate2. 0 = the pin is pitgate2. 1 = the pin is gpcs3 . 2 gpcs2_sel romcs2 or gpcs2 function select this bit is used to make either the romcs2 signal or the gpcs2 signal available on the pin. the default on reset is romcs2 . 0 = the pin is romcs2 . 1 = the pin is gpcs2 .
programmable input/output registers 20-8 lan?sc520 microcontroller register set manual programming notes the gpcs0 signal is shared with the pio27 signal on one pin, so it is selected through the piopfs31_16 register (see page 20-5). this register (cspfs) should be written early in the microcontrollers initialization routine. the bit values to write depend on which function is to be used for each pin. this depends on how the microcontroller is used in each particular system design. on reset, each pins primary function is selected. see the pin list summary table in the lan?sc520 microcontroller data sheet , order #22003. software writes a 1 to the corresponding bit in this register to change a pin to its alternate function. for example, tmrout0 shares a pin with the gp bus gpcs7 signal, so before gpcs7 can be used, a 1 must be written to the gpcs7_sel bit. to summarize: n a bit must be cleared to use the corresponding pin for its primary function. n a bit must be set to 1 to use the corresponding pin for its alternate function. 1 gpcs1_sel romcs1 or gpcs1 function select this bit is used to make either the romcs1 signal or the gpcs1 signal available on the pin. the default on reset is romcs1 . 0 = the pin is romcs1 . 1 = the pin is gpcs1 . 0 reserved reserved this bit field should be written to 0 for normal system operation. bit name function
programmable input/output registers lan?sc520 microcontroller register set manual 20-9 clock select (clksel) memory-mapped mmcr offset c26h register description this register is used to set up the clktimer[clktest] pin. bit definitions programming notes the clktimer[clktest] pin can be configured as an output (clktest) to drive any of the several internal clocks externally for testing, or to drive an external device. caution should be exercised because there is no logic to avoid spurious pulses while enabling this pin as an output or changing clock frequencies. the target device should be held in reset while the clk_tst_sel, clk_pin_dir, and clk_pin_enb bit fields are configured to enable the pin as an output with the desired frequency, then the target device can be released from reset. the clktimer[clktest] pin can be enabled as an input (clktimer) if an external oscillator is to be used for the programmable interval timer (pit). for example, a 1.19318-mhz clktimer input can be used to provide pc/ at-compatible time-of-day operation without changing pit counter values. (see the pit chapter of the lan?sc520 microcontroller users manual , order #22004, for details.) while the pin is being enabled as an input, it is synchronized to the cpu clock to prevent spurious pulses from occurring in the pit. 7 6 5 4 3 2 1 0 bit reserved clk_tst_sel [2C0] reserved clk_pin_ dir clk_pin_ enb reset 01110000 r/w rsv r/w rsv r/w r/w bit name function 7 reserved reserved this bit field should be written to 0 for normal system operation. 6 C 4 clk_tst_ sel [2C0] clktest pin output clock select 000 = 32.768 khz (rtc clock) 001 = 1.8432 mhz (uart clock) 010 = 18.432 mhz (uart clock) 011 = 1.1892 mhz (pit clock) 100 = 1.47456 mhz (pll1 output) 101 = 36.864 mhz (pll2 output) 110 C 111 = disabled (pin stays low) 3 C 2 reserved reserved this bit field should be written to 0 for normal system operation. 1 clk_pin_dir clktimer[clktest] pin direction this bit determines whether the clktimer[clktest] pin is an input (clktimer) or output (clktest). as an input this pin provides the clock for the programmable interval timer (pit). as an output, this pin drives the clock selected by the clk_tst_sel bit field externally. 0 = input (clktimer) 1 = output (clktest) 0 clk_pin_ enb clktimer[clktest] pin enable the clktimer[clktest] pin is disabled on reset and must be enabled to function. 0 = disabled 1 = enabled
programmable input/output registers 20-10 lan?sc520 microcontroller register set manual drive strength control (dsctl) memory-mapped mmcr offset c28h register description this register controls the drive strengths for the sdram interface signals. independent drive strength control is provided for the address bus (ma12Cma0), bank select bus (ba1Cba0), sdqm3Csdqm0 bus, and scs3 Cscs0 . the srasa Csrasb , scasa Cscasb and swea Csweb control signals are grouped into a single drive strength control. the data bus (md31Cmd0) and ecc bus (mecc6Cmecc0) are also grouped into a single drive strength control. note: a programmable reset preserves this registers state. see the prg_rst_enb bit description on page 3-3. bit definitions 15 14 13 12 11 10 9 8 bit reserved scs_drive [1C0] reset 00000010 r/w rsv r/w 7 6 5 4 3 2 1 0 bit srcw_drive[1C0] sdqm_drive[1C0] ma_drive[1C0] data_drive[1C0] reset 00000000 r/w r/w r/w r/w r/w bit name function 15 C 10 reserved reserved this bit field should be written to 0 for normal system operation. 9 C 8 scs_drive [1C0] i/o pad drive strength for scs3 Cscs0 these bits select the drive strength of i/o pads for the scs3 Cscs0 signals. 00 = reserved 01 = 18-ma pads 10 = 12-ma pads (default) 11 = reserved note: default state of scs3 Cscs0 drive strength is 12 ma. 7 C 6 srcw_drive [1C0] i/o pad drive strength for srasa Csrasb , scasa Cscasb and swea Csweb these bits select the drive strength of i/o pads for the srasa Csrasb , scasa Cscasb , and swea Csweb signals. 00 = 24-ma pads (default) 01 = 18-ma pads 10 = 12-ma pads 11 = reserved 5 C 4 sdqm_drive [1C0] i/o pad drive strength for sdqm3Csdqm0 these bits select the drive strength of i/o pads for the sdqm3Csdqm0 signals. 00 = 24-ma pads (default) 01 = 18-ma pads 10 = 12-ma pads 11 = reserved
programmable input/output registers lan?sc520 microcontroller register set manual 20-11 programming notes 3 C 2 ma_drive [1C0] i/o pad drive strength fo r ma12Cma0 and ba1Cba0 these bits select the drive strength of i/o pads for the ma12 Cma0 and ba1Cba0 signals. 00 = 24-ma pads (default) 01 = 18-ma pads 10 = 12-ma pads 11 = reserved 1 C 0 data_drive [1C0] i/o pad drive strength for md31Cmd0 and mecc6Cmecc0 these bits select the drive strength of i/o pads for the md31Cmd0 and mecc6Cmecc0 signals. 00 = 24-ma pads (default) 01 = 18-ma pads 10 = 12-ma pads 11 = reserved
programmable input/output registers 20-12 lan?sc520 microcontroller register set manual pio15Cpio0 direction (piodir15_0) memory-mapped mmcr offset c2ah register description this register contains the direction bits for pins pio15Cpio0. bit definitions 15 14 13 12 11 10 9 8 bit pio15_ dir pio14_ dir pio13_ dir pio12_ dir pio11_ dir pio10_ dir pio9_ dir pio8_ dir reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w 7 6 5 4 3 2 1 0 bit pio7_ dir pio6_ dir pio5_ dir pio4_ dir pio3_ dir pio2_ dir pio1_ dir pio0_ dir reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 15 pio15_dir pio15 input or output select this bit programs pio15 as an input or output. 0 = input 1 = output 14 pio14_dir pio14 input or output select this bit programs pio14 as an input or output. 0 = input 1 = output 13 pio13_dir pio13 input or output select this bit programs pio13 as an input or output. 0 = input 1 = output 12 pio12_dir pio12 input or output select this bit programs pio12 as an input or output. 0 = input 1 = output 11 pio11_dir pio11 input or output select this bit programs pio11 as an input or output. 0 = input 1 = output 10 pio10_dir pio10 input or output select this bit programs pio10 as an input or output. 0 = input 1 = output
programmable input/output registers lan?sc520 microcontroller register set manual 20-13 programming notes the piox_dir bit for each pio pin chooses if the pin is an input or output. after reset, all of the pio signals are inputs with pullup or pulldown termination. before any pio can be used as an output, this register (piodir15_0) must be programmed to change the pio from an input to an output. the piox_dir bit for a pin has no effect if the corresponding piox_fnc bit is set in the piopfs15_0 register (see page 20-3). if the piox_fnc bit is set, the corresponding pin is assigned its interface function, not its pio function. although software can perform a 32-bit access of mmcr offset c2ah to set the direction for all 32 pio pins with a single instruction, the 32-bit access is split into two separate 16-bit accesses, with the piodir15_0 register being accessed prior to the piodir31_16 register. the two accesses are not simultaneous. 9pio9_dir pio9 input or output select this bit programs pio9 as an input or output. 0 = input 1 = output 8pio8_dir pio8 input or output select this bit programs pio8 as an input or output. 0 = input 1 = output 7pio7_dir pio7 input or output select this bit programs pio7 as an input or output. 0 = input 1 = output 6pio6_dir pio6 input or output select this bit programs pio6 as an input or output. 0 = input 1 = output 5pio5_dir pio5 input or output select this bit programs pio5 as an input or output. 0 = input 1 = output 4pio4_dir pio4 input or output select this bit programs pio4 as an input or output. 0 = input 1 = output 3pio3_dir pio3 input or output select this bit programs pio3 as an input or output. 0 = input 1 = output 2pio2_dir pio2 input or output select this bit programs pio2 as an input or output. 0 = input 1 = output 1pio1_dir pio1 input or output select this bit programs pio1 as an input or output. 0 = input 1 = output 0pio0_dir pio0 input or output select this bit programs pio0 as an input or output. 0 = input 1 = output bit name function
programmable input/output registers 20-14 lan?sc520 microcontroller register set manual pio31Cpio16 direction (piodir31_16) memory-mapped mmcr offset c2ch register description this register contains the direction bits for pins pio31Cpio16. bit definitions 15 14 13 12 11 10 9 8 bit pio31_ dir pio30_ dir pio29_ dir pio28_ dir pio27_ dir pio26_ dir pio25_ dir pio24_ dir reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w 7 6 5 4 3 2 1 0 bit pio23_ dir pio22_ dir pio21_ dir pio20_ dir pio19_ dir pio18_ dir pio17_ dir pio16_ dir reset 00000000 r/w r/w r/w r/w r/w r/w r/w r/w r/w bit name function 15 pio31_dir pio31 input or output select this bit programs pio31 as an input or output. 0 = input 1 = output 14 pio30_dir pio30 input or output select this bit programs pio30 as an input or output. 0 = input 1 = output 13 pio29_dir pio29 input or output select this bit programs pio29 as an input or output. 0 = input 1 = output 12 pio28_dir pio28 input or output select this bit programs pio28 as an input or output. 0 = input 1 = output 11 pio27_dir pio27 input or output select this bit programs pio27 as an input or output. 0 = input 1 = output 10 pio26_dir pio26 input or output select this bit programs pio26 as an input or output. 0 = input 1 = output
programmable input/output registers lan?sc520 microcontroller register set manual 20-15 programming notes the piox_dir bit for each pio pin chooses if the pin is an input or output. after reset, all of the pio signals are inputs with pullup or pulldown termination. before any pio can be used as an output, this register (piodir31_16) must be programmed to change the pio from an input to an output. the piox_dir bit for a pin has no effect if the corresponding piox_fnc bit is set in the piopfs31_16 register (see page 20-5). if the piox_fnc bit is set, the corresponding pin is assigned its interface function, not its pio function. although software can perform a 32-bit access of mmcr offset c2ah to set the direction for all 32 pio pins with a single instruction, the 32-bit access is split into two separate 16-bit accesses, with the piodir15_0 register being accessed prior to the piodir31_16 register. the two accesses are not simultaneous. 9 pio25_dir pio25 input or output select this bit programs pio25 as an input or output. 0 = input 1 = output 8 pio24_dir pio24 input or output select this bit programs pio24 as an input or output. 0 = input 1 = output 7 pio23_dir pio23 input or output select this bit programs pio23 as an input or output. 0 = input 1 = output 6 pio22_dir pio22 input or output select this bit programs pio22 as an input or output. 0 = input 1 = output 5 pio21_dir pio21 input or output select this bit programs pio21 as an input or output. 0 = input 1 = output 4 pio20_dir pio20 input or output select this bit programs pio20 as an input or output. 0 = input 1 = output 3 pio19_dir pio19 input or output select this bit programs pio19 as an input or output. 0 = input 1 = output 2 pio18_dir pio18 input or output select this bit programs pio18 as an input or output. 0 = input 1 = output 1 pio17_dir pio17 input or output select this bit programs pio17 as an input or output. 0 = input 1 = output 0 pio16_dir pio16 input or output select this bit programs pio16 as an input or output. 0 = input 1 = output bit name function
programmable input/output registers 20-16 lan?sc520 microcontroller register set manual pio15Cpio0 data (piodata15_0) memory-mapped mmcr offset c30h register description this register is used to read or write the value for pins pio15Cpio0. bit definitions 15 14 13 12 11 10 9 8 bit pio15_ data pio14_ data pio13_ data pio12_ data pio11_ data pio10_ data pio9_ data pio8_ data reset ???????? r/w r/w! r/w! r/w! r/w! r/w! r/w! r/w! r/w! 7 6 5 4 3 2 1 0 bit pio7_ data pio6_ data pio5_ data pio4_ data pio3_ data pio2_ data pio1_ data pio0_ data reset ???????? r/w r/w! r/w! r/w! r/w! r/w! r/w! r/w! r/w! bit name function 15 pio15_data read or write the pio15 pin 0 = pio15 is low 1 = pio15 is high 14 pio14_data read or write the pio14 pin 0 = pio14 is low 1 = pio14 is high 13 pio13_data read or write the pio13 pin 0 = pio13 is low 1 = pio13 is high 12 pio12_data read or write the pio12 pin 0 = pio12 is low 1 = pio12 is high 11 pio11_data read or write the pio11 pin 0 = pio11 is low 1 = pio11 is high 10 pio10_data read or write the pio10 pin 0 = pio10 is low 1 = pio10 is high 9pio9_data read or write the pio9 pin 0 = pio9 is low 1 = pio9 is high 8pio8_data read or write the pio8 pin 0 = pio8 is low 1 = pio8 is high
programmable input/output registers lan?sc520 microcontroller register set manual 20-17 programming notes each piox_data bit is used to read or write the value of the corresponding pin. if the pin is configured as a pio output, then writing to this register selects the output level of the pin. note that the output state of a pin programmed to be a pio can also be controlled via the pioset15_0 and pioclr15_0 registers (see page 20-20 and page 20-24). reading a pins piox_data bit when the pio is an output returns the state the pin was programmed for (high or low). reading a pins piox_data bit when the pins interface function is selected (via the corresponding piox_fcn bit in the piopfs15_0 register, see page 20-3) returns the state of the pin. in other words, reading a piox_data bit returns the state of the corresponding pio pin regardless of how the other pio registers are programmed. although software can perform a 32-bit access of mmcr offset c30h to read or write all 32 pio pins with a single instruction, the 32-bit access is split into two separate 16-bit accesses, with the piodata15_0 register being accessed prior to the piodata31_16 register. the two accesses are not simultaneous. 7pio7_data read or write the pio7 pin 0 = pio7 is low 1 = pio7 is high 6pio6_data read or write the pio6 pin 0 = pio6 is low 1 = pio6 is high 5pio5_data read or write the pio5 pin 0 = pio5 is low 1 = pio5 is high 4pio4_data read or write the pio4 pin 0 = pio4 is low 1 = pio4 is high 3pio3_data read or write the pio3 pin 0 = pio3 is low 1 = pio3 is high 2pio2_data read or write the pio2 pin 0 = pio2 is low 1 = pio2 is high 1pio1_data read or write the pio1 pin 0 = pio1 is low 1 = pio1 is high 0pio0_data read or write the pio0 pin 0 = pio0 is low 1 = pio0 is high bit name function
programmable input/output registers 20-18 lan?sc520 microcontroller register set manual pio31Cpio16 data (piodata31_16) memory-mapped mmcr offset c32h register description this register is used to read or write the value for pins pio31Cpio16. bit definitions 15 14 13 12 11 10 9 8 bit pio31_ data pio30_ data pio29_ data pio28_ data pio27_ data pio26_ data pio25_ data pio24_ data reset ???????? r/w r/w! r/w! r/w! r/w! r/w! r/w! r/w! r/w! 7 6 5 4 3 2 1 0 bit pio23_ data pio22_ data pio21_ data pio20_ data pio19_ data pio18_ data pio17_ data pio16_ data reset ???????? r/w r/w! r/w! r/w! r/w! r/w! r/w! r/w! r/w! bit name function 15 pio31_data read or write the pio31 pin 0 = pio31 is low 1 = pio31 is high 14 pio30_data read or write the pio30 pin 0 = pio30 is low 1 = pio30 is high 13 pio29_data read or write the pio29 pin 0 = pio29 is low 1 = pio29 is high 12 pio28_data read or write the pio28 pin 0 = pio28 is low 1 = pio28 is high 11 pio27_data read or write the pio27 pin 0 = pio27 is low 1 = pio27 is high 10 pio26_data read or write the pio26 pin 0 = pio26 is low 1 = pio26 is high 9 pio25_data read or write the pio25 pin 0 = pio25 is low 1 = pio25 is high 8 pio24_data read or write the pio24 pin 0 = pio24 is low 1 = pio24 is high
programmable input/output registers lan?sc520 microcontroller register set manual 20-19 programming notes each piox_data bit is used to read or write the value of the corresponding pin. if the pin is configured as a pio output, then writing to this register selects the output level of the pin. note that the output state of a pin programmed to be a pio can also be controlled via the pioset31_16 and pioclr31_16 registers (see page 20-22 and page 20-26). reading a pins piox_data bit when the pio is an output returns the state the pin was programmed for (high or low). reading a pins piox_data bit when the pins interface function is selected (via the corresponding piox_fcn bit in the piopfs31_16 register, see page 20-5) returns the state of the pin. in other words, reading a piox_data bit returns the state of the corresponding pio pin regardless of how the other pio registers are programmed. although software can perform a 32-bit access of mmcr offset c30h to read or write all 32 pio pins with a single instruction, the 32-bit access is split into two separate 16-bit accesses, with the piodata15_0 register being accessed prior to the piodata31_16 register. the two accesses are not simultaneous. 7 pio23_data read or write the pio23 pin 0 = pio23 is low 1 = pio23 is high 6 pio22_data read or write the pio22 pin 0 = pio22 is low 1 = pio22 is high 5 pio21_data read or write the pio21 pin 0 = pio21 is low 1 = pio21 is high 4 pio20_data read or write the pio20 pin 0 = pio20 is low 1 = pio20 is high 3 pio19_data read or write the pio19 pin 0 = pio19 is low 1 = pio19 is high 2 pio18_data read or write the pio18 pin 0 = pio18 is low 1 = pio18 is high 1 pio17_data read or write the pio17 pin 0 = pio17 is low 1 = pio17 is high 0 pio16_data read or write the pio16 pin 0 = pio16 is low 1 = pio16 is high bit name function
programmable input/output registers 20-20 lan?sc520 microcontroller register set manual pio15Cpio0 set (pioset15_0) memory-mapped mmcr offset c34h register description this register is used to make the output level high selectively for pins pio15Cpio0. bit definitions 15 14 13 12 11 10 9 8 bit pio15_ set pio14_ set pio13_ set pio12_ set pio11_ set pio10_ set pio9_ set pio8_ set reset xxxxxxxx r/w w! w! w! w! w! w! w! w! 7 6 5 4 3 2 1 0 bit pio7_ set pio6_ set pio5_ set pio4_ set pio3_ set pio2_ set pio1_ set pio0_ set reset xxxxxxxx r/w w! w! w! w! w! w! w! w! bit name function 15 pio15_set pio15 set 0 = no effect. 1 = set thepio15 signal high. 14 pio14_set pio14 set 0 = no effect. 1 = set the pio14 signal high. 13 pio13_set pio13 set 0 = no effect. 1 = set the pio13 signal high. 12 pio12_set pio12 set 0 = no effect. 1 = set the pio12 signal high. 11 pio11_set pio11 set 0 = no effect. 1 = set the pio11 signal high. 10 pio10_set pio10 set 0 = no effect. 1 = set the pio10 signal high. 9 pio9_set pio9 set 0 = no effect. 1 = set the pio9 signal high. 8 pio8_set pio8 set 0 = no effect. 1 = set the pio8 signal high.
programmable input/output registers lan?sc520 microcontroller register set manual 20-21 programming notes each piox_set bit is used to drive the corresponding pio output high. writing a 1 to any bit of this register causes the corresponding pio pin to be driven high if it is programmed to be an output (via the corresponding piox_dir bit in the piodir15_0 register, see page 20-12). writing 1 to a pins piox_set bit overrides any previous write to the pins piox_data or piox_clr bit (see page 20-16 and page 20-24). writing 0 to any bit in this register has no effect. if a pio pin is programmed to be an input, or if the pin is programmed for its interface function (via the corresponding piox_fnc bit in the piopfs15_0 register, see page 20-3), then writing to the pins piox_set bit has no effect. although software can perform a 32-bit access of mmcr offset c34h to set bits across all 32 pio pins with a single instruction, the 32-bit access is split into two separate 16-bit accesses, with the pioset15_0 register being accessed prior to the pioset31_16 register. the two writes are not simultaneous. 7 pio7_set pio7 set 0 = no effect. 1 = set the pio7 signal high. 6 pio6_set pio6 set 0 = no effect. 1 = set the pio6 signal high. 5 pio5_set pio5 set 0 = no effect. 1 = set the pio5 signal high. 4 pio4_set pio4 set 0 = no effect. 1 = set the pio4 signal high. 3 pio3_set pio3 set 0 = no effect. 1 = set the pio3 signal high. 2 pio2_set pio2 set 0 = no effect. 1 = set the pio2 signal high. 1 pio1_set pio1 set 0 = no effect. 1 = set the pio1 signal high. 0 pio0_set pio0 set 0 = no effect. 1 = set the pio0 signal high. bit name function
programmable input/output registers 20-22 lan?sc520 microcontroller register set manual pio31Cpio16 set (pioset31_16) memory-mapped mmcr offset c36h register description this register is used to make the output level high selectively for pins pio31Cpio16. bit definitions 15 14 13 12 11 10 9 8 bit pio31_ set pio30_ set pio29_ set pio28_ set pio27_ set pio26_ set pio25_ set pio24_ set reset xxxxxxxx r/w w! w! w! w! w! w! w! w! 7 6 5 4 3 2 1 0 bit pio23_ set pio22_ set pio21_ set pio20_ set pio19_ set pio18_ set pio17_ set pio16_ set reset xxxxxxxx r/w w! w! w! w! w! w! w! w! bit name function 15 pio31_set pio31 set 0 = no effect. 1 = set the pio31 signal high. 14 pio30_set pio30 set 0 = no effect. 1 = set the pio30 signal high. 13 pio29_set pio29 set 0 = no effect. 1 = set the pio29 signal high. 12 pio28_set pio28 set 0 = no effect. 1 = set the pio28 signal high. 11 pio27_set pio27 set 0 = no effect. 1 = set the pio27 signal high. 10 pio26_set pio26 set 0 = no effect. 1 = set the pio26 signal high. 9 pio25_set pio25 set 0 = no effect. 1 = set the pio25 signal high. 8 pio24_set pio24 set 0 = no effect. 1 = set the pio24 signal high.
programmable input/output registers lan?sc520 microcontroller register set manual 20-23 programming notes each piox_set bit is used to drive the corresponding pio output high. writing a 1 to any bit of this register causes the corresponding pio pin to be driven high if it is programmed to be an output (via the corresponding piox_dir bit in the piodir31_16 register, see page 20-14). writing 1 to a pin s piox_set bit overrides any previous write to the pins piox_data or piox_clr bit (see page 20-18 and page 20-26). writing 0 to any bit in this register has no effect. if a pio pin is programmed to be an input, or if the pin is programmed for its interface function (via the corresponding piox_fnc bit in the piopfs31_16 register, see page 20-5), then writing to the pins piox_set bit has no effect. although software can perform a 32-bit access of mmcr offset c34h to set bits across all 32 pio pins with a single instruction, the 32-bit access is split into two separate 16-bit accesses, with the pioset15_0 register being accessed prior to the pioset31_16 register. the two writes are not simultaneous. 7 pio23_set pio23 set 0 = no effect. 1 = set the pio23 signal high. 6 pio22_set pio22 set 0 = no effect. 1 = set the pio22 signal high. 5 pio21_set pio21 set 0 = no effect. 1 = set the pio21 signal high. 4 pio20_set pio20 set 0 = no effect. 1 = set the pio20 signal high. 3 pio19_set pio19 set 0 = no effect. 1 = set the pio19 signal high. 2 pio18_set pio18 set 0 = no effect. 1 = set the pio18 signal high. 1 pio17_set pio17 set 0 = no effect. 1 = set the pio17 signal high. 0 pio16_set pio16 set 0 = no effect. 1 = set the pio16 signal high. bit name function
programmable input/output registers 20-24 lan?sc520 microcontroller register set manual pio15Cpio0 clear (pioclr15_0) memory-mapped mmcr offset c38h register description this register is used to make the output level low selectively for pins pio15Cpio0. bit definitions 15 14 13 12 11 10 9 8 bit pio15_ clr pio14_ clr pio13_ clr pio12_ clr pio11_ clr pio10_ clr pio9_ clr pio8_ clr reset xxxxxxxx r/w w! w! w! w! w! w! w! w! 7 6 5 4 3 2 1 0 bit pio7_ clr pio6_ clr pio5_ clr pio4_ clr pio3_ clr pio2_ clr pio1_ clr pio0_ clr reset xxxxxxxx r/w w! w! w! w! w! w! w! w! bit name function 15 pio15_clr pio15 clear 0 = no effect. 1 = drive the pio15 signal low. 14 pio14_clr pio14 clear 0 = no effect. 1 = drive the pio14 signal low. 13 pio13_clr pio13 clear 0 = no effect. 1 = drive the pio13 signal low. 12 pio12_clr pio12 clear 0 = no effect. 1 = drive the pio12 signal low. 11 pio11_clr pio11 clear 0 = no effect. 1 = drive the pio11 signal low. 10 pio10_clr pio10 clear 0 = no effect. 1 = drive the pio10 signal low. 9pio9_clr pio9 clear 0 = no effect. 1 = drive the pio9 signal low. 8pio8_clr pio8 clear 0 = no effect. 1 = drive the pio8 signal low.
programmable input/output registers lan?sc520 microcontroller register set manual 20-25 programming notes each piox_clr bit is used to drive the corresponding pio output low. writing a 1 to any bit of this register causes the corresponding pio pin to be driven low if it is programmed to be an output (via the corresponding piox_dir bit in the piodir15_0 register, see page 20-12). writing 1 to a pin s piox_clr bit overrides any previous write to the pins piox_data or set bit (see page 20-16 and page 20-20). writing 0 to any bit in this register has no effect. if a pio pin is programmed to be an input, or if the pin is programmed for its interface function (via the corresponding piox_fnc bit in the piopfs15_0 register, see page 20-3), then writing to the pins piox_clr bit has no effect. although software can perform a 32-bit access of mmcr offset c38h to clear bits across all 32 pio pins with a single instruction, the 32-bit access is split into two separate 16-bit accesses, with the pioclr15_0 register being accessed prior to the pioclr31_16 register. the two writes are not simultaneous. 7pio7_clr pio7 clear 0 = no effect. 1 = drive the pio7 signal low. 6pio6_clr pio6 clear 0 = no effect. 1 = drive the pio6 signal low. 5pio5_clr pio5 clear 0 = no effect. 1 = drive the pio5 signal low. 4pio4_clr pio4 clear 0 = no effect. 1 = drive the pio4 signal low. 3pio3_clr pio3 clear 0 = no effect. 1 = drive the pio3 signal low. 2pio2_clr pio2 clear 0 = no effect. 1 = drive the pio2 signal low. 1pio1_clr pio1 clear 0 = no effect. 1 = drive the pio1 signal low. 0pio0_clr pio0 clear 0 = no effect. 1 = drive the pio0 signal low. bit name function
programmable input/output registers 20-26 lan?sc520 microcontroller register set manual pio31Cpio16 clear (pioclr31_16) memory-mapped mmcr offset c3ah register description this register is used to make the output level low selectively for pins pio31Cpio16. bit definitions 15 14 13 12 11 10 9 8 bit pio31_ clr pio30_ clr pio29_ clr pio28_ clr pio27_ clr pio26_ clr pio25_ clr pio24_ clr reset xxxxxxxx r/w w! w! w! w! w! w! w! w! 7 6 5 4 3 2 1 0 bit pio23_ clr pio22_ clr pio21_ clr pio20_ clr pio19_ clr pio18_ clr pio17_ clr pio16_ clr reset xxxxxxxx r/w w! w! w! w! w! w! w! w! bit name function 15 pio31_clr pio31 clear 0 = no effect. 1 = drive the pio31 signal low. 14 pio30_clr pio30 clear 0 = no effect. 1 = drive the pio30 signal low. 13 pio29_clr pio29 clear 0 = no effect. 1 = drive the pio29 signal low. 12 pio28_clr pio28 clear 0 = no effect. 1 = drive the pio28 signal low. 11 pio27_clr pio27 clear 0 = no effect. 1 = drive the pio27 signal low. 10 pio26_clr pio26 clear 0 = no effect. 1 = drive the pio26 signal low. 9 pio25_clr pio25 clear 0 = no effect. 1 = drive the pio25 signal low. 8 pio24_clr pio24 clear 0 = no effect. 1 = drive the pio24 signal low.
programmable input/output registers lan?sc520 microcontroller register set manual 20-27 programming notes each piox_clr bit is used to drive the corresponding pio output low. writing a 1 to any bit of this register causes the corresponding pio pin to be driven low if it is programmed to be an output (via the corresponding piox_dir bit in the piodir31_16 register, see page 20-14). writing 1 to a pin s piox_clr bit overrides any previous write to the pins piox_data or set bit (see page 20-18 and page 20-22). writing 0 to any bit in this register has no effect. if a pio pin is programmed to be an input, or if the pin is programmed for its interface function (via the corresponding piox_fnc bit in the piopfs31_16 register, see page 20-5), then writing to the pins piox_clr bit has no effect. although software can perform a 32-bit access of mmcr offset c38h to clear bits across all 32 pio pins with a single instruction, the 32-bit access is split into two separate 16-bit accesses, with the pioclr15_0 register being accessed prior to the pioclr31_16 register. the two writes are not simultaneous. 7 pio23_clr pio23 clear 0 = no effect. 1 = drive the pio23 signal low. 6 pio22_clr pio22 clear 0 = no effect. 1 = drive the pio22 signal low. 5 pio21_clr pio21 clear 0 = no effect. 1 = drive the pio21 signal low. 4 pio20_clr pio20 clear 0 = no effect. 1 = drive the pio20 signal low. 3 pio19_clr pio19 clear 0 = no effect. 1 = drive the pio19 signal low. 2 pio18_clr pio18 clear 0 = no effect. 1 = drive the pio18 signal low. 1 pio17_clr pio17 clear 0 = no effect. 1 = drive the pio17 signal low. 0 pio16_clr pio16 clear 0 = no effect. 1 = drive the pio16 signal low. bit name function
programmable input/output registers 20-28 lan?sc520 microcontroller register set manual
lan?sc520 microcontroller register set manual index-1 index numerics 12/24-hour mode select bit field, 17-17 16550-compatible mode error bit field, 18-21 16-bit counter for programmable interval timer channel 0 bit field, 13-2 channel 1 bit field, 13-3 channel 2 bit field, 13-4 16-bit millisecond count bit field, 15-2 66 mhz capable bit field, 6-20 66m_cap bit field, 6-20 a a10Ca8 bit field in mpicicw2 register, 12-32 in s1picicw2 register, 12-57 in s2picicw2 register, 12-45 a10Ca8 of interrupt vector bit field in mpicicw2 register, 12-32 in s1picicw2 register, 12-57 in s2picicw2 register, 12-45 a20 gate control bit field, 3-9 a20 gate data bit field, 3-7 a20_gate bit field, 3-7 a20g_ctl bit field, 3-9 access is ocw3 bit field in mpicocw2 register, 12-28 in mpicocw3 register, 12-30 in s1picocw2 register, 12-53 in s1picocw3 register, 12-55 in s2picocw2 register, 12-41 in s2picocw3 register, 12-43 adddec bit field in mstdmamode register, 11-91 in sldmamode register, 11-55 adddecctl register, 2-2 address decode control register, 2-2 address decrement bit field in mstdmamode register, 11-91 in sldmamode register, 11-55 address interval bit field in mpicicw1 register, 12-26 in s1picicw1 register, 12-51 in s2picicw1 register, 12-39 adi bit field in mpicicw1 register, 12-26 in s1picicw1 register, 12-51 in s2picicw1 register, 12-39 adr bit field, 2-9 adx signal, 6-16 aeoi bit field in mpicicw4 register, 12-35 in s1picicw4 register, 12-59 in s2picicw4 register, 12-47 ainit bit field in mstdmamode register, 11-91 in sldmamode register, 11-55 alarm interrupt enable bit field, 17-16 alarm interrupt flag bit field, 17-18 alm_am_pm bit field, 17-9 alm_hour bit field, 17-9 alm_int_enb bit field, 17-16 alm_int_flg bit field, 17-18 alm_minute bit field, 17-7 alm_second bit field, 17-5 alt_cmp bit field in gptmr0ctl register, 14-5 in gptmr1ctl register, 14-11 alternate cpu core reset control bit field, 3-9 alternate size for channel x bit field, 11-4 am_pm bit field, 17-8 am5 x 86? cpu control register, 4-3 instruction set, xvi mmcr registers (table), 4-1 amdebug? technology hard reset detect bit field, 3-5 rx/tx interrupt mapping register, 12-21 system reset detect bit field, 3-5 arbiter priority control register, 5-6 arbprictl register, 5-6 attr bit field, 2-7 attribute bit field, 2-7 automatic delayed transaction enable bit field, 6-4 automatic eoi mode bit field in mpicicw4 register, 12-35 in s1picicw4 register, 12-59 in s2picicw4 register, 12-47
index index-2 lan?sc520 microcontroller register set manual automatic initialization control bit field in mstdmamode register, 11-91 in sldmamode register, 11-55 b bad_chk_enb bit field, 7-12 bank x column address width bit field, 7-5, 7-6 enable bit field, 7-7, 7-8 ending address bit field, 7-7, 7-8 ending address configuration (figure), 7-8 internal sdram bank count bit field, 7-5, 7-6 base class code bit field, 6-22 baud rates, divisors, and clock source (table), 18-9 bax signal, 20-10, 20-11 bbatsen signal, 17-20 bcd bit field in pitmodectl register, 13-8 in pitxsta register, 13-6 bi bit field, 18-21 binary coded decimal select bit field, 13-8 binary coded decimal select status bit field, 13-6 bits 7C3 of base interrupt vector number for this pic bit field in mpicicw2 register, 12-32 in s1picicw2 register, 12-57 in s2picicw2 register, 12-45 bnkx_bnk_cnt bit field, 7-5, 7-6 bnkx_colwdth bit field, 7-5, 7-6 bnkx_enb bit field, 7-7, 7-8 bnkx_end bit field, 7-7, 7-8 bootcs control register, 9-2 bootcs device delay for first access bit field, 9-3 delay for subsequent access bit field, 9-2 mode bit field, 9-2 sdram/gp bus select bit field, 9-2 width select bit field, 9-2 bootcs signal, 1-2, 2-6, 9-1, 9-2, 9-3 bootcsctl register, 9-2 break indicator bit field, 18-21 bsy bit field, 19-6 buf bit field in mpicicw4 register, 12-35 in s1picicw4 register, 12-59 in s2picicw4 register, 12-47 buf_m/s bit field in mpicicw4 register, 12-35 in s1picicw4 register, 12-59 in s2picicw4 register, 12-47 buffer chaining control register, 11-21 enable for channel x bit field, 11-21 interrupt enable register, 11-24 status register, 11-22 valid register, 11-25 buffered mode and master/slave select bit field in mpicicw4 register, 12-35 in s1picicw4 register, 12-59 in s2picicw4 register, 12-47 bus number bit field, 6-15 bus_mas bit field, 6-21 bus_num bit field, 6-15 bus_park_sel bit field, 5-2 c cache write mode bit field, 4-3 cache_wr_mode bit field, 4-3 cas_lat bit field, 7-4 cbar register, 2-9 cbex signal, 6-17 cf_dram signal, 7-2 cf_rom_gpcs signal, 7-2 cfg_data bit field, 6-17 cfgx signal, 9-2, 9-3 chaining buffer valid for channel x bit field, 11-25 channel x dma request bit field in mstdmasta register, 11-86 in sldmasta register, 11-50 channel x slave cascade select bit field, 12-33, 12-34 channel x terminal count bit field in mstdmasta register, 11-86 in sldmasta register, 11-50 chip select pin function select register, 20-7 chip select recovery time bit field, 10-7 chip select x device delay for first access bit field in romcs1ctl register, 9-5 in romcs2ctl register, 9-7 delay for subsequent accesses bit field in romcs1ctl register, 9-4 in romcs2ctl register, 9-6 mode bit field in romcs1ctl register, 9-4 in romcs2ctl register, 9-6 sdram/gp bus select bit field in romcs1ctl register, 9-4 in romcs2ctl register, 9-6 width select bit field in romcs1ctl register, 9-4 in romcs2ctl register, 9-6
index lan?sc520 microcontroller register set manual index-3 chmask bit field in mstdmamsk register, 11-90 in sldmamsk register, 11-54 chx_alt_size bit field in gpdmactl register, 11-4 chx_bchn_enb bit field, 11-21 chx_cbuf_val bit field, 11-25 chx_cnt bit field in pit0cnt register, 13-2 in pit1cnt register, 13-3 in pit2cnt register, 13-4 chx_dis bit field in mstdmagenmsk register, 11-97 in sldmagenmsk register, 11-61 chx_eob_sta bit field, 11-22, 11-23 chx_int_enb bit field, 11-24 chx_int_mode bit field in mpicmode register, 12-6, 12-7 in sl1picmode register, 12-8 in sl2picmode register, 12-9 cl_cd bit field, 6-22 class code/revision id register, 6-22 clear fpu error interrupt request bit field, 12-61 clear to send bit field, 18-23 clk_inv_enb bit field, 19-3 clk_mode bit field, 11-4 clk_pin_dir bit field, 20-9 clk_pin_enb bit field, 20-9 clk_sel bit field, 19-2 clk_src bit field, 18-3 clk_tst_sel bit field, 20-9 clksel register, 20-9 clktest signal output clock select bit field, 20-9 pin direction bit field, 20-9 pin enable bit field, 20-9 clktimer signal in pit0cnt register, 13-2 in pit1cnt register, 13-3 in pit2cnt register, 13-4 pin direction bit field, 20-9 pin enable bit field, 20-9 clock mode bit field, 11-4 clock select register, 20-9 cmd_sel bit field, 19-5 cmos ram location bit field, 17-21 cmosdata bit field, 17-3 cmosidx bit field, 17-2 cncr_mode_enb bit field, 5-2 cnt bit field in gptmr0cnt register, 14-6 in gptmr1cnt register, 14-12 in gptmr2cnt register, 14-17 cntx bit field, 13-11 codekit software, iii compressed timing bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 comptim bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 configuration base address register, 2-9 configuration data bit field, 6-17 cont_cmp bit field in gptmr0ctl register, 14-5 in gptmr1ctl register, 14-11 in gptmr2ctl register, 14-16 counter latch command bit field in pitcntlat register, 13-10 in pitxsta register, 13-5 counter mode bit field, 13-8 counter mode status bit field, 13-6 counter read/write operation control bit field in pitmodectl register, 13-7 in pitxsta register, 13-5 counth bit field, 16-5 countl bit field, 16-4 cpu clock speed bit field, 4-3 cpu reset control bit field, 3-7 cpu shutdown reset detect bit field, 3-6 cpu_clk_spd bit field, 4-3 cpu_pri bit field, 5-6 cpu_rst bit field in scpdata register, 3-7 in sysctla register, 3-9 cpuctl register, 4-3 crystal frequency bit field, 15-4 cspfs register, 20-7 ctr_cmd bit field, 13-10 ctr_mode bit field, 13-8 ctr_mode_sta bit field, 13-6 ctr_rw_latch bit field, 13-7 ctr_sel bit field in pitmodectl register, 13-7 in pitrdback register, 13-11 in ptcntlat register, 13-10 cts bit field, 18-23 cts2 function select bit field, 20-5 ctsx signal in uartxmcr register, 18-19, 18-20 in uartxmsr register, 18-23, 18-24
index index-4 lan?sc520 microcontroller register set manual current count high bit field, 16-5 current count low bit field, 16-4 d d_perr_det bit field, 6-20 dackx internal signal, 11-51, 11-87 daksen bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 dat_in bit field, 19-7 dat_out bit field, 19-4 data carrier detect bit field, 18-23 data parity reported bit field, 6-20 data ready bit field, 18-22 data set ready bit field, 18-23 data terminal ready bit field, 18-20 data width select for gpcsx bit field, 10-3 data_drive bit field, 20-11 datastrb signal, 7-2 date mode bit field, 17-17 date_mode bit field, 17-17 day_of_mth bit field, 17-11 day_of_week bit field, 17-10 daylight savings enable bit field, 17-17 dbctl register, 8-2 dcd bit field, 18-23 dcd2 function select bit field, 20-5 dcdx signal, 18-19, 18-23 dcts bit field, 18-24 ddcd bit field, 18-23 ddsr bit field, 18-24 delta clear to send bit field, 18-24 delta data carrier detect bit field, 18-23 delta data set ready bit field, 18-24 dev_id bit field, 6-18 device id bit field, 6-18 device number bit field, 6-16 device select (devsel) timing bit field, 6-20 device/vendor id register, 6-18 device_num bit field, 6-16 devsel signal, 6-20 dgp bit field in bootcsctl register, 9-2 in romcs1ctl register, 9-4 in romcs2ctl register, 9-6 directly trigger priority level px bit field in swint16_1 register, 12-10, 12-11, 12-12 in swint22_17 register, 12-13, 12-14 direct-mapped i/o registers (table), 1-7 disable dma controller bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 div bit field in uartxbcdh register, 18-10 in uartxbcdl register, 18-9 divisor latch access bit field, 18-17 dlab bit field, 18-17 dma. see also gp-dma, master dma, slave dma. dma buffer chaining interrupt mapping register, 12-21 dma channel mask bit field in mstdmamsk register, 11-90 in sldmamsk register, 11-54 dma channel mask select bit field in mstdmamsk register, 11-90 in sldmamsk register, 11-54 dma channel select bit field in mstdmamode register, 11-92 in mstdmaswreq register, 11-89 in sldmamode register, 11-56 in sldmaswreq register, 11-53 dma channel x extended page address bit field in gpdmaextpg0 register, 11-10 in gpdmaextpg1 register, 11-11 in gpdmaextpg2 register, 11-12 in gpdmaextpg3 register, 11-13 in gpdmaextpg5 register, 11-14 in gpdmaextpg6 register, 11-15 in gpdmaextpg7 register, 11-16 dma channel x mask bit field in mstdmagenmsk register, 11-97 in sldmagenmsk register, 11-61 dma channel x memory address bit field in gpdma4mar register, 11-78 dma channel x memory address bits [23C16] bit field in gpdma0pg register, 11-69 in gpdma1pg register, 11-65 in gpdma2pg register, 11-63 in gpdma3pg register, 11-64 in gpdma5pg register, 11-73 in gpdma6pg register, 11-71 dma channel x memory address bits [23C17] bit field in gpdma7pg register, 11-72 dma channel x next address high bit field in gpdmanxtaddh3 register, 11-27 in gpdmanxtaddh5 register, 11-29 in gpdmanxtaddh6 register, 11-31 in gpdmanxtaddh7 register, 11-33 dma channel x next address low bit field in gpdmanxtaddl3 register, 11-26 in gpdmanxtaddl5 register, 11-28 in gpdmanxtaddl6 register, 11-30 in gpdmanxtaddl7 register, 11-32
index lan?sc520 microcontroller register set manual index-5 dma channel x next transfer count high bit field in gpdmanxttch3 register, 11-35 in gpdmanxttch5 register, 11-37 in gpdmanxttch6 register, 11-39 in gpdmanxttch7 register, 11-41 dma channel x next transfer count low bit field in gpdmanxttcl3 register, 11-34 in gpdmanxttcl5 register, 11-36 in gpdmanxttcl6 register, 11-38 in gpdmanxttcl7 register, 11-40 dma channel x transfer count bit field in gpdma0tc register, 11-43 in gpdma1tc register, 11-45 in gpdma2tc register, 11-47 in gpdma3tc register, 11-49 in gpdma4tc register, 11-79 in gpdma5tc register, 11-81 in gpdma6tc register, 11-83 in gpdma7tc register, 11-85 dma channel x transfer count extension bit field in gpdmaexttc3 register, 11-17 in gpdmaexttc5 register, 11-18 in gpdmaexttc6 register, 11-19 in gpdmaexttc7 register, 11-20 dma mode bit field in uartxfcr register, 18-15 in uartxfcrshad register, 18-5 dma_dis bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 dma_mode bit field in uartxfcr register, 18-15 in uartxfcrshad register, 18-5 dmabcintmap register, 12-21 dmarx bit field in mstdmasta register, 11-86 in sldmasta register, 11-50 dmax_mmap bit field in gpdmammio register, 11-5 dmax_nxt_adr bit field in gpdmanxtaddh3 register, 11-27 in gpdmanxtaddh5 register, 11-29 in gpdmanxtaddh6 register, 11-31 in gpdmanxtaddh7 register, 11-33 in gpdmanxtaddl3 register, 11-26 in gpdmanxtaddl5 register, 11-28 in gpdmanxtaddl6 register, 11-30 in gpdmanxtaddl7 register, 11-32 dmax_nxt_tc bit field in gpdmanxttch3 register, 11-35 in gpdmanxttch5 register, 11-37 in gpdmanxttch6 register, 11-39 in gpdmanxttch7 register, 11-41 in gpdmanxttcl3 register, 11-34 in gpdmanxttcl5 register, 11-36 in gpdmanxttcl6 register, 11-38 in gpdmanxttcl7 register, 11-40 dmaxadr bit field in gpdmaextpg0 register, 11-10 in gpdmaextpg1 register, 11-11 in gpdmaextpg2 register, 11-12 in gpdmaextpg3 register, 11-13 in gpdmaextpg5 register, 11-14 in gpdmaextpg6 register, 11-15 in gpdmaextpg7 register, 11-16 dmaxmar bit field in gpdma0mar register, 11-42 in gpdma0pg register, 11-69 in gpdma1mar register, 11-44 in gpdma1pg register, 11-65 in gpdma2mar register, 11-46 in gpdma2pg register, 11-63 in gpdma3mar register, 11-48 in gpdma3pg register, 11-64 in gpdma4mar register, 11-78 in gpdma5mar register, 11-80 in gpdma5pg register, 11-73 in gpdma6mar register, 11-82 in gpdma6pg register, 11-71 in gpdma7mar register, 11-84 in gpdma7pg register, 11-72 dmaxtc bit field in gpdma0tc register, 11-43 in gpdma1tc register, 11-45 in gpdma2tc register, 11-47 in gpdma3tc register, 11-49 in gpdma4tc register, 11-79 in gpdma5tc register, 11-81 in gpdma6tc register, 11-83 in gpdma7tc register, 11-85 in gpdmaexttc3 register, 11-17 in gpdmaexttc5 register, 11-18 in gpdmaexttc6 register, 11-19 in gpdmaexttc7 register, 11-20 documentation support, iii documentation notation (table), xviii dr bit field, 18-22 dram refresh indicator bit field, 13-13 drcbendadr register, 7-7 drccfg register, 7-5 drcctl register, 7-2 drctmctl register, 7-4
index index-6 lan?sc520 microcontroller register set manual drive strength control register, 20-10 drqsen bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 drqx internal signal, 11-51, 11-87 ds_enb bit field, 17-17 dsctl register, 20-10 dsr bit field, 18-23 dsr2 function select bit field, 20-5 dsrx signal in uartxmcr register, 18-19, 18-20 in uartxmsr register, 18-23, 18-24 dtr bit field, 18-20 dtrx signal, 18-19, 18-20 e ecc check bit and data bit positions (figure), 7-11 ecc check bit position register, 7-11 ecc check code test register, 7-12 ecc check codes and associated data (table), 7-13 ecc control register, 7-9 ecc data bit position bit field, 7-11 ecc enable for all four banks bit field, 7-9 ecc interrupt mapping register, 12-19 ecc multi-bit error address bit field, 7-15 ecc multi-bit error address register, 7-15 ecc nmi enable bit field, 12-19 ecc single-bit error address bit field, 7-14 ecc single-bit error address register, 7-14 ecc status register, 7-10 ecc_chk_pos bit field, 7-11 ecc_enb bit field, 7-9 ecc_irq_map bit field, 12-20 ecc_nmi_enb bit field, 12-19 eccckbpos register, 7-11 ecccktest register, 7-12 eccctl register, 7-9 eccmap register, 12-19 eccmbadd register, 7-15 eccsbadd register, 7-14 eccsta register, 7-10 lan?sc520 microcontroller revision id register, 4-2 emsi bit field, 18-11 enable bad ecc check bits bit field, 7-12 enable bit field in cbar register, 2-9 in pcicfgadr register, 6-15 enable bit field in cbar register, 2-9 in pcicfgadr register, 6-15 enable modem status interrupt bit field, 18-11 enable multi-bit interrupt bit field, 7-9 enable received data available interrupt bit field, 18-11 enable receiver line status interrupt bit field, 18-11 enable single-bit interrupt bit field, 7-9 enable transmitter holding register empty interrupt bit field, 18-11 enable uart x interrupts bit field, 18-19 enb bit field in gptmr0ctl register, 14-3 in gptmr1ctl register, 14-9 in gptmr2ctl register, 14-15 in wdtmrctl register, 16-2 end of current buffer in channel x bit field, 11-22, 11-23 enh_mode_enb bit field, 11-4 enhanced mode enable bit field, 11-4 enter amdebug? technology mode on next reset bit field, 3-3 eoi bit in r_sl_eoi bit field, 12-28, 12-41, 12-53 eps bit field, 18-17 erdai bit field, 18-11 erlsi bit field, 18-11 err_in_fifo bit field, 18-21 esmm_smm bit field in mpicocw3 register, 12-30 in s1picocw3 register, 12-55 in s2picocw3 register, 12-43 ethrei bit field, 18-11 even parity select bit field, 18-17 exp_sel bit field, 16-3 exponent select bit field, 16-3 ext_clk bit field in gptmr0ctl register, 14-5 in gptmr1ctl register, 14-11 f fast back-to-back capable bit field, 6-20 fbtb bit field, 6-20 fe bit field, 18-22 ferr internal signal, 12-61 ferrmap register, 12-21 fifo enable bit field in uartxfcr register, 18-16 in uartxfcrshad register, 18-6 fifo mode indication bit field, 18-12 fifo_enb bit field in uartxfcr register, 18-16 in uartxfcrshad register, 18-6
index lan?sc520 microcontroller register set manual index-7 fifo_mode bit field, 18-12 first_dly bit field in bootcsctl register, 9-3 in romcs1ctl register, 9-5 in romcs2ctl register, 9-7 floating point error interrupt clear register, 12-61 floating point error interrupt mapping register, 12-21 force bad ecc check bits bit field, 7-12 fpuerr_rst bit field, 12-61 fpuerrclr register, 12-61 framing error bit field, 18-22 frc_bad_chk bit field, 7-12 function number bit field, 6-16 function_num bit field, 6-16 g general 0 register, 11-62 general 1 register, 11-66 general 2 register, 11-67 general 3 register, 11-68 general 4 register, 11-70 general 5 register, 11-74 general 6 register, 11-75 general 7 register, 11-76 general 8 register, 11-77 general-purpose cmos ram (114 bytes), 17-21 general-purpose interrupt request gpirqx polarity bit field, 12-15, 12-16 general-purpose r/w register bit field in gpdmagr0 register, 11-62 in gpdmagr1 register, 11-66 in gpdmagr2 register, 11-67 in gpdmagr3 register, 11-68 in gpdmagr4 register, 11-70 in gpdmagr5 register, 11-74 in gpdmagr6 register, 11-75 in gpdmagr7 register, 11-76 in gpdmagr8 register, 11-77 general-purpose timer mmcr registers (table), 14-1 gnt_to_id bit field, 5-3 gnt_to_int_enb bit field, 5-2 gnt_to_sta bit field, 5-3 gntx signal, 5-3, 5-4, 5-5, 5-7 gp bus echo mode enable bit field, 10-2 minimum timing (table), 10-2 gp bus mmcr registers (table), 10-1 gp bus signal timing adjustment (figure), 10-7 gp chip select data width register, 10-3 offset register, 10-9 pulse width register, 10-8 qualification register, 10-5 recovery time register, 10-7 gp echo mode register, 10-2 gp read offset register, 10-11 gp read pulse width register, 10-10 gp timer 0 count register, 14-6 interrupt mapping register, 12-21 maxcount compare a register, 14-7 maxcount compare b register, 14-8 mode/control register, 14-3 gp timer 1 count register, 14-12 interrupt mapping register, 12-21 maxcount compare a register, 14-13 maxcount compare b register, 14-14 mode/control register, 14-9 gp timer 2 count register, 14-17 interrupt mapping register, 12-21 maxcount compare a register, 14-18 mode/control register, 14-15 gp timer x alternate compare bit field in gptmr0ctl register, 14-5 in gptmr1ctl register, 14-11 gp timer x continuous mode bit field in gptmr0ctl register, 14-5 in gptmr1ctl register, 14-11 in gptmr2ctl register, 14-16 gp timer x count register bit field in gptmr0cnt register, 14-6 in gptmr1cnt register, 14-12 in gptmr2cnt register, 14-17 gp timer x enable bit field in gptmr0ctl register, 14-3 in gptmr1ctl register, 14-9 in gptmr2ctl register, 14-15 gp timer x external clock bit field in gptmr0ctl register, 14-5 in gptmr1ctl register, 14-11 gp timer x interrupt enable bit field in gptmr0ctl register, 14-4 in gptmr1ctl register, 14-10 in gptmr2ctl register, 14-16 gp timer x interrupt status bit field, 14-2 gp timer x maxcount compare register in use bit field in gptmr0ctl register, 14-4 in gptmr1ctl register, 14-10
index index-8 lan?sc520 microcontroller register set manual gp timer x maxcount compare register x bit field in gptmr0maxcmpa register, 14-7 in gptmr0maxcmpb register, 14-8 in gptmr1maxcmpa register, 14-13 in gptmr1maxcmpb register, 14-14 in gptmr2maxcmpa register, 14-18 gp timer x maximum count bit field in gptmr0ctl register, 14-4 in gptmr1ctl register, 14-10 in gptmr2ctl register, 14-16 gp timer x permit enable bit write bit field in gptmr0ctl register, 14-3 in gptmr1ctl register, 14-9 in gptmr2ctl register, 14-15 gp timer x prescaler bit field in gptmr0ctl register, 14-5 in gptmr1ctl register, 14-11 gp timer x retrigger bit field in gptmr0ctl register, 14-4 in gptmr1ctl register, 14-10 gp timers status register, 14-2 gp write offset register, 10-13 gp write pulse width register, 10-12 gp_ale_off bit field, 10-15 gp_ale_width bit field, 10-14 gp_echo_enb bit field, 10-2 gp_rd_off bit field, 10-11 gp_rd_width bit field, 10-10 gp_rst bit field, 3-3 gp_wr_off bit field, 10-13 gp_wr_width bit field, 10-12 gpaen function select bit field, 20-4 gpale signal function select bit field, 20-4 in gpaleoff register, 10-15 in gpalew register, 10-14 minimum timing table, 10-2 offset register, 10-15 pulse width register, 10-14 gpaleoff register, 10-15 gpalew register, 10-14 gpbhe function select bit field, 20-4 gpbhe signal, 20-4 gpcs_off bit field, 10-9 gpcs_recovr bit field, 10-7 gpcs_width bit field, 10-8 gpcsdw register, 10-3 gpcsoff register, 10-9 gpcspw register, 10-8 gpcsqual register, 10-5 gpcsrt register, 10-7 gpcsx signal function select bit field, 20-5, 20-7, 20-8 in gpcsdw register, 10-3, 10-4 in gpcsoff register, 10-9 in gpcspw register, 10-8 in gpcsqual register, 10-5, 10-6 in gpcsrt register, 10-7 in parx register, 2-7 qualifier selection bit field, 10-5, 10-6 gpcsx_dw bit field, 10-3 gpcsx_rw bit field, 10-5, 10-6 gpcsx_sel bit field, 20-7, 20-8 gpdackx function select bit field, 20-3 gpdackx signal, 11-6, 11-7 gpdbufoe function select bit field, 20-6 gp-dma. see also dma, master dma, slave dma. gp-dma channel 0 extended page register, 11-10 gp-dma channel 1 extended page register, 11-11 gp-dma channel 2 extended page register, 11-12 gp-dma channel 3 extended page register, 11-13 extended transfer count register, 11-17 next address high register, 11-27 next address low register, 11-26 next transfer count high register, 11-35 next transfer count low register, 11-34 gp-dma channel 5 extended page register, 11-14 extended transfer count register, 11-18 next address high register, 11-29 next address low register, 11-28 next transfer count high register, 11-37 next transfer count low register, 11-36 gp-dma channel 6 extended page register, 11-15 extended transfer count register, 11-19 next address high register, 11-31 next address low register, 11-30 next transfer count high register, 11-39 next transfer count low register, 11-38 gp-dma channel 7 extended page register, 11-16 extended transfer count register, 11-20 next address high register, 11-33 next address low register, 11-32 next transfer count high register, 11-41 next transfer count low register, 11-40 gp-dma control register, 11-4 gp-dma direct-mapped registers (table), 11-2 gp-dma memory-mapped i/o register, 11-5 gp-dma mmcr registers (table), 11-1 gp-dma resource channel map a register, 11-6 gp-dma resource channel map b register, 11-8 gpdma0mar register, 11-42
index lan?sc520 microcontroller register set manual index-9 gpdma0pg register, 11-69 gpdma0tc register, 11-43 gpdma1mar register, 11-44 gpdma1pg register, 11-65 gpdma1tc register, 11-45 gpdma2mar register, 11-46 gpdma2pg register, 11-63 gpdma2tc register, 11-47 gpdma3mar register, 11-48 gpdma3pg register, 11-64 gpdma3tc register, 11-49 gpdma4mar register, 11-78 gpdma4tc register, 11-79 gpdma5mar register, 11-80 gpdma5pg register, 11-73 gpdma5tc register, 11-81 gpdma6mar register, 11-82 gpdma6pg register, 11-71 gpdma6tc register, 11-83 gpdma7mar register, 11-84 gpdma7pg register, 11-72 gpdma7tc register, 11-85 gpdmabcctl register, 11-21 gpdmabcsta register, 11-22 gpdmabcval register, 11-25 gpdmabsintenb register, 11-24 gpdmactl register, 11-4 gpdmaextchmapa register, 11-6 gpdmaextchmapb register, 11-8 gpdmaextpg0 register, 11-10 gpdmaextpg1 register, 11-11 gpdmaextpg2 register, 11-12 gpdmaextpg3 register, 11-13 gpdmaextpg5 register, 11-14 gpdmaextpg6 register, 11-15 gpdmaextpg7 register, 11-16 gpdmaexttc3 register, 11-17 gpdmaexttc5 register, 11-18 gpdmaexttc6 register, 11-19 gpdmaexttc7 register, 11-20 gpdmagr0 register, 11-62 gpdmagr1 register, 11-66 gpdmagr2 register, 11-67 gpdmagr3 register, 11-68 gpdmagr4 register, 11-70 gpdmagr5 register, 11-74 gpdmagr6 register, 11-75 gpdmagr7 register, 11-76 gpdmagr8 register, 11-77 gpdmammio register, 11-5 gpdmanxtaddh3 register, 11-27 gpdmanxtaddh5 register, 11-29 gpdmanxtaddh6 register, 11-31 gpdmanxtaddh7 register, 11-33 gpdmanxtaddl3 register, 11-26 gpdmanxtaddl5 register, 11-28 gpdmanxtaddl6 register, 11-30 gpdmanxtaddl7 register, 11-32 gpdmanxttch3 register, 11-35 gpdmanxttch5 register, 11-37 gpdmanxttch6 register, 11-39 gpdmanxttch7 register, 11-41 gpdmanxttcl3 register, 11-34 gpdmanxttcl5 register, 11-36 gpdmanxttcl6 register, 11-38 gpdmanxttcl7 register, 11-40 gpdrqx signal channel mapping bit field, 11-6, 11-7 function select bit field, 20-4 in gpdmaextchmapa register, 11-6, 11-7 gpdrqx_chsel bit field, 11-6, 11-7 gpecho register, 10-2 gpintx_pol bit field, 12-15, 12-16 gpiocs16 function select bit field, 20-5 gpiocsx signal, 10-4 gpiord signal compressed timing bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 in gpcsqual register, 10-5, 10-6 in gpdmammio register, 11-5 in gprdoff register, 10-11 in gprdw register, 10-10 gpiowr signal in gpcsqual register, 10-5, 10-6 in gpdmammio register, 11-5 in gpwroff register, 10-13 in gpwrw register, 10-12 write selection control bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 gpirqx signal function select bit field, 20-3, 20-6 in intpinpol register, 12-15, 12-16 interrupt mapping register, 12-21 gpmemcs16 function select bit field, 20-5 gpmemcsx signal, 10-4
index index-10 lan?sc520 microcontroller register set manual gpmemrd signal compressed timing bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 in gpcsqual register, 10-5, 10-6 in gpdmammio register, 11-5 in gprdoff register, 10-11 in gprdw register, 10-10 gpmemwr signal in gpcsqual register, 10-5, 10-6 in gpdmammio register, 11-5 in gpwroff register, 10-13 in gpwrw register, 10-12 write selection control bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 gprdoff register, 10-11 gprdw register, 10-10 gprdy function select bit field, 20-4 gpreset signal reset sources, 3-6 software gp bus reset bit field, 3-3 gptc signal function select bit field, 20-4 in gpdmabcval register, 11-25 in uartxctl register, 18-3 in uartxsta register, 18-4 gptmr0cnt register, 14-6 gptmr0ctl register, 14-3 gptmr0map register, 12-21 gptmr0maxcmpa register, 14-7 gptmr0maxcmpb register, 14-8 gptmr1cnt register, 14-12 gptmr1ctl register, 14-9 gptmr1map register, 12-21 gptmr1maxcmpa register, 14-13 gptmr1maxcmpb register, 14-14 gptmr2cnt register, 14-17 gptmr2ctl register, 14-15 gptmr2map register, 12-21 gptmr2maxcmpa register, 14-18 gptmrsta register, 14-2 gpwroff register, 10-13 gpwrw register, 10-12 gpximap register, 12-21 h hbctl register, 6-3 hbmstirqctl register, 6-9 hbmstirqsta register, 6-12 hbtgtirqctl register, 6-5 hbtgtirqsta register, 6-7 hdr_typ bit field, 6-23 header type bit field, 6-23 header type register, 6-23 hi_pri_0_sel bit field, 5-7 hi_pri_1_sel bit field, 5-7 host bridge control register, 6-3 host bridge master interrupt address register, 6-14 host bridge master interrupt control register, 6-9 host bridge master interrupt status register, 6-12 host bridge target interrupt control register, 6-5 host bridge target interrupt status register, 6-7 hour bit field, 17-8 hour_mode_sel bit field, 17-17 i i/o hole access destination bit field, 2-2 i/o pad drive strength for ma12Cma0 and ba1Cba0 bit field, 20-11 for md31Cmd0 and mecc6Cmecc0 bit field, 20-11 for scs3Cscs0 bit field, 20-10 for sdqm3Csdqm0 bit field, 20-10 for srasaCsrasb, scasaCscasb and sweaC sweb bit field, 20-10 i/o space enable bit field, 6-21 ic4 bit field in mpicicw1 register, 12-27 in s1picicw1 register, 12-52 in s2picicw1 register, 12-40 ice_hrst_det bit field, 3-5 ice_on_rst bit field, 3-3 ice_srst_det bit field, 3-5 icemap register, 12-21 id2Cid0 bit field in s1picicw3 register, 12-58 in s2picicw3 register, 12-46 ignne internal signal, 12-61 imx bit field in mpicintmsk register, 12-36 in s1picintmsk register, 12-60 in s2picintmsk register, 12-48 initialization control word 1 select bit field in mpicocw3 register, 12-30 in s1picicw1 register, 12-51 in s1picocw2 register, 12-53 in s1picocw3 register, 12-55 in s2picicw1 register, 12-39 in s2picocw2 register, 12-41 in s2picocw3 register, 12-43
index lan?sc520 microcontroller register set manual index-11 initialization control word 4 bit field in mpicicw1 register, 12-27 in s1picicw1 register, 12-52 in s2picicw1 register, 12-40 instruction set, xvi int_enb bit field in gptmr0ctl register, 14-4 in gptmr1ctl register, 14-10 in gptmr2ctl register, 14-16 int_flg bit field, 17-18 int_id bit field, 18-13 int_map bit field, 12-22 int_not_pnd bit field, 18-13 internal dackx sense bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 internal drqx sense bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 internal oscillator control bits bit field, 17-14 interrupt control register, 12-4 interrupt enable for channel x bit field, 11-24 interrupt identification bit field bit field, 18-13 interrupt mapping bit field, 12-22 interrupt pin polarity register, 12-15 interrupt request eoi and priority rotation controls bit field in mpicocw2 register, 12-28 in s1picocw2 register, 12-53 in s2picocw2 register, 12-41 interrupt request flag bit field in rtcstac register, 17-18 in wdtmrctl register, 16-2 interrupt request x bit field in mpicir register, 12-24 in s1picir register, 12-49 in s2picir register, 12-37 interrupt request x in-service bit field in mpicisr register, 12-25 in s1picisr register, 12-50 in s2picisr register, 12-38 intpinpol register, 12-15 intx signal, 12-15 intx_pol bit field, 12-15 io_enb bit field, 6-21 io_hole_dest bit field, 2-2 iochck bit field, 13-13 irq_flg bit field, 16-2 irx bit field in mpicir register, 12-24 in s1picir register, 12-49 in s2picir register, 12-37 irx mask bit field in mpicintmsk register, 12-36 in s1picintmsk register, 12-60 in s2picintmsk register, 12-48 is_ocw3 bit field in mpicocw2 register, 12-28 in mpicocw3 register, 12-30 in s1picocw2 register, 12-53 in s1picocw3 register, 12-55 in s2picocw2 register, 12-41 in s2picocw3 register, 12-43 isx bit field in mpicisr register, 12-25 in s1picisr register, 12-50 in s2picisr register, 12-38 l latch count (low true) bit field, 13-11 latch status (low true) bit field, 13-11 lcnt bit field, 13-11 level-triggered interrupt mode bit field in mpicicw1 register, 12-26 in s1picicw1 register, 12-51 in s2picicw1 register, 12-39 literature support, iii loop bit field, 18-19 loopback mode (diagnostic mode) enable bit field, 18-19 lower 16 bits of dma channel x memory address bit field in gpdma0mar register, 11-42 in gpdma1mar register, 11-44 in gpdma2mar register, 11-46 in gpdma3mar register, 11-48 in gpdma5mar register, 11-80 in gpdma6mar register, 11-82 in gpdma7mar register, 11-84 ls bit field in mpicocw2 register, 12-28 in s1picocw2 register, 12-54 in s2picocw2 register, 12-41 lstat bit field, 13-11 ltim bit field in mpicicw1 register, 12-26 in s1picicw1 register, 12-51 in s2picicw1 register, 12-39 m m/s bit field in mpicicw4 register, 12-35 in s1picicw4 register, 12-59 in s2picicw4 register, 12-47
index index-12 lan?sc520 microcontroller register set manual m_ad_irq_id bit field, 6-14 m_cmd_irq_id bit field, 6-12 m_dper_irq_enb bit field, 6-10 m_dper_irq_sel bit field, 6-10 m_dper_irq_sta bit field, 6-13 m_gint_mode bit field, 12-5 m_mabrt_irq_enb bit field, 6-10 m_mabrt_irq_sel bit field, 6-9 m_mabrt_irq_sta bit field, 6-13 m_retry_to bit field, 6-24 m_rper_irq_enb bit field, 6-10 m_rper_irq_sel bit field, 6-10 m_rper_irq_sta bit field, 6-13 m_rtrto_irq_enb bit field, 6-10 m_rtrto_irq_sel bit field, 6-9 m_rtrto_irq_sta bit field, 6-13 m_serr_irq_enb bit field, 6-10 m_serr_irq_sel bit field, 6-9 m_serr_irq_sta bit field, 6-13 m_tabrt_irq_enb bit field, 6-10 m_tabrt_irq_sel bit field, 6-9 m_tabrt_irq_sta bit field, 6-13 m_wpost_enb bit field, 6-4 ma_drive bit field, 20-11 major stepping level bit field, 4-2 majorstep bit field, 4-2 master abort interrupt enable bit field, 6-10 select bit field, 6-9 status bit field, 6-13 master address interrupt identification bit field, 6-14 master command interrupt identification bit field, 6-12 master controller write posting enable bit field, 6-4 master detected parity error interrupt enable bit field, 6-10 select bit field, 6-10 status bit field, 6-13 master dma. see also dma, gp-dma, slave dma. master dma channel 4 memory address register, 11-78 transfer count register, 11-79 master dma channel 4C7 control register, 11-87 mask register, 11-90 mode register, 11-91 status register, 11-86 master dma channel 5 memory address register, 11-80 page register, 11-73 transfer count register, 11-81 master dma channel 6 memory address register, 11-82 page register, 11-71 transfer count register, 11-83 master dma channel 7 memory address register, 11-84 page register, 11-72 transfer count register, 11-85 master dma clear byte pointer register, 11-93 master dma controller reset register, 11-94 master dma controller temporary register, 11-95 master dma general mask register, 11-97 master dma mask reset register, 11-96 master enable bit field, 6-21 master nmi enable bit field, 12-4 master pic channel x interrupt mode bit field, 12-6, 12-7 global interrupt mode enable bit field, 12-5 i/o port 0020h access summary (table), 12-27 initialization control word 1 register, 12-26 initialization control word 2 register, 12-32 initialization control word 3 register, 12-33 initialization control word 4 register, 12-35 in-service register, 12-25 interrupt mask register, 12-36 interrupt mode register, 12-6 interrupt request register, 12-24 operation control word 2 register, 12-28 operation control word 3 register, 12-30 master received parity error interrupt enable bit field, 6-10 select bit field, 6-10 status bit field, 6-13 master retry time-out interrupt enable bit field, 6-10 select bit field, 6-9 status bit field, 6-13 master retry time-out register, 6-24 master software drq(n) request register, 11-89 master system error interrupt enable bit field, 6-10 select bit field, 6-9 status bit field, 6-13 master target abort interrupt enable bit field, 6-10 select bit field, 6-9 status bit field, 6-13 mastr_cbp bit field, 11-93 mastr_msk_rst bit field, 11-96 mastr_rst bit field, 11-94 mastr_tmp bit field, 11-95 match bit field, 2-10
index lan?sc520 microcontroller register set manual index-13 max signal in drcctl register, 7-3 in dsctl register, 7-3, 20-10, 20-11 max_cnt bit field in gptmr0ctl register, 14-4 in gptmr1ctl register, 14-10 in gptmr2ctl register, 14-16 max_cnt_riu bit field in gptmr0ctl register, 14-4 in gptmr1ctl register, 14-10 mb_addr bit field, 7-15 mbit_err bit field, 7-10 mca bit field in gptmr0maxcmpa register, 14-7 in gptmr1maxcmpa register, 14-13 in gptmr2maxcmpa register, 14-18 mcb bit field in gptmr0maxcmpb register, 14-8 in gptmr1maxcmpb register, 14-14 mdx signal, 20-10, 20-11 meccx signal, 20-10, 20-11 mem_enb bit field, 6-21 memory access enable bit field, 6-21 memory write and invalidate enable bit not implemented, 6-21 memory-mapped configuration region (mmcr) registers (table), 1-2 memory-mapped device for dma channel x bit field, 11-5 microcontroller reset sources (table), 3-6 microprocessor mode bit field in mpicicw4 register, 12-35 in s1picicw4 register, 12-59 in s2picicw4 register, 12-47 minor stepping level bit field, 4-2 minorstep bit field, 4-2 minute bit field, 17-6 mode bit field in bootcsctl register, 9-2 in romcs1ctl register, 9-4 in romcs2ctl register, 9-6 modsel bit field in mstdmamode register, 11-92 in sldmamode register, 11-56 month bit field, 17-12 mpicicw1 register, 12-26 mpicicw2 register, 12-32 mpicicw3 register, 12-33 mpicicw4 register, 12-35 mpicintmsk register, 12-36 mpicir register, 12-24 mpicisr register, 12-25 mpicmode register, 12-6 mpicocw2 register, 12-28 mpicocw3 register, 12-30 ms_cnt bit field, 15-2 msbf_enb bit field, 19-3 msksel bit field in mstdmamsk register, 11-90 in sldmamsk register, 11-54 mstdmacbp register, 11-93 mstdmactl register, 11-87 mstdmagenmsk register, 11-97 mstdmamode register, 11-91 mstdmamsk register, 11-90 mstdmamskrst register, 11-96 mstdmarst register, 11-94 mstdmasta register, 11-86 mstdmaswreq register, 11-89 mstdmatmp register, 11-95 mstintadd register, 6-14 mult_int_enb bit field, 7-9 multi-bit error detected bit field, 7-10 n nmi routine done bit field, 12-4 nmi_done bit field, 12-4 nmi_enb bit field, 12-4 nmi_trig bit field, 12-13 no serial port interrupt pending bit field, 18-13 null count bit field, 13-5 null_cnt bit field, 13-5 o oe bit field, 18-22 offset time for gpale bit field, 10-15 for gpiord and gpmemrd bit field, 10-11 for gpiowr and gpmemwr bit field, 10-13 for the gp bus chip select bit field, 10-9 operation select bit field in mstdmamode register, 11-91 in sldmamode register, 11-55 opmode_sel bit field, 7-3 opsel bit field in mstdmamode register, 11-91 in sldmamode register, 11-55 osc_ctl bit field, 17-14 out1 bit field, 18-19 out2 bit field, 18-19 output bit field, 13-5
index index-14 lan?sc520 microcontroller register set manual output state bit field, 13-5 overrun error bit field, 18-22 p p bit field in mpicocw3 register, 12-30 in s1picocw3 register, 12-55 in s2picocw3 register, 12-43 p_enb_wr bit field in gptmr0ctl register, 14-3 in gptmr1ctl register, 14-9 in gptmr2ctl register, 14-15 page size bit field, 2-7 par signal, 2-8 parity enable bit field, 18-17 parity error bit field, 18-22 parity error detected bit field, 6-19 parity error response bit field, 6-21 parx register, 2-5 pc/at channel check indicator bit field, 13-13 pc/at parity error indicator bit field, 13-13 pci bus arbiter bus park bit field, 5-2 cpu priority bit field, 5-6 grant time-out identification bit field, 5-3 interrupt enable bit field, 5-2 status bit field, 5-3 high priority 0 bit field, 5-7 high priority 1 bit field, 5-7 request #x enable bit field, 5-4, 5-5 status register, 5-3 pci bus host bridge direct-mapped registers (table), 6-2 indexed registers (table), 6-2 mmcr registers (table), 6-1 pci bus reset bit field, 6-3 pci configuration address register, 6-15 data register, 6-17 pci host bridge interrupt mapping bit field, 12-18 interrupt mapping register, 12-17 nmi enable bit field, 12-17 pci indexed registers (table), 1-11 pci interrupt request intx polarity bit field, 12-15 pci interrupt x mapping register, 12-21 pci_irq_map bit field, 12-18 pci_nmi_enb bit field, 12-17 pci_rst bit field, 6-3 pciarbsta register, 5-3 pciccrevid register, 6-22 pcicfgadr register, 6-15 pcicfgdata register, 6-17 pcidevid register, 6-18 pciheadtype register, 6-23 pcihostmap register, 12-17 pciintamap register, 12-21 pciintbmap register, 12-21 pciintcmap register, 12-21 pciintdmap register, 12-21 pcimretryto register, 6-24 pcistacmd register, 6-19 pe bit field, 18-22 penb bit field, 18-17 per_int_enb bit field, 17-16 per_int_flg bit field, 17-18 periodic interrupt enable bit field, 17-16 flag bit field, 17-18 perr bit field, 13-13 perr signal in hbmstirqctl register, 6-10 in pcistacmd register, 6-20 perr signal in hbmstirqctl register, 6-10 perr_det bit field, 6-19 perr_res bit field, 6-21 pg_sz bit field, 2-7 phs_inv_enb bit field, 19-3 pic poll command bit field in mpicocw3 register, 12-30 in s1picocw3 register, 12-55 in s2picocw3 register, 12-43 picicr register, 12-4 pio register programming summary (table), 20-2 pio15Cpio0 signals clear register, 20-24 data register, 20-16 direction register, 20-12 pin function select register, 20-3 set register, 20-20 pio31Cpio16 signals clear register, 20-26 data register, 20-18 direction register, 20-14 pin function select register, 20-5 set register, 20-22 pioclr15_0 register, 20-24 pioclr31_16 register, 20-26 piodata15_0 register, 20-16 piodata31_16 register, 20-18 piodir15_0 register, 20-12 piodir31_16 register, 20-14 piopfs15_0 register, 20-3
index lan?sc520 microcontroller register set manual index-15 piopfs31_16 register, 20-5 pioset15_0 register, 20-20 pioset31_16 register, 20-22 piox clear bit field in pioclr15_0 bit field, 20-24, 20-25 in pioclr31_16 bit field, 20-26, 20-27 piox function select bit field in piopfs15_0 register, 20-3, 20-4 in piopfs31_16 register, 20-5, 20-6 piox input or output select bit field in piodir15_0 bit field, 20-12, 20-13 in piodir31_16 bit field, 20-14, 20-15 piox set bit field in pioset15_0 bit field, 20-20, 20-21 in pioset31_16 bit field, 20-22, 20-23 piox_clr bit field in pioclr15_0 register, 20-24, 20-25 in pioclr31_16 register, 20-26, 20-27 piox_data bit field in piodata15_0 register, 20-16, 20-17 in piodata31_16 register, 20-18, 20-19 piox_dir bit field in piodir15_0 register, 20-12, 20-13 in piodir31_16 register, 20-14, 20-15 piox_fnc bit field in piopfs15_0 register, 20-3, 20-4 in piopfs31_16 register, 20-5, 20-6 piox_set bit field in pioset15_0 register, 20-20, 20-21 in pioset31_16 register, 20-22, 20-23 pit channel x count register channel 0, 13-2 channel 1, 13-3 channel 2, 13-4 pit counter latch command register, 13-10 pit counter mode settings (table), 13-9 pit counter select bit field in pitcntlat bit field, 13-10 in pitmodectl bit field, 13-7 in pitrdback bit field, 13-11 pit mode control register, 13-7 pit output channel 2 enable bit field, 13-13 pit read-back command register, 13-11 pit timer 2 output pin state bit field, 13-13 pit x interrupt mapping register channel 0, 12-21 channel 1, 12-21 channel 2, 12-21 pit x status register channel 0, 13-5 channel 1, 13-5 channel 2, 13-5 pit_gate2 bit field, 13-13 pit_out2_enb bit field, 13-13 pit_out2_sta bit field, 13-13 pit0cnt register, 13-2 pit0map register, 12-21 pit0sta register, 13-5 pit1cnt register, 13-3 pit1map register, 12-21 pit1sta register, 13-5 pit2cnt register, 13-4 pit2map register, 12-21 pit2sta register, 13-5 pitcntlat register, 13-10 pitgate2 function select bit field, 20-7 pitgate2 signal, 13-9, 13-13, 20-7 pitmodectl register, 13-7 pitout2 signal, 13-5, 13-13 pitrdback register, 13-11 pm bit field in mpicicw4 register, 12-35 in s1picicw4 register, 12-59 in s2picicw4 register, 12-47 port80 bit field, 11-62 port84 bit field, 11-66 port85 bit field, 11-67 port86 bit field, 11-68 port88 bit field, 11-70 port8c bit field, 11-74 port8d bit field, 11-75 port8e bit field, 11-76 port8f bit field, 11-77 powergood reset detect bit field, 3-6 prg_if bit field, 6-22 prg_rst_enb bit field, 3-3 prgreset detect bit field, 3-6 prgreset signal in rescfg register, 3-3, 3-4 in ressta register, 3-6 prgreset signal in ressta register, 3-5 prgrst_det bit field, 3-6 priority type bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 pritype bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 product type of lan?sc520 microcontroller bit field, 4-2 product_id bit field, 4-2 program interface bit field, 6-22 programmable address region x register, 2-5 programmable i/o mmcr registers (table), 20-1
index index-16 lan?sc520 microcontroller register set manual programmable interrupt controller direct-mapped registers (table), 12-2 mmcr registers (table), 12-1 programmable interval timer direct-mapped registers (table), 13-1 programmable reset enable bit field, 3-3 psc_sel bit field in gptmr0ctl register, 14-5 in gptmr1ctl register, 14-11 pwrgood signal in bootcsctl register, 9-2 in rescfg register, 3-4 in ressta register, 3-6 in sysinfo register, 3-2 pwrgood_det bit field, 3-6 r r bit in r_sl_eoi bit field, 12-28, 12-41, 12-53 r_mst_abt bit field, 6-20 r_sl_eoi bit field in mpicocw2 register, 12-28 in s1picocw2 register, 12-53 in s2picocw2 register, 12-41 r_tgt_abt bit field, 6-20 rab_enb bit field, 8-2 ras_cas_dly bit field, 7-4 ras_pchg_dly bit field, 7-4 rate selection bit field, 17-15 rate_sel bit field, 17-15 rbr bit field, 18-8 read or write the piox pin bit field in piodata15_0 register, 20-16, 20-17 in piodata31_16 register, 20-18, 20-19 read-ahead feature enable bit field, 8-2 read-back command bit field, 13-11 real-time clock direct-mapped registers (table), 17-1 indexed registers (table), 1-11, 17-1 received master abort bit field, 6-20 received target abort bit field, 6-20 receiver fifo clear bit field in uartxfcr register, 18-15 in uartxfcrshad register, 18-5 receiver fifo register trigger bits bit field in uartxfcr register, 18-15 in uartxfcrshad register, 18-5 refresh enable bit field, 7-2 region size/start address bit field, 2-8 register number bit field, 6-16 register_num bit field, 6-16 reqdma bit field in mstdmaswreq register, 11-89 in sldmaswreq register, 11-53 reqsel bit field in mstdmaswreq register, 11-89 in sldmaswreq register, 11-53 request to send bit field, 18-20 reqx signal, 5-4, 5-5, 5-7 reqx_enb bit field, 5-4, 5-5 rescfg register, 3-3 reset configuration register, 3-3 reset generation direct-mapped registers (table), 3-1 mmcr registers (table), 3-1 reset sources (table), 3-6 reset latched input data bit field, 3-2 reset status register, 3-5 ressta register, 3-5 rev_id bit field, 6-22 revid register, 4-2 revision i.d. bit field, 6-22 rf_clr bit field in uartxfcr register, 18-15 in uartxfcrshad register, 18-5 rfd bit field, 13-13 rfrt bit field in uartxfcr register, 18-15 in uartxfcrshad register, 18-5 rfsh_enb bit field, 7-2 rfsh_spd bit field, 7-2 ri bit field, 18-23 rin2 function select bit field, 20-5 ring indicator bit field, 18-23 rinx signal, 18-19, 18-23, 20-5 rom controller mmcr registers (table), 9-1 romcs1ctl register, 9-4 romcs2ctl register, 9-6 romcsx signal function select bit field, 20-7, 20-8 in parx registers, 2-6 in romcs1ctl register, 9-4 in romcs2ctl register, 9-6 rr_ris bit field in mpicocw3 register, 12-30 in s1picocw3 register, 12-55 in s2picocw3 register, 12-43 rst signal in hbctl register, 6-3 reset sources, 3-6 rst_ld bit field, 3-2 rstldx signal, 3-2
index lan?sc520 microcontroller register set manual index-17 rtc alarm am/pm indicator bit field, 17-9 hour register, 17-9 minute register, 17-7 second register, 17-5 rtc am/pm indicator bit field, 17-8 rtc control a register, 17-14 rtc control b register, 17-16 rtc current day of the month register, 17-11 rtc current day of the week register, 17-10 rtc current hour register, 17-8 rtc current minute register, 17-6 rtc current month register, 17-12 rtc current second register, 17-4 rtc current year register, 17-13 rtc disable bit field, 2-3 rtc interrupt mapping register, 12-21 rtc status c register, 17-18 rtc status d register, 17-20 rtc/cmos data port bit field, 17-3 rtc/cmos ram data port register, 17-3 rtc/cmos ram index bit field, 17-2 rtc/cmos ram index register, 17-2 rtc_cmos_reg_x bit field, 17-21 rtc_dis bit field, 2-3 rtc_vrt bit field, 17-20 rtcalmhr register, 17-9 rtcalmmin register, 17-7 rtcalmsec register, 17-5 rtccmos register, 17-21 rtcctla register, 17-14 rtcctlb register, 17-16 rtccurdom register, 17-11 rtccurdow register, 17-10 rtccurhr register, 17-8 rtccurmin register, 17-6 rtccurmon register, 17-12 rtccursec register, 17-4 rtccuryr register, 17-13 rtcdata register, 17-3 rtcidx register, 17-2 rtcmap register, 12-21 rtcstac register, 17-18 rtcstad register, 17-20 rtg bit field in gptmr0ctl register, 14-4 in gptmr1ctl register, 14-10 rts bit field, 18-20 rtsx signal, 18-19, 18-20 rw bit field, 13-5 rxdackx internal signal, 11-8, 11-9 rxdrqx channel mapping bit field, 11-8, 11-9 rxdrqx internal signal, 11-8, 11-9, 18-5, 18-15 rxdrqx_chsel bit field, 11-8, 11-9 rxtc_det bit field, 18-4 rxtc_enb bit field, 18-3 s s_dvsl_tim bit field, 6-20 s_tgt_abt bit field, 6-20 s1picicw1 register, 12-51 s1picicw2 register, 12-57 s1picicw3 register, 12-58 s1picicw4 register, 12-59 s1picintmsk register, 12-60 s1picir register, 12-49 s1picisr register, 12-50 s1picocw2 register, 12-53 s1picocw3 register, 12-55 s2picicw1 register, 12-39 s2picicw2 register, 12-45 s2picicw3 register, 12-46 s2picicw4 register, 12-47 s2picintmsk register, 12-48 s2picir register, 12-37 s2picisr register, 12-38 s2picocw2 register, 12-41 s2picocw3 register, 12-43 sb bit field, 18-17 sb_addr bit field, 7-14 sbcl_cd bit field, 6-22 sbit_err bit field, 7-10 scasx signal, 7-4, 20-10 scp command port register, 3-8 scp data port register, 3-7 scp reset detect bit field, 3-5 scp_cmd bit field, 3-8 scp_data bit field, 3-7 scp_rst_det bit field, 3-5 scpcmd register, 3-8 scpdata register, 3-7 scratch bit field, 18-25 scratch bits bit field, 18-25 scs_drive bit field, 20-10 scsx signal, 20-10 sd_rst_det bit field, 3-6 sdqm_drive bit field, 20-10 sdqmx signal, 20-10
index index-18 lan?sc520 microcontroller register set manual sdram bank 0C3 ending address register, 7-7 sdram bank configuration register, 7-5 sdram buffer control register, 8-2 sdram cas latency bit field, 7-4 sdram control register, 7-2 sdram controller mmcr registers (table), 7-1 sdram ecc interrupt mapping bit field, 12-20 sdram operation mode select bit field, 7-3 sdram ras precharge delay bit field, 7-4 sdram ras-to-cas delay bit field, 7-4 sdram refresh request speed bit field, 7-2 sdram timing control register, 7-4 second bit field, 17-4 select counter x bit field, 13-11 select icw1 bit field in mpicicw1 register, 12-26 in mpicocw2 register, 12-28 serr enable bit field, 6-20 serr signal in hbmstirqctl register, 6-9, 6-10 in pcistacmd register, 6-13, 6-19, 6-20 serr_enb bit field, 6-20 set bit field, 17-16 set break enable bit field, 18-17 sfnm bit field in mpicicw4 register, 12-35 in s1picicw4 register, 12-59 in s2picicw4 register, 12-47 sgl_int_enb bit field, 7-9 sig_serr bit field, 6-19 signal width for (gpiowr and gpmemwr) bit field, 10-12 for gpale bit field, 10-14 for gpiord and gpmemrd bit field, 10-10 for the gp bus chip selects bit field, 10-8 signaled system error bit field, 6-19 signaled target abort bit field, 6-20 single pic bit field in mpicicw1 register, 12-26 in s1picicw1 register, 12-52 in s2picicw1 register, 12-40 single-bit ecc error bit field, 7-10 sl bit in r_sl_eoi bit field, 12-28, 12-41, 12-53 sl1picmode register, 12-8 sl2picmode register, 12-9 slave 1 pic i/o port 00a0h access summary (table), 12-52 initialization control word 1 register, 12-51 initialization control word 2 register, 12-57 initialization control word 3 register, 12-58 initialization control word 4 register, 12-59 in-service register, 12-50 interrupt mask register, 12-60 interrupt mode register, 12-8 interrupt request register, 12-49 operation control word 2 register, 12-53 operation control word 3 register, 12-55 slave 2 pic i/o port 0024h access summary (table), 12-40 initialization control word 1 register, 12-39 initialization control word 2 register, 12-45 initialization control word 3 register, 12-46 initialization control word 4 register, 12-47 in-service register, 12-38 interrupt mask register, 12-48 interrupt mode register, 12-9 interrupt request register, 12-37 operation control word 2 register, 12-41 operation control word 3 register, 12-43 slave dma. see also dma, gp-dma, master dma. slave dma channel 0 memory address register, 11-42 page register, 11-69 transfer count register, 11-43 slave dma channel 0C3 control register, 11-51 mask register, 11-54 mode register, 11-55 status register, 11-50 slave dma channel 1 memory address register, 11-44 page register, 11-65 transfer count register, 11-45 slave dma channel 2 memory address register, 11-46 page register, 11-63 transfer count register, 11-47 slave dma channel 3 memory address register, 11-48 page register, 11-64 transfer count register, 11-49 slave dma clear byte pointer register, 11-57 slave dma controller reset register, 11-58 slave dma controller temporary register, 11-59 slave dma general mask register, 11-61 slave dma mask reset register, 11-60 slave software drq(n) request register, 11-53
index lan?sc520 microcontroller register set manual index-19 slave x pic channel x interrupt mode bit field in sl1picmode register, 12-8 in sl2picmode register, 12-9 global interrupt mode enable bit field, 12-4, 12-5 id 2C0 bit field in s1picicw3 register, 12-58 in s2picicw3 register, 12-46 slave_cbp bit field, 11-57 slave_msk_rst bit field, 11-60 slave_rst bit field, 11-58 slave_tmp bit field, 11-59 slct_icw1 bit field in mpicicw1 register, 12-26 in mpicocw2 register, 12-28 in mpicocw3 register, 12-30 in s1picicw1 register, 12-51 in s1picocw2 register, 12-53 in s1picocw3 register, 12-55 in s2picicw1 register, 12-39 in s2picocw2 register, 12-41 in s2picocw3 register, 12-43 sldmacbp register, 11-57 sldmactl register, 11-51 sldmagenmsk register, 11-61 sldmamode register, 11-55 sldmamsk register, 11-54 sldmamskrst register, 11-60 sldmarst register, 11-58 sldmasta register, 11-50 sldmaswreq register, 11-53 sldmatmp register, 11-59 smm bit field in mpicocw3 register, 12-30 in s1picocw3 register, 12-55 in s2picocw3 register, 12-43 sngl bit field in mpicicw1 register, 12-26 in s1picicw1 register, 12-52 in s2picicw1 register, 12-40 software dma request bit field in mstdmaswreq register, 11-89 in sldmaswreq register, 11-53 software gp bus reset bit field, 3-3 software interrupt 16C1 control register, 12-10 22C17/nmi control register, 12-13 software nmi source bit field, 12-13 software system reset bit field, 3-4 software timer configuration register, 15-4 microsecond count register, 15-3 millisecond count register, 15-2 mmcr registers (table), 15-1 soutx signal, 18-17, 18-19 sp bit field, 18-17 special cycle recognition bit not implemented, 6-21 special fully nested mode enable bit field in mpicicw4 register, 12-35 in s1picicw4 register, 12-59 in s2picicw4 register, 12-47 special mask mode bit field in mpicocw3 register, 12-30 in s1picocw3 register, 12-55 in s2picocw3 register, 12-43 specific eoi level select bit field in mpicocw2 register, 12-28 in s1picocw2 register, 12-54 in s2picocw2 register, 12-41 srasx signal, 7-4, 20-10 srcw_drive bit field, 20-10 sreset internal signal, 3-8, 3-9 ssi busy bit field, 19-6 ssi clock speed select bit field, 19-2 selections (table), 19-2 ssi command register, 19-5 ssi control register, 19-2 ssi data in bit field, 19-7 ssi data out bit field, 19-4 ssi interrupt mapping register, 12-21 ssi inverted clock mode enable bit field, 19-3 ssi inverted phase mode enable bit field, 19-3 ssi mmcr registers (table), 19-1 ssi most significant bit first mode enable bit field, 19-3 ssi receive register, 19-7 ssi status register, 19-6 ssi transaction complete interrupt bit field, 19-6 ssi transmit register, 19-4 ssi_clk signal, 19-3, 19-6 in ssictl register, 19-2, 19-3 in ssista register, 19-6 ssi_di signal in ssictl register, 19-3 in ssircv register, 19-7 ssi_do signal in ssictl register, 19-3 in ssixmit register, 19-4 ssicmd register, 19-5 ssictl register, 19-2 ssimap register, 12-21
index index-20 lan?sc520 microcontroller register set manual ssircv register, 19-7 ssista register, 19-6 ssixmit register, 19-4 start address bit field, 2-9 status register select bit field in mpicocw3 register, 12-30 in s1picocw3 register, 12-55 in s2picocw3 register, 12-43 status/command register, 6-19 stick parity enable bit field, 18-17 stop bits bit field, 18-18 stp bit field, 18-18 sub class code bit field, 6-22 sub_dly bit field in bootcsctl register, 9-2 in romcs1ctl register, 9-4 in romcs2ctl register, 9-6 support, iii sw_px_trig bit field in swint16_1 register, 12-10, 12-11, 12-12 in swint22_17 register, 12-13, 12-14 swex signal, 20-10 swint16_1 register, 12-10 swint22_17 register, 12-13 swt microsecond count bit field, 15-3 swtmrcfg register, 15-4 swtmrmicro register, 15-3 swtmrmilli register, 15-2 sx bit field, 12-33, 12-34 sx_gint_mode bit field, 12-4, 12-5 sys_rst bit field, 3-4 sysarbctl register, 5-2 sysarbmenb register, 5-4 sysctla register, 3-9 sysctlb register, 13-13 sysinfo register, 3-2 system address mapping mmcr registers (table), 2-1 system arbiter concurrent mode enable bit field, 5-2 control register, 5-2 master enable register, 5-4 mmcr registers (table), 5-1 system board information register, 3-2 system control port a register, 3-9 system control port b register, 13-13 system control processor data bit field, 3-7 sz_st_adr bit field, 2-8 t t_aper_irq_enb bit field, 6-5 t_aper_irq_sel bit field, 6-5 t_aper_irq_sta bit field, 6-8 t_dlyto_irq_enb bit field, 6-5 t_dlyto_irq_sel bit field, 6-5 t_dlyto_irq_sta bit field, 6-7 t_dlytr_enb bit field, 6-4 t_dper_irq_enb bit field, 6-6 t_dper_irq_sel bit field, 6-5 t_dper_irq_sta bit field, 6-8 t_irq_id bit field, 6-7 t_purge_rd_enb bit field, 6-3 t7Ct3 bit field in mpicicw2 register, 12-32 in s1picicw2 register, 12-57 in s2picicw2 register, 12-45 target address parity interrupt enable bit field, 6-5 select bit field, 6-5 status bit field, 6-8 target bit field, 2-6 target data parity interrupt enable bit field, 6-6 select bit field, 6-5 status bit field, 6-8 target delayed transaction time-out interrupt enable bit field, 6-5 select bit field, 6-5 status bit field, 6-7 target fifo purge enable bit field, 6-3 target interrupt identification bit field, 6-7 target of the parx window bit field, 2-6 tc_int bit field, 19-6 tc_int_enb bit field, 19-2 tcx bit field in mstdmasta register, 11-86 in sldmasta register, 11-50 technical support, iii temt bit field, 18-21 teri bit field, 18-23 tf_clr bit field in uartxfcr register, 18-15 in uartxfcrshad register, 18-5 third-party support, iii thr bit field, 18-7 thre bit field, 18-21 timer 2 gate input control bit field, 13-13
index lan?sc520 microcontroller register set manual index-21 tmrin0 signal function select bit field, 20-7 in gptmr0cnt register, 14-6 in gptmr0ctl register, 14-4, 14-5 tmrin1 signal function select bit field, 20-7 in gptmr1cnt register, 14-12 in gptmr1ctl register, 14-10, 14-11 tmrout0 signal function select bit field, 20-7 in gptmr0ctl register, 14-3, 14-5 tmrout1 signal function select bit field, 20-7 in gptmr1ctl register, 14-9, 14-11 trailing edge ring indicator bit field, 18-23 transaction complete interrupt enable bit field, 19-2 transfer mode bit field in mstdmamode register, 11-91 in sldmamode register, 11-55 transmit holding register (16450-compatible mode) or transmitter fifo (16550-compatible mode) empty bit field, 18-21 transmit/receive word length select bit field, 18-18 transmitter empty indicator bit field, 18-21 transmitter fifo clear bit field in uartxfcr register, 18-15 in uartxfcrshad register, 18-5 trnmod bit field in mstdmamode register, 11-91 in sldmamode register, 11-55 tx_int_sta bit field in gptmrsta register, 14-2 txdackx internal signal, 11-8 txdrqx channel mapping bit field, 11-8 txdrqx internal signal, 11-8, 18-5, 18-15 txdrqx_chsel bit field, 11-8 txtc_det bit field, 18-4 txtc_enb bit field, 18-3 u uart x baud clock divisor latch bit field in uartxbcdh register, 18-10 in uartxbcdl register, 18-9 baud clock divisor latch lsb register, 18-9 baud clock divisor latch msb register, 18-10 clock source enable bit field, 18-3 direct-mapped registers (table), 18-1 disable bit field, 2-3 fifo control register, 18-15 fifo control shadow register, 18-5 general control register, 18-3 general status register, 18-4 interrupt enable register, 18-11 interrupt id register, 18-12 interrupt identification and priority (table), 18-13 interrupt mapping register, 12-21 interrupt programming summary (table), 18-14 line control register, 18-17 line status register, 18-21 mmcr registers (table), 18-1 modem control register, 18-19 modem status register, 18-23 receive buffer bit field, 18-8 receive buffer register, 18-8 receive tc detected bit field, 18-4 receive tc interrupt enable bit field, 18-3 scratch pad register, 18-25 transmit holding register, 18-7 transmit holding register bit field, 18-7 transmit tc detected bit field, 18-4 transmit tc interrupt enable bit field, 18-3 uart1bcdh register, 18-10 uart1bcdl register, 18-9 uart1ctl register, 18-3 uart1fcr register, 18-15 uart1fcrshad register, 18-5 uart1intenb register, 18-11 uart1intid register, 18-12 uart1lcr register, 18-17 uart1lsr register, 18-21 uart1map register, 12-21 uart1mcr register, 18-19 uart1msr register, 18-23 uart1rbr register, 18-8 uart1scratch register, 18-25 uart1sta register, 18-4 uart1thr register, 18-7 uart2bcdh register, 18-10 uart2bcdl register, 18-9 uart2ctl register, 18-3 uart2fcr register, 18-15 uart2fcrshad register, 18-5 uart2intenb register, 18-11 uart2intid register, 18-12 uart2lcr register, 18-17 uart2lsr register, 18-21 uart2map register, 12-21 uart2mcr register, 18-19 uart2msr register, 18-23 uart2rbr register, 18-8 uart2scratch register, 18-25 uart2sta register, 18-4 uart2thr register, 18-7 uartx_dis bit field, 2-3
index index-22 lan?sc520 microcontroller register set manual udf supported bit field, 6-20 udfs bit field, 6-20 uip bit field, 17-14 upd_int_enb bit field, 17-17 upd_int_flg bit field, 17-19 update in progress bit field, 17-14 update-ended interrupt enable bit field, 17-17 flag bit field, 17-19 url amd, iii literature ordering, iii us_cnt bit field, 15-3 v valid ram and time bit field, 17-20 vdr_id bit field, 6-18 vendor id bit field, 6-18 vga palette snoop enable bit not implemented, 6-21 w wait cycle control bit not implemented, 6-21 watchdog timer control register, 16-2 count high register, 16-5 count low register, 16-4 enable bit field, 16-2 exponent selections (table), 16-3 interrupt mapping register, 12-21 mmcr registers (table), 16-1 reset detect bit field, 3-5 reset enable bit field, 16-2 wb_enb bit field, 8-3 wb_flush bit field, 8-3 wb_tst_enb bit field, 7-2 wb_wm bit field, 8-2 wbmstrx signal, 7-2 wdt_rst_det bit field, 3-5 wdtmap register, 12-21 wdtmrcnth register, 16-5 wdtmrcntl register, 16-4 wdtmrctl register, 16-2 width bit field in bootcsctl register, 9-2 in romcs1ctl register, 9-4 in romcs2ctl register, 9-6 wls bit field, 18-18 wpv_int_enb bit field, 2-2 wpv_mstr bit field, 2-4 wpv_sta bit field, 2-4 wpv_window bit field, 2-4 wpvmap register, 12-21 wpvsta register, 2-4 write buffer enable bit field, 8-3 flush bit field, 8-3 test mode enable bit field, 7-2 watermark bit field, 8-2 write buffer and read buffer mmcr registers (table), 8-1 write selection control bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 write-protect violation interrupt enable bit field, 2-2 interrupt status bit field, 2-4 master bit field, 2-4 window number bit field, 2-4 write-protect violation interrupt mapping register, 12-21 write-protect violation status register, 2-4 wrst_enb bit field, 16-2 wrtsel bit field in mstdmactl register, 11-87 in sldmactl register, 11-51 www.amd.com, iii x xtal_freq bit field, 15-4 y year bit field, 17-13


▲Up To Search▲   

 
Price & Availability of ELANSC520

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

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


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