Digi, Digi International, the Digi logo, NetSilicon, a Digi International Company, NET+, NET+OS and
NET+Works are trademarks or registered trademarks of Digi International, Inc. in the United States and
other countries worldwide. All other trademarks are the property of their respective owners.
Information in this document is subject to change without notice and does not represent a committment
on the part of Digi International.
Digi provides this document “as is,” without warranty of any kind, either expressed or implied, including,
but not limited to, the implied warranties of, fitness or merchantability for a particular purpose. Digi may
make improvements and/or changes in this manual or in the product(s) and/or the program(s) described
in this manual at any time.
This product could include technical inaccuracies or typographical errors. Changes are made periodically
to the information herein; these changes may be incorporated in new editions of the publication.
ii
Using This Guide
Using This Guide
This guide provides information about the NS7520 32-bit networked
microprocessor. The NS7520 is part of the NET+ARM line of SoC (System-onChip) products, and supports high-bandwidth applications for intelligent
networked devices.
The NET+ARM family is part of the NET+Works integrated product family, which
includes the NET+OS network software suite.
Conventions used in this guide
This table describes the typographic conventions used in this guide:
This conventionIs used for
italictypeEmphasis, new terms, variables, and document titles.
monospaced type
_ (underscore)Defines a signal as being active low.
‘bIndicates that the number following this indicator is in binary radix
‘dIndicates that the number following this indicator is in decimal radix
‘hIndicates that the number following this indicator is in hexadecimal
Filenames, pathnames, and code examples.
radix
iii
Digi information
Related documentation
For additional documentation, see the Documentation folder in the NET+OS Start
menu.
Documentation updates
Digi occasionally provides documentation updates on the Web site
(www.digiembedded.com/support).
Be aware that if you see differences between the documentation you received in your
package and the documentation on the Web site, the Web site content is the latest
version.
Support
To get help with a question or technical problem with this product, or to make
comments and recommendations about our products or documentation, use the
contact information listed in this table:
iv
ForContact information
Technical supportwww.digiembedded.com/
United States: +1 877 912-3444
Other locations: +1 952 912-3444
NS7520 Hardware Reference, Rev G 9/2007
Contents
Chapter 1: About the NS7520 .................................................................................... 1
NS7520 Features ......................................................................... 2
Key features and operating modes of the major NS7520 modules ........ 2
External use of TA_ and TEA_ ................................................313
xi
xii
About the NS7520
About the NS7520
CHAPTER 1
This chapter provides an overview of the NS7520. The NS7520 is a high-
performance, highly integrated, 32-bit system-on-a-chip ASIC designed for use in
intelligent networked devices and Internet appliances. The NS7520 is based on the
standard architecture in the NET+ARM family of devices.
NET+ARM is the hardware foundation of the NET+Works family of integrated hardware
and software solutions for device networking. These comprehensive platforms
include drivers, popular operating systems, networking software, development tools,
APIs, and complete development boards.
www.digiembedded.com
1
NS7520 Features
NS7520 Features
The NS7520 can support most any networking scenario, and includes a 10/100 BaseT
Ethernet MAC and two independent serial ports (each of which can run in UART or SPI
mode).
The CPU is an ARM7TDMI (ARM7) 32-bit RISC processor core with a rich complement of
support peripherals and memory controllers, including:
Glueless connection to different types of memory; for example, flash,
SDRAM, EEPROM, and others.
Programmable timers
13-channel DMA controller
External bus expansion module
16 general-purpose I/O (GPIO) pins
Key features and operating modes of the major NS7520 modules
2
CPU core
–ARM7 32-bit RISC processor
–32-bit internal bus
–32-bit ARM mode and 16-bit Thumb mode
–15 general-purpose 32-bit registers
–32-bit program counter (PC) and status register
–Five supervisor modes, one user mode
13-channel DMA controller
–Two channels dedicated to Ethernet transmit and receive
–Four channels dedicated to two serial modules’ transmit and receive
–Four channels for external peripherals (only two channels — either 3 and 5
or 4 and 6 — can be configured at one time)
–Three channels available for memory-to-memory transfers
–Flexible buffer management
NS7520 Hardware Reference, Rev G 9/2007
About the NS7520
General-purpose I/O pins
–16 programmable GPIO interface pins
–Four pins programmable with level-sensitive interrupt
Serial ports
–Two fully independent serial ports (UART, SPI)
–Digital phase lock loop (DPLL) for receive clock extractions
–32-byte transmit/receive FIFOs
–Internal programmable bit-rate generators
–Bit rates 75–230400 in 16X mode
–Bit rates 1200 bps–4 Mbps in 1X mode
–Flexible baud rate generator, external clock for synchronous operation
–Receive-side character and buffer gap timers
–Four receive-side data match detectors
Power and operating voltages
–500 mW maximum at 55 MHz (all outputs switching)
–418 mW maximum at 46 MHz (all outputs switching)
–291 mW maximum at 36 MHz (all outputs switching)
–3.3 V — I/O
–1.5 V — Core
Integrated 10/100 Ethernet MAC
–10/100 Mbps MII-based PHY interface
–10 Mbps ENDEC interface
–Support for TP-PMD and fiber-PMD devices
–Full-duplex and half-duplex modes
–Optional 4B/5B coding
–Station, broadcast, and multicast address detection filtering
–512-byte transmit FIFO, 2 Kbyte receive FIFO
–Intelligent receive-side buffer size selection
www.digiembedded.com
3
NS7520 Features
Programmable timers
Operating frequency
–Two independent timers (2μs–20.7 hours)
–Watchdog timer (interrupt or reset on expiration)
–Programmable bus monitor or timer
–36, 46, or 55 MHz internal clock operation from 18.432 MHz quartz crystal
or crystal oscillator
–f
= 36, 46, or 55 MHz (grade-dependent)
MAX
–System clock source by external quartz crystal or crystal oscillator, or clock
signal
–Programmable PLL, which allows a range of operating frequencies from 10
to f
MAX
–Maximum operating frequency from external clock or using PLL
multiplication f
Bus interface
MAX
–Five independent programmable chip selects with 256 Mb addressing per
chip select
–All chip selects support SRAM, FP/EDO DRAM, SDRAM, flash, and EEPROM
without external glue
–Supports 8-, 16-, and 32-bit peripherals
–External address decoding and cycle termination
–Dynamic bus sizing
–Internal DRAM/SDRAM controller with address multiplexer and
programmable refresh frequency
–Internal refresh controller (CAS before RAS)
4
–Burst-mode support
–0–63 wait states per chip select
–Address pins that configure chip operating modes; see "NS7520 bootstrap
initialization" on page 59.
NS7520 Hardware Reference, Rev G 9/2007
NS7520 module block diagram
Debugger
PLL
System
Clock
JTAG Debug
Interface
ARM7TDMI
FIRQ
IRQ
2 timers
Watchdog
timer
Power
3.3V
1.5V
BBUS
D
M
A
D
M
A
D
M
A
D
M
A
Serial-A
UART
SPI
Serial-B
UART
SPI
4
level
interrupt
inputs
16 GPIO
Ethernet
controller
802.3
compliant
External
memory
controller
NS7520
Reset
Address bus
Serial transceivers and other
devices
MII
Memory
devices
Flash
SRAM
FP DRAM
SDRAM
Boot
config
Figure 1 is an overview of the NS7520, including all the modules.
About the NS7520
Figure 1: NS7520 overview
www.digiembedded.com
5
Operating frequency
Operating frequency
The NS7520 is available in grades operating at three maximum operating frequencies:
36 MHz, 46 MHz, and 55 MHz. The operating frequency is set during bootstrap
initialization, using pins A[8:0]. These address pins load the PLL settings register on
powerup reset. A[8:7] determines IS (charge pump current); A[6:5] determines FS
(output divider), and A[4:0] defines ND (PLL multiplier). Each bit in A[8:0] can be set
individually.
See "Setting the PLL frequency," beginning on page 54, for more detailed
information.
6
NS7520 Hardware Reference, Rev G 9/2007
Pinout and Packaging
Pinout and Packaging
CHAPTER 2
The NS7520 can be used in any embedded environment requiring networking
services in an Ethernet LAN. The NS7520 contains an integrated ARM RISC processor,
10/100 Ethernet MAC, serial ports, memory controllers, and parallel I/O. The NS7520
can interface with another processor using a register or shared RAM interface. The
NS7520 provides all the tools required for any embedded networking application.
www.digiembedded.com
7
Packaging
Packaging
Table 1 provides the NS7520 packaging dimensions. Figure 2 shows the pinout and
NS7520 dimensions. Figure 3 shows the NS7520 BGA layout.
SymbolMinNomMax
A——1.4
A10.350.400.45
A2——0.95
b0.450.500.55
D13.0 BSC
D111.2 BSC
E13.0 BSC
E111.2 BSC
e0.8 BSC
8
aaa0.1
Table 1: NS7520 packaging dimensions
NS7520 Hardware Reference, Rev G 9/2007
177 PFBGA
Pinout and Packaging
Figure 2: NS7520 pinout and dimensions
www.digiembedded.com
9
Packaging
A17
H
A9
D25
D22
M8
D3D26
B1
VCCPY10
PORTC1
GNDPY6
XTAL2
E4
14
H1
N1
CS2_
A19
M10
L2
TXER
PLLVSS
F3
N9
XTALB1
BUSY_
A8
D15
D16
P1
N12
OE_
D20
D
GNDPY4
Top View, Balls Facing Down
TDI
B11
B8
R5
P9
VCCPY4
CS1_
VDDC03
D10
BE0_
B9
L13
M3
A20
SCANEN_
C15
C5
C6
R9
J15
D11
R8
N6
7
PORTC3
D12
D8
6
GNDPY7
E12
D29
H14
G1
BCLK
D19
R15
J4
B13
M15
C8
2
A13
C12
P13
D2
BE1_
P10
N13
V1.0
D7
GNDPY9
F12
A14
RXD0
RXDV
PORTA6
D24
R6
VCCPY7
PORTA0
GNDPY1
K2D2
M1
N10
TXD3
A13
NC6
A2
TS_
TMS
RXCRS
CAS0_
A10
A24
M11
F4
E1
VCCPY1
TXD2
K12
B
12
RESV1-
M9
J12
J13
RXD1
RESET_
VSSC02
E13
R
PORTC7
GNDPY2
C3
G13
A9
TRST_
R11
M4
10
CAS3_
CAS2_
VDDC01
A26/0WE_ A27/0OE_
R10
K4
B6
C9
M5
VCCPY8
A10
R2
GNDPY14
8
XTALB2
A11
N7
H15
D12
A0
F14
B4
OSCVCC1
RXD2
PORTA4
A4
C1
D11
P14
CS3_
BISTEN_
D13
J3
P2
GNDPY13
13
PORTA7
C13
F1
L3
G12
A5
D7
P3B3
VCCPY9
E
3
L14
G
A15
BE2_
B10
H12
N4
A18
VDDC04
D4
D3A3
G14
B12
GUIDE PIN
VSSOSC2
TA_
L1
E2
GNDPY10
TXEN
PORTA1
M12
D4
K
A21
XTAL1
K13
GNDPY5
D1
VCCPY6
PORTC2
B7
VSSC01
D28
B15
M6
A11
PLLVDD
D10
D8
D1
R12
H3
VCCPY5
C
RESV2+
A25
PLLTST_
A15
R13
VSSC03
J
TXCOL
D13
C10
G4
VDDC02
GNDPY8
TXD0
A6
PORTC4
E5
N11
RXER
A23
TCK
C7
15
E14
G2
D23
K1
R14
G15
C14
D6
A1
N8
L
RXCLKPORTA2
A8
A12P12
C4
GNDPY11
A14J14
CS4_
D21
NC2
A4
BE3_
NS7520, 177 PFBGA
GNDPY3
D18
L12
P6
4
PORTA5
P4
1
PORTA3
CS0_
TEA_
P11
M14
B2
N14
R7
M13
J1
OSCVCC2
F
K14
A3
A16
N5
PORTC0
TDO
B14
F15
D27
P5
N3
M7
PORTC6
BR_
VSSOSC1
9
11
A1
MDC
D9
P7
E3
R1
N15L15
R3
N
D30
A5
R4
H13
L4
BG_
F2
M
NC3
D14
TXCLK
C11
A7
D17
PORTC5
VCCPY2
MDIO
A2
E15
A12
K3
J2
D5
D31
VCCPY3
P
F13
D15
D5
B5
M2
D6
NC1
D0
P15
D14
RXD3
NC4
A22
5
A6
H4
TXD1
P8
N2
A
VSSC04
RW_
H2C2
NC5
A7
G3
D9
CAS1_
GNDPY12
WE_
K15
Figure 3: NS7520 BGA layout
10
NS7520 Hardware Reference, Rev G 9/2007
Pinout detail tables and signal descriptions
Each pinout table applies to a specific interface and contains the following
information:
ColumnDescription
SignalThe pin name for each I/O signal. Some signals have multiple function modes and are identified
accordingly. The mode is configured through firmware using one or more configuration
registers.
PinThe pin number assignment for a specific I/O signal.
U next to the pin number indicates that the pin is a pullup resistor (input current source).
D next to the pin number indicates that the pin is a pulldown resistor (input current sink).
No value next to the pin indicates that the pin has neither a pullup nor pulldown resistor.
See Figure 28, "Internal pullup characteristics," on page 260 and Figure 29, "Internal pulldown
characteristics," on page 260 for an illustration of the characteristics of these pins. Use the
figures to select the appropriate value of the complimentary resistor to drive the signal to the
opposite logic state. For those pins with no pullup or pulldown resistor, you must select the
appropriate value per your design requirements.
_An underscore (bar) indicates that the pin is active low.
Pinout and Packaging
I/OThe type of signal — input, output, or input/output.
ODThe output drive strength of an output buffer. The NS7520 uses one of three drivers:
2 mA
4 mA
8 mA
Notes:
NO CONNECT as a description for a pin means do not connect to this pin.
The 177th pin (package ball) is for alignment of the package on the PCB.
www.digiembedded.com
11
Pinout detail tables and signal descriptions
System bus interface
SymbolPinI/OODDescription
BCLKA6O8Synchronous bus clock
External busOtherExternal busOther
ADDR27CS0OE_N10 UI/O4Addr bit 27Logical AND of CS0_ and
ADDR26CS0WE_P10 UI/O4Addr bit 26Logical AND of CS0_ and
External busExternal bus
ADDR25M10 UI/O4Remainder of address bus (through ADDR0)
ADDR24R10 UI/O4
ADDR23N9 UI/O4
ADDR22R9 UI/O4
ADDR21M9 UI/O4
ADDR20N8 UI/O4
OE_
WE_
12
ADDR19P8 UI/O4
ADDR18M7 UI/O4
ADDR17R7UI/O4
ADDR16N7 UI/O4
ADDR15R6 UI/O4
ADDR14M6 UI/O4
ADDR13P6 UI/O4
ADDR12N6 UI/O4
ADDR11M5 UI/O4
ADDR10P5 UI/O4
ADDR9N5 UI/O4
ADDR8R4 UI/O4
ADDR7R3 UI/O4
Table 2: System bus interface pinout
NS7520 Hardware Reference, Rev G 9/2007
SymbolPinI/OODDescription
ADDR6R2 UI/O4
ADDR5M4 UI/O4
ADDR4N4 UI/O4
ADDR3R1 UI/O4
ADDR2M3 UI/O4
ADDR1N2 UI/O4
ADDR0P1 UI/O4
DATA31N1I/O4Data bus
DATA30M1I/O4
DATA29L3I/O4
DATA28L2I/O4
DATA27L4I/O4
DATA26L1I/O4
DATA25K3I/O4
Pinout and Packaging
DATA24K2I/O4
DATA23K1I/O4
DATA22J2I/O4
DATA21J3I/O4
DATA20J1I/O4
DATA19H3I/O4
DATA18H4I/O4
DATA17H1I/O4
DATA16H2I/O4
DATA15G4I/O4
DATA14G1I/O4
DATA13G3I/O4
DATA12G2I/O4
Table 2: System bus interface pinout
www.digiembedded.com
13
Pinout detail tables and signal descriptions
SymbolPinI/OODDescription
DATA11F4I/O4
DATA10F2I/O4
DATA9F3I/O4
DATA8E1I/O4
DATA7E2I/O4
DATA6E3I/O4
DATA5D1I/O4
DATA4C1I/O4
DATA3B1I/O4
DATA2D4I/O4
DATA1D3I/O4
DATA0C2I/O4
BE3_D9I/O2Byte enable D31:D24
BE2_A9I/O2Byte enable D23:D16
14
BE1_C9I/O2Byte enable D15:D08
BE0_B9I/O2Byte enable D07:D00
TS_A8 UI/O4DO NOT USE
Add an external 820 ohm pullup to 3.3 V.
TA_D8 UI/O4Data transfer acknowledge
Add an external 820 ohm pullup to 3.3 V.
TA_ is bidirectional. It is used in input mode to
terminate a memory cycle externally. It is used in
output mode for reference purposes only.
TEA_C8 UI/O4Data transfer error acknowledge
Add an external 820 ohm pullup to 3.3 V.
TEA_ is bidirectional. It is used in input mode to
terminate a memory cycle externally. It is used in
output mode for reference purposes only.
RW_D6I/O2Transfer direction
BR_D7NO CONNECT
Table 2: System bus interface pinout
NS7520 Hardware Reference, Rev G 9/2007
Pinout and Packaging
SymbolPinI/OODDescription
BG_C7NO CONNECT
BUSY_B7NO CONNECT
Table 2: System bus interface pinout
Signal descriptions
MnemonicSignalDescription
BCLKBus clockProvides the bus clock. All system bus interface signals are
referenced to the BCLK signal.
ADDR[27:0]Address busIdentifies the address of the peripheral being addressed by
the current bus master. The address bus is bi-directional.
DATA[31:0]Data busProvides the data transfer path between the NS7520 and
external peripheral devices. The data bus is bi-directional.
Recommendation: Less than x32 (S)DRAM/SRAM
memory configurations. Unconnected data bus pins will
float during memory read cycles. Floating inputs can be a
source of wasted power.
For other than x32 DRAM/SRAM configurations, the
unused data bus signals should be pulled up.
TS_Transfer startNO CONNECT
BE_Byte enableIdentifies which 8-bit bytes of the 32-bit data bus are active
during any given system bus memory cycle. The BE_
signals are active low and
bi-directional.
TA_Transfer acknowledgeIndicates the end of the current system bus memory cycle.
This signal is driven to 1 prior to
tri-stating its driver.
TA_ is bi-directional.
Table 3: System bus interface signal description
www.digiembedded.com
15
Pinout detail tables and signal descriptions
MnemonicSignalDescription
TEA_Transfer error acknowledge Indicates an error termination or burst cycle termination:
RW_Read/write indicatorIndicates the direction of the system bus memory cycle.
BR_Bus requestNO CONNECT
BG_Bus grantNO CONNECT
BUSY_Bus busyNO CONNECT
Table 3: System bus interface signal description
In conjunction with TA_ to signal the end of a burst
cycle.
Independently of TA_ to signal that an error occurred
during the current bus cycle. TEA_ terminates the
current burst cycle.
This signal is driven to 1 prior to tri-stating its driver.
TEA_ is bi-directional. The NS7520 or the external
peripheral can drive this signal.
RW_ high indicates a read operation; RW_ low indicates a
write operation. The RW_ signal is bi-directional.
Chip select controller
The NS7520 supports five unique chip select configurations:
SymbolPinI/OODDescription
CS4_B4O4Chip select/DRAM RAS_
CS3_A4O4Chip select/DRAM RAS_
CS2_C5O4Chip select/DRAM RAS_
CS1_B5O4Chip select/DRAM RAS_
CS0_D5O4Chip select (boot select)
CAS3_A1O4FP/EDO DRAM column strobe
CAS2_C4O4FP/EDO DRAM column strobe
Table 4: Chip select controller pinout
16
D31:D24/SDRAM RAS_
D23:D16/SDRAM CAS_
NS7520 Hardware Reference, Rev G 9/2007
Pinout and Packaging
SymbolPinI/OODDescription
CAS1_B3O4FP/EDO DRAM column strobe
D15:D08/SDRAM WE_
CAS0_A2O4FP/EDO DRAM column strobe
D07:D00/SDRAM A10(AP)
WE_C6O4Write enable for NCC Ctrl’d cycles
OE_B6O4Output enable for NCC Ctrl’d cycles
Table 4: Chip select controller pinout
Signal descriptions
MnemonicSignalDescription
CS0_
CS1_
CS2_
CS3_
CS4_
CAS0_
CAS1_
CAS2_
CAS3_
WE_Write enableActive low signal that indicates that a memory write cycle
Chip select 0
Chip select 1
Chip select 2
Chip select 3
Chip select 4
Column address strobe
signals
Unique chip select outputs supported by the NS7520. Each
chip select can be configured to decode a portion of the
available address space and can address a maximum of 256
Mbytes of address space. The chip selects are configured
using registers in the memory module.
A chip select signal is driven low to indicate the end of the
current memory cycle. For FP/EDO DRAM, these signals
provide the RAS signal.
Activated when an address is decoded by a chip select
module configured for DRAM mode. The CAS_ signals
are active low and provide the column address strobe
function for DRAM devices.
The CAS_ signals also identify which 8-bit bytes of the 32bit data bus are active during any given system bus memory
cycle.
For SDRAM, CAS[3:1]_ provides the SDRAM command
field. CAS0_ provides the
auto-precharge signal.
For non-DRAM settings, these signals are 1.
is in progress. This signal is activated only during write
cycles to peripherals controlled by one of the chip selects in
the memory module.
Table 5: Chip select controller signal description
www.digiembedded.com
17
Pinout detail tables and signal descriptions
MnemonicSignalDescription
OE_Output enableActive low signal that indicates that a memory read cycle is
Table 5: Chip select controller signal description
Ethernet interface MAC
in progress. This signal is activated only during read cycles
from peripherals controlled by one of the chip selects in the
memory module.
Note:
ENDEC values for general-purpose output and TXD refer to bits in the
Ethernet General Control register. ENDEC values for general-purpose input
and RXD refer to bits in the Ethernet General Status register.
In this table, GP designates general-purpose.
SymbolPinI/OODDescription
MIIENDECMIIENDEC
MDCGP outputD10O2MII management
clock
MDIO GP outputB10 UI/O2MII data State of UTP_STP bit
TXCLKC10ITX clock
TXD3GP outputA12O2TX data 3State of AUI_TP[0] bit
TXD2GP outputB11O2TX data 2State of AUI_TP[1] bit
TXD1GP outputD11O2TX data 1Inverted state of PDN bit,
TXD0TXDA11O2TX data 0Transmit data
TXERGP outputA13O2TX code errorState of LNK_DIS_ bit
TXENB12O2TX enable
State of (LPBK bit XOR
(Mode=SEEQ))
open collector
18
TXCOLA14ICollision
RXCRSD12ICarrier sense
RXCLKC12IRX clock
RXD3GP inputD14IRX data 3Read state in bit 12
Table 6: Ethernet interface MAC pinout
NS7520 Hardware Reference, Rev G 9/2007
Pinout and Packaging
SymbolPinI/OODDescription
RXD2GP inputB15IRX data 2Read state in bit 15
RXD1GP inputA15IRX data 1Read state in bit 13
RXD0RXDB13IRX data 0Receive data
RXERGP inputC15IRX errorRead state in bit 11
RXDVGP inputD15IRX data validRead state in bit 10
Table 6: Ethernet interface MAC pinout
Signal descriptions
The Ethernet MII (media independent interface) provides the connection between the
Ethernet PHY and the MAC (media access controller).
MnemonicSignalDescription
MDCMII management clockProvides the clock for the MDIO serial data channel. The
MDC signal is an NS7520 output. The frequency is derived
from the system operating frequency per the CLKS field
setting (see the CLKS field in Table 69: "MII Management
Configuration register bit definition" on page 189).
MDIOManagement data IOA bi-directional signal that provides a serial data channel
between the NS7520 and the external Ethernet PHY
module.
TXCLKTransmit clockAn input to the NS7520 from the external PHY module.
TXCLK provides the synchronous data clock for transmit
data.
TXD3
TXD2
TXD1
TXD0
TXERTransmit coding errorOutput asserted by the NS7520 when an error has occurred
TXENTransmit enableAsserted when the NS7520 drives valid data on the TXD
Transmit data signalsNibble bus used by the NS7520 to drive data to the external
Ethernet PHY. All transmit data signals are synchronized
to TXCLK.
In ENDEC mode, only TXD0 is used for transmit data.
in the transmit data stream.
outputs. This signal is synchronized to TXCLK.
Table 7: Ethernet interface MAC signal description
www.digiembedded.com
19
Pinout detail tables and signal descriptions
MnemonicSignalDescription
COLTransmit collisionInput signal asserted by the external Ethernet PHY when a
CRSReceive carrier senseAsserted by the external Ethernet PHY whenever the
RXCLKReceive clockAn input to the NS7520 from the external PHY module.
collision is detected.
receive medium is non-idle.
The receive clock provides the synchronous data clock for
receive data.
RXD3
RXD2
RXD1
RXD0
Receive data signalsNibble bus used by the NS7520 to input receive data from
the external Ethernet PHY. All receive data signals are
synchronized to RXCLK.
In ENDEC mode, only RXD0 is used for receive data.
RXERReceive errorInput asserted by the external Ethernet PHY when the
Ethernet PHY encounters invalid symbols from the
network.
RXDVReceive data validInput asserted by the external Ethernet PHY when the PHY
drives valid data on the RXD inputs.
Table 7: Ethernet interface MAC signal description
20
NS7520 Hardware Reference, Rev G 9/2007
“No connect” pins
PinDescription
R13Add a 15K ohm pulldown to GND (15K ohm is the recommended value; 10–
P12Add a 15K ohm pulldown to GND (15K ohm is the recommended value; 10–
1RESET output indicates the reset state of the NS7520. PORTC4 persists beyond
the negation of RESET_ for approximately 512 clock cycles if the PLL is disabled.
When the PLL is enabled, PORTC4 persists beyond the negation of RESET_ to
allow for PLL lock for 100 microseconds times the ratio of the VCO to XTALA.
Note that this GPIO is left in output mode active following a hardware
RESET.
2*PORTC[3:0] pins provide level-sensitive interrupts. The inputs do not need to
be synchronous to any clock. The interrupt remains active until cleared by a
change in the input signal level.
Signal descriptions
See Chapter 6, "GEN Module," for signal and configuration information for PORTA and
PORTC.
www.digiembedded.com
23
Pinout detail tables and signal descriptions
System clock and reset
SymbolPinI/OODDescription
XTALA1K14IARM/system oscillator circuit
XTALA2K12O
PLLVDD (1.5V)L15PPLL clean power
PLLVSSL12PPLL return
RESET_A10ISystem reset
Table 10: System clock pinout
Signal descriptions
The NS7520 has three clock domains:
System clock (SYSCLK)
Bit rate generation and programmable timer reference clock (XTALA1/2)
System bus clock (BCLK)
24
The SYS module provides the NS7520 with these clocks, as well as system reset and
backup resources.
MnemonicSignalDescription
XTALA1
XTALA2
PLLVDD
PLLVSS
RESET_System resetResets the NS7520 hardware.
Oscillator input
Oscillator output
Clean PLL power
Connect directly to the
GND plane
A standard parallel quartz crystal or crystal oscillator can
be attached to these pins to provide the main input clock to
the NS7520.
Power and ground for PLL circuit.
Table 11: Clock generation and reset signal description
NS7520 Hardware Reference, Rev G 9/2007
This figure shows the timing and specification for RESET_ rise/fall times:
tR ma x = 18 ns
Vi n = 0.8V to 2.0V
tF max = 18ns
Vi n = 2.0V to 0.8V
tFtR
System mode (test support)
PLLTST_, BISTEN_, and SCANEN_ primary inputs control different test modes for both
functional and manufacturing test operations. See Chapter 5, "SYS Module," for more
information.
SymbolPinI/OODDescription
PLLTST_N15IEncoded with BISTEN_ and SCANEN_
Pinout and Packaging
Add an external pullup to 3.3V or pulldown to
GND.
Table 12: System mode and system reset pinout
BISTEN_M15IEncoded with PLLTST_ and SCANEN_
Add an external pullup to 3.3V or pulldown to
GND.
SCANEN_L13IEncoded with BISTEN_ and PLLTST_
Add an external pullup to 3.3V or pulldown to
GND.
www.digiembedded.com
25
Pinout detail tables and signal descriptions
JTAG test (ARM debugger)
JTAG boundary scan allows a tester to check the soldering of all signal pins and tristate all outputs.
SymbolPinI/OODDescription
TDIN14 UITest data in
TDOM13O2Test data out
TMSM12 UITest mode select
TRST_M14ITest mode reset
TCKP15ITest mode clock
Table 13: JTAG test pinout
Requires external termination when not being
used (see Figure 4, "TRST_ termination," on
page 27 for an illustration of the termination
circuit on the development PCB).
Add an external pullup to 3.3V.
26
Signal descriptions
MnemonicSignalDescription
TDITest data inTDI operates the JTAG standard. Consult the JTAG
specifications for use in boundary-scan testing. These
signals meet the requirements of the Raven and Jeeni
debuggers.
TDOTest data outTDO operates the JTAG standard. Consult the JTAG
specifications for use in boundary-scan testing. These
signals meet the requirements of the Raven and Jeeni
debuggers.
TMSTest mode selectTMS operates the JTAG standard. Consult the JTAG
specifications for use in boundary-scan testing. These
signals meet the requirements of the Raven and Jeeni
debuggers.
Table 14: ARM debugger signal description
NS7520 Hardware Reference, Rev G 9/2007
Pinout and Packaging
NS7520
TRSTNS7520
MnemonicSignalDescription
TRST_Test mode resetTRST_ operates the JTAG standard. Consult the JTAG
specifications for use in boundary-scan testing. These
signals meet the requirements of the Raven and Jeeni
debuggers.
TCKTest mode clockTCK operates the JTAG standard. Consult the JTAG
specifications for use in boundary-scan testing. These
signals meet the requirements of the Raven and Jeeni
debuggers.
Table 14: ARM debugger signal description
Figure 4: TRST_ termination
www.digiembedded.com
27
Pinout detail tables and signal descriptions
Power supply
SignalPinDescription
Oscillator VCC (3.3V)N13, C3Oscillator power supply
See the DC and AC electrical specifications in Chapter 11, "Electrical Characteristics,"
for more information.
28
NS7520 Hardware Reference, Rev G 9/2007
Working with the CPU
Working with the CPU
CHAPTER 3
The CPU uses an ARM7TDMI core processor, which provides high performance while
maintaining low power consumption and small size. This chapter describes the ARM
Thumb concept and provides an overview of ARM exceptions and hardware interrupts.
www.digiembedded.com
29
ARM Thumb concept
ARM Thumb concept
The ARM7TDMI processor uses a unique architectural strategy known as Thumb, which
makes the processor ideally suited to high-volume applications with memory
restrictions or applications for which code density is an issue.
Thumb code’s primary attribute is a super-reduced instruction set. The ARM7TDMI
processor has essentially two instruction sets:
Standard 32-bit ARM set
16-bit Thumb set
Thumb’s 16-bit instruction length allows it to approach twice the density of standard
ARM code while retaining most of the ARM’s performance advantage over a
traditional 16-bit processor using 16-bit registers. Thumb code operates on the same
32-bit register set as the ARM code, but consumes only 65% of the same code
compiled in ARM mode.
Thumb instructions operate with the standard ARM register configuration, allowing
interoperability between ARM and Thumb states. Each 16-bit Thumb instruction has a
corresponding 32-bit ARM instruction with the same effect on the processor model.
Thumb architecture provides a Thumb instruction decoder in front of the standard
32-bit ARM processor. The Thumb instruction decoder basically remaps each 16-bit
Thumb instruction into a 32-bit standard ARM instruction. The Thumb instruction set
typically requires 30% more instructions to perform the same task as 32-bit
instructions, but the Thumb instruction can fit twice as many instructions in the code
space. The net result is a 35% decrease in overall code density.
CPU performance
The ARM7TDMI core does not contain cache, and runs as fast as instructions can be
fetched. The performance rating for the ARM RISC depends on system bus speed and
cycle time. Performance is also affected by the size of the system bus and the type of
code (ARM or Thumb) being executed.
30
NS7520 Hardware Reference, Rev G 9/2007
Working with the CPU
The ARM instruction set yields a 0.9 Dhrystone (2.1) rating MIPS/MHz of instruction
executions; the Thumb instruction set yields 0.75 Dhrystones MIPS/MHz. The MHz
rating reflects the rate at which instructions can be fetched from external flash
memory, as shown in this table:
System bus
sizeCode styleRISC speed
Thumb mode
16-bitThumb25 MHz25 MHz1120 nsN/A
16-bitThumb25 MHz25 MHz080 nsN/A
16-bitThumb36 MHz36 MHz3125 nsN/A
16-bitThumb46 MHz46 MHz4109 nsN/A
16-bitThumb55 MHz55 MHz5108 nsN/A
ARM mode
32-bitARM36 MHz36 MHz3125 ns6.8
32-bitARM46 MHz46 MHz4109 ns8.6
32-bitARM55 MHz55 MHz5108 ns10.4
System bus
speed
Wait
states
Instruction
cycle time
Table 16: ARM performance
Working with ARM exceptions
Dhrystone
rating
Exceptions occur when the normal flow of a program is halted temporarily; for
example, to service an interrupt from a peripheral. Each ARM exception causes the
ARM processor to save some state information, then jump to a location in low
memory (referred to as the vector table; see "Exception vector table" on page 33).
Before an exception can be handled, the current processor state must be preserved
so the original program can resume when the handler routine has finished.
www.digiembedded.com
31
Working with ARM exceptions
Summary of ARM exceptions
The ARM processor can be interrupted by any of seven basic exceptions:
Reset exception. After a reset condition, the ARM7TDMI saves the current
values of the PC (program counter) and CPSR (Current Processor Status
register).
Undefined exception. The ARM7TDMI takes the undefined instruction trap
when it finds an instruction it cannot handle.
SWI instruction. The ARM7TDMI uses the software interrupt instruction
(SWI) to enter supervisor mode, usually to request a specific supervisor
instruction.
Abort exception. An abort exception indicates that the current memory
access cannot be completed. There are two types of abort exception:
–Prefetch. Occurs during an instruction prefetch.
–Data. Occurs during a data operand access.
IRQ. An interrupt request (IRQ) exception is a normal interrupt serviced by
the ARM7TDMI controller.
FIRQ. A fast interrupt request (FIRQ) exception supports a data transfer or
channel process. An FIRQ interrupt is generated only by the GEN module
timers and watchdog timer.
Exception priorities
Several exceptions can occur at the same time. If this happens, a fixed-priority
system determines the order in which they are handled:
Highest priority
1Reset
2Data abort
3FIRQ
4IRQ
5Prefetch abort
6Undefined instruction, SWI
Lowest priority
32
NS7520 Hardware Reference, Rev G 9/2007
Not all exceptions can occur at the same time, however.
Undefined instructions and SWIs are mutually exclusive, as they each
correspond to particular (non-overlapping) decoding of the current
instruction.
If a data abort occurs at the same time as FIRQ and the FIRQ is enabled
(that is, the CPSR F flag is clear), the data abort takes priority. ARM7TDMI
enters the data abort handler and immediately goes to the FIRQ vector. A
normal return from FIRQ causes the data abort handler to resume
execution.
Placing data abort at a higher priority than FIRQ is necessary to ensure
that the transfer error does not escape detection. The time for this
exception entry should be added to worst-case FIRQ latency
calculations.
Exception vector table
All exceptions result in the ARM processor vectoring to an address in low memory,
using the exception vector table. The exception vector table always exists and always
starts at base address 0.
Working with the CPU
Vector
address
’h0RESETReset vector; for initialization and startup
’h4UndefinedUndefined instruction encountered
’h8SWISoftware interrupt; used for entry point into the kernel
’hCAbort (prefetch)Bus error (no response or error) fetching instructions
’h10Abort (data)Bus error (no response or error) fetching data
’h14ReservedReserved
’h18IRQInterrupt from ARM7TDMI interrupt controller
’h1CFIRQFast interrupt from ARM7TDMI controller
VectorDescription
Table 17: Exception vector table
www.digiembedded.com
33
Working with ARM exceptions
All internal ARM7TDMI internal peripherals are presented to the CPU using the IRQ or
FIRQ interrupt inputs. The ARM can mask various ARM7TDMI peripheral interrupts at
the global level, using the ARM7TDMI interrupt controller. The ARM also can mask
interrupts at the micro-level, using configuration features with the peripheral
modules.
All IRQ interrupts are disabled when the I bit is set in the ARM CPSR. When the I bit is
cleared, those interrupts enabled in the ARM7TDMI interrupt controller can assert the
IRQ input to the ARM processor.
The ARM processor sets the I bit automatically when entering an interrupt service
routine (ISR), which disables recursive interrupts. The ISR’s first task is to read the
Interrupt Status register, which identifies all active sources for the IRQ interrupt.
Firmware sets the priorities for servicing interrupts at bootup, using the bits defined
in the Interrupt Status register.
Detail of ARM exceptions
Reset exception
34
A reset exception is the highest priority exception. When the ARM7TDMI is held in
reset, the processor abandons the executing instruction and continues to fetch
instructions from incrementing word addresses.
When the ARM7TDMI is removed from reset, the processor performs these steps:
1Overwrites R14_svc and SPSR_svc (Saved Processor Status register) by copying the
current values of the PC and CPSR into them. The values of the saved PC and
SPSR are not defined.
2Forces the CPSR M field to 10011 (supervisor mode), sets the I and F bits in the
CPSR, and clears the CPSR T bit (back to ARM mode).
3Forces the PC to fetch the next instruction from address ’h00.
4Resumes execution in ARM state.
Undefined exception
When the ARM7TDMI encounters an instruction it cannot handle, it takes the
undefined instruction trap. The undefined instruction trap can extend either the
Thumb or ARM instruction set by software emulation.
NS7520 Hardware Reference, Rev G 9/2007
Working with the CPU
After emulating the failed instruction, the trap handler should execute the following
instruction irrespective of the state (Thumb or ARM):
MOVS PC, R14_und.
This instruction restores the PC and CPSR, and returns to the instruction following the
undefined instruction.
SWI exception
An SWI is used for entering supervisor mode, usually to request a particular supervisor
function. An SWI handler should return by executing this instruction irrespective of
the state (ARM or Thumb):
MOVS PC, R14_SVC.
This instruction restores the PC and CPSR, and returns to the instruction following the
SWI.
Abort exception
An abort indicates that the current memory access cannot be completed, and is
signaled by the external ABORT input. The ARM7TDMI checks for the abort exception
during memory access cycles.
There are two types of abort exception:
Prefetch abort. Occurs during an instruction prefetch. If a prefetch abort
occurs, the prefetch instruction is marked as invalid but the exception is
not taken until the instruction reaches the head of the pipeline. If the
instruction is not executed (for example, if a branch occurs while the
instruction is in the pipeline), the abort does not take place.
Data abort. Occurs during a data operand access. If a data abort occurs, the
action taken depends on the instruction type:
–Single data transfer instructions (LDR, STR) write back modified base
registers; the abort handler must be aware of this.
–A swap instruction (SWP) is aborted as though it had not been executed.
–Block data transfer instructions (LDM, STM) complete. If write-back is set,
the base is updated. If the instruction would have overwritten the base with
data (that is, the base is in the transfer list), the overwriting is prevented.
All register overwriting is prevented after an abort is indicated, which
means that
R15 (always the last register to be transferred) is preserved in an
aborted LDM instruction.
www.digiembedded.com
35
Working with ARM exceptions
The abort mechanism allows the implementation of a demand-paged virtual memory
system. In this type of system, the processor is allowed to generate arbitrary
addresses. When the data at an address is unavailable, the memory management unit
(MMU) signals an abort. The abort handler must then work out the cause of the abort,
make the requested data available, and retry the aborted instruction. The
application program needs no knowledge of the amount of memory available to it,
and its state is not affected by the abort.
The handler executes one of the following instructions, irrespective of the state (ARM
or Thumb), after fixing the cause of the abort:
For a prefetch abort: SUBS PC, R14_abt, #4
For a data abort:SUBS PC, R14_abt, #8
IRQ exception
An IRQ exception is a normal interrupt sourced by the ARM7TDMI interrupt controller.
IRQ has a lower priority than FIRQ, and is masked out when an FIRQ sequence is
entered. IRQ can be disabled at any time by setting the I bit in CPSR to 1; this can be
done only from privileged (non-user) mode.
36
The IRQ handler should leave the interrupt by executing the following instruction
irrespective of the state (ARM or Thumb):
SUBS PC, R14_irq, #4.
FIRQ exception
An FIRQ exception supports a data transfer or channel process. In ARM state, FIRQ has
enough registers to remove the need for register saving, which minimizes context
switching overhead.
Only two peripherals can generate an FIRQ interrupt: the GEN module built-in timers
and the GEN module watchdog timer.
The FIRQ handler should leave the interrupt by executing the following instruction
irrespective of the state (ARM or THUMB):
SUBS PC, R14_firq, #4.
The FIRQ interrupt can be disabled by setting the CPSR F flag to 1, only in non-user
mode. If the F flag is clear, the ARM7TDMI checks for a low level on the output of the
FIRQ synchronizer at the end of each instruction.
NS7520 Hardware Reference, Rev G 9/2007
Entering and exiting an exception (software action)
The ARM7TDMI performs specific steps when handling exceptions.
Entering an exception
When handling an exception, ARM7TDMI does this:
1Preserves the address of the next instruction in the appropriate Link register.
–If the exception has been entered from the ARM state, the address of the
next instruction is copied into the Link register. The address is either
current
"Exception entry/exit by exception type" on page 38.)
–If the exception has been entered from Thumb state, the value written into
the Link register is the current PC offset by a value that lets the program
continue from the correct place on return from the exception.
The exception handler does not need to determine from which state the
exception was entered. With an SWI, for example,
returns to the next instruction whether executed in ARM or Thumb state.
PC + 4 or PC + 8, depending on the exception. (See Table 18:
Working with the CPU
MOVS PC, R14_SVC always
2Copies the CPSR into the appropriate SPSR.
3Forces the CPSR mode bits to a value that depends on the exception.
4Forces the PC to fetch the next instruction from the relevant exception vector.
5Sets the I (for IRQ interrupts) or F (for FIRQ interrupts) bits to disable interrupts
to prevent unmanageable nesting of exceptions.
Note:
If the processor is in Thumb state when an exception occurs, it
automatically switches into ARM state when the PC is loaded with the
exception vector address.
Exiting an exception
On completion, ARM7TDMI does this:
1Moves the Link register, minus the offset where appropriate, to the PC. The
offset value varies depending on the type of exception.
2Copies the SPSR back to the CPSR.
3Clears the interrupt disable flags, if they were set on entry.
www.digiembedded.com
37
Working with ARM exceptions
Note:
An explicit switch back to Thumb state is never needed. Restoring the
CPSR from the SPSR automatically sets the T bit to the value it held
immediately before the exception.
Exception entry/exit summary
In the variable
Return/
exception
BL
RESETNANANA4
UNDEF
SWI
ABORT P
ABORT D
IRQ
FIRQ
R14_x, R14 is the Link register; _x is the previous state of the processor.
Return instruction
MOV PC, R14
MOVS PC, R14_und
MOVS PC, R14_svc
SUBS PC, R14_abt, #4
SUBS PC, R14_abt, #8
SUBS PC, R14_irq, #4
SUBS PC, R14_firq, #4
Previous state
ARM R14_x
PC+4PC+21
PC+4PC+21
PC+4PC+21
PC+4PC+41
PC+8PC+83
PC+4PC+42
PC+4PC+42
Previous state
Thumb R14_x
Notes
38
Table 18: Exception entry/exit by exception type
Notes:
Where PC is the address of the BL/SWI/undefined instruction fetch that had the
1
prefetch abort. BL is a branch with link instruction.
2Where PC is the address of the instruction that was not executed since FIRQ or
IRQ took priority.
3Where PC is the address of the load or store instruction that generated the data
abort.
4The value saved in R14_svc upon reset is unpredictable.
NS7520 Hardware Reference, Rev G 9/2007
Hardware Interrupts
Two wires that go into the ARM7 CPU core can interrupt the processor:
IRQ (normal interrupt)
FIRQ (fast interrupt)
Although the interrupts are basically the same, FIRQ can interrupt IRQ.
FIRQ and IRQ lines
The FIRQ line adds a simple, two-tier priority scheme to the interrupt system. Most
sources of interrupts on the ARM7TDMI come from the IRQ line. The only potential
sources for FIRQ interrupts in the ARM7TDMI come from the two built-in timers and
the watchdog timer; there is no way to generate an FIRQ signal externally. These
timers are controlled by registers in the GEN module (see "Timer Control registers,"
beginning on page 70):
The built-in timers are controlled using the Timer Control registers
(’hFFB0 0010/18). The corresponding bit in the Interrupt Enable register must
be set for either IRQ or FIRQ to function.
Working with the CPU
The watchdog timer is controlled using the System Control register
(’hFFB0 0000).
Interrupt controller
Interrupts come from many different sources on the ARM7TDMI, and are managed by
the interrupt controller within the GEN module. Interrupts can be enabled or disabled
on a per-source basis using the Interrupt Enable register (’hFFB0 0030), which serves as
a mask for the interrupt sources and ultimately controls whether an interrupt from an
ARM7TDMI module can reach the IRQ line.
There are two read-only registers in the interrupt controller:
Interrupt Status Register Raw. Indicates the source of an ARM7TDMI
interrupt regardless of the state of the Interrupt Enable register. All
interrupts that are active in their respective module will be visible in the
Interrupt Status Register Raw.
www.digiembedded.com
39
Hardware Interrupts
Interrupt Status Register Enabled. Identifies the current state of all
interrupt sources that are enabled. This register is defined by performing a
logical AND of the Interrupt Status Register Raw and the Interrupt Enable
register. All bits in the Interrupt Status Register Enabled are ORed together.
The output is fed directly to the IRQ line, which then interrupts the ARM.
Interrupt sources
Each interrupt source is enabled and disabled within its respective module (and
submodule) within the NS7520 ASIC. The interrupt controller in the GEN module,
however, does not latch any of the interrupt signals.
Note:
Interrupt causes are latched in their respective submodule until cleared.
Interrupt sources include the following:
DMA interrupts. All [13] DMA channels, including the four sub-channels of
the Ethernet receiver, have five possible interrupt sources. See Chapter 8,
"DMA Module."
Ethernet receive and transmit interrupts. There are three interrupts for
Ethernet receive and four interrupts for Ethernet transmit; all interrupts
are part of the Ethernet General Status register. These interrupts are used
only when the Ethernet receiver and transmitter are in interrupt mode
rather than DMA mode. See Chapter 9, "Ethernet Module."
Serial interrupts. The Serial Channel Status register has many interrupt
sources. See Chapter 10, "Serial Controller Module."
Watchdog timer interrupts. When the watchdog timer expires, the system
can generate either an IRQ interrupt, an FIRQ interrupt, or a system reset.
The interrupt type and length of the timer are configured using the GEN
module System Control register. The watchdog is strobed using the Software
Service register. See Chapter 6, "GEN Module."
Timer 1 and Timer 2 interrupts. Two types of interrupts can be generated
by Timers 1 and 2. The interrupt type is configured in the Timer Control
register; the interrupt itself is contained within the Timer Status register.
See Chapter 6, "GEN Module."
40
NS7520 Hardware Reference, Rev G 9/2007
Working with the CPU
PORTC interrupts. The lower four pins of PORTC (C3, C2, C1, C0) on the
ARM7TDMI can be used as interrupt sources. Only the PORTC register
enables, configures, and services the interrupts. See Chapter 6, "GEN
Module."
www.digiembedded.com
41
Hardware Interrupts
42
NS7520 Hardware Reference, Rev G 9/2007
BBus Module
BBus Module
CHAPTER 4
This chapter describes the BBus module, which provides the data path between
Address and multiplexing logic that supports the data flow through the
NS7520.
Central arbiter for all NS7520 bus masters.
Internal register decoding for all addressable modules.
www.digiembedded.com
43
BBus masters and slaves
BBus masters and slaves
The BBus module consists of bus master and bus slave modules. The BBus state
machine allows each bus master to control the bus in a round-robin manner. If a bus
master does not require the bus resources when its turn comes around, that bus is
skipped until the next round-robin slot. Each potential bus master presents the BBus
with request and attribute signals. Once mastership is granted, the targeted device is
selected.
Table 19 illustrates bus master and slave modules.
ModuleMasterSlave
CPU moduleYY
BUS moduleYY
EFE moduleY
DMA moduleYY
GEN moduleY
MEM moduleY
SER moduleY
Table 19: BBus masters and slaves
Cycles and BBus arbitration
During a normal cycle, each bus master cycle is allowed only one read/write cycle if
another bus master is waiting. There are two exceptions to this rule: burst
transactions and read-modify-write transactions.
In a burst transaction, the master can perform more than one read or write cycle. In
a read-modify-write transaction, the bus master performs one read and write cycle to
the same location.
44
NS7520 Hardware Reference, Rev G 9/2007
Address decoding
The CPU address map is divided to allow access to the internal modules and external
resources routed through the internal peripherals. Each slave module is given a small
portion of the system address map for configuration and status.
Table 20 defines how the address is decoded to allow access to slave modules or the
BUS module (external resources).
Address rangeModule
0000 0000–FF6F FFFFBUS module and external memory
FF80 0000–FF8F FFFFEFE module
FF90 0000–FF9F FFFFDMA module
FFB0 0000–FFBF FFFFGEN module
FFC0 0000–FFCF FFFFMEM module
FFD0 0000–FFDF FFFFSER module
Table 20: BBus address decoding
BBus Module
All resources defined in this manner are addressed using the upper memory
addresses. Each internal module is given 1 Mbyte of address space for its own internal
decoding. Each module defines its own specific register map.
The BBus module does not allow access to any internal registers unless the
CPU_SUPV
signal is active, which indicates that firmware is executing in supervisor mode. The
System Control register provides an override signal (the USER bit in the GEN module
System Control register) to allow access to internal registers in user mode.
www.digiembedded.com
45
Address decoding
46
NS7520 Hardware Reference, Rev G 9/2007
SYS Module
SYS Module
CHAPTER 5
The SYS module provides the NS7520 with its system clock (SYS_CLK) and system
(SYS_RESET) resources.
reset
www.digiembedded.com
47
Signal description
Signal description
The system control signals determine the basic operation of the chip:
Signal mnemonicSignal nameDescription
{XTALA1, XTALA2}Clock sourceOperate in one of two ways:
{PLLVDD, PLLVSS}PLL powerProvide an isolated power supply for the PLL.
RESET_Chip reset Active low signal asserted to initiate a hardware
The signals are affixed with a 10-20 MHz
parallel mode quartz crystal or crystal
oscillator and the appropriate components
per the component manufacturer.
XTALA1 is driven with a clock signal and
XTALA2 is left open.
reset of the chip.
{TDI, TDO, TNS, TRST_,
TCK}
{PLLTEST_, BISTEN_,
SCANEN_}
JTAG support
The NS7520 provides full support for 1149.1 JTAG boundary scan testing. All NS7520
pins can be controlled using the JTAG interface port. The JTAG interface provides
access to the ARM7TDMI debug module when the appropriate combination of PLLTST_,
BISTEN_, and SCANEN_ are selected (see "External oscillator mode hardware
configuration," beginning on page 50).
ARM debug
The ARM7TDMI core uses a JTAG TAP controller that shares pins with the TAP
controller used for 1149.1 JTAG boundary scan testing. To enable the ARM7TDMI TAP
JTAG interfaceProvide a JTAG interface for the chip. This
interface is used for both boundary scan and ICE
control of the internal processor.
Chip modeEncoded to determine the chip mode.
48
NS7520 Hardware Reference, Rev G 9/2007
controller, {PLLTST_, BISTEN_, and SCANEN_} must be set as shown in "External oscillator
mode hardware configuration," beginning on page 50.
System clock generation (NS7520 clock module)
The NS7520 clock module creates the BCLK and FXTAL signals. Both signals are used
internally, but BCLK can also be accessed at ball A6 by setting the BCLKD field in the
System Control register to 0 (see "System Control register," beginning on page 63).
BCLK functions as the system clock and provides the majority of the
NS7520’s timing.
FXTAL provides the timing for the DRAM refresh counter, can be selected
instead of BCLK to provide timing for the watchdog timer, the two internal
timers, and the Serial module.
External oscillator vs. internal PLL circuit
SYS Module
The clock module uses either an external oscillator or the internal PLL circuit to
produce the BCLK and FXTAL signals. When using an external oscillator, the minimum
high/low time on XTALA1 is 4.5ns.
The PLLTST, BISTEN, and SCANEN signals work together to choose between using the
external oscillator or the internal PLL circuit in the boundary scan or JTAG debugger
modes, as shown:
PLLTSTBISTENSCANENFUNCTION
000N/A
001N/A
010N/A
011External oscillator, boundary scan
100NA (See Figure 5.)
101N/A
110PLL, JTAG debugger
111External oscillator, JTAG debugger
www.digiembedded.com
49
Using the external oscillator
PLL
circuit
SCANENPLLTSTBISTEN
External
crystal
External
oscillator
A[8:0]
PLL Settings reg
PLL Control reg
/5
FXTAL
BCLK
NS7520 clock module block diagram
This diagram provides an overview of the clock module.
Using the external oscillator
The NS7520 can use an external oscillator to generate the BCLK and FXTAL signals. In
this type of configuration, the BCLK frequency is equal to the oscillator input
frequency. The FXTAL frequency is equal to the oscillator input frequency divided by
five. For example, with a 55MHz oscillator, BCLK would be 55 MHZ and FXTAL would
be 11MHz.
External oscillator mode hardware configuration
50
Note:
Using an external oscillator with PLL enabled is not advantageous, due to
the PLL input limitation of 10MHz to 20MHz. The oscillator needs to be the
same frequency as the crystal. Using a clock source greater than 20MHz
would result in the PLL running outside its operating range.
The external oscillator’s output is connected to the XTALA1 input through a 100
resistor. XTALA2 is an output and is left open.
NS7520 Hardware Reference, Rev G 9/2007
SYS Module
XTALA1 (K14)
XTALA2 (K12)
PLLTST(N15)
BISTEN (M15)
SCANEN (L13)
PLLVDD (L15)
PLLVSS (L12)
BCLK
FXTAL
Oscillator
3.3V
1.5V
Tie high to use the
JTAG debugger
Connect to ground
to use boundary
scan testing
100 ohm
The clock module has two power pins: PLLVDD and PLLVSS.
PLLVDD is connected to 1.5 volts
PLLVSS is connected to ground
The PLLTST* input is connected to ground to use boundary scan testing. It is
connected to 3.3 volts through a 10K resistor to use the JTAG debugger.
The BISTEN input is tied to 3.3 volts through a 10K resistor.
The SCANEN input is tied to 3.3 volts through a 10K resistor.
This diagram shows the hardware configuration:
Using the PLL circuit
The NS7520 can use its PLL external oscillator to generate the BCLK and FXTAL
signals. In this configuration, BCLK can be set to several values, in increments of 1/4
the crystal frequency. FXTAL us always the crystal frequency divided by five.
www.digiembedded.com
51
Using the PLL circuit
PLL mode hardware configuration
Figure 5, "PLL mode hardware configuration," on page 53, shows how the crystal is
connected to the XTALA1 and XTALA2 inputs.
When the clock module is configured to use the PLL, the power to the
module must be cleaner than when using an external oscillator.
PLLVDD must be connected to 1.5V through a ferrite bead and bypassed with
a 100nF capacitor placed close to ball L15.
PLLVSS is connected to ground.
The PLLTST* input is pulled high to 3.3V through a 10K resistor. A two
position jumper Is used to GND it for boundary scan mode only. The clock
speed will be equal to the XTALA1 frequency. For normal/debug mode this
jumper is removed.
The BISTEN* input is tied to 3.3 volts through a 10K resistor.
The SCANEN* input is pulled high to 3.3V through a 10K resistor. A two
position jumper is used to connect it to system reset through an inverter.
For normal/debug mode the jumper is in place.
52
Note:
If boundary scan is not used, no jumpers are required. System reset
through the inverter is directly connected to SCANEN*.
RESET* must have a rise time of 18nS from 0.8V to 2.0V. The MAX811 is in
this range. A RESET* source with a slow rise time can be used by using a
double inverter. The first inverter’s output connects to SCANEN* and to the
second inverter input. The second inverter’s output drives RESET*.
Address lines A[8:0] configure the PLL circuit on bootup. Note that the values on
address lines A7, A6, A5, A4, and A2 are inverted in the PLL Settings register (see
"Setting the PLL frequency," beginning on page 54).
NS7520 Hardware Reference, Rev G 9/2007
PLLVDD (L15)
PLLVSS (L12)
PLLTST (N15)
BISTEN (M15)
SCANEN (L13)
ND
FS
IS
BCLK
FXTAL
XTALA1 (K14)
XTALA2 (K12)
1.5V
A0
A1
A2
A3
A4
A5
A6
A7
A8
The NS7520 address
bus has internal
pullups.
2.7K pulldown
resistors can be
connected to the
address lines to
configure the PLL
settings at bootup.
10 K
3.3V
RESET* (A10)
MAX811 or other
power-on reset
circuit
10 K
3.3V
10 K
3.3V
Move jumpers here for
boundary scan mode
only.
Place jumpers here for
normal/debug mode.
SYS Module
Figure 5: PLL mode hardware configuration
www.digiembedded.com
53
Setting the PLL frequency
1312111098765432101514
31292827262524232221201918171630
Res erv ed
IS
Res er ve dFSND
Setting the PLL frequency
Three fields — IS (charge pump current), FS (output divider), and ND (PLL
multiplier) — in the PLL Settings register control the behavior of the PLL circuit. You
cannot write to the PLL Settings register directly, however; it is configured in one of
these ways:
1On bootup, the PLL Settings register is configured by reading the values on
address lines A[8:0]. The address lines have internal pullups. The normally high
values can be changed to 0 by connecting 2.7K pulldown resistors.
2The PLL Settings register is configured by writing to the PLL Control register.
Only the ND field can be reconfigured this way.
PLL Settings register: Setting the PLL frequency on bootup
The PLL Settings register, FFB0 0040, is initialized at bootup by reading address lines
A[8:0]. Only the ND field can be changed by writing a new bus speed to the PLLCNT
register in the PLL Control register.
BitsAccessMnemonicResetDescription
D31:09N/AReservedN/N/A
Table 21: PLL Settings register bit definition
54
NS7520 Hardware Reference, Rev G 9/2007
BitsAccessMnemonicResetDescription
SYS Module
D08:07Read
only
D06:05Read
only
D04:00Read
only
IS‘b10Charge pump current
Sets the PLL’s charge pump current.
The IS field defaults to binary ‘b10 when address lines
[8:7] are not pulled down on powerup. The IS value is
based on the value in the ND field.
(ND+1)IS
1–3‘b00
4–7‘b01
8–15‘b10
16–32‘b11
FS‘b00Output divider
Sets the PLL’s output divider.
The FS field defaults to ‘b00 when address lines [6:5] are
not pulled down on powerup. This is the correct setting
for all frequencies and should never be adjusted.
ND‘b01011PLL multiplier
Sets the PLL’s multiplier, which determines BCLK
frequency.
BCLK frequency is based on tis formula:
BCLK = (crystal/4) (ND+1)
The ND field defaults to ‘b01011 to produce 55MHz
(with a 18.432MHz crystal) when address lines A[4:0]
are not pulled down on powerup.
Table 21: PLL Settings register bit definition
The next table shows the 32 frequencies that can be produced with an 18.432MHz
crystal. A 0 on an address indicates that a 2.7K pulldown resistor must be connected
to that address line. The table shows the IS, FS, and ND fields, and the resulting value
in the PLL Settings register.
Digi guarantees that the NS7520B-1-C36 will work at all frequencies up to
1
36.9MHz.
2Digi guarantees that the NS7520B-1-C46 will work at all frequencies up to
46.1MHz.
3Digi guarantees that the Ns7520B-1-C55 will work at all frequencies up to
55.3MHz.
455.3MHz is the default frequency when address lines A[8:0] are not adjusted
with pulldown resistors.
PLL Control register: Setting the PLL frequency with the PLL Control register
With this method, the PLL Settings register is configured by writing to the PLL Control
register, FFB0 0008.
BitsAccessMnemonicResetDescription
D31:28N/AReservedN/N/A
D27:24R/WPLLCNT0x9SYS_CLK frequency
Writing to this field affects the PLL frequency. See the
discussion following this table.
D23:00N/AReservedN/AN/A
Table 22: PLL Control register bit definition
The PLL frequency can be changed by writing to the PLLCNT field in the PLL Control
register. At bootup, the default value in the PLLCNT field has no affect on the PLL
frequency. This is because the PLL frequency set on bootup is based on the state of
address lines A[8:0]. The value in the PLLCNT field must be rewritten to change the
www.digiembedded.com
57
Setting the PLL frequency
PLL frequency. The NS7520 resets whenever the PLLCNT field is changed, then starts
running at the new frequency dictated by the PLLCNT value. The readback value is
not valid until software has performed a write to this register.
When using a 18.432MHz crystal, the 4-bit value in the PLLCNT field produces
frequencies of 23MHz to 92.2MHz, in increments of 4.6MHz, by changing the IS and ND
fields in the PLL Settings register.
The FS field remains the same as configured on bootup.
The IS field is ‘b10 for all standard frequencies from 36.9MHz to 55.3MHz.
The ND field can be changed to 16 different values based on the PLLCNT.
The next table shows the 16 frequencies that can be produced by changing
the PLLCNT field in the PLL Control register.
MHzPLLCNTISND+1PLL Settings registerNotes
23.0001001010x00000084
27.6101001100x00000085
32.3201001110x00000086
58
36.9310010000x000000871
41.5410010010x00000108
46.1510010100x000001092
50.7610010110x0000010A
55.3710011000x0000010B3
59.9810011010x0000010C
64.5910011100x0000010D
69.1A10011110x0000010E
73.7B11100000x0000010F
78.3C11100010x00000110
82.9D11100100x00000111
87.6E11100110x00000112
92.2F11101000x00000113
Notes:
NS7520 Hardware Reference, Rev G 9/2007
1Digi guarantees that the NS7520B-1-C36 will work at all frequencies up to
36.9MHz.
2Digi guarantees that the NS7520B-1-C46 will work at all frequencies up to
46.1MHz.
3Digi guarantees that the Ns7520B-1-C55 will work at all frequencies up to
55.3MHz.
Reset circuit sources
There are three reset circuit sources: external, watchdog, and software.
External reset. Powerup reset is initiated when the RESET_ input is
asserted low when power is applied. RESET_ should be driven low for at
least 40ms after power has reached safe operating levels, to allow external
crystals to start up. At other times, RESET_ must be one microsecond
minimum.
SYS Module
Watchdog reset. The watchdog reset is synchronous to SYS_CLK. A
hardware reset condition is triggered when the signal transitions from
active to inactive state.
Software reset. The CPU can also trigger a software reset by writing ‘h123
and ‘h321 to the Software Service register (see "Software Service register,"
beginning on page 69). Unless otherwise noted, configuration registers are
not reset by a software reset. When a software reset is triggered, the
appropriate modules are reset for a total of 16
NS7520 bootstrap initialization
Many internal NS7520 features are configured when the RESET pin is asserted. The
address bus configures the appropriate control register bits at powerup. (See also
"External oscillator mode hardware configuration," beginning on page 50.)
The initial operating bus speed must be selected by adding pulldown to
the address lines that preset the ND value (ADDR[4:0]).
’h3ff
60
NS7520 Hardware Reference, Rev G 9/2007
GEN Module
GEN Module
CHAPTER 6
The GEN module provides the NS7520 with its main system control functions, as well
as the following:
Tw o p r o g r am m a b l e t i mers with interrupt
One programmable bus-error timer
One programmable watchdog timer
Two 8-bit programmable general-purpose I/O ports
www.digiembedded.com
61
Module configuration
Module configuration
The GEN module is configured as shown:
AddressRegister
FFB0 0000System Control register
FFB0 0004System Status register
FFB0 000CSoftware Service register
FFB0 0010Timer 1 Control register
FFB0 0014Timer 1 Status register
FFB0 0018Timer 2 Control register
FFB0 001CTimer 2 Status register
FFB0 0020PORTA register
FFB0 0028PORTC register
FFB0 0030Interrupt Enable Register 1
FFB0 0034Interrupt Enable Register 1–Set
FFB0 0038Interrupt Enable Register 1–Clear
FFB0 0034Interrupt Status Register 1–Enabled
FFB0 0038Interrupt Status Register–Raw
Table 23: GEN module address configuration
GEN module hardware initialization
Many internal NS7520 configuration features are application-specific and need to be
configured at powerup before the CPU begins executing bootup code. See "NS7520
bootstrap initialization" on page 59.
62
NS7520 Hardware Reference, Rev G 9/2007
GEN module registers
1312111098765432101514
31292827262524232221201918171630
BCLKDSWESWRISW TN/ ABMEBM T
LEND-
IAN
Res er ve d
Res er ve d
USER BUSER Rsvd
DMA
TST
TEA
LAST
MIS
ALIGN
Res erv ed
CPU
DIS
DMA
RST
BSYNCReserved
All registers are 32 bits unless otherwise noted.
System Control register
Address: FFB0 0000
General information
All bits in the System Control register are active high unless an underscore (_)
appears in the signal name; the underscore indicates active low.
GEN Module
Register bit assignment
BitsAccessMnemonicResetDescription
D31R/WLENDIAN
ADDR27
Configure chip to run in Little Endian mode
Controls the Endian configuration for the NS7520.
1Configures the chip to operate in Little Endian mode
0 Configures the chip for Big Endian mode
D30:29N/AReservedN/AInitialized to and always read as 10 (full speed).
D28R/WBCLKD0BCLK output disable
0BCLK output enabled
1BCLK output forced to LOW state
Shuts down the operation of the BCLK signal. Turning off
the BCLK signal minimizes electro-magnetic interference
(EMI) when BCLK is not required for an application.
D21:20R/WSWT0Software watchdog timeout (in seconds)
D19N/AReservedN/AN/A
Set to 1 to enable the watchdog timer circuit.The
watchdog timer can be configured, using SWRI, to
generate an interrupt or reset condition if and when the
watchdog timer expires. Once SWE is set to 1, only a
hardware reset sets the bit back to 0.
Controls the action that occurs when the watchdog timer
expires:
00Software watchdog causes normal (IRQ) interrupt
01Software watchdog causes fast (FIRQ) interrupt
10Software watchdog causes reset
11Reserved
Controls the timeout period for the watchdog timer. The
timeout period is a function of F
00220/F
01222/F
10224/F
11225/F
XTALE
XTALE
XTALE
XTALE
XTALE
:
64
D18R/WBME0Bus monitor enable
0Disable bus monitor operation
1Enable bus monitor operation
Required to avoid a system lockup condition that can
occur when a bus master tries to address memory space
that is not decoded by any peripheral.
The bus monitor timer detects when a bus master is
accessing a peripheral and there is no transfer
acknowledge (TA_) response. When the bus monitor
timer expires, the current bus cycle is terminated
immediately and the current system bus master is issued a
data abort indicator.
Table 24: System Control register bit definition
NS7520 Hardware Reference, Rev G 9/2007
GEN Module
BitsAccessMnemonicResetDescription
D17:16R/WBMT0Bus monitor timer
Controls the timeout period for the bus monitor timer:
00128 BCLKs (bus clocks)
0164 BCLKS
1032 BCLKS
1116 BCLKS
The BMT field generally is set to its maximum value, but
can be set to a lower value to minimize the latency when
issuing a data abort signal. The BMT field needs to be set
to a value that is larger than the anticipated longest access
time for all peripherals.
D15R/WUSER0Enable access to internal chip registers in CPU user
mode
Controls whether applications operating in ARM user
mode (rather than supervisor mode) can access internal
registers within the NS7520.
If set to 0, and an application, operating in ARM user
mode tries to access (read or write) an internal
NS7520 register, the application receives a data
abort. This causes a transfer in control to the data
abort handler.
If set to 1, any application can access the NS7520
internal registers.
D14R/WBUSER~ADDR[
26]
Enable ARM CPU
Must be set to 0.
When reset, BUSER defaults to the value defined by
ADDR26 (see "NS7520 bootstrap initialization" on page
Resets the DMA controller subsystem. Also allows the
ARM processor direct access to the internal context RAM
found in the DMA controller.
When set to 1 (allow unrestricted access), the DMA
controller subsystem is held in reset and the ARM
processor can access all internal DMA context RAM.
This is useful for diagnostic purposes.
When set to 0 (test mode disabled), the DMA
controller subsystem operates normally. Only the bits
in the DMA Control register space can be accessed
by the ARM processor.
This bit can be read or written with a setting of 1 or 0, but
has no effect on chip functionality.
0Disable misaligned data transfer bus abort generation
1Generate a bus abort during a misaligned transfer
When this bit is set to 1, misaligned address transfers
cause a data abort to be issued to the offending bus master.
A misaligned address transfer is defined as a half word
access to an odd byte address boundary, or a full word
access to either a half word or byte address boundary.
This bit is useful during software debugging to detect
misaligned cycles.
66
D09:08N/AReservedN/AN/A
D07R/WCPUDIS
-ADDR26
CPU disable
0CPU operational
1CPU reset
Provides a mechanism to read back the bootstrap value of
ADDR26 (see "NS7520 bootstrap initialization" on page
59). If this bit is set to 1, the CPU is disabled.
D06R/WDMARST0DMA module reset
0DMA module operational
1DMA module (held in) reset
Provides a mechanism to issue a soft reset to the DMA
module without affecting any other modules.
Table 24: System Control register bit definition
NS7520 Hardware Reference, Rev G 9/2007
BitsAccessMnemonicResetDescription
D05:04R/WBSYNC0TA_ input synchronizer
Defines the level of synchronization performed within the
NS7520 for TA_ input:
001-stage synchronizer
011-stage synchronizer
102-stage synchronizer
11Do not use this setting
The NS7520 can process the TA_ input signal using a 1stage flip-flop synchronizer or a 2-stage synchronizer. A
1- or 2-stage synchronizer must be used when TA_ input
is asynchronous to the BCLK signal.
Note:The 2-stage synchronizer is preferable, as it
introduces one additional BCLK of latency in
the access cycle.
D03:00N/AReservedN/AN/A
Table 24: System Control register bit definition
GEN Module
www.digiembedded.com
67
GEN module registers
1312111098765432101514
31292827262524232221201918171630
SOFTREVEX TPLL
GEN_ID
Res erv ed
WDOG
Res er ve d
System Status register
Address: FFB0 0004
All bits in the System Status register, except EXT, WDOG, PLL, and SOFT, are loaded
during a hardware reset only. EXT, WDOG, PLL, and SOFT are loaded during any
reset. The GEN_ID value is not affected when an external jumper is changed, unless a
hardware reset is executed first.
Register bit assignment
BitsAccessMnemonicResetDescription
D31:24R/OREV
‘h29
NS7520 revision ID
Provides hardware identification of the NS7520 and its
revision.
Current NS7520 device and revision ID is:
REV field:
‘h29
D23R/CEXTN/ALast reset caused by external reset
When set to 1, indicates that the RESET_ pin triggered the
last hardware reset condition. This reset initializes internal
parameters as described in "NS7520 bootstrap
initialization" on page 59.
EXT is set/reset during every reset condition. Clear this bit
by writing
‘hF in bits 23:20.
Table 25: System Status register bit definition
68
NS7520 Hardware Reference, Rev G 9/2007
BitsAccessMnemonicResetDescription
D22R/CWDOGN/ALast reset caused by watchdog timer
When set to 1, indicates that a watchdog timeout occurred
and generated an internal hardware reset condition.
Note:Because the RESET_ pin is not asserted, this
reset does not initialize internal parameters as
described in "NS7520 bootstrap initialization"
on page 59.
WDOG is set/reset during every reset condition. Clear this
bit by writing
‘hF in bits 23:20.
D21R/CPLLN/ALast reset caused by PLL update
When set to 1, indicates that the PLL was updated and
required an internal hardware reset.
Note:When the software modifies the PLL settings
the RESET_ pin is not asserted, this reset does
not initialize internal parameters as described
in "NS7520 bootstrap initialization" on page
59.
PLL is set/reset during every reset condition. Clear this bit
by writing
‘hF in bits 23:20.
GEN Module
D20R/CSOFTN/ALast reset caused by software reset
D19:11N/AReservedN/AN/A
D10:00R/OGEN_ID
Table 25: System Status register bit definition
Software Service register
Address: FFB0 000C
ADDR19:
09
When set to 1, indicates that a soft reset was triggered by
software (see "Software Service register" on page 69).
Note:Because the RESET_ pin is not asserted, this
reset does not initialize internal parameters as
described in "NS7520 bootstrap initialization"
on page 59.
SOFT is set/reset during every reset condition. Clear this
bit by writing
‘hF in bits 23:20.
Product ID defined by external resistor jumpers
Defaults to the value defined by ADDR19:09 (see
"NS7520 bootstrap initialization" on page 59) during a
hardware reset.
www.digiembedded.com
69
GEN module registers
1312111098765432101514
31292827262524232221201918171630
SWSR
SWSR
The Software Service register (SWSR) acknowledges the system watchdog timer. To
do so, firmware must write
operations. There is no restriction on the time between the two operations, but the
operations must occur in the proper sequence with the proper data values.
The Software Service register can request a software reset of the NS7520 hardware.
Firmware must write
operations. There is no restriction on the time between the two operations, and the
two operations must occur in the proper sequence with the proper data values. The
processor must be in supervisor mode for the second operation.
Register bit assignment
‘h5A and ‘hA5 to the register using two separate write
‘h123 and ‘h321 to the register using two separate write
BitsAccessMnemonicResetDescription
D31:00WSWSR0Software Service register
Table 26: Software Service register bit definition
Timer Control registers
Address: FFB0 0010 / FFB0 0018
Timers 1 and 2 provide the CPU with programmable interval timer(s). The timers use
timing reference and an optional 9-bit prescaler or the system clock. Each
XTALE
NS7520 Hardware Reference, Rev G 9/2007
70
the F
timer provides a 27-bit programmable-down counter mechanism.
The CPU loads an initial count register (ITC) to define the timeout period. When the
current counter decrements to zero, the counter is reloaded. The reloading of the
timer can be programmed to generate an interrupt to the CPU. The CPU can read the
current count value (CTC) at any time.
These equations determine the timeout interval:
TIMEOUT = [8 * (TC + 1)] / F
XTALE
TCLK = 0; TPRE = 0
GEN Module
1312111098765432101514
31292827262524232221201918171630
TETIETIRO TPRE TCLKITC
ITC
TIMEOUT = [4096 * (TC + 1)] / F
TIMEOUT = (TC + 1) / F
SYSCLK
XTALE
Register bit definition
BitsAccessMnemonicResetDescription
D31R/WTE0Timer enable
1Allows the timer to operate.
0Resets and disables the timer.
The other fields in this register should be configured before
or during the same memory cycle in which TE is set to 1.
D30R/WTIE0Timer interrupt enable
When set to 1, allows the timer to interrupt the CPU. A
timer interrupt is generated when the hardware sets the TIP
bit in the Timer Status register (see "Timer Status registers"
on page 73).
TCLK = 0; TPRE = 1
TCLK = 1; TPRE = x
D29R/WTIRO0Timer interrupt mode
D28R/WTPRE0Timer prescaler
Table 27: Timer Control registers bit definition
0Normal interrupt
1Fast interrupt
Controls the type of interrupt the timer asserts to the CPU.
0Disable 9-bit prescaler
1Enable 9-bit prescaler
Determines whether the 9-bit prescaler will be used in
calculating the TIMEOUT parameter. The prescaler allows
for longer TIMEOUT values.
TPRE affects TIMEOUT only when F
XTALE
is used as a
time source.
www.digiembedded.com
71
GEN module registers
BitsAccessMnemonicResetDescription
D27R/WTCLK0Timer clock source
D26:00R/WITC0Initial timer count
Table 27: Timer Control registers bit definition
0Use F
1Use F
as timer clock source
XTALE
as timer clock source
SYSCLK
Selects the reference clock for the timer module.
Defines the TIMEOUT parameter for interrupt frequency.
The TIMEOUT period is a function of the F
XTALE.
72
NS7520 Hardware Reference, Rev G 9/2007
Timer Status registers
1312111098765432101514
31292827262524232221201918171630
Rsv dTIPReservedTCLKCTC
CTC
Address: FFB0 0014 / FFB0 001C
Register bit assignment
BitsAccessMnemonicResetDescription
D31N/AReservedN/AN/A
D30R/CTIP0Timer interrupt pending
GEN Module
Set to 1 when the timer is enabled and the CTC value
counts down to 0. TIP generates an interrupt to the CPU if
the TIE bit in the Timer Control register is set. Writing a 1
to the same bit position in the Timer Status register clears
the TIP bit.
Note:TIP is set immediately when the TE bit (in the
Timer Control register) is changed from 0 to 1.
An interrupt occurs immediately after TE
transitions from 0 to 1. If this initial interrupt
causes a problem in any specific application, the
software must be designed to ignore the first
interrupt after TE transitions from 0 to 1.
D29:27N/AReservedN/AN/A
D26:00RCTCOCurrent timer count
Table 28: Timer Status registers bit definition
PORTA Configuration register
Address: FFB0 0020
Each time the CTC field reaches zero, the TIP bit is set and
the CTC is reloaded with the value defined in the ITC field.
The CTC continues to count back down to zero.
www.digiembedded.com
73
GEN module registers
1312111098765432101514
31292827262524232221201918171630
AMODEADIR
ReservedADATA
The PORTA register configures the PORTA general-purpose input/output (GPIO) pins.
Each of the PORTA GPIO pins can be individually programmed — as general-purpose
input or output, or special function input or output — as applicable. Table 29
describes the PORTA register; Table 30 shows the different configurations for each
bit.
Register bit assignment
BitsAccessMnemonicResetDescription
D31:24R/WAMODE0PORTA mode configuration
0Selects GPIO mode
1Selects special function mode
Configures the individual PORTA pins. Each bit in the
AMODE field corresponds to one of the PORTA bits; D31
controls PORTA7, D30 controls PORTA6, and so on.
74
D23:16R/WADIR0PORTA data direction
0Selects input mode
1Selects output mode
Configures the individual PORTA pins. Each bit in the
ADIR field corresponds to one of the PORTA bits; D23
controls PORTA7, D22 controls PORTA6, and so on.
D15:08N/AReservedN/AN/A
Table 29: PORTA register bit definition
NS7520 Hardware Reference, Rev G 9/2007
GEN Module
BitsAccessMnemonicResetDescription
D07:00R/WADATA0PORTA data register
Used when a PORTA bit is configured to operate in GPIO
mode.
Reading the ADATA field provides the current state
of the GPIO signal, regardless of its configuration
mode.
Writing the ADATA field defines the current state of
the GPIO signal when the signal is defined to operate
in GPIO output mode.
Writing the ADATA field when configured in GPIO
input mode or special function mode has no effect.
Each bit in the ADATA field corresponds to one of the
PORTA bits; D07 controls PORTA7, D06 controls
PORTA6, and so on.
Table 29: PORTA register bit definition
PORTA Configuration
The ADIR and AMODE bits together provide independent configuration of each pin.
Each column in this table denotes one of the possible configurations for each bit. If
there is no entry in one of the columns (for example,
PORTA7>AMODE=1>ADIR=0), the bit
cannot be used in that configuration.
PORTA
bit
PORTA7GPIO INGPIO OUTSER1_TXD
PORTA6GPIO INGPIO OUTDREQ1_INSER1_DTR_
PORTA5GPIO INGPIO OUTSER1_RTS_
PORTA4GPIO INGPIO OUTSER1_RI_/SER1_RXC
PORTA3GPIO INGPIO OUTSER1_RXDDACK1_OUT
PORTA2GPIO INGPIO OUTSER1_DSR_AMUX
AMODE=0AMODE=1
ADIR=0ADIR=1ADIR=0ADIR=1
SER1_SPI_M_CLK
IN/SER1_SPI_S_CLK IN
OUT/SER1_OUT1/
SER1_RXC OUT
Table 30: PORTA configuration
www.digiembedded.com
75
GEN module registers
PORTA
bit
PORTA1GPIO INGPIO OUTSER1_CTSDONE1_OUT_
PORTA0GPIO INGPIO OUTSER1_SPI_S_ENABLE_
AMODE=0AMODE=1
ADIR=0ADIR=1ADIR=0ADIR=1
SER1_SPI_M_ENABLE_
IN/SER1_DCD_/
DONE1_IN_/
SER1_TXC IN
OUT/SER1_OUT2
Table 30: PORTA configuration
Inputs
An input that provides one or more input signals to different blocks in the chip is
always connected to those blocks. The target block must be configured to use the
input; similarly, those blocks that should not use the input must be configured not to
use it.
Outputs
Configuring a pin for an output function also enables the tri-state driver for that pin.
There should be no external driver on a pin configured for output.
READBACK
When reading the ADATA field, the data read depends on how the pin is configured:
76
Configured as GPIO output. Reads data from the register whose data drives
the pin. This can, for example, mask a short circuit on the output pin.
All other configurations. Reads the state of the pin.
PORTA4
When PORTA4 is configured with
Channel A determines the function
AMODE[4]=1:ADIR[4]=1, the configuration of Serial
SER1_SPI_M_CLK_OUT, SER1_OUT1, SER1_RXC_OUT.
PORTA2
The memory module configures the AMUX output signal. The AMUX configuration
overrides the AMODE, ADIR, and ADATA fields.
PORTA0
When PORTA0 is configured with
Channel A determines the function
NS7520 Hardware Reference, Rev G 9/2007
AMODE[0]=1:ADIR[0]=1, the configuration of Serial
SER1_SPI_M_ENABLE_A_ OUT or SER1_OUT2.
PORTC Configuration register
1312111098765432101514
31292827262524232221201918171630
CMODECDIR
CSFCDA TA
Address: FFB0 0028
The PORTC register configures the PORTC general-purpose input/output (GPIO pins).
Each of the PORTC GPIO pins can be individually programmed — as general-purpose
input or output, or special function input or output — as applicable. Table 31
describes the PORTC register; Table 32 shows the different configurations for each
bit.
Register bit assignment
GEN Module
BitsAccessMnemonicResetDescription
D31:24R/WCMODE‘h10PORTC mode
Configures the individual PORTC pins. Each bit in the
CMODE field corresponds to one of the PORTC bits; D31
controls PORTC7, D30 controls PORTC6, and so on.
D23:16R/WCDIR‘h10PORTC data direction
Configures the individual PORTC pins. Each bit in the
CDIR field corresponds to one of the PORTC bits; D23
controls PORTC7, D22 controls PORTC6, and so on.
D15:08R/WCSF0PORTC special function
Configures the individual PORTC pins. Each bit in the CSF
field correspond to one of the PORTC bits. D15 controls
PORTC7, D14 controls PORTC6, and so on.
Table 31: PORTC register bit definition
www.digiembedded.com
77
GEN module registers
BitsAccessMnemonicResetDescription
D07:00R/WCDATA0PORTC data register
Table 31: PORTC register bit definition
PORTC configuration
The CSF, CDIR, and CMODE bits together provide independent configuration of each
pin. Each column in this table denotes one of the possible configurations for each bit.
If there is no entry in one of the columns (for example,
bit cannot be used in that configuration.
Used when a PORTC bit is configured to operate in GPIO
mode.
Reading the CDATA field provides the current state of
the GPIO signal, regardless of its configuration mode.
Writing the CDATA field defines the current state of
the GPIO signal when the signal is defined to operate
in GPIO output mode.
Writing the CDATA field when configured in GPIO
input mode or special function mode has no effect.
Each bit in the CDATA field corresponds to one of the
PORTC bits; D07 controls PORTC7, D06 controls
PORTC6, and so on.
PORTC7>CMODE=1>CDIR=0), the
78
PORTC
bit
PORTC7GPIO INGPIO OUTIRQOUT_
PORTC6GPIO INGPIO OUTDTR_
PORTC5GPIO INGPIO OUTRTS_
PORTC4GPIO INGPIO OUTRIB_RESET_OUT_
PORTC3GPIO INGPIO OUTLEVELIRQ3=CDIR3
PORTC2GPIO INGPIO OUTLEVELIRQ2=CDIR2
PORTC1GPIO INGPIO OUTLEVELIRQ1=CDIR1
CMODE=0CMODE=1
CDIR=0CDIR=1CDIR=0CDIR=1
CSF=0
Table 32: PORTC configuration
NS7520 Hardware Reference, Rev G 9/2007
GEN Module
PORTC
bit
PORTC0GPIO INGPIO OUTLEVELIRQ0=CDIR0
PORTC
bit
PORTC7SER2_TXD
PORTC6DREQ2_INSER2_DTR_
PORTC5REJECT_SER2_RTS_
PORTC4SER2_SPI_S_CLK IN/
PORTC3SER2_RXDDACK2_OUT
PORTC2SER2_DSR_RPSF_
PORTC1SER2_CTS_DONE2_OUT_
PORTC0DONE2_IN_SER2_SPI_S_ENABLE_
CMODE=0CMODE=1
CDIR=0CDIR=1CDIR=0CDIR=1
CMODE=0CMODE=1
CDIR=0CDIR=1CDIR=0CDIR=1
CSF=0
CSF=1
SER2_RXC IN
IN/SER2_DCD_/
SER2_TXC IN
SER2_SPI_M_CLK
OUT/SER2_TXC OUT/
SER2_OUT1
SER2_SPI_M_ENABLE
_OUT/SER2_OUT2
Table 32: PORTC configuration
Inputs
An input that provides one or more input signals to different blocks in the chip is
always connected to those blocks. The target block must be configured to use the
input; similarly, those blocks that should not use the input must be configured not to
use it.
Outputs
Configuring a pin for an output function also enables the tri-state driver for that pin.
There should be no external driver on a pin configured for output.
www.digiembedded.com
79
Interrupts
READBACK
When reading the CDATA field, the data read depends on how the pin is configured:
Configured as GPIO output. Reads data from the register whose data drives
the pin. This can, for example, mask a short circuit on the output pin.
All other configurations. Reads the state of the pin.
PORTC4
When PORTC is configured with
Serial Channel B determines the function
SER2_OUT1. Following external reset, CSF[4]=0:CMODE[4]=1:CDIR[4]=1; that is, set to drive
CSF[4]=1:CMODE[4]=1:CDIR[4]=1, the configuration of
SER2_SPI_M_CLK_OUT, SER2_TXC_OUT,or
RESET_ output.
PORTC0
When PORTC0 is configured with
Serial Channel B determines the function
CSF[0]=1:CMODE[0]=1:CDIR[0]=1, the configuration of
SER2_SPI_M_ENABLE_OUT or SER2_OUT2.
PORTC[3:0]
These pins can be programmed individually to generate level-sensitive interrupts.
Level-sensitive interrupts generate an interrupt when the input signal matches the
state of the corresponding DIR bit. The interrupt condition persists until the input
signal changes state or the configuration is changed.
Interrupts
80
There are two wires that go to the CPU core and interrupt the processor:
IRQ. Normal interrupt.
FIRQ. Fast interrupt.
FIRQ has higher priority than IRQ, providing a simple two-tier priority scheme to the
interrupt system. Most sources of interrupts on the NS7520 come from the IRQ line.
FIRQ interrupt sources are the three built-in timers and the watchdog timer,
controlled by the Timer 1/2 and Status registers and the System Control register,
respectively.
NS7520 Hardware Reference, Rev G 9/2007
Interrupts come from different sources on the chip and are managed with Interrupt
1312111098765432101514
31292827262524232221201918171630
DMA 1 -13Rsv d
ENET
1 RX
ENET
1 TX
SER
1 RX
SER
1 TX
SER
2 RX
SER
2 TX
Res erv edM A C1
Watch
Dog
Timer1Timer2PORTC3PORTC2PORTC1PORT
C0
Control registers. Interrupts can be enabled/disabled on a per-source basis using the
Interrupt Enable registers. These registers serve as masks for the different interrupt
sources.
Interrupt controller registers
Address: FFB0 0030 / 0034 / 0038
There are five pairs of registers in the interrupt controller:
Interrupt Enable register. A read/write location for reading and writing all
interrupt enable bits as a typical register.
Interrupt Enable Set/Interrupt Status Enabled registers. Perform two
different functions depending on whether a register is read or written:
–When read, the register indicates the current state of all enabled
interrupts.
–When written, a 1 in a bit position sets that interrupt enable; a 0 in a bit
position has no effect.
GEN Module
Interrupt Enable Clear/Interrupt Status Raw registers. Perform two
different functions depending on whether a register is read or written:
–When read, the register indicates the current state of all interrupts
regardless of the state of the enables.
–When written, a 1 in a bit position clears that interrupt enable; a 0 in a bit
position has no effect.
Register bit assignment
All registers use the same 32-bit layout.
www.digiembedded.com
81
Interrupts
BitsAccessMnemonicResetDescription
D31:19R/WDMA1–130The DMA1 through DMA13 bit positions correspond to
interrupts sourced by DMA channel 1 through 13.
D18N/AReservedN/AN/A
D17R/WENET1RX0The ENET1RX bit position corresponds to an interrupt
sourced by the Ethernet receiver.
D16R/WENET1TX0The ENET1TX bit position corresponds to an interrupt
sourced by the Ethernet transmitter.
D15R/WSER 1 RX0The SER 1 RX bit position corresponds to an interrupt
sourced by the Serial Channel A receiver.
D14R/WSER 1 TX0The SER 1 TX bit position corresponds to an interrupt
sourced by the Serial Channel A transmitter.
D13R/WSER 2 RX0The SER 2 RX bit position corresponds to an interrupt
sourced by the Serial Channel B receiver.
D12R/WSER 2 TX0The SER 2 TX bit position corresponds to an interrupt
sourced by the Serial Channel B transmitter.
D11:08N/AReservedN/AN/A
82
D07R/WMAC10The MAC1 bit position corresponds to an interrupt sourced
by the Ethernet MAC 1.
D06R/W
WATCHDOG
0The WATCHDOG bit position corresponds to an interrupt
condition sourced by the watchdog timer.
D05R/WTIMER 10The TIMER 1 bit position corresponds to an interrupt
condition sourced by the TIMER 1 module.
D04R/WTIMER 20The TIMER 2 bit position corresponds to an interrupt
condition sourced by the TIMER 2 module.
D03R/WPORTC30The PORTC3 bit position corresponds to an interrupt
condition sourced by the PORTC3 input.
D02R/WPORTC20The PORTC2 bit position corresponds to an interrupt
condition sourced by the PORTC2 input.
D01R/WPORTC10The PORTC1 bit position corresponds to an interrupt
condition sourced by the PORTC1 input.
D00R/WPORTC00The PORTC0 bit position corresponds to an interrupt
condition sourced by the PORTC0 input.
Table 33: Interrupt Enable registers bit definition
NS7520 Hardware Reference, Rev G 9/2007
GEN Module
www.digiembedded.com
83
Interrupts
84
NS7520 Hardware Reference, Rev G 9/2007
Memory Controller Module
Memory Controller Module
CHAPTER 7
The memory (MEM) module provides a glueless interface to external memory
devices such as flash, DRAM, and EEPROM. The memory controller contains an
integrated DRAM controller, and supports five unique chip select configurations.
www.digiembedded.com
85
About the MEM module
About the MEM module
The MEM module monitors the BBus interface for access to the BUS module; that is,
any access not addressing internal resources. If the BBus for the access corresponds
to a Base Address register in the MEM module, the module provides the memory
access signals and responds to the BBus with the appropriate completion signal.
The MEM module can be configured to interface with FP, EDO, or synchronous DRAM
(SDRAM), although the NS7520 cannot interface with more than one device type at a
time.
MEM module hardware initialization
Many NS7520 configuration features are application-specific and need to be
configured at powerup before the CPU boots. See "NS7520 bootstrap initialization" on
page 59.
PORTA2, the DRAM address multiplexer, provides for an external address mux for
SDRAM, FP DRAM, or EDO DRAM.
Pin configuration
The NS7520 uses several pins to support SRAM and DRAM devices. The MEM module
controls the following signals: ADDR[27:0], CS[4:0], CAS[3:0], WE_ and OE_. Table 34
shows how MEM module pins are configured for different memory types.
Table 34: MEM module pin configuration by memory type
86
NS7520 Hardware Reference, Rev G 9/2007
Memory Controller Module
Chip select configured for SRAM. The MEM module controls the CS[4:0]_,
OE_, and WE_ signals. The address from the current bus master is driven
directly to A[27:0].
Chip select configured for FP or EDO DRAM. The MEM module can be
programmed to drive a multiplexed address on A[13:0], and drives the
remainder of the address from the current bus master to A[27:14].
–The CS[4:0]_ signals provide the RAS_ function.
–The CAS_ signals provide the CAS_ function.
–The OE_ and WE_ signals provide the output and write enables,
respectively.
Chip select configured for SDRAM. The MEM module can be programmed to
drive a multiplexed address on A[13:0], and drives the remainder of the
address from the current bus master to A[27:14].
–The CS[4:0]_ signals provide the CS[4:0]_ function.
–The CAS3_ signal provides the RAS_ function.
–The CAS2 function provides the CAS_ function.
–The CAS1_ signal provides the WE_ function.
–The CAS0_ signal provides the A10/AP multiplexed signal. The A10/AP
multiplexes between the A10 pin for the DRAM and the auto precharge
indicator. The CAS0_ signal must always be connected to the SDRAM A10
pin.
SDRAMs require the DQM function. The BE[3:0]_ signals provides the DQM
function.
MEM module configuration
The MEM module is configured as shown in Table 35. Each chip select contains an
identical set of three registers that appear on a boundary of
Each register is 32 bits unless otherwise noted.
’h10 bytes.
www.digiembedded.com
87
MEM module configuration
AddressMnemonicRegister
FFC0 0000MMCRMemory Module Configuration register
FFC0 0010BAR0Chip Select 0 Base Address register
FFC0 0014OR0AChip Select 0 Option Register A
FFC0 0018OR0BChip Select 0 Option Register B
FFC0 0020BAR1Chip Select 1 Base Address register
FFC0 0024OR1AChip Select 1 Option Register A
FFC0 0028OR1BChip Select 1 Option Register B
FFC0 0030BAR2Chip Select 2 Base Address register
FFC0 0034OR2AChip Select 2 Option Register A
FFC0 0038OR2BChip Select 2 Option Register B
FFC0 0040BAR3Chip Select 3 Base Address register
FFC0 0044OR3AChip Select 3 Option Register A
FFC0 0048OR3BChip Select 3 Option Register B
FFC0 0050BAR4Chip Select 4 Base Address register
FFC0 0054OR4AChip Select 4 Option Register A
FFC0 0058OR4BChip Select 4 Option Register B
Table 35: Memory controller register map
Setting the chip select address range
Each chip select should be configured to respond to a different portion of the
memory map. Do this by setting the appropriate fields in the Chip Select Base Address
and Chip Select Option registers.
The BASE field in the Chip Select Base Address register defines the starting address of
the chip select address space. The MASK field identifies those address bits, from
A[31:12], that are used in the address decoding function.
A 1 in the MASK field indicates that the associated address bit is to be used
in the decoding process.
88
NS7520 Hardware Reference, Rev G 9/2007
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.