![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
stellaris ? lm3s9gn5 microcontroller data sheet copyright ? 2007-2014 texas instruments incorporated ds-lm3s9gn5-15852.2743 spms248c texas instruments-production data
copyright copyright ? 2007-2014 texas instruments incorporated all rights reserved. stellaris and stellarisware ? are registered trademarks of texas instruments incorporated. arm and thumb are registered trademarks and cortex is a trademark of arm limited. other names and brands may be claimed as the property of others. production data information is current as of publication date. products conform to specifcations per the terms of texas instruments standard warranty. production processing does not necessarily include testing of all parameters. please be aware that an important notice concerning availability, standard warranty, and use in critical applications of texas instruments semiconductor products and disclaimers thereto appears at the end of this data sheet. texas instruments incorporated 108 wild basin, suite 350 austin, tx 78746 http://www.ti.com/stellaris http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm july 03, 2014 2 texas instruments-production data table of contents revision history ............................................................................................................................. 40 about this document .................................................................................................................... 43 audience .............................................................................................................................................. 43 about this manual ................................................................................................................................ 43 related documents ............................................................................................................................... 43 documentation conventions .................................................................................................................. 44 1 architectural overview .......................................................................................... 46 1.1 overview ...................................................................................................................... 46 1.2 target applications ........................................................................................................ 48 1.3 features ....................................................................................................................... 48 1.3.1 arm cortex-m3 processor core .................................................................................... 48 1.3.2 on-chip memory ........................................................................................................... 50 1.3.3 external peripheral interface ......................................................................................... 51 1.3.4 serial communications peripherals ................................................................................ 53 1.3.5 system integration ........................................................................................................ 58 1.3.6 advanced motion control ............................................................................................... 63 1.3.7 analog .......................................................................................................................... 65 1.3.8 jtag and arm serial wire debug ................................................................................ 67 1.3.9 packaging and temperature .......................................................................................... 68 1.4 hardware details .......................................................................................................... 68 2 the cortex-m3 processor ...................................................................................... 69 2.1 block diagram .............................................................................................................. 70 2.2 overview ...................................................................................................................... 71 2.2.1 system-level interface .................................................................................................. 71 2.2.2 integrated configurable debug ...................................................................................... 71 2.2.3 trace port interface unit (tpiu) ..................................................................................... 72 2.2.4 cortex-m3 system component details ........................................................................... 72 2.3 programming model ...................................................................................................... 73 2.3.1 processor mode and privilege levels for software execution ........................................... 73 2.3.2 stacks .......................................................................................................................... 73 2.3.3 register map ................................................................................................................ 74 2.3.4 register descriptions .................................................................................................... 75 2.3.5 exceptions and interrupts .............................................................................................. 88 2.3.6 data types ................................................................................................................... 88 2.4 memory model .............................................................................................................. 88 2.4.1 memory regions, types and attributes ........................................................................... 90 2.4.2 memory system ordering of memory accesses .............................................................. 91 2.4.3 behavior of memory accesses ....................................................................................... 91 2.4.4 software ordering of memory accesses ......................................................................... 92 2.4.5 bit-banding ................................................................................................................... 93 2.4.6 data storage ................................................................................................................ 95 2.4.7 synchronization primitives ............................................................................................. 96 2.5 exception model ........................................................................................................... 97 2.5.1 exception states ........................................................................................................... 98 2.5.2 exception types ............................................................................................................ 98 3 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller 2.5.3 exception handlers ..................................................................................................... 101 2.5.4 vector table ................................................................................................................ 101 2.5.5 exception priorities ...................................................................................................... 102 2.5.6 interrupt priority grouping ............................................................................................ 103 2.5.7 exception entry and return ......................................................................................... 103 2.6 fault handling ............................................................................................................. 105 2.6.1 fault types ................................................................................................................. 106 2.6.2 fault escalation and hard faults .................................................................................. 106 2.6.3 fault status registers and fault address registers ...................................................... 107 2.6.4 lockup ....................................................................................................................... 107 2.7 power management .................................................................................................... 107 2.7.1 entering sleep modes ................................................................................................. 108 2.7.2 wake up from sleep mode .......................................................................................... 108 2.8 instruction set summary .............................................................................................. 109 3 cortex-m3 peripherals ......................................................................................... 112 3.1 functional description ................................................................................................. 112 3.1.1 system timer (systick) ............................................................................................... 112 3.1.2 nested vectored interrupt controller (nvic) .................................................................. 113 3.1.3 system control block (scb) ........................................................................................ 115 3.1.4 memory protection unit (mpu) ..................................................................................... 115 3.2 register map .............................................................................................................. 120 3.3 system timer (systick) register descriptions .............................................................. 122 3.4 nvic register descriptions .......................................................................................... 126 3.5 system control block (scb) register descriptions ........................................................ 139 3.6 memory protection unit (mpu) register descriptions .................................................... 168 4 jtag interface ...................................................................................................... 178 4.1 block diagram ............................................................................................................ 179 4.2 signal description ....................................................................................................... 179 4.3 functional description ................................................................................................. 180 4.3.1 jtag interface pins ..................................................................................................... 180 4.3.2 jtag tap controller ................................................................................................... 182 4.3.3 shift registers ............................................................................................................ 182 4.3.4 operational considerations .......................................................................................... 183 4.4 initialization and configuration ..................................................................................... 185 4.5 register descriptions .................................................................................................. 186 4.5.1 instruction register (ir) ............................................................................................... 186 4.5.2 data registers ............................................................................................................ 188 5 system control ..................................................................................................... 190 5.1 signal description ....................................................................................................... 190 5.2 functional description ................................................................................................. 190 5.2.1 device identification .................................................................................................... 191 5.2.2 reset control .............................................................................................................. 191 5.2.3 non-maskable interrupt ............................................................................................... 196 5.2.4 power control ............................................................................................................. 196 5.2.5 clock control .............................................................................................................. 197 5.2.6 system control ........................................................................................................... 203 5.3 initialization and configuration ..................................................................................... 205 5.4 register map .............................................................................................................. 205 july 03, 2014 4 texas instruments-production data table of contents 5.5 register descriptions .................................................................................................. 207 6 internal memory ................................................................................................... 298 6.1 block diagram ............................................................................................................ 298 6.2 functional description ................................................................................................. 298 6.2.1 sram ........................................................................................................................ 299 6.2.2 rom .......................................................................................................................... 299 6.2.3 flash memory ............................................................................................................. 301 6.3 register map .............................................................................................................. 306 6.4 flash memory register descriptions (flash control offset) ............................................ 308 6.5 memory register descriptions (system control offset) .................................................. 320 7 micro direct memory access (dma) ................................................................ 344 7.1 block diagram ............................................................................................................ 345 7.2 functional description ................................................................................................. 345 7.2.1 channel assignments .................................................................................................. 346 7.2.2 priority ........................................................................................................................ 347 7.2.3 arbitration size ............................................................................................................ 347 7.2.4 request types ............................................................................................................ 348 7.2.5 channel configuration ................................................................................................. 349 7.2.6 transfer modes ........................................................................................................... 350 7.2.7 transfer size and increment ........................................................................................ 359 7.2.8 peripheral interface ..................................................................................................... 359 7.2.9 software request ........................................................................................................ 359 7.2.10 interrupts and errors .................................................................................................... 360 7.3 initialization and configuration ..................................................................................... 360 7.3.1 module initialization ..................................................................................................... 360 7.3.2 configuring a memory-to-memory transfer ................................................................... 361 7.3.3 configuring a peripheral for simple transmit ................................................................ 362 7.3.4 configuring a peripheral for ping-pong receive ............................................................ 364 7.3.5 configuring channel assignments ................................................................................ 366 7.4 register map .............................................................................................................. 366 7.5 dma channel control structure ................................................................................. 368 7.6 dma register descriptions ........................................................................................ 375 8 general-purpose input/outputs (gpios) ........................................................... 405 8.1 signal description ....................................................................................................... 405 8.2 functional description ................................................................................................. 410 8.2.1 data control ............................................................................................................... 412 8.2.2 interrupt control .......................................................................................................... 413 8.2.3 mode control .............................................................................................................. 414 8.2.4 commit control ........................................................................................................... 414 8.2.5 pad control ................................................................................................................. 415 8.2.6 identification ............................................................................................................... 415 8.3 initialization and configuration ..................................................................................... 415 8.4 register map .............................................................................................................. 416 8.5 register descriptions .................................................................................................. 418 9 external peripheral interface (epi) ..................................................................... 461 9.1 epi block diagram ...................................................................................................... 462 9.2 signal description ....................................................................................................... 463 5 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller 9.3 functional description ................................................................................................. 465 9.3.1 non-blocking reads .................................................................................................... 466 9.3.2 dma operation ........................................................................................................... 467 9.4 initialization and configuration ..................................................................................... 467 9.4.1 sdram mode ............................................................................................................. 468 9.4.2 host bus mode ........................................................................................................... 472 9.4.3 general-purpose mode ............................................................................................... 483 9.5 register map .............................................................................................................. 491 9.6 register descriptions .................................................................................................. 492 10 general-purpose timers ...................................................................................... 536 10.1 block diagram ............................................................................................................ 537 10.2 signal description ....................................................................................................... 537 10.3 functional description ................................................................................................. 540 10.3.1 gptm reset conditions .............................................................................................. 541 10.3.2 timer modes ............................................................................................................... 541 10.3.3 dma operation ........................................................................................................... 548 10.3.4 accessing concatenated register values ..................................................................... 548 10.4 initialization and configuration ..................................................................................... 548 10.4.1 one-shot/periodic timer mode .................................................................................... 549 10.4.2 real-time clock (rtc) mode ...................................................................................... 549 10.4.3 input edge-count mode ............................................................................................... 550 10.4.4 input edge timing mode .............................................................................................. 550 10.4.5 pwm mode ................................................................................................................. 551 10.5 register map .............................................................................................................. 551 10.6 register descriptions .................................................................................................. 552 11 watchdog timers ................................................................................................. 583 11.1 block diagram ............................................................................................................ 584 11.2 functional description ................................................................................................. 584 11.2.1 register access timing ............................................................................................... 585 11.3 initialization and configuration ..................................................................................... 585 11.4 register map .............................................................................................................. 585 11.5 register descriptions .................................................................................................. 586 12 analog-to-digital converter (adc) ..................................................................... 608 12.1 block diagram ............................................................................................................ 609 12.2 signal description ....................................................................................................... 610 12.3 functional description ................................................................................................. 612 12.3.1 sample sequencers .................................................................................................... 612 12.3.2 module control ............................................................................................................ 613 12.3.3 hardware sample averaging circuit ............................................................................. 615 12.3.4 analog-to-digital converter .......................................................................................... 616 12.3.5 differential sampling ................................................................................................... 620 12.3.6 internal temperature sensor ........................................................................................ 622 12.3.7 digital comparator unit ............................................................................................... 623 12.4 initialization and configuration ..................................................................................... 627 12.4.1 module initialization ..................................................................................................... 627 12.4.2 sample sequencer configuration ................................................................................. 628 12.5 register map .............................................................................................................. 628 12.6 register descriptions .................................................................................................. 630 july 03, 2014 6 texas instruments-production data table of contents 13 universal asynchronous receivers/transmitters (uarts) ............................. 689 13.1 block diagram ............................................................................................................ 690 13.2 signal description ....................................................................................................... 690 13.3 functional description ................................................................................................. 692 13.3.1 transmit/receive logic ............................................................................................... 693 13.3.2 baud-rate generation ................................................................................................. 693 13.3.3 data transmission ...................................................................................................... 694 13.3.4 serial ir (sir) ............................................................................................................. 694 13.3.5 iso 7816 support ....................................................................................................... 695 13.3.6 modem handshake support ......................................................................................... 696 13.3.7 lin support ................................................................................................................ 697 13.3.8 fifo operation ........................................................................................................... 698 13.3.9 interrupts .................................................................................................................... 699 13.3.10 loopback operation .................................................................................................... 700 13.3.11 dma operation ........................................................................................................... 700 13.4 initialization and configuration ..................................................................................... 700 13.5 register map .............................................................................................................. 701 13.6 register descriptions .................................................................................................. 703 14 synchronous serial interface (ssi) .................................................................... 753 14.1 block diagram ............................................................................................................ 754 14.2 signal description ....................................................................................................... 754 14.3 functional description ................................................................................................. 755 14.3.1 bit rate generation ..................................................................................................... 756 14.3.2 fifo operation ........................................................................................................... 756 14.3.3 interrupts .................................................................................................................... 756 14.3.4 frame formats ........................................................................................................... 757 14.3.5 dma operation ........................................................................................................... 764 14.4 initialization and configuration ..................................................................................... 765 14.5 register map .............................................................................................................. 766 14.6 register descriptions .................................................................................................. 767 15 inter-integrated circuit (i 2 c) interface ................................................................ 795 15.1 block diagram ............................................................................................................ 796 15.2 signal description ....................................................................................................... 796 15.3 functional description ................................................................................................. 797 15.3.1 i 2 c bus functional overview ........................................................................................ 797 15.3.2 available speed modes ............................................................................................... 799 15.3.3 interrupts .................................................................................................................... 800 15.3.4 loopback operation .................................................................................................... 801 15.3.5 command sequence flow charts ................................................................................ 802 15.4 initialization and configuration ..................................................................................... 809 15.5 register map .............................................................................................................. 810 15.6 register descriptions (i 2 c master) ............................................................................... 811 15.7 register descriptions (i 2 c slave) ................................................................................. 824 16 inter-integrated circuit sound (i 2 s) interface .................................................... 833 16.1 block diagram ............................................................................................................ 834 16.2 signal description ....................................................................................................... 834 16.3 functional description ................................................................................................. 836 7 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller 16.3.1 transmit ..................................................................................................................... 837 16.3.2 receive ...................................................................................................................... 841 16.4 initialization and configuration ..................................................................................... 843 16.5 register map .............................................................................................................. 844 16.6 register descriptions .................................................................................................. 845 17 controller area network (can) module ............................................................. 870 17.1 block diagram ............................................................................................................ 871 17.2 signal description ....................................................................................................... 871 17.3 functional description ................................................................................................. 872 17.3.1 initialization ................................................................................................................. 873 17.3.2 operation ................................................................................................................... 874 17.3.3 transmitting message objects ..................................................................................... 875 17.3.4 configuring a transmit message object ........................................................................ 875 17.3.5 updating a transmit message object ........................................................................... 876 17.3.6 accepting received message objects .......................................................................... 877 17.3.7 receiving a data frame .............................................................................................. 877 17.3.8 receiving a remote frame .......................................................................................... 877 17.3.9 receive/transmit priority ............................................................................................. 878 17.3.10 configuring a receive message object ........................................................................ 878 17.3.11 handling of received message objects ........................................................................ 879 17.3.12 handling of interrupts .................................................................................................. 881 17.3.13 test mode ................................................................................................................... 882 17.3.14 bit timing configuration error considerations ............................................................... 884 17.3.15 bit time and bit rate ................................................................................................... 884 17.3.16 calculating the bit timing parameters .......................................................................... 886 17.4 register map .............................................................................................................. 889 17.5 can register descriptions .......................................................................................... 890 18 ethernet controller .............................................................................................. 921 18.1 block diagram ............................................................................................................ 921 18.2 signal description ....................................................................................................... 922 18.3 functional description ................................................................................................. 924 18.3.1 mac operation ........................................................................................................... 924 18.3.2 media independent interface ........................................................................................ 928 18.3.3 interrupts .................................................................................................................... 931 18.3.4 dma operation ........................................................................................................... 931 18.4 initialization and configuration ..................................................................................... 932 18.4.1 software configuration ................................................................................................ 932 18.5 register map .............................................................................................................. 932 18.6 ethernet mac register descriptions ............................................................................. 933 19 universal serial bus (usb) controller ............................................................... 957 19.1 block diagram ............................................................................................................ 958 19.2 signal description ....................................................................................................... 958 19.3 functional description ................................................................................................. 960 19.3.1 operation as a device ................................................................................................. 960 19.3.2 operation as a host .................................................................................................... 965 19.3.3 otg mode .................................................................................................................. 969 19.3.4 dma operation ........................................................................................................... 971 19.4 initialization and configuration ..................................................................................... 972 july 03, 2014 8 texas instruments-production data table of contents 19.4.1 pin configuration ......................................................................................................... 972 19.4.2 endpoint configuration ................................................................................................ 973 19.5 register map .............................................................................................................. 973 19.6 register descriptions .................................................................................................. 984 20 analog comparators .......................................................................................... 1096 20.1 block diagram ........................................................................................................... 1097 20.2 signal description ..................................................................................................... 1097 20.3 functional description ............................................................................................... 1098 20.3.1 internal reference programming ................................................................................ 1099 20.4 initialization and configuration .................................................................................... 1100 20.5 register map ............................................................................................................ 1101 20.6 register descriptions ................................................................................................. 1102 21 pulse width modulator (pwm) .......................................................................... 1110 21.1 block diagram ........................................................................................................... 1111 21.2 signal description ..................................................................................................... 1112 21.3 functional description ............................................................................................... 1115 21.3.1 pwm timer ............................................................................................................... 1115 21.3.2 pwm comparators .................................................................................................... 1116 21.3.3 pwm signal generator .............................................................................................. 1117 21.3.4 dead-band generator ............................................................................................... 1118 21.3.5 interrupt/adc-trigger selector ................................................................................... 1118 21.3.6 synchronization methods .......................................................................................... 1119 21.3.7 fault conditions ........................................................................................................ 1120 21.3.8 output control block .................................................................................................. 1120 21.4 initialization and configuration .................................................................................... 1121 21.5 register map ............................................................................................................ 1122 21.6 register descriptions ................................................................................................. 1125 22 quadrature encoder interface (qei) ................................................................. 1188 22.1 block diagram ........................................................................................................... 1188 22.2 signal description ..................................................................................................... 1189 22.3 functional description ............................................................................................... 1190 22.4 initialization and configuration .................................................................................... 1193 22.5 register map ............................................................................................................ 1193 22.6 register descriptions ................................................................................................. 1194 23 pin diagram ........................................................................................................ 1211 24 signal tables ...................................................................................................... 1213 24.1 100-pin lqfp package pin tables ............................................................................. 1214 24.1.1 signals by pin number .............................................................................................. 1214 24.1.2 signals by signal name ............................................................................................. 1227 24.1.3 signals by function, except for gpio ......................................................................... 1239 24.1.4 gpio pins and alternate functions ............................................................................ 1248 24.1.5 possible pin assignments for alternate functions ....................................................... 1251 24.2 108-ball bga package pin tables .............................................................................. 1255 24.2.1 signals by pin number .............................................................................................. 1255 24.2.2 signals by signal name ............................................................................................. 1269 24.2.3 signals by function, except for gpio ......................................................................... 1280 24.2.4 gpio pins and alternate functions ............................................................................ 1289 9 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller 24.2.5 possible pin assignments for alternate functions ....................................................... 1292 24.3 connections for unused signals ................................................................................. 1295 25 operating characteristics ................................................................................. 1297 26 electrical characteristics .................................................................................. 1298 26.1 maximum ratings ...................................................................................................... 1298 26.2 recommended operating conditions ......................................................................... 1298 26.3 load conditions ........................................................................................................ 1299 26.4 jtag and boundary scan .......................................................................................... 1299 26.5 power and brown-out ............................................................................................... 1301 26.6 reset ........................................................................................................................ 1302 26.7 on-chip low drop-out (ldo) regulator ..................................................................... 1303 26.8 clocks ...................................................................................................................... 1303 26.8.1 pll specifications ..................................................................................................... 1303 26.8.2 piosc specifications ................................................................................................ 1304 26.8.3 internal 30-khz oscillator specifications ..................................................................... 1304 26.8.4 main oscillator specifications ..................................................................................... 1305 26.8.5 system clock specification with adc operation .......................................................... 1306 26.8.6 system clock specification with usb operation .......................................................... 1306 26.9 sleep modes ............................................................................................................. 1306 26.10 flash memory ........................................................................................................... 1306 26.11 input/output characteristics ....................................................................................... 1307 26.12 external peripheral interface (epi) .............................................................................. 1307 26.13 analog-to-digital converter (adc) .............................................................................. 1313 26.14 synchronous serial interface (ssi) ............................................................................. 1314 26.15 inter-integrated circuit (i 2 c) interface ......................................................................... 1316 26.16 inter-integrated circuit sound (i 2 s) interface ............................................................... 1317 26.17 ethernet controller .................................................................................................... 1318 26.18 universal serial bus (usb) controller ......................................................................... 1320 26.19 analog comparator ................................................................................................... 1321 26.20 current consumption ................................................................................................. 1321 26.20.1 nominal power consumption ..................................................................................... 1321 26.20.2 maximum current consumption ................................................................................. 1322 a register quick reference ................................................................................. 1323 b ordering and contact information ................................................................... 1378 b.1 ordering information .................................................................................................. 1378 b.2 part markings ............................................................................................................ 1378 b.3 kits ........................................................................................................................... 1378 b.4 support information ................................................................................................... 1379 c package information .......................................................................................... 1380 c.1 100-pin lqfp package ............................................................................................. 1380 c.1.1 package dimensions ................................................................................................. 1380 c.1.2 tray dimensions ....................................................................................................... 1382 c.1.3 tape and reel dimensions ........................................................................................ 1382 c.2 108-ball bga package .............................................................................................. 1384 c.2.1 package dimensions ................................................................................................. 1384 c.2.2 tray dimensions ....................................................................................................... 1386 c.2.3 tape and reel dimensions ........................................................................................ 1387 july 03, 2014 10 texas instruments-production data table of contents list of figures figure 1-1. stellaris lm3s9gn5 microcontroller high-level block diagram .............................. 47 figure 2-1. cpu block diagram ............................................................................................. 71 figure 2-2. tpiu block diagram ............................................................................................ 72 figure 2-3. cortex-m3 register set ........................................................................................ 74 figure 2-4. bit-band mapping ................................................................................................ 95 figure 2-5. data storage ....................................................................................................... 96 figure 2-6. vector table ...................................................................................................... 102 figure 2-7. exception stack frame ...................................................................................... 104 figure 3-1. srd use example ............................................................................................. 118 figure 4-1. jtag module block diagram .............................................................................. 179 figure 4-2. test access port state machine ......................................................................... 182 figure 4-3. idcode register format ................................................................................... 188 figure 4-4. bypass register format ................................................................................... 189 figure 4-5. boundary scan register format ......................................................................... 189 figure 5-1. basic rst configuration .................................................................................... 193 figure 5-2. external circuitry to extend power-on reset ....................................................... 193 figure 5-3. reset circuit controlled by switch ...................................................................... 194 figure 5-4. power architecture ............................................................................................ 197 figure 5-5. main clock tree ................................................................................................ 199 figure 6-1. internal memory block diagram .......................................................................... 298 figure 7-1. dma block diagram ......................................................................................... 345 figure 7-2. example of ping-pong dma transaction ........................................................... 352 figure 7-3. memory scatter-gather, setup and configuration ................................................ 354 figure 7-4. memory scatter-gather, dma copy sequence .................................................. 355 figure 7-5. peripheral scatter-gather, setup and configuration ............................................. 357 figure 7-6. peripheral scatter-gather, dma copy sequence ............................................... 358 figure 8-1. digital i/o pads ................................................................................................. 411 figure 8-2. analog/digital i/o pads ...................................................................................... 412 figure 8-3. gpiodata write example ................................................................................. 413 figure 8-4. gpiodata read example ................................................................................. 413 figure 9-1. epi block diagram ............................................................................................. 463 figure 9-2. sdram non-blocking read cycle ...................................................................... 471 figure 9-3. sdram normal read cycle ............................................................................... 471 figure 9-4. sdram write cycle ........................................................................................... 472 figure 9-5. example schematic for muxed host-bus 16 mode ............................................... 478 figure 9-6. host-bus read cycle, mode = 0x1, wrhigh = 0, rdhigh = 0 .......................... 480 figure 9-7. host-bus write cycle, mode = 0x1, wrhigh = 0, rdhigh = 0 .......................... 481 figure 9-8. host-bus write cycle with multiplexed address and data, mode = 0x0, wrhigh = 0, rdhigh = 0 ............................................................................................... 481 figure 9-9. host-bus write cycle with multiplexed address and data and ale with dual csn .................................................................................................................. 482 figure 9-10. continuous read mode accesses ...................................................................... 482 figure 9-11. write followed by read to external fifo ............................................................ 483 figure 9-12. two-entry fifo ................................................................................................. 483 figure 9-13. single-cycle write access, frm50=0, frmcnt=0, wrcyc=0 ........................... 487 11 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller figure 9-14. two-cycle read, write accesses, frm50=0, frmcnt=0, rdcyc=1, wrcyc=1 ........................................................................................................ 487 figure 9-15. read accesses, frm50=0, frmcnt=0, rdcyc=1 ............................................ 488 figure 9-16. frame signal operation, frm50=0 and frmcnt=0 ......................................... 488 figure 9-17. frame signal operation, frm50=0 and frmcnt=1 ......................................... 488 figure 9-18. frame signal operation, frm50=0 and frmcnt=2 ......................................... 489 figure 9-19. frame signal operation, frm50=1 and frmcnt=0 ......................................... 489 figure 9-20. frame signal operation, frm50=1 and frmcnt=1 ......................................... 489 figure 9-21. frame signal operation, frm50=1 and frmcnt=2 ......................................... 489 figure 9-22. irdy signal operation, frm50=0, frmcnt=0, and rd2cyc=1 ......................... 490 figure 9-23. epi clock operation, clkgate=1, wr2cyc=0 ................................................. 491 figure 9-24. epi clock operation, clkgate=1, wr2cyc=1 ................................................. 491 figure 10-1. gptm module block diagram ............................................................................ 537 figure 10-2. timer daisy chain ............................................................................................. 543 figure 10-3. input edge-count mode example ....................................................................... 545 figure 10-4. 16-bit input edge-time mode example ............................................................... 546 figure 10-5. 16-bit pwm mode example ................................................................................ 547 figure 11-1. wdt module block diagram .............................................................................. 584 figure 12-1. implementation of two adc blocks .................................................................... 609 figure 12-2. adc module block diagram ............................................................................... 610 figure 12-3. adc sample phases ......................................................................................... 614 figure 12-4. doubling the adc sample rate .......................................................................... 615 figure 12-5. skewed sampling .............................................................................................. 615 figure 12-6. sample averaging example ............................................................................... 616 figure 12-7. adc input equivalency diagram ......................................................................... 617 figure 12-8. internal voltage conversion result ..................................................................... 618 figure 12-9. external voltage conversion result with 3.0-v setting ......................................... 619 figure 12-10. external voltage conversion result with 1.0-v setting ......................................... 619 figure 12-11. differential sampling range, v in_odd = 1.5 v ...................................................... 621 figure 12-12. differential sampling range, v in_odd = 0.75 v .................................................... 621 figure 12-13. differential sampling range, v in_odd = 2.25 v .................................................... 622 figure 12-14. internal temperature sensor characteristic ......................................................... 623 figure 12-15. low-band operation (cic=0x0 and/or ctc=0x0) ................................................ 625 figure 12-16. mid-band operation (cic=0x1 and/or ctc=0x1) ................................................. 626 figure 12-17. high-band operation (cic=0x3 and/or ctc=0x3) ................................................ 627 figure 13-1. uart module block diagram ............................................................................. 690 figure 13-2. uart character frame ..................................................................................... 693 figure 13-3. irda data modulation ......................................................................................... 695 figure 13-4. lin message ..................................................................................................... 697 figure 13-5. lin synchronization field ................................................................................... 698 figure 14-1. ssi module block diagram ................................................................................. 754 figure 14-2. ti synchronous serial frame format (single transfer) ........................................ 758 figure 14-3. ti synchronous serial frame format (continuous transfer) ................................ 758 figure 14-4. freescale spi format (single transfer) with spo=0 and sph=0 .......................... 759 figure 14-5. freescale spi format (continuous transfer) with spo=0 and sph=0 .................. 759 figure 14-6. freescale spi frame format with spo=0 and sph=1 ......................................... 760 figure 14-7. freescale spi frame format (single transfer) with spo=1 and sph=0 ............... 761 figure 14-8. freescale spi frame format (continuous transfer) with spo=1 and sph=0 ........ 761 july 03, 2014 12 texas instruments-production data table of contents figure 14-9. freescale spi frame format with spo=1 and sph=1 ......................................... 762 figure 14-10. microwire frame format (single frame) ........................................................ 763 figure 14-11. microwire frame format (continuous transfer) ............................................. 764 figure 14-12. microwire frame format, ssifss input setup and hold requirements ............ 764 figure 15-1. i 2 c block diagram ............................................................................................. 796 figure 15-2. i 2 c bus configuration ........................................................................................ 797 figure 15-3. start and stop conditions ............................................................................. 798 figure 15-4. complete data transfer with a 7-bit address ....................................................... 798 figure 15-5. r/s bit in first byte ............................................................................................ 799 figure 15-6. data validity during bit transfer on the i 2 c bus ................................................... 799 figure 15-7. master single transmit .................................................................................. 803 figure 15-8. master single receive ..................................................................................... 804 figure 15-9. master transmit with repeated start ........................................................... 805 figure 15-10. master receive with repeated start ............................................................. 806 figure 15-11. master receive with repeated start after transmit with repeated start .............................................................................................................. 807 figure 15-12. master transmit with repeated start after receive with repeated start .............................................................................................................. 808 figure 15-13. slave command sequence ................................................................................ 809 figure 16-1. i 2 s block diagram ............................................................................................. 834 figure 16-2. i 2 s data transfer ............................................................................................... 837 figure 16-3. left-justified data transfer ................................................................................ 837 figure 16-4. right-justified data transfer .............................................................................. 837 figure 17-1. can controller block diagram ............................................................................ 871 figure 17-2. can data/remote frame .................................................................................. 873 figure 17-3. message objects in a fifo buffer ...................................................................... 881 figure 17-4. can bit time .................................................................................................... 885 figure 18-1. ethernet controller ............................................................................................. 921 figure 18-2. ethernet mac block diagram ............................................................................. 922 figure 18-3. ethernet frame ................................................................................................. 924 figure 18-4. management frame format ............................................................................... 930 figure 19-1. usb module block diagram ............................................................................... 958 figure 20-1. analog comparator module block diagram ....................................................... 1097 figure 20-2. structure of comparator unit ............................................................................ 1099 figure 20-3. comparator internal reference structure .......................................................... 1099 figure 21-1. pwm module diagram ..................................................................................... 1112 figure 21-2. pwm generator block diagram ........................................................................ 1112 figure 21-3. pwm count-down mode .................................................................................. 1117 figure 21-4. pwm count-up/down mode ............................................................................. 1117 figure 21-5. pwm generation example in count-up/down mode .......................................... 1118 figure 21-6. pwm dead-band generator ............................................................................. 1118 figure 22-1. qei block diagram .......................................................................................... 1189 figure 22-2. quadrature encoder and velocity predivider operation ...................................... 1192 figure 23-1. 100-pin lqfp package pin diagram ................................................................ 1211 figure 23-2. 108-ball bga package pin diagram (top view) ................................................. 1212 figure 26-1. load conditions ............................................................................................... 1299 figure 26-2. jtag test clock input timing ........................................................................... 1300 figure 26-3. jtag test access port (tap) timing ................................................................ 1300 13 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller figure 26-4. power-on reset timing ................................................................................... 1301 figure 26-5. brown-out reset timing .................................................................................. 1301 figure 26-6. power-on reset and voltage parameters ......................................................... 1302 figure 26-7. external reset timing (rst ) ............................................................................ 1302 figure 26-8. software reset timing ..................................................................................... 1302 figure 26-9. watchdog reset timing ................................................................................... 1303 figure 26-10. mosc failure reset timing ............................................................................. 1303 figure 26-11. sdram initialization and load mode register timing ........................................ 1308 figure 26-12. sdram read timing ....................................................................................... 1308 figure 26-13. sdram write timing ....................................................................................... 1309 figure 26-14. host-bus 8/16 mode read timing ..................................................................... 1310 figure 26-15. host-bus 8/16 mode write timing ..................................................................... 1310 figure 26-16. host-bus 8/16 mode muxed read timing .......................................................... 1311 figure 26-17. host-bus 8/16 mode muxed write timing .......................................................... 1311 figure 26-18. general-purpose mode read and write timing ................................................. 1312 figure 26-19. general-purpose mode irdy timing ................................................................. 1312 figure 26-20. adc input equivalency diagram ....................................................................... 1314 figure 26-21. ssi timing for ti frame format (frf=01), single transfer timing measurement .................................................................................................. 1315 figure 26-22. ssi timing for microwire frame format (frf=10), single transfer ............... 1315 figure 26-23. ssi timing for spi frame format (frf=00), with sph=1 ................................... 1316 figure 26-24. i 2 c timing ....................................................................................................... 1317 figure 26-25. i 2 s master mode transmit timing ..................................................................... 1317 figure 26-26. i 2 s master mode receive timing ...................................................................... 1318 figure 26-27. i 2 s slave mode transmit timing ....................................................................... 1318 figure 26-28. i 2 s slave mode receive timing ........................................................................ 1318 figure c-1. stellaris lm3s9gn5 100-pin lqfp package dimensions .................................. 1380 figure c-2. 100-pin lqfp tray dimensions ........................................................................ 1382 figure c-3. 100-pin lqfp tape and reel dimensions ......................................................... 1383 figure c-4. stellaris lm3s9gn5 108-ball bga package dimensions ................................... 1384 figure c-5. 108-ball bga tray dimensions ......................................................................... 1386 figure c-6. 108-ball bga tape and reel dimensions .......................................................... 1387 july 03, 2014 14 texas instruments-production data table of contents list of tables table 1. revision history .................................................................................................. 40 table 2. documentation conventions ................................................................................ 44 table 2-1. summary of processor mode, privilege level, and stack use ................................ 74 table 2-2. processor register map ....................................................................................... 75 table 2-3. psr register combinations ................................................................................. 80 table 2-4. memory map ....................................................................................................... 88 table 2-5. memory access behavior ..................................................................................... 91 table 2-6. sram memory bit-banding regions .................................................................... 93 table 2-7. peripheral memory bit-banding regions ............................................................... 93 table 2-8. exception types .................................................................................................. 99 table 2-9. interrupts .......................................................................................................... 100 table 2-10. exception return behavior ................................................................................. 105 table 2-11. faults ............................................................................................................... 106 table 2-12. fault status and fault address registers ............................................................ 107 table 2-13. cortex-m3 instruction summary ......................................................................... 109 table 3-1. core peripheral register regions ....................................................................... 112 table 3-2. memory attributes summary .............................................................................. 115 table 3-3. tex, s, c, and b bit field encoding ................................................................... 118 table 3-4. cache policy for memory attribute encoding ....................................................... 119 table 3-5. ap bit field encoding ........................................................................................ 119 table 3-6. memory region attributes for stellaris microcontrollers ........................................ 119 table 3-7. peripherals register map ................................................................................... 120 table 3-8. interrupt priority levels ...................................................................................... 147 table 3-9. example size field values ................................................................................ 175 table 4-1. jtag_swd_swo signals (100lqfp) ................................................................ 179 table 4-2. jtag_swd_swo signals (108bga) ................................................................. 180 table 4-3. jtag port pins state after power-on reset or rst assertion .............................. 181 table 4-4. jtag instruction register commands ................................................................. 186 table 5-1. system control & clocks signals (100lqfp) ...................................................... 190 table 5-2. system control & clocks signals (108bga) ........................................................ 190 table 5-3. reset sources ................................................................................................... 191 table 5-4. clock source options ........................................................................................ 198 table 5-5. possible system clock frequencies using the sysdiv field ............................... 200 table 5-6. examples of possible system clock frequencies using the sysdiv2 field .......... 200 table 5-7. examples of possible system clock frequencies with div400=1 ......................... 201 table 5-8. system control register map ............................................................................. 205 table 5-9. rcc2 fields that override rcc fields ............................................................... 227 table 6-1. flash memory protection policy combinations .................................................... 302 table 6-2. user-programmable flash memory resident registers ....................................... 306 table 6-3. flash register map ............................................................................................ 306 table 7-1. dma channel assignments .............................................................................. 346 table 7-2. request type support ....................................................................................... 348 table 7-3. control structure memory map ........................................................................... 349 table 7-4. channel control structure .................................................................................. 349 table 7-5. dma read example: 8-bit peripheral ................................................................ 359 table 7-6. dma interrupt assignments .............................................................................. 360 15 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller table 7-7. channel control structure offsets for channel 30 ................................................ 361 table 7-8. channel control word configuration for memory transfer example ...................... 361 table 7-9. channel control structure offsets for channel 7 .................................................. 362 table 7-10. channel control word configuration for peripheral transmit example .................. 363 table 7-11. primary and alternate channel control structure offsets for channel 8 ................. 364 table 7-12. channel control word configuration for peripheral ping-pong receive example ............................................................................................................ 365 table 7-13. dma register map .......................................................................................... 367 table 8-1. gpio pins with non-zero reset values .............................................................. 406 table 8-2. gpio pins and alternate functions (100lqfp) ................................................... 406 table 8-3. gpio pins and alternate functions (108bga) ..................................................... 408 table 8-4. gpio pad configuration examples ..................................................................... 415 table 8-5. gpio interrupt configuration example ................................................................ 416 table 8-6. gpio pins with non-zero reset values .............................................................. 417 table 8-7. gpio register map ........................................................................................... 417 table 8-8. gpio pins with non-zero reset values .............................................................. 429 table 8-9. gpio pins with non-zero reset values .............................................................. 435 table 8-10. gpio pins with non-zero reset values .............................................................. 437 table 8-11. gpio pins with non-zero reset values .............................................................. 440 table 8-12. gpio pins with non-zero reset values .............................................................. 447 table 9-1. external peripheral interface signals (100lqfp) ................................................. 463 table 9-2. external peripheral interface signals (108bga) ................................................... 464 table 9-3. epi sdram signal connections ......................................................................... 469 table 9-4. capabilities of host bus 8 and host bus 16 modes .............................................. 473 table 9-5. epi host-bus 8 signal connections .................................................................... 474 table 9-6. epi host-bus 16 signal connections .................................................................. 476 table 9-7. epi general purpose signal connections ........................................................... 485 table 9-8. external peripheral interface (epi) register map ................................................. 491 table 10-1. available ccp pins ............................................................................................ 537 table 10-2. general-purpose timers signals (100lqfp) ....................................................... 538 table 10-3. general-purpose timers signals (108bga) ......................................................... 539 table 10-4. general-purpose timer capabilities .................................................................... 541 table 10-5. counter values when the timer is enabled in periodic or one-shot modes .......... 542 table 10-6. 16-bit timer with prescaler configurations ......................................................... 542 table 10-7. counter values when the timer is enabled in rtc mode .................................... 543 table 10-8. counter values when the timer is enabled in input edge-count mode ................. 544 table 10-9. counter values when the timer is enabled in input event-count mode ................ 545 table 10-10. counter values when the timer is enabled in pwm mode ................................... 547 table 10-11. timers register map .......................................................................................... 551 table 11-1. watchdog timers register map .......................................................................... 586 table 12-1. adc signals (100lqfp) .................................................................................... 610 table 12-2. adc signals (108bga) ...................................................................................... 611 table 12-3. samples and fifo depth of sequencers ............................................................ 612 table 12-4. differential sampling pairs ................................................................................. 620 table 12-5. adc register map ............................................................................................. 628 table 13-1. uart signals (100lqfp) .................................................................................. 691 table 13-2. uart signals (108bga) .................................................................................... 691 table 13-3. flow control mode ............................................................................................. 697 july 03, 2014 16 texas instruments-production data table of contents table 13-4. uart register map ........................................................................................... 702 table 14-1. ssi signals (100lqfp) ...................................................................................... 755 table 14-2. ssi signals (108bga) ........................................................................................ 755 table 14-3. ssi register map .............................................................................................. 766 table 15-1. i2c signals (100lqfp) ...................................................................................... 796 table 15-2. i2c signals (108bga) ........................................................................................ 796 table 15-3. examples of i 2 c master timer period versus speed mode ................................... 800 table 15-4. inter-integrated circuit (i 2 c) interface register map ............................................. 810 table 15-5. write field decoding for i2cmcs[3:0] field ......................................................... 816 table 16-1. i2s signals (100lqfp) ...................................................................................... 835 table 16-2. i2s signals (108bga) ........................................................................................ 835 table 16-3. i 2 s transmit fifo interface ................................................................................ 838 table 16-4. crystal frequency (values from 3.5795 mhz to 5 mhz) ........................................ 839 table 16-5. crystal frequency (values from 5.12 mhz to 8.192 mhz) ..................................... 839 table 16-6. crystal frequency (values from 10 mhz to 14.3181 mhz) .................................... 840 table 16-7. crystal frequency (values from 16 mhz to 16.384 mhz) ...................................... 840 table 16-8. i 2 s receive fifo interface ................................................................................. 842 table 16-9. audio formats configuration .............................................................................. 844 table 16-10. inter-integrated circuit sound (i 2 s) interface register map ................................... 845 table 17-1. controller area network signals (100lqfp) ........................................................ 872 table 17-2. controller area network signals (108bga) ......................................................... 872 table 17-3. message object configurations .......................................................................... 878 table 17-4. can protocol ranges ........................................................................................ 885 table 17-5. canbit register values .................................................................................... 885 table 17-6. can register map ............................................................................................. 889 table 18-1. ethernet signals (100lqfp) ............................................................................... 922 table 18-2. ethernet signals (108bga) ................................................................................ 923 table 18-3. tx & rx fifo organization ............................................................................... 926 table 18-4. receive signal encoding ................................................................................... 928 table 18-5. transmit signal encoding ................................................................................... 929 table 18-6. ethernet register map ....................................................................................... 933 table 19-1. usb signals (100lqfp) .................................................................................... 959 table 19-2. usb signals (108bga) ...................................................................................... 959 table 19-3. remainder (maxload/4) .................................................................................. 971 table 19-4. actual bytes read ............................................................................................. 971 table 19-5. packet sizes that clear rxrdy ........................................................................ 972 table 19-6. universal serial bus (usb) controller register map ............................................ 973 table 20-1. analog comparators signals (100lqfp) ........................................................... 1097 table 20-2. analog comparators signals (108bga) ............................................................. 1098 table 20-3. internal reference voltage and acrefctl field values ................................... 1100 table 20-4. analog comparators register map ................................................................... 1101 table 21-1. pwm signals (100lqfp) ................................................................................. 1113 table 21-2. pwm signals (108bga) ................................................................................... 1114 table 21-3. pwm register map .......................................................................................... 1122 table 22-1. qei signals (100lqfp) .................................................................................... 1189 table 22-2. qei signals (108bga) ..................................................................................... 1190 table 22-3. qei register map ............................................................................................ 1194 table 24-1. gpio pins with default alternate functions ...................................................... 1213 17 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller table 24-2. signals by pin number ..................................................................................... 1214 table 24-3. signals by signal name ................................................................................... 1227 table 24-4. signals by function, except for gpio ............................................................... 1239 table 24-5. gpio pins and alternate functions ................................................................... 1248 table 24-6. possible pin assignments for alternate functions .............................................. 1251 table 24-7. signals by pin number ..................................................................................... 1255 table 24-8. signals by signal name ................................................................................... 1269 table 24-9. signals by function, except for gpio ............................................................... 1280 table 24-10. gpio pins and alternate functions ................................................................... 1289 table 24-11. possible pin assignments for alternate functions .............................................. 1292 table 24-12. connections for unused signals (100-pin lqfp) ............................................... 1296 table 24-13. connections for unused signals (108-ball bga) ................................................ 1296 table 25-1. temperature characteristics ............................................................................. 1297 table 25-2. thermal characteristics ................................................................................... 1297 table 25-3. esd absolute maximum ratings ...................................................................... 1297 table 26-1. maximum ratings ............................................................................................ 1298 table 26-2. recommended dc operating conditions .......................................................... 1298 table 26-3. jtag characteristics ....................................................................................... 1299 table 26-4. power characteristics ...................................................................................... 1301 table 26-5. reset characteristics ....................................................................................... 1302 table 26-6. ldo regulator characteristics ......................................................................... 1303 table 26-7. phase locked loop (pll) characteristics ......................................................... 1303 table 26-8. actual pll frequency ...................................................................................... 1304 table 26-9. piosc clock characteristics ............................................................................ 1304 table 26-10. 30-khz clock characteristics ............................................................................ 1304 table 26-11. main oscillator clock characteristics ................................................................ 1305 table 26-12. supported mosc crystal frequencies .............................................................. 1305 table 26-13. system clock characteristics with adc operation ............................................. 1306 table 26-14. system clock characteristics with usb operation ............................................. 1306 table 26-15. sleep modes ac characteristics ....................................................................... 1306 table 26-16. flash memory characteristics ........................................................................... 1306 table 26-17. gpio module characteristics ............................................................................ 1307 table 26-18. epi sdram characteristics ............................................................................. 1307 table 26-19. epi sdram interface characteristics ............................................................... 1307 table 26-20. epi host-bus 8 and host-bus 16 interface characteristics ................................. 1309 table 26-21. epi general-purpose interface characteristics .................................................. 1311 table 26-22. adc characteristics ......................................................................................... 1313 table 26-23. adc module external reference characteristics ............................................... 1314 table 26-24. adc module internal reference characteristics ................................................ 1314 table 26-25. ssi characteristics .......................................................................................... 1314 table 26-26. i 2 c characteristics ........................................................................................... 1316 table 26-27. i 2 s master clock (receive and transmit) .......................................................... 1317 table 26-28. i 2 s slave clock (receive and transmit) ............................................................ 1317 table 26-29. i 2 s master mode .............................................................................................. 1317 table 26-30. i 2 s slave mode ................................................................................................ 1318 table 26-31. ethernet station management .......................................................................... 1318 table 26-32. 100base-tx transmitter characteristics .......................................................... 1319 table 26-33. 100base-tx transmitter characteristics (informative) ....................................... 1319 july 03, 2014 18 texas instruments-production data table of contents table 26-34. 100base-tx receiver characteristics .............................................................. 1319 table 26-35. 10base-t transmitter characteristics .............................................................. 1319 table 26-36. 10base-t transmitter characteristics (informative) ........................................... 1320 table 26-37. 10base-t receiver characteristics .................................................................. 1320 table 26-38. isolation transformers ...................................................................................... 1320 table 26-39. usb controller characteristics ......................................................................... 1321 table 26-40. analog comparator characteristics ................................................................... 1321 table 26-41. analog comparator voltage reference characteristics ...................................... 1321 table 26-42. nominal power consumption ........................................................................... 1321 table 26-43. detailed current specifications ......................................................................... 1322 19 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller list of registers the cortex-m3 processor ............................................................................................................. 69 register 1: cortex general-purpose register 0 (r0) ........................................................................... 76 register 2: cortex general-purpose register 1 (r1) ........................................................................... 76 register 3: cortex general-purpose register 2 (r2) ........................................................................... 76 register 4: cortex general-purpose register 3 (r3) ........................................................................... 76 register 5: cortex general-purpose register 4 (r4) ........................................................................... 76 register 6: cortex general-purpose register 5 (r5) ........................................................................... 76 register 7: cortex general-purpose register 6 (r6) ........................................................................... 76 register 8: cortex general-purpose register 7 (r7) ........................................................................... 76 register 9: cortex general-purpose register 8 (r8) ........................................................................... 76 register 10: cortex general-purpose register 9 (r9) ........................................................................... 76 register 11: cortex general-purpose register 10 (r10) ....................................................................... 76 register 12: cortex general-purpose register 11 (r11) ........................................................................ 76 register 13: cortex general-purpose register 12 (r12) ....................................................................... 76 register 14: stack pointer (sp) ........................................................................................................... 77 register 15: link register (lr) ............................................................................................................ 78 register 16: program counter (pc) ..................................................................................................... 79 register 17: program status register (psr) ........................................................................................ 80 register 18: priority mask register (primask) .................................................................................... 84 register 19: fault mask register (faultmask) .................................................................................. 85 register 20: base priority mask register (basepri) ............................................................................ 86 register 21: control register (control) ........................................................................................... 87 cortex-m3 peripherals ................................................................................................................. 112 register 1: systick control and status register (stctrl), offset 0x010 ........................................... 123 register 2: systick reload value register (streload), offset 0x014 .............................................. 125 register 3: systick current value register (stcurrent), offset 0x018 ........................................... 126 register 4: interrupt 0-31 set enable (en0), offset 0x100 .................................................................. 127 register 5: interrupt 32-54 set enable (en1), offset 0x104 ................................................................ 128 register 6: interrupt 0-31 clear enable (dis0), offset 0x180 .............................................................. 129 register 7: interrupt 32-54 clear enable (dis1), offset 0x184 ............................................................ 130 register 8: interrupt 0-31 set pending (pend0), offset 0x200 ........................................................... 131 register 9: interrupt 32-54 set pending (pend1), offset 0x204 ......................................................... 132 register 10: interrupt 0-31 clear pending (unpend0), offset 0x280 ................................................... 133 register 11: interrupt 32-54 clear pending (unpend1), offset 0x284 .................................................. 134 register 12: interrupt 0-31 active bit (active0), offset 0x300 ............................................................. 135 register 13: interrupt 32-54 active bit (active1), offset 0x304 ........................................................... 136 register 14: interrupt 0-3 priority (pri0), offset 0x400 ......................................................................... 137 register 15: interrupt 4-7 priority (pri1), offset 0x404 ......................................................................... 137 register 16: interrupt 8-11 priority (pri2), offset 0x408 ....................................................................... 137 register 17: interrupt 12-15 priority (pri3), offset 0x40c .................................................................... 137 register 18: interrupt 16-19 priority (pri4), offset 0x410 ..................................................................... 137 register 19: interrupt 20-23 priority (pri5), offset 0x414 ..................................................................... 137 register 20: interrupt 24-27 priority (pri6), offset 0x418 ..................................................................... 137 register 21: interrupt 28-31 priority (pri7), offset 0x41c .................................................................... 137 register 22: interrupt 32-35 priority (pri8), offset 0x420 ..................................................................... 137 july 03, 2014 20 texas instruments-production data table of contents register 23: interrupt 36-39 priority (pri9), offset 0x424 ..................................................................... 137 register 24: interrupt 40-43 priority (pri10), offset 0x428 ................................................................... 137 register 25: interrupt 44-47 priority (pri11), offset 0x42c ................................................................... 137 register 26: interrupt 48-51 priority (pri12), offset 0x430 ................................................................... 137 register 27: interrupt 52-54 priority (pri13), offset 0x434 ................................................................... 137 register 28: software trigger interrupt (swtrig), offset 0xf00 .......................................................... 139 register 29: auxiliary control (actlr), offset 0x008 .......................................................................... 140 register 30: cpu id base (cpuid), offset 0xd00 ............................................................................... 142 register 31: interrupt control and state (intctrl), offset 0xd04 ........................................................ 143 register 32: vector table offset (vtable), offset 0xd08 .................................................................... 146 register 33: application interrupt and reset control (apint), offset 0xd0c ......................................... 147 register 34: system control (sysctrl), offset 0xd10 ....................................................................... 149 register 35: configuration and control (cfgctrl), offset 0xd14 ....................................................... 151 register 36: system handler priority 1 (syspri1), offset 0xd18 ......................................................... 153 register 37: system handler priority 2 (syspri2), offset 0xd1c ........................................................ 154 register 38: system handler priority 3 (syspri3), offset 0xd20 ......................................................... 155 register 39: system handler control and state (syshndctrl), offset 0xd24 .................................... 156 register 40: configurable fault status (faultstat), offset 0xd28 ..................................................... 160 register 41: hard fault status (hfaultstat), offset 0xd2c .............................................................. 166 register 42: memory management fault address (mmaddr), offset 0xd34 ........................................ 167 register 43: bus fault address (faultaddr), offset 0xd38 .............................................................. 168 register 44: mpu type (mputype), offset 0xd90 ............................................................................. 169 register 45: mpu control (mpuctrl), offset 0xd94 .......................................................................... 170 register 46: mpu region number (mpunumber), offset 0xd98 ....................................................... 172 register 47: mpu region base address (mpubase), offset 0xd9c ................................................... 173 register 48: mpu region base address alias 1 (mpubase1), offset 0xda4 ....................................... 173 register 49: mpu region base address alias 2 (mpubase2), offset 0xdac ...................................... 173 register 50: mpu region base address alias 3 (mpubase3), offset 0xdb4 ....................................... 173 register 51: mpu region attribute and size (mpuattr), offset 0xda0 ............................................... 175 register 52: mpu region attribute and size alias 1 (mpuattr1), offset 0xda8 .................................. 175 register 53: mpu region attribute and size alias 2 (mpuattr2), offset 0xdb0 .................................. 175 register 54: mpu region attribute and size alias 3 (mpuattr3), offset 0xdb8 .................................. 175 system control ............................................................................................................................ 190 register 1: device identification 0 (did0), offset 0x000 ..................................................................... 208 register 2: brown-out reset control (pborctl), offset 0x030 ........................................................ 210 register 3: raw interrupt status (ris), offset 0x050 .......................................................................... 211 register 4: interrupt mask control (imc), offset 0x054 ...................................................................... 213 register 5: masked interrupt status and clear (misc), offset 0x058 .................................................. 215 register 6: reset cause (resc), offset 0x05c ................................................................................ 217 register 7: run-mode clock configuration (rcc), offset 0x060 ......................................................... 219 register 8: xtal to pll translation (pllcfg), offset 0x064 ............................................................. 224 register 9: gpio high-performance bus control (gpiohbctl), offset 0x06c ................................... 225 register 10: run-mode clock configuration 2 (rcc2), offset 0x070 .................................................... 227 register 11: main oscillator control (moscctl), offset 0x07c ........................................................... 230 register 12: deep sleep clock configuration (dslpclkcfg), offset 0x144 ........................................ 231 register 13: precision internal oscillator calibration (piosccal), offset 0x150 ................................... 233 register 14: i 2 s mclk configuration (i2smclkcfg), offset 0x170 ..................................................... 234 register 15: device identification 1 (did1), offset 0x004 ..................................................................... 236 21 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller register 16: device capabilities 0 (dc0), offset 0x008 ........................................................................ 238 register 17: device capabilities 1 (dc1), offset 0x010 ........................................................................ 239 register 18: device capabilities 2 (dc2), offset 0x014 ........................................................................ 242 register 19: device capabilities 3 (dc3), offset 0x018 ........................................................................ 244 register 20: device capabilities 4 (dc4), offset 0x01c ....................................................................... 247 register 21: device capabilities 5 (dc5), offset 0x020 ........................................................................ 249 register 22: device capabilities 6 (dc6), offset 0x024 ........................................................................ 251 register 23: device capabilities 7 (dc7), offset 0x028 ........................................................................ 252 register 24: device capabilities 8 adc channels (dc8), offset 0x02c ................................................ 256 register 25: device capabilities 9 adc digital comparators (dc9), offset 0x190 ................................. 259 register 26: non-volatile memory information (nvmstat), offset 0x1a0 ............................................. 261 register 27: run mode clock gating control register 0 (rcgc0), offset 0x100 ................................... 262 register 28: sleep mode clock gating control register 0 (scgc0), offset 0x110 ................................. 265 register 29: deep sleep mode clock gating control register 0 (dcgc0), offset 0x120 ....................... 268 register 30: run mode clock gating control register 1 (rcgc1), offset 0x104 ................................... 270 register 31: sleep mode clock gating control register 1 (scgc1), offset 0x114 ................................. 274 register 32: deep-sleep mode clock gating control register 1 (dcgc1), offset 0x124 ....................... 278 register 33: run mode clock gating control register 2 (rcgc2), offset 0x108 ................................... 282 register 34: sleep mode clock gating control register 2 (scgc2), offset 0x118 ................................. 285 register 35: deep sleep mode clock gating control register 2 (dcgc2), offset 0x128 ....................... 288 register 36: software reset control 0 (srcr0), offset 0x040 ............................................................. 291 register 37: software reset control 1 (srcr1), offset 0x044 ............................................................. 293 register 38: software reset control 2 (srcr2), offset 0x048 ............................................................. 296 internal memory ........................................................................................................................... 298 register 1: flash memory address (fma), offset 0x000 .................................................................... 309 register 2: flash memory data (fmd), offset 0x004 ......................................................................... 310 register 3: flash memory control (fmc), offset 0x008 ..................................................................... 311 register 4: flash controller raw interrupt status (fcris), offset 0x00c ............................................ 314 register 5: flash controller interrupt mask (fcim), offset 0x010 ........................................................ 315 register 6: flash controller masked interrupt status and clear (fcmisc), offset 0x014 ..................... 316 register 7: flash memory control 2 (fmc2), offset 0x020 ................................................................. 317 register 8: flash write buffer valid (fwbval), offset 0x030 ............................................................. 318 register 9: flash control (fctl), offset 0x0f8 ................................................................................. 319 register 10: flash write buffer n (fwbn), offset 0x100 - 0x17c .......................................................... 320 register 11: rom control (rmctl), offset 0x0f0 .............................................................................. 321 register 12: flash memory protection read enable 0 (fmpre0), offset 0x130 and 0x200 ................... 322 register 13: flash memory protection program enable 0 (fmppe0), offset 0x134 and 0x400 ............... 323 register 14: boot configuration (bootcfg), offset 0x1d0 ................................................................. 324 register 15: user register 0 (user_reg0), offset 0x1e0 .................................................................. 326 register 16: user register 1 (user_reg1), offset 0x1e4 .................................................................. 327 register 17: user register 2 (user_reg2), offset 0x1e8 .................................................................. 328 register 18: user register 3 (user_reg3), offset 0x1ec ................................................................. 329 register 19: flash memory protection read enable 1 (fmpre1), offset 0x204 .................................... 330 register 20: flash memory protection read enable 2 (fmpre2), offset 0x208 .................................... 331 register 21: flash memory protection read enable 3 (fmpre3), offset 0x20c ................................... 332 register 22: flash memory protection read enable 4 (fmpre4), offset 0x210 .................................... 333 register 23: flash memory protection read enable 5 (fmpre5), offset 0x214 .................................... 334 register 24: flash memory protection read enable 6 (fmpre6), offset 0x218 .................................... 335 july 03, 2014 22 texas instruments-production data table of contents register 25: flash memory protection read enable 7 (fmpre7), offset 0x21c ................................... 336 register 26: flash memory protection program enable 1 (fmppe1), offset 0x404 ............................... 337 register 27: flash memory protection program enable 2 (fmppe2), offset 0x408 ............................... 338 register 28: flash memory protection program enable 3 (fmppe3), offset 0x40c ............................... 339 register 29: flash memory protection program enable 4 (fmppe4), offset 0x410 ............................... 340 register 30: flash memory protection program enable 5 (fmppe5), offset 0x414 ............................... 341 register 31: flash memory protection program enable 6 (fmppe6), offset 0x418 ............................... 342 register 32: flash memory protection program enable 7 (fmppe7), offset 0x41c ............................... 343 micro direct memory access (dma) ........................................................................................ 344 register 1: dma channel source address end pointer (dmasrcendp), offset 0x000 ...................... 369 register 2: dma channel destination address end pointer (dmadstendp), offset 0x004 ................ 370 register 3: dma channel control word (dmachctl), offset 0x008 .................................................. 371 register 4: dma status (dmastat), offset 0x000 ............................................................................ 376 register 5: dma configuration (dmacfg), offset 0x004 ................................................................... 378 register 6: dma channel control base pointer (dmactlbase), offset 0x008 .................................. 379 register 7: dma alternate channel control base pointer (dmaaltbase), offset 0x00c .................... 380 register 8: dma channel wait-on-request status (dmawaitstat), offset 0x010 ............................. 381 register 9: dma channel software request (dmaswreq), offset 0x014 ......................................... 382 register 10: dma channel useburst set (dmauseburstset), offset 0x018 .................................... 383 register 11: dma channel useburst clear (dmauseburstclr), offset 0x01c ................................. 384 register 12: dma channel request mask set (dmareqmaskset), offset 0x020 .............................. 385 register 13: dma channel request mask clear (dmareqmaskclr), offset 0x024 ........................... 386 register 14: dma channel enable set (dmaenaset), offset 0x028 ................................................... 387 register 15: dma channel enable clear (dmaenaclr), offset 0x02c ............................................... 388 register 16: dma channel primary alternate set (dmaaltset), offset 0x030 .................................... 389 register 17: dma channel primary alternate clear (dmaaltclr), offset 0x034 ................................. 390 register 18: dma channel priority set (dmaprioset), offset 0x038 ................................................. 391 register 19: dma channel priority clear (dmaprioclr), offset 0x03c .............................................. 392 register 20: dma bus error clear (dmaerrclr), offset 0x04c ........................................................ 393 register 21: dma channel assignment (dmachasgn), offset 0x500 ................................................. 394 register 22: dma channel interrupt status (dmachis), offset 0x504 .................................................. 395 register 23: dma peripheral identification 0 (dmaperiphid0), offset 0xfe0 ......................................... 396 register 24: dma peripheral identification 1 (dmaperiphid1), offset 0xfe4 ......................................... 397 register 25: dma peripheral identification 2 (dmaperiphid2), offset 0xfe8 ......................................... 398 register 26: dma peripheral identification 3 (dmaperiphid3), offset 0xfec ........................................ 399 register 27: dma peripheral identification 4 (dmaperiphid4), offset 0xfd0 ......................................... 400 register 28: dma primecell identification 0 (dmapcellid0), offset 0xff0 ........................................... 401 register 29: dma primecell identification 1 (dmapcellid1), offset 0xff4 ........................................... 402 register 30: dma primecell identification 2 (dmapcellid2), offset 0xff8 ........................................... 403 register 31: dma primecell identification 3 (dmapcellid3), offset 0xffc ........................................... 404 general-purpose input/outputs (gpios) ................................................................................... 405 register 1: gpio data (gpiodata), offset 0x000 ............................................................................ 419 register 2: gpio direction (gpiodir), offset 0x400 ......................................................................... 420 register 3: gpio interrupt sense (gpiois), offset 0x404 .................................................................. 421 register 4: gpio interrupt both edges (gpioibe), offset 0x408 ........................................................ 422 register 5: gpio interrupt event (gpioiev), offset 0x40c ................................................................ 423 register 6: gpio interrupt mask (gpioim), offset 0x410 ................................................................... 424 register 7: gpio raw interrupt status (gpioris), offset 0x414 ........................................................ 425 23 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller register 8: gpio masked interrupt status (gpiomis), offset 0x418 ................................................... 426 register 9: gpio interrupt clear (gpioicr), offset 0x41c ................................................................ 428 register 10: gpio alternate function select (gpioafsel), offset 0x420 ............................................ 429 register 11: gpio 2-ma drive select (gpiodr2r), offset 0x500 ........................................................ 431 register 12: gpio 4-ma drive select (gpiodr4r), offset 0x504 ........................................................ 432 register 13: gpio 8-ma drive select (gpiodr8r), offset 0x508 ........................................................ 433 register 14: gpio open drain select (gpioodr), offset 0x50c ......................................................... 434 register 15: gpio pull-up select (gpiopur), offset 0x510 ................................................................ 435 register 16: gpio pull-down select (gpiopdr), offset 0x514 ........................................................... 437 register 17: gpio slew rate control select (gpioslr), offset 0x518 ................................................ 439 register 18: gpio digital enable (gpioden), offset 0x51c ................................................................ 440 register 19: gpio lock (gpiolock), offset 0x520 ............................................................................ 442 register 20: gpio commit (gpiocr), offset 0x524 ............................................................................ 443 register 21: gpio analog mode select (gpioamsel), offset 0x528 ................................................... 445 register 22: gpio port control (gpiopctl), offset 0x52c ................................................................. 447 register 23: gpio peripheral identification 4 (gpioperiphid4), offset 0xfd0 ....................................... 449 register 24: gpio peripheral identification 5 (gpioperiphid5), offset 0xfd4 ....................................... 450 register 25: gpio peripheral identification 6 (gpioperiphid6), offset 0xfd8 ....................................... 451 register 26: gpio peripheral identification 7 (gpioperiphid7), offset 0xfdc ...................................... 452 register 27: gpio peripheral identification 0 (gpioperiphid0), offset 0xfe0 ....................................... 453 register 28: gpio peripheral identification 1 (gpioperiphid1), offset 0xfe4 ....................................... 454 register 29: gpio peripheral identification 2 (gpioperiphid2), offset 0xfe8 ....................................... 455 register 30: gpio peripheral identification 3 (gpioperiphid3), offset 0xfec ...................................... 456 register 31: gpio primecell identification 0 (gpiopcellid0), offset 0xff0 .......................................... 457 register 32: gpio primecell identification 1 (gpiopcellid1), offset 0xff4 .......................................... 458 register 33: gpio primecell identification 2 (gpiopcellid2), offset 0xff8 .......................................... 459 register 34: gpio primecell identification 3 (gpiopcellid3), offset 0xffc ......................................... 460 external peripheral interface (epi) ............................................................................................. 461 register 1: epi configuration (epicfg), offset 0x000 ....................................................................... 493 register 2: epi main baud rate (epibaud), offset 0x004 ................................................................. 494 register 3: epi sdram configuration (episdramcfg), offset 0x010 .............................................. 496 register 4: epi host-bus 8 configuration (epihb8cfg), offset 0x010 ............................................... 498 register 5: epi host-bus 16 configuration (epihb16cfg), offset 0x010 ........................................... 501 register 6: epi general-purpose configuration (epigpcfg), offset 0x010 ........................................ 505 register 7: epi host-bus 8 configuration 2 (epihb8cfg2), offset 0x014 .......................................... 510 register 8: epi host-bus 16 configuration 2 (epihb16cfg2), offset 0x014 ....................................... 513 register 9: epi general-purpose configuration 2 (epigpcfg2), offset 0x014 ................................... 516 register 10: epi address map (epiaddrmap), offset 0x01c ............................................................. 517 register 11: epi read size 0 (epirsize0), offset 0x020 .................................................................... 519 register 12: epi read size 1 (epirsize1), offset 0x030 .................................................................... 519 register 13: epi read address 0 (epiraddr0), offset 0x024 ............................................................ 520 register 14: epi read address 1 (epiraddr1), offset 0x034 ............................................................ 520 register 15: epi non-blocking read data 0 (epirpstd0), offset 0x028 ............................................. 521 register 16: epi non-blocking read data 1 (epirpstd1), offset 0x038 ............................................. 521 register 17: epi status (epistat), offset 0x060 ................................................................................ 523 register 18: epi read fifo count (epirfifocnt), offset 0x06c ...................................................... 525 register 19: epi read fifo (epireadfifo), offset 0x070 ................................................................ 526 register 20: epi read fifo alias 1 (epireadfifo1), offset 0x074 .................................................... 526 july 03, 2014 24 texas instruments-production data table of contents register 21: epi read fifo alias 2 (epireadfifo2), offset 0x078 .................................................... 526 register 22: epi read fifo alias 3 (epireadfifo3), offset 0x07c ................................................... 526 register 23: epi read fifo alias 4 (epireadfifo4), offset 0x080 .................................................... 526 register 24: epi read fifo alias 5 (epireadfifo5), offset 0x084 .................................................... 526 register 25: epi read fifo alias 6 (epireadfifo6), offset 0x088 .................................................... 526 register 26: epi read fifo alias 7 (epireadfifo7), offset 0x08c ................................................... 526 register 27: epi fifo level selects (epififolvl), offset 0x200 ........................................................ 527 register 28: epi write fifo count (epiwfifocnt), offset 0x204 ...................................................... 529 register 29: epi interrupt mask (epiim), offset 0x210 ......................................................................... 530 register 30: epi raw interrupt status (epiris), offset 0x214 .............................................................. 531 register 31: epi masked interrupt status (epimis), offset 0x218 ........................................................ 533 register 32: epi error and interrupt status and clear (epieisc), offset 0x21c .................................... 534 general-purpose timers ............................................................................................................. 536 register 1: gptm configuration (gptmcfg), offset 0x000 .............................................................. 553 register 2: gptm timer a mode (gptmtamr), offset 0x004 ........................................................... 554 register 3: gptm timer b mode (gptmtbmr), offset 0x008 ........................................................... 556 register 4: gptm control (gptmctl), offset 0x00c ........................................................................ 558 register 5: gptm interrupt mask (gptmimr), offset 0x018 .............................................................. 561 register 6: gptm raw interrupt status (gptmris), offset 0x01c ..................................................... 563 register 7: gptm masked interrupt status (gptmmis), offset 0x020 ................................................ 566 register 8: gptm interrupt clear (gptmicr), offset 0x024 .............................................................. 569 register 9: gptm timer a interval load (gptmtailr), offset 0x028 ................................................ 571 register 10: gptm timer b interval load (gptmtbilr), offset 0x02c ................................................ 572 register 11: gptm timer a match (gptmtamatchr), offset 0x030 .................................................. 573 register 12: gptm timer b match (gptmtbmatchr), offset 0x034 ................................................. 574 register 13: gptm timer a prescale (gptmtapr), offset 0x038 ....................................................... 575 register 14: gptm timer b prescale (gptmtbpr), offset 0x03c ...................................................... 576 register 15: gptm timera prescale match (gptmtapmr), offset 0x040 ........................................... 577 register 16: gptm timerb prescale match (gptmtbpmr), offset 0x044 ........................................... 578 register 17: gptm timer a (gptmtar), offset 0x048 ....................................................................... 579 register 18: gptm timer b (gptmtbr), offset 0x04c ....................................................................... 580 register 19: gptm timer a value (gptmtav), offset 0x050 ............................................................... 581 register 20: gptm timer b value (gptmtbv), offset 0x054 .............................................................. 582 watchdog timers ......................................................................................................................... 583 register 1: watchdog load (wdtload), offset 0x000 ...................................................................... 587 register 2: watchdog value (wdtvalue), offset 0x004 ................................................................... 588 register 3: watchdog control (wdtctl), offset 0x008 ..................................................................... 589 register 4: watchdog interrupt clear (wdticr), offset 0x00c .......................................................... 591 register 5: watchdog raw interrupt status (wdtris), offset 0x010 .................................................. 592 register 6: watchdog masked interrupt status (wdtmis), offset 0x014 ............................................. 593 register 7: watchdog test (wdttest), offset 0x418 ....................................................................... 594 register 8: watchdog lock (wdtlock), offset 0xc00 ..................................................................... 595 register 9: watchdog peripheral identification 4 (wdtperiphid4), offset 0xfd0 ................................. 596 register 10: watchdog peripheral identification 5 (wdtperiphid5), offset 0xfd4 ................................. 597 register 11: watchdog peripheral identification 6 (wdtperiphid6), offset 0xfd8 ................................. 598 register 12: watchdog peripheral identification 7 (wdtperiphid7), offset 0xfdc ................................ 599 register 13: watchdog peripheral identification 0 (wdtperiphid0), offset 0xfe0 ................................. 600 register 14: watchdog peripheral identification 1 (wdtperiphid1), offset 0xfe4 ................................. 601 25 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller register 15: watchdog peripheral identification 2 (wdtperiphid2), offset 0xfe8 ................................. 602 register 16: watchdog peripheral identification 3 (wdtperiphid3), offset 0xfec ................................. 603 register 17: watchdog primecell identification 0 (wdtpcellid0), offset 0xff0 .................................... 604 register 18: watchdog primecell identification 1 (wdtpcellid1), offset 0xff4 .................................... 605 register 19: watchdog primecell identification 2 (wdtpcellid2), offset 0xff8 .................................... 606 register 20: watchdog primecell identification 3 (wdtpcellid3 ), offset 0xffc .................................. 607 analog-to-digital converter (adc) ............................................................................................. 608 register 1: adc active sample sequencer (adcactss), offset 0x000 ............................................. 631 register 2: adc raw interrupt status (adcris), offset 0x004 ........................................................... 632 register 3: adc interrupt mask (adcim), offset 0x008 ..................................................................... 634 register 4: adc interrupt status and clear (adcisc), offset 0x00c .................................................. 636 register 5: adc overflow status (adcostat), offset 0x010 ............................................................ 639 register 6: adc event multiplexer select (adcemux), offset 0x014 ................................................. 641 register 7: adc underflow status (adcustat), offset 0x018 ........................................................... 646 register 8: adc sample sequencer priority (adcsspri), offset 0x020 ............................................. 647 register 9: adc sample phase control (adcspc), offset 0x024 ...................................................... 649 register 10: adc processor sample sequence initiate (adcpssi), offset 0x028 ................................. 651 register 11: adc sample averaging control (adcsac), offset 0x030 ................................................. 653 register 12: adc digital comparator interrupt status and clear (adcdcisc), offset 0x034 ................. 654 register 13: adc control (adcctl), offset 0x038 ............................................................................. 656 register 14: adc sample sequence input multiplexer select 0 (adcssmux0), offset 0x040 ............... 657 register 15: adc sample sequence control 0 (adcssctl0), offset 0x044 ........................................ 659 register 16: adc sample sequence result fifo 0 (adcssfifo0), offset 0x048 ................................ 662 register 17: adc sample sequence result fifo 1 (adcssfifo1), offset 0x068 ................................ 662 register 18: adc sample sequence result fifo 2 (adcssfifo2), offset 0x088 ................................ 662 register 19: adc sample sequence result fifo 3 (adcssfifo3), offset 0x0a8 ............................... 662 register 20: adc sample sequence fifo 0 status (adcssfstat0), offset 0x04c ............................. 663 register 21: adc sample sequence fifo 1 status (adcssfstat1), offset 0x06c ............................. 663 register 22: adc sample sequence fifo 2 status (adcssfstat2), offset 0x08c ............................ 663 register 23: adc sample sequence fifo 3 status (adcssfstat3), offset 0x0ac ............................ 663 register 24: adc sample sequence 0 operation (adcssop0), offset 0x050 ...................................... 665 register 25: adc sample sequence 0 digital comparator select (adcssdc0), offset 0x054 .............. 667 register 26: adc sample sequence input multiplexer select 1 (adcssmux1), offset 0x060 ............... 669 register 27: adc sample sequence input multiplexer select 2 (adcssmux2), offset 0x080 ............... 669 register 28: adc sample sequence control 1 (adcssctl1), offset 0x064 ........................................ 670 register 29: adc sample sequence control 2 (adcssctl2), offset 0x084 ........................................ 670 register 30: adc sample sequence 1 operation (adcssop1), offset 0x070 ...................................... 672 register 31: adc sample sequence 2 operation (adcssop2), offset 0x090 ..................................... 672 register 32: adc sample sequence 1 digital comparator select (adcssdc1), offset 0x074 .............. 673 register 33: adc sample sequence 2 digital comparator select (adcssdc2), offset 0x094 .............. 673 register 34: adc sample sequence input multiplexer select 3 (adcssmux3), offset 0x0a0 ............... 675 register 35: adc sample sequence control 3 (adcssctl3), offset 0x0a4 ........................................ 676 register 36: adc sample sequence 3 operation (adcssop3), offset 0x0b0 ..................................... 677 register 37: adc sample sequence 3 digital comparator select (adcssdc3), offset 0x0b4 .............. 678 register 38: adc digital comparator reset initial conditions (adcdcric), offset 0xd00 ..................... 679 register 39: adc digital comparator control 0 (adcdcctl0), offset 0xe00 ....................................... 684 register 40: adc digital comparator control 1 (adcdcctl1), offset 0xe04 ....................................... 684 register 41: adc digital comparator control 2 (adcdcctl2), offset 0xe08 ....................................... 684 july 03, 2014 26 texas instruments-production data table of contents register 42: adc digital comparator control 3 (adcdcctl3), offset 0xe0c ...................................... 684 register 43: adc digital comparator control 4 (adcdcctl4), offset 0xe10 ....................................... 684 register 44: adc digital comparator control 5 (adcdcctl5), offset 0xe14 ....................................... 684 register 45: adc digital comparator control 6 (adcdcctl6), offset 0xe18 ....................................... 684 register 46: adc digital comparator control 7 (adcdcctl7), offset 0xe1c ...................................... 684 register 47: adc digital comparator range 0 (adcdccmp0), offset 0xe40 ....................................... 687 register 48: adc digital comparator range 1 (adcdccmp1), offset 0xe44 ....................................... 687 register 49: adc digital comparator range 2 (adcdccmp2), offset 0xe48 ....................................... 687 register 50: adc digital comparator range 3 (adcdccmp3), offset 0xe4c ...................................... 687 register 51: adc digital comparator range 4 (adcdccmp4), offset 0xe50 ....................................... 687 register 52: adc digital comparator range 5 (adcdccmp5), offset 0xe54 ....................................... 687 register 53: adc digital comparator range 6 (adcdccmp6), offset 0xe58 ....................................... 687 register 54: adc digital comparator range 7 (adcdccmp7), offset 0xe5c ...................................... 687 universal asynchronous receivers/transmitters (uarts) ..................................................... 689 register 1: uart data (uartdr), offset 0x000 ............................................................................... 704 register 2: uart receive status/error clear (uartrsr/uartecr), offset 0x004 ........................... 706 register 3: uart flag (uartfr), offset 0x018 ................................................................................ 709 register 4: uart irda low-power register (uartilpr), offset 0x020 ............................................. 712 register 5: uart integer baud-rate divisor (uartibrd), offset 0x024 ............................................ 713 register 6: uart fractional baud-rate divisor (uartfbrd), offset 0x028 ....................................... 714 register 7: uart line control (uartlcrh), offset 0x02c ............................................................... 715 register 8: uart control (uartctl), offset 0x030 ......................................................................... 717 register 9: uart interrupt fifo level select (uartifls), offset 0x034 ........................................... 721 register 10: uart interrupt mask (uartim), offset 0x038 ................................................................. 723 register 11: uart raw interrupt status (uartris), offset 0x03c ...................................................... 727 register 12: uart masked interrupt status (uartmis), offset 0x040 ................................................. 731 register 13: uart interrupt clear (uarticr), offset 0x044 ............................................................... 735 register 14: uart dma control (uartdmactl), offset 0x048 .......................................................... 737 register 15: uart lin control (uartlctl), offset 0x090 ................................................................. 738 register 16: uart lin snap shot (uartlss), offset 0x094 ............................................................... 739 register 17: uart lin timer (uartltim), offset 0x098 ..................................................................... 740 register 18: uart peripheral identification 4 (uartperiphid4), offset 0xfd0 ..................................... 741 register 19: uart peripheral identification 5 (uartperiphid5), offset 0xfd4 ..................................... 742 register 20: uart peripheral identification 6 (uartperiphid6), offset 0xfd8 ..................................... 743 register 21: uart peripheral identification 7 (uartperiphid7), offset 0xfdc ..................................... 744 register 22: uart peripheral identification 0 (uartperiphid0), offset 0xfe0 ...................................... 745 register 23: uart peripheral identification 1 (uartperiphid1), offset 0xfe4 ...................................... 746 register 24: uart peripheral identification 2 (uartperiphid2), offset 0xfe8 ...................................... 747 register 25: uart peripheral identification 3 (uartperiphid3), offset 0xfec ..................................... 748 register 26: uart primecell identification 0 (uartpcellid0), offset 0xff0 ........................................ 749 register 27: uart primecell identification 1 (uartpcellid1), offset 0xff4 ........................................ 750 register 28: uart primecell identification 2 (uartpcellid2), offset 0xff8 ........................................ 751 register 29: uart primecell identification 3 (uartpcellid3), offset 0xffc ........................................ 752 synchronous serial interface (ssi) ............................................................................................ 753 register 1: ssi control 0 (ssicr0), offset 0x000 .............................................................................. 768 register 2: ssi control 1 (ssicr1), offset 0x004 .............................................................................. 770 register 3: ssi data (ssidr), offset 0x008 ...................................................................................... 772 register 4: ssi status (ssisr), offset 0x00c ................................................................................... 773 27 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller register 5: ssi clock prescale (ssicpsr), offset 0x010 .................................................................. 775 register 6: ssi interrupt mask (ssiim), offset 0x014 ......................................................................... 776 register 7: ssi raw interrupt status (ssiris), offset 0x018 .............................................................. 777 register 8: ssi masked interrupt status (ssimis), offset 0x01c ........................................................ 779 register 9: ssi interrupt clear (ssiicr), offset 0x020 ....................................................................... 781 register 10: ssi dma control (ssidmactl), offset 0x024 ................................................................. 782 register 11: ssi peripheral identification 4 (ssiperiphid4), offset 0xfd0 ............................................. 783 register 12: ssi peripheral identification 5 (ssiperiphid5), offset 0xfd4 ............................................. 784 register 13: ssi peripheral identification 6 (ssiperiphid6), offset 0xfd8 ............................................. 785 register 14: ssi peripheral identification 7 (ssiperiphid7), offset 0xfdc ............................................ 786 register 15: ssi peripheral identification 0 (ssiperiphid0), offset 0xfe0 ............................................. 787 register 16: ssi peripheral identification 1 (ssiperiphid1), offset 0xfe4 ............................................. 788 register 17: ssi peripheral identification 2 (ssiperiphid2), offset 0xfe8 ............................................. 789 register 18: ssi peripheral identification 3 (ssiperiphid3), offset 0xfec ............................................ 790 register 19: ssi primecell identification 0 (ssipcellid0), offset 0xff0 ............................................... 791 register 20: ssi primecell identification 1 (ssipcellid1), offset 0xff4 ............................................... 792 register 21: ssi primecell identification 2 (ssipcellid2), offset 0xff8 ............................................... 793 register 22: ssi primecell identification 3 (ssipcellid3), offset 0xffc ............................................... 794 inter-integrated circuit (i 2 c) interface ........................................................................................ 795 register 1: i 2 c master slave address (i2cmsa), offset 0x000 ........................................................... 812 register 2: i 2 c master control/status (i2cmcs), offset 0x004 ........................................................... 813 register 3: i 2 c master data (i2cmdr), offset 0x008 ......................................................................... 818 register 4: i 2 c master timer period (i2cmtpr), offset 0x00c ........................................................... 819 register 5: i 2 c master interrupt mask (i2cmimr), offset 0x010 ......................................................... 820 register 6: i 2 c master raw interrupt status (i2cmris), offset 0x014 ................................................. 821 register 7: i 2 c master masked interrupt status (i2cmmis), offset 0x018 ........................................... 822 register 8: i 2 c master interrupt clear (i2cmicr), offset 0x01c ......................................................... 823 register 9: i 2 c master configuration (i2cmcr), offset 0x020 ............................................................ 824 register 10: i 2 c slave own address (i2csoar), offset 0x800 ............................................................ 825 register 11: i 2 c slave control/status (i2cscsr), offset 0x804 ........................................................... 826 register 12: i 2 c slave data (i2csdr), offset 0x808 ........................................................................... 828 register 13: i 2 c slave interrupt mask (i2csimr), offset 0x80c ........................................................... 829 register 14: i 2 c slave raw interrupt status (i2csris), offset 0x810 ................................................... 830 register 15: i 2 c slave masked interrupt status (i2csmis), offset 0x814 .............................................. 831 register 16: i 2 c slave interrupt clear (i2csicr), offset 0x818 ............................................................ 832 inter-integrated circuit sound (i 2 s) interface ............................................................................ 833 register 1: i 2 s transmit fifo data (i2stxfifo), offset 0x000 .......................................................... 846 register 2: i 2 s transmit fifo configuration (i2stxfifocfg), offset 0x004 ...................................... 847 register 3: i 2 s transmit module configuration (i2stxcfg), offset 0x008 .......................................... 848 register 4: i 2 s transmit fifo limit (i2stxlimit), offset 0x00c ........................................................ 850 register 5: i 2 s transmit interrupt status and mask (i2stxism), offset 0x010 ..................................... 851 register 6: i 2 s transmit fifo level (i2stxlev), offset 0x018 .......................................................... 852 register 7: i 2 s receive fifo data (i2srxfifo), offset 0x800 .......................................................... 853 register 8: i 2 s receive fifo configuration (i2srxfifocfg), offset 0x804 ...................................... 854 register 9: i 2 s receive module configuration (i2srxcfg), offset 0x808 ........................................... 855 register 10: i 2 s receive fifo limit (i2srxlimit), offset 0x80c ......................................................... 858 july 03, 2014 28 texas instruments-production data table of contents register 11: i 2 s receive interrupt status and mask (i2srxism), offset 0x810 ..................................... 859 register 12: i 2 s receive fifo level (i2srxlev), offset 0x818 ........................................................... 860 register 13: i 2 s module configuration (i2scfg), offset 0xc00 ............................................................ 861 register 14: i 2 s interrupt mask (i2sim), offset 0xc10 ......................................................................... 863 register 15: i 2 s raw interrupt status (i2sris), offset 0xc14 ............................................................... 865 register 16: i 2 s masked interrupt status (i2smis), offset 0xc18 ......................................................... 867 register 17: i 2 s interrupt clear (i2sic), offset 0xc1c ......................................................................... 869 controller area network (can) module ..................................................................................... 870 register 1: can control (canctl), offset 0x000 ............................................................................. 892 register 2: can status (cansts), offset 0x004 ............................................................................... 894 register 3: can error counter (canerr), offset 0x008 ................................................................... 897 register 4: can bit timing (canbit), offset 0x00c .......................................................................... 898 register 5: can interrupt (canint), offset 0x010 ............................................................................. 899 register 6: can test (cantst), offset 0x014 .................................................................................. 900 register 7: can baud rate prescaler extension (canbrpe), offset 0x018 ....................................... 902 register 8: can if1 command request (canif1crq), offset 0x020 ................................................ 903 register 9: can if2 command request (canif2crq), offset 0x080 ................................................ 903 register 10: can if1 command mask (canif1cmsk), offset 0x024 .................................................. 904 register 11: can if2 command mask (canif2cmsk), offset 0x084 .................................................. 904 register 12: can if1 mask 1 (canif1msk1), offset 0x028 ................................................................ 907 register 13: can if2 mask 1 (canif2msk1), offset 0x088 ................................................................ 907 register 14: can if1 mask 2 (canif1msk2), offset 0x02c ................................................................ 908 register 15: can if2 mask 2 (canif2msk2), offset 0x08c ................................................................ 908 register 16: can if1 arbitration 1 (canif1arb1), offset 0x030 ......................................................... 910 register 17: can if2 arbitration 1 (canif2arb1), offset 0x090 ......................................................... 910 register 18: can if1 arbitration 2 (canif1arb2), offset 0x034 ......................................................... 911 register 19: can if2 arbitration 2 (canif2arb2), offset 0x094 ......................................................... 911 register 20: can if1 message control (canif1mctl), offset 0x038 .................................................. 913 register 21: can if2 message control (canif2mctl), offset 0x098 .................................................. 913 register 22: can if1 data a1 (canif1da1), offset 0x03c ................................................................. 916 register 23: can if1 data a2 (canif1da2), offset 0x040 ................................................................. 916 register 24: can if1 data b1 (canif1db1), offset 0x044 ................................................................. 916 register 25: can if1 data b2 (canif1db2), offset 0x048 ................................................................. 916 register 26: can if2 data a1 (canif2da1), offset 0x09c ................................................................. 916 register 27: can if2 data a2 (canif2da2), offset 0x0a0 ................................................................. 916 register 28: can if2 data b1 (canif2db1), offset 0x0a4 ................................................................. 916 register 29: can if2 data b2 (canif2db2), offset 0x0a8 ................................................................. 916 register 30: can transmission request 1 (cantxrq1), offset 0x100 ................................................ 917 register 31: can transmission request 2 (cantxrq2), offset 0x104 ................................................ 917 register 32: can new data 1 (cannwda1), offset 0x120 ................................................................. 918 register 33: can new data 2 (cannwda2), offset 0x124 ................................................................. 918 register 34: can message 1 interrupt pending (canmsg1int), offset 0x140 ..................................... 919 register 35: can message 2 interrupt pending (canmsg2int), offset 0x144 ..................................... 919 register 36: can message 1 valid (canmsg1val), offset 0x160 ....................................................... 920 register 37: can message 2 valid (canmsg2val), offset 0x164 ....................................................... 920 ethernet controller ...................................................................................................................... 921 register 1: ethernet mac raw interrupt status/acknowledge (macris/maciack), offset 0x000 ....... 934 register 2: ethernet mac interrupt mask (macim), offset 0x004 ....................................................... 937 29 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller register 3: ethernet mac receive control (macrctl), offset 0x008 ................................................ 939 register 4: ethernet mac transmit control (mactctl), offset 0x00c ............................................... 941 register 5: ethernet mac data (macdata), offset 0x010 ................................................................. 943 register 6: ethernet mac individual address 0 (macia0), offset 0x014 ............................................. 945 register 7: ethernet mac individual address 1 (macia1), offset 0x018 ............................................. 946 register 8: ethernet mac threshold (macthr), offset 0x01c .......................................................... 947 register 9: ethernet mac management control (macmctl), offset 0x020 ........................................ 949 register 10: ethernet mac management divider (macmdv), offset 0x024 .......................................... 950 register 11: ethernet mac management address (macmadd), offset 0x028 ...................................... 951 register 12: ethernet mac management transmit data (macmtxd), offset 0x02c ............................. 952 register 13: ethernet mac management receive data (macmrxd), offset 0x030 .............................. 953 register 14: ethernet mac number of packets (macnp), offset 0x034 ............................................... 954 register 15: ethernet mac transmission request (mactr), offset 0x038 ........................................... 955 register 16: ethernet mac timer support (macts), offset 0x03c ...................................................... 956 universal serial bus (usb) controller ....................................................................................... 957 register 1: usb device functional address (usbfaddr), offset 0x000 ............................................ 985 register 2: usb power (usbpower), offset 0x001 ......................................................................... 986 register 3: usb transmit interrupt status (usbtxis), offset 0x002 ................................................... 989 register 4: usb receive interrupt status (usbrxis), offset 0x004 ................................................... 991 register 5: usb transmit interrupt enable (usbtxie), offset 0x006 .................................................. 993 register 6: usb receive interrupt enable (usbrxie), offset 0x008 .................................................. 995 register 7: usb general interrupt status (usbis), offset 0x00a ........................................................ 997 register 8: usb interrupt enable (usbie), offset 0x00b .................................................................. 1000 register 9: usb frame value (usbframe), offset 0x00c .............................................................. 1003 register 10: usb endpoint index (usbepidx), offset 0x00e ............................................................ 1004 register 11: usb test mode (usbtest), offset 0x00f ..................................................................... 1005 register 12: usb fifo endpoint 0 (usbfifo0), offset 0x020 ........................................................... 1007 register 13: usb fifo endpoint 1 (usbfifo1), offset 0x024 ........................................................... 1007 register 14: usb fifo endpoint 2 (usbfifo2), offset 0x028 ........................................................... 1007 register 15: usb fifo endpoint 3 (usbfifo3), offset 0x02c ........................................................... 1007 register 16: usb fifo endpoint 4 (usbfifo4), offset 0x030 ........................................................... 1007 register 17: usb fifo endpoint 5 (usbfifo5), offset 0x034 ........................................................... 1007 register 18: usb fifo endpoint 6 (usbfifo6), offset 0x038 ........................................................... 1007 register 19: usb fifo endpoint 7 (usbfifo7), offset 0x03c ........................................................... 1007 register 20: usb fifo endpoint 8 (usbfifo8), offset 0x040 ........................................................... 1007 register 21: usb fifo endpoint 9 (usbfifo9), offset 0x044 ........................................................... 1007 register 22: usb fifo endpoint 10 (usbfifo10), offset 0x048 ....................................................... 1007 register 23: usb fifo endpoint 11 (usbfifo11), offset 0x04c ....................................................... 1007 register 24: usb fifo endpoint 12 (usbfifo12), offset 0x050 ....................................................... 1007 register 25: usb fifo endpoint 13 (usbfifo13), offset 0x054 ....................................................... 1007 register 26: usb fifo endpoint 14 (usbfifo14), offset 0x058 ....................................................... 1007 register 27: usb fifo endpoint 15 (usbfifo15), offset 0x05c ....................................................... 1007 register 28: usb device control (usbdevctl), offset 0x060 .......................................................... 1009 register 29: usb transmit dynamic fifo sizing (usbtxfifosz), offset 0x062 ................................ 1011 register 30: usb receive dynamic fifo sizing (usbrxfifosz), offset 0x063 ................................ 1011 register 31: usb transmit fifo start address (usbtxfifoadd), offset 0x064 ................................ 1012 register 32: usb receive fifo start address (usbrxfifoadd), offset 0x066 ................................ 1012 register 33: usb connect timing (usbcontim), offset 0x07a ........................................................ 1013 july 03, 2014 30 texas instruments-production data table of contents register 34: usb otg vbus pulse timing (usbvplen), offset 0x07b ............................................ 1014 register 35: usb full-speed last transaction to end of frame timing (usbfseof), offset 0x07d .... 1015 register 36: usb low-speed last transaction to end of frame timing (usblseof), offset 0x07e .... 1016 register 37: usb transmit functional address endpoint 0 (usbtxfuncaddr0), offset 0x080 ......... 1017 register 38: usb transmit functional address endpoint 1 (usbtxfuncaddr1), offset 0x088 ......... 1017 register 39: usb transmit functional address endpoint 2 (usbtxfuncaddr2), offset 0x090 ......... 1017 register 40: usb transmit functional address endpoint 3 (usbtxfuncaddr3), offset 0x098 ......... 1017 register 41: usb transmit functional address endpoint 4 (usbtxfuncaddr4), offset 0x0a0 ......... 1017 register 42: usb transmit functional address endpoint 5 (usbtxfuncaddr5), offset 0x0a8 ......... 1017 register 43: usb transmit functional address endpoint 6 (usbtxfuncaddr6), offset 0x0b0 ......... 1017 register 44: usb transmit functional address endpoint 7 (usbtxfuncaddr7), offset 0x0b8 ......... 1017 register 45: usb transmit functional address endpoint 8 (usbtxfuncaddr8), offset 0x0c0 ........ 1017 register 46: usb transmit functional address endpoint 9 (usbtxfuncaddr9), offset 0x0c8 ........ 1017 register 47: usb transmit functional address endpoint 10 (usbtxfuncaddr10), offset 0x0d0 ..... 1017 register 48: usb transmit functional address endpoint 11 (usbtxfuncaddr11), offset 0x0d8 ..... 1017 register 49: usb transmit functional address endpoint 12 (usbtxfuncaddr12), offset 0x0e0 ..... 1017 register 50: usb transmit functional address endpoint 13 (usbtxfuncaddr13), offset 0x0e8 ..... 1017 register 51: usb transmit functional address endpoint 14 (usbtxfuncaddr14), offset 0x0f0 ..... 1017 register 52: usb transmit functional address endpoint 15 (usbtxfuncaddr15), offset 0x0f8 ..... 1017 register 53: usb transmit hub address endpoint 0 (usbtxhubaddr0), offset 0x082 ..................... 1019 register 54: usb transmit hub address endpoint 1 (usbtxhubaddr1), offset 0x08a .................... 1019 register 55: usb transmit hub address endpoint 2 (usbtxhubaddr2), offset 0x092 ..................... 1019 register 56: usb transmit hub address endpoint 3 (usbtxhubaddr3), offset 0x09a .................... 1019 register 57: usb transmit hub address endpoint 4 (usbtxhubaddr4), offset 0x0a2 .................... 1019 register 58: usb transmit hub address endpoint 5 (usbtxhubaddr5), offset 0x0aa .................... 1019 register 59: usb transmit hub address endpoint 6 (usbtxhubaddr6), offset 0x0b2 .................... 1019 register 60: usb transmit hub address endpoint 7 (usbtxhubaddr7), offset 0x0ba .................... 1019 register 61: usb transmit hub address endpoint 8 (usbtxhubaddr8), offset 0x0c2 .................... 1019 register 62: usb transmit hub address endpoint 9 (usbtxhubaddr9), offset 0x0ca .................... 1019 register 63: usb transmit hub address endpoint 10 (usbtxhubaddr10), offset 0x0d2 ................ 1019 register 64: usb transmit hub address endpoint 11 (usbtxhubaddr11), offset 0x0da ................ 1019 register 65: usb transmit hub address endpoint 12 (usbtxhubaddr12), offset 0x0e2 ................ 1019 register 66: usb transmit hub address endpoint 13 (usbtxhubaddr13), offset 0x0ea ................ 1019 register 67: usb transmit hub address endpoint 14 (usbtxhubaddr14), offset 0x0f2 ................. 1019 register 68: usb transmit hub address endpoint 15 (usbtxhubaddr15), offset 0x0fa ................ 1019 register 69: usb transmit hub port endpoint 0 (usbtxhubport0), offset 0x083 ........................... 1021 register 70: usb transmit hub port endpoint 1 (usbtxhubport1), offset 0x08b ........................... 1021 register 71: usb transmit hub port endpoint 2 (usbtxhubport2), offset 0x093 ........................... 1021 register 72: usb transmit hub port endpoint 3 (usbtxhubport3), offset 0x09b ........................... 1021 register 73: usb transmit hub port endpoint 4 (usbtxhubport4), offset 0x0a3 ........................... 1021 register 74: usb transmit hub port endpoint 5 (usbtxhubport5), offset 0x0ab .......................... 1021 register 75: usb transmit hub port endpoint 6 (usbtxhubport6), offset 0x0b3 ........................... 1021 register 76: usb transmit hub port endpoint 7 (usbtxhubport7), offset 0x0bb .......................... 1021 register 77: usb transmit hub port endpoint 8 (usbtxhubport8), offset 0x0c3 .......................... 1021 register 78: usb transmit hub port endpoint 9 (usbtxhubport9), offset 0x0cb .......................... 1021 register 79: usb transmit hub port endpoint 10 (usbtxhubport10), offset 0x0d3 ....................... 1021 register 80: usb transmit hub port endpoint 11 (usbtxhubport11), offset 0x0db ....................... 1021 register 81: usb transmit hub port endpoint 12 (usbtxhubport12), offset 0x0e3 ....................... 1021 31 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller register 82: usb transmit hub port endpoint 13 (usbtxhubport13), offset 0x0eb ...................... 1021 register 83: usb transmit hub port endpoint 14 (usbtxhubport14), offset 0x0f3 ....................... 1021 register 84: usb transmit hub port endpoint 15 (usbtxhubport15), offset 0x0fb ....................... 1021 register 85: usb receive functional address endpoint 1 (usbrxfuncaddr1), offset 0x08c ......... 1023 register 86: usb receive functional address endpoint 2 (usbrxfuncaddr2), offset 0x094 ......... 1023 register 87: usb receive functional address endpoint 3 (usbrxfuncaddr3), offset 0x09c ......... 1023 register 88: usb receive functional address endpoint 4 (usbrxfuncaddr4), offset 0x0a4 ......... 1023 register 89: usb receive functional address endpoint 5 (usbrxfuncaddr5), offset 0x0ac ......... 1023 register 90: usb receive functional address endpoint 6 (usbrxfuncaddr6), offset 0x0b4 ......... 1023 register 91: usb receive functional address endpoint 7 (usbrxfuncaddr7), offset 0x0bc ......... 1023 register 92: usb receive functional address endpoint 8 (usbrxfuncaddr8), offset 0x0c4 ......... 1023 register 93: usb receive functional address endpoint 9 (usbrxfuncaddr9), offset 0x0cc ........ 1023 register 94: usb receive functional address endpoint 10 (usbrxfuncaddr10), offset 0x0d4 ..... 1023 register 95: usb receive functional address endpoint 11 (usbrxfuncaddr11), offset 0x0dc ..... 1023 register 96: usb receive functional address endpoint 12 (usbrxfuncaddr12), offset 0x0e4 ..... 1023 register 97: usb receive functional address endpoint 13 (usbrxfuncaddr13), offset 0x0ec ..... 1023 register 98: usb receive functional address endpoint 14 (usbrxfuncaddr14), offset 0x0f4 ...... 1023 register 99: usb receive functional address endpoint 15 (usbrxfuncaddr15), offset 0x0fc ..... 1023 register 100: usb receive hub address endpoint 1 (usbrxhubaddr1), offset 0x08e ..................... 1025 register 101: usb receive hub address endpoint 2 (usbrxhubaddr2), offset 0x096 ..................... 1025 register 102: usb receive hub address endpoint 3 (usbrxhubaddr3), offset 0x09e ..................... 1025 register 103: usb receive hub address endpoint 4 (usbrxhubaddr4), offset 0x0a6 ..................... 1025 register 104: usb receive hub address endpoint 5 (usbrxhubaddr5), offset 0x0ae .................... 1025 register 105: usb receive hub address endpoint 6 (usbrxhubaddr6), offset 0x0b6 ..................... 1025 register 106: usb receive hub address endpoint 7 (usbrxhubaddr7), offset 0x0be .................... 1025 register 107: usb receive hub address endpoint 8 (usbrxhubaddr8), offset 0x0c6 .................... 1025 register 108: usb receive hub address endpoint 9 (usbrxhubaddr9), offset 0x0ce .................... 1025 register 109: usb receive hub address endpoint 10 (usbrxhubaddr10), offset 0x0d6 ................. 1025 register 110: usb receive hub address endpoint 11 (usbrxhubaddr11), offset 0x0de ................. 1025 register 111: usb receive hub address endpoint 12 (usbrxhubaddr12), offset 0x0e6 ................. 1025 register 112: usb receive hub address endpoint 13 (usbrxhubaddr13), offset 0x0ee ................ 1025 register 113: usb receive hub address endpoint 14 (usbrxhubaddr14), offset 0x0f6 ................. 1025 register 114: usb receive hub address endpoint 15 (usbrxhubaddr15), offset 0x0fe ................. 1025 register 115: usb receive hub port endpoint 1 (usbrxhubport1), offset 0x08f ........................... 1027 register 116: usb receive hub port endpoint 2 (usbrxhubport2), offset 0x097 ........................... 1027 register 117: usb receive hub port endpoint 3 (usbrxhubport3), offset 0x09f ........................... 1027 register 118: usb receive hub port endpoint 4 (usbrxhubport4), offset 0x0a7 ........................... 1027 register 119: usb receive hub port endpoint 5 (usbrxhubport5), offset 0x0af ........................... 1027 register 120: usb receive hub port endpoint 6 (usbrxhubport6), offset 0x0b7 ........................... 1027 register 121: usb receive hub port endpoint 7 (usbrxhubport7), offset 0x0bf ........................... 1027 register 122: usb receive hub port endpoint 8 (usbrxhubport8), offset 0x0c7 ........................... 1027 register 123: usb receive hub port endpoint 9 (usbrxhubport9), offset 0x0cf ........................... 1027 register 124: usb receive hub port endpoint 10 (usbrxhubport10), offset 0x0d7 ....................... 1027 register 125: usb receive hub port endpoint 11 (usbrxhubport11), offset 0x0df ....................... 1027 register 126: usb receive hub port endpoint 12 (usbrxhubport12), offset 0x0e7 ....................... 1027 register 127: usb receive hub port endpoint 13 (usbrxhubport13), offset 0x0ef ....................... 1027 register 128: usb receive hub port endpoint 14 (usbrxhubport14), offset 0x0f7 ....................... 1027 register 129: usb receive hub port endpoint 15 (usbrxhubport15), offset 0x0ff ....................... 1027 july 03, 2014 32 texas instruments-production data table of contents register 130: usb maximum transmit data endpoint 1 (usbtxmaxp1), offset 0x110 ......................... 1029 register 131: usb maximum transmit data endpoint 2 (usbtxmaxp2), offset 0x120 ........................ 1029 register 132: usb maximum transmit data endpoint 3 (usbtxmaxp3), offset 0x130 ........................ 1029 register 133: usb maximum transmit data endpoint 4 (usbtxmaxp4), offset 0x140 ........................ 1029 register 134: usb maximum transmit data endpoint 5 (usbtxmaxp5), offset 0x150 ........................ 1029 register 135: usb maximum transmit data endpoint 6 (usbtxmaxp6), offset 0x160 ........................ 1029 register 136: usb maximum transmit data endpoint 7 (usbtxmaxp7), offset 0x170 ........................ 1029 register 137: usb maximum transmit data endpoint 8 (usbtxmaxp8), offset 0x180 ........................ 1029 register 138: usb maximum transmit data endpoint 9 (usbtxmaxp9), offset 0x190 ........................ 1029 register 139: usb maximum transmit data endpoint 10 (usbtxmaxp10), offset 0x1a0 .................... 1029 register 140: usb maximum transmit data endpoint 11 (usbtxmaxp11), offset 0x1b0 ..................... 1029 register 141: usb maximum transmit data endpoint 12 (usbtxmaxp12), offset 0x1c0 .................... 1029 register 142: usb maximum transmit data endpoint 13 (usbtxmaxp13), offset 0x1d0 .................... 1029 register 143: usb maximum transmit data endpoint 14 (usbtxmaxp14), offset 0x1e0 .................... 1029 register 144: usb maximum transmit data endpoint 15 (usbtxmaxp15), offset 0x1f0 ..................... 1029 register 145: usb control and status endpoint 0 low (usbcsrl0), offset 0x102 ............................... 1031 register 146: usb control and status endpoint 0 high (usbcsrh0), offset 0x103 ............................. 1035 register 147: usb receive byte count endpoint 0 (usbcount0), offset 0x108 ................................. 1037 register 148: usb type endpoint 0 (usbtype0), offset 0x10a .......................................................... 1038 register 149: usb nak limit (usbnaklmt), offset 0x10b ................................................................ 1039 register 150: usb transmit control and status endpoint 1 low (usbtxcsrl1), offset 0x112 ............. 1040 register 151: usb transmit control and status endpoint 2 low (usbtxcsrl2), offset 0x122 ............. 1040 register 152: usb transmit control and status endpoint 3 low (usbtxcsrl3), offset 0x132 ............. 1040 register 153: usb transmit control and status endpoint 4 low (usbtxcsrl4), offset 0x142 ............. 1040 register 154: usb transmit control and status endpoint 5 low (usbtxcsrl5), offset 0x152 ............. 1040 register 155: usb transmit control and status endpoint 6 low (usbtxcsrl6), offset 0x162 ............. 1040 register 156: usb transmit control and status endpoint 7 low (usbtxcsrl7), offset 0x172 ............. 1040 register 157: usb transmit control and status endpoint 8 low (usbtxcsrl8), offset 0x182 ............. 1040 register 158: usb transmit control and status endpoint 9 low (usbtxcsrl9), offset 0x192 ............. 1040 register 159: usb transmit control and status endpoint 10 low (usbtxcsrl10), offset 0x1a2 ......... 1040 register 160: usb transmit control and status endpoint 11 low (usbtxcsrl11), offset 0x1b2 ......... 1040 register 161: usb transmit control and status endpoint 12 low (usbtxcsrl12), offset 0x1c2 ........ 1040 register 162: usb transmit control and status endpoint 13 low (usbtxcsrl13), offset 0x1d2 ........ 1040 register 163: usb transmit control and status endpoint 14 low (usbtxcsrl14), offset 0x1e2 ......... 1040 register 164: usb transmit control and status endpoint 15 low (usbtxcsrl15), offset 0x1f2 ......... 1040 register 165: usb transmit control and status endpoint 1 high (usbtxcsrh1), offset 0x113 ............ 1045 register 166: usb transmit control and status endpoint 2 high (usbtxcsrh2), offset 0x123 ........... 1045 register 167: usb transmit control and status endpoint 3 high (usbtxcsrh3), offset 0x133 ........... 1045 register 168: usb transmit control and status endpoint 4 high (usbtxcsrh4), offset 0x143 ........... 1045 register 169: usb transmit control and status endpoint 5 high (usbtxcsrh5), offset 0x153 ........... 1045 register 170: usb transmit control and status endpoint 6 high (usbtxcsrh6), offset 0x163 ........... 1045 register 171: usb transmit control and status endpoint 7 high (usbtxcsrh7), offset 0x173 ........... 1045 register 172: usb transmit control and status endpoint 8 high (usbtxcsrh8), offset 0x183 ........... 1045 register 173: usb transmit control and status endpoint 9 high (usbtxcsrh9), offset 0x193 ........... 1045 register 174: usb transmit control and status endpoint 10 high (usbtxcsrh10), offset 0x1a3 ....... 1045 register 175: usb transmit control and status endpoint 11 high (usbtxcsrh11), offset 0x1b3 ........ 1045 register 176: usb transmit control and status endpoint 12 high (usbtxcsrh12), offset 0x1c3 ....... 1045 register 177: usb transmit control and status endpoint 13 high (usbtxcsrh13), offset 0x1d3 ....... 1045 33 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller register 178: usb transmit control and status endpoint 14 high (usbtxcsrh14), offset 0x1e3 ....... 1045 register 179: usb transmit control and status endpoint 15 high (usbtxcsrh15), offset 0x1f3 ........ 1045 register 180: usb maximum receive data endpoint 1 (usbrxmaxp1), offset 0x114 ......................... 1049 register 181: usb maximum receive data endpoint 2 (usbrxmaxp2), offset 0x124 ......................... 1049 register 182: usb maximum receive data endpoint 3 (usbrxmaxp3), offset 0x134 ......................... 1049 register 183: usb maximum receive data endpoint 4 (usbrxmaxp4), offset 0x144 ......................... 1049 register 184: usb maximum receive data endpoint 5 (usbrxmaxp5), offset 0x154 ......................... 1049 register 185: usb maximum receive data endpoint 6 (usbrxmaxp6), offset 0x164 ......................... 1049 register 186: usb maximum receive data endpoint 7 (usbrxmaxp7), offset 0x174 ......................... 1049 register 187: usb maximum receive data endpoint 8 (usbrxmaxp8), offset 0x184 ......................... 1049 register 188: usb maximum receive data endpoint 9 (usbrxmaxp9), offset 0x194 ......................... 1049 register 189: usb maximum receive data endpoint 10 (usbrxmaxp10), offset 0x1a4 ..................... 1049 register 190: usb maximum receive data endpoint 11 (usbrxmaxp11), offset 0x1b4 ..................... 1049 register 191: usb maximum receive data endpoint 12 (usbrxmaxp12), offset 0x1c4 ..................... 1049 register 192: usb maximum receive data endpoint 13 (usbrxmaxp13), offset 0x1d4 ..................... 1049 register 193: usb maximum receive data endpoint 14 (usbrxmaxp14), offset 0x1e4 ..................... 1049 register 194: usb maximum receive data endpoint 15 (usbrxmaxp15), offset 0x1f4 ..................... 1049 register 195: usb receive control and status endpoint 1 low (usbrxcsrl1), offset 0x116 ............. 1051 register 196: usb receive control and status endpoint 2 low (usbrxcsrl2), offset 0x126 ............. 1051 register 197: usb receive control and status endpoint 3 low (usbrxcsrl3), offset 0x136 ............. 1051 register 198: usb receive control and status endpoint 4 low (usbrxcsrl4), offset 0x146 ............. 1051 register 199: usb receive control and status endpoint 5 low (usbrxcsrl5), offset 0x156 ............. 1051 register 200: usb receive control and status endpoint 6 low (usbrxcsrl6), offset 0x166 ............. 1051 register 201: usb receive control and status endpoint 7 low (usbrxcsrl7), offset 0x176 ............. 1051 register 202: usb receive control and status endpoint 8 low (usbrxcsrl8), offset 0x186 ............. 1051 register 203: usb receive control and status endpoint 9 low (usbrxcsrl9), offset 0x196 ............. 1051 register 204: usb receive control and status endpoint 10 low (usbrxcsrl10), offset 0x1a6 ......... 1051 register 205: usb receive control and status endpoint 11 low (usbrxcsrl11), offset 0x1b6 .......... 1051 register 206: usb receive control and status endpoint 12 low (usbrxcsrl12), offset 0x1c6 ......... 1051 register 207: usb receive control and status endpoint 13 low (usbrxcsrl13), offset 0x1d6 ......... 1051 register 208: usb receive control and status endpoint 14 low (usbrxcsrl14), offset 0x1e6 ......... 1051 register 209: usb receive control and status endpoint 15 low (usbrxcsrl15), offset 0x1f6 ......... 1051 register 210: usb receive control and status endpoint 1 high (usbrxcsrh1), offset 0x117 ............ 1056 register 211: usb receive control and status endpoint 2 high (usbrxcsrh2), offset 0x127 ............ 1056 register 212: usb receive control and status endpoint 3 high (usbrxcsrh3), offset 0x137 ............ 1056 register 213: usb receive control and status endpoint 4 high (usbrxcsrh4), offset 0x147 ............ 1056 register 214: usb receive control and status endpoint 5 high (usbrxcsrh5), offset 0x157 ............ 1056 register 215: usb receive control and status endpoint 6 high (usbrxcsrh6), offset 0x167 ............ 1056 register 216: usb receive control and status endpoint 7 high (usbrxcsrh7), offset 0x177 ............ 1056 register 217: usb receive control and status endpoint 8 high (usbrxcsrh8), offset 0x187 ............ 1056 register 218: usb receive control and status endpoint 9 high (usbrxcsrh9), offset 0x197 ............ 1056 register 219: usb receive control and status endpoint 10 high (usbrxcsrh10), offset 0x1a7 ........ 1056 register 220: usb receive control and status endpoint 11 high (usbrxcsrh11), offset 0x1b7 ........ 1056 register 221: usb receive control and status endpoint 12 high (usbrxcsrh12), offset 0x1c7 ........ 1056 register 222: usb receive control and status endpoint 13 high (usbrxcsrh13), offset 0x1d7 ........ 1056 register 223: usb receive control and status endpoint 14 high (usbrxcsrh14), offset 0x1e7 ........ 1056 register 224: usb receive control and status endpoint 15 high (usbrxcsrh15), offset 0x1f7 ........ 1056 register 225: usb receive byte count endpoint 1 (usbrxcount1), offset 0x118 ............................. 1061 july 03, 2014 34 texas instruments-production data table of contents register 226: usb receive byte count endpoint 2 (usbrxcount2), offset 0x128 ............................ 1061 register 227: usb receive byte count endpoint 3 (usbrxcount3), offset 0x138 ............................ 1061 register 228: usb receive byte count endpoint 4 (usbrxcount4), offset 0x148 ............................ 1061 register 229: usb receive byte count endpoint 5 (usbrxcount5), offset 0x158 ............................ 1061 register 230: usb receive byte count endpoint 6 (usbrxcount6), offset 0x168 ............................ 1061 register 231: usb receive byte count endpoint 7 (usbrxcount7), offset 0x178 ............................ 1061 register 232: usb receive byte count endpoint 8 (usbrxcount8), offset 0x188 ............................ 1061 register 233: usb receive byte count endpoint 9 (usbrxcount9), offset 0x198 ............................ 1061 register 234: usb receive byte count endpoint 10 (usbrxcount10), offset 0x1a8 ........................ 1061 register 235: usb receive byte count endpoint 11 (usbrxcount11), offset 0x1b8 ......................... 1061 register 236: usb receive byte count endpoint 12 (usbrxcount12), offset 0x1c8 ........................ 1061 register 237: usb receive byte count endpoint 13 (usbrxcount13), offset 0x1d8 ........................ 1061 register 238: usb receive byte count endpoint 14 (usbrxcount14), offset 0x1e8 ........................ 1061 register 239: usb receive byte count endpoint 15 (usbrxcount15), offset 0x1f8 ........................ 1061 register 240: usb host transmit configure type endpoint 1 (usbtxtype1), offset 0x11a ................. 1063 register 241: usb host transmit configure type endpoint 2 (usbtxtype2), offset 0x12a ................. 1063 register 242: usb host transmit configure type endpoint 3 (usbtxtype3), offset 0x13a ................. 1063 register 243: usb host transmit configure type endpoint 4 (usbtxtype4), offset 0x14a ................. 1063 register 244: usb host transmit configure type endpoint 5 (usbtxtype5), offset 0x15a ................. 1063 register 245: usb host transmit configure type endpoint 6 (usbtxtype6), offset 0x16a ................. 1063 register 246: usb host transmit configure type endpoint 7 (usbtxtype7), offset 0x17a ................. 1063 register 247: usb host transmit configure type endpoint 8 (usbtxtype8), offset 0x18a ................. 1063 register 248: usb host transmit configure type endpoint 9 (usbtxtype9), offset 0x19a ................. 1063 register 249: usb host transmit configure type endpoint 10 (usbtxtype10), offset 0x1aa ............. 1063 register 250: usb host transmit configure type endpoint 11 (usbtxtype11), offset 0x1ba ............. 1063 register 251: usb host transmit configure type endpoint 12 (usbtxtype12), offset 0x1ca ............. 1063 register 252: usb host transmit configure type endpoint 13 (usbtxtype13), offset 0x1da ............. 1063 register 253: usb host transmit configure type endpoint 14 (usbtxtype14), offset 0x1ea ............. 1063 register 254: usb host transmit configure type endpoint 15 (usbtxtype15), offset 0x1fa ............. 1063 register 255: usb host transmit interval endpoint 1 (usbtxinterval1), offset 0x11b ..................... 1065 register 256: usb host transmit interval endpoint 2 (usbtxinterval2), offset 0x12b ..................... 1065 register 257: usb host transmit interval endpoint 3 (usbtxinterval3), offset 0x13b ..................... 1065 register 258: usb host transmit interval endpoint 4 (usbtxinterval4), offset 0x14b ..................... 1065 register 259: usb host transmit interval endpoint 5 (usbtxinterval5), offset 0x15b ..................... 1065 register 260: usb host transmit interval endpoint 6 (usbtxinterval6), offset 0x16b ..................... 1065 register 261: usb host transmit interval endpoint 7 (usbtxinterval7), offset 0x17b ..................... 1065 register 262: usb host transmit interval endpoint 8 (usbtxinterval8), offset 0x18b ..................... 1065 register 263: usb host transmit interval endpoint 9 (usbtxinterval9), offset 0x19b ..................... 1065 register 264: usb host transmit interval endpoint 10 (usbtxinterval10), offset 0x1ab ................. 1065 register 265: usb host transmit interval endpoint 11 (usbtxinterval11), offset 0x1bb .................. 1065 register 266: usb host transmit interval endpoint 12 (usbtxinterval12), offset 0x1cb ................. 1065 register 267: usb host transmit interval endpoint 13 (usbtxinterval13), offset 0x1db ................. 1065 register 268: usb host transmit interval endpoint 14 (usbtxinterval14), offset 0x1eb ................. 1065 register 269: usb host transmit interval endpoint 15 (usbtxinterval15), offset 0x1fb ................. 1065 register 270: usb host configure receive type endpoint 1 (usbrxtype1), offset 0x11c ................. 1067 register 271: usb host configure receive type endpoint 2 (usbrxtype2), offset 0x12c ................. 1067 register 272: usb host configure receive type endpoint 3 (usbrxtype3), offset 0x13c ................. 1067 register 273: usb host configure receive type endpoint 4 (usbrxtype4), offset 0x14c ................. 1067 35 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller register 274: usb host configure receive type endpoint 5 (usbrxtype5), offset 0x15c ................. 1067 register 275: usb host configure receive type endpoint 6 (usbrxtype6), offset 0x16c ................. 1067 register 276: usb host configure receive type endpoint 7 (usbrxtype7), offset 0x17c ................. 1067 register 277: usb host configure receive type endpoint 8 (usbrxtype8), offset 0x18c ................. 1067 register 278: usb host configure receive type endpoint 9 (usbrxtype9), offset 0x19c ................. 1067 register 279: usb host configure receive type endpoint 10 (usbrxtype10), offset 0x1ac ............. 1067 register 280: usb host configure receive type endpoint 11 (usbrxtype11), offset 0x1bc ............. 1067 register 281: usb host configure receive type endpoint 12 (usbrxtype12), offset 0x1cc ............. 1067 register 282: usb host configure receive type endpoint 13 (usbrxtype13), offset 0x1dc ............. 1067 register 283: usb host configure receive type endpoint 14 (usbrxtype14), offset 0x1ec ............. 1067 register 284: usb host configure receive type endpoint 15 (usbrxtype15), offset 0x1fc ............. 1067 register 285: usb host receive polling interval endpoint 1 (usbrxinterval1), offset 0x11d ........... 1069 register 286: usb host receive polling interval endpoint 2 (usbrxinterval2), offset 0x12d ........... 1069 register 287: usb host receive polling interval endpoint 3 (usbrxinterval3), offset 0x13d ........... 1069 register 288: usb host receive polling interval endpoint 4 (usbrxinterval4), offset 0x14d ........... 1069 register 289: usb host receive polling interval endpoint 5 (usbrxinterval5), offset 0x15d ........... 1069 register 290: usb host receive polling interval endpoint 6 (usbrxinterval6), offset 0x16d ........... 1069 register 291: usb host receive polling interval endpoint 7 (usbrxinterval7), offset 0x17d ........... 1069 register 292: usb host receive polling interval endpoint 8 (usbrxinterval8), offset 0x18d ........... 1069 register 293: usb host receive polling interval endpoint 9 (usbrxinterval9), offset 0x19d ........... 1069 register 294: usb host receive polling interval endpoint 10 (usbrxinterval10), offset 0x1ad ...... 1069 register 295: usb host receive polling interval endpoint 11 (usbrxinterval11), offset 0x1bd ....... 1069 register 296: usb host receive polling interval endpoint 12 (usbrxinterval12), offset 0x1cd ...... 1069 register 297: usb host receive polling interval endpoint 13 (usbrxinterval13), offset 0x1dd ...... 1069 register 298: usb host receive polling interval endpoint 14 (usbrxinterval14), offset 0x1ed ...... 1069 register 299: usb host receive polling interval endpoint 15 (usbrxinterval15), offset 0x1fd ....... 1069 register 300: usb request packet count in block transfer endpoint 1 (usbrqpktcount1), offset 0x304 .......................................................................................................................... 1071 register 301: usb request packet count in block transfer endpoint 2 (usbrqpktcount2), offset 0x308 .......................................................................................................................... 1071 register 302: usb request packet count in block transfer endpoint 3 (usbrqpktcount3), offset 0x30c ......................................................................................................................... 1071 register 303: usb request packet count in block transfer endpoint 4 (usbrqpktcount4), offset 0x310 .......................................................................................................................... 1071 register 304: usb request packet count in block transfer endpoint 5 (usbrqpktcount5), offset 0x314 .......................................................................................................................... 1071 register 305: usb request packet count in block transfer endpoint 6 (usbrqpktcount6), offset 0x318 .......................................................................................................................... 1071 register 306: usb request packet count in block transfer endpoint 7 (usbrqpktcount7), offset 0x31c ......................................................................................................................... 1071 register 307: usb request packet count in block transfer endpoint 8 (usbrqpktcount8), offset 0x320 .......................................................................................................................... 1071 register 308: usb request packet count in block transfer endpoint 9 (usbrqpktcount9), offset 0x324 .......................................................................................................................... 1071 register 309: usb request packet count in block transfer endpoint 10 (usbrqpktcount10), offset 0x328 .......................................................................................................................... 1071 register 310: usb request packet count in block transfer endpoint 11 (usbrqpktcount11), offset 0x32c ......................................................................................................................... 1071 july 03, 2014 36 texas instruments-production data table of contents register 311: usb request packet count in block transfer endpoint 12 (usbrqpktcount12), offset 0x330 .......................................................................................................................... 1071 register 312: usb request packet count in block transfer endpoint 13 (usbrqpktcount13), offset 0x334 .......................................................................................................................... 1071 register 313: usb request packet count in block transfer endpoint 14 (usbrqpktcount14), offset 0x338 .......................................................................................................................... 1071 register 314: usb request packet count in block transfer endpoint 15 (usbrqpktcount15), offset 0x33c ......................................................................................................................... 1071 register 315: usb receive double packet buffer disable (usbrxdpktbufdis), offset 0x340 ........... 1073 register 316: usb transmit double packet buffer disable (usbtxdpktbufdis), offset 0x342 .......... 1075 register 317: usb external power control (usbepc), offset 0x400 .................................................... 1077 register 318: usb external power control raw interrupt status (usbepcris), offset 0x404 ............... 1080 register 319: usb external power control interrupt mask (usbepcim), offset 0x408 .......................... 1081 register 320: usb external power control interrupt status and clear (usbepcisc), offset 0x40c ....... 1082 register 321: usb device resume raw interrupt status (usbdrris), offset 0x410 .......................... 1083 register 322: usb device resume interrupt mask (usbdrim), offset 0x414 ..................................... 1084 register 323: usb device resume interrupt status and clear (usbdrisc), offset 0x418 .................. 1085 register 324: usb general-purpose control and status (usbgpcs), offset 0x41c ............................. 1086 register 325: usb vbus droop control (usbvdc), offset 0x430 ....................................................... 1087 register 326: usb vbus droop control raw interrupt status (usbvdcris), offset 0x434 .................. 1088 register 327: usb vbus droop control interrupt mask (usbvdcim), offset 0x438 ............................. 1089 register 328: usb vbus droop control interrupt status and clear (usbvdcisc), offset 0x43c .......... 1090 register 329: usb id valid detect raw interrupt status (usbidvris), offset 0x444 ............................. 1091 register 330: usb id valid detect interrupt mask (usbidvim), offset 0x448 ........................................ 1092 register 331: usb id valid detect interrupt status and clear (usbidvisc), offset 0x44c .................... 1093 register 332: usb dma select (usbdmasel), offset 0x450 .............................................................. 1094 analog comparators ................................................................................................................. 1096 register 1: analog comparator masked interrupt status (acmis), offset 0x000 ................................ 1103 register 2: analog comparator raw interrupt status (acris), offset 0x004 ..................................... 1104 register 3: analog comparator interrupt enable (acinten), offset 0x008 ....................................... 1105 register 4: analog comparator reference voltage control (acrefctl), offset 0x010 ..................... 1106 register 5: analog comparator status 0 (acstat0), offset 0x020 ................................................... 1107 register 6: analog comparator status 1 (acstat1), offset 0x040 ................................................... 1107 register 7: analog comparator status 2 (acstat2), offset 0x060 ................................................... 1107 register 8: analog comparator control 0 (acctl0), offset 0x024 ................................................... 1108 register 9: analog comparator control 1 (acctl1), offset 0x044 ................................................... 1108 register 10: analog comparator control 2 (acctl2), offset 0x064 ................................................... 1108 pulse width modulator (pwm) .................................................................................................. 1110 register 1: pwm master control (pwmctl), offset 0x000 .............................................................. 1126 register 2: pwm time base sync (pwmsync), offset 0x004 ......................................................... 1128 register 3: pwm output enable (pwmenable), offset 0x008 ........................................................ 1129 register 4: pwm output inversion (pwminvert), offset 0x00c ..................................................... 1131 register 5: pwm output fault (pwmfault), offset 0x010 .............................................................. 1133 register 6: pwm interrupt enable (pwminten), offset 0x014 ......................................................... 1135 register 7: pwm raw interrupt status (pwmris), offset 0x018 ...................................................... 1137 register 8: pwm interrupt status and clear (pwmisc), offset 0x01c .............................................. 1140 register 9: pwm status (pwmstatus), offset 0x020 .................................................................... 1143 register 10: pwm fault condition value (pwmfaultval), offset 0x024 ........................................... 1145 37 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller register 11: pwm enable update (pwmenupd), offset 0x028 ......................................................... 1147 register 12: pwm0 control (pwm0ctl), offset 0x040 ...................................................................... 1151 register 13: pwm1 control (pwm1ctl), offset 0x080 ...................................................................... 1151 register 14: pwm2 control (pwm2ctl), offset 0x0c0 ..................................................................... 1151 register 15: pwm3 control (pwm3ctl), offset 0x100 ...................................................................... 1151 register 16: pwm0 interrupt and trigger enable (pwm0inten), offset 0x044 ................................... 1156 register 17: pwm1 interrupt and trigger enable (pwm1inten), offset 0x084 ................................... 1156 register 18: pwm2 interrupt and trigger enable (pwm2inten), offset 0x0c4 ................................... 1156 register 19: pwm3 interrupt and trigger enable (pwm3inten), offset 0x104 ................................... 1156 register 20: pwm0 raw interrupt status (pwm0ris), offset 0x048 ................................................... 1159 register 21: pwm1 raw interrupt status (pwm1ris), offset 0x088 ................................................... 1159 register 22: pwm2 raw interrupt status (pwm2ris), offset 0x0c8 .................................................. 1159 register 23: pwm3 raw interrupt status (pwm3ris), offset 0x108 ................................................... 1159 register 24: pwm0 interrupt status and clear (pwm0isc), offset 0x04c .......................................... 1161 register 25: pwm1 interrupt status and clear (pwm1isc), offset 0x08c .......................................... 1161 register 26: pwm2 interrupt status and clear (pwm2isc), offset 0x0cc .......................................... 1161 register 27: pwm3 interrupt status and clear (pwm3isc), offset 0x10c .......................................... 1161 register 28: pwm0 load (pwm0load), offset 0x050 ...................................................................... 1163 register 29: pwm1 load (pwm1load), offset 0x090 ...................................................................... 1163 register 30: pwm2 load (pwm2load), offset 0x0d0 ...................................................................... 1163 register 31: pwm3 load (pwm3load), offset 0x110 ...................................................................... 1163 register 32: pwm0 counter (pwm0count), offset 0x054 ............................................................... 1164 register 33: pwm1 counter (pwm1count), offset 0x094 ............................................................... 1164 register 34: pwm2 counter (pwm2count), offset 0x0d4 .............................................................. 1164 register 35: pwm3 counter (pwm3count), offset 0x114 ............................................................... 1164 register 36: pwm0 compare a (pwm0cmpa), offset 0x058 ............................................................ 1165 register 37: pwm1 compare a (pwm1cmpa), offset 0x098 ............................................................ 1165 register 38: pwm2 compare a (pwm2cmpa), offset 0x0d8 ............................................................ 1165 register 39: pwm3 compare a (pwm3cmpa), offset 0x118 ............................................................. 1165 register 40: pwm0 compare b (pwm0cmpb), offset 0x05c ............................................................ 1166 register 41: pwm1 compare b (pwm1cmpb), offset 0x09c ............................................................ 1166 register 42: pwm2 compare b (pwm2cmpb), offset 0x0dc ........................................................... 1166 register 43: pwm3 compare b (pwm3cmpb), offset 0x11c ............................................................ 1166 register 44: pwm0 generator a control (pwm0gena), offset 0x060 ............................................... 1167 register 45: pwm1 generator a control (pwm1gena), offset 0x0a0 ............................................... 1167 register 46: pwm2 generator a control (pwm2gena), offset 0x0e0 ............................................... 1167 register 47: pwm3 generator a control (pwm3gena), offset 0x120 ............................................... 1167 register 48: pwm0 generator b control (pwm0genb), offset 0x064 ............................................... 1170 register 49: pwm1 generator b control (pwm1genb), offset 0x0a4 ............................................... 1170 register 50: pwm2 generator b control (pwm2genb), offset 0x0e4 ............................................... 1170 register 51: pwm3 generator b control (pwm3genb), offset 0x124 ............................................... 1170 register 52: pwm0 dead-band control (pwm0dbctl), offset 0x068 ............................................... 1173 register 53: pwm1 dead-band control (pwm1dbctl), offset 0x0a8 ............................................... 1173 register 54: pwm2 dead-band control (pwm2dbctl), offset 0x0e8 ............................................... 1173 register 55: pwm3 dead-band control (pwm3dbctl), offset 0x128 ............................................... 1173 register 56: pwm0 dead-band rising-edge delay (pwm0dbrise), offset 0x06c ............................ 1174 register 57: pwm1 dead-band rising-edge delay (pwm1dbrise), offset 0x0ac ............................ 1174 register 58: pwm2 dead-band rising-edge delay (pwm2dbrise), offset 0x0ec ............................ 1174 july 03, 2014 38 texas instruments-production data table of contents register 59: pwm3 dead-band rising-edge delay (pwm3dbrise), offset 0x12c ............................ 1174 register 60: pwm0 dead-band falling-edge-delay (pwm0dbfall), offset 0x070 ............................ 1175 register 61: pwm1 dead-band falling-edge-delay (pwm1dbfall), offset 0x0b0 ............................ 1175 register 62: pwm2 dead-band falling-edge-delay (pwm2dbfall), offset 0x0f0 ............................ 1175 register 63: pwm3 dead-band falling-edge-delay (pwm3dbfall), offset 0x130 ............................ 1175 register 64: pwm0 fault source 0 (pwm0fltsrc0), offset 0x074 .................................................. 1176 register 65: pwm1 fault source 0 (pwm1fltsrc0), offset 0x0b4 .................................................. 1176 register 66: pwm2 fault source 0 (pwm2fltsrc0), offset 0x0f4 .................................................. 1176 register 67: pwm3 fault source 0 (pwm3fltsrc0), offset 0x134 .................................................. 1176 register 68: pwm0 fault source 1 (pwm0fltsrc1), offset 0x078 .................................................. 1178 register 69: pwm1 fault source 1 (pwm1fltsrc1), offset 0x0b8 .................................................. 1178 register 70: pwm2 fault source 1 (pwm2fltsrc1), offset 0x0f8 .................................................. 1178 register 71: pwm3 fault source 1 (pwm3fltsrc1), offset 0x138 .................................................. 1178 register 72: pwm0 minimum fault period (pwm0minfltper), offset 0x07c ................................... 1181 register 73: pwm1 minimum fault period (pwm1minfltper), offset 0x0bc ................................... 1181 register 74: pwm2 minimum fault period (pwm2minfltper), offset 0x0fc ................................... 1181 register 75: pwm3 minimum fault period (pwm3minfltper), offset 0x13c ................................... 1181 register 76: pwm0 fault pin logic sense (pwm0fltsen), offset 0x800 .......................................... 1182 register 77: pwm1 fault pin logic sense (pwm1fltsen), offset 0x880 .......................................... 1182 register 78: pwm2 fault pin logic sense (pwm2fltsen), offset 0x900 .......................................... 1182 register 79: pwm3 fault pin logic sense (pwm3fltsen), offset 0x980 .......................................... 1182 register 80: pwm0 fault status 0 (pwm0fltstat0), offset 0x804 ................................................... 1183 register 81: pwm1 fault status 0 (pwm1fltstat0), offset 0x884 ................................................... 1183 register 82: pwm2 fault status 0 (pwm2fltstat0), offset 0x904 ................................................... 1183 register 83: pwm3 fault status 0 (pwm3fltstat0), offset 0x984 ................................................... 1183 register 84: pwm0 fault status 1 (pwm0fltstat1), offset 0x808 ................................................... 1185 register 85: pwm1 fault status 1 (pwm1fltstat1), offset 0x888 ................................................... 1185 register 86: pwm2 fault status 1 (pwm2fltstat1), offset 0x908 ................................................... 1185 register 87: pwm3 fault status 1 (pwm3fltstat1), offset 0x988 ................................................... 1185 quadrature encoder interface (qei) ........................................................................................ 1188 register 1: qei control (qeictl), offset 0x000 .............................................................................. 1195 register 2: qei status (qeistat), offset 0x004 .............................................................................. 1198 register 3: qei position (qeipos), offset 0x008 ............................................................................ 1199 register 4: qei maximum position (qeimaxpos), offset 0x00c ..................................................... 1200 register 5: qei timer load (qeiload), offset 0x010 ..................................................................... 1201 register 6: qei timer (qeitime), offset 0x014 ............................................................................... 1202 register 7: qei velocity counter (qeicount), offset 0x018 ........................................................... 1203 register 8: qei velocity (qeispeed), offset 0x01c ........................................................................ 1204 register 9: qei interrupt enable (qeiinten), offset 0x020 ............................................................. 1205 register 10: qei raw interrupt status (qeiris), offset 0x024 ........................................................... 1207 register 11: qei interrupt status and clear (qeiisc), offset 0x028 ................................................... 1209 39 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller revision history the revision history table notes changes made between the indicated revisions of the lm3s9gn5 data sheet. table 1. revision history description revision date in jtag chapter, clarified jtag-to-swd switching and swd-to-jtag switching. in system control chapter, clarified behavior of reset cause (resc) register external reset bit. in internal memory chapter, noted that the boot configuration (bootcfg) register requires a por before committed changes to the flash-resident registers take effect. in gpio chapter, corrected values for gpiopctl in the table gpio pins with non-zero reset values. in uart chapter, clarified that the transmit interrupt is based on a transition through level. in ethernet chapter, corrected register type of ethernet phy management register 29 C interrupt status (mr29) to rc. in ordering and contact information appendix, moved orderable part numbers table to addendum. additional minor data sheet clarifications and corrections. 15852.2743 july 2014 marked lm3s9gn5 device as not recommended for new designs (nrnd). device is in production to support existing customers, but ti does not recommend using this part in a new design. in the udma chapter, in the "dma channel assignments" and "request type support" tables, corrected to show udma support for burst requests from the general-purpose timer, not single requests. in the watchdog timers chapter, added information on servicing the watchdog timer to the initialization and configuration section. in the general-purpose timers chapter, added note to the gptmtnv registers that in 16-bit mode, only the lower 16-bits of the register can be written with a new value. writes to the prescaler bits have no effect. corrected reset for the uart raw interrupt status (uartris) register. in the usb chapter, clarified that the usb phy has internal termination resistors, and thus there is no need for external resistors. in the electrical characteristics chapter, added clarifying footnote to the gpio module characteristics table. additional minor data sheet clarifications and corrections. 13440.2549 october 2012 11425 january 2012 in system control chapter: C clarified that an external ldo cannot be used. C clarified system clock requirements when the adc module is in operation. C added important note to write the rcc register before the rcc2 register. in internal memory chapter, clarified programming and use of the non-volatile registers. in gpio chapter, corrected "gpio pins with non-zero reset values" table and added note that if the same signal is assigned to two different gpio port pins, the signal is assigned to the port with the lowest letter. july 03, 2014 40 texas instruments-production data revision history table 1. revision history (continued) description revision date in epi chapter: C clarified table "capabilities of host bus 8 and host bus 16 modes". C corrected bit and register resets for freq (frequency range) in epi sdram configuration (episdramcfg) register. C corrected bit and register resets for maxwait (maximum wait) in epi host-bus 8 configuration (epihb8cfg) and epi host-bus 16 configuration (epihb16cfg) registers. also clarified bit descriptions in these registers. C corrected bit definitions for the epsz and ersz bits in the epi address map (epiaddrmap) register. C corrected size of count bit field in epi read fifo count (epirfifocnt) register. in timer chapter, clarified timer modes and interrupts. in adc chapter, added "adc input equivalency diagram". in uart chapter, clarified interrupt behavior. in ssi chapter, corrected ssiclk in the figure "synchronous serial frame format (single transfer)" and clarified behavior of transmit bits in interrupt registers. in i 2 c chapter, corrected bit and register reset values for idle bit in i 2 c master control/status (i2cmcs) register. in usb chapter: C clarified that when the usb module is in operation, mosc must be provided with a clock source, and the system clock must be at least 30 mhz. C removed multtran bit from usb transmit hub address endpoint n (usbtxhubaddrn) and usb receive hub address endpoint n (usbrxhubaddrn) registers. C corrected description for the usb device resume interrupt mask (usbdrim) register. in analog comparators chapter, clarified internal reference programming. in pwm chapter, clarified pwm interrupt enable (pwminten) register description. in signal tables chapter, clarified vddc and ldo pin descriptions. in electrical characteristics chapter: C in maximum ratings table, deleted parameter "input voltage for a gpio configured as an analog input". C in recommended dc operating conditions table, corrected values for i oh parameter. C in jtag characteristics, table, corrected values for parameters "tck clock low time" and "tck clock high time". C in ldo regulator characteristics table, added clarifying footnote to c ldo parameter. C in system clock characteristics with adc operation table, added clarifying footnote to f sysadc parameter. C added "system clock characteristics with usb operation" table. C in sleep modes ac characteristics table, split parameter "time to wake from interrupt" into sleep mode and deep-sleep mode parameters. 41 july 03, 2014 texas instruments-production data stellaris lm3s9gn5 microcontroller table 1. revision history (continued) description revision date C in ssi characteristics table, corrected value for parameter "ssiclk cycle time". C in analog comparator characteristics table, added parameter "input voltage range" and corrected values for parameter "input common mode voltage range". C in analog comparator voltage reference characteristics table, corrected values for absolute accuracy parameters. C deleted table "usb controller dc characteristics". C in nominal power consumption table, added parameter for sleep mode. C in maximum current consumption section, changed reference value for mosc and temperature in tables that follow. C deleted table "external vddc source current specifications". additional minor data sheet clarifications and corrections. corrected "reset sources" table. added important note that rcc register must be written before rcc2 register. added a note that all gpio signals are 5-v tolerant when configured as inputs except for pb0 and pb1 , which are limited to 3.6 v. corrected lin mode bit names in uart interrupt clear (uarticr) register. corrected pin number for rst in table "connections for unused signals" (other pin tables were correct). in the "operating characteristics" chapter: C in the "thermal characteristics" table, the thermal resistance value was changed. C in the "esd absolute maximum ratings" table, the v esdcdm parameter was changed and the v esdmm parameter was deleted. the "electrical characteristics" chapter was reorganized by module. in addition, some of the recommended dc operating conditions, ldo regulator, clock, gpio, epi, adc, and ssi characteristics were finalized. additional minor data sheet clarifications and corrections. 9970 july 2011 started tracking revision history. 9538 march 2011 july 03, 2014 42 texas instruments-production data revision history about this document this data sheet provides reference information for the lm3s9gn5 microcontroller, describing the functional blocks of the system-on-chip (soc) device designed around the arm? cortex?-m3 core. audience this manual is intended for system software developers, hardware designers, and application developers. about this manual this document is organized into sections that correspond to each major feature. related documents the following related documents are available on the stellaris ? web site at www.ti.com/stellaris : stellaris? errata arm? cortex?-m3 errata cortex?-m3/m4 instruction set technical user's manual stellaris? boot loader user's guide stellaris? graphics library user's guide stellaris? peripheral driver library user's guide stellaris? rom users guide stellaris? usb library user's guide the following related documents are also referenced: arm? debug interface v5 architecture specification arm? embedded trace macrocell architecture specification ieee standard 1149.1-test access port and boundary-scan architecture this documentation list was current as of publication date. please check the web site for additional documentation, including application notes and white papers. 43 july 03, 2014 texas instruments-production data stellaris lm3s9gn5 microcontroller documentation conventions this document uses the conventions shown in table 2 on page 44. table 2. documentation conventions meaning notation general register notation apb registers are indicated in uppercase bold. for example, pborctl is the power-on and brown-out reset control register. if a register name contains a lowercase n, it represents more than one register. for example, srcrn represents any (or all) of the three software reset control registers: srcr0, srcr1 , and srcr2 . register a single bit in a register. bit two or more consecutive and related bits. bit field a hexadecimal increment to a register's address, relative to that module's base address as specified in table 2-4 on page 88. offset 0x nnn registers are numbered consecutively throughout the document to aid in referencing them. the register number has no meaning to software. register n register bits marked reserved are reserved for future use. in most cases, reserved bits are set to 0; however, user software should not rely on the value of a reserved bit. to provide software compatibility with future products, the value of a reserved bit should be preserved across a read-modify-write operation. reserved the range of register bits inclusive from xx to yy. for example, 31:15 means bits 15 through 31 in that register. yy:xx this value in the register bit diagram indicates whether software running on the controller can change the value of the bit field. register bit/field types software can read this field. the bit or field is cleared by hardware after reading the bit/field. rc software can read this field. always write the chip reset value. ro software can read or write this field. r/w software can read or write this field. writing to it with any value clears the register. r/wc software can read or write this field. a write of a 0 to a w1c bit does not affect the bit value in the register. a write of a 1 clears the value of the bit in the register; the remaining bits remain unchanged. this register type is primarily used for clearing interrupt status bits where the read operation provides the interrupt status and the write of the read value clears only the interrupts being reported at the time the register was read. r/w1c software can read or write a 1 to this field. a write of a 0 to a r/w1s bit does not affect the bit value in the register. r/w1s software can write this field. a write of a 0 to a w1c bit does not affect the bit value in the register. a write of a 1 clears the value of the bit in the register; the remaining bits remain unchanged. a read of the register returns no meaningful data. this register is typically used to clear the corresponding bit in an interrupt register. w1c only a write by software is valid; a read of the register returns no meaningful data. wo this value in the register bit diagram shows the bit/field value after any reset, unless noted. register bit/field reset value bit cleared to 0 on chip reset. 0 bit set to 1 on chip reset. 1 nondeterministic. - pin/signal notation pin alternate function; a pin defaults to the signal without the brackets. [ ] refers to the physical connection on the package. pin refers to the electrical signal encoding of a pin. signal july 03, 2014 44 texas instruments-production data about this document table 2. documentation conventions (continued) meaning notation change the value of the signal from the logically false state to the logically true state. for active high signals, the asserted signal value is 1 (high); for active low signals, the asserted signal value is 0 (low). the active polarity (high or low) is defined by the signal name (see signal and signal below). assert a signal change the value of the signal from the logically true state to the logically false state. deassert a signal signal names are in uppercase and in the courier font. an overbar on a signal name indicates that it is active low. to assert signal is to drive it low; to deassert signal is to drive it high. signal signal names are in uppercase and in the courier font. an active high signal has no overbar. to assert signal is to drive it high; to deassert signal is to drive it low. signal numbers an uppercase x indicates any of several values is allowed, where x can be any legal pattern. for example, a binary value of 0x00 can be either 0100 or 0000, a hex value of 0xx is 0x0 or 0x1, and so on. x hexadecimal numbers have a prefix of 0x. for example, 0x00ff is the hexadecimal number ff. all other numbers within register tables are assumed to be binary. within conceptual information, binary numbers are indicated with a b suffix, for example, 1011b, and decimal numbers are written without a prefix or suffix. 0x 45 july 03, 2014 texas instruments-production data stellaris lm3s9gn5 microcontroller 1 architectural overview texas instruments is the industry leader in bringing 32-bit capabilities and the full benefits of arm ? cortex ? -m-based microcontrollers to the broadest reach of the microcontroller market. for current users of 8- and 16-bit mcus, stellaris ? with cortex-m offers a direct path to the strongest ecosystem of development tools, software and knowledge in the industry. designers who migrate to stellaris benefit from great tools, small code footprint and outstanding performance. even more important, designers can enter the arm ecosystem with full confidence in a compatible roadmap from $1 to 1 ghz. for users of current 32-bit mcus, the stellaris family offers the industrys first implementation of cortex-m3 and the thumb-2 instruction set. with blazingly-fast responsiveness, thumb-2 technology combines both 16-bit and 32-bit instructions to deliver the best balance of code density and performance. thumb-2 uses 26 percent less memory than pure 32-bit code to reduce system cost while delivering 25 percent better performance. the texas instruments stellaris family of microcontrollersthe first arm cortex-m3 based controllers brings high-performance 32-bit computing to cost-sensitive embedded microcontroller applications. 1.1 overview the stellaris lm3s9gn5 microcontroller combines complex integration and high performance with the following feature highlights: arm cortex-m3 processor core high performance: 80-mhz operation; 100 dmips performance 384 kb single-cycle flash memory 64 kb single-cycle sram internal rom loaded with stellarisware ? software external peripheral interface (epi) advanced communication interfaces: uart, ssi, i2c, i2s, can, ethernet macwith mii, usb system integration: general-purpose timers, watchdog timers, dma, general-purpose i/os advanced motion control using pwms, fault inputs, and quadrature encoder inputs analog support: analog and digital comparators, analog-to-digital converters (adc), on-chip voltage regulator jtag and arm serial wire debug (swd) 100-pin lqfp package 108-ball bga package industrial (-40c to 85c) temperature range figure 1-1 on page 47 depicts the features on the stellaris lm3s9gn5 microcontroller. note that there are two on-chip buses that connect the core to the peripherals. the advanced peripheral bus (apb) bus is the legacy bus. the advanced high-performance bus (ahb) bus provides better back-to-back access performance than the apb bus. july 03, 2014 46 texas instruments-production data architectural overview figure 1-1. stellaris lm3s9gn5 microcontroller high-level block diagram 47 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller arm? cortex?-m3 (80mhz) nvic mpu flash (384kb) boot loader driverlib aes & crc ethernet boot loader rom dcode?bus icode?bus jtag/swd system control?and clocks (w/ precis. osc.) bus matrix system bus sram (64kb) system peripherals watchdog timer (2) dma general- purpose timer (4) gpios (72) external peripheral interface serial peripherals uart (3) usb?otg (fs?phy) i2c (2) ssi (2) ethernet mac can controller (2) i2s analog peripherals 12- bit?adc channels (16) analog comparator (3) motion control peripherals qei (2) pwm (8) advanced peripheral bus (apb) advanced high-performance bus (ahb) lm3s9gn5 in addition, the lm3s9gn5 microcontroller offers the advantages of arm's widely available development tools, system-on-chip (soc) infrastructure ip applications, and a large user community. additionally, the microcontroller uses arm's thumb?-compatible thumb-2 instruction set to reduce memory requirements and, thereby, cost. finally, the lm3s9gn5 microcontroller is code-compatible to all members of the extensive stellaris family; providing flexibility to fit precise needs. texas instruments offers a complete solution to get to market quickly, with evaluation and development boards, white papers and application notes, an easy-to-use peripheral driver library, and a strong support, sales, and distributor network. 1.2 target applications the stellaris family is positioned for cost-conscious applications requiring significant control processing and connectivity capabilities such as: gaming equipment network appliances and switches home and commercial site monitoring and control electronic point-of-sale (pos) machines motion control medical instrumentation remote connectivity and monitoring test and measurement equipment factory automation fire and security lighting control transportation 1.3 features the lm3s9gn5 microcontroller component features and general function are discussed in more detail in the following section. 1.3.1 arm cortex-m3 processor core all members of the stellaris product family, including the lm3s9gn5 microcontroller, are designed around an arm cortex-m3 processor core. the arm cortex-m3 processor provides the core for a high-performance, low-cost platform that meets the needs of minimal memory implementation, reduced pin count, and low power consumption, while delivering outstanding computational performance and exceptional system response to interrupts. 1.3.1.1 processor core (see page 69) 32-bit arm cortex-m3 architecture optimized for small-footprint embedded applications 80-mhz operation; 100 dmips performance outstanding processing performance combined with fast interrupt handling thumb-2 mixed 16-/32-bit instruction set delivers the high performance expected of a 32-bit arm core in a compact memory size usually associated with 8- and 16-bit devices, typically in the range of a few kilobytes of memory for microcontroller-class applications C single-cycle multiply instruction and hardware divide july 03, 2014 48 texas instruments-production data architectural overview C atomic bit manipulation (bit-banding), delivering maximum memory utilization and streamlined peripheral control C unaligned data access, enabling data to be efficiently packed into memory fast code execution permits slower processor clock or increases sleep mode time harvard architecture characterized by separate buses for instruction and data efficient processor core, system and memories hardware division and fast digital-signal-processing orientated multiply accumulate saturating arithmetic for signal processing deterministic, high-performance interrupt handling for time-critical applications memory protection unit (mpu) to provide a privileged mode for protected operating system functionality enhanced system debug with extensive breakpoint and trace capabilities serial wire debug and serial wire trace reduce the number of pins required for debugging and tracing migration from the arm7 processor family for better performance and power efficiency optimized for single-cycle flash memory usage ultra-low power consumption with integrated sleep modes 1.3.1.2 system timer (systick) (see page 112) arm cortex-m3 includes an integrated system timer, systick. systick provides a simple, 24-bit, clear-on-write, decrementing, wrap-on-zero counter with a flexible control mechanism. the counter can be used in several different ways, for example: an rtos tick timer that fires at a programmable rate (for example, 100 hz) and invokes a systick routine a high-speed alarm timer using the system clock a variable rate alarm or signal timerthe duration is range-dependent on the reference clock used and the dynamic range of the counter a simple counter used to measure time to completion and time used an internal clock-source control based on missing/meeting durations. 1.3.1.3 nested vectored interrupt controller (nvic) (see page 113) the lm3s9gn5 controller includes the arm nested vectored interrupt controller (nvic). the nvic and cortex-m3 prioritize and handle all exceptions in handler mode. the processor state is automatically stored to the stack on an exception and automatically restored from the stack at the end of the interrupt service routine (isr). the interrupt vector is fetched in parallel to the state saving, enabling efficient interrupt entry. the processor supports tail-chaining, meaning that 49 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller back-to-back interrupts can be performed without the overhead of state saving and restoration. software can set eight priority levels on 7 exceptions (system handlers) and 53 interrupts. deterministic, fast interrupt processing: always 12 cycles, or just 6 cycles with tail-chaining external non-maskable interrupt signal (nmi) available for immediate execution of nmi handler for safety critical applications dynamically reprioritizable interrupts exceptional interrupt handling via hardware implementation of required register manipulations 1.3.1.4 system control block (scb) (see page 115) the scb provides system implementation information and system control, including configuration, control, and reporting of system exceptions. 1.3.1.5 memory protection unit (mpu) (see page 115) the mpu supports the standard arm7 protected memory system architecture (pmsa) model. the mpu provides full support for protection regions, overlapping protection regions, access permissions, and exporting memory attributes to the system. 1.3.2 on-chip memory the lm3s9gn5 microcontroller is integrated with the following set of on-chip memory and features: 64 kb single-cycle sram 384 kb single-cycle flash memory up to 50 mhz; a prefetch buffer improves performance above 50 mhz internal rom loaded with stellarisware software: C stellaris peripheral driver library C stellaris boot loader C advanced encryption standard (aes) cryptography tables C cyclic redundancy check (crc) error detection functionality 1.3.2.1 sram (see page 299) the lm3s9gn5 microcontroller provides 64 kb of single-cycle on-chip sram. the internal sram of the stellaris devices is located at offset 0x2000.0000 of the device memory map. because read-modify-write (rmw) operations are very time consuming, arm has introduced bit-banding technology in the cortex-m3 processor. with a bit-band-enabled processor, certain regions in the memory map (sram and peripheral space) can use address aliases to access individual bits in a single, atomic operation. data can be transferred to and from the sram using the micro direct memory access controller (dma). 1.3.2.2 flash memory (see page 301) the lm3s9gn5 microcontroller provides 384 kb of single-cycle on-chip flash memory (above 50 mhz, the flash memory can be accessed in a single cycle as long as the code is linear; branches incur a one-cycle stall). the flash memory is organized as a set of 1-kb blocks that can be individually erased. erasing a block causes the entire contents of the block to be reset to all 1s. july 03, 2014 50 texas instruments-production data architectural overview these blocks are paired into a set of 2-kb blocks that can be individually protected. the blocks can be marked as read-only or execute-only, providing different levels of code protection. read-only blocks cannot be erased or programmed, protecting the contents of those blocks from being modified. execute-only blocks cannot be erased or programmed, and can only be read by the controller instruction fetch mechanism, protecting the contents of those blocks from being read by either the controller or by a debugger. 1.3.2.3 rom (see page 299) the lm3s9gn5 rom is preprogrammed with the following software and programs: stellaris peripheral driver library stellaris boot loader advanced encryption standard (aes) cryptography tables cyclic redundancy check (crc) error-detection functionality the stellaris peripheral driver library is a royalty-free software library for controlling on-chip peripherals with a boot-loader capability. the library performs both peripheral initialization and control functions, with a choice of polled or interrupt-driven peripheral support. in addition, the library is designed to take full advantage of the stellar interrupt performance of the arm cortex-m3 core. no special pragmas or custom assembly code prologue/epilogue functions are required. for applications that require in-field programmability, the royalty-free stellaris boot loader can act as an application loader and support in-field firmware updates. the advanced encryption standard (aes) is a publicly defined encryption standard used by the u.s. government. aes is a strong encryption method with reasonable performance and size. in addition, it is fast in both hardware and software, is fairly easy to implement, and requires little memory. the texas instruments encryption package is available with full source code, and is based on lesser general public license (lgpl) source. an lgpl means that the code can be used within an application without any copyleft implications for the application (the code does not automatically become open source). modifications to the package source, however, must be open source. crc (cyclic redundancy check) is a technique to validate a span of data has the same contents as when previously checked. this technique can be used to validate correct receipt of messages (nothing lost or modified in transit), to validate data after decompression, to validate that flash memory contents have not been changed, and for other cases where the data needs to be validated. a crc is preferred over a simple checksum (e.g. xor all bits) because it catches changes more readily. 1.3.3 external peripheral interface (see page 461) the external peripheral interface (epi) provides access to external devices using a parallel path. unlike communications peripherals such as ssi, uart, and i 2 c, the epi is designed to act like a bus to external peripherals and memory. the epi has the following features: 8/16/32-bit dedicated parallel bus for external peripherals and memory memory interface supports contiguous memory access independent of data bus width, thus enabling code execution directly from sdram, sram and flash memory blocking and non-blocking reads 51 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller separates processor from timing details through use of an internal write fifo efficient transfers using micro direct memory access controller (dma) C separate channels for read and write C read channel request asserted by programmable levels on the internal non-blocking read fifo (nbrfifo) C write channel request asserted by empty on the internal write fifo (wfifo) the epi supports three primary functional modes: synchronous dynamic random access memory (sdram) mode, traditional host-bus mode, and general-purpose mode. the epi module also provides custom gpios; however, unlike regular gpios, the epi module uses a fifo in the same way as a communication mechanism and is speed-controlled using clocking. synchronous dynamic random access memory (sdram) mode C supports x16 (single data rate) sdram at up to 50 mhz C supports low-cost sdrams up to 64 mb (512 megabits) C includes automatic refresh and access to all banks/rows C includes a sleep/standby mode to keep contents active with minimal power draw C multiplexed address/data interface for reduced pin count host-bus mode C traditional x8 and x16 mcu bus interface capabilities C similar device compatibility options as pic, atmega, 8051, and others C access to sram, nor flash memory, and other devices, with up to 1 mb of addressing in unmultiplexed mode and 256 mb in multiplexed mode (512 mb in host-bus 16 mode with no byte selects) C support of both muxed and de-muxed address and data C access to a range of devices supporting the non-address fifo x8 and x16 interface variant, with support for external fifo (xfifo) empty and full signals C speed controlled, with read and write data wait-state counters C chip select modes include ale, csn, dual csn and ale with dual csn C manual chip-enable (or use extra address pins) general-purpose mode C wide parallel interfaces for fast communications with cplds and fpgas C data widths up to 32 bits C data rates up to 150 mb/second july 03, 2014 52 texas instruments-production data architectural overview C optional "address" sizes from 4 bits to 20 bits C optional clock output, read/write strobes, framing (with counter-based size), and clock-enable input general parallel gpio C 1 to 32 bits, fifoed with speed control C useful for custom peripherals or for digital data acquisition and actuator controls 1.3.4 serial communications peripherals the lm3s9gn5 controller supports both asynchronous and synchronous serial communications with: 10/100 ethernet mac with media independent interface (mii) and ieee 1588 ptp hardware support two can 2.0 a/b controllers usb 2.0 otg/host/device three uarts with irda and iso 7816 support (one uart with modem flow control and status) two i 2 c modules two synchronous serial interface modules (ssi) integrated interchip sound (i 2 s) module the following sections provide more detail on each of these communications functions. 1.3.4.1 ethernet controller (see page 921) ethernet is a frame-based computer networking technology for local area networks (lans). ethernet has been standardized as ieee 802.3. this specification defines a number of wiring and signaling standards for the physical layer, two means of network access at the media access control (mac)/data link layer, and a common addressing format. the stellaris ethernet controller consists of a fully integrated media access controller (mac) and network physical (phy) interface and has the following features: conforms to the ieee 802.3-2002 specification multiple operational modes C full- and half-duplex 100 mbps C full- and half-duplex 10 mbps highly configurable C programmable mac address C promiscuous mode support 53 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller C crc error-rejection control C user-configurable interrupts media independent interface (mii) for connection to external 10/100 mbps phy transceivers ieee 1588 precision time protocol: provides highly accurate time stamps for individual packets efficient transfers using micro direct memory access controller (dma) C separate channels for transmit and receive C receive channel request asserted on packet receipt C transmit channel request asserted on empty transmit fifo 1.3.4.2 controller area network (see page 870) controller area network (can) is a multicast shared serial-bus standard for connecting electronic control units (ecus). can was specifically designed to be robust in electromagnetically noisy environments and can utilize a differential balanced line like rs-485 or twisted-pair wire. originally created for automotive purposes, it is now used in many embedded control applications (for example, industrial or medical). bit rates up to 1 mbps are possible at network lengths below 40 meters. decreased bit rates allow longer network distances (for example, 125 kbps at 500m). a transmitter sends a message to all can nodes (broadcasting). each node decides on the basis of the identifier received whether it should process the message. the identifier also determines the priority that the message enjoys in competition for bus access. each can message can transmit from 0 to 8 bytes of user information. the lm3s9gn5 microcontroller includes two can units with the following features: can protocol version 2.0 part a/b bit rates up to 1 mbps 32 message objects with individual identifier masks maskable interrupt disable automatic retransmission mode for time-triggered can (ttcan) applications programmable loopback mode for self-test operation programmable fifo mode enables storage of multiple message objects gluelessly attaches to an external can transceiver through the canntx and cannrx signals 1.3.4.3 usb (see page 957) universal serial bus (usb) is a serial bus standard designed to allow peripherals to be connected and disconnected using a standardized interface without rebooting the system. the lm3s9gn5 microcontroller supports three configurations in usb 2.0 full and low speed: usb device, usb host, and usb on-the-go (negotiated on-the-go as host or device when connected to other usb-enabled systems). the usb module has the following features: july 03, 2014 54 texas instruments-production data architectural overview complies with usb-if certification standards usb 2.0 full-speed (12 mbps) and low-speed (1.5 mbps) operation with integrated phy 4 transfer types: control, interrupt, bulk, and isochronous 32 endpoints C 1 dedicated control in endpoint and 1 dedicated control out endpoint C 15 configurable in endpoints and 15 configurable out endpoints 4 kb dedicated endpoint memory: one endpoint may be defined for double-buffered 1023-byte isochronous packet size vbus droop and valid id detection and interrupt efficient transfers using micro direct memory access controller (dma) C separate channels for transmit and receive for up to three in endpoints and three out endpoints C channel requests asserted when fifo contains required amount of data 1.3.4.4 uart (see page 689) a universal asynchronous receiver/transmitter (uart) is an integrated circuit used for rs-232c serial communications, containing a transmitter (parallel-to-serial converter) and a receiver (serial-to-parallel converter), each clocked separately. the lm3s9gn5 microcontroller includes three fully programmable 16c550-type uarts. although the functionality is similar to a 16c550 uart, this uart design is not register compatible. the uart can generate individually masked interrupts from the rx, tx, modem flow control, modem status, and error conditions. the module generates a single combined interrupt when any of the interrupts are asserted and are unmasked. the three uarts have the following features: programmable baud-rate generator allowing speeds up to 5 mbps for regular speed (divide by 16) and 10 mbps for high speed (divide by 8) separate 16x8 transmit (tx) and receive (rx) fifos to reduce cpu interrupt service loading programmable fifo length, including 1-byte deep operation providing conventional double-buffered interface fifo trigger levels of 1/8, 1/4, 1/2, 3/4, and 7/8 standard asynchronous communication bits for start, stop, and parity line-break generation and detection fully programmable serial interface characteristics C 5, 6, 7, or 8 data bits C even, odd, stick, or no-parity bit generation/detection 55 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller C 1 or 2 stop bit generation irda serial-ir (sir) encoder/decoder providing C programmable use of irda serial infrared (sir) or uart input/output C support of irda sir encoder/decoder functions for data rates up to 115.2 kbps half-duplex C support of normal 3/16 and low-power (1.41-2.23 s) bit durations C programmable internal clock generator enabling division of reference clock by 1 to 256 for low-power mode bit duration support for communication with iso 7816 smart cards full modem handshake support (on uart1) lin protocol support standard fifo-level and end-of-transmission interrupts efficient transfers using micro direct memory access controller (dma) C separate channels for transmit and receive C receive single request asserted when data is in the fifo; burst request asserted at programmed fifo level C transmit single request asserted when there is space in the fifo; burst request asserted at programmed fifo level 1.3.4.5 i 2 c (see page 795) the inter-integrated circuit (i 2 c) bus provides bi-directional data transfer through a two-wire design (a serial data line sda and a serial clock line scl). the i 2 c bus interfaces to external i 2 c devices such as serial memory (rams and roms), networking devices, lcds, tone generators, and so on. the i 2 c bus may also be used for system testing and diagnostic purposes in product development and manufacture. each device on the i 2 c bus can be designated as either a master or a slave. each i 2 c module supports both sending and receiving data as either a master or a slave and can operate simultaneously as both a master and a slave. both the i 2 c master and slave can generate interrupts. the lm3s9gn5 microcontroller includes two i 2 c modules with the following features: devices on the i 2 c bus can be designated as either a master or a slave C supports both transmitting and receiving data as either a master or a slave C supports simultaneous master and slave operation four i 2 c modes C master transmit C master receive july 03, 2014 56 texas instruments-production data architectural overview C slave transmit C slave receive two transmission speeds: standard (100 kbps) and fast (400 kbps) master and slave interrupt generation C master generates interrupts when a transmit or receive operation completes (or aborts due to an error) C slave generates interrupts when data has been transferred or requested by a master or when a start or stop condition is detected master with arbitration and clock synchronization, multimaster support, and 7-bit addressing mode 1.3.4.6 ssi (see page 753) synchronous serial interface (ssi) is a four-wire bi-directional communications interface that converts data between parallel and serial. the ssi module performs serial-to-parallel conversion on data received from a peripheral device, and parallel-to-serial conversion on data transmitted to a peripheral device. the ssi module can be configured as either a master or slave device. as a slave device, the ssi module can also be configured to disable its output, which allows a master device to be coupled with multiple slave devices. the tx and rx paths are buffered with separate internal fifos. the ssi module also includes a programmable bit rate clock divider and prescaler to generate the output serial clock derived from the ssi module's input clock. bit rates are generated based on the input clock and the maximum bit rate is determined by the connected peripheral. the lm3s9gn5 microcontroller includes two ssi modules with the following features: programmable interface operation for freescale spi, microwire, or texas instruments synchronous serial interfaces master or slave operation programmable clock bit rate and prescaler separate transmit and receive fifos, each 16 bits wide and 8 locations deep programmable data frame size from 4 to 16 bits internal loopback test mode for diagnostic/debug testing standard fifo-based interrupts and end-of-transmission interrupt efficient transfers using micro direct memory access controller (dma) C separate channels for transmit and receive C receive single request asserted when data is in the fifo; burst request asserted when fifo contains 4 entries C transmit single request asserted when there is space in the fifo; burst request asserted when fifo contains 4 entries 57 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller 1.3.4.7 inter-integrated circuit sound (i 2 s) interface (see page 833) the i 2 s interface is a configurable serial audio core that contains a transmit module and a receive module. the module is configurable for the i 2 s as well as left-justified and right-justified serial audio formats. data can be in one of four modes: stereo, mono, compact 16-bit stereo and compact 8-bit stereo. the transmit and receive modules each have an 8-entry audio-sample fifo. an audio sample can consist of a left and right stereo sample, a mono sample, or a left and right compact stereo sample. in compact 16-bit stereo, each fifo entry contains both the 16-bit left and 16-bit right samples, allowing efficient data transfers and requiring less memory space. in compact 8-bit stereo, each fifo entry contains an 8-bit left and an 8-bit right sample, reducing memory requirements further. both the transmitter and receiver are capable of being a master or a slave. the stellaris i 2 s interface has the following features: configurable audio format supporting i 2 s, left-justification, and right-justification configurable sample size from 8 to 32 bits mono and stereo support 8-, 16-, and 32-bit fifo interface for packing memory independent transmit and receive 8-entry fifos configurable fifo-level interrupt and dma requests independent transmit and receive mclk direction control transmit and receive internal mclk sources independent transmit and receive control for serial clock and word select mclk and sclk can be independently set to master or slave configurable transmit zero or last sample when fifo empty efficient transfers using micro direct memory access controller (dma) C separate channels for transmit and receive C burst requests C channel requests asserted when fifo contains required amount of data 1.3.5 system integration the lm3s9gn5 microcontroller provides a variety of standard system functions integrated into the device, including: direct memory access controller (dma) system control and clocks including on-chip precision 16-mhz oscillator july 03, 2014 58 texas instruments-production data architectural overview four 32-bit timers (up to eight 16-bit), with real-time clock capability eight capture compare pwm (ccp) pins two watchdog timers C one timer runs off the main oscillator C one timer runs off the precision internal oscillator up to 72 gpios, depending on configuration C highly flexible pin muxing allows use as gpio or one of several peripheral functions C independently configurable to 2, 4 or 8 ma drive capability C up to 4 gpios can have 18 ma drive capability the following sections provide more detail on each of these functions. 1.3.5.1 direct memory access (see page 344) the lm3s9gn5 microcontroller includes a direct memory access (dma) controller, known as micro-dma (dma). the dma controller provides a way to offload data transfer tasks from the cortex-m3 processor, allowing for more efficient use of the processor and the available bus bandwidth. the dma controller can perform transfers between memory and peripherals. it has dedicated channels for each supported on-chip module and can be programmed to automatically perform transfers between peripherals and memory as the peripheral is ready to transfer more data. the dma controller provides the following features: arm primecell ? 32-channel configurable dma controller support for memory-to-memory, memory-to-peripheral, and peripheral-to-memory in multiple transfer modes C basic for simple transfer scenarios C ping-pong for continuous data flow C scatter-gather for a programmable list of up to 256 arbitrary transfers initiated from a single request highly flexible and configurable channel operation C independently configured and operated channels C dedicated channels for supported on-chip modules C primary and secondary channel assignments C one channel each for receive and transmit path for bidirectional modules C dedicated channel for software-initiated transfers C per-channel configurable priority scheme C optional software-initiated requests for any channel two levels of priority 59 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller design optimizations for improved bus access performance between dma controller and the processor core C dma controller access is subordinate to core access C ram striping C peripheral bus segmentation data sizes of 8, 16, and 32 bits transfer size is programmable in binary steps from 1 to 1024 source and destination address increment size of byte, half-word, word, or no increment maskable peripheral requests interrupt on transfer completion, with a separate interrupt per channel 1.3.5.2 system control and clocks (see page 190) system control determines the overall operation of the device. it provides information about the device, controls power-saving features, controls the clocking of the device and individual peripherals, and handles reset detection and reporting. device identification information: version, part number, sram size, flash memory size, and so on power control C on-chip fixed low drop-out (ldo) voltage regulator C low-power options for microcontroller: sleep and deep-sleep modes with clock gating C low-power options for on-chip modules: software controls shutdown of individual peripherals and memory C 3.3-v supply brown-out detection and reporting via interrupt or reset multiple clock sources for microcontroller system clock C precision oscillator (piosc): on-chip resource providing a 16 mhz 1% frequency at room temperature ? 16 mhz 3% across temperature ? can be recalibrated with 7-bit trim resolution ? software power down control for low power modes C main oscillator (mosc): a frequency-accurate clock source by one of two means: an external single-ended clock source is connected to the osc0 input pin, or an external crystal is connected across the osc0 input and osc1 output pins. ? external crystal used with or without on-chip pll: select supported frequencies from 1 mhz to 16.384 mhz. ? external oscillator: from dc to maximum device speed C internal 30-khz oscillator: on chip resource providing a 30 khz 50% frequency, used during power-saving modes july 03, 2014 60 texas instruments-production data architectural overview flexible reset sources C power-on reset (por) C reset pin assertion C brown-out reset (bor) detector alerts to system power drops C software reset C watchdog timer reset C mosc failure 1.3.5.3 programmable timers (see page 536) programmable timers can be used to count or time external events that drive the timer input pins. each gptm block provides two 16-bit timers/counters that can be configured to operate independently as timers or event counters, or configured to operate as one 32-bit timer or one 32-bit real-time clock (rtc). timers can also be used to trigger analog-to-digital (adc) conversions. the general-purpose timer module (gptm) contains four gptm blocks with the following functional options: operating modes: C 16- or 32-bit programmable one-shot timer C 16- or 32-bit programmable periodic timer C 16-bit general-purpose timer with an 8-bit prescaler C 32-bit real-time clock (rtc) when using an external 32.768-khz clock as the input C 16-bit input-edge count- or time-capture modes C 16-bit pwm mode with software-programmable output inversion of the pwm signal count up or down eight capture compare pwm pins (ccp) daisy chaining of timer modules to allow a single timer to initiate multiple timing events adc event trigger user-enabled stalling when the microcontroller asserts cpu halt flag during debug (excluding rtc mode) ability to determine the elapsed time between the assertion of the timer interrupt and entry into the interrupt service routine. efficient transfers using micro direct memory access controller (dma) C dedicated channel for each timer C burst request generated on timer interrupt 61 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller 1.3.5.4 ccp pins (see page 544) capture compare pwm pins (ccp) can be used by the general-purpose timer module to time/count external events using the ccp pin as an input. alternatively, the gptm can generate a simple pwm output on the ccp pin. the lm3s9gn5 microcontroller includes eight capture compare pwm pins (ccp) that can be programmed to operate in the following modes: capture: the gp timer is incremented/decremented by programmed events on the ccp input. the gp timer captures and stores the current timer value when a programmed event occurs. compare: the gp timer is incremented/decremented by programmed events on the ccp input. the gp timer compares the current value with a stored value and generates an interrupt when a match occurs. pwm: the gp timer is incremented/decremented by the system clock. a pwm signal is generated based on a match between the counter value and a value stored in a match register and is output on the ccp pin. 1.3.5.5 watchdog timers (see page 583) a watchdog timer is used to regain control when a system has failed due to a software error or to the failure of an external device to respond in the expected way. the stellaris watchdog timer can generate an interrupt or a reset when a time-out value is reached. in addition, the watchdog timer is arm firm-compliant and can be configured to generate an interrupt to the microcontroller on its first time-out, and to generate a reset signal on its second time-out. once the watchdog timer has been configured, the lock register can be written to prevent the timer configuration from being inadvertently altered. the lm3s9gn5 microcontroller has two watchdog timer modules: watchdog timer 0 uses the system clock for its timer clock; watchdog timer 1 uses the piosc as its timer clock. the stellaris watchdog timer module has the following features: 32-bit down counter with a programmable load register separate watchdog clock with an enable programmable interrupt generation logic with interrupt masking lock register protection from runaway software reset generation logic with an enable/disable user-enabled stalling when the microcontroller asserts the cpu halt flag during debug 1.3.5.6 programmable gpios (see page 405) general-purpose input/output (gpio) pins offer flexibility for a variety of connections. the stellaris gpio module is comprised of nine physical gpio blocks, each corresponding to an individual gpio port. the gpio module is firm-compliant (compliant to the arm foundation ip for real-time microcontrollers specification) and supports 0-72 programmable input/output pins. the number of gpios available depends on the peripherals being used (see signal tables on page 1213 for the signals available to each gpio pin). up to 72 gpios, depending on configuration july 03, 2014 62 texas instruments-production data architectural overview highly flexible pin muxing allows use as gpio or one of several peripheral functions 5-v-tolerant in input configuration two means of port access: either advanced high-performance bus (ahb) with better back-to-back access performance, or the legacy advanced peripheral bus (apb) for backwards-compatibility with existing code fast toggle capable of a change every clock cycle for ports on ahb, every two clock cycles for ports on apb programmable control for gpio interrupts C interrupt generation masking C edge-triggered on rising, falling, or both C level-sensitive on high or low values bit masking in both read and write operations through address lines can be used to initiate an adc sample sequence pins configured as digital inputs are schmitt-triggered programmable control for gpio pad configuration C weak pull-up or pull-down resistors C 2-ma, 4-ma, and 8-ma pad drive for digital communication; up to four pads can sink 18-ma for high-current applications C slew rate control for the 8-ma drive C open drain enables C digital input enables 1.3.6 advanced motion control the lm3s9gn5 microcontroller provides motion control functions integrated into the device, including: eight advanced pwm outputs for motion and energy applications four fault inputs to promote low-latency shutdown two quadrature encoder inputs (qei) the following provides more detail on these motion control functions. 1.3.6.1 pwm (see page 1110) pulse width modulation (pwm) is a powerful technique for digitally encoding analog signal levels. high-resolution counters are used to generate a square wave, and the duty cycle of the square wave is modulated to encode an analog signal. typical applications include switching power supplies and motor control. the lm3s9gn5 pwm module consists of four pwm generator blocks and a control block. each pwm generator block contains one timer (16-bit down or up/down counter), two 63 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller comparators, a pwm signal generator, a dead-band generator, and an interrupt/adc-trigger selector. each pwm generator block produces two pwm signals that can either be independent signals or a single pair of complementary signals with dead-band delays inserted. each pwm generator has the following features: four fault-condition handling inputs to quickly provide low-latency shutdown and prevent damage to the motor being controlled one 16-bit counter C runs in down or up/down mode C output frequency controlled by a 16-bit load value C load value updates can be synchronized C produces output signals at zero and load value two pwm comparators C comparator value updates can be synchronized C produces output signals on match pwm signal generator C output pwm signal is constructed based on actions taken as a result of the counter and pwm comparator output signals C produces two independent pwm signals dead-band generator C produces two pwm signals with programmable dead-band delays suitable for driving a half-h bridge C can be bypassed, leaving input pwm signals unmodified can initiate an adc sample sequence the control block determines the polarity of the pwm signals and which signals are passed through to the pins. the output of the pwm generation blocks are managed by the output control block before being passed to the device pins. the pwm control block has the following options: pwm output enable of each pwm signal optional output inversion of each pwm signal (polarity control) optional fault handling for each pwm signal synchronization of timers in the pwm generator blocks synchronization of timer/comparator updates across the pwm generator blocks extended pwm synchronization of timer/comparator updates across the pwm generator blocks july 03, 2014 64 texas instruments-production data architectural overview interrupt status summary of the pwm generator blocks extended pwm fault handling, with multiple fault signals, programmable polarities, and filtering pwm generators can be operated independently or synchronized with other generators 1.3.6.2 qei (see page 1188) a quadrature encoder, also known as a 2-channel incremental encoder, converts linear displacement into a pulse signal. by monitoring both the number of pulses and the relative phase of the two signals, the position, direction of rotation, and speed can be tracked. in addition, a third channel, or index signal, can be used to reset the position counter. the stellaris quadrature encoder with index (qei) module interprets the code produced by a quadrature encoder wheel to integrate position over time and determine direction of rotation. in addition, it can capture a running estimate of the velocity of the encoder wheel. the input frequency of the qei inputs may be as high as 1/4 of the processor frequency (for example, 20 mhz for a 80-mhz system). the lm3s9gn5 microcontroller includes two qei modules providing control of two motors at the same time with the following features: position integrator that tracks the encoder position programmable noise filter on the inputs velocity capture using built-in timer the input frequency of the qei inputs may be as high as 1/4 of the processor frequency (for example, 12.5 mhz for a 50-mhz system) interrupt generation on: C index pulse C velocity-timer expiration C direction change C quadrature error detection 1.3.7 analog the lm3s9gn5 microcontroller provides analog functions integrated into the device, including: two 12-bit analog-to-digital converters (adc) with 16 analog input channels and a sample rate of one million samples/second three analog comparators 16 digital comparators on-chip voltage regulator the following provides more detail on these analog functions. 65 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller 1.3.7.1 adc (see page 608) an analog-to-digital converter (adc) is a peripheral that converts a continuous analog voltage to a discrete digital number. the stellaris adc module features 12-bit conversion resolution and supports 16 input channels plus an internal temperature sensor. four buffered sample sequencers allow rapid sampling of up to 16 analog input sources without controller intervention. each sample sequencer provides flexible programming with fully configurable input source, trigger events, interrupt generation, and sequencer priority. each adc module has a digital comparator function that allows the conversion value to be diverted to a comparison unit that provides eight digital comparators. the lm3s9gn5 microcontroller provides two adc modules with the following features: 16 shared analog input channels 12-bit precision adc with an accurate 10-bit data compatibility mode single-ended and differential-input configurations on-chip internal temperature sensor maximum sample rate of one million samples/second optional phase shift in sample time programmable from 22.5o to 337.5o four programmable sample conversion sequencers from one to eight entries long, with corresponding conversion result fifos flexible trigger control C controller (software) C timers C analog comparators C pwm C gpio hardware averaging of up to 64 samples digital comparison unit providing eight digital comparators converter uses an internal 3-v reference or an external reference power and ground for the analog circuitry is separate from the digital power and ground efficient transfers using micro direct memory access controller (dma) C dedicated channel for each sample sequencer C adc module uses burst requests for dma 1.3.7.2 analog comparators (see page 1096) an analog comparator is a peripheral that compares two analog voltages and provides a logical output that signals the comparison result. the lm3s9gn5 microcontroller provides three independent july 03, 2014 66 texas instruments-production data architectural overview integrated analog comparators that can be configured to drive an output or generate an interrupt or adc event. the comparator can provide its output to a device pin, acting as a replacement for an analog comparator on the board, or it can be used to signal the application via interrupts or triggers to the adc to cause it to start capturing a sample sequence. the interrupt generation and adc triggering logic is separate. this means, for example, that an interrupt can be generated on a rising edge and the adc triggered on a falling edge. the lm3s9gn5 microcontroller provides three independent integrated analog comparators with the following functions: compare external pin input to external pin input or to internal programmable voltage reference compare a test voltage against any one of the following voltages: C an individual external reference voltage C a shared single external reference voltage C a shared internal reference voltage 1.3.8 jtag and arm serial wire debug (see page 178) the joint test action group (jtag) port is an ieee standard that defines a test access port and boundary scan architecture for digital integrated circuits and provides a standardized serial interface for controlling the associated test logic. the tap, instruction register (ir), and data registers (dr) can be used to test the interconnections of assembled printed circuit boards and obtain manufacturing information on the components. the jtag port also provides a means of accessing and controlling design-for-test features such as i/o pin observation and control, scan testing, and debugging. texas instruments replaces the arm sw-dp and jtag-dp with the arm serial wire jtag debug port (swj-dp) interface. the swj-dp interface combines the swd and jtag debug ports into one module providing all the normal jtag debug and test functionality plus real-time access to system memory without halting the core or requiring any target resident code. the swj-dp interface has the following features: ieee 1149.1-1990 compatible test access port (tap) controller four-bit instruction register (ir) chain for storing jtag instructions ieee standard instructions: bypass, idcode, sample/preload, extest and intest arm additional instructions: apacc, dpacc and abort integrated arm serial wire debug (swd) C serial wire jtag debug port (swj-dp) C flash patch and breakpoint (fpb) unit for implementing breakpoints C data watchpoint and trace (dwt) unit for implementing watchpoints, trigger resources, and system profiling C instrumentation trace macrocell (itm) for support of printf style debugging C trace port interface unit (tpiu) for bridging to a trace port analyzer 67 july 03, 2014 texas instruments-production data stellaris ? lm3s9gn5 microcontroller 1.3.9 packaging and temperature industrial-range (-40c to 85c) 100-pin rohs-compliant lqfp package industrial-range (-40c to 85c) 108-ball rohs-compliant bga package 1.4 hardware details details on the pins and package can be found in the following sections: pin diagram on page 1211 signal tables on page 1213 operating characteristics on page 1297 electrical characteristics on page 1298 package information on page 1380 july 03, 2014 68 texas instruments-production data architectural overview 2 the cortex-m3 processor the arm? cortex?-m3 processor provides a high-performance, low-cost platform that meets the system requirements of minimal memory implementation, reduced pin count, and low power consumption, while delivering outstanding computational performance and exceptional system response to interrupts. features include: 32-bit arm ? cortex ? -m3 architecture optimized for small-footprint embedded applications 80-mhz operation; 100 dmips performance outstanding processing performance combined with fast interrupt handling thumb-2 mixed 16-/32-bit instruction set delivers the high performance expected of a 32-bit arm core in a compact memory size usually associated with 8- and 16-bit devices, typically in the range of a few kilobytes of memory for microcontroller-class applications C single-cycle multiply instruction and hardware divide C atomic bit manipulation (bit-banding), delivering maximum memory utilization and streamlined peripheral control C unaligned data access, enabling data to be efficiently packed into memory fast code execution permits slower processor clock or increases sleep mode time harvard architecture characterized by separate buses for instruction and data efficient processor core, system and memories hardware division and fast digital-signal-processing orientated multiply accumulate saturating arithmetic for signal processing deterministic, high-performance interrupt handling for time-critical applications memory protection unit (mpu) to provide a privileged mode for protected operating system functionality enhanced system debug with extensive breakpoint and trace capabilities serial wire debug and serial wire trace reduce the number of pins required for debugging and tracing migration from the arm7 processor family for better performance and power efficiency optimized for single-cycle flash memory usage ultra-low power consumption with integrated sleep modes the stellaris ? family of microcontrollers builds on this core to bring high-performance 32-bit computing to cost-sensitive embedded microcontroller applications, such as factory automation and control, industrial control power devices, building and home automation, and stepper motor control. 69 july 03, 2014 texas instruments-production data stellaris lm3s9gn5 microcontroller this chapter provides information on the stellaris implementation of the cortex-m3 processor, including the programming model, the memory model, the exception model, fault handling, and power management. for technical details on the instruction set, see the cortex?-m3/m4 instruction set technical user's manual. 2.1 block diagram the cortex-m3 processor is built on a high-performance processor core, with a 3-stage pipeline harvard architecture, making it ideal for demanding embedded applications. the processor delivers exceptional power efficiency through an efficient instruction set and extensively optimized design, providing high-end processing hardware including a range of single-cycle and simd multiplication and multiply-with-accumulate capabilities, saturating arithmetic and dedicated hardware division. to facilitate the design of cost-sensitive devices, the cortex-m3 processor implements tightly coupled system components that reduce processor area while significantly improving interrupt handling and system debug capabilities. the cortex-m3 processor implements a version of the thumb? instruction set based on thumb-2 technology, ensuring high code density and reduced program memory requirements. the cortex-m3 instruction set provides the exceptional performance expected of a modern 32-bit architecture, with the high code density of 8-bit and 16-bit microcontrollers. the cortex-m3 processor closely integrates a nested interrupt controller (nvic), to deliver industry-leading interrupt performance. the stellaris nvic includes a non-maskable interrupt (nmi) and provides eight interrupt priority levels. the tight integration of the processor core and nvic provides fast execution of interrupt service routines (isrs), dramatically reducing interrupt latency. the hardware stacking of registers and the ability to suspend load-multiple and store-multiple operations further reduce interrupt latency. interrupt handlers do not require any assembler stubs which removes code overhead from the isrs. tail-chaining optimization also significantly reduces the overhead when switching from one isr to another. to optimize low-power designs, the nvic integrates with the sleep modes, including deep-sleep mode, which enables the entire device to be rapidly powered down. july 03, 2014 70 texas instruments-production data the cortex-m3 processor figure 2-1. cpu block diagram 2.2 overview 2.2.1 system-level interface the cortex-m3 processor provides multiple interfaces using amba? technology to provide high-speed, low-latency memory accesses. the core supports unaligned data accesses and implements atomic bit manipulation that enables faster peripheral controls, system spinlocks, and thread-safe boolean data handling. the cortex-m3 processor has a memory protection unit (mpu) that provides fine-grain memory control, enabling applications to implement security privilege levels and separate code, data and stack on a task-by-task basis. 2.2.2 integrated configurable debug the cortex-m3 processor implements a complete hardware debug solution, providing high system visibility of the processor and memory through either a traditional jtag port or a 2-pin serial wire debug (swd) port that is ideal for microcontrollers and other small package devices. the stellaris implementation replaces the arm sw-dp and jtag-dp with the arm coresight?-compliant serial wire jtag debug port (swj-dp) interface. the swj-dp interface combines the swd and jtag debug ports into one module. see the arm? debug interface v5 architecture specification for details on swj-dp. for system trace, the processor integrates an instrumentation trace macrocell (itm) alongside data watchpoints and a profiling unit. to enable simple and cost-effective profiling of the system trace events, a serial wire viewer (swv) can export a stream of software-generated messages, data trace, and profiling information through a single pin. 71 july 03, 2014 texas instruments-production data stellaris ? 3 u l y d w h 3 h u l s k h u d o % x v l q w h u q d o ' d w d : d w f k s r l q w d q g 7 u d f h , q w h u u x s w v ' h e x j 6 o h h s , q v w u x p h q w d w l r q 7 u d f h 0 d f u r f h o o 7 u d f h 3 r u w , q w h u i d f h 8 q l w & |