![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 1 NUC946ADN 32-bit arm926ej-s based microcontroller product data sheet the information described in this document is the exclusive intellectual property of nuvoton technology corporation and shall not be reproduced without permission from nuvoton. nuvoton is providing this document only for refere nce purposes of arm926-based system design. nuvoton assumes no responsibility for errors or omissions. all data and specifications are subject to change without notice.. for additional information or questions, plea se contact: nuvoton technology corporation .
NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 2 table of contents 1 general description ......................................................................................................... 5 2 features ...................................................................................................................... ........ 6 3 pin diagram ................................................................................................................... ..... 9 4 pin assignment ................................................................................................................ 10 5 pin description ............................................................................................................... 14 5.1 p in d escription for i nterface ............................................................................................ 14 5.2 gpio s hare p in d escription ............................................................................................... 17 6 functional block ............................................................................................................ 19 7 functional description ................................................................................................. 20 7.1 arm926ej-s cpu core .................................................................................................... 20 7.2 s ystem m anager .............................................................................................................. 20 7.2.1 overview ............................................................................................................... 20 7.2.2 system memory map ............................................................................................... 20 7.2.3 address bus generation ........................................................................................... 24 7.2.4 ahb bus arbi tration ................................................................................................ 25 7.2.4.1 fixed priori ty mode ........................................................................................................... ..... 25 7.2.4.2 rotate priori ty mode .......................................................................................................... .... 26 7.2.5 power-on setting ................................................................................................... 27 7.2.6 system b ooting ...................................................................................................... 28 7.2.7 system global control registers map ......................................................................... 29 7.3 c lock c ontroller ............................................................................................................ 39 7.3.1 power manage ment ................................................................................................ 39 7.3.2 clock control re gisters map ..................................................................................... 41 7.4 e xternal b us i nterface ..................................................................................................... 56 7.4.1 overview ............................................................................................................... 56 7.4.2 functional de scription ............................................................................................. 56 7.4.2.1 sdram cont rolle r .............................................................................................................. .... 56 7.4.2.2 sdram components supported ............................................................................................... 57 7.4.2.3 ahb bus address mapping to sdram bus .................................................................................. 58 7.4.2.4 sdram power-up sequence .................................................................................................... 60 7.4.3 ebi register mapping .............................................................................................. 60 7.4.4 ebi register details ................................................................................................ 61 7.5 e thernet mac c ontroller ................................................................................................. 76 emc descrip tors ............................................................................................................... .... 77 7.5.1.1 rx buffer descriptor ............................................................................................................... 77 7.5.1.2 tx buffer de scripto r .......................................................................................................... ..... 81 7.5.2 emc register mapping ............................................................................................. 86 7.5.3 emc register details ............................................................................................... 88 7.5.4 operation notes .................................................................................................... 132 7.6 gdma c ontroller ........................................................................................................... 133 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 3 7.6.1 overview & features .............................................................................................. 133 7.6.2 gdma descriptor functi onal descr iption .................................................................... 134 7.6.2.1 descriptor fetc h functi on ..................................................................................................... 135 7.6.2.2 ordering function in descriptor fetch mode .............................................................................. 137 7.6.2.3 channel reset ..................................................................................................................... 138 7.6.2.4 non-descriptor fetch function ............................................................................................... 138 7.6.3 gdma regist er map ............................................................................................... 139 7.7 usb h ost c ontroller (usbh) ........................................................................................... 156 7.7.1 register mapping ................................................................................................... 157 7.7.2 register details ..................................................................................................... 159 7.8 usb 2.0 d evice c ontroller .............................................................................................. 205 7.8.1 usb device register group summary ....................................................................... 205 7.8.2 usb device control registers map ............................................................................ 205 7.8.3 usb device cont rol regi sters .................................................................................. 209 7.9 dma c ontroller (dmac) ................................................................................................. 251 7.9.1 dma controller registers map .................................................................................. 251 7.9.2 dmac regi sters ..................................................................................................... 252 7.10 f lash m emory i nterface c ontroller (fmi) ........................................................................... 258 7.10.1 fmi controller re gisters map ................................................................................... 258 7.10.2 register details ..................................................................................................... 259 7.11 uart c ontroller ............................................................................................................ 283 7.11.1 uart feature description ....................................................................................... 283 7.11.1.1 uart0 ......................................................................................................................... ... 283 7.11.1.2 uart1 ......................................................................................................................... ... 283 7.11.2 uart control re gisters map .................................................................................... 284 7.12 timer c ontroller .......................................................................................................... 296 7.12.1 general timer controller ......................................................................................... 296 7.12.2 timer control registers map .................................................................................... 297 7.13 a dvanced i nterrupt c ontroller ......................................................................................... 304 7.13.1 interrupt sources .................................................................................................. 305 7.13.2 aic registers map .................................................................................................. 306 7.14 g eneral -p urpose i nput /o utput (gpio) ................................................................................ 324 7.14.1 overview .............................................................................................................. 324 7.14.2 gpio multiplexed functions table ............................................................................. 325 7.14.3 gpio control re gisters map .................................................................................... 326 7.15 i 2 c s ynchronous s erial i nterface c ontroller ...................................................................... 340 7.15.1 i 2 c protocol ........................................................................................................... 341 7.15.2 i2c serial interface control registers map ................................................................. 344 7.16 u niversal s erial i nterface c ontroller (usi) ....................................................................... 352 7.16.1 usi timing diagram ............................................................................................... 353 7.16.2 usi control re gisters map....................................................................................... 354 7.16.3 timing diagram ..................................................................................................... 361 8 electrical specificat ions ........................................................................................... 362 8.1 a bsolute m aximum r atings ............................................................................................... 362 8.2 dc s pecifications ........................................................................................................... 363 8.2.1 digital dc characteristics ........................................................................................ 363 8.2.2 usb low-/full-speed dc elec trical specif ications ....................................................... 364 8.2.3 usb high-speed dc electr ical specifications .............................................................. 364 8.3 ac s pecifications ........................................................................................................... 365 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 4 8.3.1 reset ac char acteristics ........................................................................................ 365 8.3.2 clock input char acteristics ...................................................................................... 365 8.3.3 ebi/sdram interface ac characte ristics ................................................................... 366 8.3.4 ebi (rom/sram/external i/ o) ac charac teristics ....................................................... 367 8.3.5 sd host interface ac characte ristics ........................................................................ 368 8.3.6 memory stick interface ac characteristics ................................................................. 369 8.3.7 usi (spi/mw) interface ac characteristics ................................................................ 370 8.3.8 usb transceiver ac characteri stics .......................................................................... 371 8.3.9 emc rmii ac char acteristics ................................................................................... 372 9 package specificatio ns ............................................................................................... 374 10 revision history ........................................................................................................ 375 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 5 1 general description this chip is built around an ou tstanding cpu core: the 16/32 arm926e js risc processor designed by advanced risc machines, ltd. the arm926ejs core, o ffers 8k-byte i-cache and 8k-byte d-cache with mmu, is a low power, general-purpose integrated circuits. one 10/100 mb mac of ethernet controller is built-in to reduce total system cost. this micr o-controller is suitable for a high end, high performance and low cost related products as well as general purpose applications. the following integrated on-chip functions are described in detail in this document. main function of NUC946ADN ? arm926ejs cpu with 8k i-cache and 8k d-cache ? ethernet mac controllers ? external bus interface controller ? gdma controller ? timers and watchdog timer ? programmable i/o ports ? advanced interrupt controller ? usb host controller ? usb device controller ? usi (spi/microwire) controller ? i2c controller ? programmable pll system clock synthesizer ? sd/sdio host controller NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 6 2 features architecture ? efficient and powerful arm 926ejs core with fully 16/ 32-bit risc architecture ? little endian mode supported ? 8k-byte i-cache and 8k-byte d-cache with mmu external bus interface ? 8/16-bit external bus support for rom/sram , flash memory, sdram and external i/os ? programmable access cycle (0-7 wait cycle) ? four-word depth write buffer ethernet mac controller ? 100/10-mbps operation ? dma engine with burst mode ? mac tx/rx buffers (256 bytes tx, 256 bytes rx) ? full compliance with ieee standard 802.3 ? rmii interface only ? station management signaling ? on-chip cam (up to 16 destination addresses) ? full-duplex mode with pause feature ? long/short packet modes general dma controller ? 2-channel general dma for memory-to-memory data transfers without cpu intervention ? increments or decrements a source or destinat ion address in 8-bit or 16-bit data transfers ? 4-data burst mode uart ? two uart (serial i/o) blocks with interrupt-based operation ? support for 5-bit, 6-bit, 7-bit or 8- bit serial data transmit and receive ? programmable baud rates ? 1,1? or 2 stop bits ? odd or even parity ? break generation and detection ? parity, overrun and fr aming error detection ? x16 clock mode ? support for irda and two debug ports timers ? five programmable 24-bit time rs with 8-bit pre-scalar ? one programmable 20-bit watchdog timer ? one-short mode, period mode or toggle mode operation programmable i/os ? pins individually configurable to input, output or i/o mode for dedicated signals NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 7 ? i/o ports are programmable and configurable for multiple functions advanced interrupt controller ? 31 interrupt sources, including 3 external interrupt sources ? programmable normal or fast interrupt mode (irq, fiq) ? programmable as either edge-tri ggered or level-sensitive for 3 external interrupt sources ? programmable as either low-ac tive or high-active for 3 external interrupt sources ? priority methodology is encoded to allow for interrupt daisy-chaining ? automatically mask out the lower priority interrupt during interrupt nesting ? automatically clear the interrupt flag when the in terrupt source is progra mmed to be edge-triggered usb host controller with tranceiver ? fully compliant with usb revision 2.0 specification. ? enhanced host controller interface (ehci) revision 1.0 compatible. ? open host controller interface (o hci) revision 1.0 compatible. ? supports high-speed (480mbps), full-speed (12m bps) and low-speed (1.5mbps) usb devices. ? supports control, bulk, interrupt, isochronous and split transfers. ? built-in dma for real-time data transfer. ? support two ports (one port transceiver is shared with usb device controller) usb device controller with tranceiver ? compliant with usb version 2.0 specification. ? software control for de vice remote-wakeup. ? supports 6 configurable in/out endpoints in addition to control endpoint. each of these endpoints can be configures as in or out with isoc hronous, bulk or interrupt transfer. ? three different modes of operation of an in-endpoint (auto validation mode, manual validation mode, fly mode. ? supports endpoint maximum packet size up to 1024 bytes. pll ? supports one on-chip plls ? the external clock can be multiplied by on-chi p pll to provide high frequency system clock ? the input frequency range is 4-30mhz; 15mhz is preferred. ? programmable clock frequency i2c master ? support master mode only ? multi master operation ? clock stretching and wait state generation ? provide multi-byte transmit operation, up to 4 bytes can be transmitted in a single transfer ? software programmable acknowledge bit ? arbitration lost interrupt, with automatic transfer cancellation ? start/stop/repeated start/acknowledge generation ? start/stop/repeated start detection ? bus busy detection ? supports 7 bit addressing mode ? software mode i 2 c NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 8 universal serial interface (usi) ? support microwire/spi master mode ? support full/half duplex synchr onous serial data transfer ? variable length of transfer word up to 32 bits ? provide burst mode operation, transmit/receive can be executed up to four times in one transfer ? msb or lsb first data transfer ? receive and transmit on both rising or falling edge of serial clock independently flash memory interface (fmi) ? directly connect to secure digital (sd, mmc and sdio) flash memory card and memory stick (memory stick pro). ? supports dma function to accelerate the data tran sfer between the internal buffer, external sdram, and flash memory card. ? two 512 bytes internal buffe rs are embedded inside power management ? programmable clock enable fo r individual peripherals ? idle mode to halt arm core and keep peripheral working ? power-down mode to stop all clocks included external crystal oscillator. ? exit idle/power-down by interrupts operation voltage range ? 3.3 v for io buffer ? 1.8 v for core logic operation temperature range ? -40 ~+85 operating frequency ? up to 200 mhz for arm926ejs cpu package type ? 128-pin lqfp NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 9 3 pin diagram NUC946ADN pin diagram NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 10 4 pin assignment table 4.1 nuc946 pins assignment pad name nuc946 clock & reset ( 5 pins ) extal15m 63 xtal15m 64 extal48m0 123 xtal48m0 122 nreset 1 external bus interface ( 49 pins ) ma [21:0] 42 - 30 28 - 20 md [15:0] 60 ? 45 nwbe [1:0] / sdqm [1:0] 15 - 14 nscs0 11 nsras 18 nscas 19 mcke 16 nswe 17 mclk 12 nbtcs 10 necs0 9 noe 8 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 11 table 4.1 nuc946 pins assignment (continued) pad name nuc946 ethernet interface ( 10 pins ) phy_mdc / gpiof[0] 98 phy_mdio / gpiof[1] 99 phy_txd [1:0] / gpiof[3:2] 101-100 phy_txen / gpiof[4] 102 phy_refclk / gpiof[5] 103 phy_rxd [1:0] / gpiof[7:6] 105-104 phy_crsdv / gpiof[8] 106 phy_rxerr / gpiof[9] 107 usb interface ( 8 pins ) dp0 128 dn0 127 rext0 124 ovi 114 hds 116 dp1 121 dn1 120 rext1 116 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 12 table 4.1 nuc946 pins assignment (continued) pad name nuc946 uart ( 4 pins ) txd0 / gpioe[0] 110 rxd0 / gpioe[1] 111 txd1(b) / gpioe[2] 112 rxd1(b) / gpioe[3] 113 pad name nuc946 sdio(sd)/ memory stick ( 8 pins ) sd_cmd / ms_bs / gpiod[0] 86 sd_clk / ms_clk / gpiod[1] 87 sd_dat0 / ms_dat0 / gpiod[2] 88 sd_dat1 / ms_dat1 / gpiod[3] 89 sd_dat2 / ms_dat2 / gpiod[4] 90 sd_dat3 / ms_dat3 / gpiod[5] 91 sd_cdn / ms_cdn / gpiod[6] 93 sd_npwr / ms_npwr / gpiod[8] 94 pad name nuc946 i2c/usi(spi/mw) ( 4 pins ) scl0 / sfrm / gpiog[0] 2 sda0 / ssptxd / gpiog[1] 3 scl1 / sclk / gpiog[2] 4 sda1 / ssprxd / gpiog[3] 5 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 13 table 4.1 nuc946 pins assignment (continued) pad name nuc946 gpioc ( 11pins ) gpioc[2] 75 gpioc[11:4] 83:76 gpioc[14:13] 85,84 pad name nuc946 scan ( 5 pins ) scan[1:0] 68,67 scan[4:2] 73,72,71 pad name nuc946 miscellaneous ( 2 pins ) nirq 0 / gpioh 0 96 test 95 power/ground (22 pins) vdd18 7, 61,69,115 vdd33 29,44,92,108 vss 6,13,43,62,70,74,97,109 usbvss 118, 125 usbvdd (3.3v) 119,126 pllvdd (1.8v) 66 pllvss 65 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 14 5 pin description 5.1 pin description for interface pin name io type description clock & reset (5) extal15m i 15mhz external clock / crystal input for pll xtal15m o 15mhz crystal output extal48m0 i 48mhz external clock / crystal input for usb2.0 phy xtal48m0 o 48mhz crystal output nreset i system reset (low active) external bus interface (73) ma [21:0] o address bus of exte rnal memory and io devices. (ma[21:13] are set to input mode when nreset low active) md [16:0] io (d) data bus of external memory and io device (pull-down are programmable) nwbe [1:0] / sdqm [1:0] o write byte enable for specific device (necs [3:0]). data bus mask signal for sdram (nscs [1:0]), (low active) nscs [0] o sdram chip select for two external banks, (low active) nsras o row address strobe for sdram, (low active) nscas o column address strobe for sdram, (low active) nswe o sdram write enable, (low active) mcke o sdram clock enable mclk o system master clock out, sdram clock nbtcs o rom/flash chip select, (low active) necs [0] o external i/o chip select, (low active) noe o rom/flash, external memory output enable, (low active) ethernet rmii interface (10) phy_mdc o(is) rmii management data clock phy_mdio io(d) rmii management data i/o (pull-down is programmable) phy_txd [1:0] o(iu) rmii transmit data bus (pull-up are programmable) phy_txen o(id) rmii transmit enable (pull-down is programmable) phy_refclk o(id) rmii reference clock. (pull-down is programmable) phy_rxd [1:0] i(ou) rmii receive data bus (pull-up are programmable) phy_crsdv i(od) rmii carrier sense / receive data valid (pull-down is programmable) phy_rxerr i(od) rmii receive data error (pull-down is programmable) usb interface (8) dp0 io differential positi ve usb port0 io signal dn0 io differential negati ve usb port0 io signal rext0 a external resist er connect for port0 dp1 io differential positi ve usb port1 io signal dn1 io differential negati ve usb port1 io signal rext1 a external resist er connect for port1 ovi i usb over current detection signal hds i usb phy 0 device/host mo de select control signal NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 15 i2c/usi(spi/mw) interface (4) scl0 / sfrm ios i2c serial clock line 0. usi serial frame. (input with schmitt trigger) sda0 / ssptxd ios i2c serial data line 0. usi serial transmit data. (input with schmitt trigger) scl1 / sclk ios i2c serial clock line 1. usi serial clock. (input with schmitt trigger) sda1 / ssprxd ios i2c serial data line 1. usi serial receive data. (input with schmitt trigger) uart0/uart1/uart2 interface (4) txd0 io(d) uart0 transmit data. (pull-down is programmable) rxd0 io(d) uart0 receive data. (pull-down is programmable) txd1 io(d) uart1 transmit data (pull-down is programmable) rxd1 io(d) uart1 receive data (pull-down is programmable) sd/sdio/memory stick interface (8) sd0_cmd / ms0_bs io(u) sd/sdio mode ? command/response (spi mode ? data in) memory stick mode ? bus state. (pull-up is programmable) sd0_clk / ms0_clk io(u) sd/sdio mode ? clock; (spi mode ? clock) memory stick mode ? clock (pull-up is programmable) sd0_dat0 / ms0_dat0 io(u) sd/sdio mode ? data line bit 0; memory stick mode ? data line bit 0; (pull-up is programmable) sd0_dat1 / ms0_dat1 io(u) sd/sdio mode ? data line bit 1; memory stick mode ? data line bit 1; (pull-up is programmable) sd0_dat2 / ms0_dat2 io(u) sd/sdio mode ? data line bit 2; memory stick mode ? data line bit 2; (pull-up is programmable) sd0_dat3 / ms0_dat3 io(u) sd/sdio mode ? data line bit 3; memory stick mode ? data line bit 3; (pull-up is programmable) sd0_cdn / ms0_cdn io(u) sd/sdio mode ? card detect. memory stick mode ? card detect. (pull-up is programmable) sd_npwr io(u) sd/sdio power fet control signal output. (pull-up is programmable) NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 16 miscellaneous(2) nirq[0] i(ou) external interrupt request (pull-up is programmable) test i test mode this pin has to pull low in normal operation. power/ground vdd18 p core logic power (1.8v) vdd33 p io buffer power (3.3v) vss g io buffer and core ground (0v) usbvdd33 p usb port1 phy tr ansceiver power (3.3v) usbvss g usb port1 phy transceiver ground (0v) pllvdd18 p pll power (1.8v) pllvss18 g pll ground (0v) NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 17 5.2 gpio share pin description in this chip, there are gpioc~gpioh groups for general io control. all of gpio pins are shared with the other interface and define as the following gpio group shared pin function gpioc (11 pins) gpio interface gpioc[2] gpio only gpioc[4] gpio only gpioc[5] gpio only gpioc[6] gpio only gpioc[7] gpio only gpioc[8] gpio only gpioc[9] gpio only gpioc[10] gpio only gpioc[11] gpio only gpioc[13] gpio only gpioc[14] gpio only gpiod (8 pins) sd(sdio) / memory stick interface gpiod[0] sd_cmd / ms_bs gpiod[1] sd_clk / ms_clk gpiod[2] sd_dat0 / ms_dat0 gpiod[3] sd_dat1 / ms_dat1 gpiod[4] sd_dat2 / ms_dat2 gpiod[5] sd_dat3 / ms_dat3 gpiod[6] sd_cdn / ms_cdn gpiod[8] sd_npwr / ms_npwr gpioe (4 pins) uart interface gpioe[0] txd0 gpioe[1] rxd0 gpioe[2] txd1 gpioe[3] rxd1 gpiof (10 pins) rmii interface gpiof[0] phy_mdc gpiof [1] phy_mdio gpiof [3:2] phy_txd [1:0] gpiof [4] phy_txen gpiof [5] phy_refclk gpiof [7:6] phy_rxd [1:0] gpiof [8] phy_crsdv gpiof [9] phy_rxerr NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 18 gpiog (4 pins) i2c/usi gpiog[0] scl0 / sfrm gpiog[1] sda0 / ssptxd gpiog[2] scl1 / sclk gpiog[3] sda1 / ssprxd gpioh (1 pins) nirq interface gpioh[0] nirq[0] NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 19 6 functional block arm9ej-s mmu icache (8kb) dcache (8kb) arm926ej-s ebi gdma ethernet mac usb 2.0 host usb 2.0 device audio i/f ac97/i2s dmac pll x 1 clkgen gcr wdt/timer aic uart (x2) i2c/spi gpio usb 2.0 tranceiver usb 2.0 tranceiver amba peripheral fmi (sd/ms) nu c 94 6 ad n NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 20 7 functional description 7.1 arm926ej-s cpu core the arm926ej-s cpu core is a member of the arm9 family of general-purpose microprocessors. the arm926ej-s cpu core supports the 32-bit arm and 16-bi t thumb instruction sets, enabling the user to trade off between high performance and high code density. the arm926ej-s processor has a harvard cached architecture with mmu. 7.2 system manager 7.2.1 overview the system manager has the following functions. ? system memory map ? the width of external memory address ? data bus connection wi th external memory ? product identifier register ? bus arbitration ? pll module ? clock select register ? power-on setting 7.2.2 system memory map this chip provides 2g bytes memory space (0 x0000_0000~0x7fff_ffff) for the sdram, ram, rom and io devices, 192m bytes space (0xb000_0000~0xbbff_ffff) fo r on-chip peripherals and the other memory spaces are reserved. the size and location of each sdram memory bank is determined by the register settings for ?current bank base address pointer? and ?current bank size? (sdconf0 and sdconf1). pl ease note that when setting the bank control registers, the address boundaries of consecutive banks must not be overlapped. except on-chip peripherals, the star t address of each memory bank is not fixed. you can use bank control registers to assign a specific bank start address by setting the bank?s base poin ter (13 bits). the address resolution is 256k bytes. the bank?s start address is defined as ?base pointer << 18? and the bank?s size is ?current bank size?. (ext0con) the cpu booting start address (from external rom) is fixed at address 0x0000_0000 after reset or power- on. in the event of an access request to an address outside any programmed bank size, an abort signal is generated. the maximum accessible memo ry size of each external io bank is 8m bytes, and 128m bytes on sdram banks. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 21 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 22 address space token modules 0x0000_0000 ? 0x7fff_ffff ------ ebi(sdram, rom, ram, io) memory space 0x8000_0000 ? 0xafff_ffff ------ reserved shadow of ebi memory space(0x0000_0000~0x2fff_ffff) 0xb000_0000 ? 0xb000_01ff gcr_ba system global control registers 0xb000_0200 ? 0xb000_02ff clk_ba clock control registers 0xb000_1000 ? 0xb000_1fff ebi_ba ebi control registers 0xb000_3000 ? 0xb000_3fff emc_ba ethernet mac control registers 0xb000_4000 ? 0xb000_4fff ------ reserved 0xb000_5000 ? 0xb000_5fff usbh_ba ehci usb host control registers 0xb000_6000 ? 0xb000_6fff usbd_ba usb device control registers 0xb000_7000 ? 0xb000_7fff usbo_ba ohci usb host control registers 0xb000_8000 ? 0xb000_8fff ------ reserved 0xb000_9000 ? 0xb000_9fff ------ reserved 0xb000_a000 ? 0xb000_afff ------ reserved 0xb000_b000 ? 0xb000_bfff ------ reserved 0xb000_c000 ? 0xb000_cfff dmac_ba dma controller registers 0xb000_d000 ? 0xb000_dfff fmi_ba flash memory interface control registers NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 23 address space token modules 0xb800_0000 ? 0xb800_00ff uart0_ba uart 0 control registers (tx,rx for console) 0xb800_0100 ? 0xb800_01ff uart1_ba uart 1 control registers (tx,rx) 0xb800_0200 ? 0xb800_02ff ------ reserved 0xb800_0300 ? 0xb800_03ff ------ reserved 0xb800_0400 ? 0xb800_04ff ------ reserved 0xb800_1000 ? 0xb800_1fff tmr_ba timer control registers 0xb800_2000 ? 0xb800_2fff aic_ba interrupt controller registers 0xb800_3000 ? 0xb800_3fff gpio_ba gpio control registers 0xb800_4000 ? 0xb800_4fff ------ reserved 0xb800_5000 ? 0xb800_5fff ------ reserved 0xb800_6000 ? 0xb800_60ff i2c0_ba i2c 0 control register 0xb800_6100 ? 0xb800_61ff i2c1_ba i2c 1 control register 0xb800_6200 ? 0xb800_62ff usi_ba universal serial interface register (usi) 0xb800_7000 ? 0xb800_7fff reserved 0xb800_8000 ? 0xb800_8fff ------ reserved 0xb800_9000 ? 0xb800_9fff ------ reserved 0xb800_a000 ? 0xb800_afff ------ reserved NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 24 7.2.3 address bus generation the address bus generation is depend ed on the required data bus width (dbwd) and address bus alignment control bit (adrs) of each io bank. the maximu m accessible memory size of ea ch external io bank is 32m bytes. (ext0con) table 7.2.1 address bus generation guidelines (when adrs bit = 0) data bus external address pins maximum accessible width ma [21:0] memory size 8-bit ma21 ? ma0 (internal) 32m bytes 16-bit ma22 ? ma1 (internal) 32m bytes (16m half-words) table 7.2.2 address bus generation guidelines (when adrs bit = 1) data bus external address pins maximum accessible width ma [21:0] memory size 8-bit ma21 ? ma0 (internal) 32m bytes 16-bit ma21 ? ma0 (internal) 32m bytes, ma[0] ignored (16m half-words) NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 25 7.2.4 ahb bus arbitration the system bus is ahb-compliant an d supports modules with standard ahb master or slave interfaces. the ahb arbiter has two priority-decision modes, i.e., th e fixed priority mode and the rotate priority mode. in the rotate priority mode, there are three types for ahb-master bus. the selection of modes and types is determined on the prtmod0 and prtmod1 bits in the arbitration control register. prtmod0 is used to control the fixed priority of ahb1 (cpu ahb-lite) bus and prtmod1 is used to control the fixed priority of ahb2 master bus. 7.2.4.1 fixed priority mode fixed priority mode is selected if prtmodx = 0. the order of priorities on the ahb mastership among the on-chip master modules, listed in table 7.2.3, is fixe d. if two or more master modules request to ahb at the same time, the mastership is always gran ted to the module with the highest priority. table 7.2.3 ahb bus priority order in fixed priority mode priority sequence prtmod0 = 0 ahb1 bus prtmod1 = 0 ahb2 bus 1 (lowest) arm cpu instruction ahb bridge 2 arm cpu data --- 3 --- --- 4 --- sdio(fmi) 5 --- usb device 6 --- usb host 7 --- emc controller 8 --- --- 9 (highest) --- the arm core normally has the lowest priority under the fixed priority mode; however, this chip provides a mechanism to raise the priority to th e highest. if the ipen bit (bit-1 of arbitration control register) is set to 1, the ipact bit (bit-2 of arbitration control register) will be automatically set to 1 while an unmasked external interrupt occurs. under this circumstance, the arm core gains the highest ahb priority. the programmer can recover the original priority order by directly writing ?0? to clear the ipact bit. for example, this can be done that at the end of an interrupt servic e routine. note that ipact only can be automatically set to 1 by an external interrupt when ipen = 1. it will not take effect if a programmer to directly write 1 to ipact to raise arm core?s ahb priority. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 26 7.2.4.2 rotate priority mode rotate priority mode is selected if prtmodx = 1. the ahb arbiter uses a round robin arbitration scheme by which every master module can gain the bus ownership in turn. for ahb2 dma master bus, the audio and lcd display, have the higher priority in the rotate type. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 27 7.2.5 power-on setting after power on reset, power-on se tting registers are latched from ebi address pins (ma [21:13]) to configure this chip. power-on setting pin booting device select ma [21:20] internal system clock select ma17 gpio pin configuration select ma [16:14] usb phy0 mode select hds ma [21:20] booting device select ma[21:20] booting device pull-down pull-down spi flash rom pull-down pull-up reserved pull-up pull-down usb isp pull-up pull-up nor-type flash rom ma19 pull-up is necessary ma18 can either pull-up or pull-down ma17 internal system clock select if pin ma17 is pull-down, the extern al clock from extal15m pin is se rved as internal system clock. if pin ma17 is pull-up, the pll output clock is used as internal system clock. ma [16:14] gpio pin configuration select ma[16:14] state gpio pin function ma14 pull-down gpioc/d/e group select pull-up uart group select ma15 pull-down gpiof group select pull-up rmii group select ma16 pull-down gpioi group select pull-up reserved ma13 pull-up is necessary hds: usb phy0 mode select hds usb phy0 mode pull-down usb20 host pull-up usb20 device NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 28 7.2.6 system booting NUC946ADN supports four kinds of syst em booting devices, which including (1) spi flash rom (2) usb isp (3) nor-type flash rom booting device select ma[21:20] booting device pull-down pull-down spi flash rom pull-down pull-up reserved pull-up pull-down usb isp pull-up pull-up nor-type flash rom NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 29 7.2.7 system global control registers map register address r/w description reset value gcr_ba = 0xb000_0000 pdid 0xb000_0000 r product identifier register 0xxx90_0910 pwron 0xb000_0004 r/w power-on se tting register n/a arbcon 0xb000_0008 r/w arbitration control register 0x0000_0000 mfsel 0xb000_000c r/w multiple function pin select register 0x0800_0000 ebidpe 0xb000_0010 r/w ebi data pin pull-up /down enable register 0xffff_ffff gpiocpe 0xb000_0018 r/w gpioc pin pull-up/down enable register 0x0000_7fff gpiodpe 0xb000_001c r/w gpiod pin pull-up/d own enable register 0x0000_07ff gpioepe 0xb000_0020 r/w gpioe pin pull-up/down enable register 0x0000_3fff gpiofpe 0xb000_0024 r/w gpiof pin pull-up/down enable register 0x0000_03ff gpiogpe 0xb000_0028 r/w gpiog pin pull-up/d own enable register 0x0001_ffff gpiohpe 0xb000_002c r/w gpioh pin pull-up/d own enable register 0x0000_00ff gtmp1 0xb000_0034 r/w general temporary register 1 n/a gtmp2 0xb000_0038 r/w general temporary register 2 n/a gtmp3 0xb000_003c r/w general temporary register 3 n/a NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 30 product identifier register pdid this register is for only read and enables software to recognize certain characterist ics of the chip id and the version number. register address r/w description reset value pdid 0xb000_0000 r product iden tifier register 0xxx90_0910 31 30 29 28 27 26 25 24 version 23 22 21 20 19 18 17 16 chpid 15 14 13 12 11 10 9 8 chpid 7 6 5 4 3 2 1 0 chpid bits descriptions [31:24] version version of chip 02: version c [23:0] chipid chip identifier the NUC946ADN chip identifier is 0x90_0910. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 31 power-on setting register pwron this register latches the chip power-on setti ng from ebi address bus during chip reset. register address r/w description reset value pwron 0xb000_0004 r/w power-on se tting register undefined 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved usbden usbhd reserve d 7 6 5 4 3 2 1 0 booting device select reserved gpiosel reserved pll bits descriptions [0] pll internal system clock select (read/write) power-on value latched from ma17 0= the external clock from extal15m pin is served as internal system clock. 1= the pll output clock is used as internal system clock. [3:2] gpiosel gpio pin configuration select(read only) latched pin h/l gpio pin function [1] ma14 0 gpioc/d/e 1 uart [2] ma15 0 gpiof 1 rmii [7:6] booting device select booting device select (read only) these two bits are power-on reset from ma[21:20] booting device select [7:6] booting device 0 0 spi flash rom 0 1 reserved 1 0 usb isp 1 1 nor-type flash rom NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 32 [9] usbhd usb phy0 mode select (read/write) this bit is power-on reset from hds usbhd usb phy0 mode hds pin 0 usb20 device external pull-up 1 usb20 host external pull-down [10] usbden usb phy0 enable control for usb device mode (read/write) this bit is only active when th e usbhd bit be zero (device mode) usbden usb phy0 enable 0 set device phy at se0 (not active to external host) 1 set device phy controlled by the utmi interface of the usb device controller NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 33 arbitration control register (arbcon) register address r/w description reset value arbcon 0xb000_0008 r/w arbitration control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved dgmask ipact ipen prtmod1 prtmod0 bits descriptions [4] dgmask default grant master mask control 0 = ahb-bridge always be the default grant master (default) 1 = no default grant master on ahb-2 bus [3] ipact interrupt priority active when ipen =?1?, this bit is set when the arm core has an unmasked interrupt request. this bit is available only when the prtmod1 =0 and prtmod0 =0. [2] ipen interrupt priority enable bit 0 = the arm core has the lowest priority. 1 = enable to raise the arm core priority to second this bit is available only when the prtmod =0 and prtmod0 =0. [1] prtmod1 priority mode select for ahb2 (ahb master bus) 0 = fixed priority mode (default) 1 = rotate priority mode [0] prtmod0 priority mode select for ahb1 (cpu ahb-lite bus) 0 = fixed priority mode (default) 1 = rotate priority mode NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 34 multiple function pin select register (mfsel) register address r/w description reset value mfsel 0xb000_000c r/w multiple function pin select register 0x0800_0000 31 30 29 28 27 26 25 24 reserved usbphy0 reserved gpselh 23 22 21 20 19 18 17 16 reserved reserved gpselg 15 14 13 12 11 10 9 8 gpselg reserved reserved reserved gpsele 7 6 5 4 3 2 1 0 gpseld gpselc gpself reserved bits descriptions [29:28] usbphy0 usb phy0 select control register 00 : normal usb operation mode (default) [25:24] gpselh gpioh pin function select control register pin gpselh[24] gpio pin function gpioh[0] 0 gpioh[0] 1 nirq[0] gpselg [25:24] default value is 0 for gpioh group. [23:22] [17:14] gpselg gpiog pin function select control register pin gpselg[17:16] gpio pin function gpiog[3:2] 00 gpiog[3:2] 01 i2c line1 10 usi interface 11 reserved pin gpselg[15:14] gpio pin function gpiog[1:0] 00 gpiog[1:0] 01 i2c line0 10 usi interface 11 reserved see gpio shared pin description for more detail gpselg [23:22], [17:14] default value is 0, gpiog group. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 35 [9:8] gpsele gpioe pin function select control register see gpio shared pin description for more detail gpsele [9:8] default value is 0 for gpioe group. gpio pin function pin gpsele[9] gpioe[3:2] 0 gpioe[3:2] 1 uart1 pin gpsele[8] gpioe[1:0] 0 gpioe[1:0] 1 uart0 [7:4] gpseld gpiod pin function select control register pin gpseld[7:6] gpio pin function gpiod[8], gpiod[6:5] 00 gpiod[8], gpiod[6:5] 01 reserved 10 sd 0 interface 11 memory stick 0 pin gpseld[5:4] gpio pin function gpiod[4:0] 00 gpiod[4:0] 01 reserved 10 sd 0 interface 11 memory stick 0 see gpio shared pin description for more detail gpseld[7:4] default value is depend on power-on setting [3:2] gpselc gpioc pin function select control register pin gpselc[3:2] gpio pin function gpioc[14:13], gpioc[11:4], gpioc[2] 00 gpioc[14:13], gpioc[11:4], gpioc[2] 01 reserved 10 reserved 11 reserved see gpio shared pin description for more detail gpselc[3:2] default value is depend on power-on setting [1] gpself gpiof pin function select control register pin gpself[1] gpio pin function gpiof[9:0] 0 gpiof[9:0] 1 rmii interface see gpio shared pin description for more detail gpself[1] default value is depend on power-on setting NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 36 ebi data pin pull-up/down enable register (ebidpe) gpioc~gpioi pin pull-up/down enable register (gpiocpe~gpioipe) these registers are used to control the io pins to be internal pull-up or down, wh ich can avoid the input pins floating if there is no external resistors. register address r/w description reset value ebidpe 0xb000_0010 r/w ebi data pin pull-do wn enable register 0xffff_ffff --------- 0xb000_0014 r/w reserved n/a gpiocpe 0xb000_0018 r/w gpioc pin pull-up enable register 0x0000_ffff gpiodpe 0xb000_001c r/w gpiod pin pull-up enable register 0x0000_07ff gpioepe 0xb000_0020 r/w gpioe pin pull-up/down enable register 0x0000_3fff gpiofpe 0xb000_0024 r/w gpiof pin pull-up/down enable register 0x0000_03ff gpiogpe 0xb000_0028 r/w gpiog pin pull-up/down enable register 0x0001_ffff gpiohpe 0xb000_002c r/w gpioh pin pull-up enable register 0x0000_00ff 31 30 29 28 27 26 25 24 ppe 23 22 21 20 19 18 17 16 ppe 15 14 13 12 11 10 9 8 ppe 7 6 5 4 3 2 1 0 ppe bits descriptions [31:0] ppe pin pull-down enable register 1 = disable the pull-high/down fo r each relative pin (default) 0 = enable the pull-high/down for each relative pin NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 37 register descriptions ebidpe ebi data pin pull-down enable register ppe[15:0] controls the pull-down of the ebi data bus[15:0] ppe[31:16] are reserved in this register. gpiocpe gpioc pin pull-up enable register ppe[31:15], ppe[12], ppe[3] and ppe[1:0] are reserved in this register ppe[14:13], ppe[11:4] and ppe[2] contro l the pull-up of the related gpioc signals. gpiodpe gpiod pin pull-up enable register ppe[31:9] and ppe[7] are reserved in this register ppe[8] and ppe[6:0] control the pull-up of the related gpiod signals. gpioepe gpioe pin pull-up/down enable register ppe[31:4] are reserved in this register ppe[3:0] controls the pull-up/down of the gpioe[3:0] pull-down : gpioe[3:0] gpiofpe gpiof pin pull-up/down enable register ppe[31:10] is reserved in this register ppe[9:0] controls the pull-up/down of the gpiof[9:0] pull-down : gpiof[9:8], gpiof[5:4], gpiof[1] pull-up : gpiof[7:6], gpiof[3:2] no action : gpiof[0] gpiogpe gpiog pin pull-up/down enable register ppe[31:4] are reserved in this register ppe[3:0] controls the pull-up of the gpiog[3:0] pull-down : gpiog[3:0] gpiohpe gpioh pin pull-up enable register ppe[31:1] is reserved in this register ppe[0] controls the pull-up of the gpioh[0] 1 = disable the pull-high/dow n for each relative pin 0 = enable the pull-high/down for each relative pin NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 38 general temporary register 1 ~ 3 (gtmp1 ~gtmp3) register address r/w description reset value gtmp1 0xb000_0034 r/w general tempor ary register 1 undefined gtmp2 0xb000_0038 r/w general tempor ary register 2 undefined gtmp3 0xb000_003c r/w general tempor ary register 3 undefined 31 30 29 28 27 26 25 24 data 23 22 21 20 19 18 17 16 data 15 14 13 12 11 10 9 8 data 7 6 5 4 3 2 1 0 data bits descriptions [31:0] data general temporary data NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 39 7.3 clock controller the clock controller generates all clocks for display, audio, cpu, amba and all the engine modules. in this chip includes two pll modules. the clock source for each module is come from the pll, or from the external crystal input directly. the clken register controls the ip clock on or off individually, and the clkdiv register controls the divider setting. the register can also be used to control the clock enable or disable for power management control. 7.3.1 power management this chip provides three power management scenari os to reduce power cons umption. the peripheral clocks can be enabled / disabled individually by controlling the corresponding bit in clksel control register. software can turn-off the unused module s? clock for power saving. it also provides idle and power-down modes to reduce the power consumption. idle mode if the idle bit in power management control register (pmcon) is set, the arm core clock source will be halted after 256 cycles, and then the arm core will stop. the ahb or apb clocks are still active except the clock to cache controller and arm core. this arm core will exit from this mode when a nirq or nfiq signals from any peripheral , such as keypad and timer overflow interrupts. the memory controller can also be forced to enter idle state if both the midle and idle bits are set. fout (pll) hclk idle cpuclk idle period hclk case1. idle=1, pd=0, midle=0 clkidle 256 clocks NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 40 fout (pll) hclk idle cpuclk idle period hclk case2. idle=1, pd=0, midle=1 clkidle 256 clocks power-down mode the mode provides the minimum power consumption. when the system is not working or waiting an external event, software can write pd bit to turn off all the clocks includes system crystal oscillator and pll to let arm core to enter sleep mode after 256 clock cycles. in this state, all peripherals are also in sleep mode since the clock source is stopped. this system will exit from this mode when external interrupts ( nirq signals) are detected; this chip provides external interrupts, usb device, rtc and keypad to wakeup the clock. ahb hclk case3. idle=0, pd=1, midle=0 extal pd clkidle 65536 clocks hclk 256 clocks apb pclk NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 41 7.3.2 clock control registers map register address r/w description reset value clk_ba = 0xb000_0200 clken 0xb000_0200 r/w clock enable register 0x0408_0834 clksel 0xb000_0204 r/w clock select register 0x0000_0ffx clkdiv 0xb000_0208 r/w clock divider control register 0x0400_0000 pllcon0 0xb000_020c r/w pll control register 0 0x0000_2b63 pmcon 0xb000_0214 r/w power management control register 0x0000_0000 irqwakecon 0xb000_0218 r/w irq wakeup control register 0x0000_0000 irqwakeflag 0xb000_021c r/w irq wakeup flag register 0x0000_0000 ipsrst 0xb000_0220 r/w ip software reset register 0x0000_0000 clken1 0xb000_0224 r/w clock enable register 0x0000_0000 clkdiv1 0xb000_0228 r/w clock divider control 1 register 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 42 clock enable register (clken) register address r/w description reset value clken 0xb000_0200 r/w clock enable register 0x0408_0834 31 30 29 28 27 26 25 24 i2c1 i2c0 usi reserved wdt reserved 23 22 21 20 19 18 17 16 timer4 timer3 timer2 timer1 timer0 reserved reserved 15 14 13 12 11 10 9 8 reserved uart1 uart0 reserved usbh usbd 7 6 5 4 3 2 1 0 emc reserved dmac fmi reserved bits descriptions [31] i2c1 i2c interface 1 clock enable bit 0 = disable i2c-1 clock 1 = enable i2c-1 clock [30] i2c0 i2c interface 0 clock enable bit 0 = disable i2c-0 clock 1 = enable i2c-0 clock [29] usi usi clock enable bit 0 = disable usi clock 1 = enable usi clock [26] wdt wdt clock enable bit 0 = disable wdt counting clock 1 = enable wdt counting clock [23] timer4 timer4 clock enable bit 0 = disable timer clock 1 = enable timer clock [22] timer3 timer3 clock enable bit 0 = disable timer clock 1 = enable timer clock [21] timer2 timer2 clock enable bit 0 = disable timer clock 1 = enable timer clock [20] timer1 timer1 clock enable bit 0 = disable timer clock 1 = enable timer clock NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 43 [19] timer0 timer0 clock enable bit 0 = disable timer clock 1 = enable timer clock [12] uart1 uart1 clock enable bit 0 = disable uart1 clock 1 = enable uart1 clock [11] uart0 uart0 clock enable bit 0 = disable uart0 clock 1 = enable uart0 clock [9] usbh usb clock enable bit 0 = disable usb clock 1 = enable usb clock [8] usbd usb device clock enable bit 0 = disable usb host clock 1 = enable usb host clock [7] emc emc clock enable bit 0 = disable emc clock 1 = enable emc clock [5] dmac dmac clock enable bit 0 = disable dmac clock 1 = enable dmac clock [4] fmi fmi clock enable bit 0 = disable fmi clock 1 = enable fmi clock NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 44 clock select register (clksel) register address r/w description reset value clksel 0xb000_0204 r/w clock select register 0x0000_0ffx 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved msdsel 15 14 13 12 11 10 9 8 msdsel reserved uart1sel 7 6 5 4 3 2 1 0 reserved reserved reserved cpucksel bits descriptions [16:12] mssel ms engine clock source select bit [16:15] mssel[16:15] clock source 0 0 pll0 clock 0 1 pll1 clock 1 0 extal15m pin 1 1 extal15m pin (default) [14:12] selected pll0 or pll1 sour ce divided from 1 to 8. [9:8] uart1sel uart1 clock source select bit uart1sel clock source 0 0 pll0 clock 0 1 pll1 clock 1 0 extal15m pin 1 1 extal15m pin (default) [1:0] cpucksel cpu/amba clock source select bit default value is depended on power-on setting (pin a17) cpucksel clock source 0 0 pll0 clock 0 1 pll1 clock 1 0 pll0 /2 clock 1 1 extal15m pin NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 45 clock divider control register (clkdiv) register address r/w description reset value clkdiv 0xb000_0208 r/w clock divider control register 0x0400_0000 31 30 29 28 27 26 25 24 reserved apbckdiv ahbckdiv 23 22 21 20 19 18 17 16 reserved uart1div 15 14 13 12 11 10 9 8 reserved reserved 7 6 5 4 3 2 1 0 reserved cpuckdiv bits descriptions [27:26] apbckdiv amba apb clock divider control register apbckdiv clock frequency 0 0 reserved 0 1 ahbclk/2 1 0 ahbclk/4 1 1 ahbclk/8 [25:24] ahbckdiv amba ahb clock (ahbclk) divider control register ahbckdiv clock frequency 0 0 cpuclk/1 0 1 cpuclk/2 1 0 cpuclk/4 1 1 cpuclk/8 [19:16] uart1div uart1 clock source divider control register uart1ck = uart1 clock/(uart1div +1) where (1) uart1div is 0~15 (2) uart1 clock is the clock source output by uart1sel control reg. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 46 [3:0] cpuckdiv cpu clock source divider control register cpuclk = cck clock/(cpuckdiv +1) where (1) cpuckdiv is 0~15 (2) cck clock is the clock source output by cpucksel control register NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 47 pll control register 0 pllcon0 register address r/w description reset value pllcon0 0xb000_020c r/w pll control register 0 0x0000_2b63 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved pwden 15 14 13 12 11 10 9 8 fbdv 7 6 5 4 3 2 1 0 fbdv otdv indv bits descriptions [16] pwden power down mode enable 0 = pll is in normal mode 1 = pll is in power down mode [15:7] fbdv pll vco output clock feedback divider feedback divider divi des the output clock from vco of pll. [6:5] otdv pll output clock divider otdv divided by 0 0 1 0 1 2 1 0 2 1 1 4 [4:0] indv pll input clock divider input divider divides the input reference clock into the pll. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 48 input divider (nr) pfd feedback divider (nf) charge pump vco output divider (no) extal15m otdv[1:0] pll pllfout indv[4:0] fbdv[8:0] fin fout the formula of output clock of pll is: f out = f in n o nr nf 1 ? ? f out output clock of output divider f in external clock into the input divider nr input divider value (nr = indv + 2) nf feedback divider value (nf = fbdv + 2) no output divider value (no = otdv) example case: the input clock frequency of extal15m pin is 15mhz pll output frequency 200mhz 166mhz 133mhz 100mhz pllcon reg. 0x0000_4f24 0x0000_4124 0x0000_22a2 0x0000_4f64 pll output frequency 66mhz 169.34mhz (44.1k*3840) 122.88mhz (48k*2560) pllcon reg. 0x0000_2b63 0x0000_4e25 0x0000_92e7 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 49 power management control register (pmcon) register address r/w description reset value pmcon 0xb000_0214 r/w power management control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved reset midle pd idle bits descriptions [3] reset software reset this is a software reset control bit. se t logic 1 to generate an internal reset pulse. this bit is auto-clear to logic 0 at the end of the reset pulse. [2] midle memory controller idle enable setting this bit high to enable me mory controller enter idle mode, the clock source of memory controller will be halted while arm core enter idle mode. 1 = memory controller will enter idle mode when idle bit is set. 0 = memory controller still active when idle bit is set. [1] pd power down enable setting this bit high, this chip ente rs power saving mode. the clock sourc e 15m crystal oscillator and pll both will stop to generate clock. user can us e nirq [7:0], usb device, rtc, keypad and external nreset to wakeup chip. 1 = power down mode enable 0 = normal mode [0] idle cpu idle mode enable setting this bit high, arm cpu co re enters power saving mode. th e peripherals still working if the clock enable bit in consel is set. any nirq o r nfiq to arm core will let arm core to exit idle state. 1 = cpu idle mode enable 0 = normal mode NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 50 irq wakeup control register (irqwakecon) register address r/w description reset value irqwakecon 0xb000_0218 r/w irq wakeup control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved irqwakeuppol0 7 6 5 4 3 2 1 0 reserved irqwakeupen0 bits descriptions [11:8] irqwakeuppol0 wakeup polarity for nirq[0] 1 = nirqx is high level wakeup 0 = nirqx is low level wakeup bit [3:1] are reserved. [3:0] irqwakeupen0 wakeup enable for nirq[0] 1 = nirqx wakeup enable 0 = nirqx wakeup disable bit [3:1] are reserved. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 51 irq wakeup flag register (irqwakeflag) register address r/w description reset value irqwakeflag 0xb000_021c r/w irq wakeup flag register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 irqwakeflag bits descriptions [0] irqwakeflag wakeup flag for nirq[0] after power down wakeup, software sh ould check these flags to identify which irq is used to wakeup the system. and clear the flags in irq interrupt service routine. 1 = cpu is wakeup by nirqx 0 = not wakeup NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 52 ip software reset register (ipsrst) register address r/w description reset value ipsrst 0xb000_0220 w ip software reset register 0x0000_0000 31 30 29 28 27 26 25 24 reserved i2c usi reserved 23 22 21 20 19 18 17 16 reserved timer reserved reserved 15 14 13 12 11 10 9 8 reserved uart reserved usbh usbd 7 6 5 4 3 2 1 0 emc reserved dmac fmi reserved bits descriptions [30] i2c i2c interface software reset control bit 0 = write 0 is no action for both i2c0 and i2c1 1 = write 1 , a reset pulse is generate d to reset both i2c0 and i2c1, and this bit will be auto clear to zero. [29] usi usi software reset control bit 0 = write 0 is no action for usi 1 = write 1 , a reset pulse is generated to reset usi, and this bit will be auto clear to zero. [19] timer timer software reset control bit 0 = write 0 is no action for all of timers and wdt 1 = write 1 , a reset pulse is generated to reset all of timers and wdt, and this bit will be auto clear to zero. [11] uart uart software reset control bit 0 = write 0 is no action for all of uarts 1 = write 1 , a reset pulse is generated to reset all of uarts, and this bit will be auto clear to zero. [9] usbh usb software reset control bit 0 = write 0 is no action for usb host controller 1 = write 1 , a reset pulse is generate d to reset usb host controller, and this bit will be auto clear to zero. [8] usbd usb device software reset control bit 0 = write 0 is no action for usb device controller 1 = write 1 , a reset pulse is generated to reset usb device controller, and this bit will be auto clear to zero. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 53 [7] emc emc software reset control bit 0 = write 0 is no action for emc controller 1 = write 1 , a reset pulse is genera ted to reset emc controller, and this bit will be auto clear to zero. [5] dmac dmac software reset control bit 0 = write 0 is no action for dma controller 1 = write 1 , a reset pulse is genera ted to reset dma controller, and this bit will be auto clear to zero. [4] fmi fmi software reset control bit 0 = write 0 is no action for fmi controller 1 = write 1 , a reset pulse is genera ted to reset fmi controller, and this bit will be auto clear to zero. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 54 clock enable 1 register (clken1) register address r/w description reset value clken1 0xb000_0224 r/w clock enable 1 register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved rmii sd ms bits descriptions [2] rmii rmii clock enable bit 0 = disable rmii clock 1 = enable rmii clock [1] sd sd clock enable bit 0 = disable sd clock 1 = enable sd clock [0] ms ms clock enable bit 0 = disable ms clock 1 = enable ms clock NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 55 clock divider control 1 register (clkdiv1) register address r/w description reset value clkdiv1 0xb000_0228 r/w clock divi der control 1 register 0x 0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 sd_div 7 6 5 4 3 2 1 0 ms_div bits descriptions [15:8] sd_div sd divider sd_clk = source clock/(sd_div +1) where source clock selection is contro lled by msdsel of register clksel. [7:0] ms_div ms divider ms_clk = source clock/(ms_div +1) where source clock selection is contro lled by msdsel of register clksel. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 56 7.4 external bus interface 7.4.1 overview this chip supports exte rnal bus interface ( ebi ), which controls the access to the external memory (rom/flash, sdram) and external i/o devices. the ebi has chip select signals to select one rom/flash bank, two sdram banks, and five ex ternal i/o banks with 22-bit addre ss bus. it supports 8-bit and 16-bit external data bus wi dth for each bank. the ebi has the following functions ? sdram controller ? ebi control register ? rom/flash interface ? external i/o interface 7.4.2 functional description 7.4.2.1 sdram controller the sdram controller module contains configuration re gisters, timing control registers, common control register and other logic to provide 8 or 16 bits sdram interface with a single 8 or 16 bits sdram device or two 8-bit devices wired to give a 16-bit data path. the sdram controller has the following features ? supports up to 1 exte rnal sdram devices ? maximum size of each device is 128m bytes ? 8 or 16-bit data interface ? programmable cas latency 1,2 and 3 ? fixed burst length 1 ? sequential burst type ? write burst length mode is burst ? auto refresh mode an d self refresh mode ? adjustable refresh rate ? power up sequence NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 57 7.4.2.2 sdram components supported t able: sdram components supported size type banks row addressing column addressing 16m bits 2mx8 2 ra0~ra10 ca0~ca8 1mx16 2 ra0~ra10 ca0~ca7 64m bits 8mx8 4 ra0~ra11 ca0~ca8 4mx16 4 ra0~ra11 ca0~ca7 128m bits 16mx8 4 ra0~ra11 ca0~ca9 8mx16 4 ra0~ra11 ca0~ca8 256m bits 32mx8 4 ra0~ra12 ca0~ca9 16mx16 4 ra0~ra12 ca0~ca8 512m bits 64mx8 4 ra0~ra12 ca0~ca9,ca11 32mx16 4 ra0~ra12 ca0~ca9 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 58 7.4.2.3 ahb bus address mapping to sdram bus note: * indicates the signal is not used; ** indicate s the signal is fixed at logic 0 and is not used; the haddr prefixes have been om itted on the following tables. ma14 ~ ma0 are the address pins of the ebi interface; ma14 and ma13 are also the bank selected signals of sdram. sdram data bus width: 16-bit total type r x c r/ c ma14 (bs1) ma13 (bs0) ma12 ma11 ma10 ma9 ma8 ma7 ma6 ma5 ma4 ma3 ma2 ma1 ma0 16m 2mx8 11x9 r ** 10 ** 10 * 21 20 19 18 17 16 15 14 13 12 11 c ** 10 ** 10 * ap 24 * 9 8 7 6 5 4 3 2 1 16m 1mx16 11x8 r ** 9 ** 9 * 10 20 19 18 17 16 15 14 13 12 11 c ** 9 ** 9 * ap 24 * 9 * 8 7 6 5 4 3 2 1 64m 8mx8 12x9 r 10 11 10 * 22 21 20 19 18 17 16 15 14 13 12 23 c 10 11 10 * 22 * ap 24 * 9 8 7 6 5 4 3 2 1 64m 4mx16 12x8 r 10 9 10 * 22 21 20 19 18 17 16 15 14 13 12 11 c 10 9 10 * 22 * ap 24 * 23 * 8 7 6 5 4 3 2 1 128m 16mx8 12x10 r 10 11 10 * 22 21 20 19 18 17 16 15 14 13 12 23 c 10 11 10 * 22 * ap 24 9 8 7 6 5 4 3 2 1 128m 8mx16 12x9 r 10 11 10 * 22 21 20 19 18 17 16 15 14 13 12 23 c 10 11 10 * 22 * ap 24 * 9 8 7 6 5 4 3 2 1 256m* 32mx8 13x10 r 10 11 23 22 21 20 19 18 17 16 15 14 13 12 24 c 10 11 23 * 22 * ap 25 9 8 7 6 5 4 3 2 1 256m 16mx16 13x9 r 10 11 23 22 21 20 19 18 17 16 15 14 13 12 24 c 10 11 23 * 22 * ap 25 * 9 8 7 6 5 4 3 2 1 512m 64mx8 13x11 r 10 11 23 22 21 20 19 18 17 16 15 14 13 12 24 c 10 11 23 * 26 ap 25 9 8 7 6 5 4 3 2 1 512m 32mx16 13x10 r 10 11 23 22 21 20 19 18 17 16 15 14 13 12 24 c 10 11 23 * 22 * ap 25 9 8 7 6 5 4 3 2 1 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 59 sdram data bus width: 8-bit total type r x c r/c ma14 (bs1) ma13 (bs0) ma12 ma11 ma10 ma9 ma8 ma7 ma6 ma5 ma4 ma3 ma2 ma1 ma0 16m 2mx8 11x9 r ** 9 ** 9 * 20 19 18 17 16 15 14 13 12 11 10 c ** 9 ** 9 * ap 23 * 8 7 6 5 4 3 2 1 0 16m 1mx16 11x8 r ** 8 ** 8 * 9 19 18 17 16 15 14 13 12 11 10 c ** 8 ** 8 * ap 23 * 8 * 7 6 5 4 3 2 1 0 64m 8mx8 12x9 r 9 10 9 * 21 20 19 18 17 16 15 14 13 12 11 22 c 9 10 9 * 21 * ap 23 * 8 7 6 5 4 3 2 1 1 64m 4mx16 12x8 r 9 8 9 * 21 20 19 18 17 16 15 14 13 12 11 10 c 9 8 9 * 21 * ap 23 * 22 * 7 6 5 4 3 2 1 0 128m 16mx8 12x10 r 9 10 9 * 21 20 19 18 17 16 15 14 13 12 11 22 c 9 10 9 * 21 * ap 23 8 7 6 5 4 3 2 1 0 128m 8mx16 12x9 r 9 10 9 * 21 20 19 18 17 16 15 14 13 12 11 22 c 9 10 9 * 21 * ap 23 * 8 7 6 5 4 3 2 1 0 256m 32mx8 13x10 r 9 10 22 21 20 19 18 17 16 15 14 13 12 11 23 c 9 10 22 * 21 * ap 24 8 7 6 5 4 3 2 1 0 256m 16mx16 13x9 r 9 10 22 21 20 19 18 17 16 15 14 13 12 11 23 c 9 10 22 * 21 * ap 24 * 8 7 6 5 4 3 2 1 0 512m 64mx8 13x11 r 9 10 22 21 20 19 18 17 16 15 14 13 12 11 23 c 9 10 22 * 25 ap 24 8 7 6 5 4 3 2 1 0 512m 32mx16 13x10 r 9 10 22 21 20 19 18 17 16 15 14 13 12 11 23 c 9 10 22 * 21* ap 24 8 7 6 5 4 3 2 1 0 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 60 7.4.2.4 sdram power-up sequence the default value of the mode regist er is not defined, therefore the mo de register must be written after power up to operate the sdram. this chip supports the function of power- up sequence, that is, after system power on, the sdram controller auto matically executes the commands n eeded for power-up sequence and set the mode register of each bank to default value. the default value is ? burst length = 1 ? burst type = sequential (fixed) ? cas latency = 2 ? write burst length = burst (fixed) the value of mode register can be changed after powe r up sequence by setting the value of corresponding bank?s configuration register ? length ? and ? latency ? bits and set the mrset bit enable to execute the mode register set command. 7.4.3 ebi register mapping register offset r/w description reset value (ebi_ba=0xb000_1000) ebicon 0xb000_1000 r/w ebi control register 0x 0001_0001 romcon 0xb000_1004 r/w rom/flash control register 0x 0000_0ffx sdconf0 0xb000_1008 r/w sdram bank 0 configuration register 0x0000_0800 sdtime0 0xb000_1010 r/w sdram bank 0 timing control register 0x0000_0000 ext0con 0xb000_1018 r/w external i/o 0 control register 0x0000_0000 ckskew 0xb000_102c r/w clock skew control register 0xxxxx_0048 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 61 7.4.4 ebi register details ebi control register (ebicon) register address r/w description reset value ebicon 0xb000_1000 r/w ebi control register 0x0001_0001 31 30 29 28 27 26 25 24 reserved exbe0 23 22 21 20 19 18 17 16 reserved refen refmod clken 15 14 13 12 11 10 9 8 refrat 7 6 5 4 3 2 1 0 refrat waitvt little bits descriptions [24] exbe0 exbe0: external io bank 0 byte enable 0: nwbe[1:0] pin is byte write strobe signal 1: nwbe[1:0] pin is byte enable signals, nswe will be used as write strobe signal to sram [23:19] reserved write 0 for normal operation [18] refen enable sdram refresh cycle for sdram bank0 this bit set will start the auto-refresh cycle to sdram. the refresh rate is according to refrat bits. [17] refmod the refresh mode of sdram for sdram bank defines the refresh mode type of external sdram bank 0 = auto refresh mode 1 = self refresh mode [16] clken clock enable for sdram enables the sdram clock enable ( cke ) control signal 0 = disable (power down mode) 1 = enable default [15:3] refrat refresh count value for sdram the refresh period is calculated as fmclk value period ? the sdram controller automatically provid es an auto refresh cycle for every refresh period programmed into the refrat bits when the refen bit of each bank is set. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 62 [2:1] waitvt valid time of nwait signal this bit recognizes the nwait signal at the next ?nth? mclk rising edge after the noe or nwbe active cycle. waitvt bits determine the n. waitvt [2:1] nth mclk 0 0 1 0 1 2 1 0 3 1 1 4 [0] little little endian mode this bit always set to a logic 1 (read only) NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 63 rom/flash control register romcon register address r/w description reset value romcon 0xb000_1004 r/w rom/flash control register 0x0000_0ffx 31 30 29 28 27 26 25 24 basaddr 23 22 21 20 19 18 17 16 basaddr size 15 14 13 12 11 10 9 8 size reserved tpa 7 6 5 4 3 2 1 0 tacc btsize pgmode bits descriptions [31:19] basaddr base address pointer of rom/flash bank the start address is calculated as ro m/flash bank base pointer << 18. the base address pointer together with the ? size ? bits constitutes the whole address range of each bank. [18:15] size size of rom/flash memory size [18:15] byte 0 0 0 0 256k 0 0 1 0 512k 0 1 0 0 1m 0 1 1 0 2m 1 0 0 0 4m 1 0 1 0 8m others reserved . [11:8] tpa page mode access cycle time tpa[11:8] mclk tpa[11:8] mclk 0 0 0 0 1 1 0 0 0 10 0 0 0 1 2 1 0 0 1 12 0 0 1 0 3 1 0 1 0 14 0 0 1 1 4 1 0 1 1 16 0 1 0 0 5 1 1 0 0 18 0 1 0 1 6 1 1 0 1 20 0 1 1 0 7 1 1 1 0 22 0 1 1 1 8 1 1 1 1 24 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 64 [7:4] tacc access cycle time tacc[7:4] mclk tacc[7:4] mclk 0 0 0 0 3 1 0 0 0 10 0 0 0 1 3 1 0 0 1 12 0 0 1 0 3 1 0 1 0 14 0 0 1 1 4 1 0 1 1 16 0 1 0 0 5 1 1 0 0 18 0 1 0 1 6 1 1 0 1 20 0 1 1 0 7 1 1 1 0 22 0 1 1 1 8 1 1 1 1 24 [3:2] btsize boot rom/flash data bus width this rom/flash bank is designed for a boot rom. basaddr bits determine its start address. the external data bus width is determined by power-on setting when booting from external rom. btsize [3:2] bus width 0 0 8-bit 0 1 16-bit 1 0 reserved 1 1 reserved [1:0] pgmode page mode configuration pgmode [1:0] mode 0 0 normal rom 0 1 4 word page 1 0 8 word page 1 1 16 word page NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 65 rom/flash read operation timing rom/flash page read operation timing NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 66 sdram configuration register (sdconf0) the configuration registers enable software to se t a number of operating parameters for the sdram controller. there are two configuration registers sdco nf0 for sdram bank 0 respectively. each bank can have a different configuration. register address r/w description reset value sdconf0 0xb000_1008 r/w sdram bank 0 configuration register 0x0000_0800 31 30 29 28 27 26 25 24 basaddr 23 22 21 20 19 18 17 16 basaddr reserved 15 14 13 12 11 10 9 8 mrset reserved autopr latency reserved 7 6 5 4 3 2 1 0 compbk dbwd column size bits descriptions [31:19] basaddr base address pointer of sdram bank 0 the start address is calculated as sdram bank 0 base pointer << 18. the sdram base address pointer together with the ? size ? bits constitutes the whole address range of each sdram bank. [15] mrset sdram mode register set command for sdram bank 0 this bit set will issue a mode register set command to sdram. [13] autopr auto pre-charge mode of sdram for sdram bank 0 enable the auto pre-charge function of external sdram bank 0 0 = auto pre-charge 1 = no auto pre-charge [12:11] latency the cas latency of sdram bank 0 defines the cas latency of external sdram bank 0 latency [12:11] mclk 0 0 1 0 1 2 1 0 3 1 1 reversed [7] compbk number of component bank in sdram bank 0 indicates the number of component bank (2 or 4 banks) in external sdram bank 0. 0 = 2 banks 1 = 4 banks NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 67 [6:5] dbwd data bus width for sdram bank 0 indicates the external data bus width connect with sdram bank 0 if dbwd = 00, the assigned sdram a ccess signal is not generated i.e. disable. dbwd [6:5] bits 0 0 bank disable 0 1 8-bit (byte) 1 0 16-bit (half-word) 1 1 reserved [4:3] column number of column address bits in sdram bank 0 indicates the number of column addre ss bits in external sdram bank 0. column [4:3] bits 0 0 8 0 1 9 1 0 10 1 1 11 [2:0] size size of sdram bank 0 indicates the memory size of external sdram bank 0 size [2:0] size of sdram byte 0 0 0 bank disable 0 0 1 2m 0 1 0 4m 0 1 1 8m 1 0 0 16m 1 0 1 32m 1 1 0 64m 1 1 1 reserved NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 68 sdram timing control register (sdtime0) register address r/w description reset value sdtime0 0xb000_1010 r/w sdram bank 0 timing control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved trcd 7 6 5 4 3 2 1 0 trdl trp tras bits descriptions [10:8] trcd sdram bank 0, /ras to /cas delay trcd [10:8] mclk 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 8 [7:6] trdl sdram bank 0, last data in to pre-charge command trdl [7:6] mclk 0 0 1 0 1 2 1 0 3 1 1 4 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 69 [5:3] trp sdram bank 0, row pre-charge time trp [5:3] mclk 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 8 [2:0] tras sdram bank 0, row active time tras [2:0] mclk 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 8 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 70 fig. access timing 1 of sdram fig. access timing 2 of sdram NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 71 external i/o control registers ext0con register address r/w description reset value ext0con 0xb000_1018 r/w external i/o 0 control register 0x0000_0000 31 30 29 28 27 26 25 24 basaddr 23 22 21 20 19 18 17 16 basaddr size 15 14 13 12 11 10 9 8 adrs tacc tcoh 7 6 5 4 3 2 1 0 tacs tcos dbwd bits descriptions [31:19] basaddr base address pointer of external i/o bank 0 the start address of each external i/o bank is calculated as ? basaddr? base pointer << 18. each external i/o bank ba se address pointer together with the ? size ? bits constitutes the whole address range of each external i/o bank. [18:16] size the size of the external i/o bank 0 size [18:16] byte 0 0 0 256k 0 0 1 512k 0 1 0 1m 0 1 1 2m 1 0 0 4m 1 0 1 8m [15] adrs address bus alignment for external i/o bank 0 when adrs is set, ebi bus is alignment to byte address format, and ignores dbwd [1:0] setting. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 72 [14:11] tacc access cycles noe or nswe active time for external i/o bank 0 tacc[14:11] mclk tacc[14:11] mclk 0 0 0 0 reversed 1 0 0 0 9 0 0 0 1 1 1 0 0 1 11 0 0 1 0 2 1 0 1 0 13 0 0 1 1 3 1 0 1 1 15 0 1 0 0 4 1 1 0 0 17 0 1 0 1 5 1 1 0 1 19 0 1 1 0 6 1 1 1 0 21 0 1 1 1 7 1 1 1 1 23 [10:8] tcoh chip selection hold-on time on noe or nwbe for external i/o bank 0 tcoh [10:8] mclk 0 0 0 0 0 0 1 1 0 1 0 2 0 1 1 3 1 0 0 4 1 0 1 5 1 1 0 6 1 1 1 7 [7:5] tacs address set-up before necs for external i/o bank 0 tacs [7:5] mclk 0 0 0 0 0 0 1 1 0 1 0 2 0 1 1 3 1 0 0 4 1 0 1 5 1 1 0 6 1 1 1 7 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 73 [4:2] tcos chip selection set-up time on noe or nwbe for external i/o bank 0 when the bank is configured, the access to its bank stretches chip selection time before the noe or new signal is activated. tcos [4:2] mclk 0 0 0 0 0 0 1 1 0 1 0 2 0 1 1 3 1 0 0 4 1 0 1 5 1 1 0 6 1 1 1 7 [1:0] dbwd programmable data bus width for external i/o bank 0 dbwd [1:0] width of data bus 0 0 disable bus 0 1 8-bit 1 0 16-bit 1 1 reserved NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 74 fig. external i/o write operation timing fig. external i/o read operation timing NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 75 clock skew control register (ckskew) register address r/w description reset value ckskew 0xb000_1 02c r/w clock skew control register 0xxxxx_0048 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 dlh_clk_skew mclk_o_d bits descriptions [7:4] dlh_clk_skew data latch clock skew adjustment dlh_clk_skew[7:4] gate delay dlh_clk_skew[7:4] gate delay 0 0 0 0 p-0 1 0 0 0 n-0 0 0 0 1 p-1 1 0 0 1 n-1 0 0 1 0 p-2 1 0 1 0 n-2 0 0 1 1 p-3 1 0 1 1 n-3 0 1 0 0 p-4 1 1 0 0 n-4 0 1 0 1 p-5 1 1 0 1 n-5 0 1 1 0 p-6 1 1 1 0 n-6 0 1 1 1 p-7 1 1 1 1 n-7 note: p-x means data latched clock sh ift ?x? gates delays by refer mclko positive edge; n-x means data latched cl ock shift ?x? gates delays by refer mclko negative edge. [3:0] mclk_o_d mclk output delay adjustment mclk_o_d [3:0] gate delay mclk_o_d [3:0] gate delay 0 0 0 0 p-0 1 0 0 0 n-0 0 0 0 1 p-1 1 0 0 1 n-1 0 0 1 0 p-2 1 0 1 0 n-2 0 0 1 1 p-3 1 0 1 1 n-3 0 1 0 0 p-4 1 1 0 0 n-4 0 1 0 1 p-5 1 1 0 1 n-5 0 1 1 0 p-6 1 1 1 0 n-6 0 1 1 1 p-7 1 1 1 1 n-7 note: p-x means mclko shift ?x? gates dela y by refer hclk positive edge; n-x means mclko shift ?x? gates dela y by refer hclk negative edge. mclk is the output pin of mclko, which is an internal signal on chip. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 76 7.5 ethernet mac controller overview this chip provides an ethernet mac controller (emc) for wan/lan application. this emc has its dma controller, transmit fifo, and receive fifo. the ethernet mac controller consists of ieee 802.3/ethern et protocol engine with internal cam function for ethernet mac address recognition, transmit-fifo, receive-fifo, tx/rx stat e machine controller and status controller. the emc only su pports rmii (reduced mii) interface to connect with phy operating on 50mhz ref_clk. features ? supports ieee std. 802.3 csma/cd protocol. ? supports both half and full dupl ex for 10m/100m bps operation. ? supports rmii interface. ? supports mii management function. ? supports pause and remote pause function for flow control. ? supports long frame (more than 1518 bytes) and short frame (less than 64 bytes) reception. ? supports 16 entries cam function for ethernet mac address recognition. ? supports internal loop ba ck mode for diagnostic. ? supports 256 bytes embedded transmit and receive fifo. ? supports dma function. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 77 emc descriptors a link-list data structure named as descriptor is used to keep the control, status and data information of each frame. through the descriptor, cpu and emc exchange the information for frame reception and transmission. two different descriptors are define d in NUC946ADN. one named as rx descriptor for frame reception and the other names as tx descriptor for frame transmission. each rx descripto r consists of four words. there is much information kept in the descriptors and details are described as below. 7.5.1.1 rx buffer descriptor 3 1 3 0 2 9 1 6 1 5 0 o rx status receive byte count receive buffer starting address bo reserved next rx descriptor starting address rx descriptor word 0 31 30 29 28 27 26 25 24 owner reserved 23 22 21 20 19 18 17 16 reserved rp alie rxgd ptle reserved crce rxintr 15 14 13 12 11 10 9 8 rbc 7 6 5 4 3 2 1 0 rbc NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 78 bits descriptions [31:30] owner ownership the ownership field defines which one, the cpu or emc, is the owner of each rx descriptor. only the owner ha s right to modify the rx descriptor and the others can read the rx descriptor only. 00: the owner is cpu 01: undefined 10: the owner is emc 11: undefined if the o=2?b10 indicates the emc rx dma is the owner of rx descriptor and the rx descriptor is available fo r frame reception. after the frame reception completed, if the frame needed nat translation, emc rxdma modify ownership field to 2?b11. otherwise, the ownership field will be modified to 2?b00. if the o=2?b00 indicates the cpu is th e owner of rx descriptor. after the cpu completes processing the frame, it modifies the ow nership field to 2?b10 and releases the rx descriptor to emc rxdma. [29:23] rx status receive status this field keeps the status for fram e reception. all status bits are updated by emc. in the receive stat us, bits 29 to 23 are undefined and reserved for the future. [22] rp runt packet the rp indicates the frame stored in the data buffer pointed by rx descriptor is a short frame (frame length is less than 64 bytes). 1?b0: the frame is not a short frame. 1?b1: the frame is a short frame. [21] alie alignment error the alie indicates the frame stored in the data buffer pointed by rx descriptor is not a multiple of byte. 1?b0: the frame is a multiple of byte. 1?b1: the frame is not a multiple of byte. [20] rxgd frame reception complete the rxgd indicates the frame receptio n has completed and stored in the data buffer pointed by rx descriptor. 1?b0: the frame reception not complete yet. 1?b1: the frame reception completed. [19] ptle packet too long the ptle indicates the frame stored in the data buffer pointed by rx descriptor is a long frame (frame length is greater than 1518 bytes). 1?b0: the frame is not a long frame. 1?b1: the frame is a long frame. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 79 [17] crce crc error the crce indicates the frame stored in the data buffer pointed by rx descriptor incurred crc error. 1?b0: the frame doesn?t incur crc error. 1?b1: the frame incurred crc error. [16] rxintr receive interrupt the rxintr indicates the frame stored in the data buffer pointed by rx descriptor caused an interrupt condition. 1?b0: the frame doesn?t cause an interrupt. 1?b1: the frame caused an interrupt. [15:0] rbc receive byte count the rbc indicates the byte count of the frame stored in the data buffer pointed by rx descriptor. the four byte s crc field is also included in the receive byte count. but if the spcrc of register mcmdr is enabled, the four bytes crc field will be excluded from the receive byte count. rx descriptor word 1 31 30 29 28 27 26 25 24 rxbsa 23 22 21 20 19 18 17 16 rxbsa 15 14 13 12 11 10 9 8 rxbsa 7 6 5 4 3 2 1 0 rxbsa bo bits descriptions [31:2] rxbsa receive buffer starting address the rxbsa indicates the starting a ddress of the receive frame buffer. the rxbsa is used to be the bit 31 to 2 of memory address. in other words, the starting address of the re ceive frame buffer always located at word boundary. [1:0] bo byte offset the bo indicates the byte offset fr om rxbsa where the received frame begins to store. if the bo is 2? b01, the starting address where the received frame begins to stor e is rxbsa+2?b01, and so on. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 80 rx descriptor word 2 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved the rx descriptor word 2 keeps obsolete information fo r mac translation. therefor e, these information bits are undefined and should be ignored. rx descriptor word 3 31 30 29 28 27 26 25 24 nrxdsa 23 22 21 20 19 18 17 16 nrxdsa 15 14 13 12 11 10 9 8 nrxdsa 7 6 5 4 3 2 1 0 nrxdsa bits descriptions [31:0] nrxdsa next rx descriptor starting address the rx descriptor is a link-list data structure. consequently, nrxdsa is used to keep the starting address of the next rx descriptor. the bits [1:0] will be ignored by emc. so, all rx descriptor must locate at word boundary memory address. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 81 7.5.1.2 tx buffer descriptor 3 1 3 0 1 6 1 5 3 2 1 0 o reserved i c p transmit buffer starting address bo tx status transmit byte count next tx descriptor starting address tx descriptor word 0 31 30 29 28 27 26 25 24 owner reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved inten crcapp paden bits descriptions [31] owner ownership the ownership field defines which one, the cpu or emc, is the owner of each tx descriptor. only the owner ha s right to modify the tx descriptor and the other can read the tx descriptor only. 0: the owner is cpu 1: the owner is emc if the o=1?b1 indicates the emc txdm a is the owner of tx descriptor and the tx descriptor is available for frame transmission. after the frame transmission completed, emc txdma mo dify ownership fi eld to 1?b0 and return the ownership of tx descriptor to cpu. if the o=1?b0 indicates the cpu is th e owner of tx descriptor. after the cpu prepares new frame to wait tran smission, it modifi es the ownership field to 1?b1 and releases th e tx descriptor to emc txdma. [2] inten transmit interrupt enable the inten controls the interrupt trigger circuit after the frame transmission completed. if the inten is enabled, the emc will trigger interrupt after frame transmission co mpleted. otherwise, the interrupt doesn?t be triggered. 1?b0: frame transmission interrupt is masked. 1?b1: frame transmission interrupt is enabled. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 82 [1] crcapp crc append the crcapp control the crc append during frame transmission. if crcapp is enabled, the 4-bytes crc checksum will be appended to frame at the end of frame transmission. 1?b0: 4-bytes crc appending is disabled. 1?b1: 4-bytes crc appending is enabled. [0] paden padding enable the paden control the pad bits appending while the length of transmission frame is less than 60 byte s. if paden is enabled, emc does the padding automatically. 1?b0: pad bits appending is disabled. 1?b1: pad bits appending is enabled. tx descriptor word 1 31 30 29 28 27 26 25 24 txbsa 23 22 21 20 19 18 17 16 txbsa 15 14 13 12 11 10 9 8 txbsa 7 6 5 4 3 2 1 0 txbsa bo bits descriptions [31:2] txbsa transmit buffer starting address the txbsa indicates the starting addr ess of the transmit frame buffer. the txbsa is used to be the bit 31 to 2 of memory address. in other words, the starting address of the transmit frame buffer always located at word boundary. [1:0] bo byte offset the bo indicates the byte offset fr om txbsa where the transmit frame begins to read. if the bo is 2?b 01, the starting address where the transmit frame begins to read is txbsa+2?b01, and so on. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 83 tx descriptor word 2 31 30 29 28 27 26 25 24 ccnt reserved sqe pau txha 23 22 21 20 19 18 17 16 lc txabt ncs exdef txcp reserved def txintr 15 14 13 12 11 10 9 8 tbc 7 6 5 4 3 2 1 0 tbc bits descriptions [31:28] ccnt collision count the ccnt indicates the how many collisions occurred consecutively during a packet transmission. if the packet incurred 16 consecutive collisions during transmission, the ccnt will be 4?h0 and bit txabt will be set to 1. [26] sqe sqe error the sqe indicates the sqe error found at end of packet transmission on 10mbps half-duplex mode. the sqe error check will only be done while both bit ensqe of mcmdr is enable d and emc is operating on 10mbps half-duplex mode. 1?b0: no sqe error found at end of packet transmission. 1?b0: sqe error found at en d of packet transmission. [25] pau transmission paused the pau indicates the next normal packet transmission process will be paused temporally because emc received a pause control frame, or s/w set bit sdpz of mcmdr and make emc to transmit a pause control frame out. 1?b0: next normal packet transmission process will go on. 1?b1: next normal packet transmission process will be paused. [24] txha p transmission halted the txha indicates the next normal packet transmission process will be halted because the bit txon of mcmdr is disabled be s/w. 1?b0: next normal packet transmission process will go on. 1?b1: next normal packet transmission process will be halted. [23] lc late collision the lc indicates the collision occurred in the outside of 64 bytes collision window. this means after the 64 bytes of a frame has transmitted out to the network, the collision still occurred. the late collision check will only be done while emc is operating on half-duplex mode. 1?b0: no collision occurred in the outside of 64 bytes collision window. 1?b1: collision occurred in the outside of 64 bytes collision window. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 84 [22] txabt transmission abort the txabt indicates the packet incurred 16 consecutive collisions during transmission, and then the transmi ssion process for this packet is aborted. the transmission abort is only available while emc is operating on half-duplex mode. 1?b0: packet doesn?t incur 16 consecutive collisions during transmission. 1?b1: packet incurred 16 consecutive collisions during transmission. [21] ncs no carrier sense the ncs indicates the mii i/f signal cr s doesn?t active at the start of or during the packet transmission. the ncs is only available while emc is operating on half-duplex mode. 1?b0: crs signal actives correctly. 1?b1: crs signal doesn?t active at the start of or during the packet transmission. [20] exdef defer exceed the exdef indicates the frame wait ing for transmission has deferred over 0.32768ms on 100mbps mode, or 3.2768ms on 10mbps mode. the deferral exceed check will only be done while bit ndef of mcmdr is disabled, and emc is operating on half-duplex mode. 1?b0: frame waiting for transmissi on has not deferred over 0.32768ms (100mbps) or 3.2768ms (10mbps). 1?b1: frame waiting for transmi ssion has deferred over 0.32768ms (100mbps) or 3.2768ms (10mbps). [19] txcp transmission complete the txcp indicates the packet tran smission has completed correctly. 1?b0: the packet transmi ssion doesn?t complete. 1?b1: the packet transmission has completed. [17] def transmission deferred the def indicates the packet transmi ssion has deferred once. the def is only available while emc is operating on half-duplex mode. 1?b0: packet transmi ssion doesn?t defer. 1?b1: packet transmissi on has deferred once. [16] txintr transmit interrupt the txintr indicates the packet tr ansmission caused an interrupt condition. 1?b0: the packet transmission doesn?t cause an interrupt. 1?b1: the packet transmissi on caused an interrupt. [15:0] tbc transmit byte count the tbc indicates the byte count of the frame stored in the data buffer pointed by tx descriptor for transmission. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 85 tx descriptor word 3 31 30 29 28 27 26 25 24 ntxdsa 23 22 21 20 19 18 17 16 ntxdsa 15 14 13 12 11 10 9 8 ntxdsa 7 6 5 4 3 2 1 0 ntxdsa bits descriptions [31:0] ntxdsa next tx descriptor starting address the tx descriptor is a link-list data structure. consequently, ntxdsa is used to keep the starting address of the next tx descriptor. the bits [1:0] will be ignored by emc. so, all tx descriptor must locate at word boundary memory address. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 86 7.5.2 emc register mapping the emc implements many registers and the registers are separated into two types, the control registers and the status registers. the contro l registers are used by s/w to pa ss control information to emc. the status registers are used to keep emc operation status for s/w. emc registers register address r/w description reset value emc_ba = 0xb000_3000 control registers (44) camcmr 0xb000_3000 r/w cam command register 0x0000_0000 camen 0xb000_3004 r/w cam enable register 0x0000_0000 cam0m 0xb000_3008 r/w cam0 most significant word register 0x0000_0000 cam0l 0xb000_300c r/w cam0 least significant word register 0x0000_0000 cam1m 0xb000_3010 r/w cam1 most significant word register 0x0000_0000 cam1l 0xb000_3014 r/w cam1 least significant word register 0x0000_0000 cam2m 0xb000_3018 r/w cam2 most significant word register 0x0000_0000 cam2l 0xb000_301c r/w cam2 least significant word register 0x0000_0000 cam3m 0xb000_3020 r/w cam3 most significant word register 0x0000_0000 cam3l 0xb000_3024 r/w cam3 least significant word register 0x0000_0000 cam4m 0xb000_3028 r/w cam4 most significant word register 0x0000_0000 cam4l 0xb000_302c r/w cam4 least significant word register 0x0000_0000 cam5m 0xb000_3030 r/w cam5 most significant word register 0x0000_0000 cam5l 0xb000_3034 r/w cam5 least significant word register 0x0000_0000 cam6m 0xb000_3038 r/w cam6 most significant word register 0x0000_0000 cam6l 0xb000_303c r/w cam6 least significant word register 0x0000_0000 cam7m 0xb000_3040 r/w cam7 most significant word register 0x0000_0000 cam7l 0xb000_3044 r/w cam7 least significant word register 0x0000_0000 cam8m 0xb000_3048 r/w cam8 most significant word register 0x0000_0000 cam8l 0xb000_304c r/w cam8 least significant word register 0x0000_0000 cam9m 0xb000_3050 r/w cam9 most significant word register 0x0000_0000 cam9l 0xb000_3054 r/w cam9 least significant word register 0x0000_0000 cam10m 0xb000_3058 r/w cam10 most significant word register 0x0000_0000 cam10l 0xb000_305c r/w cam10 least significant word register 0x0000_0000 cam11m 0xb000_3060 r/w cam11 most significant word register 0x0000_0000 cam11l 0xb000_3064 r/w cam11 least significant word register 0x0000_0000 cam12m 0xb000_3068 r/w cam12 most significant word register 0x0000_0000 cam12l 0xb000_306c r/w cam12 least significant word register 0x0000_0000 cam13m 0xb000_3070 r/w cam13 most significant word register 0x0000_0000 cam13l 0xb000_3074 r/w cam13 least significant word register 0x0000_0000 cam14m 0xb000_3078 r/w cam14 most significant word register 0x0000_0000 cam14l 0xb000_307c r/w cam14 least significant word register 0x0000_0000 cam15m 0xb000_3080 r/w cam15 most significant word register 0x0000_0000 cam15l 0xb000_3084 r/w cam15 least significant word register 0x0000_0000 txdlsa 0xb000_3088 r/w transmit descriptor link list start address register 0xffff_fffc NUC946ADN 32-bit arm926ej-s based mcu publication release date: july 26, 2011 revision: a5 87 rxdlsa 0xb000_308c r/w receive descriptor link list start address reg. 0xffff_fffc mcmdr 0xb000_3090 r/w mac command register 0x0000_0000 miid 0xb000_3094 r/w mii management data register 0x0000_0000 miida 0xb000_3098 r/w mii management cont rol and address register 0x0090_0000 fftcr 0xb000_309c r/w fifo threshold control register 0x0000_0101 tsdr 0xb000_30a0 w transmit start de mand register undefined rsdr 0xb000_30a4 w receive start dema nd register undefined dmarfc 0xb000_30a8 r/w maximum receive frame control register 0x0000_0800 mien 0xb000_30ac r/w mac interrupt enable register 0x0000_0000 status registers (11) mista 0xb000_30b0 r/w mac interrupt status register 0x0000_0000 mgsta 0xb000_30b4 r/w mac general status register 0x0000_0000 mpcnt 0xb000_30b8 r/w missed packet count register 0x0000_7fff mrpc 0xb000_30bc r mac receive pause count register 0x0000_0000 mrpcc 0xb000_30c0 r mac receive pause current count register 0x0000_0000 mrepc 0xb000_30c4 r mac remote pause count register 0x0000_0000 dmarfs 0xb000_30c8 r/w dma receive fr ame status register 0x0000_0000 ctxdsa 0xb000_30cc r current transmit descr iptor start address reg. 0x0000_0000 ctxbsa 0xb000_30d0 r current transmit buffe r start address register 0x0000_0000 crxdsa 0xb000_30d4 r current receive descriptor start address reg. 0x0000_0000 crxbsa 0xb000_30d8 r current receive buffe r start address register 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 88 7.5.3 emc register details cam command register (camcmr) the emc of NUC946ADN supports cam function for de stination mac address recognition. the camcmr control the cam comparison function, and unicast , multicast, and broadcast packet reception. register address r/w description reset value camcmr 0xb000_3000 r/w cam command register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved rmii ecmp ccam abp amp aup bits descriptions [5] rmii enable rmii input data sampled by negative edge of refclk 1?b0: phy_crsdv and phy_rxd[1:0] are sa mpled by the positive edge of refclk 1?b1: phy_crsdv and phy_rxd[1:0] are sa mpled by the negative edge of refclk [4] ecmp enable cam compare the ecmp controls the enable of cam comparison function for destination mac address recognition. if s/w wants to receiv e a packet with specific destination mac address, configures the mac address into anyone of 16 cam entries, then enables that cam entry and set ecmp to 1. 1?b0: disable cam comparison function fo r destination mac address recognition. 1?b1: enable cam comparison function for destination mac address recognition. [3] ccam complement cam compare the ccam controls the complement of th e cam comparison result. if the ecmp and ccam are both enabled, the incoming packet with specific destination mac address configured in cam entry will be dropped. and the incoming packet with destination mac address doesn?t configured in any cam entry will be received. 1?b0: the cam comparison result doesn?t be complemented. 1?b1: the cam comparison result will be complemented. [2] abp accept broadcast packet the abp controls the broadcast packet rece ption. if abp is enabled, emc receives all incoming packet its destination mac address is a broadcast address. 1?b0: emc receives packet depends on the cam comparison result. 1?b1: emc receives all broadcast packets. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 89 [1] amp accept multicast packet the amp controls the multicast packet reception. if amp is enabled, emc receives all incoming packet its destination mac address is a multicast address. 1?b0: emc receives packet depends on the cam comparison result. 1?b1: emc receives all multicast packets. [0] aup accept unicast packet the aup controls the unicast packet reception. if aup is enabled, emc receives all incoming packet its destination ma c address is a unicast address. 1?b0: emc receives packet depends on the cam comparison result. 1?b1: emc receives all unicast packets. camcmr setting and comparison result the following table is the address recognition result in different camcmr configuration. the column result shows the incoming packet type that can pass the addr ess recognition in specific cam configuration. the c, u, m and b represents the: c : it indicates the destination mac address of inco ming packet has been configured in cam entry. u : it indicates the incoming packet is a unicast packet. m : it indicates the incoming packet is a multicast packet. b : it indicates the incoming packet is a broadcast packet. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 90 ecmp ccam aup amp abp result 0 0 0 0 0 no packet 0 0 0 0 1 b 0 0 0 1 0 m 0 0 0 1 1 m b 0 0 1 0 0 c u 0 0 1 0 1 c u b 0 0 1 1 0 c u m 0 0 1 1 1 c u m b 0 1 0 0 0 c u m b 0 1 0 0 1 c u m b 0 1 0 1 0 c u m b 0 1 0 1 1 c u m b 0 1 1 0 0 c u m b 0 1 1 0 1 c u m b 0 1 1 1 0 c u m b 0 1 1 1 1 c u m b 1 0 0 0 0 c 1 0 0 0 1 c b 1 0 0 1 0 c m 1 0 0 1 1 c n b 1 0 1 0 0 c u 1 0 1 0 1 c u b 1 0 1 1 0 c u m 1 0 1 1 1 c u m b 1 1 0 0 0 u m b 1 1 0 0 1 u m b 1 1 0 1 0 u m b 1 1 0 1 1 u m b 1 1 1 0 0 c u m b 1 1 1 0 1 c u m b 1 1 1 1 0 c u m b 1 1 1 1 1 c u m b NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 91 cam enable register (camen) the camen controls the validation of each cam entry. each cam entry must be en abled first before it can participate in the destination mac address recognition. register address r/w description reset value camen 0xb000_3004 r/w cam enable register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 cam15en cam14en cam13en cam12en cam11en cam10en cam9en cam8en 7 6 5 4 3 2 1 0 cam7en cam6en cam5en cam4en cam3en cam2en cam1en cam0en bits descriptions [x] camxen cam entry x enable the camxen controls the validation of cam entry x. the x can be 0 to 15. the cam entry 13, 14 and 15 are for paus e control frame transmission. if s/w wants to transmit a pause control frame ou t to network, the enable bits of these three cam entries all must be enabled first. 1?b0: cam entry x is disabled. 1?b1: cam entry x is enabled. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 92 cam entry registers (camxx) in the emc of NUC946ADN, there ar e 16 cam entries. in these 16 cam entries, 13 entries (entry 0~12) are to keep destination mac address for packet recogn ition, and the other 3 entr ies (entry 13~15) are for pause control frame transmission. each cam entry consists of 6 bytes. consequently, 2 register ports are needed for each cam entry. for packet recognition, a register pair {camx m, camxl} represents a cam entry and can keep a destination mac address. the corresponding cam enable bit camxen of camen register is also needed be enabled. the x can be the 0 to 12. for pause control frame transmission , first, s/w must configure destin ation mac address of control frame into the register pair {cam13m, cam13l}, source ma c address into the register pair {cam14m, cam14l}, and configure length/type, op-code and operand of control frame into the register pair {cam15m, cam15l}. the bit cam13en, cam14en and cam15en of camen register are also needed be enabled. then, enable the bit sdpz of mcmdr register. register address r/w description reset value cam0m cam0l : cam15m cam15l 0xb000_3008 0xb000_300c : 0xb000_3080 0xb000_3084 r/w cam0 most significant word register cam0 least significant word register : cam15 most significant word register cam15 least significant word register 0x0000_0000 0x0000_0000 : 0x0000_0000 0x0000_0000 camxm 31 30 29 28 27 26 25 24 mac address byte 5 (msb) 23 22 21 20 19 18 17 16 mac address byte 4 15 14 13 12 11 10 9 8 mac address byte 3 7 6 5 4 3 2 1 0 mac address byte 2 bits descriptions [31:0] camxm camx most significant word the camxm keeps the bit 47~16 of mac a ddress. the x can be the 0~14. the register pair {camxm, camxl} represents a cam entry and can keep a mac address. for example, if the mac addr ess 00-50-ba-33-ba-44 is kept in cam entry 1, the register cam1m is 32?h0050_ba33 and cam1l is 32?hba44_0000. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 93 camxl 31 30 29 28 27 26 25 24 mac address byte 1 23 22 21 20 19 18 17 16 mac address byte 0 (lsb) 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved bits descriptions [31:0] camxl camx least significant word the camxl keeps the bit 15~0 of mac a ddress. the x can be the 0~14. the register pair {camxm, camxl} represents a cam entry and can keep a mac address. for example, if the mac addre ss 00-50-ba-33-ba-44 is kept in cam entry 1, the register cam1m is 32?h0050_ba33 and cam1l is 32?hba44_0000. cam15m 31 30 29 28 27 26 25 24 length/type (msb) 23 22 21 20 19 18 17 16 length/type 15 14 13 12 11 10 9 8 op-code (msb) 7 6 5 4 3 2 1 0 op-code bits descriptions [31:16] length/type length/type field of pause control frame in the pause control frame, a length/type field is defined and will be 16?h8808. [15:0] op-code op code field of pause control frame in the pause control frame, an op co de field is defined and will be 16?h0001 . NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 94 cam15l 31 30 29 28 27 26 25 24 operand (msb) 23 22 21 20 19 18 17 16 operand 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved bits descriptions [31:16] operand pause parameter in the pause control frame, an operan d field is defined and controls how much time the destination ethernet mac controller is paused. the unit of the operand is the slot ti me, the 512 bits time. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 95 transmit descriptor link list start address register (txdlsa) the tx descriptor defined in emc is a link-list data structure. the txdlsa keeps the starting address of this link-list. in other words, the txdl sa keeps the starting address of the 1 st tx descriptor. s/w must configure txdlsa before enable bit txon of mcmdr register. register address r/w description reset value txdlsa 0xb000_3088 r/w transmit descriptor link list start address register 0xffff_fffc 31 30 29 28 27 26 25 24 txdlsa 23 22 21 20 19 18 17 16 txdlsa 15 14 13 12 11 10 9 8 txdlsa 7 6 5 4 3 2 1 0 txdlsa bits descriptions [31:0] txdlsa transmit descriptor link-list start address the txdlsa keeps the start address of transmit descriptor link-list. if the s/w enables the bit txon of mcmdr register, the content of txdlsa will be loaded into the current transmit descr iptor start address register (ctxdsa). the txdlsa doesn?t be updated by em c. during the operation, emc will ignore the bits [1:0] of txdlsa. this means that each tx descriptor always must locate at word boundary memory address. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 96 receive descriptor link list start address register (rxdlsa) the rx descriptor defined in emc is a link-list data structure. the rxdlsa keeps the starting address of this link-list. in other words, the rxdl sa keeps the starting address of the 1 st rx descriptor. s/w must configure rxdlsa before enable bit rxon of mcmdr register. register address r/w description reset value rxdlsa 0xb000_308c r/w receive descriptor link list start address register 0xffff_fffc 31 30 29 28 27 26 25 24 rxdlsa 23 22 21 20 19 18 17 16 rxdlsa 15 14 13 12 11 10 9 8 rxdlsa 7 6 5 4 3 2 1 0 rxdlsa bits descriptions [31:0] rtxdlsa receive descriptor link-list start address the rxdlsa keeps the start address of re ceive descriptor link-list. if the s/w enables the bit rxon of mcmdr register, the content of rxdlsa will be loaded into the current receive descrip tor start address register (crxdsa). the rxdlsa doesn?t be updated by em c. during the operation, emc will ignore the bits [1:0] of rxdlsa. this means that each rx descriptor always must locate at word boundary memory address. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 97 mac command register (mcmdr) the mcmdr provides the control information for emc. some command setti ngs affect both frame transmission and reception, such as bit fdup, the full/half duplex mo de selection, or bit opmod, the 100/10m bps mode selection. some command setti ngs control frame transmission and reception separately, likes bit txon and rxon. register address r/w description reset value mcmdr 0xb000_3090 r/w mac command register 0x0000_0000 31 30 29 28 27 26 25 24 reserved swr 23 22 21 20 19 18 17 16 reserved lbk opmod enmdc fdup ensqe sdpz 15 14 13 12 11 10 9 8 reserved ndef txon 7 6 5 4 3 2 1 0 reserved spcrc aep acp arp alp rxon bits descriptions [24] swr software reset the swr implements a reset function to make the emc return default state. the swr is a self-clear bit. this mean s after the software reset finished, the swr will be cleared automatically. enable swr can also reset all control and status registers, exclusive of thes e two bits enrmii and opmod of mcmdr register. the emc re-initial is needed afte r the software reset completed. 1?b0: software reset completed. 1?b1: enable software reset. [21] lbk internal loop back select the lbk enables the emc operating on in ternal loop-back mode. if the lbk is enabled, the packet transmitted out will be loop-backed to rx. if the emc is operating on internal loop-back mode, it also means the emc is operating on full-duplex mode and the value of fdup of mcmdr register is ignored. beside, the lbk doesn?t be affected by swr bit. 1?b0: the emc operates in normal mode. 1?b1: the emc operates in internal loop-back mode. [20] opmod operation mode select the opmod defines the emc is operat ing on 10m or 100m bps mode. the opmod doesn?t be affected by swr bit. 1?b0: the emc operates on 10mbps mode. 1?b1: the emc operates on 100mbps mode. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 98 [19] enmdc enable mdc clock generation the enmdc controls the mdc clock genera tion for mii management interface. if the enmdc is set to 1, the mdc clock generation is enabled. otherwise, the mdc clock generation is disabled. consequently, if s/w wants to access the registers of external phy through m ii management interface, the enmdc must be set to high. 1?b0: disable mdc clock generation. 1?b1: enable mdc clock generation. [18] fdup full duplex mode select the fdup controls that emc is operating on full or half duplex mode. 1?b0: the emc operates on half duplex mode. 1?b1: the emc operates on full duplex mode. [17] ensqe enable sqe checking the ensqe controls the enable of sqe checking. the sqe checking is only available while emc is operating on 10m bps and half duplex mode. in other words, the ensqe cannot affect emc operation, if the emc is operating on 100m bps or full duplex mode. 1?b0: disable sqe checking while em c is operating on 10mbps and half duplex mode. 1?b1: enable sqe checking while emc is operating on 10mbps and half duplex mode. [16] sdpz send pause frame the sdpz controls the pause control frame transmission. if s/w wants to send a pause control frame out, the cam entry 13, 14 and 15 must be configured first and the co rresponding cam enable bit of camen register also must be set. then, se t sdpz to 1 enables the pause control frame transmission. the sdpz is a self-clear bit. this means after the pause control frame transmission has completed, the sdpz will be cleared automatically. it is recommended that only enables spdz while emc is operating on full duplex mode. 1?b0: the pause control frame transmission has completed. 1?b1: enable emc to transmit a pause control frame out. [9] ndef no defer the ndef controls the enable of deferra l exceed counter. if ndef is set to high, the deferral exceed counter is disa bled. the ndef is only useful while emc is operating on half duplex mode. 1?b0: the deferral exceed counter is enabled. 1?b1: the deferral exceed counter is disabled. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 99 [8] txon frame transmission on the txon controls the normal packet tran smission of emc. if the txon is set to high, the emc starts the packet tr ansmission process, including the tx descriptor fetching, packet transmission and tx descriptor modification. it is must to finish emc initial sequence before enable txon. otherwise, the emc operation is undefined. if the txon is disabled during emc is transmitting a packet out, the emc stops the packet transmission process after the current packet transmission finished. 1?b0: the emc stops packet transmission process. 1?b1: the emc starts pack et transmission process. [5] spcrc strip crc checksum the spcrc controls if the length of incoming packet is calculated with 4 bytes crc checksum. if the spcrc is set to high, 4 bytes crc checksum is excluded from length calculation of incoming packet. 1?b0: the 4 bytes crc checksum is included in packet length calculation. 1?b1: the 4 bytes crc checksum is excl uded in packet length calculation. [4] aep accept crc error packet the aep controls the emc accepts or dr ops the crc error packet. if the aep is set to high, the incoming packet with crc error will be received by emc as a good packet. 1?b0: the crc error packet will be dropped by emc. 1?b1: the crc error packet will be accepted by emc. [3] acp accept control packet the acp controls the control frame recept ion. if the acp is set to high, the emc will accept the control frame. otherwise, the control frame will be dropped. it is recommended that s/w only enable aep while emc is operating on full duplex mode. 1?b0: the control frame will be dropped by emc. 1?b1: the control frame will be accepted by emc. [2] arp accept runt packet the arp controls the runt packet, which length is less than 64 bytes, reception. if the arp is set to high, the emc will accept the runt packet. otherwise, the runt packet will be dropped. 1?b0: the runt packet will be dropped by emc. 1?b1: the runt packet will be accepted by emc. [1] alp accept long packet the alp controls the long packet, whic h packet length is greater than 1518 bytes, reception. if the alp is set to high, the emc will accept the long packet. otherwise, the long packet will be dropped. 1?b0: the long packet will be dropped by emc. 1?b1: the long packet will be accepted by emc. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 100 [0] rxon frame reception on the rxon controls the normal packet rece ption of emc. if the rxon is set to high, the emc starts the packet receptio n process, including the rx descriptor fetching, packet reception an d rx descriptor modification. it is must to finish emc initial sequence before enable rxon. otherwise, the emc operation is undefined. if the rxon is disabled during emc is receiving an incoming packet, the emc stops the packet reception process after the current packet reception finished. 1?b0: the emc stops packet reception process. 1?b1: the emc starts packet reception process. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 101 mii management data register (miid) the emc provides mii management function to access th e control and status regist ers of the external phy. the miid register is used to store the data that will be written into the registers of external phy for write command or the data that is read from the registers of external phy for read command. register address r/w description reset value miid 0xb000_3094 r/w mii management data register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 miidata 7 6 5 4 3 2 1 0 miidata bits descriptions [15:0] miidata mii management data the miidata is the 16 bits data that will be written into the registers of external phy for mii management wr ite command or the data from the registers of external phy for mii management read command. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 102 mii management control and address register (miida) the emc provides mii management function to access th e control and status regist ers of the external phy. the miida register is used to keep the mii management command inform ation, like the register address, external phy address, mdc cloc king rate, read/write etc. register address r/w description reset value miida 0xb000_3098 r/w mii management control and address register 0x0090_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 mdccr mdcon presp busy write 15 14 13 12 11 10 9 8 reserved phyad 7 6 5 4 3 2 1 0 reserved phyrad bits descriptions [23:20] mdccr mdc clock rating (default value: 4?h9) the mdccr controls the mdc clock rating for mii management i/f. depend on the ieee std. 802.3 clause 22.2.2.11, the minimum period for mdc shall be 400ns. in other words, the maximum frequency for mdc is 2.5mhz. the mdc is divided from the ahb bus clock, the hclk. consequently, for different hclks the different ratios are required to generate appropriate mdc clock. the following table shows relationship between hclk and mdc clock in different mdccr configurations. the t hclk indicates the period of hclk. mdccr [23:20] mdc clock period mdc clock frequency 4?b0000 4 x t hclk hclk/4 4?b0001 6 x t hclk hclk/6 4?b0010 8 x t hclk hclk/8 4?b0011 12 x t hclk hclk/12 4?b0100 16 x t hclk hclk/16 4?b0101 20 x t hclk hclk/20 4?b0110 24 x t hclk hclk/24 4?b0111 28 x t hclk hclk/28 4?b1000 30 x t hclk hclk/30 4?b1001 32 x t hclk hclk/32 4?b1010 36 x t hclk hclk/36 4?b1011 40 x t hclk hclk/40 4?b1100 44 x t hclk hclk/44 4?b1101 48 x t hclk hclk/48 4?b1110 54 x t hclk hclk/54 4?b1111 60 x t hclk hclk/60 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 103 [19] mdcon mdc clock on always the mdc controls the mdc clock generati on. if the mdcon is set to high, the mdc clock actives always. otherwise, the mdc will only active while s/w issues a mii management command. 1?b0: the mdc clock will only active while s/w issues a mii management command. 1?b1: the mdc clock actives always. [18] presp preamble suppress the presp controls the preamble field generation of mii management frame. if the presp is set to high, the preamb le field generation of mii management frame is skipped. 1?b0: preamble field gene ration of mii management frame is not skipped. 1?b1: preamble field generation of mii management frame is skipped. [17] busy busy bit the busy controls the en able of the mii management frame generation. if s/w wants to access registers of extern al phy, it set busy to high and emc generates the mii management fram e to external phy through mii management i/f. the busy is a self-clear bit. this means the busy will be cleared automatically after the m ii management command finished. 1?b0: the mii management has finished. 1?b1: enable emc to generate a mii management command to external phy. [16] write write command the write defines the mii management command is a read or write. 1?b0: the mii management command is a read command. 1?b1: the mii management command is a write command. [12:8] phyad phy address the phyad keeps the address to differe ntiate which external phy is the target of the mii management command. [4:0] phyrad phy register address the phyrad keeps the address to indicate which register of external phy is the target of the mii management command. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 104 mii management function frame format in ieee std. 802.3 clause 22.2.4, th e mii management function is defi ned. the mii management function is used for the purpose of controlling the phy and gathering status from the phy. the mii management frame format is shown as follow. management frame fields pre st op phyad regad ta data idle read 1?1 01 10 aaaaa rrrrr z0 dddddddddddddddd z write 1?1 01 01 aaaaa rrrrr 10 dddddddddddddddd z mii management function configure sequence read write 1. set appropriate mdccr. 2. set phyad and phyrad. 3. set write to 1?b0 4. set bit busy to 1?b1 to send a mii management frame out. 5. wait busy to become 1?b0. 6. read data from miid register. 7. finish the read command. 1. write data to miid register 2. set appropriate mdccr. 3. set phyad and phyrad. 4. set write to 1?b1 5. set bit busy to 1?b1 to send a mii management frame out. 6. wait busy to become 1?b0. 7. finish the write command. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 105 fifo threshold control register (fftcr) the fftcr defines the high and lo w threshold of internal fifos, including txfifo and rxfifo. the threshold of internal fifos is related to emc reques t generation and when the frame transmission starts. the fftcr also defines the burst length of ahb bus cycle for system memory access. register address r/w description reset value fftcr 0xb000_309c r/w fifo threshold control register 0x0000_0101 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved blength reserved 15 14 13 12 11 10 9 8 reserved txthd 7 6 5 4 3 2 1 0 reserved rxthd bits descriptions [21:20] blength dma burst length the blength defines the burst length of ahb bus cycle while emc accesses system memory. 2?b00: 4 words 2?b01: 8 words 2?b10: 16 words 2?b11: 16 words [9:8] txthd txfifo low threshold default value: 2?b01 the txthd controls when txdma requests internal arbiter for data transfer between system memory and txfifo. the txthd defines not only the low threshold of txfifo, but also the high threshold. the high threshold is the twice of low threshold always. during th e packet transmission, if the txfifo reaches the high threshold, the txdma stops generate request to transfer frame data from system memory to txfi fo. if the frame data in txfifo is less than low threshold, txdma starts to transfer frame data from system memory to txfifo. the txthd also defines when the txma c starts to transmit frame out to network. the txmac starts to transmit the frame out while the txfifo first time reaches the high threshold during the transmission of the frame. if the frame data length is less than txfifo high threshold, the txmac starts to transmit the frame out after the frame data are all inside the txfifo. 2?b00: undefined. 2?b01: txfifo low threshold is 64b and high threshold is 128b. 2?b10: txfifo low threshold is 80b and high threshold is 160b. 2?b11: txfifo low threshold is 96b and high threshold is 192b. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 106 [1:0] rxthd rxfifo high threshold default value: 2?b01 the rxthd controls when rxdma requests internal arbiter for data transfer between rxfifo and system memory. th e rxthd defines not only the high threshold of rxfifo, but also the low th reshold. the low threshold is the half of high threshold always. during the pack et reception, if the rxfifo reaches the high threshold, the rxdma starts to transfer frame data from rxfifo to system memory. if the frame data in rxfifo is less than low threshold, rxdma stops to transfer the frame data to system memory. 2?b00: depend on the burst length setting. if the burst length is 8 words, high threshold is 8 words, too. 2?b01: rxfifo high threshold is 64b and low threshold is 32b. 2?b10: rxfifo high threshold is 128b and low threshold is 64b. 2?b11: rxfifo high threshold is 192b and low threshold is 96b. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 107 transmit start demand register (tsdr) if the tx descriptor is not available for use of txdm a after the txon of mcmdr register is enabled, the fsm (finite state machine) of txdma enters the halt state and the frame transmission is halted. after the s/w has prepared the new tx descriptor for frame tran smission, it must issue a write command to tsdr register to make txdma leave halt state and contiguous frame transm ission. the tsdr is a write only register and read from this register is undefined. th e write to tsdr register has took effect only while txdma stayed at halt state. register address r/w description reset value tsdr 0xb000_30a0 w transmit start demand register undefined 31 30 29 28 27 26 25 24 tsd 23 22 21 20 19 18 17 16 tsd 15 14 13 12 11 10 9 8 tsd 7 6 5 4 3 2 1 0 tsd bits descriptions [31:0] tsd transmit start demand NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 108 receive start demand register (rsdr) if the rx descriptor is not available for use of rxdm a after the rxon of mcmdr register is enabled, the fsm (finite state machine) of rxdm a enters the halt state and the fr ame reception is halted. after the s/w has prepared the new rx descriptor for frame re ception, it must issue a write command to rsdr register to make rxdma leave halt state and contiguous frame reception. the rsdr is a write only register and read from this register is undefined. th e write to rsdr register has took effect only while rxdma stayed at halt state. register address r/w description reset value rsdr 0xb000_30a4 w receive start demand register undefined 31 30 29 28 27 26 25 24 rsd 23 22 21 20 19 18 17 16 rsd 15 14 13 12 11 10 9 8 rsd 7 6 5 4 3 2 1 0 rsd bits descriptions [31:0] rsd receive start demand NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 109 maximum receive frame control register (dmarfc) the dmarfc defines the maximum frame length for a re ceived frame that can be stored in the system memory. it is recommend that only use this register while s/w wants to receive a frame which length is greater than 1518 bytes. register address r/w description reset value dmarfc 0xb000_30a8 r/w maximum re ceive frame control register 0x0000_0800 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 rxms 7 6 5 4 3 2 1 0 rxms bits descriptions [15:0] rxms maximum receive frame length default value: 16?h0800 the rxms defines the maximum frame le ngth for received frame. if the frame length of received frame is grea ter than rxms, and bit endfo of mien register is also enabled, the bit dfoi of mista register is set and the rx interrupt is triggered. it is recommended that only use rxms to qualify the length of received frame while s/w wants to receive a fr ame which length is greater than 1518 bytes. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 110 mac interrupt enable register (mien) the mien controls the enable of em c interrupt status to generate in terrupt. two interrupts, rxintr for frame reception and txintr for frame transm ission, are generated from emc to cpu. register address r/w description reset value mien 0xb000_30ac r/w mac interrupt enable register 0x0000_0000 31 30 29 28 27 26 25 24 reserved entxberr 23 22 21 20 19 18 17 16 entdu enlc entxabt enncs enexdef entxcp entxemp entxintr 15 14 13 12 11 10 9 8 reserved encfr reserved enrxberr enrdu enden endfo 7 6 5 4 3 2 1 0 enmmp enrp enalie enrxgd enptle enrxov encrce enrxintr bits descriptions [24] entxberr enable transmit bus error interrupt the entxberr controls the txberr interrupt generati on. if txberr of mista register is set, and both entxberr and entxintr are enabled, the emc generates the tx interrupt to cpu. if entxberr or entxintr is disabled, no tx interrupt is generated to cpu even the txberr of mista register is set. 1?b0: txberr of mista register is ma sked from tx interrupt generation. 1?b1: txberr of mista register can part icipate in tx interrupt generation. [23] entdu enable transmit descriptor unavailable interrupt the entdu controls the tdu interrupt gene ration. if tdu of mista register is set, and both entdu and entxintr ar e enabled, the emc generates the tx interrupt to cpu. if entdu or entxintr is disabled, no tx interrupt is generated to cpu even the tdu of mista register is set. 1?b0: tdu of mista register is mask ed from tx interrupt generation. 1?b1: tdu of mista register can part icipate in tx interrupt generation. [22] enlc enable late collision interrupt the enlc controls the lc in terrupt generation. if lc of mista register is set, and both enlc and entxintr are en abled, the emc generates the tx interrupt to cpu. if enlc or entxintr is disabled, no tx interrupt is generated to cpu even the lc of mista register is set. 1?b0: lc of mista register is mask ed from tx interrupt generation. 1?b1: lc of mista register can part icipate in tx interrupt generation. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 111 [21] entxabt enable transmit abort interrupt the entxabt controls the txabt interru pt generation. if txabt of mista register is set, and both entxabt and entxintr are enabled, the emc generates the tx interrupt to cpu. if entxabt or entxintr is disabled, no tx interrupt is generated to cpu even the txabt of mista register is set. 1?b0: txabt of mista register is ma sked from tx interrupt generation. 1?b1: txabt of mista register can part icipate in tx interrupt generation. [20] enncs enable no carrier sense interrupt the enncs controls the ncs interrupt gene ration. if ncs of mista register is set, and both enncs and entxintr ar e enabled, the emc generates the tx interrupt to cpu. if enncs or entxin tr is disabled, no tx interrupt is generated to cpu even the ncs of mista register is set. 1?b0: ncs of mista register is mask ed from tx interrupt generation. 1?b1: ncs of mista register can part icipate in tx interrupt generation. [19] enexdef enable defer exceed interrupt the enexdef controls the exdef interru pt generation. if exdef of mista register is set, and both enexdef and entxintr are enabled, the emc generates the tx interrupt to cpu. if enexdef or entxintr is disabled, no tx interrupt is generated to cpu even the exdef of mista register is set. 1?b0: exdef of mista register is ma sked from tx interrupt generation. 1?b1: exdef of mista register can part icipate in tx interrupt generation. [18] entxcp enable transmit completion interrupt the entxcp controls the txcp interru pt generation. if txcp of mista register is set, and both entxcp and entxintr are enabled, the emc generates the tx interrupt to cpu. if en txcp or entxintr is disabled, no tx interrupt is generated to cpu even th e txcp of mista register is set. 1?b0: txcp of mista register is ma sked from tx interrupt generation. 1?b1: txcp of mista register can part icipate in tx interrupt generation. [17] entxemp enable transmit fifo underflow interrupt the entxemp controls the txemp interru pt generation. if txemp of mista register is set, and both entxemp and entxintr are enabled, the emc generates the tx interrupt to cpu. if entxemp or entxintr is disabled, no tx interrupt is generated to cpu even the txemp of mista register is set. 1?b0: txemp of mista register is ma sked from tx interrupt generation. 1?b1: txemp of mista register can part icipate in tx interrupt generation. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 112 [16] entxintr enable transmit interrupt the entxintr controls the tx interrupt generation. if entxintr is enabled and txintr of mista register is high, emc generates the tx interrupt to cpu. if entxintr is disabled, no tx interrupt is generated to cpu even the status bits 17~24 of mista are set and the corresponding bits of mien are enabled. in other words, if s/w wants to receive tx interrupt from emc, this bit must be enabled. and, if s/w doesn?t want to receive any tx interrupt from emc, disables this bit. 1?b0: txintr of mista register is ma sked and tx interrupt generation is disabled. 1?b1: txintr of mista register is unm asked and tx interrupt generation is enabled. [14] encfr enable control frame receive interrupt the encfr controls the cfr interrupt gene ration. if cfr of mista register is set, and both encfr and entxintr are enabled, the emc generates the rx interrupt to cpu. if encfr or entxintr is disabled, no rx interrupt is generated to cpu even the cfr of mista register is set. 1?b0: cfr of mista register is mask ed from rx interrupt generation. 1?b1: cfr of mista register can part icipate in rx interrupt generation. [11] enrxberr enable receive bus error interrupt the enrxberr controls the rxberr interrupt generati on. if rxberr of mista register is set, and both enrxberr and entxintr are enabled, the emc generates the rx interrupt to cpu. if enrxberr or entxintr is disabled, no rx interrupt is generated to cpu even the rxberr of mista register is set. 1?b0: rxberr of mista register is ma sked from rx interrupt generation. 1?b1: rxberr of mista register can part icipate in rx interrupt generation. [10] enrdu enable receive descriptor unavailable interrupt the enrdu controls the rd u interrupt generation. if rdu of mista register is set, and both enrdu and entxintr are enabled, the emc generates the rx interrupt to cpu. if enrdu or entxintr is disabled, no rx interrupt is generated to cpu even the rdu of mista register is set. 1?b0: rdu of mista register is mask ed from rx interrupt generation. 1?b1: rdu of mista register can part icipate in rx interrupt generation. [9] enden enable dma early notification interrupt the enden controls the deni interrupt ge neration. if deni of mista register is set, and both enden and entxintr are enabled, the emc generates the rx interrupt to cpu. if enden or entx intr is disabled, no rx interrupt is generated to cpu even the deni of mista register is set. 1?b0: deni of mista register is ma sked from rx interrupt generation. 1?b1: deni of mista register can part icipate in rx interrupt generation. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 113 [8] endfo enable maximum frame length interrupt the endfo controls the dfoi interrupt ge neration. if dfoi of mista register is set, and both endfo and entxintr are enabled, the emc generates the rx interrupt to cpu. if endfo or entxintr is disabled, no rx interrupt is generated to cpu even the dfoi of mista register is set. 1?b0: dfoi of mista register is ma sked from rx interrupt generation. 1?b1: dfoi of mista register can part icipate in rx interrupt generation. [7] enmmp enable more missed packet interrupt the enmmp controls the mmp interrupt ge neration. if mmp of mista register is set, and both enmmp and entxintr are enabled, the emc generates the rx interrupt to cpu. if enmmp or entxintr is disabled, no rx interrupt is generated to cpu even the mmp of mista register is set. 1?b0: mmp of mista register is mask ed from rx interrupt generation. 1?b1: mmp of mista register can part icipate in rx interrupt generation. [6] enrp enable runt packet interrupt the enrp controls the rp in terrupt generation. if rp of mista register is set, and both enrp and entxintr are en abled, the emc generates the rx interrupt to cpu. if enrp or entxintr is disabled, no rx interrupt is generated to cpu even the rp of mista register is set. 1?b0: rp of mista register is mask ed from rx interrupt generation. 1?b1: rp of mista register can part icipate in rx interrupt generation. [5] enalie enable alignment error interrupt the enalie controls the al ie interrupt generation. if alie of mista register is set, and both enalie and entxintr are enabled, the emc generates the rx interrupt to cpu. if enalie or entxintr is disabled, no rx interrupt is generated to cpu even the alie of mista register is set. 1?b0: alie of mista register is ma sked from rx interrupt generation. 1?b1: alie of mista register can part icipate in rx interrupt generation. [4] enrxgd enable receive good interrupt the enrxgd controls the rxgd interru pt generation. if rxgd of mista register is set, and both enrxgd and entxintr are enabled, the emc generates the rx interrupt to cpu. if en rxgd or entxintr is disabled, no rx interrupt is generated to cpu even th e rxgd of mista register is set. 1?b0: rxgd of mista register is ma sked from rx interrupt generation. 1?b1: rxgd of mista register can pa rticipate in rx interrupt generation . [3] enptle enable packet too long interrupt the enptle controls the ptle interrupt generation. if ptle of mista register is set, and both enptle and entxintr are enabled, the emc generates the rx interrupt to cpu. if enptle or entxintr is disabled, no rx interrupt is generated to cpu even the ptle of mista register is set. 1?b0: ptle of mista register is ma sked from rx interrupt generation. 1?b1: ptle of mista register can part icipate in rx interrupt generation. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 114 [2] enrxov enable receive fifo overflow interrupt the enrxov controls the rxov interru pt generation. if rxov of mista register is set, and both enrxov and entxintr are enabled, the emc generates the rx interrupt to cpu. if en rxov or entxintr is disabled, no rx interrupt is generated to cpu even th e rxov of mista register is set. 1?b0: rxov of mista register is ma sked from rx interrupt generation. 1?b1: rxov of mista register can part icipate in rx interrupt generation. [1] encrce enable crc error interrupt the encrce controls the crce interrupt generation. if crce of mista register is set, and both encrce and entxintr are enabled, the emc generates the rx interrupt to cpu. if encrce or entxintr is disabled, no rx interrupt is generated to cpu even the crce of mista register is set. 1?b0: crce of mista register is mask ed from rx interrupt generation. 1?b1: crce of mista register can part icipate in rx interrupt generation. [0] enrxintr enable receive interrupt the enrxintr controls the rx interrupt generation. if enrxintr is enabled and rxintr of mista register is high, emc generates the rx interrupt to cpu. if enrxintr is disabled, no rx interrupt is generated to cpu even the status bits 1~14 of mista are set and the corresponding bits of mien are enable d. in other words, if s/w wants to receive rx interrupt from emc, this bit must be enabled. and, if s/w doesn?t want to receive any rx interrupt from emc, disables this bit. 1?b0: rxintr of mista register is ma sked and rx interrupt generation is disabled. 1?b1: rxintr of mista register is unm asked and rx interrupt generation is enabled. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 115 mac interrupt status register (mista) the mista keeps much emc statuses, like frame transmission and receptio n status, internal fifo status and also nata processing status. the statuses kept in mista will trigger the reception or transmission interrupt. the mista is a write clear register and write 1 to corresponding bit clears the status and also clears the interrupt. register address r/w description reset value mista 0xb000_30b0 r/w mac interrupt status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved txberr 23 22 21 20 19 18 17 16 tdu lc txabt ncs exdef txcp txemp txintr 15 14 13 12 11 10 9 8 reserved cfr reserved rxberr rdu deni dfoi 7 6 5 4 3 2 1 0 mmp rp alie rxgd ptle rxov crce rxintr bits descriptions [24] txberr transmit bus error interrupt the txberr high indicates the memory controller replies error response while emc access system memory through txdma during packet transmission process. reset emc is recommended while txberr status is high. if the txberr is high and entxberr of mi en register is enabled, the txintr will be high. write 1 to this bit clears the txberr status. 1?b0: no error response is received. 1?b1: error response is received. [23] tdu transmit descriptor unavailable interrupt the tdu high indicates that there is no available tx descriptor for packet transmission and txdma will stay at halt state. once, the txdma enters the halt state, s/w must i ssues a write command to tsdr register to make txdma leave halt state while new tx descriptor is available. if the tdu is high and entdu of mien register is enabled, the txintr will be high. write 1 to this bit clears the tdu status. 1?b0: tx descriptor is available. 1?b1: tx descriptor is unavailable. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 116 [22] lc late collision interrupt the lc high indicates the collision occurred in the outside of 64 bytes collision window. this means after the 64 bytes of a frame has transmitted out to the network, the collision still occurred. the late collision check will only be done while emc is operating on half-duplex mode. if the lc is high and enlc of mien register is enabled, the txintr will be high. write 1 to this bit clears the lc status. 1?b0: no collision occurred in the outside of 64 bytes collision window. 1?b1: collision occurred in the outside of 64 bytes collision window. [21] txabt transmit abort interrupt the txabt high indicates the packet incurred 16 consecutive collisions during transmission, and then the tran smission process for this packet is aborted. the transmission abort is only available while emc is operating on half-duplex mode. if the txabt is high and entxabt of mi en register is enabled, the txintr will be high. write 1 to this bit clears the txabt status. 1?b0: packet doesn?t incur 16 consecutive collisions during transmission. 1?b1: packet incurred 16 consecutive collisions during transmission. [20] ncs no carrier sense interrupt the ncs high indicates the m ii i/f signal crs doesn?t active at the start of or during the packet transmission. the ncs is only available while emc is operating on half-duplex mode. if the ncs is high and enncs of mien register is enabled, the txintr will be high. write 1 to this bit clears the ncs status. 1?b0: crs signal actives correctly. 1?b1: crs signal doesn?t active at the start of or during the packet transmission. [19] exdef defer exceed interrupt the exdef high indicates the frame wa iting for transmission has deferred over 0.32768ms on 100mbps mode, or 3.2768ms on 10mbps mode. the deferral exceed check will only be done while bit ndef of mcmdr is disabled, and emc is operating on half-duplex mode. if the exdef is high and enexdef of mien register is enabled, the txintr will be high. write 1 to this bit clears the exdef status. 1?b0: frame waiting for transmissi on has not deferred over 0.32768ms (100mbps) or 3.2768ms (10mbps). 1?b1: frame waiting for transmi ssion has deferred over 0.32768ms (100mbps) or 3.2768ms (10mbps). [18] txcp transmit completion interrupt the txcp indicates the packet tran smission has completed correctly. if the txcp is high and entxcp of mien register is enabled, the txintr will be high. write 1 to this bit clears the txcp status. 1?b0: the packet transmi ssion doesn?t complete. 1?b1: the packet transmission has completed. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 117 [17] txemp transmit fifo underflow interrupt the txemp high indicates the txfifo underflow occurred during packet transmission. while the txfifo underflow occurred, the emc will retransmit the packet automatically without s/w in tervention. if the txfifo underflow occurred often, it is recommended that modify txfifo threshold control, the txthd of fftcr register, to higher level. if the txemp is high and entxemp of mien register is enabled, the txintr will be high. write 1 to this bit clears the txemp status. 1?b0: no txfifo underflow occurre d during packet transmission. 1?b0: txfifo underflow occurred during packet transmission. [16] txintr transmit interrupt the txintr indicates the tx interrupt status. if txintr high and its corresponding enable bit, entxintr of mista register, is also high in dicates the emc generates tx interrupt to cpu. if txintr is high but entxintr of mista is disabled, no tx interrupt is generated. the txintr is a logic or result of th e bits 17~24 in mista register do logic and with the corresponding bits in mien register. in other words, if one of the bits 17~24 in mista register is high and its corresponding enable bit in mien register is also enabled, the txintr will be high. because the txintr is a logic or result, clears bits 17~ 24 of mista register makes txintr be cleared, too. 1?b0: no status of bits 17~24 in mista is set or no enable of bits 17~24 in mien is turned on. 1?b1: at least one status of bits 17~24 in mista is set and its corresponding enable bit is turned on. [14] cfr control frame receive interrupt the cfr high indicates emc receives a flow control frame. the cfr only available while emc is operating on full duplex mode. if the cfr is high and encfr of mien register is enabled, the rxintr will be high. write 1 to this bit clears the cfr status. 1?b0: the emc doesn?t receive the flow control frame. 1?b1: the emc receives a flow control frame. [11] rxberr receive bus error interrupt the rxberr high indicates the memory controller replies error response while emc access system memory thro ugh rxdma during packet reception process. reset emc is recommended while rxberr status is high. if the rxberr is high and enrxberr of mi en register is enabled, the rxintr will be high. write 1 to this bit clears the rxberr status. 1?b0: no error response is received. 1?b1: error response is received. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 118 [10] rdu receive descriptor unavailable interrupt the rdu high indicates that there is no available rx descriptor for packet reception and rxdma will stay at halt state. once, the rxdma enters the halt state, s/w must issues a write command to rsdr register to make rxdma leave halt state while new rx descriptor is available. if the rdu is high and enrdu of mien register is enabled, the rxintr will be high. write 1 to this bit clears the rdu status. 1?b0: rx descriptor is available. 1?b1: rx descriptor is unavailable. [9] deni dma early notification interrupt the deni high indicates the emc has re ceived the length/type field of the incoming packet. if the deni is high and endeni of mien register is enabled, the rxintr will be high. write 1 to this bit clears the deni status. 1?b0: the length/type field of incomi ng packet has not received yet. 1?b1: the length/type field of incoming packet has received. [8] dfoi maximum frame length interrupt the dfoi high indicates the length of the incoming packet has exceeded the length limitation configured in dmarfc register and the incoming packet is dropped. if the dfoi is high and endf o of mien register is enabled, the rxintr will be high. write 1 to this bit clears the dfoi status. 1?b0: the length of the incoming packet doesn?t exceed the length limitation configured in dmarfc. 1?b1: the length of the incoming pack et has exceeded the length limitation configured in dmarfc. [7] mmp more missed packet interrupt the mmp high indicates the mpcnt, mi ssed packet count, has overflow. if the mmp is high and enmmp of mien register is enabled, the rxintr will be high. write 1 to this bit clears the mmp status. 1?b0: the mpcnt has not rolled over yet. 1?b1: the mpcnt has rolled over yet. [6] rp runt packet interrupt the rp high indicates the length of th e incoming packet is less than 64 bytes and, the packet is dropped. if the ar p of mcmdr register is set, the short packet is regarded as a good packet and rp will not be set. if the rp is high and enrp of mien register is enabled, the rxintr will be high. write 1 to this bit clears the rp status. 1?b0: the incoming frame is not a short frame or s/w wants to receive a short frame. 1?b1: the incoming frame is a short frame and dropped. [5] alie alignment error interrupt the alie high indicates the length of the incoming frame is not a multiple of byte. if the alie is high and enalie of mien register is enabled, the rxintr will be high. write 1 to this bit clears the alie status. 1?b0: the frame length is a multiple of byte. 1?b1: the frame length is not a multiple of byte. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 119 [4] rxgd receive good interrupt the rxgd high indicates the fr ame reception has completed. if the rxgd is high and enrxgd of mien register is enabled, the rxintr will be high. write 1 to this bit clears the rxgd status. 1?b0: the frame reception has not complete yet. 1?b1: the frame reception has completed. [3] ptle packet too long interrupt the ptle high indicates the length of the incoming packet is greater than 1518 bytes and the incoming packet is dropped. if the alp of mcmdr register is set, the long packet will be regarded as a good packet and ptle will not be set. if the ptle is high and enptle of mien register is enabled, the rxintr will be high. write 1 to this bit clears the ptle status. 1?b0: the incoming frame is not a long frame or s/w wants to receive a long frame. 1?b1: the incoming frame is a long frame and dropped. [2] rxov receive fifo overflow interrupt the rxov high indicates the rxfifo overflow occurred during packet reception. while the rxfifo overflow occurred, the emc drops the current receiving packer. if the rxfifo overfl ow occurred often, it is recommended that modify rxfifo threshold control, the rxthd of fftcr register, to higher level. if the rxov is high and enrxov of mien register is enabled, the rxintr will be high. write 1 to this bit clears the rxov status. 1?b0: no rxfifo overflow occu rred during packet reception. 1?b0: rxfifo overflow occurre d during packet reception. [1] crce crc error interrupt the crce high indicates the incoming packet incurred the crc error and the packet is dropped. if the aep of mcmdr register is set, the crc error packet will be regarded as a good packet and crce will not be set. if the crce is high and encrce of mien register is enabled, the rxintr will be high. write 1 to this bit clears the crce status. 1?b0: the frame doesn?t incur crc error. 1?b1: the frame incurred crc error. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 120 [0] rxintr receive interrupt the rxintr indicates the rx interrupt status. if rxintr high and its corresponding enable bit, enrxintr of mista register, is also high in dicates the emc generates rx interrupt to cpu. if rxintr is high but enrxintr of mist a is disabled, no rx interrupt is generated. the rxintr is a logic or result of the bits 1~14 in mista register do logic and with the corresponding bits in mien register. in other words, if one of the bits 1~14 in mista register is high and its corresponding enable bit in mien register is also enabled, the rxintr will be high. because the rxintr is a logic or result , clears bits 1~14 of mista register makes rxintr be cleared, too. 1?b0: no status of bits 1~14 in mista is set or no enable of bits 1~14 in mien is turned on. 1?b1: at least one status of bits 1~14 in mista is set and its corresponding enable bit is turned on. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 121 mac general status register (mgsta) the mgsta also keeps the statuses of emc. but the statuses in the mgsta will not trigger any interrupt. the mgsta is a write clear register and writ e 1 to corresponding bit clears the status. register address r/w description reset value mgsta 0xb000_30b4 r/w mac general status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved txha sqe pau def 7 6 5 4 3 2 1 0 ccnt reserved rffull rxha cfr bits descriptions [11] txha transmission halted default value: 1?b0 the txha high indicates the next normal packet transmission process will be halted because the bit txon of mcmdr is disabled be s/w. 1?b0: next normal packet transmission process will go on. 1?b1: next normal packet transmission process will be halted. [10] sqe signal quality error default value: 1?b0 the sqe high indicates the sqe error found at end of packet transmission on 10mbps half-duplex mode. the sqe error check will only be done while both bit ensqe of mcmdr is enabled and emc is operating on 10mbps half-duplex mode. 1?b0: no sqe error found at end of packet transmission. 1?b0: sqe error found at en d of packet transmission. [9] pau transmission paused default value: 1?b0 the pau high indicates the next normal packet transmission process will be paused temporally because emc received a pause control frame, or s/w set bit sdpz of mcmdr and make emc to transmit a pause control frame out. 1?b0: next normal packet transmission process will go on. 1?b1: next normal packet transmission process will be paused. [8] def deferred transmission default value: 1?b0 the def high indicates the packet tr ansmission has defe rred once. the def is only available while emc is operating on half-duplex mode. 1?b0: packet transmi ssion doesn?t defer. 1?b1: packet transmissi on has deferred once. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 122 [7:4] ccnt collision count default value: 4?h0 the ccnt indicates the how many collisions occurred consecutively during a packet transmission. if the packet incurred 16 consecutive collisions during transmission, the ccnt will be 4?h0 and bit txabt will be set to 1. [2] rffull rxfifo full default value: 1?b0 the rffull indicates the rxfifo is full due to four 64-byte packets are kept in rxfifo and the following incoming packet will be dropped. 1?b0: the rxfifo is not full. 1?b1: the rxfifo is full and the following incoming packet will be dropped. [1] rxha receive halted default value: 1?b0 the rxha high indicates the next normal packet reception process will be halted because the bit rxon of mcmdr is disabled be s/w. 1?b0: next normal packet reception process will go on. 1?b1: next normal packet reception process will be halted. [0] cfr control frame received default value: 1?b0 the cfr high indicates emc receives a flow control frame. the cfr only available while emc is operating on full duplex mode. 1?b0: the emc doesn?t receive the flow control frame. 1?b1: the emc receives a flow control frame. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 123 missed packet count register (mpcnt) the mpcnt keeps the number of packets that were dr opped due to various types of receive errors. the mpcnt is a read clear register. in addition, s/w also can write an initial value to mpcnt and the missed packet counter will start counting from that initial value. if the missed packet counter is overflow, the mmp of mista will be set. register address r/w description reset value mpcnt 0xb000_30b8 r/w missed packet count register 0x0000_7fff 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 mpc 7 6 5 4 3 2 1 0 mpc bits descriptions [15:0] mpc miss packet count default value: 16?h7fff the mpc indicates the number of packet s that were dropped due to various types of receive errors. the following type of receiving error makes missed packet counter increase: ? incoming packet is incurred rxfifo overflow. ? incoming packet is dropped due to rxon is disabled. incoming packet is incurred crc error. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 124 mac receive pause count register (mrpc) the emc of NUC946ADN supports the pause control fram e reception and recognition. if emc received a pause control frame, the operand field of the pause control frame will be extracted and stored in the mrpc register. the mrpc register will keep the same while tx of emc is pausing due to the pause control frame is received. the mrpc is read only and write to this register has no effect. register address r/w description reset value mrpc 0xb000_30bc r mac rece ive pause count register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 mrpc 7 6 5 4 3 2 1 0 mrpc bits descriptions [15:0] mrpc mac receive pause count default value: 16?h0 the mrpc keeps the operand field of th e pause control frame. it indicates how many slot time ( 512 bit time) the tx of emc will be paused. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 125 mac receive pause current count register (mrpcc) the emc of NUC946ADN supports the pause control fram e reception and recognition. if emc received a pause control frame, the operand field of the pause control frame will be extracted and stored into a down count timer. the mrpcc shows the current valu e of that down count timer for s/w to know how long the tx of emc will be paused. the mrpcc is read only and write to this register has no effect. register address r/w description reset value mrpcc 0xb000_30c0 r mac receive pause current count register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 mrpcc 7 6 5 4 3 2 1 0 mrpcc bits descriptions [15:0] mrpcc mac receive pause current count default value: 16?h0 the mrpcc shows the current value of that down count timer. if a new pause control frame is received before the timer count down to zero, the new operand of the pause control frame will be stored into the down count timer and the timer starts count down from the new value. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 126 mac remote pause count register (mrepc) the emc of NUC946ADN supports the pause control fram e transmission. after the pause control frame is transmitted out completely, a timer starts to count down from the value of operand of the transmitted pause control frame. the mrepc shows the current valu e of this down count timer. the mrepc is read only and write to this register has no effect. register address r/w description reset value mrepc 0xb000_30c4 r mac remo te pause count register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 mrepc 7 6 5 4 3 2 1 0 mrepc bits descriptions [15:0] mrepc mac remote pause count default value: 16?h0 the mrepc shows the current value of th e down count timer that starts to count down from the value of operand of the transmitted pause control frame. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 127 dma receive frame status register (dmarfs) the dmarfs is used to keep the length/type field of each incoming ethernet packet. this register is writing clear and writes 1 to co rresponding bit clears the bit. register address r/w description reset value dmarfs 0xb000_30c8 r/w dma rece ive frame status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 rxflt 7 6 5 4 3 2 1 0 rxflt bits descriptions [15:0] rxflt receive frame length/type default value: 16?h0 the rxflt keeps the length/type field of each incoming ethernet packet. if the bit enden of mien is enabled an d the length/type field of incoming packet has received, the bit deni of mista will be set and trigger interrupt. and, the content of length/type field will be stored in rxflt. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 128 current transmit descriptor start address register (ctxdsa) register address r/w description reset value ctxdsa 0xb000_30cc r current transmit descriptor start address register 0x0000_0000 31 30 29 28 27 26 25 24 ctxdsa 23 22 21 20 19 18 17 16 ctxdsa 15 14 13 12 11 10 9 8 ctxdsa 7 6 5 4 3 2 1 0 ctxdsa bits descriptions [31:0] ctxdsa current transmit descriptor start address default value: 32?h0 the ctxdsa keeps the start address of tx descriptor that is used by txdma currently. the ctxdsa is read only and write to this register has no effect. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 129 current transmit buffer start address register (ctxbsa) register address r/w description reset value ctxbsa 0xb000_30d0 r current transmit buffer start address register 0x0000_0000 31 30 29 28 27 26 25 24 ctxbsa 23 22 21 20 19 18 17 16 ctxbsa 15 14 13 12 11 10 9 8 ctxbsa 7 6 5 4 3 2 1 0 ctxbsa bits descriptions [31:0] ctxbsa current transmit buffer start address default value: 32?h0 the ctxdsa keeps the start address of tx frame buffer that is used by txdma currently. the ctxbsa is read only and write to this register has no effect. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 130 current receive descriptor start address register (crxdsa) register address r/w description reset value crxdsa 0xb000_30d4 r current receive descriptor start address register 0x0000_0000 31 30 29 28 27 26 25 24 crxdsa 23 22 21 20 19 18 17 16 crxdsa 15 14 13 12 11 10 9 8 crxdsa 7 6 5 4 3 2 1 0 crxdsa bits descriptions [31:0] crxdsa current receive descriptor start address default value: 32?h0 the crxdsa keeps the start address of rx descriptor that is used by rxdma currently. the crxdsa is read only and write to this register has no effect. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 131 current receive buffer start address register (crxbsa) register address r/w description reset value crxbsa 0xb000_30d8 r current receiv e buffer start address register 0x0000_0000 31 30 29 28 27 26 25 24 crxbsa 23 22 21 20 19 18 17 16 crxbsa 15 14 13 12 11 10 9 8 crxbsa 7 6 5 4 3 2 1 0 crxbsa bits descriptions [31:0] crxbsa current receive buffer start address default value: 32?h0 the crxbsa keeps the start address of rx frame buffer that is used by rxdma currently. the crxbsa is read only and write to this register has no effect. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 132 7.5.4 operation notes mii management interface the operation mode between emc and external phy mu st be identically. consequently, s/w has to access control register of external phy th rough mii management interface to ge t operation information of phy. to issue mii management command to a ccess external phy, the miid and m iida registers can be used. and, while using mii management interface, the enmd c of mcmdr register mu st be set to high. emc initial if s/w wants to enable emc for packet transmissi on and reception, the tx on and rxon of mcmdr register must be enabled. but, before enabling txon and rxon, the following issues must be noted. for packet transmission, the tx descriptor link list and tx frame buffer must be prepared and txdlsa must be configured. for incoming packet destination mac address re cognition, the camcmr, camen, camxm and camxl registers must be configured. for incoming packet?s buffering, the rx descriptor link list and rx frame buffer must be prepared and rxdl sa register must be configured. besides, the interrupt status that s/w wants to know must be enabled through mien register. finally, the emc operation mode control bits of mcmd r must be configured and txon and rxon must be enabled. mac interrupt status register (mista) the mista register keeps the status of emc operation. it is recommended that s/w must enable four interrupt statuses at least. they are txberr, rxberr, tdu and rdu. while emc accesses memory, it reports the memory erro r through txberr or txberr status. if any of them actives, the reset emc is recommended. for packet transmission, a valid tx descriptor is required, and for packet reception, a valid rx one is. if emc cannot find a valid tx or rx descriptor, it sets tdu or rdu to high respectively. after s/w releases a valid tx or rx descriptor to emc, writing tsdr or rsdr register to enable packet transmission and reception again is needed. pause control frame transmission the emc support the pause control frame transmission for flow control while emc is operating on full- duplex mode. the register cam13m, cam13l, cam14 m, cam14l, cam15m and cam15l are designed for this purpose. for pause control frame transmission , first, s/w must configure destin ation mac address of control frame into the register pair {cam13m, cam13l}, source ma c address into the register pair {cam14m, cam14l}, and configure length/type, op-code and operand of control frame into the register pair {cam15m, cam15l}. the bit cam13en, cam14en and cam15en of camen register are also needed be enabled. then, set bit sdpz of mcmdr register to high to enable pause control frame transmission. after the pause control frame transmission completed, the sdpz will be cleared automatically. internal loop-back if the lbk of mcmdr register is set, the emc operates on internal loop-back mo de. while emc operates on internal loop-back mode, it also means emc operates on full-duplex mode, and the value of fdup of mcmdr register is ignored. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 133 7.6 gdma controller 7.6.1 overview & features the chip has a two-channel general dma controller with or without descriptor fetch operation, called the gdma. the two-channel gdma performs the following data transfers without the cpu intervention: ? memory-to-memory (memory to/from memory) ? memory ?to ? io ? io- to -memory the on-chip gdma can be started by the software or external dma request nxdreq0/1. software can also be used to restart the gdma operation after it has b een stopped. the cpu can reco gnize the completion of a gdma operation by software polling or when it receives an internal gdma interrupt. the gdma controller can increment source or destination address, decrement th em as well, and conduct 8- bit (byte) or 16-bit (half- word) data transfers. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 134 7.6.2 gdma descriptor functional description the descriptor-fetch function works when run-bit (bit-3 ) is set and non-dsptrmode-bit (bit-2) is cleared in descriptor register (gdma_dadrx) and the gdma_ctlx bi t setting as following table. the non-descriptor- fetch function works when software triggers the [sof treq] bit (bit-16) and the [gdmaen] bit (bit-0) in gdma_ctlx register. if the [softreq] set to zero and the [gdmams] (bit2-3) set as 01 or 10 will start the i/o to memory function. software can also be used to restart the gdma operation af ter it has been stopped. the cpu can recognize the completion of a gdma operation by software polling or when it receives an internal gdma interrupt. the gdma co ntroller can increase source or dest ination address, decrease them as well, and conduct 8-bit (byte), 16-bit (half-word), or 32-bit (w ord) data transfers. operation mode relevant to enable bit mode enable bit non-descriptor mode with sw enable gdm a_ctlx : gdmaen[0] softreq[16] gdmams[3:2] non-descriptor mode with i/o enable gdma_ctlx : gdmaen[0] gdmams[3:2] descriptor mode with sw enable gdm a_dadrx : run[3] non-dsptrmode[2]; gdma_ctlx in descriptor list : gdmaen[0] gdmams[3:2] descriptor mode with i/o enable gdma_dadrx : run[3] non-dsptrmode[2]; gdma_ctlx in descriptor list : gdmaen[0] gdmams[3:2] NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 135 7.6.2.1 descriptor fetch function the illustration of descriptor list fetches: memory next descriptor address 0 source address 0 destination address 0 command information 0 next descriptor address 1 source address 1 destination address 1 command information 1 next descriptor address 2 source address 2 . . . next descriptor address source address x destination address x command information x gdma_dadrx[31:4] + 0x00 ordering programming by software gdma_dadrx[31:4] + 0x1 0 gdma_dadrx[31:4] + 0x1 0 gdma_dadrx gdma fetch descriptor single channel descriptor internal descriptor register gdma_srcbx gdma_dstbx gdma_tcntx gdma_ctlx gdma a descriptor list finished bit[31:18] bit[17:0] bit[31:0] bit[31:0] bit[31:0] gdma_dadrx[31:4] + 0x04 gdma_dadrx[31:4] + 0x08 gdma_dadrx[31:4] + 0x0c gdma_dadrx[31:4] + 0x00 gdma_dadrx[31:4] + 0x04 gdma_dadrx[31:4] + 0x08 gdma_dadrx[31:4] + 0x0c gdma_dadrx[31:4] + 0x00 gdma_dadrx[31:4] + 0x04 gdma_dadrx[31:4] + 0x00 gdma_dadrx[31:4] + 0x04 gdma_dadrx[31:4] + 0x08 gdma_dadrx[31:4] + 0x0c NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 136 descriptor-based function (gdma_dadrx [non_d sptrmode] = 0) operate in the following condition: memory to memory 1. software can write a value 0x04 to current gdma_d adrx register to reset the register and disable descriptor based function first. 2. then software can program the bits of [descr iptor address], [run], [non_dsptrmode] and [orden] to the gdma_dadrx register to en able descriptor based function. (the descriptor can only work when the [run] [3] is set and [non_dsptrmode] [2] bit is cleared properly.) 3. after sets current gdma_dadrx register, the gdma will fetch four-word information from memory immediately which contains the next descriptor a ddress, source address, destination address and command information. (command information co nsists of control and counter registers) note: gdma will read the descriptor list from memory such the diagram above and write back to gdma internal register (next gdm a_dadrx), gdma_srcbx, gdma_dst bx, gdma_ctlx and gdma_tcntx registers. the most important one of write back is command information, which will separate some bits of command information into control and counter regi sters respectively. the firs t fourteen bits of the msb of the command information in descriptor list will be written back to gdma_tcntx register, and the others bits of the command information will be written back to gdma_ctlx register. the control register part of the command information will update the gdma_ctlx register during every descriptor fetch. the allocation of command information is described at gdma register descriptions. the allocation of command information in descriptor list: 4. gdma will depend on the information to request a bus ownership and start the data transfer when gdma has gotten a bus grant from the arbiter, otherwise, it will wait until get bus grant. the data transfer direction is depend ent on the control register. 5. the gdma transfers data and releases bus at every burst transfer. the gdma will stop transfer for current descriptor when the counter is decreased to zero. the current gdma_dadrx will be updated by next gdma_dadrx at end of each descriptor transfer. 6. the gdma is running consecutively unless the next gdma_dadrx[run] bit is zero or interrupt status bit of gdma_intcs register is cleared. the cpu can recognize the completion of a gdma descriptor fetch operation by polling the current gdma_dadrx[non_dsptrmode] bit or set the gdma_ctlx[d_ints] to receive a interrupt from gdma.(note: the recommendation is the [non_dsptrmode] bit in list is set at the same time) 7. when an error occurs in the descriptor operation, gdma will clear [run] bit and stop channel operation immediately. software ca n reset the channel, and sets the cu rrent gdma_dadrx [run] register to 31 30 29 28 27 26 25 24 gdma_tcntx[13:6] ? command info[31:24] 23 22 21 20 19 18 17 16 gdma_tcntx[5:0] ? command info[23:18] block softreq 15 14 13 12 11 10 9 8 tws reserved d_ints d_ints reserved 7 6 5 4 3 2 1 0 safix dafix sadir dadir gdmams bme gdmaen NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 137 start again. memory to i/o and i/o to memory 1. software must set the [req_atv], [ack_atv] and [gdmams] bits in gdma_ctlx register corresponding to i/o pin with pull high or pull low properly first, and then set the current gdma_dadrx to start the i/o to memo ry with descriptor fetch transfer. 2. the descriptor lists stop transfer until the run bit wa s zero in descriptor list wh en external i/o request triggered once. the run bit can be set when external i/o request triggered again under the non_dsptrmode bit was zero in descriptor list. the trigger period of the external i/o has a timing limitation whatever the gdma was in single or burst mode, and the periodic trigger of the external i/o must be less than 38 mclk. 3. each gdma lists can operate after clearing interrupt status. the descriptor lists stop transfer until the run bit was zero or inte rrupt status was set. 4. the next descriptor address, sour ce address, destination address and command information must be set properly in every descriptor list. especially, every bit of the command information will update the gdma_ctlx and gdma_tcntx registers at every initiation of descriptor list. note: the [block] bit of gdma_ctlx register is di sabled when the descriptor mode of the i/o to memory is enabled. note: gdma can change mode with following description: descriptor-fetch of each channel ca n be stopped until the current transf er list done. software can change descriptor mode to non-descritpor mode by writing 0x04 to gdma_dadrx regist er during the current descriptor transfer operating. non-descriptor fetch can be stopped until current transfer count finished when software programs the gdma_ctlx register with gdmaen bi t cleared or softreq cleared. note: once software programs the current gdma_dadrx register, gdma will fetch the descriptor list from memory and fill the data to next gdma_d adrx, current gdma_srcbx, current gdma_dstbx, current gdma_ctlx and current gdm a_tcntx registers automatically. the fourth word in descriptor list includes the information for gdm a_ctlx and gdma_tcntx registers. note: the descriptor fetch function only occurs when current gdma_dadrx [run] bit is set and gdma_dadrx [non_dsptrmode] is cleared. the current gdma_dadrx will be updated by next gdma_dadrx at every descriptor stops. 7.6.2.2 ordering function in descriptor fetch mode this function determines the source of next descrip tor address. if [orden] is set, the gdma controller fetches the next descriptor from current gd ma_dadrx [descriptor address] + 16 bytes. if this bit is cleared, gdma fetches the next descriptor from the current gdma_dadrx [descriptor address]. gdma_dadrx [orden] is only relevant to descrip tor-fetch function (gdma_dadrx [non_dsptrmode] = 0). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 138 7.6.2.3 channel reset the channel reset is turned on when the bit-0 of gdma_dadrx is set. this function will clear all status and stop the descriptor based function relative to in dividual channel. the gdm a_dadrx register value is 0x05h when reset bit is set. 7.6.2.4 non-descriptor fetch function the non-descriptor-fetch function will take place when current gdma_dadrx [non_dsptrmode] is set and the gdma_dadrx register will have no any intention for the gdma controller. the default value of gdma_d adrx is 0x04. software can clear gdm a_dadrx with value 0x04 as well. in this mode, software should write a valid source address to the gdma_srcbx register, a destination address to the gdma_dstbx register, and a transf er count to the gdma_tcntx register. next, the gdma_ctlx of [gdmaen] and [softreq] bits must be set. a non-descriptor fetch is performed when bus granted. after transferring a numbe r of bytes or words correspond with burst mode or not, the channel either waits for the next request or continues with the data transfer until the gdma_ctcntx reaches zero. when gdma_ctcntx reaches zero, the channel stops operation. when an error occurs during the gdma operation, the channel stops unless software clears the error condition and sets the gdma_ctlx of [gdmaen] and [softreq] bits field to start again. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 139 7.6.3 gdma register map r : read only, w : write only, r/w : both read and write, c : only value 0 can be written register address r/w description reset value gdma_ba = 0xb000_4000 channel 0 gdma_ctl0 0xb000_4000 r/w channel 0 control register 0x0000_0000 gdma_srcb0 0xb000_4004 r/w channel 0 source base address register 0x0000_0000 gdma_dstb0 0xb000_4008 r/w channel 0 destination base address register 0x0000_0000 gdma_tcnt0 0xb000_400c r/w channel 0 transfer count register 0x0000_0000 gdma_csrc0 0xb000_4010 r channel 0 current source address register 0x0000_0000 gdma_cdst0 0xb000_4014 r channel 0 current destination address reg. 0x0000_0000 gdma_ctcnt0 0xb000_4018 r channel 0 current transfer count register 0x0000_0000 gdma_dadr0 0xb000_401c r/w channel 0 descriptor address register 0x0000_0004 channel 1 gdma_ctl1 0xb000_4020 r/w channel 1 control register 0x0000_0000 gdma_srcb1 0xb000_4024 r/w channel 1 source base address register 0x0000_0000 gdma_dstb1 0xb000_4028 r/w channel 1 destination base address register 0x0000_0000 gdma_tcnt1 0xb000_402c r/w channel 1 transfer count register 0x0000_0000 gdma_csrc1 0xb000_4030 r channel 1 current source address register 0x0000_0000 gdma_cdst1 0xb000_4034 r channel 1 current destination address reg. 0x0000_0000 gdma_ctcnt1 0xb000_4038 r channel 1 current transfer count register 0x0000_0000 gdma_dadr1 0xb000_403c r/w channel 1 descriptor address register 0x0000_0004 gdma_intbuf0 0xb000_4080 r gdma internal buffer word 0 0x0000_0000 gdma_intbuf1 0xb000_4084 r gdma internal buffer word 1 0x0000_0000 gdma_intbuf2 0xb000_4088 r gdma internal buffer word 2 0x0000_0000 gdma_intbuf3 0xb000_408c r gdma internal buffer word 3 0x0000_0000 gdma_intbuf4 0xb000_4090 r gdma internal buffer word 4 0x0000_0000 gdma_intbuf5 0xb000_4094 r gdma internal buffer word 5 0x0000_0000 gdma_intbuf6 0xb000_4098 r gdma internal buffer word 6 0x0000_0000 gdma_intbuf7 0xb000_409c r gdma internal buffer word 7 0x0000_0000 gdma_intcs 0xb000_40a0 r/w interrupt control and status register (2 channels) 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 140 channel 0/1 control register (gdma_ctl0, gdma_ctl1) register address r/w description reset value gdma_ctl0 0xb000_4000 r/w channel 0 control register 0x0000_0000 gdma_ctl1 0xb000_4020 r/w channel 1 control register 0x0000_0000 the control registers has two formats for descriptor fetc h and non-descriptor fetch function respectively. the functionality of each control bit is described in following table. 1. non-descriptor fetches mode 2. descriptor fetches mode note: ? the bit [req_atv] and [ack_atv] must be set fi rst before using i/o to memory mode with descriptor fetch transfer. these two bits cannot do any setup in command information within descriptor list configuration. the [sabnderr], [dabnderr], [gdmaerr] can also be read at descriptor fetch mode. ? regardless of gdma operate in descriptor mode or non-descriptor mode, when transfer width is 16- bit (half word) and the address wi th decrement function enable fo r starting source address or destination address or both are used should set the least two bit of addresses is 0xf. 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved sabnderr dabnderr reserved autoien reserved block softreq 15 14 13 12 11 10 9 8 reserved tws sbms reserved 7 6 5 4 3 2 1 0 safix dafix sadir dadir gdmams bme gdmaen 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved sabnderr dabnderr reserved block softreq 15 14 13 12 11 10 9 8 reserved tws reserved d_ints reserved 7 6 5 4 3 2 1 0 safix dafix sadir dadir gdmams bme gdmaen NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 141 control register of non-descriptor fetches mode: bits descriptions [22] sabnderr source address boundary alignment error flag if tws [13:12]=10, gdma_srcb [1:0] should be 00 if tws [13:12]=01, gdma_srcb [0] should be 0 except the sadir function enabled. the address boundary alignment should be depended on tws [13:12]. 0 = the gdma_srcb is on the boundary alignment. 1 = the gdma_srcb not on the boundary alignment the sabnderr register bits just can be read only. [21] dabnderr destination address boundary alignment error flag if tws [13:12]=10, gdma_dstb [1:0] should be 00 if tws [13:12]=01, gdma_dstb [0] should be 0 except the sadir function enabled. the address boundary alignment should be depended on tws [13:12]. 0 = the gdma_dstb is on the boundary alignment. 1 = the gdma_dstb not on the boundary alignment the dabnderr register bits just can be read only. [19] autoien auto initialization enable 0 = disables auto initialization 1 = enables auto initialization, the gdma_csrc0/1, gdma_cdst0/1, and gdma_ctcnt0/1 registers are updated by the gdma_src0/1, gdma_dst0/1, and gdma_tcnt0/1 registers automatically when transfer is complete. gdma will start another transfer when softreq set again. [17] block bus lock 0 = unlocks the bus during the period of transfer 1 = locks the bus during the period of transfer [16] softreq software triggered gdma request software can request the gdma transfer service by setting this bit to 1. this bit is automatically cleared by hardware when the transfer is completed. this bit is available only while gdmams [3:2] register bits are set on software mode (memory to memory and memory to i/o). [13:12] tws transfer width select 00 = one byte (8 bits) is transferred for every gdma operation 01 = one half-word (16 bits) is tran sferred for every gdma operation 10 = one word (32 bits) is transferred for every gdma operation 11 = reserved the gdma_scrb and gdm a_dstb should be alignment under the tws selection NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 142 [11] sbms single/block mode select 0 = selects single mode. it requires an external gdma request for every incurring gdma operation. 1 = selects block mode. it requires a single external gdma request during the atomic gdma operation. an atom ic gdma operation is defined as the sequence of gdma operations until the transfer count register reaches zero. [7] safix source address fixed 0 = source address is changed during the gdma operation 1 = do not change the destination address during the gdma operation. this feature can be used when data were transferred from a single source to multiple destinations. [6] dafix destination address fixed 0 = destination address is chan ged during the gdma operation 1 = do not change the destination address during the gdma operation. this feature can be used when data were transferred from multiple sources to a single destination. [5] dadir source address direction 0 = source address is incremented successively 1 = source address is decremented successively [4] dadir destination address direction 0 = destination address is incremented successively 1 = destination address is decremented successively [3:2] gdmams gdma mode select 00 = software mode (memory-to-memory) 01 = external nxdreq0 mode for ex ternal device (i/o to memory) 10 = reserved 11 = reserved [1] bme burst mode enable 0 = disables the 8-data burst mode 1 = enables the 8-data burst mode if there are 8 words to be transferred, and the bme [1] =1, the gdma_tcntx should be 0x01. howeve r, if bme [1] =0, the gdma_tcntx should be 0x08. it has to set bme [1] = 0 for i/o device access. [0] gdmaen gdma enable 0 = disables the gdma operation 1 = enables the gdma operation; this bit will be clear automatically when the transfer is complete on autoien [ 19] register bit is on disable mode. note: when operate in non-descriptor mode, this bit determines the memory-to memory, memory-to-i/o and i/o-to-memory operation or not. when operate in descriptor mode, this bit is determined in descriptor list. note: channel reset will clear this bit. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 143 descriptor fetches mode of control register: bits descriptions [22] sabnderr source address boundary alignment error flag if tws [13:12]=10, gdma_srcb [1:0] should be 00 if tws [13:12]=01, gdma_srcb [0] should be 0 except the sadir function enabled. the address boundary alignment should be depended on tws [13:12]. 0 = the gdma_srcb is on the boundary alignment. 1 = the gdma_srcb not on the boundary alignment the sabnderr register bits just can be read only. [21] dabnderr destination address boundary alignment error flag if tws [13:12]=10, gdma_dstb [1:0] should be 00 if tws [13:12]=01, gdma_dstb [0] should be 0 except the dadir function enabled. the address boundary alignment should be depended on tws [13:12]. 0 = the gdma_dstb is on the boundary alignment. 1 = the gdma_dstb not on the boundary alignment the dabnderr register bits just can be read only. [17] block bus lock 0 = unlocks the bus during the period of transfer 1 = locks the bus during the period of transfer [13:12 ] tws transfer width select 00 = one byte (8 bits) is transferred for every gdma operation 01 = one half-word (16 bits) is tran sferred for every gdma operation 10 = one word (32 bits) is transferred for every gdma operation 11 = reserved the gdma_scrb and gdma_dstb shou ld be alignment under the tws selection [10] d_ints descriptor fetch mode interrupt select 0 = the interrupt will take place at every end of descriptor fetch transfer. 1 = the interrupt only take place at the last descriptor fetch transfer. note: this bit is only available in descriptor mode and lists intention. [7] safix source address fixed 0 = source address is changed during the gdma operation 1 = do not change the source addre ss during the gdma operation. this feature can be used when data were transferred from a single source to multiple destinations. [6] dafix destination address fixed 0 = destination address is chan ged during the gdma operation 1 = do not change the destination addr ess during the gdma operation. this feature can be used when data were tr ansferred from multiple sources to a single destination. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 144 [5] sadir source address direction 0 = source address is incremented successively 1 = source address is decremented successively [4] dadir destination address direction 0 = destination address is incremented successively 1 = destination address is decremented successively [3:2] gdmams gdma mode select 00 = software mode (memory-to-memory) 01 = external nxdreq0 mode for external device(i/o-to-memory) 10 = reserved 11 = reserved [1] bme burst mode enable 0 = disables the 8-data burst mode 1 = enables the 8-data burst mode ff there are 8 words to be transfe rred, and bme [1]=1, the gdma_tcnt should be 0x01; however, if bme [1] =0, the gdma_tcnt should be 0x08. it has to set bme [1] = 0 for i/o device access. [0] gdmaen gdma enable 0 = disables the gdma operation 1 = enables the gdma operation; this bit will be clear automatically when the transfer is complete on autoien [ 19] register bit is on disable mode. when operate in non-descriptor mode, this bit determines the memory-to- memory, memory-to-i/o and i/o-to-memory operation or not. when operate in descriptor mode, this bit determines the i/o-to-memory operation or not. channel reset will clear this bit. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 145 channel 0/1 source base address register (gdma_srcb0, gdma_srcb1) register address r/w description reset value gdma_srcb0 0xb000_4004 r/w channel 0 source base address register 0x0000_0000 gdma_srcb1 0xb000_4024 r/w channel 1 source base address register 0x0000_0000 31 30 29 28 27 26 25 24 src_base_addr [31:24] 23 22 21 20 19 18 17 16 src_base_addr [23:16] 15 14 13 12 11 10 9 8 src_base_addr [15:8] 7 6 5 4 3 2 1 0 src_base_addr [7:0] bits descriptions [31:0] src_base_addr 32-bit source base address the gdma channel starts reading its data from the source address as defined in this source base address register. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 146 channel 0/1 destination base address register (gdma_dstb0, gdma_dstb1) register address r/w description reset value gdma_dstb0 0xb000_4008 r/w channel 0 destination base address register 0x0000_0000 gdma_dstb1 0xb000_4028 r/w channel 1 destination base address register 0x0000_0000 31 30 29 28 27 26 25 24 dst_base_addr [31:24] 23 22 21 20 19 18 17 16 dst_base_addr [23:16] 15 14 13 12 11 10 9 8 dst_base_addr [15:8] 7 6 5 4 3 2 1 0 dst_base_addr [7:0] bits descriptions [31:0] dst_base_addr 32-bit destination base address the gdma channel starts writing its data to the destination address as defined in this destination base addr ess register. during a block transfer, the gdma determines successive destin ation addresses by adding to or subtracting from the destination base address. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 147 channel 0/1 transfer count register (gdma_tcnt0, gdma_tcnt1) register address r/w description reset value gdma_tcnt0 0xb000_400c r/w channel 0 transfer count register 0x0000_0000 gdma_tcnt1 0xb000_402c r/w channel 1 transfer count register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 tfr_cnt [23:16] 15 14 13 12 11 10 9 8 tfr_cnt [15:8] 7 6 5 4 3 2 1 0 tfr_cnt [7:0] bits descriptions [23:0] tfr_cnt transfer count non-descriptor mode:24-bit tfr_cnt [23:0] the tfr_cnt represents the required number of gdma transfers. the maximum transfer count is 16m ?1. descriptor mode: 14-bit tfr_cnt [13:0] the tfr_cnt represents the required number of gdma transfers. the maximum transfer count is 16k ?1. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 148 channel 0/1 current source register (gdma_csrc0, gdma_csrc1) register address r/w description reset value gdma_csrc0 0xb000_4010 r channel 0 current source address register 0x0000_0000 gdma_csrc1 0xb000_4030 r channel 1 current source address register 0x0000_0000 31 30 29 28 27 26 25 24 current_src_addr [31:24] 23 22 21 20 19 18 17 16 current_src_addr [23:16] 15 14 13 12 11 10 9 8 current_src_addr [15:8] 7 6 5 4 3 2 1 0 current_src_addr [7:0] bits descriptions [31:0] current_src_addr 32-bit current source address the current_src_addr indicates the source address where the gdma transfer is just occurri ng. during a block transfer, the gdma determines the successive so urce addresses by adding to or subtracting from the source base address. depending on the settings you make to the contro l register, the current source address will remain the same or will be incremented or decremented. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 149 channel 0/1 current destination register (gdma_cdst0, gdma_cdst1) register address r/w description reset value gdma_cdst0 0xb000_4014 r channel 0 current destination address register 0x0000_0000 gdma_cdst1 0xb000_4034 r channel 1 current destination address register 0x0000_0000 31 30 29 28 27 26 25 24 current_dst_addr [31:24] 23 22 21 20 19 18 17 16 current_dst_addr [23:16] 15 14 13 12 11 10 9 8 current_dst_addr [15:8] 7 6 5 4 3 2 1 0 current_dst_addr [7:0] bits descriptions [31:0] current_dst_addr 32-bit current destination address the current_dst_addr indicates the destination address where the gdma transfer is just occu rring. during a block transfer, the gdma determines the successive de stination addresses by adding to or subtracting from the destin ation base address. depending on the settings you make to the control register, the current destination address will remain the same or will be incremented or decremented. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 150 channel 0/1 current transfer count register (gdma_ctcnt0, gdma_ctcnt1) register address r/w description reset value gdma_ctcnt0 0xb000_4018 r channel 0 current transfer count register 0x0000_0000 gdma_ctcnt1 0xb000_4038 r channel 1 current transfer count register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 curent_tfr_cnt [23:16] 15 14 13 12 11 10 9 8 current_tfr_cnt [15:8] 7 6 5 4 3 2 1 0 current_tfr_cnt [7:0] bits descriptions [23:0] current_tfr_cnt current transfer count the current transfer count register indicates the number of transfer being performed. non-descriptor mode: 24-bit curent_tfr_cnt [23:0] descriptor mode : 14-bit curent_tfr_cnt [13:0] NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 151 channel 0/1 descriptor register (gdma_dadr0/1) address r/w description reset value gdma_dadr0 0xb000_401c r/w channel 0 control register 0x0000_0004 gdma_dadr1 0xb000_403c r/w channel 1 control register 0x0000_0004 31 30 29 28 27 26 25 24 descriptor address[31:24] 23 22 21 20 19 18 17 16 descriptor address[23:16] 15 14 13 12 11 10 9 8 descriptor address[15:8] 7 6 5 4 3 2 1 0 descriptor address[7:4] run non_dsptrmode orden reset bits descriptions [31:4] descriptor address descriptor address contains address of next descriptor. [3] run run the run bit can be cleare d during descriptor data transfer, and set run bit to starts the stopped channel under [descriptor address] and [non- dsptrmode] bits are set properly. when run bit is cleared and the non_dsptrmode bit is set that non- descriptor fetch occurs whether a valid descriptor address is written to re gister gdma_dadrx or not. this bit will reset automatically when each descriptor transfer stopped or the bit in descriptor list is zero. the descriptor interrupt is determined by bit-10 of the gdma_ctlx register. 0 = stops the channel. 1 = starts the channel. note: must co-operate to [non_dsp trmode] to start the channel with descriptor fetch function. [2] non_dsptrmode non-descriptor-fetch when non_dsptrmode is set, the channel is considered as a channel with no descriptors. in this mode, the gdma does not initiate descriptor fetching and software can program the scrbx, dstbx, ctrx and tcntx registers to transfer data until the tcntx reaches zero. the gdma_dadrx register is not used in non-descriptor mode. if non_dsptrmdoe is cleared under [run] and [descriptor address] are set properly, gdma controller initiates descriptor-fetching. the descriptor fetc h transfer stops when the counter for the current transfer reaches zero, [run] bit is cleared and [non_dsptrmode] is set base on the bits of the descriptor list. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 152 0 = descriptor-fetch transfer 1 = non-descriptor-fetch transfer note: this bit = 1 will disable descriptor function regardless of the run bit is 1 or not. [1] orden enable ordering execution for descriptor list the gdma_dadrx [orden] determine which the next descriptor address will be fetched. if [orden] is set, the gdma controller fetches the next descriptor from current gdma_dadrx [descriptor address] + 16 bytes. if this bit is cleared, gdma fetche s the next descriptor address from the current gdma_dadrx [descr iptor address] register. gdma_dadrx [orden] is relevant only for descriptor-fetch function (gdma_dadrx [non_dsptrmode] = 0). 0 = disable descriptor orde ring. fetch the next descriptor from register gdma_ddadrx [descriptor address]. 1 = enable descriptor ordering. [0] reset reset channel 0 = disable channel reset. 1 = enable channel status reset an d disable descriptor based function. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 153 channel 0/1 gdma internal buffer register (gdma_intbuf0/1) software can set the [17-16] bit of gdma_intcs to select channels and watch the value which has read from memory. register address r/w description reset value gdma_intbuf0 0xb000_4080 r gdma internal buffer word 0 0x0000_0000 gdma_intbuf1 0xb000_4084 r gdma internal buffer word 1 0x0000_0000 gdma_intbuf2 0xb000_4088 r gdma internal buffer word 2 0x0000_0000 gdma_intbuf3 0xb000_408c r gdma internal buffer word 3 0x0000_0000 gdma_intbuf4 0xb000_4090 r gdma internal buffer word 4 0x0000_0000 gdma_intbuf5 0xb000_4094 r gdma internal buffer word 5 0x0000_0000 gdma_intbuf6 0xb000_4098 r gdma internal buffer word 6 0x0000_0000 gdma_intbuf7 0xb000_409c r gdma internal buffer word 7 0x0000_0000 31 30 29 28 27 26 25 24 data_buffer [31:24] 23 22 21 20 19 18 17 16 data_buffer [23:16] 15 14 13 12 11 10 9 8 data_buffer [15:8] 7 6 5 4 3 2 1 0 data_buffer [7:0] bits descriptions [31:0] data_buffer internal buffer register each channel has its own internal bu ffer from word 0 to word 7. the [17-16] bit of gdma_intcs will determine the values of channels mapping to gdma_intbuf0~7. note: the gdma_intbuf0~7 are available when burst mode used, otherwise, only the gd ma_intbuf0 available. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 154 channel 0/1 gdma interrupt control and status register (gdma_intcs) register address r/w description reset value gdma_intcs 0xb000_40a0 r/w interrupt control and status register (2 channels) 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved buf_rd_sel 15 14 13 12 11 10 9 8 reserved terr1f tc1f terr0f tc0f 7 6 5 4 3 2 1 0 reserved terr1en tc1en terr0en tc0en bits descriptions [17:16] buf_rd_sel internal buffer read select 00 = read internal buffer for channel 0 01 = read internal buffer for channel 1 10 = reserved 11 = reserved [11] terr1f channel 1 transfer error o = no error occurs 1 = hardware sets this bit on a gdma transfer failure this bit will be cleared when write logic 1. transfer error will generate gdma interrupt [10] tc1f channel 1 terminal count 0 = channel does not expire 1 = channel expires; this bit is set only by gdma hardware, and clear by software to write logic 1. tc1 is the gdma interrupt flag. tc1 or gdmaterr1 will generate interrupt [9] terr0f channel 0 transfer error o = no error occurs 1 = hardware sets this bit on a gdma transfer failure this bit will be cleared when write logic 1. transfer error will generate gdma interrupt NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 155 [8] tc0f channel 0 terminal count 0 = channel does not expire 1 = channel expires; this bit is set only by gdma hardware, and clear by software to write logic 1. tc0 is the gdma interrupt flag. tc0 or gdmaterr0 will generate interrupt [3] teer1en channel 1 interrupt enable for transfer error 0 = disable interrupt 1 = enable interrupt [2] tc1en channel 1 interrupt enable for terminal count 0 = disable interrupt 1 = enable interrupt [1] teer0en channel 0 interrupt enable for transfer error 0 = disable interrupt 1 = enable interrupt [0] tc0en channel 0 interrupt enable for terminal count 0 = disable interrupt 1 = enable interrupt NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 156 7.7 usb host controller (usbh) the universal serial bus (usb) is a fast, bi-directional, isochronous, low-cost, dynamically attachable serial interface standard intended for usb devices. the usb is a 4-wi re serial cable bus that supports serial data exchange between a host controller an d a network of peripheral devices. the attached peripherals share usb bandwidth through a host-sch eduled, token-based protoc ol. peripherals may be attached, configured, used, and detached, while the ho st and other peripherals continue operation (i.e. hot plug and unplug is supported). a major design goal of the usb standard was to allow flexible, plug-and-play networks of usb devices. in any usb network, there will be only one host, but there can be many devices and hubs. the usb host controller includes the following features ? fully compliant with usb revision 2.0 specification. ? enhanced host controller interface (ehci) revision 1.0 compatible. ? open host controller interface (ohci) revision 1.0 compatible. ? supports high-speed (480mbps), full-speed (12m bps) and low-speed (1.5mbps) usb devices. ? supports control, bulk, interrupt, isochronous and split transfers. ? integrated a port routing logic to route full/low speed device to ohci controller. ? built-in dma for real-time data transfer. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 157 7.7.1 register mapping register offset r/w description reset value capability registers (usbh_ba = 0xb000_5000) ehcvnr 0xb000_5000 r ehci version number register 0x0095_0020 ehcspr 0xb000_5004 r ehci structural para meters register 0x0000_0012 ehccpr 0xb000_5008 r ehci capability parameters register 0x0000_0000 operational registers ucmdr 0xb000_5020 r/w usb command register 0x0008_0000 ustsr 0xb000_5024 r/w usb status register 0x0000_1004 uienr 0xb000_5028 r/w usb interrupt enable register 0x0000_0000 ufindr 0xb000_502c r/w usb frame index register 0x0000_0000 upflbar 0xb000_5034 r/w usb periodic frame list base address register 0x0000_0000 ucalar 0xb000_5038 r/w usb current asynchronous list address register 0x0000_0000 uasstr 0xb000_503c r/w usb asynchronous schedule sleep timer register 0x0000_0bd6 ucfgr 0xb000_5060 r/w usb configure flag register 0x0000_0000 upscr0 0xb000_5064 r/w usb port 0 status and control register 0x0000_2000 upscr1 0xb000_5068 r/w usb port 1 status and control register 0x0000_2000 miscellaneous registers usbpcr0 0xb000_50c4 r/w usb phy 0 control register 0x0000_0060 usbpcr1 0xb000_50c8 r/w usb phy 1 control register 0x0000_0020 ohci registers (usbo_ba = 0xb000_7000) hcrev 0xb000_7000 r host controller revi sion register 0x0000_0010 hccontrol 0xb000_7004 r/w host controller control register 0x0000_0000 hccomsts 0xb000_7008 r/w host controller command status register 0x0000_0000 hcintsts 0xb000_700c r/w host controller interru pt status register 0x0000_0000 hcinten 0xb000_7010 r/w host controller interru pt enable register 0x0000_0000 hcintdis 0xb000_7014 r/w host controller interru pt disable register 0x0000_0000 hchcca 0xb000_7018 r/w host controller communica tion area register 0x0000_0000 hcperced 0xb000_701c r/w host controller period current ed register 0x0000_0000 hcctrhed 0xb000_7020 r/w host controller control head ed register 0x0000_0000 hcctrced 0xb000_7024 r/w host controller control current ed register 0x0000_0000 hcblkhed 0xb000_7028 r/w host controller bulk head ed register 0x0000_0000 hcblkced 0xb000_702c r/w host controller bulk current ed register 0x0000_0000 hcdoneh 0xb000_7030 r/w host controller done head register 0x0000_0000 hcfmintv 0xb000_7034 r/w host controller frame interval register 0x0000_2edf hcfmrem 0xb000_7038 r host controller frame remaining register 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 158 hcfnum 0xb000_703c r host controller frame number register 0x0000_0000 hcperst 0xb000_7040 r/w host controller periodic start register 0x0000_0000 hclsth 0xb000_7044 r/w host controller low speed threshold register 0x0000_0628 hcrhdea 0xb000_7048 r/w host controller root hub descriptor a register 0x0100_0002 hcrhdeb 0xb000_704c r/w host controller root hub descriptor b register 0x0000_0000 hcrhsts 0xb000_7050 r/w host controller root hub status register 0x0000_0000 hcrhprt1 0xb000_7054 r/w host controller root hub port status [1] 0x0000_0000 hcrhprt2 0xb000_7058 r/w host controller root hub port status [2] 0x0000_0000 ohci usb configuration register opmoden 0xb000_7204 r/w usb operational mode enable register 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 159 7.7.2 register details ehci version number register (ehcvnr) register address r/w description reset value ehcvnr 0xb000_5000 r ehci version number register 0x0095_0020 31 30 29 28 27 26 25 24 version 23 22 21 20 19 18 17 16 version 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 cr_length bits descriptions [31:16] version host controller interface version number this is a two-byte register containing a bcd encoding of the ehci revision number supported by this host controller. the most significant byte of this register represents a major revision and the least significant byte is the minor revision. [7:0] cr_length capability registers length this register is used as an offset to a dd to register base to find the beginning of the operational register space. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 160 ehci structural parameters register (ehcspr) register address r/w description reset value ehcspr 0xb000_5004 r ehci structural para meters register 0x0000_0012 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 n_cc n_pcc 7 6 5 4 3 2 1 0 reserved ppc n_ports bits descriptions [15:12] n_cc number of companion controller this field indicates the number of compan ion controllers associated with this usb 2.0 host controller. a zero in this field indicates there are no companion host controllers. port- ownership hand-off is not supported. on ly high-speed devices are supported on the host controller root ports. a value larger than zero in this fiel d indicates there are companion usb 1.1 host controller(s). port-ownership ha nd-offs are supported. high, full- and low-speed devices are supported on the host controller root ports. [11:8] n_pcc number of ports per companion controller this field indicates the number of ports supported per companion host controller. it is used to indicate the port routing configuration to system software. for example, if n_ports has a value of 6 and n_cc has a value of 2 then n_pcc could have a value of 3. the conv ention is that the first n_pcc ports are assumed to be routed to companion controller 1, the next n_pcc ports to companion controller 2, etc. in the pr evious example, the n_pcc could have been 4, where the first 4 are routed to companion controller 1 and the last two are routed to companion controller 2. the number in this field must be consistent with n_ports and n_cc. [4] ppc port power control this field indicates whether the host co ntroller implementation includes port power control. a one in this bit indica tes the ports have port power switches. a zero in this bit indicates the port do not have port power stitches. the value of this field affects the functionality of the port power field in each port status and control register. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 161 [3:0] n_ports number of physical downstream ports this field specifies the number of phys ical downstream ports implemented on this host controller. the value of this field determines how many port registers are addressable in the operatio nal register space. valid values are in the range of 1h to fh. a zero in this field is undefined. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 162 ehci capability parameters register (ehccpr) register address r/w description reset value ehccpr 0xb000_5008 r ehci capability parameters register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 eecp 7 6 5 4 3 2 1 0 iso_sch_th reserved aspc pflist 64b bits descriptions [15:8] eecp ehci extended capabilities pointer (eecp) 8?h0: no extended capabilities are implemented. [7:4] iso_sch_th isochronous scheduling threshold [2] aspc asynchronous schedule park capability 1?b0: this ehci host controller doesn? t support park feature of high-speed queue heads in the asynchronous schedule. [1] pflist programmable frame list flag 1?b0: system software must use a fr ame list length of 1024 elements with this ehci host controller. [0] 64b 64-bit addressing capability 1?b0: data structure using 32- bit address memory pointers. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 163 usb command register (ucmdr) register address r/w description reset value ucmdr 0xb000_5020 r/w usb command register 0x0008_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 int_th_ctl 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved asynadb asen psen flsize hcreset runstop bits descriptions [23:16] int_th_ctl interrupt threshold control (r/w) this field is used by system software to select the maximum rate at which the host controller will issue interrupts. the only valid values are defined below. if software writes an invalid value to this register, the results are undefined. value maximum interrupt interval 00h reserved 01h 1 micro-frame 02h 2 micro-frames 04h 4 micro-frames 08h 8 micro-frames (default, equates to 1 ms) 10h 16 micro-frames (2 ms) 20h 32 micro-frames (4 ms) 40h 64 micro-frames (8 ms) any other value in this regist er yields undefined results. software modifications to this bit while hchalted bit is equal to zero results in undefined behavior. [6] asynadb interrupt on async advance doorbell (r/w) this bit is used as a doorbell by software to tell the host controller to issue an interrupt the next time it advances asynchronous schedule. software must write a 1 to this bit to ring the doorbell. when the host controller has evicted all appropriate cached schedule state, it sets the interrupt on async advance status bit in the usbsts register. if the interrupt on async advance enable bit in the usbintr re gister is a one then the host controller will assert an interrupt at the next interrupt threshold. the host controller sets this bit to a zero after it has set the interrupt on async advance status bit in the usbsts register to a one. software should not write a one to th is bit when the asynchronous schedule is disabled. doing so will yield undefined results. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 164 [5] asen asynchronous schedule enable (r/w) this bit controls whether the host controller skips processing the asynchronous schedule. values mean: 0b do not process the asynchronous schedule 1b use the asynclistaddr register to access the asynchronous schedule [4] psen periodic schedule enable (r/w) this bit controls whether the host co ntroller skips processing the periodic schedule. values mean: 0b do not process the periodic schedule 1b use the periodiclistbase register to access the periodic schedule [3:2] flsize frame list size (r/w or ro) this field is r/w only if programmable frame list flag in the hccparams registers is set to a one. this field spec ifies the size of the frame list. the size the frame list controls which bits in th e frame index register should be used for the frame list current index. values mean: 00b 1024 elements (4096 bytes) default value 01b 512 elements (2048 bytes) 10b 256 elements (1024 bytes) ? for resource-constrained environment 11b reserved [1] hcreset host controller reset (hcreset) (r/w) this control bit is used by software to reset the host controller. the effects of this on root hub registers are si milar to a chip hardware reset. when software writes a one to this bit, the host controller resets its internal pipelines, timers, counters, state machines, etc. to their initial value. any transaction currently in progress on usb is immediately terminated. a usb reset is not driven on downstream ports. all operational registers, including port registers and port state machines are set to their initial values. port ownership reverts to the companion host controller(s), with the si de effects. software must reinitialize the host controller in order to return the host controller to an operational state. this bit is set to zero by the host controller when the reset process is complete. software cannot terminate th e reset process early by writing a zero to this register. software should not set this bit to a one when the hcha lted bit in the usbsts register is a zero. attempting to reset an actively running host controller will result in undefined behavior. [0] runstop run/stop (r/w) 1=run. 0=stop. when set to a 1, the host controller proceeds with execution of the schedule. the host controller continues execution as long as this bit is set to a 1. when this bit is set to 0, the host controller completes the current and any actively pipelined transactions on the usb and then halts. the host controller must halt within 16 micro-frames after software clears the run bit. the hc halted bit in the status register indicates when the host controller has finished its pend ing pipelined transactions and has entered the stopped state. software must not write a one to this field unless the host controller is in the halted state (i.e. hchalted in the usbsts register is a one). doing so will yield undefined results. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 165 usb status register (ustsr) register address r/w description reset value ustsr 0xb000_5024 r/w usb status register 0x0000_1000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 assts pssts recla hchalted reserved 7 6 5 4 3 2 1 0 reserved intasyna hserr flrover portchg uerrint usbint bits descriptions [15] assts asynchronous schedule status (ro) the bit reports the current real status of the asynchronous schedule. if this bit is a zero then the status of them asynchronous schedule is disabled. if this bit is a one then the status of the asynchronous schedule is enabled. the host controller is not required to i mmediately disable or enable the asynchronous schedule when software transitions the asynchronous schedule enable bit in the usbcmd register. when this bit and the asynchronous schedule enable bit are the same value, the asynchronous schedule is either r enab led (1) or disabled (0). [14] pssts periodic schedule status (ro) the bit reports the current real status of the periodic schedule. if this bit is a zero then the status of the periodic sche dule is disabled. if this bit is a one then the status of the periodic schedule is enabled. the host controller is not required to immediately disable or enable the pe riodic schedule when software transitions the periodic schedule enable bit in the usbcmd register. when this bit and the periodic schedule enable bit are the same value, the periodic schedule is either enabled (1) or disabled (0). [13] recla reclamation (ro) this is a read-only status bit, which is used to detect an empty asynchronous schedule. [12] hchalted hchalted (ro) this bit is a zero whenever the run/st op bit is a one. the host controller sets this bit to one after it has stoppe d executing as a result of the run/stop bit being set to 0, either by software or by the host controller hardware (e.g. internal error). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 166 [5] intasyna interrupt on async advance (r/wc) system software can force the host cont roller to issue an interrupt the next time the host controller advances the asynchronous schedule by writing a one to the interrupt on async advance doorbell bit in the usbcmd register. this status bit indicates the asse rtion of that interrupt source. [4] hserr host system error (r/wc) the host controller sets this bit to 1 when a serious error occurs during a host system access involving the host controller module. [3] flrover frame list rollover (r/wc) the host controller sets this bit to a one when the frame list index rolls over from its maximum value to zero. the exact value at which the rollover occurs depends on the frame list size. fo r example, if the frame list size (as programmed in the frame list size field of the usbcmd register) is 1024, the frame index register rolls over every time frindex [13] toggles. similarly, if the size is 512, the host controller sets this bit to a one every time frindex [12] toggles. [2] portchg port change detect (r/wc) the host controller sets this bit to a one when any port for which the port owner bit is set to zero has a change bi t transition from a zero to a one or a force port resume bit transition from a zero to a one as a result of a j-k transition detected on a suspended port. this bit will also be set as a result of the connect status change being set to a one after system software has relinquished ownership of a connected port by writing a one to a port's port owner bit. this bit is allowed to be maintained in the auxiliary power well. alternatively, it is also acceptable that on a d3 to d0 transition of the ehci hc device, this bit is loaded with the or of all of the portsc change bits (including: force port resume, over-current change, enab le/disable change and connect status change). [1] uerrint usb error interrupt (usberrint) (r/wc) the host controller sets this bit to 1 when completion of a usb transaction results in an error condition (e.g., e rror counter underflow). if the td on which the error interrupt occurred also ha d its ioc bit set, both this bit and usbint bit are set. [0] usbint usb interrupt (usbint) (r/wc) the host controller sets this bit to 1 on the completion of a usb transaction, which results in the retirement of a tr ansfer descriptor that had its ioc bit set. the host controller also sets this bit to 1 when a short packet is detected (actual number of bytes received wa s less than the expected number of bytes). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 167 usb interrupt enable register (uienr) register address r/w description reset value uienr 0xb000_5028 r/w usb interrupt enable register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved asynaen hserren flren pchgen uerren usbien bits descriptions [5] asynaen interrupt on async advance enable when this bit is a one, and the interrupt on async advance bit in the usbsts register is a one, the host controller will issue an interrupt at the next interrupt threshold. the in terrupt is acknowledged by software clearing the interrupt on async advance bit. [4] hserren host system error enable when this bit is a one, and the host system error status bit in the usbsts register is a one, the host controller will issue an interrupt. the interrupt is acknowledged by software clearing the host system error bit. [3] flren frame list rollover enable when this bit is a one, an d the frame list rollover bit in the usbsts register is a one, the host controller will issue an interrupt. the interrupt is acknowledged by software clearing the frame list rollover bit. [2] pchgen port change interrupt enable when this bit is a one, and the port ch ange detect bit in the usbsts register is a one, the host controller will issue an interrupt. the interrupt is acknowledged by software clearing the port change detect bit. [1] uerren usb error interrupt enable when this bit is a one, and the usberrint bit in the usbsts register is a one, the host t controller will issue an interrupt at the next interrupt threshold. the interrupt is acknowledged by software clearing the usberrint bit. [0] usbien usb interrupt enable when this bit is a one, an d the usbint bit in the us bsts register is a one, the host controller will issue an interrupt at the next interrupt threshold. the interrupt is acknowledged by soft ware clearing the usbint bit. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 168 usb frame index register (ufindr) register address r/w description reset value ufindr 0xb000_502c r/w usb frame index register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved frameind 7 6 5 4 3 2 1 0 frameind bits descriptions [13:0] frameind frame index the value in this register increment at the end of each time frame (e.g. micro-frame). bits [n: 3] are used fo r the frame list current index. this means that each location of the fram e list is accessed 8 times (frames or micro-frames) before moving to the ne xt index. the following illustrates values of n based on the value of the frame list size field in the usbcmd register. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 169 usb periodic frame list base address register (upflbar) register address r/w description reset value upflbar 0xb000_5034 r/w usb periodic frame list base address register 0x0000_0000 31 30 29 28 27 26 25 24 baddr 23 22 21 20 19 18 17 16 baddr 15 14 13 12 11 10 9 8 baddr reserved 7 6 5 4 3 2 1 0 reserved bits descriptions [31:12] baddr base address (low) these bits correspond to memory a ddress signals [31: 12], respectively. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 170 usb current asynchronous list address register (ucalar) register address r/w description reset value ucalar 0xb000_5038 r/w usb current asynchronous list address register 0x0000_0000 31 30 29 28 27 26 25 24 lpl 23 22 21 20 19 18 17 16 lpl 15 14 13 12 11 10 9 8 lpl 7 6 5 4 3 2 1 0 lpl reserved bits descriptions [31:5] lpl link pointer low (lpl) these bits correspond to memory addre ss signals [31:5], respectively. this field may only reference a queue head (qh). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 171 usb asynchronous schedule sleep timer register register address r/w description reset value uasstr 0xb000_503c r/w usb asynchronous schedule sleep timer register 0x0000_0bd6 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved astmr 7 6 5 4 3 2 1 0 astmr bits descriptions [11:0] asstmr asynchronous schedule sleep timer this field defines the asyncs chedsleeptime of ehci spec. the asynchronous schedule sleep timer is used to control how often the host controller fetches asynchronous schedul e list from system memory while the asynchronous schedule is empty. the default value of this timer is 12?hbd6. because this timer is implemented in utmi clock (30mhz) domain, the de fault sleeping time will be about 100us. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 172 usb configure flag register (ucfgr) register address r/w description reset value ucfgr 0xb000_5060 r/w usb configure flag register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved cf bits descriptions [0] cf configure flag (cf) host software sets this bit as the last action in its process of configuring the host controller. this bit controls the default port-routing control logic. bit values and side-effects are listed below. 0b port routing control logic default-ro utes each port to an implementation dependent classic host controller. 1b port routing control logic default-routes all ports to this host controller. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 173 usb port 0 status and control register (upscr0) register address r/w description reset value upscr0 0xb000_5064 r/w usb port 0 status and control register 0x0000_2000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved po pp lstatus reserved prst 7 6 5 4 3 2 1 0 suspend fpresum occhg ocact penchg pen cschg csts bits descriptions [13] po port owner (r/w) this bit unconditionally goes to a 0b when the configured bit in the configflag register makes a 0b to 1b transition. this bit unconditionally goes to 1b whenever the configured bit is zero. system software uses this field to rele ase ownership of the port to a selected host controller (in the event that the attached device is not a high-speed device). software writes a one to this bit when the attached device is not a high-speed device. a one in this bit means that a companion host controller owns and controls the port. [12] pp port power (pp) host controller has port power contro l switches. this bit represents the current setting of the switch (0 = off, 1 = on). when power is not available on a port (i.e. pp equals a 0), the port is nonfunctional and will not report attaches, detaches, etc. when an over-current condition is detected on a powered port and ppc is a one, the pp bit in each affected port may be transitioned by the host controller from a 1 to 0 (removing power from the port). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 174 [11:10] lstatus line status (ro) these bits reflect the current logical levels of the d+ (bit 11) and d- (bit 10) signal lines. these bits are used for de tection of low-speed usb devices prior to the port reset and enable sequence. th is field is valid only when the port enable bit is zero and the current co nnect status bit is set to a one. the encoding of the bits are: bits[11:10] usb state interpretation 00b se0 not low-speed devi ce, perform ehci reset 10b j-state not low-speed de vice, perform ehci reset 01b k-state low-speed device, release ownership of port 11b undefined not low-speed de vice, perform ehci reset. this value of this field is undefined if port power is zero. [8] prst port reset (r/w) 1=port is in reset. 0=port is not in reset. default = 0. when software writes a one to this bit (from a zero), the bu s reset sequence as defined in the usb specification revision 2.0 is started. software writes a zero to this bit to terminate the bus reset sequence. software must keep this bit at a one long enough to ensure the reset sequence, as specified in the usb specification revision 2.0, completes. no te: when software writes this bit to a one, it must also write a zero to the port enable bit. note that when software writes a zero to this bit there may be a delay before the bit status changes to a zero. the bit status will not read as a zero until after the reset has completed. if the port is in high-speed mode after reset is complete, the host controller will automatically enable this port (e.g. set the port enable bit to a one). a host co ntroller must terminate the reset and stabilize the state of the port within 2 milliseconds of software transitioning this bit from a one to a zero. for ex ample: if the port detects that the attached device is high-speed during reset, then the host controller must have the port in the enabled state within 2ms of software writing this bit to a zero. the hchalted bit in the usbsts register should be a zero before software attempts to use this bit. the host cont roller may hold port reset asserted to a one when the hchalt ed bit is a one. this field is zero if port power is zero. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 175 [7] suspend suspend (r/w) 1=port in suspend state. 0=port not in suspend state. default = 0. port enabled bit and suspend bit of this regist er define the port states as follows: bits [port enabled, suspend] port state 0x disable 10 enable 11 suspend when in suspend state, do wnstream propagation of data is blocked on this port, except for port reset. the blocki ng occurs at the end of the current transaction, if a transaction was in prog ress when this bit was written to 1. in the suspend state, the port is sensitive to resume detection. note that the bit status does not change until the port is suspended and that there may be a delay in suspending a port if there is a transaction currently in progress on the usb. a write of zero to this bit is ignored by the host controller. the host controller will unconditionally set this bit to a zero when: software sets the force port resu me bit to a zero (from a one). software sets the port reset bit to a one (from a zero). if host software sets this bit to a one when the port is not enabled (i.e. port enabled bit is a zero) the results are undefined. this field is zero if port power is zero. [6] fpresum force port resume (r/w) 1= resume detected/driven on port. 0= no resume (kstate) detected/driven on port. default = 0. this functiona lity defined for mani pulating this bit depends on the value of the suspend bi t. for example, if the port is not suspended (suspend and enabled bits are a one) and software transitions this bit to a one, then the e ffects on the bus are undefined. software sets this bit to a 1 to driv e resume signaling. the host controller sets this bit to a 1 if a j-to-k transition is detected while the port is in the suspend state. when this bit transition s to a one because a j-to-k transition is detected, the port change detect bit in the usbsts register is also set to a one. if software sets this bit to a on e, the host controller must not set the port change detect bit. note that when the ehci controller owns the port, the resume sequence follows the defined sequence documented in the usb specification revision 2.0. the resume signaling (full-speed 'k') is driven on the port as long as this bit remains a one. software must appropriately time the resume and set this bit to a zero when the appropriate amount of time has elapsed. writing a zero (from one) causes the port to re turn to high-speed mode (forcing the bus below the port into a high-speed idle). this bit will remain a one until the port has switched to the high-speed id le. the host controller must complete this transition within 2 milliseconds of software setting this bit to a zero. this field is zero if port power is zero. [5] occhg over-current change (r/wc) default = 0. 1=this bit gets set to a one when there is a change to over- current active. software clea rs this bit by writing a one to this bit position. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 176 [4] ocact over-current active (ro) default = 0. 1=this port currently has an over current condition. 0=this port does not have an over-current condition. this bit will automatically transition from a one to a zero when the ov er current condition is removed. [3] penchg port enable/disable change (r/wc) 1=port enabled/disabled status has ch anged. 0=no change. default = 0. for the root hub, this bit gets set to a one only when a port is disabled due to the appropriate conditions existing at th e eof2 point (see chapter 11 of the usb specification for the definition of a port error). software clears this bit by writing a 1 to it. this field is zero if port power is zero. [2] pen port enabled/disabled (r/w) 1=enable. 0=disable. default = 0. ports can only be enabled by the host controller as a part of the reset and en able. software cannot enable a port by writing a one to this field. the host controller will only set this bit to a one when the reset sequence determines that the attached device is a high-speed device. ports can be disabled by either a faul t condition (disconnect event or other fault condition) or by host software. no te that the bit status does not change until the port state actually changes. there may be a delay in disabling or enabling a port due to other ho st controller and bus events. when the port is disabled (0b) downstre am propagation of data is blocked on this port, except for reset. this field is zero if port power is zero. [1] cschg connect status change (r/w) 1=change in current connect status. 0= no change. default = 0. indicates a change has occurred in the port?s current connect status. the host controller sets this bit for all changes to the port device connect status, even if system software has not cleared an existing co nnect status change. for example, the insertion status changes twice before system software has cleared the changed condition, hub hardware will be ?setting? an already-set bit (i.e., the bit will remain set).software sets this bit to 0 by writing a 1 to it. this field is zero if port power is zero. [0] csts current connect status (ro) 1=device is present on port. 0=no device is present. default = 0. this value reflects the current state of the port, and may not correspond directly to the event that caused the connect status change bit (bit 1) to be set. this field is zero if port power is zero. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 177 usb port 1 status and control register (upscr1) register address r/w description reset value upscr1 0xb000_5068 r/w usb port 1 status and control register 0x0000_2000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved reserved 15 14 13 12 11 10 9 8 reserved po pp lstatus reserved prst 7 6 5 4 3 2 1 0 suspend fpresum occhg ocact penchg pen cschg csts bits descriptions [13] po port owner (r/w) this bit unconditionally goes to a 0b when the configured bit in the configflag register makes a 0b to 1b transition. this bit unconditionally goes to 1b whenever the configured bit is zero. system software uses this field to rele ase ownership of the port to a selected host controller (in the event that the attached device is not a high-speed device). software writes a one to this bit when the attached device is not a high-speed device. a one in this bit means that a companion host controller owns and controls the port. [12] pp port power (pp) host controller has port power contro l switches. this bit represents the current setting of the switch (0 = off, 1 = on). when power is not available on a port (i.e. pp equals a 0), the port is nonfunctional and will not report attaches, detaches, etc. when an over-current condition is detected on a powered port and ppc is a one, the pp bit in each affected port may be transitioned by the host controller from a 1 to 0 (removing power from the port). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 178 [11:10] lstatus line status (ro) these bits reflect the current logical levels of the d+ (bit 11) and d- (bit 10) signal lines. these bits are used for de tection of low-speed usb devices prior to the port reset and enable sequence. th is field is valid only when the port enable bit is zero and the current co nnect status bit is set to a one. the encoding of the bits are: bits[11:10] usb state interpretation 00b se0 not low-speed devi ce, perform ehci reset 10b j-state not low-speed de vice, perform ehci reset 01b k-state low-speed device, release ownership of port 11b undefined not low-speed de vice, perform ehci reset. this value of this field is undefined if port power is zero. [8] prst port reset (r/w) 1=port is in reset. 0=port is not in reset. default = 0. when software writes a one to this bit (from a zero), the bu s reset sequence as defined in the usb specification revision 2.0 is started. software writes a zero to this bit to terminate the bus reset sequence. software must keep this bit at a one long enough to ensure the reset sequence, as specified in the usb specification revision 2.0, completes. no te: when software writes this bit to a one, it must also write a zero to the port enable bit. note that when software writes a zero to this bit there may be a delay before the bit status changes to a zero. the bit status will not read as a zero until after the reset has completed. if the port is in high-speed mode after reset is complete, the host controller will automatically enable this port (e.g. set the port enable bit to a one). a host co ntroller must terminate the reset and stabilize the state of the port within 2 milliseconds of software transitioning this bit from a one to a zero. for ex ample: if the port detects that the attached device is high-speed during reset, then the host controller must have the port in the enabled state within 2ms of software writing this bit to a zero. the hchalted bit in the usbsts register should be a zero before software attempts to use this bit. the host cont roller may hold port reset asserted to a one when the hchalt ed bit is a one. this field is zero if port power is zero. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 179 [7] suspend suspend (r/w) 1=port in suspend state. 0=port not in suspend state. default = 0. port enabled bit and suspend bit of this regist er define the port states as follows: bits [port enabled, suspend] port state 0x disable 10 enable 11 suspend when in suspend state, do wnstream propagation of data is blocked on this port, except for port reset. the blocki ng occurs at the end of the current transaction, if a transaction was in prog ress when this bit was written to 1. in the suspend state, the port is sensitive to resume detection. note that the bit status does not change until the port is suspended and that there may be a delay in suspending a port if there is a transaction currently in progress on the usb. a write of zero to this bit is ignored by the host controller. the host controller will unconditionally set this bit to a zero when: software sets the force port resu me bit to a zero (from a one). software sets the port reset bit to a one (from a zero). if host software sets this bit to a one when the port is not enabled (i.e. port enabled bit is a zero) the results are undefined. this field is zero if port power is zero. [6] fpresum force port resume (r/w) 1= resume detected/driven on port. 0= no resume (kstate) detected/driven on port. default = 0. this functiona lity defined for mani pulating this bit depends on the value of the suspend bi t. for example, if the port is not suspended (suspend and enabled bits are a one) and software transitions this bit to a one, then the e ffects on the bus are undefined. software sets this bit to a 1 to driv e resume signaling. the host controller sets this bit to a 1 if a j-to-k transition is detected while the port is in the suspend state. when this bit transition s to a one because a j-to-k transition is detected, the port change detect bit in the usbsts register is also set to a one. if software sets this bit to a on e, the host controller must not set the port change detect bit. note that when the ehci controller owns the port, the resume sequence follows the defined sequence documented in the usb specification revision 2.0. the resume signaling (full-speed 'k') is driven on the port as long as this bit remains a one. software must appropriately time the resume and set this bit to a zero when the appropriate amount of time has elapsed. writing a zero (from one) causes the port to re turn to high-speed mode (forcing the bus below the port into a high-speed idle). this bit will remain a one until the port has switched to the high-speed id le. the host controller must complete this transition within 2 milliseconds of software setting this bit to a zero. this field is zero if port power is zero. [5] occhg over-current change (r/wc) default = 0. 1=this bit gets set to a one when there is a change to over- current active. software clea rs this bit by writing a one to this bit position. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 180 [4] ocact over-current active (ro) default = 0. 1=this port currently has an over current condition. 0=this port does not have an over-current condition. this bit will automatically transition from a one to a zero when the ov er current condition is removed. [3] penchg port enable/disable change (r/wc) 1=port enabled/disabled status has ch anged. 0=no change. default = 0. for the root hub, this bit gets set to a one only when a port is disabled due to the appropriate conditions existing at th e eof2 point (see chapter 11 of the usb specification for the definition of a port error). software clears this bit by writing a 1 to it. this field is zero if port power is zero. [2] pen port enabled/disabled (r/w) 1=enable. 0=disable. default = 0. ports can only be enabled by the host controller as a part of the reset and en able. software cannot enable a port by writing a one to this field. the host controller will only set this bit to a one when the reset sequence determines that the attached device is a high-speed device. ports can be disabled by either a faul t condition (disconnect event or other fault condition) or by host software. no te that the bit status does not change until the port state actually changes. there may be a delay in disabling or enabling a port due to other ho st controller and bus events. when the port is disabled (0b) downstre am propagation of data is blocked on this port, except for reset. this field is zero if port power is zero. [1] cschg connect status change (r/w) 1=change in current connect status. 0= no change. default = 0. indicates a change has occurred in the port?s current connect status. the host controller sets this bit for all changes to the port device connect status, even if system software has not cleared an existing co nnect status change. for example, the insertion status changes twice before system software has cleared the changed condition, hub hardware will be ?setting? an already-set bit (i.e., the bit will remain set).software sets this bit to 0 by writing a 1 to it. this field is zero if port power is zero. [0] csts current connect status (ro) 1=device is present on port. 0=no device is present. default = 0. this value reflects the current state of the port, and may not correspond directly to the event that caused the connect status change bit (bit 1) to be set. this field is zero if port power is zero. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 181 usb phy 0 control register (usbpcr0) register address r/w description reset value usbpcr0 0xb000_50c4 r/w usb phy 0 control register 0x0000_0060 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved clkvalid reserved suspend 7 6 5 4 3 2 1 0 clk48 refclk clk_sel xo_on siddq reserved bits descriptions [11] clkvalid utmi clock valid this bit is a flag to indicate if the utmi clock from usb 2.0 phy is ready. s/w program must prevent to write other cont rol registers before this utmi clock valid flag is active. 1?b0: utmi clock is not valid 1?b1: utmi clock is valid [8] suspend suspend assertion this bit controls the suspend mode of usb phy 0. while phy was suspended, all circui ts of phy were powered down and outputs are tri-stated. this bit is 1?b0 in default. this means the usb phy 0 is suspended in default. it is necessary to set this bit 1?b1 to make usb phy 0 leave suspend mode before doing configuration of usb host. 1?b0: usb phy 0 was suspended. 1?b1: usb phy 0 was not suspended. [7] clk48 digital logic clock select this bit controls the input sign al clk48m_sel of usb phy 0. this signal select s power-save mode. 1?b0: non-power-save mode. the p ll and the phase interpolator are powered up. the digital logic uses a 480m hz clock. non-power-save mode is valid in all modes and speeds of operation. 1?b1: power-save mode. the pll and the phase interpolator are powered down. the digital logic uses a 48mhz cl ock. power-save mode is valid for only fs-only operation. the clk_sel sh ould be set to 2?b10 (48mhz) when this bit is high. [6] refclk reference clock source select this bit has to set to 1. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 182 [5:4] ckl_sel reference clock frequency select this field has to set to 2?b10; [3] xo_on force xo block on during a suspend this bit controls the input signal xo_on of usb phy 0. 1?b0: if all ports are suspended, th e xo block is powered up, and the test_clk48m signal is available. 1?b1: this bit is inactive, and the xo block is powered down when all ports are suspended. [2] siddq iddq test enable this bit controls the input signal siddq of usb phy 0. this signal powers do wn all analog blocks. 1?b0: the analog blocks are in normal operation. 1?b1: the analog blocks are powered down. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 183 usb phy 1 control register (usbpcr1) register address r/w description reset value usbpcr1 0xb000_50c8 r/w usb phy 1 control register 0x0000_0020 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved xo_sel reserved suspend 7 6 5 4 3 2 1 0 clk48 refclk clk_sel xo_on siddq reserved bits descriptions [11] xo_sel clock select for xo block this bit defines the clock so urce of phy1?s xo block is from external clock or a crystal. 1?b0: the xo block uses a 48mhz ex ternal clock supplied from phy 0 1?b1: the xo block uses the clock from a crystal [8] suspend suspend assertion this bit controls the suspend mode of usb phy 1. while phy was suspended, all circui ts of phy were powered down and outputs are tri-stated. this bit is 1?b0 in default. this mean s the usb phy 1 is suspended in default. it is necessary to set this bit 1?b1 to make usb phy 1 leave suspend mode before doing configuration of usb host. 1?b0: usb phy 1 was suspended. 1?b1: usb phy 1 was not suspended. [7] clk48 digital logic clock select this bit controls the input sign al clk48m_sel of usb phy 1. this signal select s power-save mode. 1?b0: non-power-save mode. the p ll and the phase interpolator are powered up. the digital logic uses a 480m hz clock. non-power-save mode is valid in all modes and speeds of operation. 1?b1: power-save mode. the pll and the phase interpolator are powered down. the digital logic uses a 48mhz cl ock. power-save mode is valid for only fs-only operation. the clk_sel sh ould be set to 2?b10 (48mhz) when this bit is high. [6] refclk reference clock source select this bit has to set to 0. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 184 [5:4] ckl_sel reference clock frequency select this field has to set to 2?b10. [3] xo_on force xo block on during a suspend this bit controls the input signal xo_on of usb phy 1. 1?b0: if all ports are suspended, th e xo block is powered up, and the test_clk48m signal is available. 1?b1: this bit is inactive, and the xo block is powered down when all ports are suspended. [2] siddq iddq test enable this bit controls the input signal siddq of usb phy 1. this signal powers do wn all analog blocks. 1?b0: the analog blocks are in normal operation. 1?b1: the analog blocks are powered down. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 185 host controller revision register (hcrev) register address r/w description reset value hcrev 0xb000_7000 r host controller revi sion register 0x0000_0010 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 rev bits descriptions [7:0] rev revision indicates the open hci specification revision number implemented by the hardware. host controller supports 1.0 specification. (x.y = xyh) NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 186 host controller control register (hccontrol) register address r/w description reset value hccontrol 0xb000_7004 r/w host controller control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved rwakeen rwake introute 7 6 5 4 3 2 1 0 hcfunc blken ctrlen isoen perien ctrlblkratio bits descriptions [10] rwakeen remote wakeup connected enable if a remote wakeup signal is support ed, this bit enables that operation. since there is no remote wakeup sign al supported, this bit is ignored. [9] rwake remote wakeup connected this bit indicated whether the hc suppo rts a remote wakeup signal. this implementation does not support any such signal. the bit is hard-coded to ?0.? [8] introute interrupt routing this bit is used for interrupt routing: 0: interrupts routed to normal interrupt mechanism (int). 1: interrupts routed to smi. [7:6] hcfunc host controller functional state this field sets the host controller st ate. the controller may force a state change from u sb s uspend to u sb r esume after detecting resume signaling from a downstream port. states are: 00: u sb r eset 01: u sb r esume 10: u sb o perational 11: u sb s uspend [5] blken bulk list enable when set this bit enables processing of the bulk list. [4] ctrlen control list enable when set this bit enables processing of the control list. [3] isoen isochronous list enable when clear, this bit disables the isochr onous list when the periodic list is enabled (so interrupt eds may be serviced). while processing the periodic list, the host controller will check this bit when it finds an isochronous ed. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 187 [2] perien periodic list enable when set, this bit enables processi ng of the periodic (interrupt and isochronous) list. the host controller checks this bit prior to attempting any periodic transfers in a frame. [1:0] ctrlblkratio control bulk service ratio specifies the number of control endpoints serviced for every bulk endpoint. encoding is n-1 where n is the number of control endpoints (i.e. ?00? = 1 control endpoint; ?11? = 3 control endpoints) NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 188 host controller command status register (hccomsts) register address r/w description reset value hccomsts 0xb000_7008 r/w host controller command status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved schoverrun 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved ocreq blkfill ctrlfill hcreset bits descriptions [17:16] schoverrun schedule overrun count this field is increment every time the schedulingoverrun bit in hcinterruptstatus is set. the count wraps from ?11? to ?00.? [3] ocreq ownership chang request when set by software, this bit sets the ownershipchange field in hcinterruptstatus . the bit is cleared by software. [2] blkfill bulk list filled set to indicate there is an active ed on the bulk list. the bit may be set by either software or the host controller and cleared by the host controller each time it begins processing the head of the bulk list. [1] ctrlfill control list filled set to indicate there is an active ed on the control list. it may be set by either software or the host controller and cleared by the host controller each time it begins processing the head of the control list. [0] hcreset host controller reset this bit is set to initiate the software reset. this bit is cleared by the host controller, upon completed of the reset operation. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 189 host controller interrupt status register (hcintsts) register address r/w description reset value hcintsts 0xb000_700c r/w host controller interru pt status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved oc reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved rhsc fnof unrecerr resume sof wbdnhd schor bits descriptions [30] oc ownership change this bit is set when the ownershipchangerequest bit of hccommandstatus is set. [6] rhsc root hub status change this bit is set when the content of hcrhstatus or the content of any hcrhportstatus register has changed. [5] fnof frame number overflow set when bit 15 of framenumber changes value. [4] unrecerr unrecoverable error this event is not implemented and is hard -coded to ?0.? writes are ignored. [3] resume resume detected set when host controller detects resu me signaling on a downstream port. [2] sof start of frame set when the frame management block signals a ?start of frame? event. [1] wbdnhd write back done head set after the host controller has written hcdonehead to hccadonehead . [0] schor scheduling overrun set when the list processor determin es a schedule overrun has occurred. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 190 host controller interrupt enable register (hcinten) register address r/w description reset value hcinten 0xb000_7010 r/w host controller interru pt enable register 0x0000_0000 31 30 29 28 27 26 25 24 inten ocen reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved rhscen fnofen urerren resuen sofen wbdhen schoren bits descriptions [31] inten master interrupt enable this bit is a global interrupt enable. a write of ?1? allows interrupts to be enabled via the specific enable bits listed above. [30] ocen ownership change enable 0: ignore 1: enables interrupt generati on due to ownership change. [6] rhscen root hub status change enable 0: ignore 1: enables interrupt generation due to root hub status change. [5] fnofen frame number overflow enable 0: ignore 1: enables interrupt generation due to frame number overflow. [4] urerren unrecoverable error enable this event is not implemented. all writes to this bit are ignored. [3] resuen resume detected enable 0: ignore 1: enables interrupt generati on due to resume detected. [2] sofen start of frame enable 0: ignore 1: enables interrupt generation due to start of frame. [1] wbdhen write back done head enable 0: ignore 1: enables interrupt generation due to write-back done head. [0] schoren scheduling overrun enable 0: ignore 1: enables interrupt generation due to scheduling overrun. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 191 host controller interrupt disable register (hcintdis) register address r/w description reset value hcintdis 0xb000_7014 r/w host controller interru pt disable register 0x0000_0000 31 30 29 28 27 26 25 24 intdis ocdis reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved rhscdis fnofdis urerrdis resudis sofdis wbdhdis schordis bits descriptions [31] intdis master interrupt disable global interrupt disable. a writ e of ?1? disables all interrupts. [30] ocdis ownership change disable 0: ignore 1: disables interrupt generati on due to ownership change. [6] rhscdis root hub status change disable 0: ignore 1: disables interrupt generation due to root hub status change. [5] fnofdis frame number overflow disable 0: ignore 1: disables interrupt generation due to frame number overflow. [4] urerrdis unrecoverable error disable this event is not implemented. all writes to this bit are ignored. [3] resudis resume detected disable 0: ignore 1: disables interrupt generati on due to resume detected. [2] sofdis start of frame disable 0: ignore 1: disables interrupt generati on due to start of frame. [1] wbdhdis write back done head disable 0: ignore 1: disables interrupt generation due to write-back done head. [0] schordis scheduling overrun disable 0: ignore 1: disables interrupt generati on due to scheduling overrun. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 192 host controller communication area register (hchcca) register address r/w description reset value hchcca 0xb000_7018 r/w host controller communica tion area register 0x0000_0000 31 30 29 28 27 26 25 24 hcca 23 22 21 20 19 18 17 16 hcca 15 14 13 12 11 10 9 8 hcca 7 6 5 4 3 2 1 0 reserved bits descriptions [31:7] hcca host controller communication area pointer to hcca base address. host controller period current ed register (hcperced) register address r/w description reset value hcperced 0xb000_701c r/w host controller period current ed register 0x0000_0000 31 30 29 28 27 26 25 24 periced 23 22 21 20 19 18 17 16 periced 15 14 13 12 11 10 9 8 periced 7 6 5 4 3 2 1 0 periced reserved bits descriptions [31:4] periced periodic current ed pointer to the current periodic list ed. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 193 host controller control head ed register (hcctrhed) register address r/w description reset value hcctrhed 0xb000_7020 r/w host controller control head ed register 0x0000_0000 31 30 29 28 27 26 25 24 ctrlhed 23 22 21 20 19 18 17 16 ctrlhed 15 14 13 12 11 10 9 8 ctrlhed 7 6 5 4 3 2 1 0 ctrlhed reserved bits descriptions [31:4] ctrlhed control head ed pointer to the control list head ed. host controller control current ed register (hcctrced) register address r/w description reset value hcctrced 0xb000_7024 r/w host controller control current ed register 0x0000_0000 31 30 29 28 27 26 25 24 ctrlced 23 22 21 20 19 18 17 16 ctrlced 15 14 13 12 11 10 9 8 ctrlced 7 6 5 4 3 2 1 0 ctrlced reserved bits descriptions [31:4] ctrlced control current head ed pointer to the current control list head ed. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 194 host controller bulk head ed register (hcblkhed) register address r/w description reset value hcblkhed 0xb000_7028 r/w host controller bulk head ed register 0x0000_0000 31 30 29 28 27 26 25 24 blkhed 23 22 21 20 19 18 17 16 blkhed 15 14 13 12 11 10 9 8 blkhed 7 6 5 4 3 2 1 0 blkhed reserved bits descriptions [31:4] blkhed bulk head ed pointer to the bulk list head ed. host controller bulk current head ed register (hcblkced) register address r/w description reset value hcblkced 0xb000_702c r/w host controller bulk current ed register 0x0000_0000 31 30 29 28 27 26 25 24 blkced 23 22 21 20 19 18 17 16 blkced 15 14 13 12 11 10 9 8 blkced 7 6 5 4 3 2 1 0 blkced reserved bits descriptions [31:4] blkced bulk current head ed pointer to the current bulk list head ed. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 195 host controller done head register (hcdoneh) register address r/w description reset value hcdoneh 0xb000_7030 r/w host controller done head register 0x0000_0000 31 30 29 28 27 26 25 24 doneh 23 22 21 20 19 18 17 16 doneh 15 14 13 12 11 10 9 8 doneh 7 6 5 4 3 2 1 0 doneh reserved bits descriptions [31:4] doneh done head pointer to the current done list head ed. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 196 host controller frame interval register (hcfmintv) register address r/w description reset value hcfmintv 0xb000_7034 r/w host controller frame interval register 0x0000_2edf 31 30 29 28 27 26 25 24 fmintvt fsdpktcnt 23 22 21 20 19 18 17 16 fsdpktcnt 15 14 13 12 11 10 9 8 reserved fminterval 7 6 5 4 3 2 1 0 fminterval bits descriptions [31] fmintvt frame interval toggle this bit is toggled by hcd when it loads a new value into frameinterval . [30: 16] fsdpktcnt fs largest data packet this field specifies a value that is loaded into the largest data packet counter at the beginning of each frame. [13:0] fminterval frame interval this field specifies the length of a fr ame as (bit times - 1). for 12,000 bit times in a frame, a value of 11,999 is stored here. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 197 host controller frame remaining register (hcfmrem) register address r/w description reset value hcfmrem 0xb000_7038 r host controller frame remaining register 0x0000_0000 31 30 29 28 27 26 25 24 fmremt reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved fmremain 7 6 5 4 3 2 1 0 fmremain bits descriptions [31] fmremt frame remaining toggle loaded with frameintervaltoggle when frameremaining is loaded. [13:0] fmremain frame remaining when the host controller is in the u sb o perational state, this 14-bit field decrements each 12 mhz clock period. when the count reaches 0, (end of frame) the counter reloads with frameinterval . in addition, the counter loads when the host cont roller transitions into u sb o perational . NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 198 host controller frame number register (hcfnum) register address r/w description reset value hcfnum 0xb000_703c r host controller frame number register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 fmnum 7 6 5 4 3 2 1 0 fmnum bits descriptions [15:0] fmnum frame number this 16-bit incrementing counter field is incremen ted coincident with the loading of frameremaining . the count rolls over from ?ffffh? to ?0h.? host controller periodic start register (hcperst) register address r/w description reset value hcperst 0xb000_7040 r/w host controller periodic start register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved peristart 7 6 5 4 3 2 1 0 peristart bits descriptions [13:0] peristart periodic start this field contains a value used by the list processor to determine where in a frame the periodic list processing must begin. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 199 host controller root hub descriptor a register (hcrhdea) register address r/w description reset value hcrhdea 0xb000_7048 r/w host controller root hub descriptor a register 0x0100_0002 31 30 29 28 27 26 25 24 pwrgdt 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved nocp ocpm devtype nps psm 7 6 5 4 3 2 1 0 dportnum bits descriptions [31:24] pwrgdt power on to power good time this field value is represented as the num ber of 2 ms intervals, which ensuring that the power switching is effective within 2 ms. only bits [25:24] are implemented as r/w. the rema ining bits are read only as ?0?. it is not expected that these bits be written to anything other than 1h, but limited adjustment is provided. this field should be written to support system implementation. this field should always be written to a non-zero value. [12] nocp no over current protection this bit should be written to support the external system port over-current implementation. 0 = over-current status is reported 1 = over-current status is not reported [11] ocpm over current protection mode this bit should be written 0 and is only valid when nocp bit is cleared. 0 = global over-current 1 = individual over-current [10] devtype device type [9] nps no power switching this bit should be written to support the external system port power switching implementation. 0 = ports are power switched. 1 = ports are always powered on. [8] psm power switching mode this bit is only valid when nopowerswitching is cleared. this bit should be written '0'. 0 = global switching 1 = individual switching [7:0] dportnum number downstream ports NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 200 host controller root hub descriptor b register (hcrhdeb) register address r/w description reset value hcrhdeb 0xb000_704c r/w host controller root hub descriptor b register 0x0000_0000 31 30 29 28 27 26 25 24 ppcm 23 22 21 20 19 18 17 16 ppcm 15 14 13 12 11 10 9 8 devremove 7 6 5 4 3 2 1 0 devremove bits descriptions [31:16] ppcm port power control mask global-power switching. this field is only valid if nopowerswitching is cleared and powerswitchingmode is set (individual port switching). when set, the port only responds to indi vidual port power switching commands ( set / clearportpower ). when cleared, the port only responds to global power switching commands ( set / clearglobalpower ). 0 = device not removable 1 = global-power mask port bit relationship - unimplemented ports are reserved, read/write '0'. 0 : reserved 1 : port 1 2 : port 2 ... 15 : port 15 [15:0] devremove device removable 0 = device not removable 1 = device removable port bit relationship 0 : reserved 1 : port 1 2 : port 2 ... 15 : port 15 unimplemented ports are re served, read/write '0'. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 201 host controller root hub status register (hcrhsts) register address r/w description reset value hcrhsts 0xb000_7050 r/w host controller root hub status register 0x0000_0000 31 30 29 28 27 26 25 24 rweclr reserved 23 22 21 20 19 18 17 16 reserved ocic lpsc 15 14 13 12 11 10 9 8 drwen reserved 7 6 5 4 3 2 1 0 reserved oc lps bits descriptions [31] rweclr clear remote wakeup enable writing a '1' to this bit clears deviceremotewakeupenable . writing a '1' has no effect. [17] ocic over current indicator change this bit is set when overcurrentindicator changes. writing a '1' clears this bit. writing a '0' has no effect. [16] lpsc (read) localpowerstatuschange not supported. always read '0'. (write) setglobalpower write a '1' issues a setglobalpower command to the ports. writing a '0' has no effect. [15] drwen (read) deviceremotewakeupenable this bit enables ports' connectstatuschange as a remote wakeup event. 0 = disabled 1 = enabled (write) setremotewakeupenable writing a '1' sets deviceremotewakeupenable . writing a '0' has no effect. [1] oc over current indicator this bit reflects the state of the ovrcur pin. this field is only valid if noovercurrentprotection and overcurrentprotectionmode are cleared. 0 = no over-current condition 1 = over-current condition [0] lps (read) localpowerstatus not supported. always read '0'. (write) clearglobalpower writing a '1' issues a clearglobalpower command to the ports. writing a '0' has no effect. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 202 host controller root hub port status (hcrhprt [1: 2]) register address r/w description reset value hcrhprt1 0xb000_7054 r/w host controller root hub port status [1] 0x0000_0000 hcrhprt2 0xb000_7058 r/w host controller root hub port status [2] 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved prsc pocic pssc pesc csc 15 14 13 12 11 10 9 8 reserved lsdev pps 7 6 5 4 3 2 1 0 reserved pr poc ps pe cc bits descriptions [20] prsc port reset status change this bit indicates that the port reset signal has completed. 0 = port reset is not complete. 1 = port reset is complete. [19] pocic port over current indicator change this bit is set when overcurrentindicator changes. writing a '1' clears this bit. writing a '0' has no effect. [18] pssc port suspend status change this bit indicates the completion of the selective resume sequence for the port. 0 = port is not resumed. 1 = port resume is complete. [17] pesc port enable status change this bit indicates that the port has b een disabled due to a hardware event (cleared portenablestatus ). 0 = port has not been disabled. 1 = portenablestatus has been cleared. [16] csc connect status change this bit indicates connect or disconnect event has been detected. writing a '1' clears this bit. writing a '0' has no effect. 0 = no connect/disconnect event. 1 = hardware detection of connect/disconnect event. note: if deviceremoveable is set, this bit resets to '1'. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 203 [9] lsdev (read) lowspeeddeviceattached this bit defines the speed (and bud idle) of the attached device. it is only valid when currentconnectstatus is set. 0 = full speed device 1 = low speed device (write) clearportpower writing a '1' clears portpowerstatus . writing a '0' has no effect [8] pps (read) portpowerstatus this bit reflects the power state of th e port regardless of the power switching mode. 0 = port power is off. 1 = port power is on. note: if nopowerswitching is set, this bit is always read as '1'. (write) setportpower writing a '1' sets portpowerstatus . writing a '0' has no effect. [4] pr (read) portresetstatus 0 = port reset signal is not active. 1 = port reset si gnal is active. (write) setportreset writing a '1' sets portresetstatus . writing a '0' has no effect. [3] poc (read) portovercurrentindicator this bit reflects the state of the ovrcur pin dedicated to this port. this field is only valid if noovercurrentprotection is cleared and overcurrentprotectionmode is set. 0 = no over-current condition 1 = over-current condition (write) clearportsuspend writing a '1' initiates the selective resume sequence for the port. writing a '0' has no effect. [2] ps (read) portsuspendstatus 0 = port is not suspended 1 = port is selectively suspended (write) setportsuspend writing a '1' sets portsuspendstatus . writing a '0' has no effect. [1] pe (read) portenablestatus 0 = port disabled. 1 = port enabled. (write) setportenable writing a '1' sets portenablestatus . writing a '0' has no effect. [0] cc (read) currentconnectstatus 0 = no device connected. 1 = device connected. note: if deviceremoveable is set (not removable) this bit is always '1'. (write) clearportenable writing '1' a clears portenablestatus . writing a '0' has no effect. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 204 usb operational mode enable register (opmoden) register address r/w description reset value opmoden 0xb000_7204 r/w usb operational mode enable register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved siepdis 7 6 5 4 3 2 1 0 reserved ocalow reserved abort dbr16 bits descriptions [8] siepdis sie pipeline disable when set, waits for all usb bus activity to complete prior to returning completion status to the list processor. this is a failsafe mechanism to avoid potential problems with the clk_dr transition between 1.5 mhz and 12 mhz. [3] ocalow over current active low this bit controls the polarity of over current flag from external power ic. 0: over current flag is high active 1: over current flag is low active [1] abort ahb bus error response this bit indicates there is an erro r response received in ahb bus. 0: no error response received 1: error response received [0] dbr16 data buffer region 16 when set, the size of the data buffer re gion is 16 bytes. otherwise, the size is 32 bytes. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 205 7.8 usb 2.0 device controller the NUC946ADN usb device controller is compliant to th e usb specification versio n 2.0. it also supports the software control for device re mote-wakeup and 6 configurable en dpoints in addition to control endpoint. each of these endpoints can be isochronous, bulk or interrupt and they can be either of in or out direction with maximum packet size up to 1024 bytes. three di fferent modes of operation (auto validation mode, manual validation mode and fl y mode) are supported for in-endpoint. 7.8.1 usb device register group summary register groups description main control registers these set of registers control the global enable of interrupts and maintain the status of the interrupts usb control registers these set of registers control th e usb related events to/from the usb host and hold the status of the usb events. control endpoint registers these set of registers direct th e control endpoint in handling the usb requests from the host and ho ld the status information of the transactions. non control endpoint registers these set of registers configure, control and exhibit the status of the non-control endpoints? operation dma registers these registers are responsible fo r the dma related operations 7.8.2 usb device control registers map register address r/w description reset value usbd_ba = 0xb000_6000 irq_stat 0xb000_6000 r interrupt register 0x0000_0000 irq_enb_l 0xb000_6008 r/w interrupt enable low register 0x0000_0001 usb_irq_stat 0xb000_6010 r/w usb interrupt status register 0x0000_0000 usb_irq_enb 0xb000_6014 r/w usb interrupt enable register 0x0000_0040 usb_oper 0xb000_6018 r/w usb operational register 0x0000_0002 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 206 usb_frame_cnt 0xb000_601c r usb frame count register 0x0000_0000 usb_addr 0xb000_6020 r/w usb address register 0x0000_0000 cep_data_buf 0xb000_6028 r/w control-ep data buffer 0x0000_0000 cep_ctrl_stat 0xb000_602c r/w control-ep control and status 0x0000_0000 cep_irq_enb 0xb000_6030 r/w control-ep interrupt enable 0x0000_0000 cep_irq_stat 0xb000_6034 r/w control-ep interrupt status 0x0000_1000 in_trnsfr_cnt 0xb000_6038 r/w in-transfer data count 0x0000_0000 out_trnsfr_cnt 0xb000_603c r out-transfer data count 0x0000_0000 cep_cnt 0xb000_6040 r control-ep data count 0x0000_0000 setup1_0 0xb000_6044 r setupbyte1 & byte0 0x0000_0000 setup3_2 0xb000_6048 r setupbyte3 & byte2 0x0000_0000 setup5_4 0xb000_604c r setupbyte5 & byte4 0x0000_0000 setup7_6 0xb000_6050 r setupbyte7 & byte6 0x0000_0000 cep_start_addr 0xb000_6054 r/w control ep?s ram start address 0x0000_0000 cep_end_addr 0xb000_6058 r/w control ep?s ram end address 0x0000_0000 dma_ctrl_sts 0xb000_605c r/w dma control and status register 0x0000_0000 dma_cnt 0xb000_6060 r/w dma count register 0x0000_0000 epa_data_buf 0xb000_6064 r/w endpoint a data register 0x0000_0000 epa_irq_stat 0xb000_6068 r/w endpoint a interrupt status register 0x0000_0002 epa_irq_enb 0xb000_606c r/w endpoint a interrupt enable register 0x0000_0000 epa_data_cnt 0xb000_6070 r data count available in endpoint a buffer 0x0000_0000 epa_rsp_sc 0xb000_6074 r/w endpoint a response register set/clear 0x0000_0000 epa_mps 0xb000_6078 r/w endpoint a maximum packet size register 0x0000_0000 epa_cnt 0xb000_607c r/w endpoint a transfer count register 0x0000_0000 epa_cfg 0xb000_6080 r/w endpoint a configuration register 0x0000_0012 epa_start_addr 0xb000_6084 r/w endpoint a ram start address 0x0000_0000 epa_end_addr 0xb000_6088 r/w endpoint a ram end address 0x0000_0000 epb_data_buf 0xb000_608c r/w endpoint b data register 0x0000_0000 epb_irq_stat 0xb000_6090 r/w endpoint b interrupt status register 0x0000_0002 epb_irq_enb 0xb000_6094 r/w endpoint b interrupt enable register 0x0000_0000 epb_data_cnt 0xb000_6098 r data count available in endpoint b buffer 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 207 epb_rsp_sc 0xb000_609c r/w endpoint b response register set/clear 0x0000_0000 epb_mps 0xb000_60a0 r/w endpoint b maximum packet size register 0x0000_0000 epb_trf_cnt 0xb000_60a4 r/w endpoint b transfer count register 0x0000_0000 epb_cfg 0xb000_60a8 r/w endpoint b configuration register 0x0000_0022 epb_start_addr 0xb000_60ac r/w endpoint b ram start address 0x0000_0000 epb_end_addr 0xb000_60b0 r/w endpoint b ram end address 0x0000_0000 epc_data_buf 0xb000_60b4 r/w endpoint c data register 0x0000_0000 epc_irq_stat 0xb000_60b8 r/w endpoint c interrupt status register 0x0000_0002 epc_irq_enb 0xb000_60bc r/w endpoint c interrupt enable register 0x0000_0000 epc_data_cnt 0xb000_60c0 r data count available in endpoint c buffer 0x0000_0000 epc_rsp_sc 0xb000_60c4 r/w endpoint c response re gister set/clear 0x0000_0000 epc_mps 0xb000_60c8 r/w endpoint c maximum pa cket size register 0x0000_0000 epc_trf_cnt 0xb000_60cc r/w endpoint c transfer count register 0x0000_0000 epc_cfg 0xb000_60d0 r/w endpoint c configuration register 0x0000_0032 epc_start_addr 0xb000_60d4 r/w endpoint c ram start address 0x0000_0000 epc_end_addr 0xb000_60d8 r/w endpoint c ram end address 0x0000_0000 epd_data_buf 0xb000_60dc r/w endpoint d data register 0x0000_0000 epd_irq_stat 0xb000_60e0 r/w endpoint d interrupt status register 0x0000_0002 epd_irq_enb 0xb000_60e4 r/w endpoint d interrupt enable register 0x0000_0000 epd_data_cnt 0xb000_60e8 r data count available in endpoint d buffer 0x0000_0000 epd_rsp_sc 0xb000_60ec r/w endpoint d response re gister set/clear 0x0000_0000 epd_mps 0xb000_60f0 r/w endpoint d maximum pa cket size register 0x0000_0000 epd_trf_cnt 0xb000_60f4 r/w endpoint d transfer count register 0x0000_0000 epd_cfg 0xb000_60f8 r/w endpoint d configuration register 0x0000_0042 epd_start_addr 0xb000_60fc r/w endpoint d ram start address 0x0000_0000 epd_end_addr 0xb000_6100 r/w endpoint d ram end address 0x0000_0000 epe_data_buf 0xb000_6104 r/w endpoint e data register 0x0000_0000 epe_irq_stat 0xb000_6108 r/w endpoint e interrupt status register 0x0000_0002 epe_irq_enb 0xb000_610c r/w endpoint e interrupt enable register 0x0000_0000 epe_data_cnt 0xb000_6110 r data count available in endpoint e buffer 0x0000_0000 epe_rsp_sc 0xb000_6114 r/w endpoint e response re gister set/clear 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 208 epe_mps 0xb000_6118 r/w endpoint e maximum pa cket size register 0x0000_0000 epe_trf_cnt 0xb000_611c r/w endpoint e transfer count register 0x0000_0000 epe_cfg 0xb000_6120 r/w endpoint e configuration register 0x0000_0052 epe_start_addr 0xb000_6124 r/w endpoint e ram start address 0x0000_0000 epe_end_addr 0xb000_6128 r/w endpoint e ram end address 0x0000_0000 epf_data_buf 0xb000_612c r/w endpoint f data register 0x0000_0000 epf_irq_stat 0xb000_6130 r/w endpoint f interrupt status register 0x0000_0002 epf_irq_enb 0xb000_6134 r/w endpoint f interrupt enable register 0x0000_0000 epf_data_cnt 0xb000_6138 r data count available in endpoint f buffer 0x0000_0000 epf_rsp_sc 0xb000_613c r/w endpoint f response register set/clear 0x0000_0000 epf_mps 0xb000_6140 r/w endpoint f maximum packet size register 0x0000_0000 epf_trf_cnt 0xb000_6144 r/w endpoint f transfer count register 0x0000_0000 epf_cfg 0xb000_6148 r/w endpoint f configuration register 0x0000_0062 epf_start_addr 0xb000_614c r/w endpoint f ram start address 0x0000_0000 epf_end_addr 0xb000_6150 r/w endpoint f ram end address 0x0000_0000 usb_dma_addr 0xb000_6700 r/w ahb_dma address register 0x0000_0000 usb_phy_ctl 0xb000_6704 r/w usb phy control register 0x0000_0060 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 209 7.8.3 usb device control registers interrupt register (irq) register address r/w description default value irq 0xb000_6000 r interrupt register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 epf_int epe_int epd_int epc_int epb_int epa_int cep_int usb_int bits descriptions [7] epf_int this bit conveys the interrupt for endpoints f. when set, the corresponding endpoint f's in terrupt status register should be read to determine the cause of the interrupt. [6] epe_int this bit conveys the interrupt for endpoints e. when set, the corresponding endpoint e's in terrupt status register should be read to determine the cause of the interrupt. [5] epd_int this bit conveys the interrupt for endpoints d. when set, the corresponding endpoint d's in terrupt status register should be read to determine the cause of the interrupt. [4] epc_int this bit conveys the interrupt for endpoints c. when set, the corresponding endpoint c's in terrupt status register should be read to determine the cause of the interrupt. [3] epb_int t his bit conveys the interrupt for endpoints b. when set, the corresponding endpoint b's interrupt status register should be read to determine the cause of the interrupt. [2] epa_int this bit conveys the interrupt for endpoints a . when set, the corresponding endpoint a's in terrupt status register should be read to determine the cause of the interrupt. [1] cep_int control endpoint interrupt. this bit conveys the interrupt status for control endpoint. when set, control-ep?s interrupt status register should be read to determine the cause of the interrupt. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 210 [0] usb_int usb interrupt. the interrupt status for us b specific events endpoint. when set, usb interrupt status register should be read to determine the cause of the interrupt. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 211 interrupt enable low register (irq_enb_l) register address r/w description default value irq_enb_l 0xb000_6008 r/w interrupt enable low register 0x0000_0001 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 epf_ie epe_ie epd_ie epc_ie epb_ie epa_ie cep_ie usb_ie bits descriptions [7] epf_ie interrupt enable for endpoint f. when set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint f [6] epe_ie interrupt enable for endpoint e. when set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint e [5] epd_ie interrupt enable for endpoint d. when set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint d [4] epc_ie interrupt enable for endpoint c. when set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint c [3] epb_ie interrupt enable for endpoint b. when set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint b [2] epa_ie interrupt enable for endpoint a. when set, this bit enables a local interrupt to be generated when an interrupt is pending for the endpoint a. [1] cep_ie control endpoint interrupt enable. when set, this bit enables a local interrupt to be generated when an interrupt is pending for the control endpoint. [0] usb_ie usb interrupt enable. when set, this bit enables a local in terrupt to be generated when a usb event occurs on the bus. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 212 usb interrupt status register (usb_irq_stat) register address r/w description default value usb_irq_stat 0xb000_6010 r/w usb interrupt status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved tclkok_i s dmacom_i s hispd_is sus_is rum_is rst_is sof_is bits descriptions [6] tclkok_is usable clock interrupt. this bit is set when usable clock is available from the transceiver. writing ?1? clears this bit. [5] dmacom_is dma completion interrupt. this bit is set when the dma transfer is over. writing ?1? clears this bit. [4] hispd_is high speed settle. this bit is set when the valid high-speed reset protocol is over and the device has settled is high-speed. writing ?1? clears this bit. [3] sus_is suspend request. this bit is set as default and it has to be cleared by writing ?1? before the usb reset. this bit is also set when a usb suspend request is detected from the host. writing ?1? clears this bit. [2] rum_is resume. when set, this bit indicates that a device resume has occurred. writing a ?1? clears this bit. [1] rst_is reset status. when set, this bit indicates that eith er the usb root port reset is end. writing a ?1? clears this bit. [0] sof_is sof. this bit indicates when a start-of -frame packet has been received. writing a ?1? clears this bit. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 213 usb interrupt enable register (usb_irq_enb) register address r/w description default value usb_irq_enb 0xb000_6014 r/w usb interrupt enable register 0x0000_0040 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved tclkok_i e dmacom_i e hispd_ie sus_ie rum_ie rst_ie sof_ie bits descriptions [6] tclkok_ie usable clock interrupt. this bit enables the usable clock interrupt. [5] dmacom_ie dma completion interrupt. this bit enables the dma completion interrupt [4] hispd_ie high speed settle. this bit enables the high -speed settle interrupt. [3] sus_ie suspend request . this bit enables the suspend interrupt. [2] rum_ie resume. this bit enables the resume interrupt. [1] rst_ie reset status. this bit enables the usb-reset interrupt. [0] sof_ie sof interrupt. this bit enables the sof interrupt. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 214 usb operational register (usb_oper) register address r/w description default value usb_oper 0xb000_6018 r/w usb operational register 0x0000_0002 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved cur_spd set_hispd gen_rum bits descriptions [2] cur_spd usb current speed. when set, this bit indicates that the device controller has settled in high speed and a zero indicates that the device has settled in full speed [1] set_hispd usb high speed. when set to one, this bit indicate s the device controller to initiate a chirp-sequence during reset protocol, if it set to zero, it indicates the device controller to suppress the chirp-sequence during reset protocol, thereby allowing the device controller to settle in full- speed, even though it is connected to a usb2.0 host. [0] gen_rum generate resume. writing a 1 to this bit causes a resu me sequence to be initiated to the host if device remote wakeup is enabled. this bit is self-clearing. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 215 usb frame count register (usb_frame_cnt) register address r/w description default value usb_frame_cnt 0xb000_601c r usb frame count register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved frame_cnt 7 6 5 4 3 2 1 0 frame_cnt mframe_cnt bits descriptions [13:3] frame_cnt frame counter. this field contains the frame count from the most recent start-of- frame packet. [2:0] mframe_cnt micro frame counter. this field contains the micro-frame number for the frame number in the frame counter field. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 216 usb address register (usb_addr) register address r/w description default value usb_addr 0xb000_6020 r/w usb address register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved addr bits descriptions [6:0] addr this field contains the current usb a ddress of the device. this field is cleared when a root port reset is detected. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 217 control-ep data buffer (cep_data_buf) register address r/w description default value cep_data_buf 0xb000_6028 rw control-ep data buffer 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 data_buf 7 6 5 4 3 2 1 0 data_buf bits descriptions [15:0] data_buf control-ep data buffer. bits [15:8] of this register provide the high order byte and bits [7:0] of this register provide the lower or der byte for the buffer transaction (read or write). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 218 control-ep control and status (cep_ctrl_stat) register address r/w description default value cep_ctrl_stat 0xb000_602c rw contro l-ep control and status 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved flush zerolen stlall nak_clear bits descriptions [3] flush cep-flush bit. writing 1 to this bit cause the pa cket buffer and its corresponding cep_avl_cnt register to be cleare d. this bit is self-cleaning. [2] zerolen zerolen bit. this bit is valid for auto validation mode only. when this bit is set, device controller can send a zero length pack et to the host during data stage to an in token. this bit gets cleared once the zero length data packet is sent. so, the local cpu need not write again to clear this bit. [1] stlall stall. this bit is a read/write bit. when this stall bit is set, the control endpoint sends a stall handshake in response to any in or out token thereafter. this is typically used for response to invalid/unsupported requests. when this bit is being set the nak clear bit has to be cleared at the same time since the nak clear bit has highest priority than stall. it is automatically cleared on receipt of a next setup-to ken. so, the local cpu need not write again to clear this bit. note: only when cpu write data[1:0] is 2?b10 or 2?b00, this bit can be updated. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 219 [0] nak_clear nak_clear. this is a read/write bit. this bit plays a crucial role in any control transfer. it bit is set to one by the device controller, whenever a setup token is received. the local cpu can take its own time to finish off any house-keeping work based on the request and then clear this bit. unless the bit is being cleared by the local cpu by writing zero, the device controller will be responding with naks for the subsequent status phase. this mechanism holds the host from moving to the next request, until the local cpu is also ready to process the next request. note: only when cpu write data[1:0] is 2?b10 or 2?b00, this bit can be updated. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 220 control endpoint interrupt enable (cep_irq_enable) register address r/w description default value cep_irq_enable 0xb000_6030 r/w control endpoint interrupt enable 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved empty_ie full_ie stacom_ie err_ie stall_ie 7 6 5 4 3 2 1 0 nak_ie data_rxed_ie data_txed_ie ping_ie in_tk_ie out_tk_ie setup_pk_ie setup_tk_ie bits descriptions [12] empty_ie buffer empty interrupt. this bit enables the buffer empty interrupt. [11] full_ie buffer full interrupt. this bit enables the buffer full interrupt. [10] stacom_ie status completion interrupt. this bit enables the status completion interrupt. [9] err_ie usb error interrupt. this bit enables the usb error interrupt. [8] stall_ie stall sent interrupt. this bit enables the stall sent interrupt [7] nak_ie nak sent interrupt. this bit enables the nak sent interrupt. [6] data_rxed_ie data packet received interrupt. this bit enables the data received interrupt. [5] data_txed_ie data packet transmitted interrupt. this bit enables the data packet transmitted interrupt. [4] ping_ie ping token interrupt . this bit enables the ping token interrupt. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 221 [3] in_tk_ie in token interrupt. this bit enables the in token interrupt [2] out_tk_ie out token interrupt. this bit enables the out token interrupt. [1] setup_pk_ie setup packet interrupt. this bit enables the setup packet interrupt. [0] setup_tk_ie setup token interrupt enable. this bit enables the setup token interrupt. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 222 control-endpoint interrupt status (cep_irq_stat) register address r/w description default value cep_irq_stat 0xb000_6034 r/w contro l-ep interrupt status 0x0000_1000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved empty_is full_is stacom_is err_is stall_is 7 6 5 4 3 2 1 0 nak_is data_rxed_is data_txed_is ping_is in_tk_is out_tk_is setup_pk_is setup_tk_i s bits descriptions [12] empty_is buffer empty interrupt. (read only) this bit is set when the control-ednpt buffer is empty. [11] full_is buffer full interrupt. (write ?1? clear) this bit is set when the control-endpt buffer is full. [10] stacom_is status completion interrupt. (write ?1? clear) this bit is set when the status stage of a usb transaction has completed successfully. [9] err_is usb error interrupt. (write ?1? clear) this bit is set when an error ha d occurred during the transaction. [8] stall_is stall sent interrupt. (write ?1? clear) this bit is set when a stall-token is sent in response to an in/out token [7] nak_is nak sent interrupt. (write ?1? clear) this bit is set when a nak-token is sent in response to an in/out token [6] data_rxed_is data packet received interrupt . (write ?1? clear) this bit is set when a data pack et is successfully received from the host for an out-token and an ack is sent to the host. [5] data_txed_is data packet transmitted interrupt. (write ?1? clear) this bit is set when a data pack et is successfully transmitted to the host in response to an in-tok en and an ack-token is received for the same. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 223 [4] ping_is ping token interrupt. (write ?1? clear) this bit is set when the control-endpt receives a ping token from the host. [3] in_tk_is in token interrupt. (write ?1? clear) this bit is set when the control-endpt receives an in token from the host. [2] out_tk_is out token interrupt. (write ?1? clear) this bit is set when the control-endpoint receives an out token from the host. [1] setup_pk_is setup packet interrupt. (write ?1? clear) this bit is set when a setup pack et has been received from the host. this bit must be cleared (b y writing a 1) before the next setup packet can be received. if the bit is not cleared, then the successive setup packets will be overwritten in the setup packet buffer. [0] setup_tk_is setup token interrupt. (write ?1? clear) this bit indicates when a setup token is received. writing a 1 clears this status bit NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 224 in-transfer data count (in_trf_cnt) register address r/w description default value in_trf_cnt 0xb000_6038 r/w in-transfer data count 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 in_trf_cnt bits descriptions [7:0] in_trf_cnt in-transfer data count. there is no mode selection for the control endpoint (but it operates like manual mode).the local-cpu has to fill the control- endpoint buffer with the data to be sent for an in-token and to write the count of bytes in this register. when zero is written into this field, a zero length packet is sent to the host. when the count written in the register is more than the mps, the data sent will be of only mps. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 225 out-transfer data count (out_trf_cnt) register address r/w description default value out_trf_cnt 0xb000_603c r out-transfer data count 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 out_trf_cnt 7 6 5 4 3 2 1 0 out_trf_cnt bits descriptions [15:0] out_trf_cnt out-transfer data count. the device controller maintains th e count of the data received in case of an out transfer, during the control transfer. control- endpoint data count (cep_cnt) register address r/w description default value cep_cnt 0xb000_6040 r control-ep data count 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 cep_cnt 7 6 5 4 3 2 1 0 cep_cnt bits descriptions [15:0] cep_cnt control-ep data count. the device controller maintains the count of the data of control-ep. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 226 setup1 & setup0 bytes (setup1_0) register address r/w description default value setup1_0 0xb000_6044 r setup1 & setup0 bytes 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 setup1 7 6 5 4 3 2 1 0 setup0 bits descriptions [15:8] setup1 setup byte 1[15:8]. this register provides byte 1 of the last setup packet received. for a standard device request, the following brequest code information is returned. code descriptions 0x00 get status 0x01 clear feature 0x02 reserved 0x03 set feature 0x04 reserved 0x05 set address 0x06 get descriptor 0x07 set descriptor 0x08 get configuration 0x09 set configuration 0x0a get interface 0x0b set interface 0x0c synch frame NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 227 [7:0] setup0 setup byte 0[7:0]. this register provides byte 0 of the last setup packet received. for a standard device request, the following bmrequesttype information is returned. bits descriptions [7] direction 0 = host to device; 1 = device to host [6:5] type 0 = standard, 1 = class, 2 = vendor, 3 = reserved [4:0] recipient 0 = device, 1 = interface, 2 = endpoint, 3 = other, 4-31 reserved NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 228 setup3 & setup2 bytes (setup3_2) register address r/w description default value setup3_2 0xb000_6048 r setup3 & setup2 bytes 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 setup3 7 6 5 4 3 2 1 0 setup2 bits descriptions [15:8] setup3 setup byte 3 [15:8]. this register provides byte 3 of the last setup packet received. for a standard device request, the most significant byte of the wvalue field is returned. [7:0] setup2 setup byte 2 [7:0]. this register provides byte 2 of the last setup packet received. for a standard device request, the least significant byte of the wvalue field is returned. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 229 setup5 & setup4 bytes (setup5_4) register address r/w description default value setup5_4 0xb000_604c r setup5 & setup4 bytes 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 setup5 7 6 5 4 3 2 1 0 setup4 bits descriptions [15:8] setup5 setup byte 5[15:8]. this register provides byte 5 of the last setup packet received. for a standard device request, the most significant byte of the windex field is returned. [7:0] setup4 setup byte 4[7:0]. this register provides byte 4 of the last setup packet received. for a standard device request, the least significant byte of the windex is returned. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 230 setup7 & setup6 bytes (setup7_6) register address r/w description default value setup7_6 0xb000_6050 r setup7 & setup6 bytes 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 setup7 7 6 5 4 3 2 1 0 setup6 bits descriptions [15:8] setup7 setup byte 7[15:8]. this register provides byte 7 of the last setup packet received. for a standard device request, the most significant byte of the wlength field is returned. [7:0] setup6 setup byte 6[7:0]. this register provides byte 6 of the last setup packet received. for a standard device request, the least significant byte of the wlength field is returned. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 231 control endpoint ram start addr ess register (cep_start_addr) register address r/w description default value cep_start_addr 0xb000_6054 r/w control ep ram start address register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved cep_start_addr 7 6 5 4 3 2 1 0 cep_start_addr bits descriptions [10:0] cep_start_addr this is the start-address of the ram space allocated for the control-endpoint NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 232 control endpoint ram end addr ess register (cep_end_addr) register address r/w description default value cep_end_addr 0xb000_6058 r/w control ep ram end address register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved cep_end_addr 7 6 5 4 3 2 1 0 cep_end_addr bits descriptions [10:0] cep_end_addr this is the end-address of th e ram space allocated for the control-endpoint NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 233 dma control status register (dma_ctrl_sts) register address r/w description default value dma_ctrl_sts 0xb000_605c r/w dma control status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 rst_dma scat_ga_en dma_en dma_rd dma_addr bits descriptions [7] rst_dma reset dma state machine. [6] scat_ga_en scatter gather function enable [5] dma_en dma enable bit [4] dma_rd dma operation bit. if ?1?, the operation is a dma read and if ?0? the operation is a dma write. [3:0] dma_addr dma ep_addr bits when enable scatter gather dma function, scat_ga_e n needs to be set high and dma_cnt set to 8 bytes. then dma will enable to fetch the descriptor which describes the real memory address and length. the descriptor will be a 8-byte format, like the following: [31] [30] [29:0] mem_addr[31:0] eot rd reserved count[19:0] mem_addr : it specifies the memory address (ahb address). eot : end of transfer. when this bit sets to hi gh, it means this is the last descriptor. rd : ?1? means read from memory into buffer. ?0? means read from buffer into memory. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 234 dma count register (dma_cnt) register address r/w description default value dma_cnt 0xb000_6060 r/w dma count register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved dma_cnt 15 14 13 12 11 10 9 8 dma_cnt 7 6 5 4 3 2 1 0 dma_cnt bits descriptions [19:0] dma_cnt the transfer count of the dma operat ion to be performed is written to this register. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 235 endpoint a~f data register (epa_data_buf~ epf_data_buf) register address r/w description default value epa_data_buf 0xb000_6064 r/w endpoint a data register 0x0000_0000 epb_data_buf 0xb000_608c r/w endpoint b data register 0x0000_0000 epc_data_buf 0xb000_60b4 r/w endpoint c data register 0x0000_0000 epd_data_buf 0xb000_60dc r/w endpoint d data register 0x0000_0000 epe_data_buf 0xb000_6104 r/w endpoint e data register 0x0000_0000 epf_data_buf 0xb000_612c r/w endpoint f data register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 ep_data_buf 7 6 5 4 3 2 1 0 ep_data_buf bits descriptions [15:0] ep_data_buf endpoint a~f data register. bits [15:8] of this register provid e the high order byte and bits [7:0] of this register provide the lower order byte for the buffer transaction (read or write). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 236 endpoint a~f interrupt status regi ster (epa_irq_stat~ epf_irq_stat) register address r/w description default value epa_irq_stat 0xb000_6068 r/w endpoint a interrupt status register 0x0000_0002 epb_irq_stat 0xb000_6090 r/w endpoint b interrupt status register 0x0000_0002 epc_irq_stat 0xb000_60b8 r/w endpoint c interrupt status register 0x0000_0002 epd_irq_stat 0xb000_60e0 r/w endpoint d interrupt status register 0x0000_0002 epe_irq_stat 0xb000_6104 r/w endpoint e interrupt status register 0x0000_0002 epf_irq_stat 0xb000_6130 r/w endpoint f interrupt status register 0x0000_0002 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved o_short_pkt_is err_is nyet_is stall_is nak_is 7 6 5 4 3 2 1 0 ping_is in_tk_is out_tk_is data_rxed_is data_txed_is short_pkt_is empty_is full_is bits descriptions [12] o_short_pkt_is bulk out short packet received (writing a ?1? clears this bit.) received bulk out short packet (including zero length packet ) [11] err_is err sent. (writing a ?1? clears this bit.) this bit is set when there occurs any error in the transaction. [10] nyet_is nyet sent. (writing a ?1? clears this bit.) this bit is set when the space available in the ram is not sufficient to accommodate the next on coming data packet. [9] stall_is usb stall sent. (writing a ?1? clears this bit.) the last usb packet could not be accepted or provided because the endpoint was stalled, and was acknowledged with a stall. [8] nak_is usb nak sent. (writing a ?1? clears this bit.) the last usb in packet could not be provided, and was acknowledged with a nak. [7] ping_is ping token interrupt. (writing a ?1? clears this bit.) this bit is set when a data in toke n has been received from the host. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 237 [6] in_tk_is data in token interrupt. (writing a ?1? clears this bit.) this bit is set when a data in toke n has been received from the host. [5] out_tk_is data out token interrupt. (writing a ?1? clears this bit.) this bit is set when a data out token has been received from the host. this bit also se t by ping tokens (in high-speed only). [4] data_rxed_is data packet received interrupt. (writing a ?1? clears this bit.) this bit is set when a data packet is received from the host by the endpoint. [3] data_txed_is data packet transmitted interrupt. (writing a ?1? clears this bit.) this bit is set when a data packet is transmitted from the endpoint to the host. [2] short_pkt_is short packet transferred interrupt. (writing a ?1? clears this bit.) this bit is set when the length of the last packet was less than the maximum packet size (ep_mps). [1] empty_is buffer empty. (read only) for an in endpoint, a buffer is available to the local side for writing up to fifo full of bytes. this bit is set when the endpoint buffer is empty. for an out endpoint, the currently se lected buffer has a count of 0, or no buffer is available on the local side (nothing to read). [0] full_is buffer full. (read only) this bit is set when the endpoint packet buffer is full. for an in endpoint, the currently selected buffer is full, or no buffer is available to the local side for writing (no space to write). for an out endpoint, there is a buffer available on the lo cal side, and there are fifo full of bytes available to be read (entire packet is available for reading). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 238 endpoint a~f interrupt enable regi ster (epa_irq_enb~ epf_irq_enb) register address r/w description default value epa_irq_enb 0xb000_606c r/w endpoint a interrupt enable register 0x0000_0000 epb_irq_enb 0xb000_6094 r/w endpoint b interrupt enable register 0x0000_0000 epc_irq_enb 0xb000_60bc r/w endpoint c interrupt enable register 0x0000_0000 epd_irq_enb 0xb000_60e4 r/w endpoint d interrupt enable register 0x0000_0000 epe_irq_enb 0xb000_610c r/w endpoint e interrupt enable register 0x0000_0000 epf_irq_enb 0xb000_6134 r/w endpoint f interrupt enable register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved o_short_pkt_ie err_ie nyet_ie stall_ie nak_ie 7 6 5 4 3 2 1 0 ping_ie in_tk_ie out_tk_ie data_rxed_ie data_txed_ie short_pkt_ie empty_ie full_ie bits descriptions [12] o_short_pkt_ie bulk out short packet interrupt enable when set, this bit enables a local interrupt to be set whenever bulk- out short packet occurs on the bus for this endpoint. [11] err_ie err interrupt enable. when set, this bit enables a local interrupt to be set whenever err condition occurs on the bus for this endpoint. [10] nyet_ie nyet interrupt enable. when set, this bit enables a local interrupt to be set whenever nyet condition occurs on the bus for this endpoint. [9] stall_ie usb stall sent interrupt enable. when set, this bit enables a local interrupt to be set when a stall token is sent to the host. [8] nak_ie usb nak sent interrupt enable. when set, this bit enables a local interrupt to be set when a nak token is sent to the host. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 239 [7] ping_ie ping token interrupt enable. when set, this bit enables a local interrupt to be set when a ping token has been received from the host. [6] in_tk_ie data in token interrupt enable. when set, this bit enables a local interrupt to be set when a data in token has been received from the host. [5] out_tk_ie data out token interrupt enable. when set, this bit enables a local interrupt to be set when a data out token has been received from the host. [4] data_rxed_ie data packet received interrupt enable . when set, this bit enables a local interrupt to be set when a data packet has been transmitted to the host. [3] data_txed_ie data packet transmitted interrupt enable. when set, this bit enables a local interrupt to be set when a data packet has been received from the host. [2] short_pkt_ie short packet transferred interrupt enable. when set, this bit enables a local interrupt to be set when a short data packet has been transferred to/from the host. [1] empty_ie buffer empty interrupt. when set, this bit enables a local interrupt to be set when a buffer empty condition is detected on the bus. [0] full_ie buffer full interrupt. when set, this bit enables a local interrupt to be set when a buffer full condition is detected on the bus. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 240 endpoint a~f data available count regi ster (epa_data_cnt~ epf_data_cnt) register address r/w description default value epa_data_cnt 0xb000_6070 r endpoint a data available count register 0x0000_0000 epb_data_cnt 0xb000_6098 r endpoint b da ta available count register 0x0000_0000 epc_data_cnt 0xb000_60c0 r endpoint c da ta available count register 0x0000_0000 epd_data_cnt 0xb000_60e8 r endpoint d da ta available count register 0x0000_0000 epe_data_cnt 0xb000_6110 r endpoint e da ta available count register 0x0000_0000 epf_data_cnt 0xb000_6138 r endpoint f da ta available count register 0x0000_0000 31 30 29 28 27 26 25 24 reserved dma_loop 23 22 21 20 19 18 17 16 dma_loop 15 14 13 12 11 10 9 8 data_cnt 7 6 5 4 3 2 1 0 data_cnt bits descriptions [30:16] dma_loop this register is the remaining dma loop to complete. each loop means 32-byte transfer. [15:0] data_cnt for an out / in endpoint, this re gister returns the number of valid bytes in the endpoint packet buffer. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 241 endpoint a~f response set/clear re gister (epa_rsp_sc~ epf_rsp_sc) register address r/w description default value epa_rsp_sc 0xb000_6074 r/w endpoint a response set/clear register 0x0000_0000 epb_rsp_sc 0xb000_609c r/w endpoint b response set/clear register 0x0000_0000 epc_rsp_sc 0xb000_60c4 r/w endpoint c response se t/clear register 0x0000_0000 epd_rsp_sc 0xb000_60ec r/w endpoint d response se t/clear register 0x0000_0000 epe_rsp_sc 0xb000_6114 r/w endpoint e response se t/clear register 0x0000_0000 epf_rsp_sc 0xb000_613c r/w endpoint f response set/clear register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 dis_buf pk_end zerolen halt toggle mode buf_flush bits descriptions [7] dis_buf disable buffer this bit is used to disable buffer (s et buffer size to 1) when received a bulk-out short packet. [6] pk_end packet end. this bit is applicable only in case of auto-validate method. this bit is set to validate any remaining data in the buffer which is not equal to the mps of the endpoint, and happens to be the last transfer. [5] zerolen zerolen in. this bit is used to send a zero-l ength packet n response to an in- token. when this bit is set, a zero packet is sent to the host on reception of an in-token. [4] halt endpoint halt. this bit is used to send a stall handshake as response to the token from the host. when an endpoint se t feature (ep_halt) is detected by the local cpu, it must write a ?1? to this bit. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 242 [3] toggle endpoint toggle. this bit is used to clear the endpoint data toggle bit. reading this bit returns the current state of the endpoint data toggle bit. the local cpu may use this bit, to initialize the end-point?s toggle incase of reception of a set inte rface request or a clear feature (ep_halt) request from the host. only when toggle bit is ?1?, this bit can be written into the inversed write data bit[3]. [2:1] mode mode . these two bits decide the mode of operation of the in-endpoint. mode[2:1] mode description 2?b00 auto-validate mode 2?b01 manual-validate mode 2?b10 fly mode 2?b11 reserved. these bits are not valid for an out-endpoint. the auto validate mode will be activated when the reserved mode is selected. (these modes are explained detailed in later sections) [0] buf_flush buffer flush. writing a 1 to this bit causes th e packet buffer to be flushed and the corresponding ep_avail register to be cleared. this bit is self- clearing. this bit should always be written after a configuration event. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 243 endpoint a~f maximum packet size register (epa_mps~ epf_mps) register address r/w description default value epa_mps 0xb000_6078 r/w endpoint a maximum packet size register 0x0000_0000 epb_mps 0xb000_60a0 r/w endpoint b maximum packet size register 0x0000_0000 epc_mps 0xb000_60c8 r/w endpoint c maximum packet size register 0x0000_0000 epd_mps 0xb000_60f0 r/w endpoint d maximum packet size register 0x0000_0000 epe_mps 0xb000_6118 r/w endpoint e maximum packet size register 0x0000_0000 epf_mps 0xb000_6140 r/w endpoint f maximum packet size register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved ep_mps 7 6 5 4 3 2 1 0 ep_mps bits descriptions [10:0] ep_mps endpoint maximum packet size. this field determines the en dpoint maximum packet size. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 244 endpoint a~f transfer count regist er (epa_trf_cnt~ epf_trf_cnt) register address r/w description default value epa_trf_cnt 0xb000_607c r/w endpoint a transfer count register 0x0000_0000 epb_trf_cnt 0xb000_60a4 r/w endpoint b transfer count register 0x0000_0000 epc_trf_cnt 0xb000_60cc r/w endpoint c transfer count register 0x0000_0000 epd_trf_cnt 0xb000_60f4 r/w endpoint d transfer count register 0x0000_0000 epe_trf_cnt 0xb000_611c r/w endpoint e transfer count register 0x0000_0000 epf_trf_cnt 0xb000_6144 r/w endpoint f transfer count register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 ep_trf_cnt 7 6 5 4 3 2 1 0 ep_trf_cnt bits descriptions [10:0] ep_trf_cnt for in endpoints, this field determ ines the total number of bytes to be sent to the host in case of manual validation method. for out endpoints, this field has no effect NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 245 endpoint a~f configuration register (epa_cfg~ epf_cfg) register address r/w description default value epa_cfg 0xb000_6080 r/w endpoint a configuration register 0x0000_0012 epb_cfg 0xb000_60a8 r/w endpoint b configuration register 0x0000_0022 epc_cfg 0xb000_60d0 r/w endpoint c configuration register 0x0000_0032 epd_cfg 0xb000_60f8 r/w endpoint d configuration register 0x0000_0042 epe_cfg 0xb000_6120 r/w endpoint e configuration register 0x0000_0052 epf_cfg 0xb000_6148 r/w endpoint f configuration register 0x0000_0062 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved ep_mult 7 6 5 4 3 2 1 0 ep_num ep_dir ep_type ep_valid bits descriptions [9:8] ep_mult mult field . this field indicates number of transa ctions to be carried out in one single micro frame. [9:8] description 0x00 one transaction 0x01 reserved 0x10 reserved 0x11 invalid [7:4] ep_num endpoint number . this field selects the number of the endpoint. valid numbers 1 to 15. [3] ep_dir endpoint direction . ep_dir = 0 - out ep (host out to device) ep_dir = 1- in ep (host in to device) note that a maximum of one out and in endpoint is allowed for each endpoint number. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 246 [2:1] ep_type endpoint type . this field selects the type of this endpoint. endpoint 0 is forced to a control type. [2:1] description 0x00 reserved 0x01 bulk 0x10 interrupt 0x11 isochronous [0] ep_valid endpoint valid . when set, this bit enables this endpoint. this bit has no effect on endpoint 0, which is always enabled. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 247 endpoint a~f ram start address register (epa_start_addr~ epf_start_addr) register address r/w description default value epa_start_addr 0xb000_6084 r/w endpoint a ram start address register 0x0000_0000 epb_start_addr 0xb000_60ac r/w endpoint b ram start address register 0x0000_0000 epc_start_addr 0xb000_60d4 r/w endpoint c ram start address register 0x0000_0000 epd_start_addr 0xb000_60fc r/w endpoint d ram start address register 0x0000_0000 epe_start_addr 0xb000_6124 r/w endpoint e ram start address register 0x0000_0000 epf_start_addr 0xb000_614c r/w endpoint f ram start address register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 ep_start_addr 7 6 5 4 3 2 1 0 ep_start_addr bits descriptions [10:0] ep_start_addr this is the start-address of the ram space allocated for the endpoint a~f. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 248 endpoint a~f ram end address regist er (epa_end_addr~ epf_end_addr) register address r/w description default value epa_end_addr 0xb000_6088 r/w endpoint a ram end address register 0x0000_0000 epb_end_addr 0xb000_60b0 r/w endpoint b ram end address register 0x0000_0000 epc_end_addr 0xb000_60d8 r/w endpoint c ram end address register 0x0000_0000 epd_end_addr 0xb000_6100 r/w endpoint d ram end address register 0x0000_0000 epe_end_addr 0xb000_6128 r/w endpoint e ram end address register 0x0000_0000 epf_end_addr 0xb000_6150 r/w endpoint f ram end address register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 ep_end_addr 7 6 5 4 3 2 1 0 ep_end_addr bits descriptions [10:0] ep_end_addr this is the end-address of the ra m space allocated for the endpoint a~f. usb address register (usb_dma_addr) register address r/w description default value usb_dma_addr 0xb000_6700 r/w usb dma address register 0x0000_0000 31 30 29 28 27 26 25 24 usb_dma_addr 23 22 21 20 19 18 17 16 usb_dma_addr 15 14 13 12 11 10 9 8 usb_dma_addr 7 6 5 4 3 2 1 0 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 249 usb_dma_addr bits descriptions [31:0] usb_dma_addr it specifies the address from which the dma has to read / write. the address must word (32-bit) aligned. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 250 usb phy control (usb_phy_ctl) register address r/w description default value usb_phy_ctl 0xb000_6704 r/w usb phy control register 0x0000_0260 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved phy_suspend reserved 7 6 5 4 3 2 1 0 reserved bits descriptions [9] phy_suspend set this bit low will cause usb phy suspended. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 251 7.9 dma controller (dmac) the dma controller provides a dma (direct memory a ccess) function for fmi to exchange data between system memory (ex. sdram) and shared buffer (one 2048 bytes). software just simp ly fills in the starting address and enables dmac, and then you can let dm ac to handle the data transfer automatically. there is one 2048 bytes shared buffer inside dmac, separate into four 512 bytes ping-pong fifo. it can provide multi-block transfers using ping-pong mechanism for fmi. softwa re can access these shared buffers directly when fmi are not in busy. features: ? support single dma channel ? support hardware sca tter-getter function ? one 2048 bytes shared buffer is embedded ? automatic arbitration of dma request for fmi 7.9.1 dma controller registers map r : read only, w : write only, r/w : both read and write register offset r/w description reset value shared buffer fb_0 ?? fb_511 0xb000_c000 ?? 0xb000_c7fc r/w shared buffer (fifo) n/a dmac registers dmaccsr 0xb000_c800 r/w dmac control and status register 0x0000_0000 dmacsar2 0xb000_c808 r/w dmac transfer starting address register 2 0x0000_0000 dmacbcr 0xb000_c80c r dmac transfer byte count register 0x0000_0000 dmacier 0xb000_c810 r/w dmac interrupt enable register 0x0000_0001 dmacisr 0xb000_c814 r/w dmac interrupt status register 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 252 7.9.2 dmac registers dmac control and status register (dmaccsr) register offset r/w description reset value dmaccsr 0xb000_c800 r/w dmac control and status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved fmi_busy reserved 7 6 5 4 3 2 1 0 reserved sg_en2 sg_en1 sw_rst dmacen bits descriptions [9] fmi_busy fmi dma transfer is in progress this bit indicates if fmi is grante d and doing dma transfer or not. 0 = fmi dma transfer is not in progress. 1 = fmi dma transfer is in progress. [3] sg_en2 enable scatter-getter function for fmi enable dma scatter-getter function or not. ? 0 = normal operation. dmac will treat the starting address in dmacsar2 as starting pointer of a single block memory. ? 1 = enable scatter-getter operation. dmac will treat the starting address in dmacsar2 as a starting address of ph ysical address descriptor (pad) table. the format of these pads will be described later. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 253 [2] sg_en1 enable scatter-getter function for atapi enable dma scatter-getter function or not. ? 0 = normal operation. dmac will treat the starting address in dmacsar1 as starting pointer of a single block memory. ? 1 = enable scatter-getter operation. dmac will treat the starting address in dmacsar1 as a starting address of ph ysical address descriptor (pad) table. the format of these pads will be described later. [1] sw_rst software engine reset 0 = writing 0 to this bit has no effect. 1 = writing 1 to this bit will reset the internal state machine and pointers. the contents of control register will not be cleared. this bit will auto clear after few clock cycles. [0] dmacen dmac engine enable setting this bit to 1 enables dmac?s operation. if this bit is cleared, dmac will ignore all dma request from fmi and force bus master into idle state. 0 = disable dmac. 1 = enable dmac. note: if target abort is occurred, dmacen will be cleared. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 254 dmac transfer starting addr ess register 2 (dmacsar2) register offset r/w description reset value dmacsar2 0xb000_c808 r/w dmac transfer star ting address register 2 0x0000_0000 31 30 29 28 27 26 25 24 dmacsa[31:24] 23 22 21 20 19 18 17 16 dmacsa[23:16] 15 14 13 12 11 10 9 8 dmacsa[15:8] 7 6 5 4 3 2 1 0 dmacsa[7:0] bits descriptions [31:0] dmacsa dma transfer starting address for fmi this field indicates a 32-bit star ting address of system memory (sram/sdram) for dmac to retrieve or fill in data (for fmi engine). if dmac is not in normal mode, this field will be interpreted as a starting address of physical addre ss descriptor (pad) table. note: starting address should be word alignment, for example, 0x0000_0000, 0x0000_0004? the format of pad table must like below. note that the total sector count of all pads must be equal to or greater than the sector count filled in fmi engine. eot should be set to 1 in the last descriptor. memory region low high physical base address: 32-bit, word aligned sector count: 1 sector = 512 bytes, 0 means 65536 sectors (bit 15~0) eot: end of pad table (bit 31) byte 0 byte 1 byte 2 byte 3 physical base address (word aligned) sector count reserved eot NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 255 dmac transfer byte count register (dmacbcr) register offset r/w description reset value dmacbcr 0xb000_c80c r dmac transfer byte count register 0x0000_0000 31 30 29 28 27 26 25 24 reserved bcnt[25:24] 23 22 21 20 19 18 17 16 bcnt[23:16] 15 14 13 12 11 10 9 8 bcnt[15:8] 7 6 5 4 3 2 1 0 bcnt[7:0] bits descriptions [25:0] bcnt dma transfer byte count (read only) this field indicates the remained byte count of dmac transfer. the value of this field is valid only when fmi is busy; otherwise, it is zero. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 256 dmac interrupt enable register (dmacier) register offset r/w description reset value dmacier 0xb000_c810 r/w dmac interrupt enable register 0x0000_0001 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved weot_ie tabort_ie bits descriptions [1] weot_ie wrong eot encountered interrupt enable ? 0 = disable interrupt generation when wrong eot is encountered. ? 1 = enable interrupt generation when wrong eot is encountered. [0] tabort_ie dma read/write target abort interrupt enable 0 = disable target abort interrupt generation during dma transfer. 1 = enable target abort interrupt generation during dma transfer. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 257 dmac interrupt status register (dmacisr) register offset r/w description reset value dmacisr 0xb000_c814 r/w dmac interrupt status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved weot_if tabort_if bits descriptions [1] weot_if wrong eot encountered interrupt flag when dma scatter-getter function is en abled, and eot of the descriptor is encountered before dma tran sfer finished (that mean s the total sector count of all pad is less than the sector count of fmi), this bit will be set. 0 = no eot encountered befo re dma transfer finished. 1 = eot encountered before dma transfer finished. note: this bit is read only, but can be cleared by writing ?1? to it. [0] tabort_if dma read/write target abort interrupt flag 0 = no bus error response received. 1 = bus error response received. note: this bit is read only, but can be cleared by writing ?1? to it. note: when dmac?s bus master receiv ed error response, it means that target abort is happened. dmac will stop transfer and respond this event to software and fmi; then go to idle state. when target abort occurred or weot_if is set, suggest software reset dmac and ip, and th en transfer those data again. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 258 7.10 flash memory interface controller (fmi) the flash memory interface (fmi) supports secure di gital (sd, sdio & mmc) and memory stick (memory stick pro). fmi is cooperated with dmac to provide a fast data transfer between system memory and cards. there is one single 2048-byte buffer embedded in dmac for temporary data storage. due to dmac only has single channel, that means only one inte rface can be active at the same time. feature: ? interface with dmac for register read/write and data transfer ? 3 interfaces are provided: secure digital(2. 0)/mmc(4.2) and memory stick/memory stick pro ? using single 2048-byte shared buffer for data exchange between system memory and cards 7.10.1 fmi controller registers map r : read only, w : write only, r/w : both read and write register address r/w description reset value fmi global registers (fmi_ba = 0xb000_d000) fmicsr 0xb000_d000 r/w global control and status register 0x0000_0000 fmiier 0xb000_d004 r/w global interrupt control register 0x0000_0001 fmiisr 0xb000_d008 r/w global interrupt status register 0x0000_0000 secure digital registers sdcsr 0xb000_d020 r/w sd control and status register 0x0101_0000 sdarg 0xb000_d024 r/w sd command argument register 0x0000_0000 sdier 0xb000_d028 r/w sd interrupt control register 0x0000_0000 sdisr 0xb000_d02c r/w sd interrupt status register 0x000x_008c sdrsp0 0xb000_d030 r sd receiving response token register 0 0x0000_0000 sdrsp1 0xb000_d034 r sd receiving response token register 1 0x0000_0000 sdblen 0xb000_d038 r/w sd block length register 0x0000_01ff memory stick registers mscsr 0xb000_d060 r/w memory stick control and status register 0x0000_0008 msier 0xb000_d064 r/w memory stick interrupt control register 0x0000_0000 msisr 0xb000_d068 r/w memory stick interrupt status register 0x0000_0000 msbuf1 0xb000_d06c r/w memory stick register buffer 1 0x0000_0000 msbuf2 0xb000_d070 r/w memory stick register buffer 2 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 259 7.10.2 register details global control and status register (fmicsr) register address r/w description reset value fmicsr 0xb000_d000 r/w global control and status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved ms_en sd_en sw_rst bits descriptions [2] ms_en memory stick functionality enable 0 = disable ms functionality of fmi. 1 = enable ms functionality of fmi. [1] sd_en secure digital functionality enable 0 = disable sd functionality of fmi. 1 = enable sd functionality of fmi. [0] sw_rst software engine reset 0 = writing 0 to this bit has no effect. 1 = writing 1 to this bit will reset all fmi engines. the contents of control register will not be cleared. this bit will auto clear after few clock cycles. note: software can enable only one engine at one time, or fmi will work abnormal. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 260 global interrupt control register (fmiier) register address r/w description reset value fmiier 0xb000_d004 r/w global interru pt control register 0x0000_0001 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved dta_ie bits descriptions [0] dta_ie dmac read/write target abort interrupt enable 0 = disable dmac read/write target abort interrupt generation. 1 = enable dmac read/write target abort interrupt generation. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 261 global interrupt status register (fmiisr) register address r/w description reset value fmiisr 0xb000_d008 r/w global interru pt status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved dta_if bits descriptions [0] dta_if dmac read/write target abort interrupt flag (read only) this bit indicates dmac received an error response from internal ahb bus during dma read/write operation. when target abort is occurred, please reset all engine. 0 = no bus error response received. 1 = bus error response received. note: this bit is read only, but can be cleared by writing ?1? to it. note: no matter interrupt enable is turn on or not, the interrupt flag will be set when target condition is occurred. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 262 sd control and status register (sdcsr) register address r/w description reset value sdcsr 0xb000_d020 r/w sd control an d status register 0x0101_0000 31 30 29 28 27 26 25 24 clk_keep1 sdport reserved sdnwr 23 22 21 20 19 18 17 16 blk_cnt 15 14 13 12 11 10 9 8 dbw sw_rst cmd_code 7 6 5 4 3 2 1 0 clk_keep0 clk8_oe clk74_oe r2_en do_en di_en ri_en co_en bits descriptions [31] clk_keep1 sd clock enable for port 1 0 = disable sd cl ock generation. 1 = sd clock always keeps free running. [30:29] sdport sd port selection 00 = port 0 is selected. 10 = port 1 is selected. x1 = reserved [27:24] sdnwr n wr parameter for block write operation this value indicates the n wr parameter for data block write operation in clock counts. the actual clock cycle will be sdnwr+1. [23:16] blk_cnt block counts to be transferred or received this field contains the block counts fo r data-in and data-out transfer. for read_multiple_block and write_multiple_block command, software can use this function to a ccelerate data transfer and improve performance. note that only when sdblen=0x1ff, this field is valid. otherwise, blob counts will be set to 1 inside sd host engine. note: value 0x0 in this field means 256. [15] dbw sd data bus width 0 = data bus width is 1-bit. 1 = data bus width is 4-bit. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 263 [14] sw_rst software engine reset 0 = writing 0 to this bit has no effect. 1 = writing 1 to this bit will reset the internal state machine and counters. the contents of control register will not be cleared (but ri_en, di_en, do_en and r2_en will be cleared). this bit will be auto cleared after few clock cycles. [13:8] cmd_code sd command code this register contains the sd command code (0x00 ? 0x3f). [7] clk_keep0 sd clock enable for port 0 0 = disable sd cl ock generation. 1 = sd clock always keeps free running. [6] clk8_oe generating 8 clock cycles output enable 0 = no effect. 1 = enable, sd host will output 8 clock cycles. note: when this operation is finished, this bit will be cleared automatically. [5] clk74_oe initial 74 clock cycles output enable 0 = no effect. 1 = enable, sd host will output 74 clock cycles to sd card. note: when this operation is finished, this bit will be cleared automatically. [4] r2_en response r2 input enable 0 = no effect. (please use sdcs r[sw_rst] to clear this bit.) 1 = enable, sd host will wait to receive a response r2 from sd card and store the response data into dmac ?s flash buffer (exclude crc-7). note: when the r2 response operation is finished, this bit will be cleared automatically. [3] do_en data output enable 0 = no effect. (please use sdcs r[sw_rst] to clear this bit.) 1 = enable, sd host will transfer block data and the crc-16 value to sd card. note: when the data output operation is finished, this bit will be cleared automatically. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 264 [2] di_en data input enable 0 = no effect. (please use sdcs r[sw_rst] to clear this bit.) 1 = enable, sd host will wait to receive block data and the crc-16 value from sd card. note: when the data input operation is finished, this bit will be cleared automatically. [1] ri_en response input enable 0 = no effect. (please use sdcs r[sw_rst] to clear this bit.) 1 = enable, sd host will wait to receive a response from sd card. note: when the response input operation is finished, this bit will be cleared automatically. [0] co_en command output enable 0 = no effect. 1 = enable, sd host will output a command to sd card. note: when the command output operation is finished, this bit will be cleared automatically. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 265 sd command argument register (sdarg) register address r/w description reset value sdarg 0xb000_d024 r/w sd command argument register 0x0000_0000 31 30 29 28 27 26 25 24 sd_cmd_arg 23 22 21 20 19 18 17 16 sd_cmd_arg 15 14 13 12 11 10 9 8 sd_cmd_arg 7 6 5 4 3 2 1 0 sd_cmd_arg bits descriptions [31:0] sd_cmd_arg sd command argument this register contains a 32-bit va lue specifies the argument of sd command from host controller to sd card. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 266 sd interrupt control register (sdier) register address r/w description reset value sdier 0xb000_d028 r/w sd interrupt control register 0x0000_0000 31 30 29 28 27 26 25 24 cd1src cd0src reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved wkup_en dito_ie rito_ie sdio1_ie sdio0_ie cd1_ie cd0_ie 7 6 5 4 3 2 1 0 reserved crc_ie blkd_ie bits descriptions [31] cd1src sd1 card detect source selection ? 0 = from sd1 card?s dat3 pin. ? 1 = from gpio pin. [30] cd0src sd0 card detect source selection ? 0 = from sd0 card?s dat3 pin. ? 1 = from gpio pin. [14] wkup_en wake-up signal generating enable enable/disable wake-up signal genera ting of sd host when sdio card (current using) issues an interrupt (wake-up) via dat[1] to host. 0 = disable. 1 = enable. [13] dito_ie data input time-out interrupt enable enable/disable interrupt generation of sd controller when data input time- out. time-out value is specified at sdtmout . 0 = disable. 1 = enable. [12] rito_ie response time-out interrupt enable enable/disable interrupt generation of sd controller when receiving response or r2 time-out. time-out value is specified at sdtmout . 0 = disable. 1 = enable. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 267 [11] sdio1_ie sdio interrupt enable for port 1 enable/disable interrupt generation of sd host when sdio card 1 issues an interrupt via dat[1] to host. 0 = disable. 1 = enable. [10] sdio0_ie sdio interrupt enable for port 0 enable/disable interrupt generation of sd host when sdio card 0 issues an interrupt via dat[1] to host. 0 = disable. 1 = enable. [9] cd1_ie sd1 card detection interrupt enable enable/disable interrupt generation of sd controller when card 1 is inserted or removed. 0 = disable. 1 = enable. [8] cd0_ie sd0 card detection interrupt enable enable/disable interrupt generation of sd controller when card 0 is inserted or removed. 0 = disable. 1 = enable. [1] crc_ie crc-7, crc-16 and crc status error interrupt enable 0 = sd host will not generate interrupt when crc-7, crc-16 and crc status is error. 1 = sd host will generate interrupt when crc-7, crc-16 and crc status is error. [0] blkd_ie block transfer done interrupt enable 0 = sd host will not generate interrupt when data-in (out) transfer done. 1 = sd host will generate interrupt when data-in (out) transfer done. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 268 sd interrupt status register (sdisr) register address r/w description reset value sdisr 0xb000_d02c r/w sd interrupt status register 0x000x_008c 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved sd1dat1 sd0dat1 cdps1 cdps0 15 14 13 12 11 10 9 8 reserved dito_if rito_if sdio1_if sdio0_if cd1_if cd0_if 7 6 5 4 3 2 1 0 sddat0 crcstat crc-16 crc-7 crc_if blkd_if bits descriptions [19] sd1dat1 dat1 pin status of sd1 (read only) this bit is the dat1 pin status of sd1. [18] sd0dat1 dat1 pin status of sd0 (read only) this bit is the dat1 pin status of sd0. [17] cdps1 card detect pin status of sd1 (read only) this bit is the dat3 pin status of sd1, and it is using for card detection. when there is a card inserted in or removed from sd1, software should check this bit to confirm if there is really a card insertion or remove. [16] cdps0 card detect pin status of sd0 (read only) this bit is the dat3 pin status of sd0, and it is using for card detection. when there is a card inserted in or removed from sd0, software should check this bit to confirm if there is really a card insertion or remove. [13] dito_if data input time-out interrupt flag (read only) this bit indicates that sd host counts to time-out value when receiving data (waiting start bit). 0 = not time-out. 1 = data input time-out. note: this bit is read only, but can be cleared by writing ?1? to it. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 269 [12] rito_if response time-out interrupt flag (read only) this bit indicates that sd host count s to time-out value when receiving response or r2 (w aiting start bit). 0 = not time-out. 1 = response time-out. note: this bit is read only, but can be cleared by writing ?1? to it. [11] sdio1_if sdio 1 interrupt flag (read only) this bit indicates that sdio card 1 issues an interrupt to host. 0 = no interrupt is issued by sdio card 1. 1 = an interrupt is issued by sdio card 1. note: this bit is read only, but can be cleared by writing ?1? to it. [10] sdio0_if sdio 0 interrupt flag (read only) this bit indicates that sdio card 0 issues an interrupt to host. 0 = no interrupt is issued by sdio card 0. 1 = an interrupt is issued by sdio card 0. note: this bit is read only, but can be cleared by writing ?1? to it. [9] cd1_if sd1 card detection interrupt flag (read only) this bit indicates that sd card 1 is inserted or removed. only if sdier[cd1_ie] is set to 1, this bit is active. 0 = no card is inserted or removed. 1 = there is a card inserted in or removed from sd1. note: this bit is read only, but can be cleared by writing ?1? to it. [8] cd0_if sd0 card detection interrupt flag (read only) this bit indicates that sd card 0 is inserted or removed. only if sdier[cd0_ie] is set to 1, this bit is active. 0 = no card is inserted or removed. 1 = there is a card inserted in or removed from sd0. note: this bit is read only, but can be cleared by writing ?1? to it. [7] sddat0 dat0 pin status of current selected sd (read only) this bit is the dat0 pin status of current selected sd port. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 270 [6:4] crcstat crc status value of data-out transfer (read only) sd host will record crc status of data-out transfer. software could use this value to identify what type of e rror is during data-out transfer. 010 = positive crc status. 101 = negative crc status 111 = sd card programming error occurs. [3] crc-16 crc-16 check status of data-in transfer (read only) sd host will check crc-16 correctness after data-in transfer. 0 = fault. 1 = ok. [2] crc-7 crc-7 check status (read only) sd host will check crc-7 correctness during each response in. if that response does not contain crc-7 info rmation (r3), then software should turn off sdier[crc_ie] and ignore this bit. 0 = fault. 1 = ok. [1] crc_if crc-7, crc-16 and crc status error interrupt flag (read only) this bit indicates that sd host has occurred crc error during response in, data-in or data-out (crc status error) transfer. when crc error is occurred, software should reset sd engine. so me response (ex. r3) doesn?t have crc-7 information with it; sd host will still calculate crc-7, get crc error and set this flag. in this condition, software should ignore crc error and clears this bit manually. 0 = no crc error is occurred. 1 = crc error is occurred. note: this bit is read only, but can be cleared by writing ?1? to it. [0] blkd_if block transfer done interrupt flag (read only) this bit indicates that sd host has finished data-in or data-out block transfer. if there is a crc-16 error or incorrect crc status during multiple block data transfer, the transfer will be broken and this bit will be set. 0 = not finished yet. 1 = done. note: this bit is read only, but can be cleared by writing ?1? to it. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 271 sd receiving response token register 0 (sdrsp0) register address r/w description reset value sdrsp0 0xb000_d030 r sd receiving resp onse token register 0 0x0000_0000 31 30 29 28 27 26 25 24 sd_rsp_tk0 23 22 21 20 19 18 17 16 sd_rsp_tk0 15 14 13 12 11 10 9 8 sd_rsp_tk0 7 6 5 4 3 2 1 0 sd_rsp_tk0 bits descriptions [31:0] sd_rsp_tk0 sd receiving response token 0 sd host controller will receive a response token for getting a reply from sd card when sdcsr[ri_en] is set. this field contains response bit 47- 16 of the response token. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 272 sd receiving response token register 1 (sdrsp1) register address r/w description reset value sdrsp1 0xb000_d034 r sd receiving resp onse token register 1 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 sd_rsp_tk1 bits descriptions [7:0] sd_rsp_tk1 sd receiving response token 1 sd host controller will receive a response token for getting a reply from sd card when sdcsr[ri_en] is set. th is register contains the bit 15-8 of the response token. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 273 sd block length register (sdblen) register address r/w description reset value sdblen 0xb000_d038 r/w sd block length register 0x0000_01ff 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved sdblen 7 6 5 4 3 2 1 0 sdblen bits descriptions [8:0] sdblen sd block length in byte unit a 9-bit value specifies the sd transfer byte count. the actual byte count is equal to sdblen+1. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 274 sd response/data-in time-out register (sdtmout) register offset r/w description reset value sdtmout 0xb000_d03c r/w sd response/dat a-in time-out register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 sdtmout 15 14 13 12 11 10 9 8 sdtmout 7 6 5 4 3 2 1 0 sdtmout bits descriptions [23:0] sdtmout sd response/data-in time-out value a 24-bit value specifies the time-out co unts of response and data input. sd host controller will wait start bit of response or data-in until this value reached. the time period is depended on sd engine clock frequency. do not write a small number into this field, or you may never get response or data due to time-out. note: fill 0x0 into this field will disable hardware time-out function. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 275 memory stick control and status register (mscsr) register address r/w description reset value mscsr 0xb000_d060 r/w memory stick cont rol and status register 0x0000_0008 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved msport dsize dcnt 15 14 13 12 11 10 9 8 reserved tpc 7 6 5 4 3 2 1 0 reserved serial mspro ms_go sw_rst bits descriptions [21] msport memory stick port selection 0 = port 0 is selected. 1 = port 1 is selected. [20:19] dsize data size for transfer (for memory stick pro only) this field defines how many bytes shou ld be transferred of following tpc codes. data will be obtained from (stored in) dmac?s fifo. read_short_data and write_short_data. 00 = 32 bytes. 01 = 64 bytes. 10 = 128 bytes. 11 = 256 bytes. note: this field is invalid when other tpc codes are executed. [18:16] dcnt data count number (in byte unit) this field defines how many bytes shou ld be transferred of following tpc codes. data will be obtained from (stored in) msbuf1 and msbuf2. read_reg, get_int, write_reg, set_r/w_reg_adrs, set_cmd and ex_set_cmd. for example, when software wants to use set_r/w_reg_adrs, you should write 0x4 into this field; when you want to use set_cmd, you should write 0x1 into this field, etc. note: value 0x0 means 8 bytes should be transferred, and it is the largest length this core can provide. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 276 [11:8] tpc tpc code of the packet this field defines the tp c code of the packet which software wants to transfer. this core supports all tpc co de of memory stick and memory stick pro specification. the lower 4 bits of tpc (tpc check code) will be generated by hardware automatically. [3] serial serial or parallel mode 0 = ms host is working at parallel mode. 1 = ms host is working at serial mode (default). [2] mspro memory stick or memory stick pro 0 = type of the card is memory stick. 1 = type of the card is memory stick pro. [1] ms_go trigger memory stick core to transfer packet 0 = writing 0 to this bit has no effect. 1 = trigger memory stick core to tr ansfer packet. when tpc code is read_reg, get_int, write_reg, set_r/w_reg_adrs, set_cmd or ex_set_cmd, data will be obtained from (stored in) msbuf1 and msbuf2. when tpc code is read_long_data (read_page_data), read_short_data, write_long_data (write_page_data) or write_short_data, data will be obtained from (stored in) dmac?s fifo. [0] sw_rst software engine reset 0 = writing 0 to this bit has no effect. 1 = writing 1 to this bit will reset the internal state machine and counters. the contents of control register will not be cleared. this bit will be auto cleared after few clock cycles. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 277 memory stick interrupt control register (msier) register address r/w description reset value msier 0xb000_d064 r/w memory stick inte rrupt control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved cd1_ie cd0_ie 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved crc_ie bsyto_ie intto_ie msint_ie pkt_ie bits descriptions [17] cd1_ie ms card detection 1 interrupt enable enable/disable interrupt generation of ms controller when card 1 is inserted or removed. ? 0 = disable. ? 1 = enable. [16] cd0_ie ms card detection 0 interrupt enable enable/disable interrupt generation of ms controller when card 0 is inserted or removed. ? 0 = disable. ? 1 = enable. [4] crc_ie crc-16 error interrupt enable 0 = the core will not generate interrupt when crc-16 is error. 1 = the core will generate interrupt when crc-16 is error. [3] bsyto_ie busy to ready check timeout interrupt enable 0 = disable busy to ready check timeout interrupt. 1 = enable busy to ready check timeout interrupt. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 278 [2] intto_ie int response timeout interrupt enable 0 = disable int response timeout interrupt generation. 1 = enable int response timeout interrupt generation. [1] msint_ie memory stick card?s interrupt enable 0 = the core will not generate interrupt when ms card generates int. 1 = the core will generate interrupt when ms card generates int. note: software should set msier[intto_ie] to ?1? to enable int detection function of the core, and set this bit to ?1? if you want to get int from ms card. [0] pkt_ie packet transfer done interrupt enable 0 = the core will not generate interrupt when packet transfer is done. 1 = the core will generate interrupt when packet transfer is done. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 279 memory stick interrupt status register (msisr) register address r/w description reset value msisr 0xb000_d068 r/w memory stick inte rrupt status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved cd1_ cd0_ 23 22 21 20 19 18 17 16 reserved cd1_if cd0_if 15 14 13 12 11 10 9 8 reserved cmdnk breq err ced 7 6 5 4 3 2 1 0 reserved crc_if bsyto_if intto_if msint_if pkt_if bits descriptions [25] cd1_ pin status of ms card detection 1 (read only) this is the pin status of ms card detection 1. when there is a card insertion or removal, software should check this bit to confirm if it is really a card insertion or removal. note: software should perform de-b ounce for card detection function. [24] cd0_ pin status of ms card detection 0 (read only) this is the pin status of ms card detection 0. when there is a card insertion or removal, software should check this bit to confirm if it is really a card insertion or removal. note: software should perform de-b ounce for card detection function. [17] cd1_if ms card detection 1 interrupt flag (read only) this bit indicates that ms card 1 is inserted or removed. only if msier[cd1_ie] is set, this bit is active; otherwise, this bit is invalid. 0 = no card is inserted or removed. 1 = there is a card inserted in or removed from ms1. note: this bit is read only, but can be cleared by writing ?1? to it. [16] cd0_if ms card detection 0 interrupt flag (read only) this bit indicates that ms card 0 is inserted or removed. only if msier[cd0_ie] is set, this bit is active; otherwise, this bit is invalid. 0 = no card is inserted or removed. 1 = there is a card inserted in or removed from ms0. note: this bit is read only, but can be cleared by writing ?1? to it. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 280 [11:8] cmdnk breq err ced int status of memory stick pro (read only) these 4 bits indicates the int status of memory stick pro card (only for parallel mode). when msier[intto_ie] is set, the core will wait for int signal from card. if the card is working at parallel mode; after int is occurred (msisr[msint_if] is set), th e contents of int register can be informed by these bits. note: these bits are valid in parallel mode only. [4] crc_if crc-16 error interrupt flag (read only) when the packet transfer is done, the core will compare the value of crc-16 which it calculated and received. if crc-16 value is not the same, this flag will be set. the comparison executes only for read packet. 0 = crc-16 ok. 1 = crc-16 failed. note: this bit is read only, but can be cleared by writing ?1? to it. [3] bsyto_if busy to ready check timeout interrupt flag (read only) this bit indicates that the core canno t detect rdy signal on data[0] pin during handshake state. it means some errors are occurred during packet transfer. the maximum timeout durati on for rdy signal is 16 sclks. 0 = no rdy timeout occurred. 1 = rdy timeout occurred. note: this bit is read only, but can be cleared by writing ?1? to it. [2] intto_if int response timeout interrupt flag (read only) this bit indicates that the core cannot detect int signal of ms card after a period of time. in memory stick, th e maximum period is 100ms. in memory stick pro, the maximum period is 3500m s. if int timeout is occurred, it means the card maybe malfunction. 0 = int detection is not timeout. 1 = int detection is timeout, no int signal occurred. note: this bit is read only, but can be cleared by writing ?1? to it. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 281 [1] msint_if memory stick card?s interrupt flag (read only) memory stick will generate int signal after some tpc codes are executed, ex. set_cmd. this bit indicates that memory stick has ge nerated int signal after tpc code execution. this core will check int for software only when msier[intto_ie] is set to ?1?, or this bit is invalid. 0 = no int signal is detected. 1 = int signal is detected. note: this bit is read only, but can be cleared by writing ?1? to it. [0] pkt_if packet transfer done interrupt flag (read only) this bit indicates that the whole packet transfer is done. the four states of memory stick are bs1, bs2, bs3 and bs0. 0 = packet transfer is not done yet. 1 = packet transfer is done. note: this bit is read only, but can be cleared by writing ?1? to it. note: no matter interrupt enable is turn on or not, the interrupt flag will be set when target condition is occurred. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 282 memory stick register buffer 1 (msbuf1) memory stick register buffer 2 (msbuf2) register address r/w description reset value msbuf1 msbuf2 0xb000_d06c 0xb000_d070 r/w memory stick register buffer 1 memory stick register buffer 2 0x0000_0x0000 31 30 29 28 27 26 25 24 data[31:24] 23 22 21 20 19 18 17 16 data[23:16] 15 14 13 12 11 10 9 8 data[15:8] 7 6 5 4 3 2 1 0 data[7:0] bits descriptions [31:0] data data content of packet transfer this field contains the data of read/ write tpc codes. when software uses following tpc codes, data will be obtained from (stored in) this field. read_reg, get_int, write_reg, set_r/w_reg_adrs, set_cmd and ex_set_cmd. this core will always send (store) data from msb of msbuf2. for example, if software wants to write a packet with 1 byte data, you should put the data at msbuf2[31:24] and write 0x1 into mscsr[dcnt] then trigger the core. the order of transfer will be msbuf2[31], msbuf2[30] ?, msbuf2[24]. if you want to write a packet with 6 by tes data, you should put the data at msbuf2[31:0] and msbuf1[31:16] and write 0x6 into mscsr[dcnt] then trigger the core. the order of transfer will be msbuf2[31:24], ? msbuf2[7:0], msbuf1[31:24], msbuf1[23:16]. the same order will be applied to read packet. byte 5 byte 6 byte 7 byte 8 msbuf1 byte 1 byte 2 byte 3 byte 4 msbuf2 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 283 7.11 uart controller the universal asynchronous receiver/transmitter (uart) performs a serial-to-parallel conversion on data characters received from the peripheral, and a paralle l-to-serial conversion on data characters received from the cpu. there are five uart blocks and accessory logic in this chip. 7.11.1 uart feature description 7.11.1.1 uart0 uart0 is a general uart block. uart0 clock source external crystal uart type general uart fifo number 16-byte receiving fifo and 16 byte transmitting fifo modem function none accessory function none i/o pin txd0, rxd0 7.11.1.2 uart1 uart1 is a high speed uart. the fifo has 64-byte fo r receiving and 64-byte for transmitting. the clock source is programmable in chip clock generator. uart1 clock source external crystal or internal pll (programmable) uart type high speed uart fifo number 64-byte receiving fifo and 64 byte transmitting fifo modem function none accessory function none i/o pin txd1, rxd1 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 284 7.11.2 uart control registers map r : read only, w : write only, r/w : both read and write, c : only value 0 can be written register offset r/w description condition reset value uart0 : rbr 0xb800_0000 r receive buffer register dlab = 0 undefined thr 0xb800_0000 w transmit holding register dlab = 0 undefined ier 0xb800_0004 r/w interrupt enable register dlab = 0 0x0000_0000 dll 0xb800_0000 r/w divisor latch re gister (ls) dlab = 1 0x0000_0000 dlm 0xb800_0004 r/w divisor latch re gister (ms) dlab = 1 0x0000_0000 iir 0xb800_0008 r interrupt identifi cation register 0x8181_8181 fcr 0xb800_0008 w fifo control register undefined lcr 0xb800_000c r/w line control register 0x0000_0000 lsr 0xb800_0014 r line status register 0x6060_6060 tor 0xb800_001c r/w time out register 0x0000_0000 uart1 : rbr 0xb800_0100 r receive buffer register dlab = 0 undefined thr 0xb800_0100 w transmit holding register dlab = 0 undefined ier 0xb800_0104 r/w interrupt enable register dlab = 0 0x0000_0000 dll 0xb800_0100 r/w divisor latch re gister (ls) dlab = 1 0x0000_0000 dlm 0xb800_0104 r/w divisor latch re gister (ms) dlab = 1 0x0000_0000 iir 0xb800_0108 r interrupt identifi cation register 0x8181_8181 fcr 0xb800_0108 w fifo control register undefined lcr 0xb800_010c r/w line control register 0x0000_0000 lsr 0xb800_0114 r line status register 0x6060_6060 tor 0xb800_011c r/w time out register 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 285 receive buffer register (rbr) register offset r/w description reset value rbr 0xb800_0x00 r receive buffer regi ster (dlab = 0) undefined 7 6 5 4 3 2 1 0 8-bit received data bits descriptions [7:0] 8-bit received data by reading this register, the uart will return an 8-bit data received from sin pin (lsb first). transmit holding register (thr) register offset r/w description reset value thr 0xb800_0x00 w transmit holding re gister (dlab = 0) undefined 7 6 5 4 3 2 1 0 8-bit transmitted data bits descriptions [7:0] 8-bit transmitted data by writing to this register, the uart will send out an 8-bit data through the sout pin (lsb first). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 286 interrupt enable register (ier) register offset r/w description reset value ier 0xb800_0x04 r/w interrupt enable register (dlab = 0) 0x0000.0000 7 6 5 4 3 2 1 0 reserved reserved rlsie threie rdaie bits descriptions ? [2] rlsie receive line status interrupt (irpt_rls) enable ? 0 = mask off irpt_rls ? 1 = enable irpt_rls [1] threie transmit holding register empty interrupt (irpt_thre) enable ? 0 = mask off irpt_thre ? 1 = enable irpt_thre [0] rdaie r eceive d ata a vailable i nterrupt (irpt_rda) e nable and time-out interrupt (irpt_tout) enable ? 0 = mask off irpt_rda and irpt_tout ? 1 = enable irpt_rda and irpt_tout NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 287 divider latch (low byte) register (dll) register offset r/w description reset value dll 0xb800_0x00 r/w divisor latch regi ster (ls) (dlab = 1) 0x0000_0000 7 6 5 4 3 2 1 0 baud rate divider (low byte) bits descriptions [7:0 ] baud rate divisor (low byte) the low byte of the baud rate divider divisor latch (high byte) register (dlm) register offset r/w description reset value dlm 0xb800_0x04 r/w divisor latch regi ster (ms) (dlab = 1) 0x0000_0000 7 6 5 4 3 2 1 0 baud rate divider (high byte) bits descriptions [7:0 ] baud rate divisor (high byte) the high byte of th e baud rate divider this 16-bit divider {dlm, dll} is used to determine the baud rate as follows baud rate = crystal clock / {16 * [divisor + 2]} note: this definition is different from 16550 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 288 interrupt identification register (iir) register offset r/w description reset value iir 0xb800_0x08 r interrupt identi fication register 0x8181_8181 7 6 5 4 3 2 1 0 fmes rftls dms iid nip bits descriptions [7] fmes fifo mode enable status this bit indicates whether the fifo mode is enabled or not. since the fifo mode is always enabled, this bit always shows the logical 1 when cpu is reading this register. [6:5 ] rftls rx fifo threshold level status these bits show the current setting of re ceiver fifo threshold level (rtho). the meaning of rtho is defined in the following fcr description. [4] dms dma mode select the dma function is not implemented in this version. when reading iir, the dms is always returned 0. [3:1 ] iid interrupt identification the iid together with nip indicates th e current interrupt request from uart. [0] nip no interrupt pending there is no pending interrupt. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 289 interrupt control functions iir [3:0] priority interrupt type interrupt source interrupt reset control - - - 1 -- none none -- 0110 highest receiver line status (irpt_rls) overrun error, parity error, framing error, or break interrupt reading the lsr 0100 second received data available (irpt_rda) receiver fifo threshold level is reached receiver fifo drops below the threshold level 1100 second receiver fifo time- out (irpt_tout) receiver fifo is non- empty and no activities are occurred in the receiver fifo during the tor defined time duration reading the rbr 0010 third transmitter holing register empty (irpt_thre) transmitter holding register empty reading the iir (if source of interrupt is irpt_thre) or writing into the thr 0000 fourth reserved reseved reserved note: these definitions of bi t 7, bit 6, bit 5, and bit 4 are different from the 16550. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 290 fifo control register (fcr) register offset r/w description reset value fcr 0xb800_0x08 w fifo contro l register undefined 7 6 5 4 3 2 1 0 rfitl dms tfr rfr fme bits descriptions [7:4] rfitl rx fifo interrupt (irpt_rda) trigger level uart0 rfitl [7:4] trigger level 00xx 01 bytes 01xx 04 bytes 10xx 08 bytes 11xx 14 bytes uart1 rfitl[7:4] trigger level 0000 01 bytes 0001 04 bytes 0010 08 bytes 0011 14 bytes 0100 30 bytes 0101 46 bytes others 62 bytes [3] dms dma mode select the dma function is not implemented in this version. [2] tfr tx fifo reset setting this bit will generate an osc cycle reset pulse to reset tx fifo. the tx fifo becomes empty (tx pointer is reset to 0) afte r such reset. this bit is returned to 0 automatically after the reset pulse is generated. [1] rfr rx fifo reset setting this bit will generate an osc cycle reset pulse to reset rx fifo. the rx fifo becomes empty (rx pointer is reset to 0) afte r such reset. this bit is returned to 0 automatically after the reset pulse is generated. [0] fme fifo mode enable because uart is always operating in the fifo mode, writing this bit has no effect while reading always gets logical one. this bit must be 1 when other fcr bits are written to; otherwise, they will not be programmed. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 291 line control register (lcr) register offset r/w description reset value lcr 0xb800_0x0c r/w line control register 0x0000_0000 7 6 5 4 3 2 1 0 dlab bcb spe epe pbe nsb wls bits descriptions [7] dlab divider latch access bit 0 = it is used to access rbr, thr or ier. 1 = it is used to access divi sor latch registers {dll, dlm}. [6] bcb break control bit when this bit is set to logic 1, the serial data output (sout) is forced to the spacing state (logic 0). this bit acts only on sout and has no effect on the transmitter logic. [5] spe stick parity enable 0 = disable stick parity 1 = parity bit is transmitted and checked as a logic 1 if bit 4 is 0 (odd parity), or as a logic 0 if bit 4 is 1 (even parity). this bit has effect only when bit 3 (parity bit enable) is set. [4] epe even parity enable 0 = odd number of logic 1?s are transmi tted or checked in the data word and parity bits. 1 = even number of logic 1?s are transmi tted or checked in the data word and parity bits. this bit has effect only when bit 3 (parity bit enable) is set. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 292 [3] pbe parity bit enable 0 = parity bit is not generated (transmit data) or checked (receive data) during transfer. 1 = parity bit is generated or checked between the "last data word bit" and "stop bit" of the serial data. [2] nsb number of ?stop bit? 0= one ? stop bit? is generated in the transmitted data 1= one and a half ? stop bit? is generate d in the transmitted data when 5-bit word length is selected; two ? stop bit? is generated when 6-, 7- and 8-bit word length is selected. [1:0] wls word length select wls[1:0] character length 00 5 bits 01 6 bits 10 7 bits 11 8 bits NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 293 line status control register (lsr) register offset r/w description reset value lsr 0xb800_0x14 r line status register 0x6060_6060 7 6 5 4 3 2 1 0 err_rx te thre bii fei pei oei rfdr bits descriptions [7] err_rx rx fifo error 0 = rx fifo works normally 1 = there is at least one parity error (pe) , framing error (fe), or break indication (bi) in the fifo. err_rx is cleared when cpu reads the lsr and if there are no subsequent errors in the rx fifo. [6] te transmitter empty 0 = either transmitter holding register ( thr - tx fifo) or transmitter shift register ( tsr ) are not empty. 1 = both thr and tsr are empty. [5] thre transmitter holding register empty 0 = thr is not empty. 1 = thr is empty. thre is set when the last data word of tx fifo is transferred to transmitter shift register (tsr). the cpu resets this bit wh en the thr (or tx fifo) is loaded. this bit also causes the uart to issue an in terrupt (irpt_thre) to the cpu when ier [1]=1. [4] bii break interrupt indicator this bit is set to a logic 1 whenever the received data input is held in the "spacing state" (logic 0) for longer than a full word transmission time (that is, the total time of "start bit" + data bits + parity + stop bits) and is reset whenever the cpu reads the contents of the lsr . NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 294 [3] fei framing error indicator this bit is set to logic 1 whenever the rece ived character does not have a valid "stop bit" (that is, the stop bit following the last data bit or parity bit is detected as a logic 0), and is reset whenever the cpu reads the contents of the lsr . [2] pei parity error indicator this bit is set to logic 1 whenever the received character does not have a valid "parity bit", and is reset whenever th e cpu reads the contents of the lsr . [1] oei overrun error indicator an overrun error will occur only after the rx fifo is full and the next character has been completely received in the shift register. the character in the shift register is overwritten, but it is not transferred to th e rx fifo. oe is indicated to the cpu as soon as it happens and is reset whenever the cpu reads the contents of the lsr. [0] rfdr rx fifo data ready 0 = rx fifo is empty 1 = rx fifo contains at le ast 1 received data word. lsr [4:2] (bii, fei, pei) are revealed to the cpu when its associated character is at the top of the rx fifo. these three error indicators are reset when ever the cpu reads the contents of the lsr. lsr [4:1] (bii, fei, pei, oei) ar e the error conditions that produc e a "receiver line status interrupt" (irpt_rls) when ier [2]=1. reading lsr clears irpt_rls. writing lsr is a null operation (not suggested). NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 295 time-out register (tor) register offset r/w description reset value tor 0xb800_0x1c r/w time out register 0x0000_0000 7 6 5 4 3 2 1 0 toie toic bits descriptions [7] toie time out interrupt enable the feature of receiver time out interrupt is enabled only when tor [7] = ier[0] = 1. [6:0] toic time out interrupt comparator the time out counter resets and starts counting (the counting clock = baud rate) whenever the rx fifo receives a new da ta word. once the content of time out counter (tout_cnt) is equal to that of time out interrupt comparator (toic), a receiver time out interrupt (irpt_tout) is generated if tor [7] = ier [0] = 1. a new incoming data word or rx fifo empty clears irpt_tout. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 296 7.12 timer controller 7.12.1 general timer controller the timer module includes five channels, timer0~timer4, they can easily be implemented as counting scheme. the timer can perform functions like freq uency measurement, event counting, interval measurement, pulse generation, dela y timing, and so on. the timer posse sses features such as adjustable resolution, programmable counting peri od, and detailed information. the timer can generate an interrupt signal upon timeout, or provide the cu rrent value of count during operation. the general timer controller includes the following features ? five channels with a 24-bit down co unter and an interrupt request each ? independent clock source for each channel ? maximum uninterrupted time = (1 / 15 mhz) * (255) * (2^24 - 1), if tclk = 15 mhz NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 297 7.12.2 timer control registers map r : read only, w : write only, r/w : both read and write, c : only value 0 can be written register address r/w/c description reset value tmr_ba = 0xb800_1000 tcsr0 0xb800_1000 r/w timer control and status register 0 0x0000_0005 tcsr1 0xb800_1004 r/w timer control and status register 1 0x0000_0005 ticr0 0xb800_1008 r/w timer initial control register 0 0x0000_0000 ticr1 0xb800_100c r/w timer initial control register 1 0x0000_0000 tdr0 0xb800_1010 r timer data register 0 0x0000_0000 tdr1 0xb800_1014 r timer data register 1 0x0000_0000 tisr 0xb800_1018 r/c timer interrupt status register 0x0000_0000 wtcr 0xb800_101c r/w watchdog timer control register 0x0000_0400 tcsr2 0xb800_1020 r/w timer control and status register 2 0x0000_0005 tcsr3 0xb800_1024 r/w timer control and status register 3 0x0000_0005 ticr2 0xb800_1028 r/w timer initial control register 2 0x0000_0000 ticr3 0xb800_102c r/w timer initial control register 3 0x0000_0000 tdr2 0xb800_1030 r timer data register 2 0x0000_0000 tdr3 0xb800_1034 r timer data register 3 0x0000_0000 tcsr4 0xb800_1040 r/w timer control and status register 4 0x0000_0005 ticr4 0xb800_1048 r/w timer initial control register 4 0x0000_0000 tdr4 0xb800_1050 r timer data register 4 0x0000_0000 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 298 timer control and status register 0~4 (tcr0~tcr4) register address r/w/c description reset value tcsr0 0xb800_1000 r/w timer control and status register 0 0x0000_0005 tcsr1 0xb800_1004 r/w timer control and status register 1 0x0000_0005 tcsr2 0xb800_1020 r/w timer control and status register 2 0x0000_0005 tcsr3 0xb800_1024 r/w timer control and status register 3 0x0000_0005 tcsr4 0xb800_1040 r/w timer control and status register 4 0x0000_0005 31 30 29 28 27 26 25 24 reserved ce ie mode crst cact reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 prescale bits descriptions [30] ce counter enable 0 = stops counting 1 = starts counting [29] ie interrupt enable 0 = disables timer interrupt 1 = enables timer interrupt. if timer inte rrupt is enabled, th e timer asserts its interrupt signal when the associat ed counter decrements to zero. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 299 [28:27] mode timer operating mode mode [28:27] timer operating mode 00 the timer is operating in the one-shot mode. the associated interrupt signal is generated once (if ie is enabled) and ce is automatically cleared then. 01 the timer is operating in the periodic mode. the associated interrupt signal is generated periodically (if ie is enabled). 10 the timer is operating in the toggle mode. the associated interrupt signal is changing back and forth (if ie is enabled) with 50% duty cycle. 11 reserved for further use [26] crst counter reset set this bit will reset the timer counter, and also force cen to 0 . 0 = no effect. 1 = reset timer?s pre-scale counter , internal 24-bit counter and cen. [25] cact timer is in active this bit indicates the co unter status of timer. 0 = timer is not active. 1 = timer is in active. [7:0] prescale clock pre-scale divide count clock input is divided by prescale + 1 before it is fed to the counter (here prescale is considered as a decimal number). if prescale = 0, then there is no scaling. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 300 timer initial count register 0~4 (ticr0~ticr4) register address r/w/c description reset value ticr0 0xb800_1008 r/w timer initial control register 0 0x0000_00ff ticr1 0xb800_100c r/w timer initial control register 1 0x0000_00ff ticr2 0xb800_1028 r/w timer initial control register 2 0x0000_00ff ticr3 0xb800_102c r/w timer initial control register 3 0x0000_00ff ticr4 0xb800_1048 r/w timer initial control register 4 0x0000_00ff 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 tic [23:16] 15 14 13 12 11 10 9 8 tic [15:8] 7 6 5 4 3 2 1 0 tic [7:0] bits descriptions [23:0] tic timer initial count this is a 24-bit value representing the initial count. timer will reload this value whenever the counter is decremented to zero. note: (1) never write 0x0 in tic, or the core will run into unknown state. (2) no matter cen is 0 or 1, whenever software write a new value into this register, timer will restart counting using this new value and abort previous count. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 301 timer data register 0~4 (tdr0~tdr4) register address r/w/c description reset value tdr0 0xb800_1010 r timer data register 0 0x0000_00ff tdr1 0xb800_1014 r timer data register 1 0x0000_00ff tdr2 0xb800_1030 r timer data register 2 0x0000_00ff tdr3 0xb800_1034 r timer data register 3 0x0000_00ff tdr4 0xb800_1050 r timer data register 4 0x0000_00ff 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 tdr [23:16] 15 14 13 12 11 10 9 8 tdr [15:8] 7 6 5 4 3 2 1 0 tdr [7:0] bits descriptions [23:0] tdr timer data register the current count is registered in this 24-bit value. note: software can read a correct current value on this register only when cen = 0 , or the value represents here could not be a correct one. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 302 timer interrupt status register (tisr) register address r/w/c description reset value tisr 0xb800_1018 r/c timer interrupt status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved tif4 tif3 tif2 tif1 tif0 bits descriptions [4] tif4 timer interrupt flag 4 0 = it indicates that the timer 4 does no t count down to zero yet. software can reset this bit after the ti mer interrupt 4 had occurred. 1 = it indicates that the counter of timer 4 is decremented to zero; note : this bit is read only, but can be cleared by writing 1 to this bit. [3] tif3 timer interrupt flag 3 0 = it indicates that the timer 3 does no t count down to zero yet. software can reset this bit after the ti mer interrupt 3 had occurred. 1 = it indicates that the counter of timer 3 is decremented to zero; note : this bit is read only, but can be cleared by writing 1 to this bit. [2] tif2 timer interrupt flag 2 0 = it indicates that the timer 2 does no t count down to zero yet. software can reset this bit after the ti mer interrupt 2 had occurred. 1 = it indicates that the counter of timer 2 is decremented to zero; note : this bit is read only, but can be cleared by writing 1 to this bit. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 303 [1] tif1 timer interrupt flag 1 0 = it indicates that the timer 1 does no t count down to zero yet. software can reset this bit after the ti mer interrupt 1 had occurred. 1 = it indicates that the counter of timer 1 is decremented to zero; note : this bit is read only, but can be cleared by writing 1 to this bit. [0] tif0 timer interrupt flag 0 0 = it indicates that the timer 0 does no t count down to zero yet. software can reset this bit after the ti mer interrupt 0 had occurred. 1 = it indicates that the counter of timer 0 is decremented to zero; note : this bit is read only, but can be cleared by writing 1 to this bit. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 304 7.13 advanced interrupt controller an interrupt temporarily changes the sequence of program execution to react to a particular event such as power failure, watchdog timer timeout, transmit/receive request from ethernet mac controller, and so on. the cpu processor provides two modes of interrupt, the fast interrupt (fiq) mode for critical session and the interrupt (irq) mode for general purpose. the irq reques t is occurred when the nirq input is asserted. similarly, the fiq request is occurred when the nfiq input is asserted. the fiq has privilege over the irq and can preempt an ongo ing irq. it is possible to ignore the fiq and the irq by setting the f and i bits in the current program status register (cpsr) . the advanced interrupt controller (aic) is capable of processing th e interrupt requests up to 32 different sources. currently, 30 interru pt sources are defined. each inte rrupt source is uniquely assigned to an interrupt channel . for example, the watchdog timer interrupt is assigned to channel 1. the aic implements a proprietary eight-level priority scheme that categories the available 30 interrupt sources into eight priority levels. interrupt sources within the priority level 0 is the highest priority and the priority level 7 is the lowest. in order to make this scheme work properly, a certain priority level must be specified to each interrupt source during power-on initialization; otherwise, the system shall behave unexpectedly. within each priority level, interrupt source that is positioned in a lower channel has a higher priority. interrupt source that is active, enabled, and positioned in the lowest channel with priority level 0 is promoted to the fiq. interrupt sources within the prio rity levels other than 0 are routed to the irq. the irq can be preempted by the occurrence of the fiq. interrupt nesting is perfor med automatically by the aic. though interrupt sources originated from the chip itself are intrinsically high-level sensitive, the aic can be configured as either low-level sensitive, high-level sensitive, negative-edge tr iggered, or positive-edge triggered to each interrupt source. the advanced interrupt controller includes the following features: ? external interrupts can be programmed as either edge-triggered or level-sensitive ? external interrupts can be programmed as either low-active or high-active ? flags to reflect the status of each interrupt source ? individual mask for ea ch interrupt source ? proprietary 8-level interrupt scheme to employ the priority scheme. ? priority methodology is adopted to allow for interrupt daisy-chaining ? automatically masking out the lower priority interrupt during interrupt nesting ? automatically clearing the interrupt flag when the ex ternal interrupt source is programmed to be edge- triggered NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 305 7.13.1 interrupt sources priority name mode source 1 (highest) wdt_int positive level watch dog timer interrupt 2 nirq_group0 positive level external interrupt group 0 3 nirq_group1 positive level external interrupt group 1 4 reserved reserved reserved 5 reserved reserved reserved 6 rtc_int positive level rtc interrupt 7 uart_int0 positive level uart interrupt0 8 uart_int1 positive level uart interrupt1 9 reserved reserved reserved 10 reserved reserved reserved 11 reserved reserved reserved 12 t_int0 positive level timer interrupt 0 13 t_int1 positive level timer interrupt 1 14 t_int_group positive level timer interrupt group 15 usbh_int_group positive level usb host interrupt group 16 emctx_int positive level emc tx interrupt 17 emcrx_int positive level emc rx interrupt 18 reserved reserved reserved 19 dmac_int positive level dmac interrupt 20 fmi_int positive level fmi interrupt 21 usbd_int positive level usb device interrupt 22 reserved reserved reserved 23 reserved reserved reserved 24 reserved reserved reserved 25 sc_int_group positive level smart card interrupt group 26 i2c_int_group positive level i2c interrupt group 27 usi_int positive level usi interrupt 28 reserved reserved reserved 29 reserved reserved reserved 30 reserved reserved reserved 31 reserved reserved reserved NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 306 interrupt group interrupt sources external interrupt group 0 external pins : nirq[0] timer interrupt group timer2, timer3, and timer4 usb host interrupt group ohci and ehci usb host controller i2c interrupt group i2c line 0 and i2c line 1 7.13.2 aic registers map register address r/w description reset value aic_ba = 0xb800_2000 aic_scr1 0xb800_2004 r/w source control register 1 0x0000_0047 aic_scr2 0xb800_2008 r/w source control register 2 0x0000_0047 aic_scr3 0xb800_200c r/w source control register 3 0x0000_0047 aic_scr4 0xb800_2010 r/w source control register 4 0x0000_0047 aic_scr5 0xb800_2014 r/w source control register 5 0x0000_0047 aic_scr6 0xb800_2018 r/w source control register 6 0x0000_0047 aic_scr7 0xb800_201c r/w source control register 7 0x0000_0047 aic_scr8 0xb800_2020 r/w source control register 8 0x0000_0047 aic_scr9 0xb800_2024 r/w source control register 9 0x0000_0047 aic_scr10 0xb800_2028 r/w source control register 10 0x0000_0047 aic_scr11 0xb800_202c r/w source control register 11 0x0000_0047 aic_scr12 0xb800_2030 r/w source control register 12 0x0000_0047 aic_scr13 0xb800_2034 r/w source control register 13 0x0000_0047 aic_scr14 0xb800_2038 r/w source control register 14 0x0000_0047 aic_scr15 0xb800_203c r/w source control register 15 0x0000_0047 aic_scr16 0xb800_2040 r/w source control register 16 0x0000_0047 aic_scr17 0xb800_2044 r/w source control register 17 0x0000_0047 aic_scr18 0xb800_2048 r/w source control register 18 0x0000_0047 aic_scr19 0xb800_204c r/w source control register 19 0x0000_0047 aic_scr20 0xb800_2050 r/w source control register 20 0x0000_0047 aic_scr21 0xb800_2054 r/w source control register 21 0x0000_0047 aic_scr22 0xb800_2058 r/w source control register 22 0x0000_0047 aic_scr23 0xb800_205c r/w source control register 23 0x0000_0047 aic_scr24 0xb800_2060 r/w reserved 0x0000_0047 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 307 aic_scr25 0xb800_2064 r/w source control register 25 0x0000_0047 aic_scr26 0xb800_2068 r/w source control register 26 0x0000_0047 aic_scr27 0xb800_206c r/w source control register 27 0x0000_0047 aic_scr28 0xb800_2070 r/w source control register 28 0x0000_0047 aic_scr29 0xb800_2074 r/w source control register 29 0x0000_0047 aic_scr30 0xb800_2078 r/w source control register 30 0x0000_0047 aic_scr31 0xb800_207c r/w source control register 31 0x0000_0047 aic_irqsc 0xb800_2080 r/w external interrupt control register 0x0000_0000 aic_gen 0xb800_2084 r/w interrupt group enable control register 0x0000_0000 aic_gasr 0xb800_2088 r interrupt group active status register 0x0000_0000 aic_gscr 0xb800_208c w/r interrupt group status clear register 0x0000_0000 aic_irsr 0xb800_2100 r interrupt raw status register 0x0000_0000 aic_iasr 0xb800_2104 r interrupt active status register 0x0000_0000 aic_isr 0xb800_2108 r interrupt status register 0x0000_0000 aic_iper 0xb800_210c r interrupt priority encoding register 0x0000_0000 aic_isnr 0xb800_2110 r interrupt source number register 0x0000_0000 aic_imr 0xb800_2114 r interrupt mask register 0x0000_0000 aic_oisr 0xb800_2118 r output interrupt status register 0x0000_0000 aic_mecr 0xb800_2120 w mask enable command register undefined aic_mdcr 0xb800_2124 w mask disable command register undefined aic_eoscr 0xb800_2130 w end of service command register undefined NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 308 aic source control registers (aic_scr1 ~ aic_scr31) register address r/w description reset value aic_scr1 0xb800_2004 r/w source control register 1 0x0000_0047 aic_scr2 0xb800_2008 r/w source control register 2 0x0000_0047 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? aic_scr28 0xb800_2070 r/w source control register 28 0x0000_0047 aic_scr29 0xb800_2074 r/w source control register 29 0x0000_0047 aic_scr30 0xb800_2078 r/w source control register 30 0x0000_0047 aic_scr31 0xb800_207c r/w source control register 31 0x0000_0047 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 srctype reserved priority bits descriptions [7:6] srctype interrupt source type whether an interrupt source is considered active or not by the aic is subject to the settings of this field. interrupt sources should be configured as level sensitive during normal operation unless in the testing situation. srctype [7:6] interrupt source type 0 0 low-level sensitive 0 1 high-level sensitive 1 0 negative-edge triggered 1 1 positive-e dge triggered [2:0] priority priority level every interrupt source must be assigned a priority level during initiation. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 309 among them, priority level 0 has the highest priority and priority level 7 the lowest. interrupt sources wi th priority level 0 are promoted to fiq. interrupt sources with priority level other than 0 belong to irq. for interrupt sources of the same priority level, which located in the lower channel number has higher priority. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 310 external interrupt control register (aic_irqsc) register address r/w description reset value aic_irqsc 0xb800_2080 r/w external interrupt control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 nirq7 nirq6 nirq5 nirq4 7 6 5 4 3 2 1 0 nirq3 nirq2 nirq1 nirq0 bits descriptions [15:0] nirq x external interrupt source type nirqx interrupt source type 0 0 low-level sensitive 0 1 high-level sensitive 1 0 negative-edge triggered 1 1 positive-e dge triggered NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 311 interrupt group enable control register (aic_gen) register address r/w description reset value aic_gen 0xb800_2084 r/w interrupt group enable control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved i2c reserved 23 22 21 20 19 18 17 16 reserved reserved timer 15 14 13 12 11 10 9 8 reserved usbh 7 6 5 4 3 2 1 0 reserved nirq[3:0] bits descriptions [27:26] i2c i2c controller interrupt group bit[27] is for i2c line 1, bit[26] is for line 0 1: interrupt enable for each bit 0: interrupt disable for each bit [18:16] timer timer controller interrupt group bit[18] is for timer4, bit[17] is for timer3, and bit[16] is for time2 1: interrupt enable for each bit 0: interrupt disable for each bit [9:8] usbh usb host controller interrupt group bit[9] is for ohci host controller, bit[9] is for ehci host controller 1: interrupt enable for each bit 0: interrupt disable for each bit [0] nirq[0] external interrupt group 0 1: interrupt enable for each bit 0: interrupt disable for each bit NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 312 interrupt group active status register (aic_gasr) register address r/w description reset value aic_gasr 0xb800_2088 r interrupt group active status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved i2c reserved 23 22 21 20 19 18 17 16 reserved timer 15 14 13 12 11 10 9 8 reserved usbh 7 6 5 4 3 2 1 0 reserved nirq[0] bits descriptions [27:26] i2c i2c controller interrupt group bit[27] is for i2c line 1, bit[26] is for line 0 [18:16] timer timer controller interrupt group bit[18] is for timer4, bit[17] is for timer3, and bit[16] is for time2 [9:8] usbh usb host controller interrupt group bit[9] is for ohci host controller, bit[9] is for ehci host controller [0] nirq[0] external interrupt group 0 NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 313 interrupt group status clear register (aic_gscr) register address r/w description reset value aic_gscr 0xb800_208c r/w interrupt group status clear register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved nirq[0] bits descriptions [0] nirq[0] external interrupt group 0 write 1: clear the relative status bit, and this bit is auto clear to 0 write 0: no action NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 314 aic interrupt raw status register (aic_irsr) register address r/w description reset value aic_irsr 0xb800_2100 r interrupt raw status register 0x0000_0000 31 30 29 28 27 26 25 24 irs31 irs30 irs29 irs28 irs27 irs26 irs25 irs24 23 22 21 20 19 18 17 16 irs23 irs22 irs21 irs20 irs19 irs18 irs17 irs16 15 14 13 12 11 10 9 8 irs15 irs14 irs13 irs12 irs11 irs10 irs9 irs8 7 6 5 4 3 2 1 0 irs7 irs6 irs5 irs4 irs3 irs2 irs1 reserved bits descriptions [31:1] irs x interrupt status indicate the intrinsic status of the corresponding interrupt source 0 = interrupt channel is in the voltage level 0 1 = interrupt channel is in the voltage level 1 this register records the intrinsic st ate within each interrupt channel. : NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 315 aic interrupt active status register (aic_iasr) this register indicates the status of each interrupt channel in consideration of the interrupt source type as defined in the corresponding source control register, but regardless of its mask setting. register address r/w description reset value aic_iasr 0xb800_2104 r interrupt active status register 0x0000_0000 31 30 29 28 27 26 25 24 ias31 ias30 ias29 ias28 ias27 ias26 ias25 ias24 23 22 21 20 19 18 17 16 ias23 ias22 ias21 ias20 ias19 ias18 ias17 ias16 15 14 13 12 11 10 9 8 ias15 ias14 ias13 ias12 ias11 ias10 ias9 ias8 7 6 5 4 3 2 1 0 ias7 ias6 ias5 ias4 ias3 ias2 ias1 reserved bits descriptions [31:1] ias x interrupt active status indicate the status of the co rresponding interrupt source 0 = corresponding interrupt channel is inactive 1 = corresponding interrupt channel is active : NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 316 aic interrupt status register (aic_isr) this register identifies thos e interrupt channels whose ar e both active and enabled. register address r/w description reset value aic_isr 0xb800_2108 r interrupt status register 0x0000_0000 31 30 29 28 27 26 25 24 is31 is30 is29 is28 is27 is26 is25 is24 23 22 21 20 19 18 17 16 is23 is22 is21 is20 is19 is18 is17 is16 15 14 13 12 11 10 9 8 is15 is14 is13 is12 is11 is10 is9 is8 7 6 5 4 3 2 1 0 is7 is6 is5 is4 is3 is2 is1 reserved bits descriptions [31:1] is x interrupt status indicates the status of corre sponding interrupt channel 0 = two possibilities: (1) the corresponding interrupt channel is inactive no matter whether it is enabled or disabled; (2) it is active but not enabled 1 = corresponding interrupt channel is both active and enabled (can assert an interrupt) NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 317 aic irq priority encoding register (aic_iper) when the aic generates the interrupt, vector represents the interrupt channel number that is active, enabled, and has the highest priority. if the representing interrupt channe l possesses a priority level 0, then the interrupt asserted is fiq; otherwise, it is irq. the value of vector is copied to the register aic_isnr thereafter by the aic. this register was restored a va lue 0 after it was read by the interrupt handler. this register can help indexing into a br anch table to quickly jump to the co rresponding interrupt service routine. register address r/w description reset value aic_iper 0xb800_210c r interrupt priority encoding register 0x0000_0000 31 30 29 28 27 26 25 24 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 reserved vector 0 0 bits descriptions [6:2] vector interrupt vector 0 = no interrupt occurs 1 ~ 31 = representing the interrupt channel that is active, enabled, and having the highest priority NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 318 aic interrupt source number register (aic_isnr) the purpose of this register is to record the interrupt channel number th at is active, enabled, and has the highest priority. register address r/w description reset value aic_isnr 0xb800_2110 r interrupt source number register 0x0000_0000 31 30 29 28 27 26 25 24 0 0 0 0 0 0 0 0 23 22 21 20 19 18 17 16 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0 0 0 0 irqid bits descriptions [4:0] irqid irq identification stands for the interrupt channel number NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 319 aic interrupt mask register (aic_imr) register address r/w description reset value aic_imr 0xb800_2114 r interrupt mask register 0x0000_0000 31 30 29 28 27 26 25 24 im31 im30 im29 im28 im27 im26 im25 im24 23 22 21 20 19 18 17 16 im23 im22 im21 im20 im19 im18 im17 im16 15 14 13 12 11 10 9 8 im15 im14 im13 im12 im11 im10 im9 im8 7 6 5 4 3 2 1 0 im7 im6 im5 im4 im3 im2 im1 reserved bits descriptions [31:1] im x interrupt mask this bit determines whether the corresponding interrupt channel is enabled or disabled. every interrupt channel ca n be active no matter whether it is enabled or disabled. if an interrupt cha nnel is enabled, it does not definitely mean it is active. every interrupt channel can be authorized by the aic only when it is both active and enabled. 0 = corresponding interrupt channel is disabled 1 = corresponding interrupt channel is enabled : NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 320 aic output interrupt status register (aic_oisr) the aic classifies the interrupt into fiq and irq. this register indicates whether the asserted interrupt is fiq or irq. if both irq and fiq are equal to 0, it means there is no interrupt occurred. register address r/w description reset value aic_oisr 0xb800_2118 r output interrupt status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved irq fiq bits descriptions [1] irq interrupt request 0 = nirq line is inactive. 1 = nirq line is active. [0] fiq fast interrupt request 0 = nfiq line is inactive. 1 = nfiq line is active NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 321 aic mask enable command register (aic_mecr) register address r/w description reset value aic_mecr 0xb800_2120 w mask enable command register undefined 31 30 29 28 27 26 25 24 mec31 mec30 mec29 mec28 mec27 mec26 mec25 mec24 23 22 21 20 19 18 17 16 mec23 mec22 mec21 mec20 mec19 mec18 mec17 mec16 15 14 13 12 11 10 9 8 mec15 mec14 mec13 mec12 mec11 mec10 mec9 mec8 7 6 5 4 3 2 1 0 mec7 mec6 mec5 mec4 mec3 mec2 mec1 reserved bits descriptions [31:1] mec x mask enable command 0 = no effect 1 = enables the corresponding interrupt channel mec24 has to set 0 for the reserved interrupt source. : NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 322 aic mask disable command register (aic_mdcr) register address r/w description reset value aic_mdcr 0xb800_2124 w mask disable command register undefined 31 30 29 28 27 26 25 24 mdc31 mdc30 mdc29 mdc28 mdc27 mdc26 mdc25 mdc24 23 22 21 20 19 18 17 16 mdc23 mdc22 mdc21 mdc20 mdc19 mdc18 mdc17 mdc16 15 14 13 12 11 10 9 8 mdc15 mdc14 mdc13 mdc12 mdc11 mdc10 mdc9 mdc8 7 6 5 4 3 2 1 0 mdc7 mdc6 mdc5 mdc4 mdc3 mdc2 mdc1 reserved bits descriptions [31:1] mdc x mask disable command 0 = no effect 1 = disables the correspon ding interrupt channel NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 323 aic end of service command register (aic_eoscr) this register is used by the interrupt service routine to indicate that it is completely served. thus, the interrupt handler can write any value to this register to indicate the end of its interrupt service. register address r/w description reset value aic_eoscr 0xb800_2130 w end of service command register undefined 31 30 29 28 27 26 25 24 --- --- --- --- --- --- --- --- 23 22 21 20 19 18 17 16 --- --- --- --- --- --- --- --- 15 14 13 12 11 10 9 8 --- --- --- --- --- --- --- --- 7 6 5 4 3 2 1 0 --- --- --- --- --- --- --- --- NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 324 7.14 general-purpose input/output (gpio) 7.14.1 overview the general-purpose input/output ( gpio ) module possesses 38 pins, and se rves as multiple function purposes. each port can be easily configured by softwa re to meet various system configurations and design requirements. software must define which function of each pin is used before starting the main program. if a pin is not used for multiplexed functions, the pin can be configured as i/o ports. these 38 io pins are divided into 6 groups acco rding to its peripheral interface definition. ? portc: 11-pin input/output port ? portd: 8-pin input/output port ? porte: 4-pin input/output port ? portf: 10-pin input/output port ? portg: 4-pin input/output port ? porth: 1-pin input/output port NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 325 7.14.2 gpio multiplexed functions table gpio groups shared interface NUC946ADN gpioc (11 pins) gpio gpioc[2] gpioc[4] gpioc[5] gpioc[6] gpioc[7] gpioc[8] gpioc[9] gpioc[10] gpioc[11] gpioc[13] gpioc[14] gpiod (8 pins) sd(sdio) interface gpiod[0] sd_cmd gpiod[1] sd_clk gpiod[2] sd_dat0 gpiod[3] sd_dat1 gpiod[4] sd_dat2 gpiod[5] sd_dat3 gpiod[6] sd_cd gpiod[8] sd_npwr gpioe (4 pins) uart interface gpioe[0] txd0 gpioe[1] rxd0 gpioe[2] txd1(b) gpioe[3] rxd1(b) gpiof (10 pins) rmii interface gpiof[0] phy_mdc gpiof [1] phy_mdio gpiof [3:2] phy_txd [1:0] gpiof [4] phy_txen gpiof [5] phy_refclk gpiof [7:6] phy_rxd [1:0] gpiof [8] phy_crsdv gpiof [9] phy_rxerr gpiog (4 pins) i2c/usi gpiog[0] scl0 / sfrm gpiog[1] sda0 / ssptxd gpiog[2] scl1 / sclk gpiog[3] sda1 / ssprxd gpioh (1 pin) nirq interface gpioh[0] nirq[0] NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 326 7.14.3 gpio control registers map register address r/w description reset value gpio_ba = 0xb800_3000 gpioc_dir 0xb800_3004 r/w gpio portc direct ion control register 0x0000_0000 gpioc_dataout 0xb800_3008 r/w gpio portc data output register 0x0000_0000 gpioc_datain 0xb800_300c r gpio portc data input register undefined gpiod_dir 0xb800_3014 r/w gpio portd direct ion control register 0x0000_0000 gpiod_dataout 0xb800_3018 r/w gpio portd data output register 0x0000_0000 gpiod_datain 0xb800_301c r gpio portd data input register undefined gpioe_dir 0xb800_3024 r/w gpio porte direct ion control register 0x0000_0000 gpioe_dataout 0xb800_3028 r/w gpio porte data output register 0x0000_0000 gpioe_datain 0xb800_302c r gpio porte data input register 0x0000_0000 gpiof_dir 0xb800_3034 r/w gpio portf direct ion control register 0x0000_0000 gpiof_dataout 0xb800_3038 r/w gpio portf data output register 0x0000_0000 gpiof_datain 0xb800_303c r gpio portf data input register undefined gpiog_dir 0xb800_3044 r/w gpio portg direction control register 0x0000_0000 gpiog_dataout 0xb800_3048 r/w gpio portg data output register 0x0000_0000 gpiog_datain 0xb800_304c r gpio portg data input register undefined gpioh_dbnce 0xb800_3050 r/w gpio porth input de-bounce control reg. 0x0000_0000 gpioh_dir 0xb800_3054 r/w gpio porth direction control register 0x0000_0000 gpioh_dataout 0xb800_3058 r/w gpio porth data output register 0x0000_0000 gpioh_datain 0xb800_305c r gpio porth data input register undefined NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 327 gpio portc direction control register (gpioc_dir) register address r/w description reset value gpioc_dir 0xb800_3004 r/w gpio portc in/o ut direction control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserve d outen reserve d outen 7 6 5 4 3 2 1 0 outen reserve d outen reserved bits descriptions [14..13] [11..4] [2] outen gpio portc output enable control each gpio pin can be enable d individually by setting th e corresponding control bit. 0 = input mode 1 = output mode NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 328 gpio portc data output register (gpioc_dataout) register address r/w description reset value gpioc_dataout 0xb800_3008 r/w gpio po rtc data output register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserve d dataout reserve d dataout 7 6 5 4 3 2 1 0 dataout reserved dataout reserved bits descriptions [14..13] [11..4] [2] dataou t gpio portc data output value writing data to this register will reflect the data value on the corresponding pin when it is configured as general output pin. and writing data to reserved bits is not effective. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 329 gpio portc data input register (gpioc_datain) register address r/w description reset value gpioc_datain 0xb800_300c r gpio po rtc data input register 0xxxxx_xxxx 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserve d dataout reserve d dataout 7 6 5 4 3 2 1 0 dataout reserved dataout reserved bits descriptions [14..13] [11..4] [2] datain gpio portc data input value the datain indicates the status of each gpio portc pin regardless of its operation mode. the reserved bits will be read as ?0?. gpio portd direction control register (gpiod_dir) register address r/w description reset value gpiod_dir 0xb800_3014 r/w gpio portd in/o ut direction control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved outen 7 6 5 4 3 2 1 0 reserve d outen bits descriptions [8] [6:0] outen gpio portd output enable control each gpio pin can be enable d individually by setting th e corresponding control bit. 0 = input mode 1 = output mode NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 330 gpio portd data output register (gpiod_dataout) register address r/w description reset value gpiod_dataout 0xb800_3018 r/w gpio po rtd data output register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved dataout 7 6 5 4 3 2 1 0 reserved dataout bits descriptions [8] [6:0] dataou t gpio portd data output value writing data to this register will reflect the data value on the corresponding pin when it is configured as general output pin. and writing data to reserved bits is not effective. gpio portd data input register (gpiod_datain) register address r/w description reset value gpiod_datain 0xb800_301c r gpio po rtd data input register 0xxxxx_xxxx 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved datain 7 6 5 4 3 2 1 0 reserve d datain bits descriptions [8] [6:0] datain gpio portd data input value the datain indicates the status of each gpio portd pin regardless of its operation mode. the reserved bits will be read as ?0?. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 331 gpio porte direction control register (gpioe_dir) register address r/w description reset value gpioe_dir 0xb800_3024 r/w gpio porte in/o ut direction control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved outen bits descriptions [3:0] outen gpio porte output enable control each gpio pin can be enable d individually by setting th e corresponding control bit. 0 = input mode 1 = output mode gpio porte data output register (gpioe_dataout) register address r/w description reset value gpioe_dataout 0xb800_3028 r/w gpio po rte data output register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved dataout bits descriptions [3:0] dataou t gpio porte data output value writing data to this register will reflect the data value on the corresponding pin when it is configured as general output pin. and writing data to reserved bits is not effective. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 332 gpio porte data input register (gpioe_datain) register address r/w description reset value gpioe_datain 0xb800_302c r gpio po rte data input register 0xxxxx_xxxx 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved datain bits descriptions [3:0] datain gpio porte data input value the datain indicates the status of each gpio porte pin regardless of its operation mode. the reserved bits will be read as ?0?. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 333 gpio portf direction control register (gpiof_dir) register address r/w description reset value gpiof_dir 0xb800_3034 r/w gpio portf in/o ut direction control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved outen 7 6 5 4 3 2 1 0 outen bits descriptions [9:0] outen gpio portf output enable control each gpio pin can be enable d individually by setting th e corresponding control bit. 0 = input mode 1 = output mode NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 334 gpio portf data output register (gpiof_dataout) register address r/w description reset value gpiof_dataout 0xb800_3038 r/w gpio po rtf data output register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved dataout 7 6 5 4 3 2 1 0 dataout bits descriptions [9:0] dataou t gpio portf data output value writing data to this register will reflect the data value on the corresponding pin when it is configured as general output pin. and writing data to reserved bits is not effective. gpio portf data input register (gpiof_datain) register address r/w description reset value gpiof_datain 0xb800_303c r gpio po rtf data input register 0xxxxx_xxxx 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved datain 7 6 5 4 3 2 1 0 datain bits descriptions [9:0] datain gpio portf data input value the datain indicates the status of each gpio portf pin regardless of its operation mode. the reserved bits will be read as ?0?. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 335 gpio portg direction control register (gpiog_dir) register address r/w description reset value gpiog_dir 0xb800_3044 r/w gpio portg in/o ut direction control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved outen bits descriptions [3:0] outen gpio portg output enable control each gpio pin can be enable d individually by setting th e corresponding control bit. 0 = input mode 1 = output mode gpio portg data output register (gpiog_dataout) register address r/w description reset value gpiog_dataout 0xb800_3048 r/w gpio portg data output register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 dataout bits descriptions [3:0] dataou t gpio portg data output value writing data to this register will reflect the data value on the corresponding pin when it is configured as general output pin. and writing data to reserved bits is not effective. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 336 gpio portg data input register (gpiog_datain) register address r/w description reset value gpiog_datain 0xb800_304c r gpio po rtg data input register 0xxxxx_xxxx 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved datain bits descriptions [3:0] datain gpio portg data input value the datain indicates the status of each gpio portg pin regardless of its operation mode. the reserved bits will be read as ?0?. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 337 gpio porth de-bounce enable control register (gpioh_dbnce) register address r/w description reset value gpioh_dbnce 0xb800_3050 r/w gpio porth de-bounce control register 0xxxxx_xxxx 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved dbclksel 7 6 5 4 3 2 1 0 reserved dben0 bits descriptions [10:8] dbclkse l de-bounce clock selection these 3 bits are used to select the cl ock rate for de-bouncer circuit. the relationship between the sy stem clock hclk and the de-bounce clock tclk_bun is as follows: tclk_bun = hclk / 2 dbclksel [0] dben0 de-bounce circuit enable for gpioh0 (nirq0) input 1 = enable de-bounce 0 = disable de-bounce NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 338 gpio porth direction control register (gpioh_dir) register address r/w description reset value gpioh_dir 0xb800_3054 r/w gpio porth in/o ut direction control register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved outen bits descriptions [0] outen gpio porth output enable control each gpio pin can be enable d individually by setting th e corresponding control bit. 0 = input mode 1 = output mode gpio porth data output register (gpioh_dataout) register address r/w description reset value gpioh_dataout 0xb800_3058 r/w gpio porth data output register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved dataout bits descriptions [0] dataou t gpio porth data output value writing data to this register will reflect the data value on the corresponding pin when it is configured as general output pin. and writing data to reserved bits is not effective. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 339 gpio porth data input register (gpioh_datain) register address r/w description reset value gpioh_datain 0xb800_305c r gpio po rth data input register 0xxxxx_xxxx 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved datain bits descriptions [0] datain gpio porth data input value the datain indicates the status of each gpio porth pin regardless of its operation mode. the reserved bits will be read as ?0?. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 340 7.15 i 2 c synchronous serial interface controller i 2 c is a two-wire, bi-directional seri al bus that provides a simple and efficient method of data exchange between devices. the i 2 c standard is a true multi-master bus including collision detection and arbitration that prevents data corruption if two or more ma sters attempt to control the bus simultaneously. serial, 8-bit oriented bi-d irectional data transfers can be up to 100 kb/s in standard-mode, 400 kb/s in the fast-mode, or 3.4 mb/s in the high-speed mode. only 100kbps and 400kbps modes are supported directly in this chip. data transfer is synchronized to scl signal between a master and a slave with byte-by-byte basis. each data byte is 8 bits long. there is one scl clock pu lse for each data bit with the msb being transmitted first. an acknowledge bit follows each transferred byte. each bit is sample d during the high period of scl; therefore, the sda line may be changed only during the low period of scl and must be held stable during the high period of scl. a transition on the sda line while scl is high is interpreted as a command (start or stop). the i 2 c master core includes the following features: compatible with i 2 c standard, support master mode multi master operation. clock stretching and wait state generation. provide multi-byte transmit operation, up to 4 bytes can be transmitted in a single transfer software programmable acknowledge bit. arbitration lost interrupt, with automatic transfer cancellation. start/stop/repeated start/ acknowledge generation. start/stop/repeated start detection. bus busy detection. supports 7 bit addressing mode. fully static synchronous desi gn with one clock domain. software mode i 2 c. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 341 7.15.1 i 2 c protocol normally, a standard communicati on consists of four parts: 1) start or repeated star t signal generation 2) slave address transfer 3) data transfer 4) stop signal generation scl sda s or sr msb ack p or sr p sr lsb msb lsb 1 2 7 8 9 1 2 3 - 7 8 9 a6 a5 a4 - a1 a0 r/w d7 d6 d5 - d1 d0 nack ack data transfer on the i 2 c-bus s slave address r/w a data a data a/a p '0'(write) data transfer (n bytes + acknowledge) from master to slave from slave to master a = acknowledge (sda low) a = not acknowledge (sda high) s = start condition p = stop condition a master-transmitter addressing a sl ave receiver with a 7-bit address the transfer direction is not changed '1'(read) data transfer (n bytes + acknowledge) s slave address r/w a data a data a p a master reads a slave immediatel y after the first byte (address) NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 342 start or repeated start signal when the bus is free/idle, meaning no master device is engaging th e bus (both scl and sda lines are high), a master can initiate a tran sfer by sending a start signal. a st art signal, usually referred to as the s-bit , is defined as a high to low transition on the sda line while scl is high . the start signal denotes the beginning of a new data transfer. a repeated start (sr) is a start si gnal without first generating a stop signal. the master uses this method to communicate with another slave or the same slave in a different tran sfer direction (e.g. from writing to a device to reading from a device) without releasing the bus. the i 2 c core generates a start signal when the start bit in the command register (cmdr) is set and the read or write bits are also set. depending on the current status of the scl line, a start or repeated start is generated. stop signal the master can terminate the communi cation by generating a stop sign al. a stop signal, usually referred to as the p-bit , is defined as a low to high transition on the sda line while scl is high . start condition stop condition scl sda start and stop conditions slave address transfer the first byte of data transferred by the master imme diately after the start sign al is the slave address. this is a 7-bits calling address followed by a rw bit. the rw bit signals the slave the data transfer direction. no two slaves in the sy stem can have the same address. on ly the slave with an address that matches the one transmitted by the master will respond by returning an acknowledge bit by pulling the sda low at the 9th scl clock cycle. the core treats a slave address transfer as any other write action. store the slav e device?s address in the transmit register (txr) and set the write bit. the core will then transfer the slave address on the bus. msb lsb r/w a0 a1 a2 a3 a4 a5 a6 slave address the first byte after the start procedure NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 343 data transfer once successful slave addr essing has been achieved, the data tr ansfer can proceed on a byte-by-byte basis in the direction specified by the rw bit sent by the master. each transferred byte is followed by an acknowledge bit on the 9th scl cloc k cycle. if the slave signals a not acknowledge (nack) , the master can generate a stop signal to abort the data transf er or generate a repeated start signal and start a new transfer cycle. if the master, as the receiving device, does not acknowledge (nack) the slave, the sl ave releases the sda line for the master to generate a stop or repeated start signal. to write data to a slave, store the data to be tr ansmitted in the transmit register (txr) and set the write bit. to read data from a slave, set the read bit. during a transfer the core set the i2c_tip flag, indicating that a transfer is in progress . when the transfer is done the i2c_tip flag is cleared, and the if flag set. and if ie is enabled, then an interrupt generated. the receive register (rxr) contains valid data after the if flag has been set. the software may issue a new write or read command when the i2c_tip flag is cleared. data line stable; data valid change of data allowed scl sda bit transfer on the i 2 c-bus 12 89 scl from master data output by transmitter data output by receiver s start condition clock pulse for acknowledgement not acknowledge acknowledge acknowledge on the i 2 c-bus NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 344 7.15.2 i2c serial interface control registers map r : read only, w : write only, r/w : both read and write register offset r/w/c description reset value i2c port0 : i2c_ba = 0xb800_6000 i2c port1 : i2c_ba = 0xb800_6100 csr 0xb800_6x00 r/w control and status register 0x0000_0000 divider 0xb800_6x04 r/w clock pre-scale register 0x0000_0000 cmdr 0xb800_6x08 r/w command register 0x0000_0000 swr 0xb800_6x0c r/w software mo de control register 0x0000_003f rxr 0xb800_6x10 r data receive register 0x0000_0000 txr 0xb800_6x14 r/w data transmit register 0x0000_0000 note: the reset value of swr is 0x 3f only when scr, sdr and ser ar e connected to pull high resistor. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 345 control and status register (csr) register offset r/w/c description reset value csr 0xb800_6x00 r/w control and status register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved i2c_rxack i2c_busy i2c_al i2c_tip 7 6 5 4 3 2 1 0 reserved tx_num reserved if ie i2c_en bits descriptions [11] i2c_rxack received acknowledge from slave (read only) this flag represents acknowle dge from the addressed slave. ? 0 = acknowledge received (ack). ? 1 = not acknowledge received (nack). [10] i2c_busy i 2 c bus busy (read only) ? 0 = after stop signal detected. ? 1 = after start signal detected. [9] i2c_al arbitration lost (read only) this bit is set when the i 2 c core lost arbitration. arbitration is lost when: ? a stop signal is detect ed, but no requested. ? the master drives sda high, but sda is low. [8] i2c_tip transfer in progress (read only) ? 0 = transfer complete. ? 1 = transferring data. note: when a transfer is in progress, you will not allow writing to any register of the i 2 c master core except swr. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 346 [5:4] tx_num transmit byte counts these two bits represent how many by tes are remained to transmit. when a byte has been transmitted, the tx_num will decrease 1 until all bytes are transmitted (tx_num = 0x0) or nack received from slave. then the interrupt signal will assert if ie was set. 0x0 = only one byte is left for transmission. 0x1 = two bytes are left to for transmission. 0x2 = three bytes are left for transmission. 0x3 = four bytes are le ft for transmission. [2] if interrupt flag the interrupt flag is set when: ? transfer has been completed. ? transfer has not been completed, but slave responded nack (in multi- byte transmit mode). ? arbitration is lost. note: this bit is read only, but can be cleared by writing 1 to this bit. [1] ie interrupt enable 0 = disable i 2 c interrupt. 1 = enable i 2 c interrupt. [0] i2c_en i 2 c core enable 0 = disable i 2 c core, serial bus outputs are controlled by sdw/scw. 1 = enable i 2 c core, serial bus outp uts are controlled by i 2 c core. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 347 pre-scale register (divider) register offset r/w/c description reset value divider 0xb800_6x04 r/w clock pre-scale register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 divider[15:8] 7 6 5 4 3 2 1 0 divider[7:0] bits descriptions [15:0] divider clock pre-scale register it is used to pre-scale the scl cloc k line. due to the structure of the i 2 c interface, the core uses a 5*scl cloc k internally. the pre-scale register must be programmed to this 5*scl frequency (minus 1). change the value of the pre-scale register only when the ?i2c_en? bit is cleared. example: pclk = 32mhz, desired scl = 100khz ) ( 3 ) ( 63 1 100 5 32 hex f dec khz mhz prescale ? ? ? ? ? NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 348 command register (cmdr) register offset r/w/c description reset value cmdr 0xb800_6x08 r/w command register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved start stop read write ack note: software can write this register only when i2c_en = 1. bits descriptions [4] start generate start condition generate (repeated) start condition on i 2 c bus. [3] stop generate stop condition generate stop condition on i 2 c bus. [2] read read data from slave retrieve data from slave. [1] write write data to slave transmit data to slave. [0] ack send acknowledge to slave when i 2 c behaves as a receiver, sent ack (a ck = ?0?) or nack (ack = ?1?) to slave. note: the start, stop, read and write bits are cl eared automatically while transfer finished. read and write cannot be set concurrently. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 349 software mode register (swr) register offset r/w/c description reset value swr 0xb800_6x0c r/w software mo de control register 0x0000_003f 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved ser sdr scr sew sdw scw note: this register is used as software mode of i 2 c. software can read/write this register no matter i2c_en is 0 or 1. but scl and sda are cont rolled by software only when i2c_en = 0. bits descriptions [5] ser serial interface sdo status (read only) 0 = sdo is low. 1 = sdo is high. [4] sdr serial interface sda status (read only) 0 = sda is low. 1 = sda is high. [3] scr serial interface sck status (read only) 0 = scl is low. 1 = scl is high. [2] sew serial interface sdo output control 0 = sdo pin is driven low. 1 = sdo pin is tri-state. [1] sdw serial interface sda output control 0 = sda pin is driven low. 1 = sda pin is tri-state. [0] scw serial interface sck output control 0 = scl pin is driven low. 1 = scl pin is tri-state. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 350 data receive register (rxr) register offset r/w/c description reset value rxr 0xb800_6x10 r data receive register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 rx [7:0] bits descriptions [7:0] rx data receive register the last byte received via i 2 c bus will put on this register. the i 2 c core only used 8-bit receive buffer. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 351 data transmit register (txr) register offset r/w/c description reset value txr 0xb800_6x14 r/w data transmit register 0x0000_0000 31 30 29 28 27 26 25 24 tx [31:24] 23 22 21 20 19 18 17 16 tx [23:16] 15 14 13 12 11 10 9 8 tx [15:8] 7 6 5 4 3 2 1 0 tx [7:0] bits descriptions [31:0] tx data transmit register the i 2 c core used 32-bit transmit buffer and provide multi-byte transmit function. set csr[tx_num] to a valu e that you want to transmit. i 2 c core will always issue a transfer from the highest byte first. for example, if csr[tx_num] = 0x3, tx[31:24] will be transmitted first, then tx[23:16], and so on. in case of a data transfer, all bits will be treated as data. in case of a slave address transfer, the first 7 bits will be treated as 7-bit address and the lsb represent the r/w bit. in this case, lsb = 1, reading from slave lsb = 0, writing to slave NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 352 7.16 universal serial interface controller (usi) the usi is a synchronous serial in terface performs a serial-to-paralle l conversion on data characters received from the peripheral, and a parallel-to-serial conversion on data characters received from cpu. this interface can drive up to 2 ex ternal peripherals and is seen as the master. it can generate an interrupt signal when data transfer is finished and can be cleared by writing 1 to the interrupt flag. the active level of device/slave select signal can be chosen to low active or high acti ve, which depends on the peripheral it?s connected. writing a divisor into divider register can program the frequency of serial clock output. this master core contains four 32-bit tr ansmit/receive buffers, and can provide burst mode operation. the maximum bits can be transmitted/receiv ed is 32 bits, and can transmit/receive data up to four times successive. the usi (microwire/spi) master core includes the following features: support microwire/spi master mode full duplex synchronous serial data transfer variable length of transfer word up to 32 bits provide burst mode operation, transmit/receive can be executed up to four times in one transfer msb or lsb first data transfer rx and tx on both rising and falling edge of serial clock independently 2 slave/device select lines fully static synchronous desi gn with one clock domain NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 353 7.16.1 usi timing diagram the timing diagram of usi is shown as following. pin descriptions: sclk (mw_sclk_o): usi serial clock output pin. mw_int_o : usi interrupt signal output to aic sfam(mw_ss_o) : usi slave/de vice select si gnal output. ssptxd(mw_so_o): usi serial data output pin (to slave device). ssprxd(mw_si_i) : usi serial data input pin (from slave device). msb (tx[7]) lsb (tx[0]) msb (rx[7]) lsb (rx[0]) mw_ss_o mw_sclk_o mw_so_o mw_si_i cntrl[lsb]=0, cntrl[tx_num]=0x0, cntrl[tx_bit_len]=0x08, cntrl[tx_neg]=1, cntrl[rx_neg]=0, ssr[ss_lvl]=0 tx[6] tx[5] tx[4] tx[3] tx[2] tx[1] rx[6] rx[5] rx[4] rx[3] rx[2] rx[1] usi timing mw_ss_o mw_sclk_o mw_so_o mw_si_i cntrl[lsb]=1, cntrl[tx_num]=0x 0, cntrl[tx_bit_len]=0x08, cntrl[tx_neg]=0, cntrl[r x_neg]=1, ssr[ss_lvl]=0 msb (tx[7]) lsb (tx[0]) msb (rx[7]) lsb (rx[0]) tx[1] tx[2] tx[3] tx[4] tx[5] tx[6] rx[1]rx[2]rx[3]rx[4]rx[5]rx[6] alternate phase sclk clock timing NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 354 7.16.2 usi control registers map r : read only, w : write only, r/w : both read and write register offset r/w description reset value usi_ba = 0xb800_6200 cntrl 0xb800_6200 r/w control and status register 0x0000_0004 divider 0xb800_6204 r/w clock di vider register 0x0000_0000 ssr 0xb800_6208 r/w slave select register 0x0000_0000 rx0 0xb800_6210 r data receive register 0 0x0000_0000 rx1 0xb800_6214 r data receive register 1 0x0000_0000 rx2 0xb800_6218 r data receive register 2 0x0000_0000 rx3 0xb800_621c r data receive register 3 0x0000_0000 tx0 0xb800_6210 w data transmit register 0 0x0000_0000 tx1 0xb800_6214 w data transmit register 1 0x0000_0000 tx2 0xb800_6218 w data transmit register 2 0x0000_0000 tx3 0xb800_621c w data transmit register 3 0x0000_0000 note 1: when software programs cntrl, the go_busy bit should be written last. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 355 control and status register (cntrl) register offset r/w description reset value cntrl 0xb800_6200 r/w control and status register 0x0000_0004 31 30 29 28 27 26 25 24 clk_pol reserved 23 22 21 20 19 18 17 16 reserved ie if 15 14 13 12 11 10 9 8 sleep reserved lsb tx_num 7 6 5 4 3 2 1 0 tx_bit_len tx_neg rx_neg go_busy bits descriptions [31] clk_pol clock polarity 0 = normal polarity. 1 = reverse polarity. [17] ie interrupt enable 0 = disable usi interrupt. 1 = enable usi interrupt. [16] if interrupt flag 0 = it indicates that the transfer dose not finish yet. 1 = it indicates that the transfer is do ne. the interrupt flag is set if it was enable. note: this bit is read only, but can be cleared by writing 1 to this bit. [15:12] sleep suspend interval these four bits provide the configurat ion of suspend interval between two successive transmit/receive in a transf er. the default value is 0x0. when cntrl[tx_num] = 00, setting this field has no effect on transfer. the desired interval is obtained according to the following equation (from the last falling edge of current sclk to the first rising e dge of next sclk): (cntrl[sleep] + 2)*period of sclk sleep = 0x0 ? 2 sclk clock cycle ?? sleep = 0xf ? 17 sclk clock cycle NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 356 [10] lsb send lsb first 0 = the msb is transmitted/received first (which bit in txx/rxx register that is depends on the tx_bit_len field in the cntrl register). 1 = the lsb is sent first on the line (bit txx[0]), and the first bit received from the line will be put in the lsb position in the rx register (bit rxx[0]). [9:8] tx_num transmit/receive numbers this field specifies how many transmit /receive numbers should be executed in one transfer. 00 = only one transmit/receive will be executed in one transfer. 01 = two successive transmit/receive will be executed in one transfer. 10 = three successive transmit/receive will be executed in one transfer. 11 = four successive transmit/receive will be executed in one transfer. [7:3] tx_bit_len transmit bit length this field specifies how many bits ar e transmitted in one transmit/receive. up to 32 bits can be transmitted. tx_bit_len = 0x01 ? 1 bit tx_bit_len = 0x02 ? 2 bits ?? tx_bit_len = 0x1f ? 31 bits tx_bit_len = 0x00 ? 32 bits [2] tx_neg transmit on negative edge 0 = the mw_so_o signal is changed on the rising edge of mw_sclk_o. 1 = the mw_so_o signal is changed on the falling edge of mw_sclk_o. [1] rx_neg receive on negative edge 0 = the mw_si_i signal is latched on the rising edge of mw_sclk_o. 1 = the mw_si_i signal is latched on the falling edge of mw_sclk_o. [0] go_busy go and busy status 0 = writing 0 to this bit has no effect. 1 = writing 1 to this bit starts the transfer. this bit remains set during the transfer and is automatically cleared after transfer finished. note: all registers should be set before writing 1 to the go_busy bit in the cntrl register. when a transfer is in pr ogress, writing to any register of the usi master core has no effect. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 357 divider register (divider) register offset r/w description reset value divider 0xb800_6204 r/w clock di vider register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 divider[15:8] 7 6 5 4 3 2 1 0 divider[7:0] bits descriptions [15:0] divider clock divider register the value in this field is the frequenc y divider of the system clock pclk to generate the serial clock on the outp ut mw_sclk_o. the desired frequency is obtained according to the following equation: ?? 2 * 1 ? ? divider f f pclk sclk note: suggest divider should be at least 1. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 358 slave select register (ssr) register offset r/w description reset value ssr 0xb800_6208 r/w slave select register 0x0000_0000 31 30 29 28 27 26 25 24 reserved 23 22 21 20 19 18 17 16 reserved 15 14 13 12 11 10 9 8 reserved 7 6 5 4 3 2 1 0 reserved ass ss_lvl ssr[1:0] bits descriptions [3] ass automatic slave select 0 = if this bit is cleared, slave sele ct signals are asserted and de-asserted by setting and clearing rela ted bits in ssr register. 1 = if this bit is set, mw_ss_o signals are generated automatically. it means that device/slave select signal, which is set in ssr register is asserted by the usi controller when transmit/receive is started by setting cntrl[go_busy], and is de-asserted after every transmit/receive is finished. [2] ss_lvl slave select active level it defines the active level of devi ce/slave select signal (mw_ss_o). 0 = the mw_ss_o slave select signal is active low. 1 = the mw_ss_o slave select signal is active high. [1:0] ssr slave select register if ssr[ass] bit is cleared, writing 1 to any bit location of this field sets the proper mw_ss_o line to an active state and writing 0 sets the line back to inactive state. if ssr[ass] bit is set, writing 1 to any bit location of this field will select appropriate mw_ss_o line to be automatically driven to active state for the duration of the transmit/receive, and will be driven to inactive state for the rest of the time. (the active level of mw_ss_o is specified in ssr[ss_lvl]). note: this interface can only drive one device/slave at a given time. therefore, the ssr of the selected devi ce must be set to its active level before starting any read or write transfer. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 359 data receive register 0 (rx0) data receive register 1 (rx1) data receive register 2 (rx2) data receive register 3 (rx3) register offset r/w description reset value rx0 0xb800_6210 r data receive register 0 0x0000_0000 rx1 0xb800_6214 r data receive register 1 0x0000_0000 rx2 0xb800_6218 r data receive register 2 0x0000_0000 rx3 0xb800_621c r data receive register 3 0x0000_0000 31 30 29 28 27 26 25 24 rx [31:24] 23 22 21 20 19 18 17 16 rx [23:16] 15 14 13 12 11 10 9 8 rx [15:8] 7 6 5 4 3 2 1 0 rx [7:0] bits descriptions [31:0] rx data receive register the data receive registers hold the va lue of received data of the last executed transfer. valid bits depend on the transmit bit length field in the cntrl register. for example, if cn trl[tx_bit_len] is set to 0x08 and cntrl[tx_num] is set to 0x0, bit rx0[7:0] holds the received data. note: the data receive registers are re ad only registers. a write to these registers will actually modify the data transmit registers because those registers share the same ffs. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 360 data transmit register 0 (tx0) data transmit register 1 (tx1) data transmit register 2 (tx2) data transmit register 3 (tx3) register offset r/w description reset value tx0 0xb800_6210 w data transmit register 0 0x0000_0000 tx1 0xb800_6214 w data transmit register 1 0x0000_0000 tx2 0xb800_6218 w data transmit register 2 0x0000_0000 tx3 0xb800_621c w data transmit register 3 0x0000_0000 31 30 29 28 27 26 25 24 tx [31:24] 23 22 21 20 19 18 17 16 tx [23:16] 15 14 13 12 11 10 9 8 tx [15:8] 7 6 5 4 3 2 1 0 tx [7:0] bits descriptions [31:0] tx data transmit register the data transmit registers hold the data to be transmitted in the next transfer. valid bits depend on the transmit bit length field in the cntrl register. for example, if cntrl[tx _bit_len] is set to 0x08 and the cntrl[tx_num] is set to 0x0, the bit tx0[7:0] will be transmitted in next transfer. if cntrl[tx_bit_len] is set to 0x00 and cntrl[tx_num] is set to 0x3, the core will perform four 32-bit transmit/receive successive using the same setting (the order is tx0[31:0], tx1[31:0], tx2[31:0], tx3[31:0]). note: the rxx and txx registers share the same flip-flops, which mean that what is received from the input data line in one transfer will be transmitted on the output data line in the next transfer if no write access to the txx register is exec uted between the transfers. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 361 7.16.3 timing diagram row[3:0] prescale[7:0] 1110 1111 0000 column[3:0] 000 001 010 111 010 011 100 101 0123401 4 0001 0010 scan_en xclock 16x8 keypad scan timing diagram NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 362 8 electrical specifications 8.1 absolute maximum ratings ambient temperature .................................?????............................ tbd storage temperat ure ..................................................??.................. -50 ? c ~ 125 ? c voltage on any pi n ...............................................................??........ -0.5v ~ 6v power supply voltage (core lo gic) ..............................?...........???..?. -0.5v ~ 2.5v power supply voltage (io buffe r) ...............................?...........???..?. -0.5v ~ 4.6v injection current (latch -up testing) ..............................................???. 100ma crystal frequency ...............................................?...........???..???. 4mhz ~ 30mhz NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 363 8.2 dc specifications 8.2.1 digital dc characteristics (normal test conditions: vdd33/avdd33 = 3. 3v+/-10%, vdd18/rtcvdd18/pllvdd18 = 1.8v+/-10%, usbvddc0/usbvddc1/usbvddt0/usbvddt1= 3.3v+/-5%, ta = -40 ? c ~ 85 ? c unless otherwise specified) symbol parameter condition min typ max unit vdd33/ avdd33 power supply 2.97 - 3.63 v vdd18/ pllvdd18 power supply 1.62 - 1.98 v usbvddc0/ usbvddc1/ usbvddt0/ usbvddt1 power supply 3.13 - 3.46 v v il input low voltage -0.3 - 0.8 v v ih input high voltage 2.0 - 5.5 v vt+ schmitt trigger positive-going thre shold 1.5 - 1.62 v vt- schmitt trigger negative-going threshold 1.14 - 1.27 v v ol output low voltage depend on driving - - 0.4 v v oh output high voltage depend on driving 2.4 - - v i ih input high current v in = 2.4 v -1 - 1 ua i il input low current v in = 0.4 v -1 - 1 ua i oh output high current ebi, gpioc, gpiod - 35 - ma i ol output low current ebi, gpioc, gpiod - 26 - ma i oh output high current the other port - 25 - ma i ol output low current the other port - 17 - ma i oc operation current note 1 - 340 - ma i sc standby current note 2 - 50 - ua note1: this operation current is measured on vdd18 @ 1. 8v, and all of ip clocks are enable with cpu clock/system clock @ 200mhz / 100mhz. note2: the standby current is measured on vdd18 @1.8v, and a ll of ip clocks are disab ling with power-down mode, all of gpio pins are set to output and clock pins keep at 0v. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 364 8.2.2 usb low-/full-speed dc electrical specifications symbol parameter conditions min typ max v ih pad input high voltage 2.0v v il pad input low voltage 0.8v v di differential input sensitivity |padp-padm| 0.2v v cm common mode voltage range include v di range 0.8v 2.5v v se single-ended receiver threshold 0.8v 2.0v v ol pad output low voltage 0v 0.3v v oh pad output high voltage 2.8v 3.6v v crs differential output signal cross-point voltage 1.3v 2.0v r pu internal pull-up resistor bus idle 900 ? 1575 ? receiving 1425 ? 3090 ? r pd internal pull-down resistor 14.25k ? 24.80k ? z drv driver output resistance ? steady state drive 10 ? c in transceiver pad capacitance pad to ground 20pf 8.2.3 usb high-speed dc electrical specifications symbol parameter conditions min typ max v hsdi high-speed differential input signal level |padp-padm| 150mv v hss q high-speed sq detectio n threshold |padp-padm| 100mv 150mv v hscm high-speed common mode voltage range -50mv 500mv v hsoh high-speed data signaling high 360mv 440mv v hsol high-speed data signaling low -10mv 10mv v chirpj chirp j level 700mv 1100mv v chirpk chirp k level -900mv -500mv z hsdrv high-speed driver output resistance 45 ? 10% 40.5 ? 49.5 ? NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 365 8.3 ac specifications 8.3.1 reset ac characteristics nreset t rst symbol parameter min max unit t rst reset pulse width after power stable 1.0 - ms 8.3.2 clock input characteristics extal15m 1.5 v t high t low extal15m duty = t high / (t high + t low ) t extal15m f extal15m = 1 / t extal15m symbol parameter min typ max unit f extal15m clock input frequency - 15.0 - mhz extal15m duty clock input duty cycle 45 50 55 % v il (extal15m) extal15m input low voltage 0 - 0.8 v v ih (extal15m) extal15m input high voltage 2.0 - vdd33 + 0.3 v NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 366 8.3.3 ebi/sdram interface ac characteristics mclk output delay output valid 1.5v 1.5v t do symbol parameter min max unit f mcl k sdram clock output frequency - 100 mhz t dsu md[31:0]] input setup time 2 - ns t dh md[31:0] input hold time 2 - ns t osu sdram output signal valid delay time 2* 5* ns * the above t osu is based on the ebi ckskew regi ster default setting on 0x48 and f mclk at 100mhz NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 367 8.3.4 ebi (rom/sram/external i/o) ac characteristics address valid r data write data vaild mclk t do necs[0] ma[21:0] noe md[16:0] nwait nwbe[1:0] d[16:0] t necso t necso t addo t noeo t noeo t dsu t dh t nwah t nwbo t nwbo t nwasu symbol parameter min max unit t addo address output delay time 2* 7* ns t ncso rom/sram/flash or external i/o chip select delay time 2* 7* ns t noeo rom/sram or external i/o bank output enable delay 2* 7* ns t nwbo rom/sram or external i/o bank write byte enable delay 2* 7* ns t dh read data hold time 5 ns t dsu read data setup time 1 ns t do write data output delay time (sram or external i/o) 2* 7* ns t nwasu external wait setup time 3 ns t nwah external wait hold time 1 ns * the above data are based on the ebi cksk ew register default setting on 0x48 and f mclk at 100mh NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 368 8.3.5 sd host interface ac characteristics sd_clk sd_cmd, sd_dat[3:0] t oad output valid sd_clk sd_cmd, sd_dat[3:0] t is u t ih input valid t clk h t clkl f sd t oh symbol parameter conditions min max unit f sd sd clock frequency identification mode 100 400 khz f sd sd clock frequency data transfer mode - 50 mhz t clkh sd clock high time - 10 - ns t clkl sd clock low time - 10 - ns t isu sd cmd & data input setup time - 5 - ns t ih sd cmd & data input hold time - 5 - ns t oad sd output active delay (falling edge) - - 14 ns t oh sd output hold time - 0 - ns NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 369 8.3.6 memory stick interface ac characteristics ms_clk m s_b s, m s_d at[3:0] t od output valid ms_clk ms_dat[3:0] t d_su t d_h input valid t mc lkh t mc lkl f mclk t h symbol parameter conditions min max unit f mclk ms_clk clock freque ncy serial mode 5 20 mhz f mclk ms_clk clock frequency parallel mode 10 40 mhz t mclkh ms_clk clock high time 5 - ns t mclkl ms_clk clock low time 5 - ns t bs_od ms_bs output delay (falling edge) 5 15 ns t bs_h ms_bs output hold time 1 - ns t d_su data input setup time 8 - ns t d_h data input hold time 1 - ns t d_od data output delay (falling edge) 8 15 ns t d_od data output hold time 1 - ns NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 370 8.3.7 usi (spi/mw) interface ac characteristics sclk sfrm, ssptxd t uos output valid sclk ssprxd t iuis t iuih input valid t uck h t uckl t uck t uoh symbol parameter min max unit t clkh clock output high time 14.6 - ns t clkl clock output low time 15.8 - ns t clk clock cycle time 30.4 - ns t uos sfrm, ssptxd output setup time 15 - ns t uoh sfrm, ssptxd output hold time 13 - ns t uis ssprxd input setup time 10 - ns t uih ssprxd input hold time 10 - ns NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 371 8.3.8 usb transceiver ac characteristics usb transceiver: low-speed ac electrical specifications symbol parameter conditions min typ max t lr low-speed driver rise time c l =50pf 75ns 300ns t lf low-speed driver fall time c l =50pf 75ns 300ns t lrfm low-speed rise/fall time matching t lrfm = t lr / t lf 80% 125% usb transceiver: full-speed ac electrical specifications symbol parameter conditions min typ max t fr full-speed driver rise time c l =50pf 4ns 20ns t ff full-speed driver fall time c l =50pf 75ns 20ns t frfm full-speed rise/fall time matching t frfm = t fr / t ff 90% 111.11 % usb transceiver: high-speed ac electrical specifications symbol parameter conditions min typ max t hsr high-speed driver rise time z hsdrv =45 ? 500ps 900ps t hsf high-speed driver fall time z hsdrv =45 ? 500ps 900ps high-speed driver waveform requirement eye diagram of template 1 ** high-speed receiver waveform requirement eye diagram of template 4 ?? high-speed jitter requirement data source end eye diagram of template 1 ** receiver end eye diagram of template 4 ?? ** check ?universal serial bus specif ication revision 2.0? page 133. ?? check ?universal serial bus specif ication revision 2.0? page 136. NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 372 8.3.9 emc rmii ac characteristics the signal timing characteristics conforms to the guidelines specified in ieee std. 802.3. phy_refclk phy_txd [1:0] phy_txen t txo valid transmit signal timing relationships at rmii phy_refclk phy_rxd [1:0] phy_crsdv phy_rxerr valid input t rxh t rxsu receive signal timing relationships at rmii symbol parameter min max unit t txo transmit output delay time 7 14 ns t rxsu receive setup time 4 ns t rxh receive hold time 2 ns NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 373 phy_mdc phy_mdio valid input t mdh t mdsu phy_mdio read from phy timing phy_mdc phy_mdio t mdo valid phy_mdio write to phy timing symbol parameter min max unit t mdo phy_mdio output delay time 0 15 ns t mdsu phy_mdio setup time 5 ns t mdh phy_mdio hold time 5 ns NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 374 9 package specifications NUC946ADN lqfp128l (14x14x1.4 mm, footprint 2.0mm) NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 375 10 revision history revision date comments a4 2011/03/10 1. new release a5 2011/7/26 1. change footprint with ex-pad NUC946ADN 32-bit arm926ej-s based mcu publication release date: july. 26, 2011 revision: a5 376 important notice nuvoton products are neither intended nor warranted for usage in systems or equipment, any malfunction or failure of which may cause loss of human life, bodily inju ry or severe property damage. such applications are deemed, ?insecure usage?. insecure usage includes, but is not limited to: equipmen t for surgical implementation, atomic energy control instruments, airplane or spaceship instruments, the c ontrol or operation of dynamic, brake or safety systems designed for vehicular use, traffic signal instruments, a ll types of safety devices, and other applications intended to support or sustain life. all insecure usage shall be made at customer?s risk, and in the event that third parties lay claims to nuvoton as a result of customer?s insecure usage, customer shall indemnify the damages and liabilities thus incurred by nuvoton. |
Price & Availability of NUC946ADN
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |