NS9215
Hardware Reference
90000847_C
Release date: 10 April 2008
DSP..............................................................................................105
First-level descriptor bit assignments: Interpreting first level descriptor bits
[1:0]..................................................................................111
8
Hardware Reference NS9215
10
Hardware Reference NS9215
12
Hardware Reference NS9215
C h a p t e r 6 : E t h e r n e t C o m m u n i c a t i o n M o d u l e . . . . . . . . . . . . . . . . . . . . . . 261
Interrupts ......................................................................................273
Resets ..........................................................................................274
14
Hardware Reference NS9215
16
Hardware Reference NS9215
C h a p t e r 8 : A E S D a t a E n c r y p t i o n / D e c r y p t i o n M o d u l e . . . . . . . . . . . 355
18
Hardware Reference NS9215
C h a p t e r 1 0 : S e r i a l C o n t r o l M o d u l e : U A R T . . . . . . . . . . . . . . . . . . . . . . . . . 385
20
Hardware Reference NS9215
C h a p t e r 1 1 : S e r i a l C o n t r o l M o d u l e : H D L C . . . . . . . . . . . . . . . . . . . . . . . . . 415
Clocking ....................................................................................... 416
C h a p t e r 1 2 : S e r i a l C o n t r o l M o d u l e : S P I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
www.digiembedded.com
21
C h a p t e r 1 6 : T i m i n g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
2
I C timing ...............................................................................504
24
Hardware Reference NS9215
C h a p t e r 1 7 : P a c k a g i n g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
C h a p t e r 1 8 : C h a n g e l o g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
Revision B ..................................................................................... 517
Revision C ..................................................................................... 517
www.digiembedded.com
25
26
Hardware Reference NS9215
Pinout (265)
C
H
A
P
T
E
R
1
The NS9215 offers a connection to a 10/100 Ethernet network, as well as a
glueless connection to SDRAM, PC100 DIMM, flash, EEPROM, and SRAM memories,
and an external bus expansion module. It includes four multi-function serial ports,
one I2C channel, 12-bit Analog to Digital converter, battery backed real time clock
and an AES data encryption/decryption module. The NS215 provides up to 108
general purpose I/O (GPIO) pins and configurable power management with sleep
mode.
The Legend
Heading
Pin
Description
Pin number assigned for a specific I/O signal
Signal
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.
_n is the signal name indicates that this signal is active is active low.
U/D
U or D indicates whether the pin has an internal pullup resistor or a pulldown resistor:
U
D
Pullup (input current source)
Pulldown (input current sink)
If no value is listed, that pin has neither an internal pullup nor pulldown resistor.
The type of signal: input (I), output (O), input/output (I/O), or power (P).
The output drive of an output buffer. The NS9215 uses one of two drivers:
I/O
OD (mA)
ꢀ
ꢀ
2 mA
4 mA
27
P I N O U T ( 26 5 )
Memory bus interface
Memory bus interface
Pin
Signal
U/D I/O
OD
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
Description
B9
clk_out[0]
O
O
SDRAM bus clock
A15
P12
T14
U15
R12
T13
U14
T12
U13
R11
T11
U12
T10
R9
clk_out[1]
SDRAM bus clock
a
addr[27] / gpio_a[3]
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
O
Address bus, Endian
Address bus, SPI boot
Address bus
addr[26] / gpio_a[2]a.
addr[25] / gpio_a[1]
addr[24] / gpio_a[0]
Address bus, Boot width [1]
Address bus, Boot width [0]
Address bus
addr[23]
addr[22]
addr[21]
addr[20]
addr[19]
addr[18]
addr[17]
addr[16]
addr[15]
addr[14]
addr[13]
addr[12]
addr[11]
addr[10]
addr[9]
O
Address bus
O
Address bus,
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
Address bus, GENID 10
Address bus, GENID 9
Address bus, GENID 8
Address bus, GENID 7
Address bus, GENID 6
Address bus, GENID 5
Address bus, GENID 4
Address bus, GENID 3
Address bus, GENID 2
Address bus, GENID 1
Address bus, GENID 0
Address bus
U11
U10
T9
U9
U8
T8
U7
addr[8]
T7
addr[7]
Address bus, PLL bypass
Address bus, PLL OD [1]
Address bus, PLL OD [0]
Address bus, PLL NR[4]
Address bus, PLL NR[3]
Address bus, PLL NR[2]
Address bus, PLL NR[1]
U6
addr[6]
T6
addr[5]
U5
addr[4]
M2
N1
addr[3]
addr[2]
L2
addr[1]
28
Hardware Reference NS9215
P I N O U T ( 26 5 )
Memory bus interface
Pin
M1
L1
K2
K1
J1
Signal
U/D I/O
OD
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
Description
Address bus, PLL NR[0]
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
Data bus
addr[0]
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
data[31]
data[30]
data[29]
data[28]
J2
data[27]
H1
G1
J3
data[26]
data[25]
data[24]
H2
F1
data[23]
data[22]
G2
H3
E1
F2
data[21]
data[20]
data[19]
data[18]
D1
E2
H4
G3
G4
G5
F3
data[17]
data[16]
b
data[15] / gpio[31]
data[14] / gpio[30]
data[13] / gpio[29]
data[12] / gpio[28]
data[11] / gpio[27]
data[10] / gpio[26]
data[9] / gpio[25]
data[8] / gpio[24]
data[7] / gpio[23]
data[6] / gpio[22]
data[5] / gpio[21]
data[4] / gpio[20]
data[3] / gpio[19]
data[2] / gpio[18]
data[1] / gpio[17]
data[0] / gpio[16]
F4
F5
C1
E4
D2
E3
B1
D4
C2
B2
D3
www.digiembedded.com
29
P I N O U T ( 26 5 )
Ethernet interface MAC
Pin
A10
B11
B10
A11
A9
A6
B7
Signal
U/D I/O
OD
4
Description
data_mask[3]
data_mask[2]
data_mask[1]
data_mask[0]
ns_ta_strb
rw_n
O
O
O
O
I
byte_enable data[31:24}
Byte enable data[23:16]
Byte enable data[15:08]
Byte enable data {07:00]
Slow peripheral transfer acknowledge
Transfer direction
4
4
4
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
clk_en[3]
clk_en[2]
clk_en[1]
clk_en[0]
cs[7]
SDRAM clock enable
SDRAM clock enable
SDRAM clock enable
SDRAM clock enable
Chip select 7, dy_cs3
Chip select 6, st_cs3
Chip select 5, dy_cs2
Chip select 4, st_cs2
Chip select 3, dy_cs1
Chip select 2, st_cs1 (Flash boot)
Chip select 1, dy_cs0 (Boot sdram)
Chip select 0, st_cs0
SDRAM RAS
D7
A7
B8
B4
A3
A4
C5
cs[6]
cs[5]
cs[4]
B5
cs[3]
B6
cs[2]
D6
C6
cs[1]
cs[0]
C4
ras_n
A2
C7
cas_n
SDRAM CAS
we_n
SDRAM write enable
SDRAM A10(AP)
B3
ap10
A8
st_oe_n
Static output enable
a. addr [27:24] reset to gpio mode. These address lines cannot be used for boot.
b. gpio[31:16] reset to memory data bus data [15:0].
Ethernet interface MAC
Pin
A12
D11
B12
A16
Signal
U/D I/O
OD
Description
MII clock
MII data
mdc / gpio[32]
mdio / gpio[35]
tx_clk / gpio[33]
txd[3] / gpio[47]
U
U
U
U
I/O
I/O
I/O
I/O
2
2
2
TX clock
2
TX data 3
30
Hardware Reference NS9215
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
D12
C12
B13
B15
B14
C14
C13
A14
E17
D16
B17
D13
C17
D17
Signal
U/D I/O
OD
2
Description
TX data 2
TX data 1
TX data 0
TX code err
TX enable
Collision
txd[2] / gpio[46]
txd[1] / gpio[45]
txd[0] / gpio[44]
tx_er / gpio[43]
tx_en / gpio[42]
col / gpio[48]
U
U
U
U
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
2
2
2
2
2
crs / gpio[49]
2
Carrier sense
RX clock
rx_clk / gpio[34]
rxd[3] / gpio[41]
rxd[2] / gpio[40]
rxd[1] / gpio[39]
rxd[0] / gpio[38]
rx_er / gpio[37]
rx_dv / gpio[36]
2
2
RX data 3
RX data 2
RX data 1
RX data 0
RX error
2
2
2
2
2
RX data valid
General purpose I/O (GPIO)
ꢀ
Some signals are multiplexed to two or more GPIOs, to maximize the number of
possible applications. These duplicate signals are marked as (dup) in the
Descriptions column in the table. Selecting the primary GPIO pin and the
duplicate GPIO pin for the same function is not recommended. If both the
primary GPIO pin and duplicate GPIO pin are programmed for the same
function, however, the primary GPIO pin has precedence and will be used.
2
2
ꢀ
The I C module must be held in reset until the GPIO assigned to I C has been
configured.
www.digiembedded.com
31
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Note: All GPIOs except 12 and 16 to 31 are reset to mode 3, input. GPIO 12 is reset
to mode 2, reset_done. GPIO 16 to 31 are reset to mode 0, external memory
data 15:0.
Pin
Signal
U/D I/O
OD
Description
K15
gpio[0]
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
2
0
1
2
3
4
DCD UART A
Ext DMA Done Ch 0
PIC_0_GEN_IO[0](I/O)
gpio[0]
SPI EN (dup)
K17
J17
gpio[1]
gpio[2]
gpio[3]
gpio[4]
gpio[5]
gpio[6]
gpio[7]
2
2
2
2
2
2
2
0
1
2
3
4
CTS UART A
Ext Int 0
PIC_0_GEN_IO[1](I/O)
gpio[1]
Reserved
0
1
2
3
4
DSR UART A
Ext Int 1
PIC_0_GEN_IO[2](I/O)
gpio[2]
Reserved
J16
0
1
2
3
4
RXD UART A
Ext DMA Pden Ch 0
PIC_0_GEN_IO[3](I/O)
gpio[3]
SPI RXD (dup)
H17
H13
H14
G14
0
1
2
3
4
RI UART A
Ext Int Ch 2
Ext Timer Event In Ch 6
gpio[4]
SPI CLK (dup)
0
1
2
3
4
RTS / RS485 Control UART A
Ext Int Ch 3
Ext Timer Event Out Ch 6
gpio[5]
SPI CLK (dup)
0
1
2
3
4
TXC / DTR UART A
Ext DMA Req Ch 0
Ext Timer Event In Ch 7
gpio[6]
PIC_DBG_DATA_OUT(O)
0
1
2
3
4
TXD UART A
Ext Timer Event In Ch 8
Ext Timer Event Out Ch 7
gpio[7]
SPI TXD (dup)
32
Hardware Reference NS9215
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
Signal
U/D I/O
OD
Description
G17
gpio[8]
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
2
0
1
2
3
4
DCD / TXC UART C
Ext DMA Done Ch 1
Ext Timer Event Out Ch 8
gpio[8]
SPI EN (dup)
G15
G16
F13
F17
F15
E14
D14
gpio[9]
4
2
2
4
2
2
2
0
1
2
3
4
CTS UART C
2
I C SCL
Ext Int Ch 0 (dup)
gpio[9]
PIC_DBG_DATA_IN(I)
gpio[10]
gpio[11]
gpio[12]
gpio[13]
gpio[14]
gpio[15]
0
1
2
3
4
DSR UART C
QDC 1
Ext Int Ch 1 (dup)
gpio[10]
PIC_DBG_CLK(O)
0
1
2
3
4
RXD UART C
Ext DMA Pden Ch 1
Ext Int Ch 2 (dup)
gpio[11]
SPI RXD (boot)
0
1
2
3
4
RXC / RI UART C
2
a
I C SDA
reset_done
gpio[12]
SPI CLK (dup)
0
1
2
3
4
RXC / RTS / RS485 Control UART C
QDC Q
Ext Timer Event Out Ch 9
gpio[13]
SPI CLK (boot)
0
1
2
3
4
TXC / DTR UART C
DMA Req Ch 1
PIC_0_CAN_RXD(I)
gpio[14]
SPI TXD (boot)
0
1
2
3
4
TXD UART C
Ext Timer Event In Ch 9
PIC_0_CAN_TXD(O)
gpio[15]
SPI EN (boot)
www.digiembedded.com
33
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
Signal
U/D I/O
OD
Description
D3
gpio[16]
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
4
0
1
2
3
data[0]
DCD UART B
Ext Int Ch 0 (dup)
gpio[16]
B2
C2
D4
B1
E3
D2
E4
C1
F5
gpio[17]
gpio[18]
gpio[19]
gpio[20]
gpio[21]
gpio[22]
gpio[23]
gpio[24]
gpio[25]
4
4
4
4
4
4
4
4
4
0
1
2
3
data[1]
CTS UART B
Ext Int Ch 1 (dup)
gpio[17]
0
1
2
3
data[2]
DSR UART B
Ext Int Ch 2 (dup)
gpio[18]
0
1
2
3
data[3]
RXD UART B
EXT INT CH 3 (dup)
gpio[19]
0
1
2
3
data[4]
RI UART B
Ext DMA Done Ch 0 (dup)
gpio[20]
0
1
2
3
data[5]
RTS / RS485 Control UART B
Ext DMA Pden Ch 0 (dup)
gpio[21]
0
1
2
3
data[6]
TXC / DTR UART B
Ext DMA Done Ch 1 (dup)
gpio[22]
0
1
2
3
data[7]
TXD UART B
PIC_1_CAN_RXD(I)
gpio[23]
0
1
2
3
data[8]
DCD UART D
PIC_1_CAN_TXD(O)
gpio[24]
0
1
2
3
data[9]
CTS UART D
reset_done (dup)
gpio[25]
34
Hardware Reference NS9215
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
Signal
U/D I/O
OD
Description
F4
gpio[26]
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
4
0
1
2
3
data[10]
DSR UART D
PIC_1_GEN_IO[0](I/O)
gpio[26]
F3
gpio[27]
gpio[28]
gpio[29]
gpio[30]
gpio[31]
gpio[32]
gpio[33]
gpio[34]
gpio[35]
4
4
4
4
4
2
2
2
2
0
1
2
3
data[11]
RXD UART D
PIC_1_GEN_IO[1](I/O)
gpio[27]
G5
0
1
2
3
data[12]
RI UART D
PIC_1_GEN_IO[2](I/O)
gpio[28]
G4
0
1
2
3
data[13]
RTS / RS485 Control UART D
PIC_1_GEN_IO[3](I/O)
gpio[29]
G3
0
1
2
3
data[14]
TXC / DTR UART D
Reserved
gpio[30]
H4
0
1
2
3
data[15]
TXD UART D
Reserved
gpio[31]
A12
B12
A14
D11
0
1
2
3
Ethernet MII MDC
PIC_0_GEN_IO[0](I/O)(dup)
Reserved
gpio[32]
0
1
2
3
Ethernet MII TXC
PIC_0_GEN_IO[1](I/O)(dup)
Reserved
gpio[33]
0
1
2
3
Ethernet MII RXC
PIC_0_GEN_IO[2](I/O)(dup)
Reserved
gpio[34]
0
1
2
3
Ethernet MII MDIO
PIC_0_GEN_IO[3](I/O)(dup)
Reserved
gpio[35]
www.digiembedded.com
35
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
Signal
U/D I/O
OD
Description
Ethernet MII RX DV
D17
gpio[36]
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
2
0
1
2
3
PIC_0_GEN_IO[4](I/O)(dup)
Reserved
gpio[36]
C17
D13
B17
D16
E17
B14
B15
B13
C12
gpio[37]
gpio[38]
gpio[39]
gpio[40]
gpio[41]
gpio[42]
gpio[43]
gpio[44]
gpio[45]
2
2
2
2
2
2
2
2
2
0
1
2
3
Ethernet MII RX ER
PIC_0_GEN_IO[5](I/O)(dup)
Reserved
gpio[37]
0
1
2
3
Ethernet MII RXD[0]
PIC_0_GEN_IO[6](I/O)(dup)
Reserved
gpio[38]
0
1
2
3
Ethernet MII RXD[1]
PIC_0_GEN_IO[7](I/O)(dup)
Reserved
gpio[39]
0
1
2
3
Ethernet MII RXD [2]
PIC_1_GEN_IO[0](I/O)(dup)
Reserved
gpio[40]
0
1
2
3
Ethernet MII RXD[3]
PIC_1_GEN_IO[1](I/O)(dup)
Reserved
gpio[41]
0
1
2
3
Ethernet MII TX EN
PIC_1_GEN_IO[2](I/O)(dup)
Reserved
gpio[42]
0
1
2
3
Ethernet MII TX ER
PIC_1_GEN_IO[3](I/O)(dup)
Reserved
gpio[43]
)
Ethernet MII TXD[0]
PIC_1_GEN_IO[4](I/O)(dup)
Reserved
1
2
3
gpio[44]
0
1
2
3
Ethernet MII TXD[1]
PIC_1_GEN_IO[5](I/O)(dup)
Reserved
gpio[45]
36
Hardware Reference NS9215
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
Signal
U/D I/O
OD
Description
Ethernet MII TXD[2]
D12
gpio[46]
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
2
0
1
2
3
PIC_1_GEN_IO[6](I/O)(dup)
Reserved
gpio[46]
A16
C14
C13
C11
E10
D10
C10
C9
gpio[47]
gpio[48]
gpio[49]
gpio[50]
gpio[51]
gpio[52]
gpio[53]
gpio[54]
gpio[55]
2
2
2
2
2
2
2
2
2
0
1
2
3
Ethernet MII TXD[3]
PIC_1_GEN_IO[7](I/O)(dup)
Reserved
gpio[47]
0
1
2
3
Ethernet MII COL
Reserved
Reserved
gpio[48]
0
1
2
3
Ethernet MII CRS
Reserved
Reserved
gpio[49]
0
1
2
3
Ethernet MII PHY Int
PIC_1_CLK(I)
PIC_1_CLK(O)
gpio[50]
0
1
2
3
DCD UART B (dup)
PIC_0_BUS_1[8](I/O)
PIC_1_BUS_1[8](I/O)
gpio[51]
0
1
2
3
CTS UART B (dup)
PIC_0_BUS_1[9](I/O)
PIC_1_BUS_1[9](I/O)
gpio[52]
0
1
2
3
DSR UART B (dup)
PIC_0_BUS_1[10](I/O)
PIC_1_BUS_1[10](I/O)
gpio[53]
0
1
2
3
RXD UART B (dup)
PIC_0_BUS_1[11](I/O)
PIC_1_BUS_1[11](I/O)
gpio[54]
H5
0
1
2
3
RI UART B (dup)
PIC_0_BUS_1[12](I/O)
PIC_1_BUS_1[12](I/O)
gpio[55]
www.digiembedded.com
37
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
Signal
U/D I/O
OD
Description
J4
gpio[56]
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
2
0
1
2
3
RTS/RS485 Control UART B (dup)
PIC_0_BUS_1[13](I/O)
PIC_1_BUS_1[13](I/O)
gpio[56]
K3
K4
K5
R6
P6
R7
P7
R8
P8
gpio[57]
gpio[58]
gpio[59]
gpio[60]
gpio[61]
gpio[62]
gpio[63]
gpio[64]
gpio[65]
2
2
2
2
2
2
2
2
2
0
1
2
3
TXC/DTR UART B (dup)
PIC_0_BUS_1[14](I/O)
PIC_1_BUS_1[14](I/O)
gpio[57]
0
1
2
3
TXD UART B (dup)
PIC_0_BUS_1[15](I/O)
PIC_1_BUS_1[15](I/O)
gpio[58]
0
1
2
3
DCD UART D (dup)
PIC_0_BUS_1[16](I/O)
PIC_1_BUS_1[16](I/O)
gpio[59]
0
1
2
3
CTS UART D (dup)
PIC_0_BUS_1[17](I/O)
PIC_1_BUS_1[17](I/O)
gpio[60]
0
1
2
3
DSR UART D (dup)
PIC_0_BUS_1[18](I/O)
PIC_1_BUS_1[18](I/O)
gpio[61]
0
1
2
3
RXD UART D (dup)
PIC_0_BUS_1[19](I/O)
PIC_1_BUS_1[19](I/O)
gpio[62]
0
1
2
3
RI UART D (dup)
PIC_0_BUS_1[20](I/O)
PIC_1_BUS_1[20](I/O)
gpio[63]
0
1
2
3
RTS/R5485 Control UART D (dup)
PIC_0_BUS_1[21](I/O)
PIC_1_BUS_1[21](I/O)
gpio[64]
0
1
2
3
TXC/DTR UART D (dup)
PIC_0_BUS_1[22](I/O)
PIC_1_BUS_1[22](I/O)
gpio[65]
38
Hardware Reference NS9215
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
Signal
U/D I/O
OD
Description
N8
gpio[66]
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
2
0
1
2
3
TXD UART D (dup)
PIC_0_BUS_1[23](I/O)
PIC_1_BUS_1[23](I/O)
gpio[66]
P9
gpio[67]
gpio[68]
gpio[69]
gpio[70]
gpio[71]
gpio[72]
gpio[73]
gpio[74]
gpio[75]
2
2
2
2
2
2
2
2
2
0
1
2
3
PIC_0_CLK(I)
PIC_0_CLK(O)
Ext Int Ch 3 (dup)
gpio[67]
R10
P10
N10
P11
N12
R13
P13
U16
0
1
2
3
PIC_0_GEN_IO[0](I/O)(dup)
PIC_1_GEN_IO[0](I/O)
PIC_1_CAN_RXD(I)(dup)
gpio[68]
0
1
2
3
PIC_0_GEN_IO[1](I/O)(dup)
PIC_1_GEN_IO[1](I/O)
PIC_1_CAN_TXD(O)(dup)
gpio[69]
0
1
2
3
PIC_0_GEN_IO[2](I/O)(dup)
PIC_1_GEN_IO[2](I/O)
PWM Ch 0
gpio[70]
0
1
2
3
PIC_0_GEN_IO[3](I/O)(dup)
PIC_1_GEN_IO[3](I/O)
PWM Ch 1
gpio[71]
0
1
2
3
PIC_0_GEN_IO[4](I/O)
PIC_1_GEN_IO[4](I/O)
PWM Ch 2
gpio[72]
0
1
2
3
PIC_0_GEN_IO[5](I/O)
PIC_1_GEN_IO[5](I/O)
PWM Ch 3
gpio[73]
0
1
2
3
PIC_0_GEN_IO[6](I/O)
PIC_0_GEN_IO[6](I/O)
Ext Timer Event In Ch 0
gpio[74]
0
1
2
3
PIC_0_GEN_IO[7](I/O)
PIC_1_GEN_IO[7](I/O)
Ext Timer Event in Ch 1
gpio[75]
www.digiembedded.com
39
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
Signal
U/D I/O
OD
Description
T15
gpio[76]
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I.O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
2
0
1
2
3
PIC_0_CTL_IO[0](I/O)
PIC_1_CTL_IO[0](I/O)
Ext Timer Event in Ch 2
gpio[76]
T16
R14
P14
R17
P17
N16
N17
M17
L15
gpio[77]
gpio[78]
gpio[79]
gpio[80]
gpio[81]
gpio[82]
gpio[83]
gpio[84]
gpio[85]
2
2
2
2
2
2
2
2
2
0
1
2
3
PIC_0_CTL_IO[1](I/O)
PIC_1_CTL_IO[1](I/O)
Ext Timer Event in Ch 3
gpio[77]
0
1
2
3
PIC_0_CTL_IO[2](I/O)
PIC_1_CTL_IO[2](I/O)
Ext Timer Event in Ch 4
gpio[78]
0
1
2
3
PIC_0_CTL_IO[3](I/O)
PIC_1_CTL_IO[3](I/O)
Ext Timer Event in Ch 5
gpio[79]
0
1
2
3
PIC_0_BUS_0[0](I/O)
PIC_1_BUS_0[0](I/O)
Ext Timer Event in Ch 6 (dup)
gpio[80]
0
1
2
3
PIC_0_BUS_0[1](I/O)
PIC_1_BUS_0[1](I/O)
Ext Timer Event in Ch 7(dup)
gpio[81]
0
1
2
3
PIC_0_BUS_0[2](I/O)
PIC_1_BUS_0[2](I/O)
Ext Timer Event in Ch 8 (dup)
gpio[82]
0
1
2
3
PIC_0_BUS_0[3](I/O)
PIC_1_BUS_0[3](I/O)
Ext Timer Event in Ch 9 (dup)
gpio[83]
0
1
2
3
PIC_0_BUS_0[4](I/O)
PIC_1_BUS_0[4](I/O)
Ext Timer Event Out Ch 0
gpio[84]
0
1
2
3
PIC_0_BUS_0[5](I/O)
PIC_1_BUS_0[5](I/O)
Ext Timer Event Out Ch 1
gpio[85]
40
Hardware Reference NS9215
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
Signal
U/D I/O
OD
Description
K13
gpio[86]
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
2
0
1
2
3
PIC_0_BUS_0[6](I/O)
PIC_1_BUS_0[6](I/O)
Ext Timer Event Out Ch 2
gpio[86]
K16
K14
J14
gpio[87]
gpio[88]
gpio[89]
gpio[90]
gpio[91]
gpio[92]
gpio[93]
gpio[94]
gpio[95]
2
2
2
2
2
2
2
2
2
0
1
2
3
PIC_0_BUS_0[7](I/O)
PIC_1_BUS_0[7](I/O)
Ext Timer Event Out Ch 3
gpio[87]
0
1
2
3
PIC_0_BUS_0[8](I/O)
PIC_1_BUS_0[8](I/O)
Ext Timer Event Out Ch 4
gpio[88]
0
1
2
3
PIC_0_BUS_0[9](I/O)
PIC_1_BUS_0[9](I/O)
Ext Timer Event Out Ch 5
gpio[89]
H16
H15
F14
F16
E15
E16
0
1
2
3
PIC_0_BUS_0[10](I/O)
PIC_1_BUS_0[10](I/O)
Ext Timer Event Out Ch 6
gpio[90]
0
1
2
3
PIC_0_BUS_0[11](I/O)
PIC_1_BUS_0[11](I/O)
Ext Timer Event Out Ch 7
gpio[91]
0
1
2
3
PIC_0_BUS_0[12](I/O)
PIC_1_BUS_0[12](I/O)
Ext Timer Event Out Ch 8
gpio[92]
0
1
2
3
PIC_0_BUS_0[13](I/O)
PIC_1_BUS_0[13](I/O)
Ext Timer Event Out Ch 9
gpio[92]
0
1
2
3
PIC_0_BUS_0[14](I/O)
PIC_1_BUS_0[14](I/O)
QDC I (dup)
gpio[94]
0
1
2
3
PIC_0_BUS_0[15](I/O)
PIC_1_BUS_0[15](I/O)
QDC Q (dup)
gpio[95]
www.digiembedded.com
41
P I N O U T ( 26 5 )
General purpose I/O (GPIO)
Pin
Signal
U/D I/O
OD
Description
C16
gpio[96]
U
U
U
U
U
U
U
U
U
U
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
2
0
1
2
3
PIC_0_BUS_1[0](I/O)
PIC_1_BUS_1[0](I/O)
PIC_0_CAN_RXD(I)(dup)
gpio[96]
B16
D15
E8
gpio[97]
gpio[98]
gpio[99]
gpio[100]
gpio[101]
gpio[102]
gpio[103]
gpio_a[0]
gpio_a[1]
2
2
2
2
2
4
4
4
4
0
1
2
3
PIC_0_BUS_1[1](I/O)
PIC_1_BUS_1[1](I/O)
PIC_0_CAN_TXD(O)(dup)
gpio97
0
1
2
3
PIC_0_BUS_1[2](I/O)
PIC_1_BUS_1[2](I/O)
PIC_1_CAN_RXD(I)(dup)
gpio[98]
0
1
2
3
PIC_0_BUS_1[3](I/O)
PIC_1_BUS_1[3](I/O)
PIC_1_CAN_TXD(O)(dup)
gpio[99]
D8
0
1
2
3
PIC_0_BUS_1[4](I/O)
PIC_1_BUS_1[4](I/O)
PWM Ch 4
gpio[100]
C8
0
1
2
3
PIC_0_BUS_1[5](I/O)
PIC_1_BUS_1[5](I/O)
Ext Int Ch 3 (dup)
gpio[101]
E6
0
1
2
3
PIC_0_BUS_1[6](I/O)
PIC_1_BUS_1[6](I/O)
2
I C SCL (dup)
gpio[102]
D5
0
1
2
3
PIC_0_BUS_1[7](I/O)
PIC_1_BUS_1[7](I/O)
2
I C SDA (dup)
gpio[103]
R12
U15
0
1
2
3
addr[24]
2
I C SCL (dup)
Ext Int Ch 0 (dup)
gpio_a[0], Boot width[1]
0
1
2
3
addr[25]
2
I C SDA (dup)
Ext Int Ch 1(dup)
Ext Int Ch 0]
42
Hardware Reference NS9215
P I N O U T ( 26 5 )
System clock
Pin
Signal
U/D I/O
OD
Description
T14
gpio_a[2]
U
I/O
4
0
1
2
3
addr[26]
Reserved 1 cs0_we_n
Ext Int Ch 2 (dup)
gpio_a[2], SPI boot
P12
gpio_a[3]
U
I/O
4
0
1
2
3
addr[27]
Reserved 1 cs0_oe_n
UART ref clock
gpio_a[3], Endian
a. There is a possible conflict when gpio12 is used as the I2C_SDA signal. in this case the I2C_SDA signal is driven low
while in reset, then driven active high after end of reset, until software configures this pin for the I2C function.
System clock
Pin
L16
L17
M15
M16
P2
Signal
U/D I/O
OD
Description
x1_sys_osc
x2_sys_osc
sys_pll_dvdd
sys_pll_dvss
x1_rtc_osc
x2_rtc_osc
I
System oscillator circuit in
System oscillator circuit out
PLL clean power
O
P
P
I
PLL clean ground
RTC oscillator circuit in (32.768 KHz)
RTC oscillator circuit out
R2
O
www.digiembedded.com
43
P I N O U T ( 26 5 )
System mode
RTC clock and
battery backup
drawing
Note: If RTC battery backup is not used, the following connection changes can be
made.
N3, M4
32.788kHz
N4
bat_vdd_reg
tie to 1.8V
crystal load capacitors tie to N3, M4 (1.8V)
bat_vdd
tie to 3.3V
R1
aux_comp
tie to ground
System mode
Pin
M13
M14
L14
Signal
U/D I/O
OD
Description
test mode pins
test mode pins
test mode pins
sys_mode_2
sys_mode_1
sys_mode_0
I
I
I
v
www.digiembedded.com
45
P I N O U T ( 26 5 )
System mode
sys_mode_2
sys_mode_1
sys_mode_0
Description
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
manufacturing test
manufacturing test
manufacturing test
normal operation, boundary scan enabled, POR disabled
normal operation, boundary scan enabled, POR enabled
board test mode, all outputs tristated
normal operation, ARM debug enabled, POR disabled
normal operation, ARM debug enabled, POR enabled
46
Hardware Reference NS9215
P I N O U T ( 26 5 )
System reset
System reset
Pin
E12
A5
Signal
U/D I/O
OD
Description
reset_n
U
I
System reset
reset_out_n
reset_done
sreset_n
O
O
I
2
2
System reset output
Reset done
A13
D9
U
Soft system reset
RESET_n
pin
SRESET_n
pin
PLL Config
Reg.
Update
Watchdog
Time-Out
Reset
SPI
YES
YES
YES
YES
NO
YES
NO
YES
NO
BootStrapping PL
Other Strappings
(Endianess
NO
NO
NO
GPIO Configuration
YES
YES
NO
NO
NO
Other (ASIC) Registers
YES
YES
YEs
NS9215
POR disable
(as encoded on mode pins)
POR
trips when
voltage on L3
drops below
reset_out_n
2.74V/2.97V
reset_n
reset_done
NS9215 Core
sreset_n
Definitions
reset_n – hardware reset input buffer with pull-up resistor
sreset_n – soft reset input buffer with pull-up resistor, does not reset the PLL
reset_out_n – hardware reset to NS9215 core and output buffer, resets all logic in NS9215 core including PLL
reset_done – reflects the state of the ARM926 reset, for any type of reset event
www.digiembedded.com
47
P I N O U T ( 26 5 )
JTAG Test
JTAG Test
Pin
N14
N15
T17
R16
Signal
U/D I/O
OD
Description
tdi
U
I
Test data in
tdo
O
I
2
Test data out
Test mode select
tms
U
U
trst_n
I
Test mode reset. For normal operation, this pin
is tied to ground or pulled down.
P15
P16
tck
I
Test mode clock
rtck
O
2
Test mode return clock
48
Hardware Reference NS9215
P I N O U T ( 26 5 )
ADC
ADC
Pin
P4
Signal
U/D I/O
OD
Description
Analog reference ground
Analog reference voltage (3.3max
ADC_VSS
agnd_ref_adc
VREF_adc
vss_adc
P5
T2
N6
R4
T3
R5
U2
T4
U3
T5
U4
vdd_adc
ADC VDD (3.3V)
ADC input 0
vin0_adc
vin1_adc
vin2_adc
vin3_adc
vin4_adc
vin5_adc
vin6_adc
vin7_adc
I
I
I
I
I
I
I
I
ADC input 1
ADC input 2
ADC input 3
ADC input 4
ADC input 5
ADC input 6
ADC input 7
If the ADC feature is not used, the inputs must be terminated as shown below:
P4
P5
T2
N6
R4
T3
R5
U2
T4
U3
T5
U4
agnd_ref_adc
VREF_adc
vss_adc
tie to ground
tie to ground
tie to ground
tie to 3.3V
vdd_adc
vin0_adc
vin1_adc
vin2_adc
vin3_adc
vin4_adc
vin5_adc
vin6_adc
vin7_adc
tie to ground
tie to ground
tie to ground
tie to ground
tie to ground
tie to ground
tie to ground
tie to ground
www.digiembedded.com
49
P I N O U T ( 26 5 )
POR and battery-backed logic
POR and battery-backed logic
Pin
M3
N2
P1
Signal
U/D I/O
OD
Description
por_gnd_reg
por_vss
POR reference ground
POR VSS
por_vdd
POR VDD (3.3V)
L3
por_reference
POR reference trip voltage (2.74V min /
2.97V max)
T1
por_early_reference
POR early power loss voltage (1.19V min /
1.28V max)
N4
R1
bat_vdd
Battery VDD (3.0V)
aux_comp
Auxiliary analog comparator input (trip point
2.4V min / 2.5V max)
N3, M4
P3
bat_vdd_reg
por_bypass
por_test
Battery regulated core VDD (1.8V)
POR bypass, pull low to disable POR
POR analog test pin, leave unconnected
U
I
L4
The POR will generate keep reset_out_n low between 75ms and 300ms after 3.3V
reaches the POR reference trip voltage threshold. The POR reference trip voltage is
between 2.74V and 2.97V, with hysteresis between 50mV and 80mV.
If the POR feature is not used, and the RTC is used, the inputs must be terminated
as shown below.
M3
N2
P1
por_gnd_reg
tie to ground
tie to ground
tie to 3.3V
por_vss
por_vdd
L3
T1
P3
por_reference
tie to 3.3V
por_early_reference tie to ground
por_bypass
reset_n
tie to 1.8V
E12
A5
tie to system reset (remains active low 40 ms Min. after 3.3V & 1.8V are valid)
leave open
reset_out_n
sys_mode [2.0]
M13,
M14,
L14
POR disabled (See System mode table & JTAG drawing following JTAG Test
table)
50
Hardware Reference NS9215
P I N O U T ( 26 5 )
Power and ground
If the RTC feature is not used, the inputs must be terminated as shown below.
N4
Bat_vdd
tie to 3.3V
R1
aux_comp
bat_vdd_reg
x1_rtc_osc
x2_rtc_osc
tie to ground
tie to ground
tie to ground
leave open
N3, M4
P2
R2
If the RTC feature is used, see RTC clock and battery backup drawing on page 45.
Power and ground
Pin
Signal
E7, E11, G7, G11, G13, L5, L7, L11, L13, N7, N11
Core VCC (1.8V)
A1. A17. C3, C15, E5, E9, E13, J5, J13, J15, N5, N9, N13, R3, R15, U1, U17 I/O VCC (3.3V)
G8, G9, G10, H7, H8, H9, H10, H11, J7, J8, J9, J10, J11, K7, K8, K9, K10,
K11, L8, L9, L10, M5
GND
www.digiembedded.com
51
P I N O U T ( 26 5 )
Power and ground
52
Hardware Reference NS9215
I/O Control Module
C
H
A
P
T
E
R
2
The NS9215 ASIC contains 108 pins that are designated as general purpose I/O
(GPIO).
ꢀ
The first 16 GPIO can be configured to serve one of five functions.
The remaining GPIO can be configured to serve one of four functions.
ꢀ
All signals set to a disabled peripheral are held in the inactive state. The I/O control
module contains the control register and multiplexing logic required to accomplish
this task.
System memory
bus I/O control
The registers in this section control these system memory I/O configuration options:
ꢀ
ꢀ
System chip select options, used to select which chip select is output
Upper address option
Control and Status registers
The I/O control module configuration registers are located at base address
0xA090_2000.
Register address
Address
Description
Access
R/W
Reset value
0x18181818
0x18181818
0x18181818
map
A090_2000
A090_2004
A090_2008
GPIO Configuration Register #0
GPIO Configuration Register #1
GPIO Configuration Register #2
R/W
R/W
53
I / O C O N T ROL M O D U L E
Control and Status registers
Address
Description
Access
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R
Reset value
0x18181810
0x00000000
0x00000000
0x00000000
0x00000000
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x18181818
0x00000000
0x00000000
0x00000000
0x00000000
A090_200C
A090_2010
A090_2014
A090_2018
A090_201C
A090_2020
A090_2024
A090_2028
A090_202C
A090_2030
A090_2034
A090_2038
A090_203C
A090_2040
A090_2044
A090_2048
A090_204C
A090_2050
A090_2054
A090_2058
A090_205C
A090_2060
A090_2064
A090_2068
A090_206C
A090_2070
A090_2074
A090_2078
A090_207C
A090_2080
A090_2084
A090_2088
GPIO Configuration Register #3
GPIO Configuration Register #4
GPIO Configuration Register #5
GPIO Configuration Register #6
GPIO Configuration Register #7
GPIO Configuration Register #8
GPIO Configuration Register #9
GPIO Configuration Register #10
GPIO Configuration Register #11
GPIO Configuration Register #12
GPIO Configuration Register #13
GPIO Configuration Register #14
GPIO Configuration Register #15
GPIO Configuration Register #16
GPIO Configuration Register #17
GPIO Configuration Register #18
GPIO Configuration Register #19
GPIO Configuration Register #20
GPIO Configuration Register #21
GPIO Configuration Register #22
GPIO Configuration Register #23
GPIO Configuration Register #24
GPIO Configuration Register #25
GPIO Configuration Register #26
GPIO Control Register #0
GPIO Control Register #1
GPIO Control Register #2
GPIO Control Register #3
1
GPIO Status Register #0
Undefined
1
GPIO Status Register #1
R
Undefined
1
GPIO Status Register #2
R
Undefined
1
GPIO Status Register #3
R
Undefined
54
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Configuration registers
Address
Description
Access
R/W
Reset value
A090_208C
Memory Bus Configuration register
007D6344
1
The reset values for all the status bits are undefined because they depend on the state of the GPIO
pins to NS9215.
GPIO Configuration registers
GPIO Configuration registers #0 through #26 contain the configuration information
for each of the 108 GPIO pins. Each GPIO pin can have up to four functions.
Configure each pin for the function and direction needed, using the configuration
options shown below.
GPIO
configuration
options
Each GPIO configuration section is set up the same way. This table shows the settings
using bits D07:00; the same settings apply to the corresponding bits in D15:08,
D23:D16, and D31:24.
Bit(s)
D07:06
D05:03
Mnemonic
Reserved
FUNC
Description
N/A
Use these bits to select the function you want to use. For a definition of each
000
001
010
011
100
Function #0
Function #1
Function #2
Function #3
Function #4 (applicable only for GPIO 0–15)
D02
DIR
Controls the pin direction when the FUNC field is configured for GPIO
mode, function #3.
0
1
Input
Output
All GPIO pins reset to the input state.
Note: The pin direction is controlled by the selected function in modes
#0 through #2.
Controls the inversion function of the GPIO pin.
D01
D00
INV
0
1
Disables the inversion function
Enables the inversion function
This bit applies to all functional modes.
PUDIS
Controls the GPIO pin pullup resistor operation.
0
1
Enables the pullup
Disables the pullup
Note:
The pullup cannot be disabled on GPIO[9], GPIO[12], and on
GPIO_A[0] and GPIO_A[1].
www.digiembedded.com
55
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2000
Configuration
Register #0
31
15
30
14
29
13
28
27
GPIO3
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO2
12
11
GPIO1
4
GPIO0
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO3
GPIO2
GPIO1
GPIO0
GPIO[3] configuration
GPIO[2] configuration
GPIO[1] configuration
GPIO[0] configuration
GPIO
Address: A090_2004
Configuration
Register #1
31
15
30
14
29
13
28
12
27
GPIO7
26
10
25
9
24
8
23
7
22
21
5
20
19
3
18
2
17
1
16
0
GPIO6
11
GPIO5
6
4
GPIO4
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO7
GPIO6
GPIO5
GPIO4
GPIO[7] configuration
GPIO[6] configuration
GPIO[5] configuration
GPIO[4] configuration
56
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2008
Configuration
Register #2
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO11
GPIO10
12
4
GPIO9
GPIO8
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO11
GPIO10
GPIO9
GPIO8
GPIO[11] configuration
GPIO[10] configuration
GPIO[9] configuration
GPIO[8] configuration
GPIO
Address: A090_200C
Configuration
Register #3
31
15
30
14
29
13
28
27
26
10
25
9
24
23
7
22
21
20
19
3
18
2
17
16
GPIO15
GPIO14
12
11
8
6
5
4
1
0
GPIO13
GPIO12
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x10
Description
R/W
R/W
R/W
R/W
GPIO15
GPIO14
GPIO13
GPIO12
GPIO[15] configuration
GPIO[14 configuration
GPIO[13] configuration
GPIO[12] configuration
www.digiembedded.com
57
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2010
Configuration
Register #4
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO19
GPIO18
12
4
GPIO17
GPIO16
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x00
0x00
0x00
0x00
Description
R/W
R/W
R/W
R/W
GPIO19
GPIO18
GPIO17
GPIO16
GPIO[19] configuration
GPIO[18] configuration
GPIO[17] configuration
GPIO[16] configuration
GPIO
Address: A090_2014
Configuration
Register #5
31
15
30
14
29
13
28
27
11
26
10
25
24
23
7
22
21
5
20
19
3
18
2
17
1
16
0
GPIO23
GPIO22
12
9
8
6
4
GPIO21
GPIO20
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x00
0x00
0x00
0x00
Description
R/W
R/W
R/W
R/W
GPIO23
GPIO22
GPIO21
GPIO20
GPIO[23] configuration
GPIO[22] configuration
GPIO[21] configuration
GPIO[20] configuration
58
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2018
Configuration
Register #6
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO27
GPIO26
12
4
GPIO25
GPIO24
Bit(s)
Access Mnemonic
Reset
0x00
0x00
0x00
0x00
Description
D31:24
D23:16
D15:08
D07:00
R/W
R/W
R/W
R/W
GPIO27
GPIO26
GPIO25
GPIO24
GPIO[27] configuration
GPIO[26] configuration
GPIO[25] configuration
GPIO[24] configuration
GPIO
Address: A090_201C
Configuration
Register #7
31
15
30
14
29
13
28
27
11
26
25
24
23
7
22
21
20
19
3
18
2
17
16
GPIO39
GPIO38
12
10
9
8
6
5
4
1
0
GPIO37
GPIO36
Bit(s)
Access Mnemonic
Reset
0x00
0x00
0x00
0x00
Description
D31:24
D23:16
D15:08
D07:00
R/W
R/W
R/W
R/W
GPIO31
GPIO30
GPIO29
GPIO28
GPIO[31] configuration
GPIO[30] configuration
GPIO[29] configuration
GPIO[28] configuration
www.digiembedded.com
59
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2020
Configuration
Register #8
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO35
GPIO34
12
4
GPIO33
GPIO32
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO35
GPIO34
GPIO33
GPIO32
GPIO[35] configuration
GPIO[34] configuration
GPIO[33] configuration
GPIO[32] configuration
GPIO
Address: A090_2024
Configuration
Register #9
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
16
GPIO39
GPIO38
12
4
1
0
GPIO37
GPIO36
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO39
GPIO38
GPIO37
GPIO36
GPIO[39] configuration
GPIO[38] configuration
GPIO[37] configuration
GPIO[36] configuration
60
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2028
Configuration
Register #10
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO43
GPIO42
12
4
GPIO41
GPIO40
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO43
GPIO42
GPIO41
GPIO40
GPIO[43] configuration
GPIO[42] configuration
GPIO[41] configuration
GPIO[40] configuration
GPIO
Address: A090_202C
Configuration
Register #11
31
30
14
29
13
28
27
26
10
25
9
24
23
7
22
21
20
19
3
18
2
17
1
16
0
GPIO47
GPIO46
15
12
11
8
6
5
4
GPIO45
GPIO44
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO47
GPIO46
GPIO45
GPIO44
GPIO[47] configuration
GPIO[46] configuration
GPIO[45] configuration
GPIO[44] configuration
www.digiembedded.com
61
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2030
Configuration
Register #12
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO51
GPIO50
12
4
GPIO49
GPIO48
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO51
GPIO50
GPIO49
GPIO48
GPIO[51] configuration
GPIO[50] configuration
GPIO[49] configuration
GPIO[48] configuration
GPIO
Address: A090_2034
Configuration
Register #13
31
15
30
14
29
13
28
27
26
10
25
9
24
23
7
22
21
20
19
3
18
2
17
1
16
0
GPIO55
GPIO54
12
11
8
6
5
4
GPIO53
GPIO52
Bit(s)
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
D31:24
D23:16
D15:08
D07:00
R/W
R/W
R/W
R/W
GPIO55
GPIO54
GPIO53
GPIO52
GPIO[55] configuration
GPIO[54] configuration
GPIO[53] configuration
GPIO[52] configuration
62
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2038
Configuration
Register #14
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO59
GPIO58
12
4
GPIO57
GPIO56
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO59
GPIO58
GPIO57
GPIO56
GPIO[59] configuration
GPIO[58] configuration
GPIO[57] configuration
GPIO[56] configuration
GPIO
Address: A090_203C
Configuration
Register #15
31
15
30
14
29
13
28
27
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
16
GPIO63
GPIO62
12
11
4
1
0
GPIO61
GPIO60
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO63
GPIO62
GPIO61
GPIO60
GPIO[63] configuration
GPIO[62] configuration
GPIO[61] configuration
GPIO[60] configuration
www.digiembedded.com
63
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2040
Configuration
Register #16
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO67
GPIO66
12
4
GPIO65
GPIO64
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO67
GPIO66
GPIO65
GPIO64
GPIO[67] configuration
GPIO[66] configuration
GPIO[65] configuration
GPIO[64] configuration
GPIO
Address: A090_2044
Configuration
Register #17
31
15
30
14
29
13
28
27
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO71
GPIO70
12
11
4
GPIO69
GPIO68
Bit(s)
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
D31:24
D23:16
D15:08
D07:00
R/W
R/W
R/W
R/W
GPIO71
GPIO70
GPIO69
GPIO68
GPIO[71] configuration
GPIO[70] configuration
GPIO[69] configuration
GPIO[68] configuration
64
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2048
Configuration
Register #18
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO75
GPIO74
12
4
GPIO73
GPIO72
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO75
GPIO74
GPIO73
GPIO72
GPIO[75] configuration
GPIO[74] configuration
GPIO[73] configuration
GPIO[72] configuration
GPIO
Address: A090_204C
Configuration
Register #19
31
15
30
14
29
13
28
27
11
26
25
9
24
23
7
22
6
21
5
20
19
3
18
2
17
1
16
GPIO79
GPIO78
12
10
8
4
0
GPIO77
GPIO76
Bit(s)
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
D31:24
D23:16
D15:08
D07:00
R/W
R/W
R/W
R/W
GPIO79
GPIO78
GPIO77
GPIO76
GPIO[79] configuration
GPIO[78] configuration
GPIO[77] configuration
GPIO[76] configuration
www.digiembedded.com
65
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2050
Configuration
Register #20
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO83
GPIO82
12
4
GPIO81
GPIO80
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO83
GPIO82
GPIO81
GPIO80
GPIO[83] configuration
GPIO[82] configuration
GPIO[81] configuration
GPIO[80] configuration
GPIO
Address: A090_2054
Configuration
Register #21
31
30
14
29
13
28
27
26
10
25
9
24
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO87
GPIO86
15
12
11
8
4
GPIO85
GPIO84
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO87
GPIO86
GPIO85
GPIO84
GPIO[87] configuration
GPIO[86] configuration
GPIO[85] configuration
GPIO[84] configuration
66
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2058
Configuration
Register #22
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO91
GPIO90
12
4
GPIO89
GPIO88
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO91
GPIO90
GPIO89
GPIO88
GPIO[91] configuration
GPIO[90] configuration
GPIO[89] configuration
GPIO[88] configuration
GPIO
Address: A090_205C
Configuration
Register #23
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO95
GPIO94
12
4
GPIO93
GPIO92
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO95
GPIO94
GPIO93
GPIO92
GPIO[95] configuration
GPIO[94] configuration
GPIO[93] configuration
GPIO[92] configuration
www.digiembedded.com
67
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2060
Configuration
Register #24
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO99
GPIO98
12
4
GPIO97
GPIO96
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO99
GPIO98
GPIO97
GPIO96
GPIO[99] configuration
GPIO[98] configuration
GPIO[97] configuration
GPIO[96] configuration
GPIO
Address: A090_2064
Configuration
Register #25
31
15
30
14
29
13
28
27
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO103
GPIO102
12
11
4
GPIO101
GPIO100
Bit(s)
D31:24
D23:16
D15:08
D07:00
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
R/W
R/W
R/W
R/W
GPIO103
GPIO102
GPIO101
GPIO100
GPIO[103] configuration
GPIO[102] configuration
GPIO[101] configuration
GPIO[100] configuration
68
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Configuration registers
GPIO
Address: A090_2068
Configuration
Register #26
31
15
30
14
29
13
28
27
26
10
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
GPIO_A3
GPIO_A2
12
11
4
GPIO_A1
GPIO_A0
Bit(s)
Access Mnemonic
Reset
0x18
0x18
0x18
0x18
Description
D31:24
D23:16
D15:08
D07:00
R/W
R/W
R/W
R/W
GPIO_A3
GPIO_A2
GPIO_A1
GPIO_A0
GPIO_A[3] configuration
GPIO_A[2] configuration
GPIO_A[1] configuration
GPIO_A[0] configuration
www.digiembedded.com
69
I / O C O N T ROL M O D U L E
GPIO Control registers
GPIO Control registers
GPIO Control Registers #0 through #3 contain the control information for each of the
108 GPIO pins. When a GPIO pin is configured as a GPIO output, the corresponding
bit in GPIO Control Registers #0 through #3 is driven out the GPIO pin. In all
configurations, the CPU has read/write access to these registers.
GPIO Control
Register #0
Address: A090_206C
Bit(s)
D00
D01
D02
D03
D04
D05
D06
D07
D08
D09
D10
D11
D12
D13
D14
D15
D16
D17
D18
D19
D20
D21
D22
D23
D24
Access Mnemonic
Reset
Description
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
GPIO0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
GPIO[0] control bit
GPIO[1] control bit
GPIO[2] control bit
GPIO[3] control bit
GPIO[4] control bit
GPIO[5] control bit
GPIO[6] control bit
GPIO[7] control bit
GPIO[8] control bit
GPIO[9] control bit
GPIO[10] control bit
GPIO[11] control bit
GPIO[12] control bit
GPIO[13] control bit
GPIO[14] control bit
GPIO[15] control bit
GPIO[16] control bit
GPIO[17] control bit
GPIO[18] control bit
GPIO[19] control bit
GPIO[20] control bit
GPIO[21] control bit
GPIO[22] control bit
GPIO[23] control bit
GPIO[24] control bit
GPIO1
GPIO2
GPIO3
GPIO4
GPIO5
GPIO6
GPIO7
GPIO8
GPIO9
GPIO10
GPIO11
GPIO12
GPIO13
GPIO14
GPIO15
GPIO16
GPIO17
GPIO18
GPIO19
GPIO20
GPIO21
GPIO22
GPIO23
GPIO24
70
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Control registers
Bit(s)
D25
D26
D27
D28
D29
D30
D31
Access Mnemonic
Reset
Description
R/W
R/W
R/W
R/W
R/W
R/W
R/W
GPIO25
GPIO26
GPIO27
GPIO28
GPIO29
GPIO30
GPIO31
0
0
0
0
0
0
0
GPIO[25] control bit
GPIO[26] control bit
GPIO[27] control bit
GPIO[28] control bit
GPIO[29] control bit
GPIO[30] control bit
GPIO[31] control bit
GPIO Control
Register #1
Address: A090_2070
Bit(s)
D00
D01
D02
D03
D04
D05
D06
D07
D08
D09
D10
D11
D12
D13
D14
D15
D16
D17
D18
D19
D20
D21
Access Mnemonic
Reset
Description
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
GPIO32
GPIO33
GPIO34
GPIO35
GPIO36
GPIO37
GPIO38
GPIO39
GPIO40
GPIO41
GPIO42
GPIO43
GPIO44
GPIO45
GPIO46
GPIO47
GPIO48
GPIO49
GPIO50
GPIO51
GPIO52
GPIO53
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
GPIO[32] control bit
GPIO[33] control bit
GPIO[34] control bit
GPIO[35] control bit
GPIO[36] control bit
GPIO[37] control bit
GPIO[38] control bit
GPIO[39] control bit
GPIO[40] control bit
GPIO[41] control bit
GPIO[42] control bit
GPIO[43] control bit
GPIO[44] control bit
GPIO[45] control bit
GPIO[46] control bit
GPIO[47] control bit
GPIO[48] control bit
GPIO[49] control bit
GPIO[50] control bit
GPIO[51] control bit
GPIO[52] control bit
GPIO[53] control bit
www.digiembedded.com
71
I / O C O N T ROL M O D U L E
GPIO Control registers
Bit(s)
D22
D23
D24
D25
D26
D27
D28
D29
D30
D31
Access Mnemonic
Reset
Description
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
GPIO54
GPIO55
GPIO56
GPIO57
GPIO58
GPIO59
GPIO60
GPIO61
GPIO62
GPIO63
0
0
0
0
0
0
0
0
0
0
GPIO[54] control bit
GPIO[55] control bit
GPIO[56] control bit
GPIO[57] control bit
GPIO[58] control bit
GPIO[59] control bit
GPIO[60] control bit
GPIO[61] control bit
GPIO[62] control bit
GPIO[63] control bit
GPIO Control
Register #2
Address: A090_2074
Bit(s)
D00
D01
D02
D03
D04
D05
D06
D07
D08
D09
D10
D11
D12
D13
D14
D15
D16
D17
D18
Access Mnemonic
Reset
Description
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
GPIO64
GPIO65
GPIO66
GPIO67
GPIO68
GPIO69
GPIO70
GPIO71
GPIO72
GPIO73
GPIO74
GPIO75
GPIO76
GPIO77
GPIO78
GPIO79
GPIO80
GPIO81
GPIO82
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
GPIO[64] control bit
GPIO[65] control bit
GPIO[66] control bit
GPIO[67] control bit
GPIO[68] control bit
GPIO[69] control bit
GPIO[70] control bit
GPIO[71] control bit
GPIO[72] control bit
GPIO[73] control bit
GPIO[74] control bit
GPIO[75] control bit
GPIO[76] control bit
GPIO[77] control bit
GPIO[78] control bit
GPIO[79] control bit
GPIO[80] control bit
GPIO[81] control bit
GPIO[82] control bit
72
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Control registers
Bit(s)
D19
D20
D21
D22
D23
D24
D25
D26
D27
D28
D29
D30
D31
Access Mnemonic
Reset
Description
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
GPIO83
GPIO84
GPIO85
GPIO86
GPIO87
GPIO88
GPIO89
GPIO90
GPIO91
GPIO92
GPIO93
GPIO94
GPIO95
0
0
0
0
0
0
0
0
0
0
0
0
0
GPIO[83] control bit
GPIO[84] control bit
GPIO[85] control bit
GPIO[86] control bit
GPIO[87] control bit
GPIO[88] control bit
GPIO[89] control bit
GPIO[90] control bit
GPIO[91] control bit
GPIO[92] control bit
GPIO[93] control bit
GPIO[94] control bit
GPIO[95] control bit
GPIO Control
Register #3
Address: A090_2078
Bit(s)
D00
D01
D02
D03
D04
D05
D06
D07
D08
D09
D10
D11
D31:12
Access Mnemonic
Reset
Description
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
N/A
GPIO96
0
GPIO[96] control bit
GPIO[97] control bit
GPIO[98] control bit
GPIO[99] control bit
GPIO[100] control bit
GPIO[101] control bit
GPIO[102] control bit
GPIO[103] control bit
GPIO_A[0] control bit
GPIO_A[1] control bit
GPIO_A[2] control bit
GPIO_A[3] control bit
N/A
GPIO97
0
GPIO98
0
GPIO99
0
GPIO100
GPIO101
GPIO102
GPIO103
GPIO_A0
GPIO_A1
GPIO_A2
GPIO_A3
Reserved
0
0
0
0
0
0
0
0
N/A
www.digiembedded.com
73
I / O C O N T ROL M O D U L E
GPIO Status registers
GPIO Status registers
GPIO Status Registers #0 through #3 contain the status information for each of the
108 GPIO pins. In all configurations, the value on the GPIO input pin is brought to
the status register and the CPU has read-only access to the register.
GPIO Status
Register #1
Address: A090_2080
Bit(s)
D00
D01
D02
D03
D04
D05
D06
D07
D08
D09
D10
D11
D12
D13
D14
D15
D16
D17
D18
D19
D20
D21
D22
D23
D24
D25
Access Mnemonic
Reset
Description
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
GPIO32
GPIO33
GPIO34
GPIO35
GPIO36
GPIO37
GPIO38
GPIO39
GPIO40
GPIO41
GPIO42
GPIO43
GPIO44
GPIO45
GPIO46
GPIO47
GPIO48
GPIO49
GPIO50
GPIO51
GPIO52
GPIO53
GPIO54
GPIO55
GPIO56
GPIO57
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
GPIO[32] status bit
GPIO[33] status bit
GPIO[34] status bit
GPIO[35] status bit
GPIO[36] status bit
GPIO[37] status bit
GPIO[38] status bit
GPIO[39] status bit
GPIO[40] status bit
GPIO[41] status bit
GPIO[42] status bit
GPIO[43] status bit
GPIO[44] status bit
GPIO[45] status bit
GPIO[46] status bit
GPIO[47] status bit
GPIO[48] status bit
GPIO[49] status bit
GPIO[50] status bit
GPIO[51] status bit
GPIO[52] status bit
GPIO[3] status bit
GPIO[54] status bit
GPIO[55] status bit
GPIO[56] status bit
GPIO[57] status bit
74
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
GPIO Status registers
Bit(s)
D26
D27
D28
D29
D30
D31
Access Mnemonic
Reset
Description
R
R
R
R
R
R
GPIO58
GPIO59
GPIO60
GPIO61
GPIO62
GPIO63
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
GPIO[58] status bit
GPIO[59] status bit
GPIO[60] status bit
GPIO[61] status bit
GPIO[62] status bit
GPIO[63] status bit
GPIO Status
Register #2
Address: A090_2084
Bit(s)
D00
D01
D02
D03
D04
D05
D06
D07
D08
D09
D10
D11
D12
D13
D14
D15
D16
D17
D18
D19
D20
D21
D22
Access Mnemonic
Reset
Description
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
GPIO64
GPIO65
GPIO66
GPIO67
GPIO68
GPIO69
GPIO70
GPIO71
GPIO72
GPIO73
GPIO74
GPIO75
GPIO76
GPIO77
GPIO78
GPIO79
GPIO80
GPIO81
GPIO82
GPIO83
GPIO84
GPIO85
GPIO86
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
GPIO[64] status bit
GPIO[65] status bit
GPIO[66] status bit
GPIO[67] status bit
GPIO[68] status bit
GPIO[69] status bit
GPIO[70] status bit
GPIO[71] status bit
GPIO[72] status bit
GPIO[73] status bit
GPIO[74] status bit
GPIO[75] status bit
GPIO[76] status bit
GPIO[77] status bit
GPIO[78] status bit
GPIO[79] status bit
GPIO[80] status bit
GPIO[81] status bit
GPIO[82] status bit
GPIO[83] status bit
GPIO[84] status bit
GPIO[85] status bit
GPIO[86] status bit
www.digiembedded.com
75
I / O C O N T ROL M O D U L E
Memory Bus Configuration register
Bit(s)
D23
D24
D25
D26
D27
D28
D29
D30
D31
Access Mnemonic
Reset
Description
R
R
R
R
R
R
R
R
R
GPIO87
GPIO88
GPIO89
GPIO90
GPIO91
GPIO92
GPIO93
GPIO94
GPIO95
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
GPIO[87] status bit
GPIO[88] status bit
GPIO[89] status bit
GPIO[90] status bit
GPIO[91] status bit
GPIO[92] status bit
GPIO[93] status bit
GPIO[94] status bit
GPIO[95] status bit
GPIO Status
Register #3
Address: A090_2088
Bit(s)
D00
D01
D02
D03
D04
D05
D06
D07
D08
D09
D10
D11
D31:12
Access Mnemonic
Reset
Description
R
GPIO96
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
Undefined
N/A
GPIO[96] status bit
GPIO[97] status bit
GPIO[98] status bit
GPIO[99] status bit
GPIO[100] status bit
GPIO[101] status bit
GPIO[102] status bit
GPIO[103] status bit
GPIO_A[0] status bit
GPIO_A[1] status bit
GPIO_A[2] status bit
GPIO_A[3] status bit
N/A
R
GPIO97
R
GPIO98
R
GPIO99
R
GPIO100
GPIO101
GPIO102
GPIO103
GPIO_A0
GPIO_A1
GPIO_A2
GPIO_A3
Reserved
R
R
R
R
R
R
R
N/A
Memory Bus Configuration register
The Memory Bus Configuration register controls chip select and upper address
options.
Address: A090_208C
76
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
Memory Bus Configuration register
Bit(s)
Access Mnemonic
Reset
Description
D02:00
R/W
R/W
R/W
R/W
CS0
CS1
CS2
CS3
0x4
Controls which system memory chip select is
routed to CS0
000
001
010
011
100
101
110
111
dy_cs_0
dy_cs_1
dy_cs_2
dy_cs_3
st_cs_0 (default)
st_cs_1
st_cs_2
st_cs_3
D05:03
D08:06
D11:09
0x0
0x5
0x1
Controls which system memory chip select is
routed to CS1
000
001
010
011
100
101
110
111
dy_cs_0 (default)
dy_cs_1
dy_cs_2
dy_cs_3
st_cs_0
st_cs_1
st_cs_2
st_cs_3
Controls which system memory chip select is
routed to CS2
000
001
010
011
100
101
110
111
dy_cs_0
dy_cs_1
dy_cs_2
dy_cs_3
st_cs_0
st_cs_1 (default)
st_cs_2
st_cs_3
Controls which system memory chip select is
routed to CS3
000
001
010
011
100
101
110
111
dy_cs_0
dy_cs_1 (default)
dy_cs_2
dy_cs_3
st_cs_0
st_cs_1
st_cs_2
st_cs_3
www.digiembedded.com
77
I / O C O N T ROL M O D U L E
Memory Bus Configuration register
Bit(s)
Access Mnemonic
Reset
Description
D14:12
R/W
R/W
R/W
R/W
R/W
CS4
0x6
Controls which system memory chip select is
routed to CS4
000
001
010
011
100
101
110
111
dy_cs_0
dy_cs_1
dy_cs_2
dy_cs_3
st_cs_0
st_cs_1
st_cs_2 (default)
st_cs_3
D17:15
D20:18
D23:21
CS5
0x2
0x7
0x3
0x0
Controls which system memory chip select is
routed to CS5
000
001
010
011
100
101
110
111
dy_cs_0
dy_cs_1
dy_cs_2 (default)
dy_cs_3
st_cs_0
st_cs_1
st_cs_2
st_cs_3
CS6
Controls which system memory chip select is
routed to CS6
000
001
010
011
100
101
110
111
dy_cs_0
dy_cs_1
dy_cs_2
dy_cs_3
st_cs_0
st_cs_1
st_cs_2
st_cs_3 (default)
CS7
Controls which system memory chip select is
routed to CS7
000
001
010
011
100
101
110
111
dy_cs_0
dy_cs_1
dy_cs_2
dy_cs_3 (default)
st_cs_0
st_cs_1
st_cs_2
st_cs_3
D24
DHPUDIS
High data bus pullup control
0
1
Enable pullup resistors on data[31:16]
Disable pullup resistors on data[31:16]
Note:
Bits 15:00 are output and controlled
through GPIO
78
Hardware Reference NS9215
I / O C O N T ROL M O D U L E
Memory Bus Configuration register
Bit(s)
Access Mnemonic
R/W APUDIS
Reset
Description
D25
0x0
Address bus pullup control
(Applicable only to address associated with
hardware strapping)
0
1
Enable pullup resistors
Disable pullup resistors
Note:
Bits 27:24 are output and controlled
through GPIO
D31:26
N/A
Reserved
N/A
N/A
www.digiembedded.com
79
I / O C O N T ROL M O D U L E
Memory Bus Configuration register
80
Hardware Reference NS9215
Working with the CPU
C
H
A
P
T
E
R
3
T
his processor core is based on the ARM926EJ-S processor. The ARM926EJ-S
processor belongs to the ARM9 family of general-purpose microprocessors. The
ARM926EJ-S processor is targeted at multi-tasking applications in which full memory
management, high performance, low die size, and low power are important.
About the
processor
The ARM926EJ-S processor supports the 32-bit ARM and 16-bit Thumb instructions
sets, allowing you to trade off between high performance and high code density.
The processor includes features for efficient execution of Java byte codes,
providing Java performance similar to JIT but without the associated overhead.
The ARM926EJ-S supports the ARM debug architecture, and includes logic to assist in
both hardware and software debug. The processor has a Harvard-cached
architecture and provides a complete high-performance processor subsystem,
including:
ꢀ
ꢀ
ARM926EJ-S integer core
Memory Management Unit (MMU) (see "MemoryManagement Unit (MMU),"
ꢀ
Separate instruction and data AMBA AHB bus interfaces
81
WOR KI N G W I TH T H E C P U
Instruction sets
Arm926EJ-S
process block
diagram
This drawing shows the main blocks in the ARM926EJ-S processor.
DEXT
Write buffer
DROUTE
DCACHE
Cache
writeback
write
buffer
AHB
PA
TAGRAM
Data
AHB
interface
DA
IA
MMU
WDATA
RDATA
Bus
interface
unit
DMVA
IMVA
ARM926EJ-S
FCSE
TLB
AHB
Instruction
AHB
INSTR
interface
ICACHE
IEXT
IROUTE
Instruction sets
The processor executes three instruction sets:
ꢀ
ꢀ
ꢀ
32-bit ARM instruction set
16-bit Thumb instruction set
8-bit Java instruction set
ARM instruction
set
The ARM instruction set allows a program to achieve maximum performance with
the minimum number of instructions. The majority of instructions are executed in a
single cycle.
Thumb
instruction set
The Thumb instruction set is simpler than the ARM instruction set, and offers
increased code density for code that does not require maximum performance. Code
can switch between ARM and Thumb instruction sets on any procedure call.
82
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
System control processor (CP15) registers
Java instruction
set
In Java state, the processor core executes a majority of Java bytecodes naturally.
Bytecodes are decoded in two states, compared to a single decode stage when in
Java.
System control processor (CP15) registers
The system control processor (CP15) registers configure and control most of the
options in the ARM926EJ-S processor. Access the CP15 registers using only the MRC
and MCR instructions in a privileged mode; the instructions are provided in the
explanation of each applicable register. Using other instructions, or MRC and MCR in
unprivileged mode, results in an UNDEFINED instruction exception.
ARM926EJ-S
The ARM926EJ-S has three distinct types of addresses:
system addresses
ꢀ
ꢀ
ꢀ
In the ARM926EJ-S domain: Virtual address (VA)
In the Cache and MMU domain: Modified virtual address (MVA)
In the AMBA domain: Physical address (PA)
Address
manipulation
example
This is an example of the address manipulation that occurs when the ARM926EJ-S
core requests an instruction:
1
2
The ARM926EJ-S core issues the virtual address of the instruction.
The virtual address is translated using the FCSE PID (fast context switch
extension process ID) value to the modified virtual address. The instruction
cache (ICache) and memory management unit (MMU) find the modified virtual
address (see “R13:Process ID register” on page 102).
3
If the protection check carried out by the MMU on the modified virtual address
does not abort and the modified virtual address tag is in the ICache, the
instruction data is returned to the ARM926EJ-S core.
If the protection check carried out by the MMU on the modified virtual
address does not abort but the cache misses (the MVA tag is not in the
cache), the MMU translates the modified virtual address to produce the
physical address. This address is given to the AMBA bus interface to perform
an external access.
Accessing CP15
registers
Use only MRC and MCR instructions, only in privileged mode, to access CP15
www.digiembedded.com
83
WOR KI N G W I TH T H E C P U
System control processor (CP15) registers
31
28 27 26 25 24 23
21 20 19
16 15
12 11 10
9
1
8
1
7
5
4
1
3
0
Opcode
Opcode
_2
Cond
CRn
Rd
CRm
1
1
1
0
L
1
1
_1
Figure 1: CP15 MRC and MCR bit pattern
The mnemonics for these instructions are:
MCR{cond} p15,opcode_1,Rd,CRn,CRm,opcode_2
MRC{cond} p15,opcode_1,Rd,CRn,CRm,opcode_2
If you try to read from a write-only register or write to a read-only register, you will
have UNPREDICTABLE results. In all instructions that access CP15:
ꢀ
ꢀ
The opcode_1 field SHOULD BE ZERO, except when the values specified are used
to select the operations you want. Using other values results in unpredictable
behavior.
The opcode_2 and CRm fields SHOULD BE ZERO, except when the values specified
are used to select the behavior you want. Using other values results in
unpredictable behavior.
Terms and
abbreviations
This table lists the terms and abbreviations used in the CP15 registers and
explanations.
Term
Abbreviation Description
UNPREDICTABLE
UNP
For reads:
The data returned when reading from this location is
unpredictable, and can have any value.
For writes:
Writing to this location causes unpredictable
behavior, or an unpredictable change in device
configuration.
UNDEFINED
UND
An instruction that accesses CP15 in the manner
indicated takes the UNDEFINED instruction
exception.
SHOULD BE ZERO
SHOULD BE ONE
SBZ
When writing to this field, all bits of the field
SHOULD BE ZERO.
SBO
SBZP
When writing to this location, all bits in this field
SHOULD BE ONE.
SHOULD BE ZERO or
PRESERVED
When writing to this location, all bits of this field
SHOULD BE ZERO or PRESERVED by writing the
same value that has been read previously from the
same field.
84
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
System control processor (CP15) registers
Note: In all cases, reading from or writing any data values to any CP15 registers,
including those fields specified as UNPREDICTABLE, SHOULD BE ONE, or SHOULD
BE ZERO, does not cause any physical damage to the chip.
Register summary
CP15 uses 16 registers.
ꢀ
ꢀ
Register locations 0, 5, and 13 each provide access to more than one register.
The register accessed depends on the value of the opcode_2 field in the CP15
Register location 9 provides access to more than one register. The register
Register
Reads
Writes
0
0
1
2
3
4
5
6
ID code (based on opcode_2 value)
Cache type (based on opcode_2 value)
Control
Unpredictable
Unpredictable
Control
Translation table base
Domain access control
Reserved
Translation table base
Domain access control
Reserved
Data fault status (based on opcode_2 value)
Data fault status (based on opcode_2 value)
Instruction fault status (based on opcode_2
value)
Instruction fault status (based on opcode_2
value)
7
Cache operations
Cache operations
TLB
8
Unpredictable
9
Cache lockdown (based on CRm value)
TLB lockdown
Cache lockdown
TLB lockdown
Reserved
10
11 and 12
13
Reserved
FCSE PID (based on opcode_2 value)
FCSE = Fast context switch extension
PID = Process identifier
FCSE PID (based on opcode_2 value)
FCSE = Fast context switch extension
PID = Process identifier
13
14
15
Context ID (based on opcode_2 value)
Reserved
Context ID (based on opcode_2 value)
Reserved
Test configuration
Test configuration
All CP15 register bits that are defined and contain state are set to 0 by reset, with
these exceptions:
ꢀ
The V bit is set to 0 at reset if the VINITHI signal is low, and set to 1 if the
VINITHI signal is high.
www.digiembedded.com
85
WOR KI N G W I TH T H E C P U
R0: ID code and cache type status registers
ꢀ
The B bit is set to 0 at reset if the BIGENDINIT signal is low, and set to 1 if the
BIGENDINIT signal is high.
R0: ID code and cache type status registers
Register R0 access the ID register, and cache type register. Reading from R0 returns
the device ID, and the cache type, depending on the opcode_2 value:
opcode_2=0
opcode_2=1
ID value
instruction and data cache type
The CRm field SHOULD BE ZERO when reading from these registers. This table shows
the instructions you can use to read register R0.
Function
Instruction
MRC p15,0,Rd,c0,c0,{0, 3-7}
MRC p15,0,Rd,c0,c0,1
Read ID code
Read cache type
Writing to register R0 is UNPREDICTABLE.
R0: ID code
R0: ID code is a read-only register that returns the 32-bit device ID code. You can
access the ID code register by reading CP15 register R0 with the opcode_2 field set to
any value other than 1 or 2. Note this example:
MRC p15, 0, Rd, c0, c0, {0, 3-7}; returns ID
This is the contents of the ID code register.
Bits
Function
Value
0x41
0x0
[31:24]
[23:20]
[19:16]
[15:4]
[3:0]
ASCII code of implementer trademark
Specification revision
Architecture (ARMv5TEJ)
Part number
0x6
0x926
0x0
Layout revision
R0: Cache type
register
R0: Cache type is a read-only register that contains information about the size and
architecture of the instruction cache (ICache) and data cache (DCache) enabling
operating systems to establish how to perform operations such as cache cleaning
cache.
86
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
R0: ID code and cache type status registers
You can access the cache type register by reading CP15 register R0 with the opcode_2
field set to 1. Note this example:
MRC p15, 0, Rd, c0, c0, 1; returns cache details
Cache type
register and field
description
31
0
28
25 24 23
S
12
Ctype
Dsize
Isize
0
0
Field
Description
Ctype
Determines the cache type, and specifies whether the cache supports lockdown and how it is
cleaned. Ctype encoding is shown below; all unused values are reserved.
Value: 0b1110
Method: Writeback
Cache cleaning: Register 7 operations (see “R7:Cache Operations register” on page 94)
Cache lockdown: Format C (see “R9: Cache Lockdown register” on page 98)
S bit
Specifies whether the cache is a unified cache (S=0) or separate ICache and DCache (S=1).
Will always report separate ICache and DCache for this processor.
Dsize
Isize
Specifies the size, line length, and associativity of the DCache.
Species the size, length and associativity of the ICache.
Dsize and Isize
fields
The Dsize and Isize fields in the cache type register have the same format, as
shown:
11 10
9
6
5
3
2
1
0
0
0
Size
Assoc
M
Len
The field contains these bits:
www.digiembedded.com
87
WOR KI N G W I TH T H E C P U
R1: Control register
Field
Description
Size
Determines the cache size in conjunction with the M bit.
ꢀ
ꢀ
ꢀ
ꢀ
The M bit is 0 for DCache and ICache.
The size field is bits [21:18] for the DCache and bits [9:6] for the ICache.
The minimum size of each cache is 4 KB; the maximum size is 128 KB.
Cache size encoding with M=0:
Size field
0b0011
Cache size
4 KB
0b0100
8 KB
Note:
The processor always reports 4KB for DCache and 8KB for ICache.
Assoc
Determines the cache associativity in conjunction with the M bit.
ꢀ
ꢀ
ꢀ
The M bit is 0 for both DCache and ICache.
The assoc field is bits [17:15 for the DCache and bits [5:3] for the ICache.
Cache associativity with encoding:
Assoc field
0b010
Associativity
4-way
Other values
Reserved
M bit
Len
Multiplier bit. Determines the cache size and cache associativity values in conjunction with
the size and assoc fields.
Note:
This field must be set to 0 for the ARM926EJ-S processor.
Determines the line length of the cache.
ꢀ
ꢀ
The len field is bits [13:12] for the DCache and bits [1:0] for the ICache.
Line length encoding:
Len field
10
Other values
Cache line length
8 words (32 bytes)
Reserved
R1: Control register
Register R1 is the control register for the ARM926EJ-S processor. This register
specifies the configuration used to enable and disable the caches and MMU (memory
management unit). It is recommended that you access this register using a read-
modify-write sequence.
For both reading and writing, the CRm and opcode_2 fields SHOULD BE ZERO. Use these
instructions to read and write this register:
MRC p15, 0, Rd, c1, c0, 0; read control register
MCR p15, Rd, c1, c0, 0; write control register
All defined control bits are set to zero on reset except the V bit and B bit.
ꢀ
ꢀ
The V bit is set to zero at reset if the VINITHI signal is low.
The B bit is set to zero at reset if the BIGENDINIT signal is low, and set to one if
the BIGENDINIT signal is high.
88
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
R1: Control register
Control register
Bit functionality
31
19 18 17 16 15 14 13 12 11 10
9
8
S
7
B
6
3
2
1
A
0
S
B
O
S
B
Z
S
B
O
L
4
R
R
SBZ
V
I
SBZ
R
SBO
C
M
Bits
Name
Function
[31:19]
N/A
Reserved:
ꢀ
ꢀ
When read, returns an UNPREDICTABLE value.
When written, SHOULD BE ZERO, or a value read from bits
[31:19] on the same processor.
ꢀ
Use a read-modify-write sequence when modifying this
register to provide the greatest future compatibility.
[18]
[17]
[16]
[15]
N/A
N/A
N/A
L4
Reserved, SBO. Read = 1, write =1.
Reserved, SBZ. read = 0, write = 0.
Reserved, SBO. Read = 1, write = 1.
Determines whether the T is set when load instructions change
the PC.
0
1
Loads to PC set the T bit
Loads to PC do not set the T bit
[14]
[13]
RR bit
V bit
Replacement strategy for ICache and DCache
0
1
Random replacement
Round-robin replacement
Location of exception vectors
0
Normal exception vectors selected; address range=0x0000
0000 to 0x0000 001C
1
High exception vectors selected; address range=0xFFFF
0000 to 0xFFFF 001C
Set to the value of VINITHI on reset.
[12]
I bit
ICache enable/disable
0
1
ICache disabled
ICache enabled
SHOULD BE ZERO
[11:10]
[9]
N/A
R bit
ROM protection
Modifies the ROM protection system.
[8]
[7]
S bit
B bit
System protection
Modifies the MMU protection system. See
Endianness
0
1
Little endian operation
Big endian operation
Set to the value of BIGENDINIT on reset.
www.digiembedded.com
89
WOR KI N G W I TH T H E C P U
R1: Control register
Bits
[6:3]
[2]
Name
Function
N/A
Reserved. SHOULD BE ONE.
DCache enable/disable
C bit
0
1
Cache disabled
Cache enabled
[1]
[0]
A bit
M bit
Alignment fault enable/disable
0
1
Data address alignment fault checking disabled
Data address alignment fault checking enabled
MMU enable/disable
0
1
Disabled
Enabled
ICache and
The M, C, I, and RR bits directly affect ICache and DCache behavior, as shown:
DCache behavior
Cache
MMU
Behavior
ICache disabled
ICache enabled
Enabled or disabled
Disabled
All instruction fetches are from external memory (AHB).
All instruction fetches are cachable, with no protection
checking. All addresses are flat-mapped; that is:
VA=MVA=PA.
ICache enabled
Enabled
Instruction fetches are cachable or noncachable, and
protection checks are performed. All addresses are
remapped from VA to PA, depending on the MMU page
table entry; that is, VA translated to MVA, MVA
remapped to PA.
DCache disabled
DCache enabled
Enabled or disabled
Disabled
All data accesses are to external memory (AHB).
All data accesses are noncachable nonbufferable. All
addresses are flat-mapped; that is, VA=MVA=PA.
DCache enabled
Enabled
All data accesses are cachable or noncachable, and
protection checks are performed. All addresses are
remapped from VA to PA, depending on the MMU page
table entry; that is, VA translated to MVA, MVA
remapped to PA.
If either the DCache or ICache is disabled, the contents of that cache are not
accessed. If the cache subsequently is re-enabled, the contents will not have
changed. To guarantee that memory coherency is maintained, the DCache must be
cleaned of dirty data before it is disabled.
90
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
R2: Translation Table Base register
R2: Translation Table Base register
Register R2 is the Translation Table Base register (TTBR), for the base address of the
first-level translation table.
ꢀ
ꢀ
Reading from R2 returns the pointer to the currently active first-level
translation table in bits [31:14] and an UNPREDICTABLE value in bits [13:0].
Writing to R2 updates the pointer to the first-level translation table from the
value in bits[31:14] of the written value. Bits [13:0] SHOULD BE ZERO.
Use these instructions to access the Translation Table Base register:
MRC p15, 0, Rd, c2, c0, 0; read TTBR
MCR p15, 0, Rd, c2, c0, 0; write TTBR
The CRm and opcode_2 fields SHOULD BE ZERO when writing to R2.
Register format
31
14 13
0
Translation table base
UNP/SBZ
R3:Domain Access Control register
Register R3 is the Domain Access Control register and consists of 16 two-bit fields.
ꢀ
ꢀ
Reading from R3 returns the value of the Domain Access Control register.
Writing to R3 writes the value of the Domain Access Control register.
Register format
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5
9
8
7
6
5
4
3
2
1
0
D4
D3
D2
D1
D0
Access
permissions and
instructions
Each two-bit field defines the access permissions for one of the 16 domains
(D15–D0):
00
01
10
11
No access: Any access generates a domain fault
Client: Accesses are checked against the access permission bits in the section or page descriptor
Reserved: Currently behaves like no access mode (00)
Manager: Accesses are not checked against the access permission bits, so a permission fault
cannot be generated.
Use these instructions to access the Domain Access Control register:
MRC p15, 0, Rd, c3, c0, 0; read domain access permissions
MCR p15, 0, Rd, c3, c0, 0; write domain access permissions
www.digiembedded.com
91
WOR KI N G W I TH T H E C P U
R4 register
R4 register
Accessing (reading or writing) this register causes UNPREDICTABLE behavior.
R5: Fault Status registers
Register R5 accesses the Fault Status registers (FSRs). The Fault Status registers
contain the source of the last instruction or data fault. The instruction-side FSR is
intended for debug purposes only.
The FSR is updated for alignment faults and for external aborts that occur while the
MMU is disabled. The FSR accessed is determined by the opcode_2 value:
opcode_2=0
opcode_2=1
Data Fault Status register (DFSR)
Instruction Fault Status register (IFSR)
encoding.
Access
Access the FSRs using these instructions:
instructions
MRC p15, 0, Rd, c5, c0, 0; read DFSR
MCR p15, 0, Rd, c5, c0, 0; write DFSR
MRC p15, 0, Rd, c5, c0, 1; read IFSR
MCR p15, 0, Rd, c5, c0, 1; write IFSR
Register format
31
9
8
0
7
4
3
0
UNP/SBZ
Domain
Status
Register bits
Bits
[31:9]
[8]
Description
UNPREDICTABLE/SHOULD BE ZERO
Always reads as zero. Writes are ignored.
[7:4]
Specifies which of the 16 domains (D15–D0) was being accessed when a data fault
occurred.
[3:0]
Type of fault generated. (See "MemoryManagement Unit (MMU)," beginning on page
92
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
R6: Fault Address register
Status and
domain fields
This table shows the encodings used for the status field in the Fault Status register,
and indicates whether the domain field contains valid information. See “MMU faults
and CPU aborts” on page 119 for information about MMU aborts in Fault Address and
Fault Status registers.
Priority
Source
Size
Status
Domain
0b00x1
Highest
Alignment
N/A
Invalid
0b1100
0b1110
External abort on translation
First level
Invalid
Valid
Second level
0b0101
0b0111
Translation
Domain
Section page
Section page
Section page
Section page
Invalid
Valid
0b1001
0b1011
Valid
Valid
0b1101
0b1111
Permission
External abort
Valid
Valid
0b1000
0b1010
Lowest
Valid
Valid
R6: Fault Address register
Register R6 accesses the Fault Address register (FAR). The Fault Address register
contains the modified virtual address of the access attempted when a data abort
occurred. This register is updated only for data aborts, not for prefetch aborts; it is
updated also for alignment faults and external aborts that occur while the MMU is
disabled.
Writing R6 sets the Fault Address register to the value of the data written. This is
useful for debugging, to restore the value of a Fault Address register to a previous
state.
The CRm and opcode_2 fields SHOULD BE ZERO when reading or writing R6.
Access
Use these instructions to access the Fault Address register:
instructions
MRC p15, 0, Rd, c6, c0, 0; read FAR
MCR p15, 0, Rd, c6, c0, 0; write FAR
www.digiembedded.com
93
WOR KI N G W I TH T H E C P U
R7:Cache Operations register
R7:Cache Operations register
Register R7 controls the caches and write buffer. The function of each cache
operation is selected by the opcode_2 and CRm fields in the MCR instruction that
writes to CP15 R7. Writing other opcode_2 or CRm values is UNPREDICTABLE.
Reading from R7 is UNPREDICTABLE, with the exception of the two test and clean
Write instruction
Cache functions
Use this instruction to write to the Cache Operations register:
MCR p15, opcode_1, Rd, CRn, CRm, opcode_2
This table describes the cache functions provided by register R7.
Function
Description
Invalidate cache
Invalidates all cache data, including any dirty data.
Invalidates a single cache line, discarding any dirty data.
Invalidate single entry using either index or
modified virtual address
Clean single data entry using either index or
modified virtual address
Writes the specified DCache line to main memory if the
line is marked valid and dirty. The line is marked as not
dirty, and the valid bit is unchanged.
Clean and invalidate single data entry using
wither index or modified virtual address.
Writes the specified DCache line to main memory if the
line is marked valid and dirty. The line is marked not valid.
Test and clean DCache
Tests a number of cache lines, and cleans one of them if
any are dirty. Returns the overall dirty state of the cache in
Test, clean, and invalidate DCache
Prefetch ICache line
Tests a number of cache lines, and cleans one of them if
any are dirty. When the entire cache has been tested and
cleaned, it is invalidated. (See “Test and clean DCache
Performs an ICache lookup of the specified modified
virtual address. If the cache misses and the region is
cachable, a linefill is performed.
94
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
R7:Cache Operations register
Function
Description
Drain write buffer
Acts as an explicit memory barrier. This instruction drains
the contents of the write buffers of all memory stores
occurring in program order before the instruction is
completed. No instructions occurring in program order
after this instruction are executed until the instruction
completes.
Use this instruction when timing of specific stores to the
level two memory system has to be controlled (for
example, when a store to an interrupt acknowledge
location has to complete before interrupts are enabled).
Wait for interrupt
Drains the contents of the write buffers, puts the processor
into low-power state, and stops the processor from
executing further instructions until an interrupt (or debug
request) occurs. When an interrupt does occur, the MCR
instruction completes, and the IRQ or FIRQ handler is
entered as normal.
The return link in R14_irq or R14_fiq contains the address
of the MCR instruction plus eight, so the typical instruction
used for interrupt return (SUBS PC,R14,#4) returns to the
instruction following the MCR.
Cache operation
functions
This table lists the cache operation functions and associated data and instruction
formats for R7.
Function/operation
Data format
SBZ
Instruction
MCR p15, 0, Rd, c7, c7, 0
MCR p15, 0, Rd, c7, c5, 0
MCR p15, 0, Rd, c7, c5, 1
MCR p15, 0, Rd, c7, c5, 2
MCR p15, 0, Rd, c7, c13, 1
MCR p15, 0, Rd, c7, c6, 0
MCR p15, 0, Rd, c7, c6, 1
MCR p15, 0, Rd, c7, c6, 2
MCR p15, 0, Rd, c7, c10, 1
MCR p15, 0, Rd, c7, C10, 2
MRC p15, 0, Rd, c7, c10, 3
MCR p15, 0, Rd, c7, c14, 1
MCR p15, 0, Rd, c7, c14, 2
MRC p15, 0, Rd, c7, c14, 3
Invalidate ICache and DCache
Invalidate ICache
SBZ
Invalidate ICache single entry (MVA)
Invalidate ICache single entry (set/way)
Prefetch ICache line (MVA)
MVA
Set/Way
MVA
Invalidate DCache
SBZ
Invalidate DCache single entry (MVA)
Invalidate DCache single entry (set/way)
Clean DCache single entry (MVA)
Clean DCache single entry (set/way)
Test and clean DCache
MVA
Set/Way
MVA
Set/Way
N/A
Clean and invalidate DCache entry (MVA)
Clean and invalidate DCache entry (set/way)
Test, clean, and invalidate DCache
MVA
Set/Way
N/A
www.digiembedded.com
95
WOR KI N G W I TH T H E C P U
R7:Cache Operations register
Function/operation
Drain write buffer
Data format
SBZ
Instruction
MCR p15, 0, Rd, c7, c10, 4
MCR p15, 0, Rd, c7, c0, 4
Wait for interrupt
SBZ
Modified virtual
address format
(MVA)
This is the modified virtual address format for Rd for the CP15 R7 MCR operations.
31
S+5 S+4
Set(=index)
5
4
2
1
0
Tag
Word
SBZ
ꢀ
ꢀ
The tag, set, and word fields define the MVA.
For all cache operations, the word field SHOULD BE ZERO.
Set/Way format
This is the Set/Way format for Rd for the CP15 R7 MCR operations.
31
32-A 31-A
Way
S+5 S+4
Set(=index)
5
4
2
1
0
SBZ
Word
SBZ
ꢀ
A and S are the base-two logarithms of the associativity and the number of
sets.
ꢀ
ꢀ
The set, way, and word files define the format.
For all of the cache operations, word SHOULD BE ZERO.
Set/Way example
For example, a 16 KB cache, 4-way set associative, 8-word line results in the
following:
ꢀ
ꢀ
A = log associativity = log 4 = 2
2
2
S = log NSETS where
2
NSETS = cache size in bytes/associativity/line length in bytes:
NSETS = 16384/4/32 = 128
Result: S = log 128 = 7
2
Test and clean
DCache
instructions
The test and clean DCache instruction provides an efficient way to clean the entire
DCache, using a simple loop. The test and clean DCache instruction tests a number
of lines in the DCache to determine whether any of them are dirty. If any dirty lines
are found, one of those lines is cleaned. The test and clean DCache instruction also
returns the status of the entire DCache in bit 30.
96
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
R8:TLB Operations register
Note: The test and clean DCache instruction MRC p15, 0, r15, c7, c10, 3 is a special
encoding that uses r15 as a destination operand. The PC is not changed by
using this instruction, however. This MRC instruction also sets the condition
code flags.
If the cache contains any dirty lines, bit 30 is set to 0. If the cache contains no dirty
lines, bit 30 is set to 1. Use the following loop to clean the entire cache:
tc_loop:
MRC p15, 0, r15, c7, c10, 3; test and clean
BNE tc_loop
Test, clean, and
invalidate DCache
instruction
The test, clean, and invalidate DCache instruction is the same as the test and clean
DCache instruction except that when the entire cache has been cleaned, it is
invalidated. Use the following loop to test, clean, and invalidate the entire DCache:
tci_loop:
MRC p15, 0, r15, c7, c14, 3; test clean and invalidate
BNE tci_loop
R8:TLB Operations register
Register R8 is a write-only register that controls the translation lookaside buffer
(TLB). There is a single TLB used to hold entries for both data and instructions. The
TLB is divided into two parts:
ꢀ
ꢀ
Set-associative
Fully-associative
The fully-associative part (also referred to as the lockdown part of the TLB) stores
entries to be locked down. Entries held in the lockdown part of the register are
preserved during an invalidate-TLB operation. Entries can be removed from the
lockdown TLB using an invalidate TLB single entry operation.
TLB operations
There are six TLB operations; the function to be performed is selected by the
opcode_2 and CRm fields in the MCR instruction used to write register R8. Writing
other opcode_2 or CRm values is UNPREDICTABLE. Reading from this register is
UNPREDICTABLE.
TLB operation
instructions
Use these instruction to perform TLB operations.
Operation
Data
SBZ
Instruction
MCR p15, 0, Rd, c8, c7, 0
MCR p15, 0, Rd, c8, c7. 1
MCR p15, 0, Rd, c8, c5, 0
MCR p15, 0, Rd, c8, c5, 1
Invalidate set-associative TLB
Invalidate single entry
Invalidate set-associative TLB
Invalidate single entry
SBZ
SBZ
MVA
www.digiembedded.com
97
WOR KI N G W I TH T H E C P U
R9: Cache Lockdown register
Operation
Data
SBZ
Instruction
MCR p15, 0, Rd, c8, c6, 0
MCR p15, 0, Rd, c8, c6, 1
Invalidate set-associative TLB
Invalidate single entry
MVA
ꢀ
ꢀ
The invalidate TLB operations invalidate all the unpreserved entries in the
TLB.
The invalidate TLB single entry operations invalidate any TLB entry
corresponding to the modified virtual address given in Rd, regardless of its
an explanation of how to preserve TLB entries.
Modified virtual
address format
(MVA)
This is the modified virtual address format used for invalid TLB single entry
operations.
31
10
9
0
Modified virtual address
SBZ
Note: If either small or large pages are used, and these pages contain subpage
access permissions that are different, you must use four invalidate TLB single
entry operations, with the MVA set to each subpage, to invalidate all
information related to that page held in a TLB.
R9: Cache Lockdown register
Register R9 access the cache lockdown registers. Access this register using CRm = 0.
Cache ways
The Cache Lockdown register uses a cache-way-based locking scheme (format C)
that allows you to control each cache way independently.
These registers allow you to control which cache-ways of the four-way cache are
used for the allocation on a linefill. When the registers are defined, subsequent
linefills are placed only in the specified target cache way. This gives you some
control over the cache pollution cause by particular applications, and provides a
traditional lockdown operation for locking critical code into the cache.
A locking bit for each cache way determines whether the normal cache allocation is
allowed to access that cache way (see “Cache Lockdown register L bits” on
page 99). A maximum of three cache ways of the four-way associative cache can be
locked, ensuring that normal cache line replacement is performed.
Note: If no cache ways have the L bit set to 0, cache way 3 is used for all linefills.
98
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
R9: Cache Lockdown register
Instruction or
data lockdown
register
The first four bits of this register determine the L bit for the associated cache way.
The opcode_2 field of the MRC or MCR instruction determines whether the
instruction or data lockdown register is accessed:
opcode_2=0
Selects the DCache Lockdown register, or the Unified
Cache Lockdown register if a unified cache is
implemented. The ARM926EJ-S processor has separate
DCache and ICache.
opcode_2=1
Selects the ICache Lockdown register.
Access
Use these instructions to access the CacheLockdown register.
instructions
Function
Data
L bits
L bits
L bits
L bits
Instruction
MRC p15, 0, Rd, c9, c0, 0
MCR p15, 0, Rd, c9, c0, 0
MRC p15, 0, Rd, c9, c0, 1
MCR p15, 0, Rd, c9, c0, 1
Read DCache Lockdown register
Write DCache Lockdown register
Read ICache Lockdown register
Write ICache Lockdown register
Modifying the
Cache Lockdown
register
You must modify the Cache Lockdown register using a modify-read-write sequence;
for example:
MRC p15, 0, Rn, c9, c0, 1;
ORR Rn, Rn, 0x01;
MCR p15, 0, Rn, c9, c0, 1;
This sequence sets the L bit to 1 for way 0 of the ICache.
This is the format for the Cache Lockdown register.
Register format
31
16 15
4
3
0
L bits
(cache ways
0 to 3)
SBZ/UNP
SB0
Cache Lockdown
register L bits
This table shows the format of the Cache Lockdown register L bits. All cache ways
are available for allocation from reset.
Bits
4-way associative
UNP/SBZ
Notes
Reserved
SBO
[31:16]
[15:4]
0xFFF
www.digiembedded.com
99
WOR KI N G W I TH T H E C P U
R9: Cache Lockdown register
Bits
[3]
4-way associative
Notes
L bit for way 3
L bit for way 2
L bit for way 1
L bit for way 0
Bits [3:0] are the L bits for each cache way:
0
Allocation to the cache way is determined by the standard
replacement algorithm (reset state)
[2]
[1]
1
No allocation is performed to this way
[0]
Lockdown cache:
Specific loading of
addresses into a
cache-way
Use this procedure to lockdown cache. The procedure to lock down code and data
into way i of cache, with N ways, using format C, makes it impossible to allocate to
any cache way other than the target cache way:
1
Ensure that no processor exceptions can occur during the execution of this
procedure; for example, disable interrupts. If this is not possible, all code and
data used by any exception handlers must be treated as code and data as in
Steps 2 and 3.
2
3
If an ICache way is being locked down, be sure that all the code executed by
the lockdown procedure is in an uncachable area of memory or in an already
locked cache way.
If a DCache way is being locked down, be sure that all data used by the
lockdown procedure is in an uncachable area of memory or is in an already
locked cache way.
4
5
Ensure that the data/instructions that are to be locked down are in a cachable
area of memory.
Be sure that the data/instructions that are to be locked down are not already in
the cache. Use the Cache Operations register (R7) clean and/or invalidate
functions to ensure this.
6
7
Write these settings to the Cache Lockdown register (R9), to enable allocation
to the target cache way:
CRm = 0
Set L == 0 for bit i
Set L == 1 for all other bits
For each of the cache lines to be locked down in cache way i:
–
–
If a DCache is being locked down, use an LDR instruction to load a word from
the memory cache line to ensure that the memory cache line is loaded into the
cache.
If an ICache is being locked down, use the Cache Operations register (R7) MCR
prefetch ICache line (<CRm>==c13, <opcode2>==1) to fetch the memory cache line
into the cache.
100
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
R10:TLB Lockdown register
8
Write <CRm>==0 to Cache Lockdown register (R9), setting L==1 for bit i and
restoring all other bits to the values they had before the lockdown routine was
started.
Cache unlock
procedure
To unlock the locked down portion of the cache, write to Cache Lockdown register
(R9) setting L==0 for the appropriate bit. The following sequence, for example, sets
the L bit to 0 for way 0 of the ICache, unlocking way 0:
MRC p15, 0, Rn, c9, c0, 1;
BIC Rn, Rn, 0x01;
MCR p15, 0, Rn, c9, c0, 1;
R10:TLB Lockdown register
The TLB Lockdown register controls where hardware page table walks place the TLB
entry — in the set associative region or the lockdown region of the TLB. If the TLB
entry is put in the lockdown region, the register indicates which entry is written.
The TLB lockdown region contains eight entries (see the discussion of the TLB
Register format
31
29 28
Victim
26 25
0
SBZ
SBZ/UNP
P
P bit
When writing the TLB Lockdown register, the value in the P bit (D0) determines in
which region the TLB entry is placed:
P=0
P=1
Subsequent hardware page table walks place the TLNB entry in the set associative region
of the TLB.
Subsequent hardware page table walks place the TLB entry in the lockdown region at the
entry specified by the victim, in the range 0–7.
Invalidate
operation
TLB entries in the lockdown region are preserved so invalidate-TLB operations only
invalidate the unpreserved entries in the TLB; that is, those entries in the set-
associative region. Invalidate-TLB single entry operations invalidate any TLB entry
corresponding to the modified virtual address given in Rd, regardless of the entry’s
preserved state; that is, whether they are in lockdown or set-associative TLB
invalidate operations.
www.digiembedded.com
101
WOR KI N G W I TH T H E C P U
R11 and R12 registers
Programming
instructions
Use these instructions to program the TLB Lockdown register:
Function
Instruction
MRC p15, 0, Rd, c10, c0, 0
MCR p15, 0, Rd, c10, c0, 0
Read data TLB lockdown victim
Write data TLB lockdown victim
The victim automatically increments after any table walk that results in an entry
being written into the lockdown part of the TLB.
Note: It is not possible for a lockdown entry to map entirely either small or large
pages, unless all subpage access permissions are the same. Entries can still be
written into the lockdown region, but the address range that is mapped
covers only the subpage corresponding to the address that was used to
perform the page table walk.
Sample code
sequence
This example shows the code sequence that locks down an entry to the current
victim.
ADR r1,LockAddr
;
;
set R1 to the value of the address to be locked down
invalidate TLB single entry to ensure that
LockAddr is not already in the TLB
read the lockdown register
MCR p15,0,r1,c8,c7,1
MRC p15,0,r0,c10,c0,0
ORR r0,r0,#1
;
;
;
;
;
;
;
set the preserve bit
MCR p15,0,r0,c10,c0,0
LDR r1,[r1]
write to the lockdown register
TLB will miss, and entry will be loaded
read the lockdown register (victim will have
incremented
MRC p15,0,r0,c10,c0,0
BIC r0,r0,#1
clear preserve bit
MCR p15,0,r0,c10,c0,0
; write to the lockdown register
R11 and R12 registers
Accessing (reading or writing) these registers causes UNPREDICTABLE behavior.
R13:Process ID register
The Process ID register accesses the process identifier registers. The register
accessed depends on the value on the opcode_2 field:
opcode_2=0
Selects the Fast Context Switch Extension (FCSE) Process Identifier (PID)
register.
102
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
R13:Process ID register
opcode_2=1
Selects the context ID register.
Use the Process ID register to determine the process that is currently running. The
process identifier is set to 0 at reset.
FCSE PID
register
Addresses issued by the ARM926EJ-S core, in the range 0 to 32 MB, are translated
according to the value contained in the FCSE PID register. Address A becomes
A + (FCSE PID x 32 MB); it is this modified address that the MMU and caches see.
Addresses above 32 MB are not modified. The FCSE PID is a 7-bit field, which allows
128 x 32 MB processes to be mapped.
If the FCSE PID is 0, there is a flat mapping between the virtual addresses output by
the ARM926EJ-S core and the modified virtual addresses used by the caches and
MMU. The FCSE PID is set to 0 at system reset.
If the MMU is disabled, there is no FCSE address translation.
FCSE translation is not applied for addresses used for entry-based cache or TLB
maintenance operations. For these operations, VA=MVA.
Access
Use these instructions to access the FCSE PID register:
instructions
Function
Data
ARM instruction
MRC p15,0,Rd,c13,c0,0
MCR p15,0,Rd,c13,c0,0
Read FCSE PID
Write FCSE PID
FCSE PID
FCSE PID
Register format
This is the format of the FCSE PID register.
31
25 24
0
FCSE PID
SBZ
Performing a fast
context switch
You can perform a fast context switch by writing to the Process ID register (R13)
with opcode_2 set to 0. The contents of the caches and the TLB do not have to be
flushed after a fast context switch because they still hold address tags. The two
instructions after the FCSE PID has been written have been fetched with the old
FCSE PID, as shown in this code example:
{FCSE PID = 0}
MOV r0, #1:SHL:25
;Fetched with FCSE PID = 0
;Fetched with FCSE PID = 0
;Fetched with FCSE PID = 0
;Fetched with FCSE PID = 0
;Fetched with FCSE PID = 1
MCR p15,0,r0,c13,c0,0
A1
A2
A3
www.digiembedded.com
103
WOR KI N G W I TH T H E C P U
R14 register
A1, A2, and A3 are the three instructions following the fast context switch.
Context ID
register
The Context ID register provides a mechanism that allows real-time trace tools to
identify the currently executing process in multi-tasking environments.
Access
Use these instructions to access the Context ID register:
instructions
Function
Data
ARM instruction
MRC p15,0,Rd,c13,c0,1
MCR p15,0,Rd,c13,c0,1
Read context ID
Write context ID
Context ID
Context ID
Register format
This is the format of the Context ID register (Rd) transferred during this operation.
31
0
Context identifier
R14 register
Accessing (reading or writing) this register is reserved.
R15: Test and debug register
Register R15 to provides device-specific test and debug operations in ARM926EJ-S
processors. Use of this register currently is reserved.
Jazelle(Java)
The ARM926EJ-S processor has ARM’s embedded Jazelle Java acceleration hardware
in the core. Java offers rapid application development to software engineers.
The ARM926EJ-S processor core executes an extended ARMv5TE instruction set,
which includes support for Java byte code execution (ARMv5TEJ). An ARM optimized
Java Virtual Machine (JVM) software layer has been written to work with the
Jazelle hardware. The Java byte code acceleration is accomplished by the
following:
ꢀ
Hardware, which directly executes 80% of simple Java byte codes.
104
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
DSP
ꢀ
Software emulation within the ARM-optimized JVM, which addresses the
remaining 20% of the Java byte codes.
DSP
The ARM926EJ-S processor core provides enhanced DSP capability. Multiply
instructions are processed using a single cycle 32x16 implementation. There are
32x32, 32x16, and 16x16 multiply instructions, or Multiply Accumulate (MAC), and
the pipeline allows one multiply to start each cycle. Saturating arithmetic improves
efficiency by automatically selecting saturating behavior during execution, and is
used to set limits on signal processing calculations to minimize the effect of noise or
signal errors. All of these instructions are beneficial for algorithms that implement
the following:
ꢀ
ꢀ
ꢀ
GSM protocols
FFT
State space servo control
MemoryManagement Unit (MMU)
The MMU provides virtual memory features required by systems operating on
platforms such as WindowsCE or Linux. A single set of two-level page tables stored
in main memory control the address translation, permission checks, and memory
region attributes for both data and instruction accesses. The MMU uses a single,
unified Translation Lookaside Buffer (TLB) to cache the information held in the
page tables. TLB entries can be locked down to ensure that a memory access to a
given region never incurs the penalty of a page table walk.
MMU Features
ꢀ
ꢀ
Standard ARM926EJ-S architecture MMU mapping sizes, domains, and access
protection scheme.
Mapping sizes, as follows:
–
–
–
–
1 MB for sections
64 KB for large pages
4 KB for small pages
1 KB for tiny pages
ꢀ
ꢀ
Access permissions for large pages and small pages can be specified separately
for each quarter of the page (subpage permissions).
Hardware page table walks.
www.digiembedded.com
105
WOR KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
ꢀ
ꢀ
ꢀ
Invalidate entire TLB using R8: TLB Operations register (see “R8:TLB
Invalidate TLB entry selected by MVA, using R8: TLB Operations register (see
Lockdown of TLB entries using R10: TLB Lockdown register (see “R10:TLB
Access
permissions and
domains
For large and small pages, access permissions are defined for each subpage (1 KB for
small pages, 16 KB for large pages). Sections and tiny pages have a single set of
access permissions.
All regions of memory have an associated domain. A domain is the primary access
control mechanism for a region of memory. It defines the conditions necessary for
an access to proceed. The domain determines whether:
ꢀ
ꢀ
ꢀ
Access permissions are used to qualify the access.
The access is unconditionally allowed to proceed.
The access is unconditionally aborted.
In the latter two cases, the access permission attributes are ignored.
There are 16 domains, which are configured using R3: Domain Access Control
register (see “R3:Domain Access Control register” on page 91).
Translated entries
The TLB caches translated entries. During CPU memory accesses, the TLB provides
the protection information to the access control logic.
When the TLB contains a translated entry for the modified virtual address (MVA),
the access control logic determines whether:
ꢀ
ꢀ
ꢀ
Access is permitted and an off-chip access is required — the MMU outputs the
appropriate physical address corresponding to the MVA.
Access is permitted and an off-chip access is not required — the cache services
the access.
Access is not permitted — the MMU signals the CPU core to abort.
If the TLB misses (it does not contain an entry for the MVA), the translation table
walk hardware is invoked to retrieve the translation information from a translation
table in physical memory. When retrieved, the translation information is written
into the TLB, possible overwriting an existing value.
At reset, the MMU is turned off, no address mapping occurs, and all regions are
marked as noncachable and nonbufferable.
106
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
MMU program
accessible
registers
This table shows the CP15 registers that are used in conjunction with page table
descriptors stored in memory to determine MMU operation.
Register
Bits
Description
R1: Control register
M, A, S, R
Contains bits to enable the MMU (M bit), enable data address
alignment checks (A bit), and to control the access protection
scheme (S bit and R bit).
R2: Translation Table Base [31:14]
register
Holds the physical address of the base of the translation table
maintained in main memory. This base address must be on a 16
KB boundary.
R3:DomainAccessControl [31:0]
register
Comprises 16 two-bit fields. Each field defines the access
control attributes for one of 16 domains (D15 to D00).
R5: Fault Status registers,
IFSR and DFSR
[7:0]
Indicates the cause of a data or prefetch abort, and the domain
number of the aborted access when an abort occurs. Bits [7:4]
specify which of the 16 domains (D15 to D00) was being
accessed when a fault occurred. Bits [3:0] indicate the type of
access being attempted. The value of all other bits is
UNPREDICTABLE. The encoding of these bits is shown in
R6: Fault Address register [31:0]
Holds the MVA associated with the access that caused the data
the address stored for each type of fault.
R8: TLB Operations
register
[31:0]
Performs TLB maintenance operations. These are either
invalidating all the (unpreserved) entries in the TLB, or
invalidating a specific entry.
R10: TLB Lockdown
register
[28:26] and 0 Enables specific page table entries to be locked into the TLB.
Locking entries in the TLB guarantees that accesses to the
locked page or section can proceed without incurring the time
penalty of a TLB miss. This enables the execution latency for
time-critical pieces of code, such as interrupt handlers, to be
minimized.
All CP15 MMU registers, except R8: TLB Operations, contain state that can be read
using MRC instructions, and can be written using MCR instructions. Registers R5
(Fault Status) and R6 (Fault Address) are also written by the MMU during an abort.
Writing to R8: TLB Operations causes the MMU to perform a TLB operation, to
manipulate TLB entries. This register is write-only.
Address
translation
The virtual address (VA) generated by the CPU core is converted to a modified
virtual address (MVA) by the FCSE (fast context switch extension) using the value
held in CP15 R13: Process ID register. The MMU translates MVAs into physical
addresses to access external memory, and also performs access permission
checking.
www.digiembedded.com
107
WOR KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
The MMU table-walking hardware adds entries to the TLB. The translation
information that comprises both the address translation data and the access
permission data resides in a translation table located in physical memory. The MMU
provides the logic for automatically traversing this translation table and loading
entries into the TLB.
The number of stages in the hardware table walking and permission checking
process is one or two. depending on whether the address is marked as a section-
mapped access or a page-mapped access.
There are three sizes of page-mapped accesses and one size of section-mapped
access. Page-mapped accesses are for large pages, small pages, and tiny pages.
The translation process always begins in the same way — with a level-one fetch. A
section-mapped access requires only a level-one fetch, but a page-mapped access
requires an additional level-two fetch.
Translation table
base
The hardware translation process is initiated when the TLB does not contain a
translation for the requested MVA. R2: Translation Table Base (TTB) register points
to the base address of a table in physical memory that contains section or page
descriptors, or both. The 14 low-order bits [13:0] of the TTB register are
UNPREDICTABLE on a read, and the table must reside on a 16 KB boundary.
TTB register
format
31
14 13
0
Translation table base
The translation table has up to 4096 x 32-bit entries, each describing 1 MB of virtual
memory. This allows up to 4 GB of virtual memory to be addressed.
108
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
Table walk
process
Translation
table
Section
TTB base
Section base
Large page
base
Indexed by
modified
virtual
Indexed by
modified
virtual
Large page
address
bits [31:20]
address
bits [19:0]
Indexed by
modified
virtual
4096 entries
1 MB
address
bits [15:0]
64 KB
Coarse page
table
Coarse page
table base
Indexed by
modified
virtual
Small page
address
bits [19:10]
Indexed by
modified
virtual
256 entries
address
bits [11:0]
4 KB
Fine page
table
Fine page
table base
Indexed by
modified
virtual
Tiny page
address
bits [19:12]
Indexed by
modified
virtual
1024 entries
address
bits [9:0]
1 KB
First-level fetch
Bits [31:14] of the TTB register are concatenated with bits [31:20] of the MVA to
produce a 30-bit address.
www.digiembedded.com
109
WOR KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
First-level fetch
concatenation and
address
Modified virtual address
31
20 19
0
Table index
Translation table base
31
14 13
0
Translation base
31
31
14 13
2 1 0
0 0
Translation base
Table index
0
First-level descriptor
This address selects a 4-byte translation table entry. This is a first-level descriptor
for either a section or a page.
First-level
descriptor
The first-level descriptor returned is a section description, a coarse page table
descriptor, a fine page table descriptor, or is invalid. This is the format of a first-
level descriptor.
31
20 19
12 11 10
9
8
5
4
3
2
1
0
0
0
Fault
Coarse page table
Coarse page table base address
Domain
Domain
Domain
1
1
1
0
1
1
1
0
1
Section
Section base address
AP
C
B
Fine page table
Fine page table base address
A section descriptor provides the base address of a 1 MB block of memory.
Page table
descriptors
The page table descriptors provide the base address of a page table that contains
second-level descriptors. There are two page-table sizes:
ꢀ
Coarse page tables, which have 256 entries and split the 1 MB that the table
describes into 4 KB blocks.
ꢀ
Fine page tables, which have 1024 entries and split the 1 MB that the table
describes into 1 KB blocks.
110
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
First-level
Bits
descriptor bit
assignments:
Priority encoding
of fault status
Section
[31:20]
[19:12]
[11:10]
Coarse
[31:10]
----
Fine
[31:12]
---
Description
Forms the corresponding bits of the physical address.
SHOULD BE ZERO
---
---
Access permission bits. See “Access permissions and
registers” on page 119 for information about interpreting
the access permission bits.
SHOULD BE ZERO
Domain control bits
Must be 1.
9
9
[11:9]
[8:5]
4
[8:5]
4
[8:5]
4
[3:2]
---
---
Bits C and B indicate whether the area of memory mapped
by this page is treated as write-back cachable, write-
through cachable, noncached buffered, or noncached
nonbuffered.
SHOULD BE ZERO
---
[3:2]
[1:0]
[3:2]
[1:0]
[1:0]
These bits indicate the page size and validity, and are
interpreted as shown in “First-level descriptor bit
First-level
Value
0 0
Meaning
Description
descriptor bit
assignments:
Interpreting first
level descriptor
bits [1:0]
Invalid
Generates a section translation fault.
Indicates that this is a coarse page table descriptor.
Indicates that this is a section descriptor.
Indicates that this is a fine page table descriptor.
0 1
Coarse page table
Section
1 0
1 1
Fine page table
Section descriptor
A section descriptor provides the base address of a 1 MB block of memory.
Section descriptor
format
31
20 19
12 11 10
AP
9
8
5
4
1
3
2
1
1
0
0
S
B
Z
Section base address
SBZ
Domain
C
B
www.digiembedded.com
111
WOR KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
Section descriptor
bit description
Bits
Description
[31:20]
[19:12]
[11:10]
[09]
Forms the corresponding bits of the physical address for a section.
Always written as 0.
Specify the access permissions for this section.
Always written as 0.
[8:5]
Specifies one of the 16 possible domains (held in the Domain and Access Control
register) that contain the primary access controls.
4
Should be written as 1, for backwards compatibility.
[3:2]
Indicate if the area of memory mapped by this section is treated as writeback cachable,
write-through cachable, noncached buffered, or noncached nonbuffered.
[1:0]
Must be 10 to indicate a section descriptor.
Coarse page table
descriptor
A coarse page table descriptor provides the base address of a page table that
contains second-level descriptors for either large page or small page accesses.
Coarse page tables have 256 entries, splitting the 1 MB that the table describes into
4 KB blocks.
Note: If a coarse page table descriptor is returned from the first-level fetch, a
second-level fetch is initiated.
Coarse page table
descriptor format
31
10
9
8
5
4
1
3
2
1
0
0
1
S
B
Z
Coarse page table base address
Domain
SBZ
Coarse page table
descriptor bit
description
Bits
Description
[31:10]
Forms the base for referencing the second-level descriptor (the coarse page table index
for the entry derived from the MVA).
9
Always written as 0.
[8:5]
Specifies one of the 16 possible domains (held in the Domain Access Control registers)
that contain the primary access controls.
4
Always written as 1.
[3:2]
[1:0]
Always written as 0.
Must be 01 to indicate a coarse page descriptor.
Fine page table
descriptor
A fine page table descriptor provides the base address of a page table that contains
second-level descriptors for large page, small page, or tiny page accesses. Fine
112
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
page tables have 1024 entries, splitting the 1 MB that the table describes into 1 KB
blocks. The next two sections show the format of a fine page table descriptor and
define the fine page table descriptor bit assignments.
Note: If a fine page table descriptor is returned from the first-level fetch, a
second-level fetch is initiated.
Fine page table
descriptor format
31
12 11
9
8
5
4
1
3
2
1
1
0
1
Fine page table base address
Domain
SBZ
SBZ
Fine page table
descriptor bit
description
Bits
Description
[31:12]
Forms the base for referencing the second-level descriptor (the fine page table index for
the entry is derived from the MVA).
[11:9]
[8:5]
Always written as 0.
Specifies one of the 16 possible domains (held in the Domain Access Control register)
that contain primary access controls.
4
Always written as 1.
[3:2}
[1:0]
Always written as 0.
Must be 11 to indicate a fine page table descriptor.
Translating
This figure illustrates the complete section translation sequence.
section references
www.digiembedded.com
113
WOR KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
31
2019
0
Table index
Section index
Translation table base
14 13
31
31
0
Translation base
14 13
2
1 0
Translation base
Table index
0 0
Section first-level descriptor
20 19
31
31
8
5 4 3 2 1 0
Section base address
SBZ
AP
0
Domain 1 C B 0 1
Physical address
20 19
0
Section base address
Section index
Second-level
descriptor
The base address of the page table to be used is determined by the descriptor
returned (if any) from a first-level fetch — either a coarse page table descriptor or a
fine page table descriptor. The page table is then accessed and a second-level
descriptor returned.
Second-level
descriptor format
31
16 15
12 11 10
9
8
7
6
5
4
3
2
1
0
0
0
Fault
Large page
Large page base address
AP3
AP3
AP2
AP1
AP0
C
C
C
B
0
1
1
1
0
1
Small page
Tiny page
Small page base address
Tiny page base address
AP2
AP1
AP0
AP
B
B
Second-level
descriptor pages
A second-level descriptor defines a tiny, small, or large page descriptor, or is
invalid:
ꢀ
ꢀ
A large page descriptor provides the base address of a 64 KB block of memory.
A small page descriptor provides the base address of a 4 KB block of memory.
114
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
ꢀ
A tiny page descriptor provides the base address of a 1 KB block of memory.
Coarse page tables provide base addresses for either small or large pages. Large
page descriptors must be repeated in 16 consecutive entries. Small page descriptors
must be repeated in each consecutive entry.
Fine page tables provide base addresses for large, small, or tiny pages. Large page
descriptors must be repeated in 64 consecutive entries. Small page descriptors must
be repeated in four consecutive entries. Tiny page descriptors must be repeated in
each consecutive entry.
Second-level
descriptor bit
assignments
Bits
Large
[31:16]
[15:12]
[11:4]
Small
[31:12]
---
Tiny
[31:10]
[9:6]
Description
Form the corresponding bits of the physical address.
SHOULD BE ZERO
[11:4]
[5:4]
Access permission bits. See “Domain access control” on
information about interpreting the access permission bits.
[3:2]
[1:0]
[3:2]
[1:0]
[3:2]
[1:0]
Indicate whether the area of memory mapped by this page
is treated as write-back cachable, write-through cachable,
noncached buffered, and noncached nonbuffered.
Indicate the page size and validity, and are interpreted as
Second-level
descriptor least
significant bits
The two least significant bits of the second-level descriptor indicate the descriptor
type, as shown in this table.
Value
0 0
Meaning
Invalid
Description
Generates a page translation fault.
Indicates that this is a 64 KB page.
Indicates that this is a 4 KB page.
Indicates that this is a 1 KB page.
0 1
Large page
Small page
Tiny page
1 0
1 1
Note: Tiny pages do not support subpage permissions and therefore have only one
set of access permission bits.
www.digiembedded.com
115
WOR KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
Translation
sequence for large
page references
Modified virtual address
2019 1615 1211
31
0
Table index
Page index
table index
Translation table base
14 13
31
0
Translation base
31
31
31
31
31
14 13
2
1 0
Translation base
Table index
0 0
First-level descriptor
10 9 8
5 4 3 2 1 0
Coarse page table base address
Domain
1
0 1
10 9
2 1 0
0 0
Coarse page table base address
L2 table index
Second-level descriptor
1615
121110 9 8 7 6 5 4 3 2 1 0
Page base address
AP3 AP2 AP1 AP0 C B 0 1
Physical address
1615
0
Page base address
Page index
Because the upper four bits of the page index and low-order four bits of the coarse
page table index overlap, each coarse page table entry for a large page must be
duplicated 16 times (in consecutive memory locations) in the coarse page table.
If the large page descriptor is included in a fine page table, the high-order six bits
of the page index and low-order six bits of the fine page table overlap. Each fine
page table entry for a large page must be duplicated 64 times.
116
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
Translating
sequence for small
page references
Modified virtual address
2019 1211
31
0
Level two
table index
Table index
Page index
Translation table base
14 13
31
31
0
Translation base
14 13
2
1 0
Translation base
Table index
0 0
First-level descriptor
31
31
31
31
10 9 8
5 4 3 2 1 0
Coarse page table base address
Domain
1
0 1
10 9
2 1 0
0 0
Coarse page table base address
L2 table index
Second-level descriptor
121110 9 8 7 6 5 4 3 2 1 0
Page base address
AP3 AP2 AP1 AP0 C B 1 0
Physical address
1211
0
Page base address
Page index
If a small page descriptor is included in a fine page table, the upper two bits of the
page index and low-order two bits of the fine page table index overlap. Each fine
page table entry for a small page must be duplicated four times.
www.digiembedded.com
117
WOR KI N G W I TH T H E C P U
MemoryManagement Unit (MMU)
Translation
sequence for tiny
page references
Modified virtual address
2019
31
10 9
0
Level two
table index
Table index
Page index
Translation table base
14 13
31
0
Translation base
31
31
31
31
31
14 13
2
1 0
Translation base
Table index
0 0
First-level descriptor
1211
8
5 4 3 2 1 0
Fine page table base address
Domain
1
1 1
12 11
2 1 0
0 0
Fine page table base address
L2 table index
Second-level descriptor
10 9
6 5 4 3 2 1 0
AP C B 1 1
Page base address
Physical address
10 9
0
Page base address
Page index
Page translation involves one additional step beyond that of a section translation.
The first-level descriptor is the fine page table descriptor; this points to the first-
level descriptor.
Note: The domain specified in the first-level description and access permissions
specified in the first-level description together determine whether the access
more information.
Subpages
You can define access permissions for subpages of small and large pages. If, during a
page table walk, a small or large page has a different subpage permission, only the
subpage being accessed is written into the TLB. For example, a 16 KB (large page)
subpage entry is written into the TLB if the subpage permission differs, and a 64 KB
entry is put in the TLB if the subpage permissions are identical.
118
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
MMU faults and CPU aborts
When you use subpage permissions and the page entry has to be invalidated, you
must invalidate all four subpages separately.
MMU faults and CPU aborts
The MMU generates an abort on these types of faults:
ꢀ
ꢀ
ꢀ
ꢀ
Alignment faults (data accesses only)
Translation faults
Domain faults
Permission faults
In addition, an external abort can be raised by the external system. This can happen
only for access types that have the core synchronized to the external system:
ꢀ
ꢀ
ꢀ
ꢀ
Page walks
Noncached reads
Nonbuffered writes
Noncached read-lock-write sequence (SWP)
Alignment fault
checking
Alignment fault checking is enabled by the A bit in the R1: Control register.
Alignment fault checking is not affected by whether the MMU is enabled.
Translation, domain, and permission faults are generated only when the MMU is
enabled.
The access control mechanisms of the MMU detect the conditions that produce
these faults. If a fault is detected as a result of a memory access, the MMU aborts
the access and signals the fault condition to the CPU core. The MMU retains status
and address information about faults generated by the data accesses in the Data
Fault Status register and Fault Address register (see “Fault Address and Fault Status
The MMU also retains status about faults generated by instruction fetches in the
Instruction Fault Status register.
An access violation for a given memory access inhibits any corresponding external
access to the AHB interface, with an abort returned to the CPU core.
Fault Address and
Fault Status
registers
On a data abort, the MMU places an encoded four-bit value — the fault status —
along with the four-bit encoded domain number in the Data Fault Status register.
Similarly, on a prefetch abort, the MMU places an encoded four-bit value along with
the four-bit encoded domain number in the Instruction Fault Status register. In
addition, the MVA associated with the data abort is latched into the Fault Address
www.digiembedded.com
119
WOR KI N G W I TH T H E C P U
MMU faults and CPU aborts
register. If an access violation simultaneously generates more than one source of
abort, the aborts are encoded in the priority shown in the priority encoding table.
The Fault Address register is not updated by faults caused by instruction prefetches.
Priority encoding
table
Priority
Source
Size
Status
Domain
0b00x1
Highest
Alignment
---
Invalid
0b1100
0b1110
External abort on transmission
First level
Invalid
Valid
Second level
0b0101
0b0111
Translation
Domain
Section page
Section page
Section page
Section page
Invalid
Valid
0b1001
0b1011
Valid
Valid
0b1101
0b1111
Permission
External abort
Valid
Valid
0b1000
0b1010
Lowest
Valid
Valid
Notes:
ꢀ
ꢀ
Alignment faults can write either 0b0001 or 0b0011 into Fault Status register [3:0].
Invalid values can occur in the status bit encoding for domain faults. This
happens when the fault is raised before a valid domain field has been read
from a page table description.
ꢀ
Aborts masked by a higher priority abort can be regenerated by fixing the
cause of the higher priority abort, and repeating the access.
ꢀ
ꢀ
Alignment faults are not possible for instruction fetches.
The Instruction Fault Status register can be updated for instruction prefetch
operations (MCR p15,0,Rd,c7,c13,1).
Fault Address
register (FAR)
For load and store instructions that can involve the transfer of more than one word
(LDM/STM, STRD, and STC/LDC), the value written into the Fault Address register
depends on the type of access and, for external aborts, on whether the access
crosses a 1 KB boundary.
FAR values for
multi-word
transfers
Domain
Fault Address register
Alignment
MVA of first aborted address in transfer
MVA of first aborted address in transfer
MVA of first aborted address in transfer
External abort on translation
Translation
120
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
Domain access control
Domain
Domain
Fault Address register
MVA of first aborted address in transfer
MVA of first aborted address in transfer
Permission
External about for noncached reads,
or nonbuffered writes
MVA of last address before 1KB boundary, if any word of
the transfer before 1 KB boundary is externally aborted.
MVA of last address in transfer if the first externally
aborted word is after the 1 KB boundary.
Compatibility
issues
ꢀ
ꢀ
To enable code to be ported easily to future architectures, it is recommended
that no reliance is made on external abort behavior.
The Instruction Fault Status register is intended for debugging purposes only.
Domain access control
MMU accesses are controlled primarily through the use of domains. There are 16
domains, and each has a two-bit field to define access to it. Client users and
Manager users are supported.
The domains are defined in the R3: Domain Access Control register; the register
format in “R3:Domain Access Control register” on page 91 shows how the 32 bits of
the register are allocated to define the 16 two-bit domains.
Specifying access
permissions
This table shows how the bits within each domain are defined to specify access
permissions.
Value
0 0
Meaning
No access
Client
Description
Any access generates a domain fault.
0 1
Accesses are checked against the access permission bits in the section or
page descriptor.
1 0
1 1
Reserved
Manager
Reserved. Currently behaves like no access mode.
Accesses are not checked against the access permission bits, so a
permission fault cannot be generated.
Interpreting
access permission
bits
This table shows how to interpret the access permission (AP) bits, and how the
interpretation depends on the R and S bits in the R1: Control register (see "R1:
www.digiembedded.com
121
WOR KI N G W I TH T H E C P U
Fault checking sequence
AP
0 0
0 0
0 0
0 0
0 1
1 0
1 1
S
0
1
0
1
x
x
x
R
0
0
1
1
x
x
x
Privileged permissions
User permissions
No access
No access
Read only
Read only
Read only
Read only
UNPREDICTABLE
UNPREDICTABLE
Read/write
Read/write
Read/write
No access
Read only
Read/write
Fault checking sequence
The sequence the MMU uses to check for access faults is different for sections and
pages. The next figure shows the sequence for both types of access.
122
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
Fault checking sequence
Modified virtual address
Check address alignment
Get first-level descriptor
Alignment
fault
Misaligned
Section
translation
fault
Invalid
Section
Page
Page
translation
fault
Get page
table entry
Invalid
Section
domain
fault
Page
domain
fault
No access (00)
Reserved (10)
No access (00)
Reserved (10)
Check domain status
Section
Page
Client (01)
Client (01)
Manager
(11)
Section
permission
fault
Check
access
permissions
Check
access
permissions
Page
permission
fault
Violation
Violation
Physical address
The conditions that generate each of the faults are discussed in the following
sections.
Alignment faults
If alignment fault checking is enabled (the A bit in the R1: Control register is set;
fault on any data word access if the address is not word-aligned, or on any halfword
access if the address is not halfword-aligned — irrespective of whether the MMU is
enabled. An alignment fault is not generated on any instruction fetch or byte
access.
www.digiembedded.com
123
WOR KI N G W I TH T H E C P U
Fault checking sequence
Note: If an access generates an alignment fault, the access sequence aborts without
reference to other permission checks.
Translation faults
There are two types of translation fault: section and page.
ꢀ
A section translation fault is generated if the level one descriptor is marked as
invalid. This happens if bits [1:0] of the descriptor are both 0.
ꢀ
A page translation fault is generated if the level one descriptor is marked as
invalid. This happens if bits [1:0] of the descriptor are both 0.
Domain faults
There are two types of domain faults: section and page.
ꢀ
Section: The level one descriptor holds the four-bit domain field, which selects
one of the 16 two-bit domains in the Domain Access Control register. The two
bits of the specified domain are then checked for access permissions as
checked when the level one descriptor is returned.
ꢀ
Page: The level one descriptor holds the four-bit domain field, which selects
one of the 16 two-bit domains in the Domain Access Control register. The two
bits of the specified domain are then checked for access permissions as
checked when the level one descriptor is returned.
If the specified access is either no access (00) or reserved (10), either a section
domain fault or a page domain fault occurs.
Permission faults
If the two-bit domain field returns client (01), access permissions are checked as
follows:
ꢀ
Section: If the level one descriptor defines a section-mapped access, the AP
bits of the descriptor define whether the access is allowed, per “Interpreting
access permission bits” on page 121. The interpretation depends on the setting
access is not allowed, a section permission fault is generated.
ꢀ
Large page or small page: If the level one descriptor defines a page-mapped
access and the level two descriptor is for a large or small page, four access
permission fields (AP3 to AP0) are specified, each corresponding to one quarter
of the page.
For small pages, AP3 is selected by the top 1 KB of the page and AP0 is
selected by the bottom 1 KB of the page.
For large pages, AP3 is selected by the top 16 KB of the page and AP0 is
selected by the bottom 16 KB of the page. The selected AP bits are then
124
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
External aborts
interpreted in the same way as for a section (see “Interpreting access
The only difference is that the fault generated is a page permission fault.
ꢀ
Tiny page: If the level one descriptor defines a page-mapped access and the
level two descriptor is for a tiny page, the AP bits of the level one descriptor
define whether the access is allowed in the same way as for a section. The
fault generated is a page permission fault.
External aborts
In addition to MMU-generated aborts, external aborts cam be generated for certain
types of access that involve transfers over the AHB bus. These aborts can be used to
flag errors on external memory accesses. Not all accesses can be aborted in this
way, however.
These accesses can be aborted externally:
ꢀ
ꢀ
ꢀ
ꢀ
Page walks
Noncached reads
Nonbuffered writes
Noncached read-lock-write (SWP) sequence
For a read-lock-write (SWP) sequence, the write is always attempted if the read
externally aborts.
A swap to an NCB region is forced to have precisely the same behavior as a swap to
an NCNB region. This means that the write part of a swap to an NCB region can be
aborted externally.
Enabling and disabling the MMU
Enabling the
MMU
Before enabling the MMU using the R1: Control register, you must perform these
steps:
1
Program the R2: Translation Table Base register and the R3: Domain Access
Control register.
2
Program first-level and second-level page tables as required, ensuring that a
valid translation table is placed in memory at the location specified by the
Translation Table Base register.
When these steps have been performed, you can enable the MMU by setting R1:
Control register bit 0 (the M bit) to high.
www.digiembedded.com
125
WOR KI N G W I TH T H E C P U
TLB structure
Care must be taken if the translated address differs from the untranslated address,
because several instructions following the enabling of the MMU might have been
prefetched with MMU off (VA=MVA=PA). If this happens, enabling the MMU can be
considered as a branch with delayed execution. A similar situation occurs when the
MMU is disabled. Consider this code sequence:
MRC p15, 0, R1, c1, C0, 0
ORR R1, #0x1
; Read control register
; Set M bit
MCR p15, 0,R1,C1, C0,0
Fetch Flat
; Write control register and enable MMU
Fetch Flat
Fetch Translated
Note: Because the same register (R1: Control register) controls the enabling of
ICache, DCache, and the MMU, all three can be enabled using a single MCR
instruction.
Disabling the
MMU
Clear bit 0 (the M bit) in the R1: Control register to disable the MMU.
Note: If the MMU is enabled, then disabled, then subsequently re-enabled, the
contents of the TLB are preserved. If these are now invalid, the TLB must be
invalidated before re-enabling the MMU (see “R8:TLB Operations register” on
page 97).
TLB structure
The MMU runs a single unified TLB used for both data accesses and instruction
fetches. The TLB is divided into two parts:
ꢀ
An eight-entry fully-associative part used exclusively for holding locked down
TLB entries.
ꢀ
A set-associative part for all other entries.
Whether an entry is placed in the set-associative part or lockdown part of the TLB
depends on the state of the TLB Lockdown register when the entry is written into
the TLB (see “R10:TLB Lockdown register” on page 101).
When an entry has been written into the lockdown part of the TLB, it can be
removed only by being overwritten explicitly or, when the MVA matches the locked
down entry, by an MVA-based TLB invalidate operation.
The structure of the set-associative part of the TLB does not form part of the
programmer’s model for the ARM926EJ-S processor. No assumptions must be made
126
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
Caches and write buffer
about the structure, replacement algorithm, or persistence of entries in the
set-associative part — specifically:
ꢀ
Any entry written into the set-associative part of the TLB can be removed at
any time. The set-associative part of the TLB must be considered as a
temporary cache of translation/page table information. No reliance must be
placed on an entry residing or not residing in the set-associative TLB unless
that entry already exists in the lockdown TLB. The set-associative part of the
TLB can contain entries that are defined in the page tables but do not
correspond to address values that have been accessed since the TLB was
invalidated.
ꢀ
The set-associative part of the TLB must be considered as a cache of the
underlying page table, where memory coherency must be maintained at all
times. To guarantee coherency if a level one descriptor is modified in main
memory, either an invalidate-TLB or Invalidate-TLB-by-entry operation must be
used to remove any cached copies of the level one descriptor. This is required
regardless of the type of level one descriptor (section, level two page
reference, or fault).
ꢀ
If any of the subpage permissions for a given page are different, each of the
subpages are treated separately. To invalidate all entries associated with a
page with subpage permissions, four MVA-based invalidate operations are
required — one for each subpage.
Caches and write buffer
The ARM926EJ-S processor includes an instruction cache (ICache), data cache
(DCache), and write buffer. The instruction cache is 8 KB in length, and the data
cache is 4 KB in length.
Cache features
ꢀ
The caches are virtual index, virtual tag, addressed using the modified virtual
address (MVA). This avoids cache cleaning and/or invalidating on context
switch.
ꢀ
ꢀ
The caches are four-way set associative, with a cache line length of eight
words per line (32 bytes per line), and with two dirty bits in the DCache.
The DCache supports write-through and write-back (copyback) cache
operations, selected by memory region using the C and B bits in the MMU
translation tables.
ꢀ
The caches support allocate on read-miss. The caches perform critical-word
first cache refilling.
www.digiembedded.com
127
WOR KI N G W I TH T H E C P U
Caches and write buffer
ꢀ
ꢀ
The caches use pseudo-random or round-robin replacement, selected by the RR
bit in R1: Control register.
Cache lockdown registers enable control over which cache ways are used for
allocation on a linefill, providing a mechanism for both lockdown and
controlling cache pollution.
ꢀ
The DCache stores the Physical Address Tag (PA tag) corresponding to each
DCache entry in the tag RAM for use during cache line write-backs, in addition
to the virtual address tag stored in the tag RAM. This means that the MMU is
not involved in DCache write-back operations, which removes the possibility of
TLB misses to the write-back address.
ꢀ
Cache maintenance operations provide efficient invalidation of:
–
–
–
The entire DCache or ICache
Regions of the DCache or ICache
Regions of virtual memory
Cache maintenance operations also provide for efficient cleaning and
invalidation of:
–
–
–
The entire DCache
Regions of the DCache
Regions of virtual memory
The latter allows DCache coherency to be efficiently maintained when small
code changes occur; for example, for self-modifying code and changes to
exception vectors.
Write buffer
The write buffer is used for all writes to a noncachable bufferable region, write-
through region, and write misses to a write-back region. A separate buffer is
incorporated in the DCache for holding write-back data for cache line evictions or
cleaning of dirty cache lines.
ꢀ
ꢀ
The main write buffer has a 16-word data buffer and a four-address buffer.
The DCache write-back buffer has eight data word entries and a single address
entry.
The MCR drain write buffer instruction enables both write buffers to be drained
under software control.
The MCR wait -for-interrupt causes both write buffers to be drained, and the
ARM926EJ-S processor to be put into low-power state until an interrupt occurs.
Enabling the
caches
On reset, the ICache and DCache entries all are invalidated and the caches
disabled. The caches are not accessed for reads or writes. The caches are enabled
using the I, C, and M bits from the R1: Control register, and can be enabled
independently of one another.
128
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
Caches and write buffer
ICache I and M
bit settings
This table gives the I and M bit settings for the ICache, and the associated behavior.
R1 I bit
R1 M bit
ARM926EJ-S behavior
0
-----
ICache disabled. All instruction fetches are fetched from external memory
(AHB).
1
1
0
1
ICache enabled, MMU disabled. All instruction fetches are cachable, with no
protection checks. All addresses are flat-mapped; that is, VA=MVA=PA.
ICache enabled, MMU enabled. Instruction fetches are cachable or
noncachable, depending on the page descriptor C bit (see “ICache page table
C bit settings” on page 129), and protection checks are performed. All
addresses are remapped from VA to PA, depending on the page entry; that
is, the VA is translated to MVA and the MVA is remapped to a PA.
ICache page table
C bit settings
This table shows the page table C bit settings for the ICache (R1 I bit = M bit = 1).
Page table C
bit
Description
Noncachable
Cachable
ARM926EJ-S behavior
0
ICache disabled. All instruction fetches are fetched from external
memory.
1
Cache hit
Read from the ICache.
Cache miss
Linefill from external memory.
R1 register C and
M bits for DCache
This table gives the R1: Control register C and M bit settings for DCache, and the
associated behavior.
R1 C bit
R1 M bit
ARM926EJ-S behavior
0
1
0
0
DCache disabled. All data accesses are to the external memory.
DCache enabled, MMU disabled. All data accesses are noncachable,
nonbufferable, with no protection checks. All addresses are flat-mapped; that
is, VA=MVA=PA.
1
1
DCache enabled, MMU enabled. All data accesses are cachable or
noncachable, depending on the page descriptor C bit and B bit (see “DCache
page table C and B settings” on page 129), and protection checks are
performed. All addresses are remapped from VA to PA, depending on the
MMU page table entry; that is, the VA is translated to an MVA and the MVA
is remapped to a PA.
DCache page
table C and B
settings
This table gives the page table C and B bit settings for the DCache (R1: Control
register C bit = M bit = 1), and the associated behavior.
www.digiembedded.com
129
WOR KI N G W I TH T H E C P U
Cache MVA and Set/Way formats
Page
Page
Description
ARM926EJ-S behavior
table C table B
bit
bit
0
0
Noncachable,
nonbufferable
DCache disabled. Read from external memory. Write as a
nonbuffered store(s) to external memory. DCache is not
updated.
0
1
1
0
Noncachable,
bufferable
DCache disabled. Read from external memory. Write as a
buffered store(s) to external memory. DCache is not updated.
Write-through
DCache enabled:
Read hit
Read miss Linefill.
Write hit Write to the DCache, and buffered store to
external memory.
Read from DCache.
Write miss Buffered store to external memory.
1
1
Write-back
DCache enabled:
Read hit
Read from DCache.
Read miss Linefill.
Write hit
Write to the DCache only.
Write miss Buffered store to external memory.
Cache MVA and Set/Way formats
This section shows how the MVA and set/way formats of ARM926EJ-S caches map to
a generic virtually indexed, virtually addressed cache, shown next. The next figure
shows a generic, virtually indexed, virtually addressed cache.
130
Hardware Reference NS9215
WOR KI N G W I TH T H E C P U
Cache MVA and Set/Way formats
ARM926EJ-S
cache format
31
S+5 S+4
Index
5
4
2
1
0
Tag
Word
Byte
0
1
2
3
4
5
6
7
TAG
3
2
n
1
0
ARM926EJ-S
cache
associativity
The following points apply to the ARM926EJ-S cache associativity:
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
The group of tags of the same index defines a set.
The number of tags in a set is the associativity.
The ARM926EJ-S caches are 4-way associative.
The range of tags addressed by the index defines a way.
The number of tags is a way is the number of sets, NSETS.
This table shows values of S and NSETS for an ARM926EJ-S cache.
ARM926EJ-S
4 KB
S
5
NSETS
32
8 KB
6
64
16 KB
7
128
32 KB
8
256
64 KB
9
512
128 KB
10
1024
Set/way/word
format for
ARM926EJ-S
caches
32-A
31
31-A
S+5 S+4
Set select
5
4
2
1
0
Way
SBZ
Word
SBZ
(= Index)
132
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
Noncachable instruction fetches
In this figure:
A = log associativity
2
For example, with a 4-way cache A = 2:
S = log NSETS
2
Noncachable instruction fetches
The ARM926EJ-S processor performs speculative noncachable instruction fetches to
increase performance. Speculative instruction fetching is enabled at reset.
Note: It is recommended that you use ICache rather than noncachable code, when
possible. Noncachable code previously has been used for operating system
boot loaders and for preventing cache pollution. ICache, however, can be
enabled without the MMU being enabled, and cache pollution can be
controlled using the cache lockdown register.
Self-modifying
code
A four-word buffer holds speculatively fetched instructions. Only sequential
instructions are fetched speculatively; if the ARM926EJ-S issues a nonsequential
instruction fetch, the contents of the buffer are discarded (flushed). In situations on
which the contents of the prefetch buffer might become invalid during a sequence
of sequential instruction fetches by the processor core (for example, turning the
MMU on or off, or turning on the ICache), the prefetch buffer also is flushed. This
avoids the necessity of performing an explicit Instruction Memory Barrier (IMB)
operation, except when self-modifying code is used. Because the prefetch buffer is
flushed when the ARM926EJ-S core issues a nonsequential instruction fetch, a
branch instruction (or equivalent) can be used to implement the required IMB
behavior, as shown in this code sequence:
LDMIA
ADR
R0,{R1-R5}
; load code sequence into R1-R5
R0,self_mod_code
R0,{R1-R5}
STMIA
B
; store code sequence (nonbuffered region)
; branch to modified code
self_mod_code
self_mod_code:
This IMB application applies only to the ARM926EJ-S processor running code from a
noncachable region of memory. If code is run from a cachable region of memory, or
a different device is used, a different IMB implementation is required. IMBs are
www.digiembedded.com
133
WOR KI N G W I TH T H E C P U
Noncachable instruction fetches
AHB behavior
If instruction prefetching is disabled, all instruction fetches appear on the AHB
interface as single, nonsequential fetches.
If prefetching is enabled, instruction fetches appear either as bursts of four
instructions or as single, nonsequential fetches. No speculative instruction fetching
is done across a 1 KB boundary.
All instruction fetches, including those made in Thumb state, are word transfers (32
bits). In Thumb state, a single-word instruction fetch reads two Thumb instructions
and a four-word burst reads eight instructions.
Instruction
Memory Barrier
Whenever code is treated as data — for example, self-modifying code or loading
code into memory — a sequence of instructions called an instruction memory
barrier (IMB) operation must be used to ensure consistency between the data and
instruction streams processed by the ARM926EJ-S processor.
Usually the instruction and data streams are considered to be completely
independent by the ARM926EJ-S processor memory system, and any changes in the
data side are not automatically reflected in the instruction side. For example, if
code is modified in main memory, ICache may contain stale entries. To remove
these stale entries, part of all of the ICache must be invalidated.
IMB operation
Use this procedure to ensure consistency between data and instruction sides:
1
Clean the DCache. If the cache contains cache lines corresponding to write-back
regions of memory, it might contain dirty entries. These entries must be cleaned
to make external memory consistent with the DCache. If only a small part of the
cache has to be cleaned, it can be done by using a sequence of clean DCache
single entry instructions. If the entire cache has to be cleaned, you can use the
2
3
Drain the write buffer. Executing a drain write buffer causes the ARM926EJ-S
core to wait until outstanding buffered writes have completed on the AHB
interface. This includes writes that occur as a result of data being written back
to main memory because of clean operations, and data for store instructions.
Synchronize data and instruction streams in level two AHB systems. The
level two AHB subsystem might require synchronization between data and
instruction sides. It is possible for the data and instruction AHB masters to be
attached to different AHB subsystems. Even if both masters are present on the
same bus, some form of separate ICache might exist for performance reasons;
this must be invalidated to ensure consistency.
The process of synchronizing instructions and data in level two memory
must be invoked using some form of fully blocking operation, to ensure that
the end of the operation can be determined using software. It is
134
Hardware Reference NS9215
WO R KI N G W I TH T H E C P U
Noncachable instruction fetches
recommended that either a nonbuffered store (STR) or a noncached load
(LDR) be used to trigger external synchronization.
4
5
Invalidate the cache. The ICache must be invalidated to remove any stale
copies of instructions that are no longer valid. If the ICache is not being used,
or the modified regions are not in cachable areas of memory, this step might
not be required.
Flush the prefetch buffer. To ensure consistency, the prefetch buffer should be
flushed before self-modifying code is executed (see “Self-modifying code” on
page 133).
Sample IMB
sequences
These sequences correspond to steps 1–4 in "IMB operation."
clean loop
MRC p15, 0, r15, c7, c10, 3
BNE clean_loop
; clean entire dcache using test and clean
MRC p15, 0, r0, c7, c10, 4
STR rx,[ry]
; drain write buffer
; nonbuffered store to signal L2 world to
; synchronize
MCR p15, 0, r0, c7, c5, 0
; invalidate icache
This next sequence illustrates an IMB sequence used after modifying a single
instruction (for example, setting a software breakpoint), with no external
synchronization required:
STR rx,[ry]
; store that modifies instruction at address ry
; clean dcache single entry (MVA)
; drain write buffer
MCR p15, 0, ry, c7, c10, 1
MCR p15, 0, r0, c7, c10, 4
MCR p15, 0, ry, c7, c5, 1
; invalidate icache single entry (MVA)
www.digiembedded.com
135
WOR KI N G W I TH T H E C P U
Noncachable instruction fetches
136
Hardware Reference NS9215
System Control Module
C
H
A
P
T
E
R
4
T
he System Control Module configures and oversees system operations for the
processor, and defines both the AMBA High-speed Bus (AHB) arbiter system and
system memory address space.
Features
The System Control Module uses the following to configure and maintain system
operations:
ꢀ
ꢀ
ꢀ
AHB arbiter system
System-level address decoding
11 programmable timers
–
–
Watchdog timer
10 general purpose timers/counters
ꢀ
ꢀ
ꢀ
Interrupt controller
Multiple configuration and status registers
System Sleep/Wake-up processor
Bus interconnection
The AMBA AHB bus protocol uses a central multiplexor interconnection scheme. All
bus masters generate the address and control signals that indicate the transfer that
the bus masters want to perform. The arbiter determines which master has its
address and control signals routed to all slaves. A central decoder is required to
control the read data and response multiplexor, which selects the appropriate
signals from the slave that is involved in the transfer.
137
S Y S T E M C O N T RO L M OD U L E
System bus arbiter
System bus arbiter
The bus arbitration mechanism ensures that only one bus master has access to the
system bus at any time. If you are using a system in which bus bandwidth allocation
is critical, you must be sure that your worst-case bus bandwidth allocation goals can
configuring the AHB arbiter.
High speed bus
system
The high-speed bus system is split into two subsystems:
ꢀ
High-speed peripheral subsystem: Connects all high-speed peripheral devices
to a port on the external memory controller.
ꢀ
CPU subsystem: Connects the CPU directly to a second port on the external
memory controller.
High-speed bus
arbiters
The high-speed bus contains two arbiters: one for the ARM926 (CPU) and one for the
main bus.
ꢀ
CPU arbiter. Splits the bandwidth 50–50 between the data and instruction
interfaces. If the CPU access is to external memory, no further arbitration is
necessary; the CPU has immediate access to external memory through slave
port 0 on the memory controller. If CPU access is to one of the peripherals on
the main bus, however, the main arbiter will arbitrate the access.
ꢀ
Main arbiter. Contains a 16-entry Bus Request Configuration (BRC) register.
Each BRC entry represents a bus request and grant channel. Each
request/grant channel can be assigned to only one bus master at a time. Each
bus master can be connected to multiple request/grant channels
simultaneously, however, depending on the bus bandwidth requirement of that
master.
Each request/grant channel has a two-bit Bandwidth Reduction Field (BRF)
to determine how often each channel can arbitrate for the system bus —
100%, 75%, 50%, or 25%. A BRF value of 25%, for example, causes a channel
to be skipped every 3 or 4 cycles. The BRC gates the bus requesting signals
going into a 16-entry Bus Request register (BRR). As a default, unassigned
channels in the BRC block the corresponding BRR entries from being set by
any bus request signals. On powerup, only the CPU is assigned to one of the
channels with 100% bandwidth strength as the default setting.
How the bus
arbiter works
1
The arbiter evaluates the BRR at every bus clock until one or more bus requests
are registered.
138
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
System bus arbiter
2
3
The arbiter stops evaluating the BRR until a bus grant is issued for the previous
evaluation cycle.
The arbiter grants the bus to requesting channels, in a round-robin manner, at
the rising clock edge of the last address issued for the current transaction (note
that each transaction may have multiple transfers), when a SPLIT response is
sampled by the arbiter, or when the bus is idling.
4
5
Each master samples the bus grant signal (hgrant_x) at the end of the current
transfer, as indicated by the hready signal. The bus master takes ownership of the
bus at this time.
The arbiter updates the hmaster [3:0] signals at the same time to indicate the
current bus master and to enable the new master’s address and control signals
to the system bus.
See your AMBA standards documentation for detailed information and illustrations
of AMBA AHB transactions.
Ownership
Ownership of the data bus is delayed from ownership of the address/control bus.
When hready indicates that a transfer is complete, the master that owns the
address/control bus can use the data bus — and continues to own that data bus —
until the transaction completes.
Note: If a master is assigned more than one request/grant channel, these channels
need to be set and reset simultaneously to guarantee that a non-requesting
master will not occupy the system bus.
Locked bus
sequence
The arbiter observes the hlock_x signal from each master to allow guaranteed back-
to-back cycles, such as read-modified-write cycles. The arbiter ensures that no
other bus masters are granted the bus until the locked sequence has completed. To
support SPLIT or RETRY transfers in a locked sequence, the arbiter retains the bus
master as granted for an additional transfer to ensure that the last transfer in the
locked sequence completed successfully.
If the master is performing a locked transfer and the slave issues a split response,
the master continues to be granted the bus until the slave finishes the SPLIT
response. (This situation degrades AHB performance.)
Relinquishing the
bus
When the current bus master relinquishes the bus, ownership is granted to the next
requester.
ꢀ
ꢀ
If there are no new requesters, ownership is granted to the last master.
Bus parking must be maintained if other masters are waiting for SPLIT transfers
to complete.
www.digiembedded.com
139
S Y S T E M C O N T RO L M OD U L E
System bus arbiter
ꢀ
If the bus is granted to a default master and continues to be in the IDLE state
longer than a specified period of time, an AHB bus arbiter timeout is
generated. An AHB bus arbiter timeout can be configured to interrupt the CPU
or to reset the chip.
SPLIT transfers
A SPLIT transfer occurs when a slave is not ready to perform the transfer. The slave
splits, or masks, its master, taking away the master’s bus ownership and allowing
other masters to perform transactions until the slave has the appropriate resources
to perform its master’s transaction.
The bus arbiter supports SPLIT transfers. When a SPLIT response is issued by a slave,
the current master is masked for further bus requesting until a corresponding
hsplit_x[15:0] signal is issued by the slave indicating that the slave is ready to
complete the transfer. The arbiter uses the hsplit_x[15:0] signals to unmask the
corresponding master, and treats the master as the highest-priority requester for
the immediate next round of arbitration. The master eventually is granted access to
the bus to try the transfer again.
Note: The arbiter automatically blocks bus requests with addresses directed at a
“SPLITting” slave until that SPLIT transaction is completed.
Arbiter
configuration
example
This example shows how to configure the AHB arbiter to guarantee bandwidth to a
given master. These are the conditions in this example:
ꢀ
ꢀ
ꢀ
ꢀ
5 AHB masters — CPU, Ethernet Rx, Ethernet Tx, IO hub, and external DMA
AHB clock frequency — 75 MHz
Average access time per 16-byte memory access — 4 clock cycles
The ARM926EJ-S is guaranteed one-half the total memory bandwidth
In this example, the bandwidth for each master can be calculated using this
formula:
Bandwidth per master:
= [(75MHz/2) / (4 clock cycles per access x 5 masters)] x 16 bytes
= 60MB/master
Note: The worst case scenario is that there are 90 Mbps total to be split by all 5
masters.
if this meets the requirements of all the masters, the AHB arbiter is programmed
like this:
BRC0[31:24] = 8’b1_0_00_0000
BRC0[23:16] = 8’b1_0_00_0001
BRC0[15:8] = 8’b1_0_00_0000
channel enabled, 100%, ARM7EJ-S
channel enabled, 100%, Ethernet Rx
channel enabled, 100%, Ethernet TX
channel enabled, 100%, IO hub
BRC0[7:0]
= 8’b1_0_00_0101
BRC1[31:24] = 8’b1_0_00_0011
channel enabled, 100%, Ext DMA
140
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Address decoding
BRC1[23:16] = 8’b1_0_00_0000
BRC1[15:8] = 8’b1_0_00_0000
channel disabled
channel disabled
channel disabled
channel disabled
channel disabled
channel disabled
channel disabled
channel disabled
channel disabled
channel disabled
channel disabled
BRC1[7:0]
= 8’b1_0_00_0000
BRC2[31:24] = 8’b0_0_00_0000
BRC2[23:16] = 8’b0_0_00_0000
BRC2[15:8] = 8’b0_0_00_0000
BRC2[7:0]
= 8’b0_0_00_0000
BRC3[31:24] = 8’b0_0_00_0000
BRC3[23:16] = 8’b0_0_00_0000
BRC3[15:8] = 8’b0_0_00_0000
BRC[7:0]
= 8’b0_0_00_0000
Address decoding
A central address decoder provides a select signal — hsel_x — for each slave on the
bus.
This table shows how the system memory address is set up to allow access to the
internal and external resources on the system bus. Note that the external memory
chip select ranges can be reset after powerup. The table shows the default powerup
values; you can change the ranges by writing to the BASE and MASK registers (see
registers” on page 193 for more information).
Address range
Size
System functions
0x0000 0000 – 0x0FFF FFFF
256 MB
System memory chip select 0
Dynamic memory (default)
0x1000 0000 – 0x1FFF FFFF
0x2000 0000 – 0x2FFF FFFF
0x3000 0000 – 0x3FFF FFFF
0x4000 0000 – 0x4FFF FFFF
0x5000 0000 – 0x5FFF FFFF
0x6000 0000 – 0x6FFF FFFF
256 MB
256 MB
256 MB
256 MB
256 MB
256 MB
System memory chip select 1
Dynamic memory (default)
System memory chip select 2
Dynamic memory (default)
System memory chip select 3
Dynamic memory (default)
System memory chip select 0
Static memory (default)
System memory chip select 1
Static memory (default)
System memory chip select 2
Static memory (default)
www.digiembedded.com
141
S Y S T E M C O N T RO L M OD U L E
Programmable timers
Address range
Size
System functions
0x7000 0000 – 0x7FFF FFFF
256 MB
System memory chip select 3
Static memory (default)
0x8000 0000 – 0x8FFF FFFF
0x9000 0000 – 0x9FFF FFFF
0xA000 0000 – 0xA05F FFFF
0xA060 0000 – 0xA06F FFFF
0xA070 0000 – 0xA07F FFFF
0xA080 0000 – 0xA08F FFFF
0xA090 0000 – 0xA09F FFFF
0xA0A0 0000 – 0xFFFF FFFF
256 MB
256 MB
6 MB
Reserved
IO hub
Reserved
1 MB
Ethernet Communication Module
Memory controller
External DMA module
System Control Module
Reserved
1 MB
1 MB
1 MB
1526MB
This table shows the hmaster[3:0] assignments for the processor.
Master Name
ARM926 data
Ethernet Rx
hmaster[3:0] assignment
0000
0001
0010
0100
0101
Ethernet Tx
IO hub
ARM926 instruction
Programmable timers
The processor provides 11 programmable timers:
ꢀ
ꢀ
Software watchdog timer
10 general purpose timers
Software
watchdog timer
The software watchdog timer, set to specific time intervals, handles gross system
misbehaviors. The watchdog timer can be set to timeout in longer ranges of time
intervals, typically in seconds.
The software watchdog timer can be enabled or disabled, depending on the
operating condition. When enabled, system software must write to the Software
Watchdog Timer register before it expires. When the timer does timeout, the
system is preconfigured to generate an IRQ, an FIQ, or a RESET to restart the entire
system.
142
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
General purpose timers/counters
General purpose timers/counters
Ten 32-bit general purpose timers/counters (GPTC) provide programmable time
intervals to the CPU when used as one or multiple timers. There are two I/O pins
associated with each timer.
ꢀ
When used as a gated timer, one I/O pin serves as an input qualifier (high/low
programmable).
ꢀ
When used as a regular timer (enabled by software), the other I/O pin serves
as a terminal count indicator output.
These pins can also be used independently as up/down counters to monitor the
frequency of certain events (events capturing). In this situation, the I/O pin
becomes the clock source of the counter.
Source clock
frequency
Depending on the applications, the source clock frequency of the timers/counters is
selectable among the system memory clock, the system memory clock with multiple
divisor options, or an external pulse event. The divisor options are 2, 4, 6, 16, 32, 62,
128, or 256. If an external pulse is used, the frequency must be less than one half the
system memory clock frequency.
GPTC
characteristics
ꢀ
ꢀ
Each GPTC can measure external event lengths up to minutes range, and can
be individually enabled/disabled.
Each GPTC can be configured to reload, with the value defined in the Initial
Timer Count register (one for each GPTC), and generates an interrupt upon
terminal count.
ꢀ
ꢀ
Each GPTC has an interrupt request connected to the IRQ interrupt controller
(VIC). The priority level and enable/disable of each interrupt can be
programmed in the VIC. The CPU can read the contents of the timer/counter.
GPTCs can be concatenated to form larger timer counters.
Control field
Include this control field in each of the 32-bit timer/counter control registers:
ꢀ
ꢀ
Clock frequency selection
Mode of operation:
–
–
–
–
Internal timer, with or without external terminal count indicator
External gated timer with gate active low
External gated timer with gate active high
External event counter — frequency must be less than one half the system
memory clock frequency
ꢀ
ꢀ
Timer/counter enable
Count up or down
www.digiembedded.com
143
S Y S T E M C O N T RO L M OD U L E
Basic PWM function
ꢀ
ꢀ
Interrupt enable
Concatenate to up-stream timer/counter; that is, use up-stream
timer/counter’s overflow/underflow output as clock input
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
Reload enable
Basic PWM function
Enhanced PWM functionality (timers 6–9)
Quadrature decoder function (timer 5)
32-bit or 16-bit operation
16-bit mode
options
These options are available in 16-bit mode:
ꢀ
Capture mode. Capture the counter value on the rising or falling edge of an
external event and interrupt the CPU.
ꢀ
Compare mode. Interrupt the CPU when the counter value is equal to the
Match register.
Basic PWM function
Any of the timer/counters can be configured to provide a basic PWM function. Each
PWM function requires concatenating two timer/counters, resulting in four PWM
outputs. One of the timer/counters controls the pulse width and the other controls
the period. The basic PWM function is output through GPIO through functions
labeled PWM Ch N.
Functional block
diagram
This diagram illustrates the basic PWM function:
pulse width control
Timer/Counter 0
pwm out 0
PWM 0
period control
Timer/Counter 1
pulse width control
period control
pwm out 0
144
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Enhanced PWM function
Enhanced PWM function
Timer counters 6–9 have additional features to add enhanced PWM functionality:
ꢀ
ꢀ
ꢀ
High register — Compared to the timer/counter to toggle PWM output high
Low register — Compared to the timer/counter to toggle PWM output back low
Three 15-bit Step registers associated with four enhanced timer/counters. The
values of Step registers are added when the high, low, and reload values are
reached, which allows a steadily variable motor control PWM wave to be
generated. The enhanced PWM function is output through GPIO through the
functions labeled Ext Timer Event Out Ch N for channels 6 to 9.
Sample enhanced
PWM waveform
Reload Value
FFFF_0000
High Value
FFFF_7000
High Value
FFFF_B000
Terminal Count
FFFF_FFFF
Timer Counter clock frequency
75MHz
PWM period
Low time 1
High time
873.000 usec
382.293 usec
218.453 usec
272.254 usec
Low time 2
Quadrature decoder function
The processor provides a quadrature decoder function to allow the CPU to
determine the external device rate of rotation and the direction of rotation.
Example applications are robotic axles for feedback control, mechanical knobs to
determine user input, and in computer mice, to determine direction of movement.
One timer/counter will include a quadrature decoder function, which takes some
computational load off the CPU. When a CPU reads the output signals of a
quadrature encoder, every state must be decoded and a counter needs to be
updated based on the interpretation of the states. For example, for an encoder of
256 pulses per revolution turning at a modest 6000 rpm, the CPU needs to find and
decoded 102,400 state changes per second and update the counter accordingly.
With an x8 sampling rate, the CPU needs to sample the input about 8 x 102,400
timer per second. This consumes a significant portion of the CPU bandwidth.
www.digiembedded.com
145
S Y S T E M C O N T RO L M OD U L E
How the quadrature decoder/counter works
A quadrature decoder/counter module performs these tasks at real time speed and
interrupts the CPU at the predetermined conditions.
How the quadrature decoder/counter works
Provides input
signals
A quadrature encoder provides a pair of signals (in-phase and quad-phase) with
opposite polarities and a 90-degree phase shift. Decode these signals to create an
algorithm to determine the direction, speed, and position of a motion wheel.
Input signals
00 01 11 10 00 01 11 10 00 01 00 10 11 01 00
Counter
Clockwise
Clockwise
Quadrature
encoding truth
table
Legend:
NC — No change
CW — Clockwise
CCW — Counter clockwise
Err — Error
I:Q
00
01
10
11
00
01
10
11
NC
CW
NC
CCW
Err
Err
CCW
CW
Err
CW
CCW
NC
Err
NC
CCW
CW
146
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
How the quadrature decoder/counter works
Monitors how far
the encoder has
moved
The counter keeps a running count of how far the encoder has moved.
ꢀ
The decoder increments a 32-bit counter when a state change is found in the
positive direction.
ꢀ
The decoder decrements a 32-bit counter when a state change is found in the
other direction.
When the programmed number reaches the terminal count, the counter is reset and
an interrupt is generated to the CPU. The CPU can also read the counter directly to
sense the direction of the motor.
Typical
This diagram shows a typical application of the quadrature decoder/counter:
application
A
Controller
Motor
Host
Quadrature
Decoder/Counter
Encoder
Digital filter
To ensure the precision and quality of the quadrature decoder/counter, a digital filter
rejects noise on the incoming quadrature signals using three-clock-cycle delayed
filtering. The three-clock-cycle delay filter rejects large and short duration noise
spikes that typically occur in motor system applications.
Testing signals
Timer support
Each signal is sampled on rising clock edges. A time history of the signals is stored in
a four-bit shift register. Any signal is tested for a stable level that is present for
three consecutive rising clock edges. With this method, pulses shorter than a two-
clock period are rejected.
Timer counter 5 supports the sampling clock and the counters.
www.digiembedded.com
147
S Y S T E M C O N T RO L M OD U L E
Interrupt controller
Interrupt controller
The interrupt system is a simple two-tier priority scheme. Two lines access the CPU
core and can interrupt the processor: IRQ (normal interrupt) and FIQ (fast
interrupt). FIQ has a higher priority than IRQ.
FIQ interrupts
Most sources of interrupts on the processor are from the IRQ line. There is only one
FIQ source for timing-critical applications. The FIQ interrupt generally is reserved
for timing-critical applications for these reasons:
ꢀ
The interrupt service routine is executed directly without determining the
source of the interrupt.
ꢀ
Interrupt latency is reduced. The banked registers available for FIQ interrupts
are more efficient because a context save is not required.
Note: The interrupt source assigned to the FIQ must be assigned to the highest
priority, which is 0.
IRQ interrupts
IRQ interrupts come from several different sources in the processor and are
managed using the Interrupt Config registers (see “Int (Interrupt) Config
(Configuration) 31–0 registers” on page 175). IRQ interrupts can be enabled or
disabled on a per-level basis using the Interrupt Enable registers. These registers
serve as masks for the different interrupt levels. Each interrupt level has two
registers:
ꢀ
Interrupt Configuration register. Use this register to assign the source for
each interrupt level, invert the source polarity, select IRQ or FIQ, and enable
the level.
ꢀ
Interrupt Vector Address register. Contains the address of the interrupt
service routine.
32-vector
interrupt
controller
The next figure shows a 32-vector interrupt controller:
148
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Interrupt controller
Interrupt Source 0
Interrupt Source 1
Priority Level 0 (highest)
IRQ
FIQ
Interrupt Source 31
Invert
Interrupt Source ID Reg 0
Enable
Winning Priority Level
Active Interrupt Level Reg
ISADDR Reg
Interrupt Source 0
Interrupt Source 1
Interrupt Vector Address Reg Level 0
Interrupt Vector Address Reg Level 1
Priority Level 1
Priority
Interrupt Source 31
Invert
Encoder
Interrupt Source ID Reg 1
Enable
Interrupt Vector Address Reg Level 31
Interrupt Source 0
Interrupt Source 1
Priority Level 31 (lowest)
Interrupt Source 31
Invert
Interrupt Source ID Reg 31
Enable
IRQ
ꢀ
The IRQ interrupts are enabled by the respective enabling bits.
characteristics
ꢀ
Once enabled, the interrupt source programmed in the Interrupt Configuration
register for each priority level connects the interrupt to one of 32 priority lines
going into the priority encoder block.
ꢀ
The priority encoder block has a fixed order, with line 0 as the highest priority.
The interrupt with the highest priority level has its encoded priority level
displayed, to select the appropriate vector for the ISADDR register (see
ꢀ
The CPU, once interrupted, can read the ISADDR register to get the address of
the Interrupt Service Routine. A read to the ISADDR register updates the
priority encoder block, which masks the current and any lower priority
interrupt requests. Writing to this address indicates to the priority hardware
that the current interrupt is serviced, allowing lower priority interrupts to
become active.
ꢀ
ꢀ
The write value to the ISADDR register must be the level of the interrupt being
serviced. Valid values are 0–31.
The priority encoder block enables 32 prioritized interrupts to be serviced in
nested fashion. A software interrupt can be implemented by writing to a
software interrupt register. The software interrupt typically is assigned level 1
or level 2 priority.
Interrupt sources
An Interrupt Status register shows the current active interrupt requests. The Raw
Interrupts register shows the status of the unmasked interrupt requests.
www.digiembedded.com
149
S Y S T E M C O N T RO L M OD U L E
Interrupt controller
The interrupt sources are assigned as shown:
Interrupt ID
Interrupt source
Watchdog Timer
0
1
AHB Bus Error
2
Ext DMA
3
CPU Wake Interrupt
Ethernet Module Receive Interrupt
Ethernet Module Transmit Interrupt
Ethernet Phy Interrupt
UART A Interrupt
UART B Interrupt
UART C Interrupt
UART D Interrupt
SPI Interrupt
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Reserved
Reserved
ADC Interrupt
Early Power Loss Interrupt
2
I C Interrupt
RTC Interrupt
Timer Interrupt 0
Timer Interrupt 1
Timer Interrupt 2
Timer Interrupt 3
Timer Interrupt 4
Timer Interrupt 5
Timer Interrupt 6
Timer Interrupt 7
Timer Interrupt 8
Timer Interrupt 9
External Interrupt 0
External Interrupt 1
External Interrupt 2
External Interrupt 3
150
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Vectored interrupt controller (VIC) flow
Vectored interrupt controller (VIC) flow
This is how the VIC flow works:
1
2
3
An interrupt occurs.
The CPU branches to either the IRQ or FIQ interrupt vector.
If the CPU goes to the IRQ vector, the CPU reads the service routine address from
the VIC’s ISADDR register. The READ updates the VIC’s priority hardware to
prevent current or any lower priority interrupts from interrupting again. The
CPU must not read the ISADDR register for FIQ interrupts.
4
The CPU branches to the Interrupt Service Routine (ISR) and stacks the
workspace so the IRQ can be enabled.
5
6
7
8
9
The CPU enables the IRQ interrupts so higher priority interrupts can be serviced.
The CPU executes the interrupt service routine.
The CPU clears the source of the current interrupt.
The CPU disables the IRQ and restores the workspace.
If IRQ, the CPU writes the level value of the interrupt being serviced to the
ISADDR register to clear the current interrupt path in the VIC’s priority
hardware.
10 The CPU returns from the interrupt.
Configurable system attributes
System software can configure these system attributes:
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
Little endian/big endian mode
Watchdog timer enable
Watchdog timeout generates IRQ/FIQ/RESET
Watchdog timeout interval
Enable/disable ERROR response for misaligned data access
System module clock enables
Enable access to internal registers in USER mode
PLL configuration
Hardware strapping determines the initial powerup PLL (see “Bootstrap
initialization” on page 152). After powerup, software can change the PLL settings
by writing to the PLL Configuration register.
www.digiembedded.com
151
S Y S T E M C O N T RO L M OD U L E
Bootstrap initialization
PLL
configuration and
control system
block diagram
x1_sys_osc
29.4912 MHz
PLL
div by
2,4,8,16,32,64,
128
Ref
Clk
Clk
Out
OSC
x2_sys_osc
CPU clock (149.9136 MHz max)
(programmable)
mux select default is
AHB clock (CCSel = 0)
BP
NR[4:0]
OD[1:0]
set by
strapping
or software
main clocks
to modules
div by
4,8,16,32,64,128
or 256
AHB clocks (74.9569MHz max)
set by
software
only
NF[8:0]
(programmable)
PLL Vco = (RefClk / NR+1) * (NF+1)
ClkOut = PLL Vco / OD+1
defaults
NR + 1 = 8
OD + 1 = 1
NF + 1 = 61
Sample Clock Frequency Settings With 29.4912MHz Crystal
(NF+1 = 61 and OD + 1 = 1)
NR+1 Clk Out
CPU clock
(CCSel = 1)
149.9136
128.4975
112.4352
99.9424
89.9482
81.7711
74.9568
CPU clock
(CCSel = 0)
74.9568
64.2487
56.2176
49.9712
44.9741
40.8855
37.4784
AHB clock
6
7
299.8272
256.9947
224.8704
199.8848
179.8962
163.5421
149.9136
74.9568
64.2487
56.2176
49.9712
44.9741
40.8855
37.4784
8
9
10
11
12
Restrictions
RefClk / NR+1 range: 275KHz – 550MHz
PLL Vco range: 110MHz – 550MHz
Bootstrap initialization
The PLL and other system configuration settings can be configured at powerup
before the CPU boots. External pins configure the necessary control register bits at
powerup. There are internal pullup resistors on these pins to provide a default
configuration. External pulldown resistors can configure the PLL and system
configuration registers depending on the application.
Configuring the
powerup settings
This table shows how each bit configures the powerup settings.
ꢀ
ꢀ
0 = Use an external pulldown
1 = Use the internal pullup
152
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Bootstrap initialization
Pin name
Configuration bits
gpio_a[3]
Endian configuration
0
1
Little endian
Big endian
gpio_a[2]
Boot mode
0
1
Boot from SDRAM using serial SPI EEPROM
Boot from Flash ROM
gpio_a[0], addr[23]
Flash/SPI configuration
If booting from Flash:
00
01
10
11
8 bit
32 bit
32 bit
16 bit
If booting from SPI
00
01
10
11
Reserved
8-bit addressing
24-bit addressing
16-bit addressing
addr[19:9]
addr[7]
Gen ID
PLL bypass setting
0
1
Bypass
Normal operation
addr[6:5]
addr[4:0]
PLL output divider setting OD
00
01
10
11
3
2
1
0
PLL reference clock divider setting NR
00111
00110
00101
00100
00011
00010
00001
00000
01111
01110
01101
31
30
29
28
27
26
25
24
23
22
21
01100
01011
01010
01001
01000
10111
10110
10101
10100
10011
10010
20
19
18
17
16
15
14
13
12
11
10
10001
10000
11111
11110
11101
11100
11011
11010
11001
11000
9
8
7
6
5
4
3
2
1
0
www.digiembedded.com
153
S Y S T E M C O N T RO L M OD U L E
System configuration registers
System configuration registers
All configuration registers must be accessed as 32-bit words and as single accesses
only. Bursting is not allowed.
Register address
Offset
[31:24]
[23:16]
[15:8]
[7:0]
map
A090 0000
A090 0004
A090 0008
A090 000C
A090 0010
A090 0014
A090 0018
A090 001C
A090 0020
A090 0024
A090 0028
A090 002C
A090 0030
A090 0034
A090 0038
A090 003C
A090 0040
A090 0044
A090 0048
A090 004C
A090 0050
A090 0054
A090 0058
A090 005C
A090 0060
A090 0064
A090 0068
A090 006C
A090 0070
General Arbiter Control
BRC0
BRC1
BRC2
BRC3
Reserved
AHB Error Detect Status 1
AHB Error Detect Status 2
AHB Error Monitoring Configuration
Timer Master Control
Timer 0 Reload Count and Compare register
Timer 1 Reload Count and Compare register
Timer 2 Reload Count and Compare register
Timer 3 Reload Count and Compare register
Timer 4 Reload Count and Compare register
Timer 5 Reload Count and Compare register
Timer 6 Reload Count and Compare register
Timer 7 Reload Count and Compare register
Timer 8 Reload Count and Compare register
Timer 9 Reload Count and Compare register
Timer 0 Read and Capture register
Timer 1 Read and Capture register
Timer 2 Read and Capture register
Timer 3 Read and Capture register
Timer 4 Read and Capture register
Timer 5 Read and Capture register
Timer 6 Read and Capture register
Timer 7 Read and Capture register
Timer 8 Read and Capture register
154
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
System configuration registers
Offset
[31:24]
[23:16]
[15:8]
[7:0]
A090 0074
A090 0078
A090 007C
A090 0080
A090 0084
A090 0088
A090 008C
A090 0090
A090 0094
A090 0098
A090 009C
A090 00A0
A090 00A4
A090 00A8
A090 00AC
A090 00B0
A090 00B4
A090 00B8
A090 00BC
A090 00C0
A090 00C4
A090 00C8
A090 00CC
A090 00D0
A090 00D4
A090 00D8
A090 00DC
A090 00E0
A090 00E4
A090 00E8
A090 00EC
A090 00F0
A090 00F4
Timer 9 Read and Capture register
Timer 6 High register
Timer 7 High register
Timer 8 High register
Timer 9 High register
Timer 6 Low register
Timer 7 Low register
Timer 8 Low register
Timer 9 Low register
Timer 6 High and Low Step register
Timer 7 High and Low Step register
Timer 8 High and Low Step register
Timer 9 High and Low Step register
Timer 6 Reload Step register
Timer 7 Reload Step register
Timer 8 Reload Step register
Timer 9 Reload Step register
Reserved
Reserved
Reserved
Interrupt Vector Address Register Level 0
Interrupt Vector Address Register Level 1
Interrupt Vector Address Register Level 2
Interrupt Vector Address Register Level 3
Interrupt Vector Address Register Level 4
Interrupt Vector Address Register Level 5
Interrupt Vector Address Register Level 6
Interrupt Vector Address Register Level 7
Interrupt Vector Address Register Level 8
Interrupt Vector Address Register Level 9
Interrupt Vector Address Register Level 10
Interrupt Vector Address Register Level 11
Interrupt Vector Address Register Level 12
www.digiembedded.com
155
S Y S T E M C O N T RO L M OD U L E
System configuration registers
Offset
[31:24]
[23:16]
[15:8]
[7:0]
A090 00F8
A090 00FC
A090 0100
A090 0104
A090 0108
A090 010C
A090 0110
A090 0114
A090 0118
A090 011C
A090 0120
A090 0124
A090 0128
A090 012C
A090 0130
A090 0134
A090 0138
A090 013C
A090 0140
A090 0144
A090 0148
A090 014C
A090 0150
A090 0154
A090 0158
A090 015C
A090 0160
A090 0164
A090 0168
A090 016C
A090 0170
A090 0174
A090 0178
Interrupt Vector Address Register Level 13
Interrupt Vector Address Register Level 14
Interrupt Vector Address Register Level 15
Interrupt Vector Address Register Level 16
Interrupt Vector Address Register Level 17
Interrupt Vector Address Register Level 18
Interrupt Vector Address Register Level 19
Interrupt Vector Address Register Level 20
Interrupt Vector Address Register Level 21
Interrupt Vector Address Register Level 22
Interrupt Vector Address Register Level 23
Interrupt Vector Address Register Level 24
Interrupt Vector Address Register Level 25
Interrupt Vector Address Register Level 26
Interrupt Vector Address Register Level 27
Interrupt Vector Address Register Level 28
Interrupt Vector Address Register Level 29
Interrupt Vector Address Register Level 30
Interrupt Vector Address Register Level 31
Int Config 0
Int Config 4
Int Config 8
Int Config 12
Int Config 16
Int Config 20
Int Config 24
Int Config 28
ISADDR
Int Config 1
Int Config 5
Int Config 9
Int Config 13
Int Config 17
Int Config 21
Int Config 25
Int Config 29
Int Config 2
Int Config 6
Int Config 10
Int Config 14
Int Config 18
Int Config 22
Int Config 26
Int Config 30
Int Config 3
Int Config 7
Int Config 11
Int Config 15
Int Config 19
Int Config 23
Int Config 27
Int Config 31
Interrupt Status Active
Interrupt Status Raw
Reserved
Software Watchdog Configuration
Software Watchdog Timer
156
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
System configuration registers
Offset
[31:24]
[23:16]
[15:8]
[7:0]
A090 017C
A090 0180
A090 0184
A090 0188
A090 018C
A090 0190
A090 0194
A090 0198
A090 019C
A090 01A0
A090 01A4
A090 01A8
A090 01AC
A090 01B0
A090 01B4
Clock Configuration register
Module Reset register
Miscellaneous System Configuration register
PLL Configuration register
Active Interrupt ID register
Timer 0 Control register
Timer 1 Control register
Timer 2 Control register
Timer 3 Control register
Timer 4 Control register
Timer 5 Control register
Timer 6 Control register
Timer 7 Control register
TImer 8 Control register
Timer 9 Control register
A090 01B8 – A090 01CC
Reserved
A090 01D0
A090 01D4
A090 01D8
A090 01DC
A090 01E0
A090 01E4
A090 01E8
A090 01EC
A090 01F0
A090 01F4
A090 01F8
A090 01FC
A090 0200
A090 0204
A090 0208
A090 020C
A090 0210
System Memory Chip Select 0 Dynamic Memory Base
System Memory Chip Select 0 Dynamic Memory Mask
System Memory Chip Select 1 Dynamic Memory Base
System Memory Chip Select 1 Dynamic Memory Mask
System Memory Chip Select 2 Dynamic Memory Base
System Memory Chip Select 2 Dynamic Memory Mask
System Memory Chip Select 3 Dynamic Memory Base
System Memory Chip Select 3 Dynamic Memory Mask
System Memory Chip Select 0 Static Memory Base
System Memory Chip Select 0 Static Memory Mask
System Memory Chip Select 1 Static Memory Base
System Memory Chip Select 1 Static Memory Mask
System Memory Chip Select 2 Static Memory Base
System Memory Chip Select 2 Static Memory Mask
System Memory Chip Select 3 Static Memory Base
System Memory Chip Select 3 Static Memory Mask
Gen ID
www.digiembedded.com
157
S Y S T E M C O N T RO L M OD U L E
General Arbiter Control register
Offset
[31:24]
[23:16]
[15:8]
[7:0]
A090 0214
A090 0218
A090 021C
A090 0220
A090 0224
A090 0228
A090 022C
External Interrupt 0 Control register
External Interrupt 1 Control register
External Interrupt 2 Control register
External Interrupt 3 Control register
RTC Module Control
Power Management
AHB Bus Activity Status
General Arbiter Control register
Address: A090 0000
The General Arbiter Control register controls whether the CPU access is routed
through the main arbiter or is connected directly to the memory controller.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
8
7
Arb
Control
Reserved
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
N/A
D31:01
D00
N/A
R
Reserved
N/A
0x0
ArbControl
Arbiter control
0
1
CPU connected directly to memory controller
CPU connected to main arbiter
BRC0, BRC1, BRC2, and BRC3 registers
Addresses: A090 0004 / 0008 / 000C / 0010
The BRC[0:3] registers control the AHB arbiter bandwidth allocation scheme.
158
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
AHB Error Detect Status 1
Channel
This is how the channels are assigned in the four registers:
allocation
Register name
BRC0
[31:24]
Channel 0
Channel 4
Channel 8
Channel 12
[23:16]
Channel 1
Channel 5
Channel 9
Channel 13
[15:08]
Channel 2
Channel 6
Channel 10
Channel 14
[07:00]
Channel 3
Channel 7
Channel 11
Channel 15
BRC1
BRC2
BRC3
Register
31
15
30
14
29
13
28
27
26
25
24
8
23
22
21
20
19
18
17
16
0
Channel 0, 4, 8, or 12
Channel 1, 5, 9, or 13
12
11
10
9
7
6
5
4
3
2
1
Channel 3, 7, 11, or 15
BRF HMSTR
Channel 2, 6, 10, or 14
CEB
Rsvd
Register bit
assignment
This table shows the bit definition for each channel, using data bits [07:00] as the
example.
Bits
Access Mnemonic
Reset
Description
D07
R/W
CEB
0x0
Channel enable bit
0
1
Disabled
Enabled
D06
N/A
R/W
Reserved
BRF
N/A
0x0
N/A
D05:04
Bandwidth reduction field
Program the weight for each AHB bus master. Used
to limit access to the round robin scheduler.
00
01
10
11
100%
75%
50%
25%
D03:00
R/W
HMSTR
0x0
hmaster
Program a particular AHB bus master number here.
Note that a particular master an be programmed to
more than one channel.
AHB Error Detect Status 1
Address: A090 0018
www.digiembedded.com
159
S Y S T E M C O N T RO L M OD U L E
AHB Error Detect Status 2
The AHB Error Detect Status 1 register records the haddr[31:0] value present when any
AHB error is found. Note that this value is not reset on powerup but is reset when
the AHB Error Interrupt Clear bit is set in the AHB Error Monitoring Configuration
register (*).
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
EDSI
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
8
EDSI
Register bit
assignment
Bits
Access Mnemonic
EDS1
Reset
Description
D31:00
*
Not reset The haddr[31:0] value recorded during a slave error
response.
AHB Error Detect Status 2
Address: A090 001C
The AHB Error Detect Status 2 register records AHB master and slave values present
when any AHB error is found. This register also records which error condition was
triggered. Note that this value is not reset on powerup but is reset when the AHB
Interrupt Clear bit is set in the AHB Error Monitoring Configuration register (*).
Register
31
30
29
13
28
27
26
10
25
9
24
23
7
22
6
21
5
20
19
IE
18
DE
17
ER
16
Reser
ved
Reserved
15
14
12
11
8
4
3
2
1
0
H
W
Re
ser
ved
HSZ
HBRST
HMSTR
HPR
R
160
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
AHB Error Monitoring Configuration register
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
D31:20
D19
N/A
*
Reserved
IE
N/A
N/A
Not reset CPU instruction error
An error was found on the CPU instruction access to
external memory. The other fields in this register
and the AHB Error Status 1 register are not valid if
this bit is set.
D18
D17
*
*
DE
ER
Not reset CPU data error
An error was found on the CPU data access to
external memory. The other fields in this register
and the AHB Error Status 1 register are not valid if
this field is set.
Not reset AHB error response
Set if an AHB slave ERROR response is found.
D16:15
D14
N/A
*
Reserved
HWR
N/A
Not reset hwrite
Transaction type: write or read.
Not reset hmaster[3:0]
Initiating master identifier.
Not reset hprot[3:0]
Transaction protection code.
Not reset hsize[2:0]
Transaction size.
Not reset hburst[2:0
Transaction burst type
N/A
D13:10
D09:06
D05:03
D02:00
*
*
*
*
HMSTR
HPR
HSZ
HBRST
AHB Error Monitoring Configuration register
Address: A090 0020
The AHB Error Monitoring Configuration register configures the AHB arbiter error
monitoring settings.
www.digiembedded.com
161
S Y S T E M C O N T RO L M OD U L E
Timer Master Control register
Register
31
15
30
14
29
13
28
27
11
26
25
9
24
8
23
22
6
21
5
20
19
18
2
17
16
0
Reserved
EIC
Reserved
12
10
7
4
3
1
SERDC
Reserved
Reserved
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:24
D23
N/A
R/W
Reserved
EIC
N/A
0x0
AHB Error Interrupt Clear
Write a 1, then a 0 to this register to clear the AHB
error interrupt and to clear the AHB Error Detect
Status 1 and AHB Error Detect Status 2 registers.
D22:05
D04
N/A
R/W
Reserved
SERDC
N/A
0x0
N/A
AHB Slave Error Response Detect Config
0
1
Record error only
Generate IRQ
D03:00
N/A
Reserved
N/A
N/A
Timer Master Control register
Address: A090 0024
The Timer Master Control register resets and enables the timer in groups, which is
useful when using the timers in PW applications.
Register
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Reserved
T9RSE T9LSE
T8RSE T8LSE T8HSE
T9HSE
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
T0E
T4E
T1E
T7RSE T7LSE T7HSE T6RSE T6LSE T6HSE T9E
T8E T7E T6E
T5E
T3E T2E
162
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Timer Master Control register
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:22
D21
N/A
R/W
Reserved
T9RSE
N/A
0x0
Timer 9 reload step enable
0
1
Reload Step register disabled
Reload Step register enabled
D20
D19
D18
D17
D16
D15
D14
D13
D12
D11
D10
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
T9LSE
T9HSE
T8RSE
T8LSE
T8HSE
T7RSE
T7LSE
T7HSE
T6RSE
T6LSE
T6HSE
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
Timer 9 low step enable
0
1
Low Step register disabled
Low Step register enabled
Timer 9 high step enable
0
1
High Step register disabled
High Step register enabled
Timer 8 reload step enable
0
1
Reload Step register disabled
Reload Step register enabled
Timer 8 low step enable
0
1
Low Step register disabled
Low Step register enabled
Timer 8 high step enable
0
1
High Step register disabled
High Step register enabled
Timer 7 reload step enable
0
1
Reload Step register disabled
Reload Step register enabled
Timer 7 low step enable
0
1
Low Step register disabled
Low Step register enabled
Timer 7 high step enable
0
1
High Step register disabled
High Step register enabled
Timer 6 reload step enable
0
1
Reload Step register disabled
Reload Step register enabled
Timer 6 low step enable
0
1
Low Step register disabled
Low Step register enabled
Timer 6 high step enable
0
1
High Step register disabled
High Step register enabled
www.digiembedded.com
163
S Y S T E M C O N T RO L M OD U L E
Timer 0–4 Control registers
Bits
Access Mnemonic
Reset
Description
D09
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
T9E
T8E
T7E
T6E
T5E
T4E
T3E
T2E
T1E
T0E
0x0
Timer 9 enable
0
1
Timer reset
Timer enabled
D08
D07
D06
D05
D04
D03
D02
D01
D00
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
Timer 8 enable
0
1
Timer reset
Timer enabled
Timer 7 enable
0
1
Timer reset
Timer enabled
Timer 6 enable
0
1
Timer reset
Timer enabled
Timer 5 enable
0
1
Timer reset
Timer enabled
Timer 4 enable
0
1
Timer reset
Timer enabled
Timer 3 enable
0
1
Timer reset
Timer enabled
Timer 2 enable
0
1
Timer reset
Timer enabled
Timer 1 enable
0
1
Timer reset
Timer enabled
Timer 0 enable
0
1
Timer reset
Timer enabled
Timer 0–4 Control registers
Addresses: A090 0190 / 0194 / 0198 / 019C / 01A0
164
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Timer 0–4 Control registers
Register
31
30
14
29
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
18
2
Reserved
15
TE
13
8
3
Timer
Mode
Up
Down
Cap Comp
Debug Int Clr
TCS
Int Sel
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
N/A
D31:16
D15
N/A
R/W
Reserved
TE
0x0
Timer enable
0
1
Timer is disabled
Timer is enabled
D14:12
R/W
Cap Comp
0x0
Capture and compare mode functions
Applicable only when in 16-bit timer mode.
000
001
010
011
100
101
110
111
Normal operation
Compare mode, toggle output on match
Compare mode, pulse output on match
Capture mode, on input falling edge
Capture mode, on input rising edge
nd
Capture mode, on every 2 rising edge
th
Capture mode, on every 4 rising edge
th
Capture mode, on every 8 rising edge
D11
R/W
R/W
R/W
Debug
Int Clr
TCS
0x0
0x0
0x0
Debug mode
0
1
Timer enabled in CPU debug mode
Timer disabled in CPU debug mode
D10
Interrupt clear
Clears the timer interrupt. Software must write a 1,
then a 0 to this location to clear the interrupt.
D09:06
Timer clock select
0000
0001
0010
0011
0100
0101
0110
0111
1000
1111
AHB clock x 2
AHB clock
AHB clock / 2
AHB clock / 4
AHB clock / 8
AHB clock / 16
AHB clock / 32
AHB clock / 64
AHB clock / 128
External event
www.digiembedded.com
165
S Y S T E M C O N T RO L M OD U L E
Timer 5 Control register
Bits
Access Mnemonic
Reset
Description
D05:04
R/W
Timer mode
0x0
Timer mode
00
Internal timer or external event
01
External low-level gated timer
External high-level gated timer
Concatenate the lower timer.
10
11
Note:
When either external gated option is
selected, the time clock select bits deter-
mine the frequency.
D03
D02
D01
D00
R/W
R/W
R/W
R/W
Int Sel
0x0
0x0
0x0
0x0
Interrupt select
0
1
Interrupt disable
Generate IRQ
Up Down
Bit timer
Rel Enbl
Up/Down select
0
1
Up counter
Down counter
32 or 16 bit timer
0
1
16-bit timer
32-bit timer
Reload enable
0
1
Halt at terminal count. The timer must be
disabled, then enabled to reload the timer when
the terminal count is reached.
Reload and resume count at terminal count
Timer 5 Control register
Address: A090 01A4
Register
31
30
14
29
28
12
27
26
25
9
24
23
7
22
6
21
20
4
19
18
17
16
Rel
Mode
Reserved
TM2
15
TE
13
11
10
8
5
3
2
1
0
Timer
Mode
Up
Bit
Rel
Cap Comp
Debug Int Clr
TCS
Int Sel
Down timer Enbl
166
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Timer 5 Control register
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:19
D18
N/A
R/W
Reserved
Rel mode
N/A
0x0
Reload mode
Initializes the timer and the reload value at terminal
count. Reload mode is useful in quadrature decoder
applications, as it allows the reload value to be half
of he terminal count.
0
1
Use the value in the Reload register
Use half the value in the Reload register
D17:16
R/W
TM2
0x0
Timer mode 2
00
01
10
11
Mode as set by timer mode 1
Reserved
Reserved
Quadrature decoder/counter mode
D15
R/W
R/W
TE
0x0
0x0
Timer enable
0
1
Timer disabled
Timer enabled
D14:12
Cap Comp
Capture and compare mode functions
Applicable only when in 16-bit timer mode.
000
001
010
011
100
101
110
111
Normal operation
Compare mode, toggle output on match
Compare mode, pulse output on match
Capture mode, on input falling edge
Capture mode, on input rising edge
nd
Capture mode, on every 2 rising edge
th
Capture mode, on every 4 rising edge
th
Capture mode, on every 8 rising edge
D11
D10
R/W
R/W
Debug
Int Clr
0x0
0x0
Debug mode
0
1
Timer enabled in CPU debug mode
Timer disabled in CPU debug mode
Interrupt clear
Clears the timer interrupt. Software must write a 1,
then a 0 to this location to clear the interrupt.
www.digiembedded.com
167
S Y S T E M C O N T RO L M OD U L E
Timer 6–9 Control registers
Bits
Access Mnemonic
Reset
Description
D09:06
R/W
TCS
0x0
Timer clock select
0000
0001
0010
0011
0100
0101
0110
0111
1000
1111
AHB clock x 2
AHB clock
AHB clock / 2
AHB clock / 4
AHB clock / 8
AHB clock / 16
AHB clock / 32
AHB clock / 64
AHB clock / 128
External event
D05:04
R/W
Timer mode 1
0x0
Timer mode 1
00
Internal timer or external event
01
External low-level gated timer
External high-level gated timer
Concatenate the lower timer.
10
11
Note:
When either external gated option is
selected, the time clock select bits deter-
mine the frequency.
D03
D02
D01
D00
R/W
R/W
R/W
R/W
Int Sel
0x0
0x0
0x0
0x0
Interrupt select
0
1
Interrupt disable
Generate IRQ
Up Down
Bit timer
Rel Enbl
Up/Down select
0
1
Up counter
Down counter
32 or 16 bit timer
0
1
16-bit timer
32-bit timer
Reload enable
0
1
Halt at terminal count. The timer must be
disabled, then enabled to reload the timer when
the terminal count is reached.
Reload and resume count at terminal count
Timer 6–9 Control registers
Addresses: A090 01A8 / 01AC / 01B0 / 01B4
168
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Timer 6–9 Control registers
Register
31
30
14
29
28
12
27
26
25
24
23
7
22
6
21
5
20
4
19
3
18
17
16
0
Reserved
9
TM2
15
TE
13
11
10
8
2
1
Timer
Mode
1
Up
Bit
Rel
Enbl
Int
Sel
Cap Comp
Debug
TCS
Int Clr
Down Timer
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:18
D17:16
N/A
R/W
Reserved
TM2
N/A
0x0
Timer mode 2
00
01
Mode as set by timer mode 1
PWM mode, using High, Low, and Step
registers
10
11
Clock mode, toggle the timer output at the
terminal count to create a clock output
Reserved
D15
R/W
R/W
TE
0x0
0x0
Timer enable
0
1
Timer disabled
Timer enabled
D14:12
Cap Comp
Capture and compare mode functions
Applicable only when in 16-bit timer mode.
000
001
010
011
100
101
110
111
Normal operation
Compare mode, toggle output on match
Compare mode, pulse output on match
Capture mode, on input falling edge
Capture mode, on input rising edge
nd
Capture mode, on every 2 rising edge
th
Capture mode, on every 4 rising edge
th
Capture mode, on every 8 rising edge
D11
D10
R/W
R/W
Debug
Int Clr
0x0
0x0
Debug mode
0
1
Timer enabled in CPU debug mode
Timer disabled in CPU debug mode
Interrupt clear
Clears the timer interrupt. Software must write a 1,
then a 0 to this location to clear the interrupt.
www.digiembedded.com
169
S Y S T E M C O N T RO L M OD U L E
Timer 6–9 High registers
Bits
Access Mnemonic
Reset
Description
D09:06
R/W
TCS
0x0
Timer clock select
0000
AHB clock x 2 (Not applicable if timer
mode 2 is set to PWM mode (01))
0001
0010
0011
0100
0101
0110
0111
1000
1111
AHB clock
AHB clock / 2
AHB clock / 4
AHB clock / 8
AHB clock / 16
AHB clock / 32
AHB clock / 64
AHB clock / 128
External event
D05:04
R/W
Timer mode 1
0x0
Timer mode 1
00
01
10
11
Internal timer or external event
External low-level gated timer
External high-level gated timer
Concatenate the lower timer.
When either external gated option is selected, the
time clock select bits determine the frequency.
D03
D02
D01
D00
R/W
R/W
R/W
R/W
Int Sel
0x0
0x0
0x0
0x0
Interrupt select
0
1
Interrupt disable
Generate IRQ
Up Down
Bit timer
Rel Enbl
Up/Down select
0
1
Up counter
Down counter
32 or 16 bit timer
0
1
16-bit timer
32-bit timer
Reload enable
0
1
Halt at terminal count. The timer must be
disabled, then enabled to reload the timer when
the terminal count is reached.
Reload and resume count at terminal count
Timer 6–9 High registers
Addresses: A090 0078 / 007C / 0080 / 0084
The Timer 6–9 High registers contains the high registers for the enhanced PWM
features available in timers 6 through 9.
170
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Timer 6–9 Low registers
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
High
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
8
High
Register bit
assignment
Bits
D31:00
Access Mnemonic
R/W High
Reset
Description
0x0
The PWM output toggles high when the timer
counter reaches this value.
Timer 6–9 Low registers
Addresses: A090 0088 / 008C / 0090 / 0094
The Timer 6–9 Low registers contain the low registers for the enhanced PWM
features available in timers 6 through 9.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
Low
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
8
Low
Register bit
assignment
Bits
Access Mnemonic
R/W Low
Reset
Description
D31:00
0x0
The PWM output toggles low when the timer
counter reaches this value.
www.digiembedded.com
171
S Y S T E M C O N T RO L M OD U L E
Timer 6–9 High and Low Step registers
Timer 6–9 High and Low Step registers
Addresses: A090 0098 / 009C / 00A0 / 00A4
The Timer 6–9 High and Low Step registers contain the high and low step registers
for the enhanced PWM features available in timers 6 through 9.
Register
31
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Hi
Step
Dir
Hi Step
15
8
Lo
Step
Dir
Lo Step
Register bit
assignment
Bits
D31
Access Mnemonic
Reset
Description
High step direction
R/W
Hi Step Dir
0x0
0
Subtract the high step value from the original
high register value to increase the high time.
1
Add the high step value to the original high
register value to decrease the high time.
D30:16
D15
R/W
R/W
Hi Step
0x0
0x0
High step
This value is either added or subtracted from the
original high register value once each cycle.
Lo Step Dir
Low step direction
0
Subtract the low step value from the original low
register value to increase low time 2.
1
Add the low step value to the original low
register value to decrease low time 2.
D14:00
R/W
Lo Step
0x0
Low step
This value is either added or subtracted from the
original low register value once each cycle.
Timer 6–9 Reload Step registers
Addresses: A090 00A8 / 00AC / 00B0 / 00B4
The Timer 6–9 reload Step registers contain the reload step registers for the
enhanced PWM features available in timers 6 through 9.
172
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Timer 0-9 Reload Count and Compare register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
8
Rel
Dir
Rel Step
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:16
D15
N/A
R/W
Reserved
Rel Dir
N/A
0x0
Reload step direction
0
1
Subtract the reload step value from the original
reload register value to increase the overall
period.
Add the reload step value to the original reload
register value to decrease the overall period.
D14:00
R/W
Rel Step
0x0
Reload step
This value is either added or subtracted from the
original low register value once each cycle.
Timer 0-9 Reload Count and Compare register
Addresses: A090 0028 / 002C / 0030 / 0034 / 0038 / 003C / 0040 / 0044 / 0048 /
004C
The Timer 0 to 9 Reload Count and Compare register holds the up/down reload and
compare values for timers 0 to 9.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Comp Rel Cnt
9
8
Rel 15:0
www.digiembedded.com
173
S Y S T E M C O N T RO L M OD U L E
Timer 0-9 Read and Capture register
Register bit
assignment
Bits
Access Mnemonic
R/W Comp Rel Cnt
Reset
Description
D31:16
0x0
Timer Compare register or Timer Reload Bits
31:16 Count register
An external toggle or pulse is generated each time
the timer value matches this value. An interrupt is
generated, if enabled.
If configured for a 32-bit timer, bits 31:16 timer
reload.
D15:00
R/W
Rel 15:0
0x0
Timer Reload Bits 15:00 Count register
This value is loaded into the Timer register after the
timer is enable and after the terminal count has been
reached if the reload enable bit is set.
Timer 0-9 Read and Capture register
Addresses: A090 0050 / 0054 / 0058 / 005C / 0060 / 0064 / 0068 / 006C / 0070 /
0074
The Timer 0 to 9 Read and Capture register reads the current state of each timer
and capture register.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Cap Read
8
7
Read 15:0
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
D31:16
R/W
Cap Read
0x0
Timer Capture register or Timer Read Bits 31:16
register
Reads the capture value of each timer. An interrupt
is generated on a capture event, if enabled.
If configured as a 32-bit timer, then bits 31:16 of the
current state of each timer.
D15:00
R/W
Read 15:0
0x0
Timer Read Bits 15:00 register
Reads bits 15:00 of the current state of each timer.
174
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Interrupt Vector Address Register Level 31–0
Interrupt Vector Address Register Level 31–0
Addresses: A090 00C4 (level 0) / 00C8 / 00CC / 00D0 / 00D4 / 00D8 / 00DC / 00E0 /
00E4 / 00E8 / 00EC / 00F0 / 00F4 / 00F8 / 00FC / 0100 / 0104 / 0108 / 010C /
0110 / 0114 / 0118 / 011C / 0120 / 0124 / 0128 / 012C / 0130 / 0134 / 0138 /
013C / 0140 (level 31)
The Interrupt Vector Address register configures the Interrupt vector address for
each interrupt level source.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
22
21
20
4
19
3
18
2
17
1
16
0
Interrupt vector address register value (IVARV)
10
9
8
7
6
5
Interrupt vector address register value (IVARV)
Register bit
assignment
Bits
Access Mnemonic
R/W Int Vec Adr
Reset
Description
D31:00
0x0
Interrupt Vector Address register
Interrupt vector address register bits.
Int (Interrupt) Config (Configuration) 31–0 registers
Addresses: A090 0144 / 0148 / 014C / 0150 / 0154 / 0158 / 015C / 0160
Each Interrupt Configuration register is 8 bits in length, and programs each
interrupt configuration for each priority level.
Individual
register mapping
This table shows how the 32 individual 8-byte registers are mapped in the eight 32-
bit registers.
Register
A090 0144
A090 0148
A090 014C
A090 0150
A090 0154
A090 0158
[31:24]
[23:16]
[15:08]
[07:00]
Int Config 0
Int Config 4
Int Config 8
Int Config 12
Int Config 16
Int Config 20
Int Config 1
Int Config 5
Int Config 9
Int Config 13
Int Config 17
Int Config 21
Int Config 2
Int Config 6
Int Config 10
Int Config14
Int Config 18
Int Config 22
Int Config 3
Int Config 7
Int Config 11
Int Config 15
Int Config 19
Int Config 23
www.digiembedded.com
175
S Y S T E M C O N T RO L M OD U L E
ISADDR register
Register
A090 015C
A090 0160
[31:24]
[23:16]
[15:08]
[07:00]
Int Config 24
Int Config 28
Int Config 25
Int Config 29
Int Config 26
Int Config 30
Int Config 27
Int Config 31
Register bit
assignment
This is how the bits are assigned in each register, using data bits [07:00] as the
example.
Bits
Access Mnemonic
Reset
Description
D07
R/W
R
IE
0x0
Interrupt enable
0
1
Interrupt is disabled
Interrupt is enabled
D06
D05
INV
IT
0x0
0x0
Invert
0
1
Do not invert the level of the interrupt source.
Invert the level of the interrupt source.
R/W
Interrupt type
0
1
IRQ
FIQ
If FIQ is programmed, Interrupt must be the highest
priority.
D04:00
R/W
ISD
0x0–
0x1F
Interrupt source ID
Assign an interrupt ID to each priority level. See
list of interrupt ID numbers.
ISADDR register
Address: A090 0164
The ISADDR register provides the current ISADDR value. Read and write to this
register for IRQ interrupts only.
Immediately before the read to the ISADDR register, always perform an extra write
or read to any other internal register to consume an extra clock cycle. Make sure
that the extra access is not optimized away.
176
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Interrupt Status Active
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
0
Interrupt service routine address (ISRA)
9
8
7
6
Interrupt service routine address (ISRA)
Register bit
assignment
Bits
Access Mnemonic
R/W IS addr
Reset
Description
Interrupt service routine address
D31:00
0x0
ꢀ
A read to this register updates the priority logic
block and masks the current and any lower
priority interrupt requests.
ꢀ
Write the value of the interrupt level (0–31) to
clear the current priority level.
Interrupt Status Active
Address: A090 0168
The Interrupt Status Active register shows the current active interrupt request.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
0
Interrupt status active (ISA)
9
8
7
6
Interrupt status active (ISA)
Register bit
assignment
Bits
Access Mnemonic
ISA
Reset
Description
Interrupt status active
D31:00
R
0x0
Provides the status of all active, enabled interrupt
request levels, where bit 0 is for the interrupt
assigned to level 0, bit 1 is for the interrupt assigned
to level 1, and so on through bit 31 for the interrupt
assigned to level 31.
www.digiembedded.com
177
S Y S T E M C O N T RO L M OD U L E
Interrupt Status Raw
Interrupt Status Raw
Address: A090 016C
The Interrupt Status Raw register shows all current interrupt requests.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
0
Interrupt status raw (ISRAW)
9
8
7
6
Interrupt status raw (ISRAW)
Register bit
assignment
Bits
Access Mnemonic
ISRAW
Reset
Description
Interrupt status raw
Provides the status of all active, enabled, and
D31:00
R
0x0
disabled interrupt request levels, where bit 0 is for
the interrupt assigned to level 0, bit 1 is for the
interrupt assigned to level 1, and so on through bit 31
for the interrupt assigned to level 31.
Software Watchdog Configuration
Address: A090 0174
The Software Watchdog Configuration register configures the software watchdog
timer operation.
Register
31
15
30
14
29
13
28
27
26
10
25
9
24
23
22
21
20
19
18
17
16
0
Reserved
12
11
8
7
6
5
4
3
2
1
Re
serv
ed
Re
serv
ed
De
bug
SW
WE
SW
WI
SW
WIC
Reserved
SWTCS
178
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Software Watchdog Timer
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:09
D08
NA
Reserved
Debug
N/A
R/W
0x0
Debug mode
0
1
Timer enabled in CPU debug mode
Timer disabled in CPU debug mode
D07
R/W
SWWE
0x0
Software watchdog enable
0
1
Software watchdog disabled
Software watchdog enabled; once set, cannot be
cleared
D06
D05
N/A
R/W
Reserved
SWWI
N/A
0x0
N/A
Software watchdog interrupt clear
Write a 1, then a 0 to this register to clear the
software watchdog interrupt.
D04
R/W
SWWIC
0x0
Software watchdog interrupt response
0
1
Generate interrupt
Generate reset
Note:
If the interrupt option is selected and a
software watchdog timeout occurs and the
interrupt has not been cleared from a pre-
vious timeout, the reset is asserted.
D03
N/A
R/W
Reserved
SWTCS
N/A
0x0
N/A
D02:00
Software watchdog timer clock select
000
001
010
011
100
101
110
111
System memory clock / 2
System memory clock / 4
System memory clock / 8
System memory clock / 16
System memory clock / 32
System memory clock / 64
Reserved
Reserved
Software Watchdog Timer
Address: A090 0178
The Software Watchdog Timer register services the watchdog timer.
www.digiembedded.com
179
S Y S T E M C O N T RO L M OD U L E
Clock Configuration register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Watchdog Timer
8
7
Watchdog Timer
Register bit
assignment
Bits
D31:00
Access Mnemonic
R/W Watchdog timer
Reset
0x0
Description
Watchdog timer
ꢀ
A read to this register gives the current value of
the watchdog timer, but will not change the
contents.
ꢀ
A write to the register changes the contents
based on the write data value.
Clock Configuration register
Address: A090 017C
The Clock Configuration register enables and disables clocks to each module on the
AHB bus.
Register
31
30
CSC
29
28
27
26
25
24
23
22
21
20
19
18
17
16
MCOutMCOut
1
Max CSC
CCSel
Reserved
5
0
0
15
14
13
IO
12
11
10
9
8
7
6
4
3
2
1
Reser EXT
ved DMA hub
Reser
ved
UART UART UART UART Eth
MAC
I2C
AES
Reserved SPI
ADC
RTC
D
C
B
A
180
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Clock Configuration register
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
D31:29
R/W
CSC
0x000
Clock scale control
000 Full speed (149.9136/74.9568)
001 Divide by 2 (74.9568/37.4784)
010 Divide by 4 (37.4784/18.7392)
011 Divide by 8 (18.7393/9.3693)
100 Divide by 16 (9.3693/4.6848)
Determines the frequency of the system
clock rates. The full speed rate is 150MHz for the
CPU clock and 75MHz for the AHB clock. If
CCSEL = 0, then the CPU clock will be the same
frequency as the AHB clock, 74.9568 maximum.
This register can be written on the fly.
D28:26
R/W
Max CSC
0x000
Max clock scale control
000 Full speed (149.9136/74.9568)
001 Divide by 2 (74.9568/37.4784)
010 Divide by 4 (37.4784/18.7392)
011 Divide by 8 (18.7393/9.3693)
100 Divide by 16 (9.3693/4.6848)
Software can write to the CSC bits to
reduce the clock frequency of the CPU and AHB
clocks. This register determines the maximum
system CPU and AHB clock frequencies when
returning low speed operation. This register is only
valid if the hardware clock scale control bit is set in
the Power Management register. If CCSEL = 0, then
the CPU clock will be the same frequency as the
AHB clock, 74.9568 maximum.
D25
R/W
CCSel
0x0
CPU clock select
0
1
CPU clock is equal to AHB clock
CPU clock is 2 x AHB clock
D24:18
D17
N/A
R/W
Reserved
MCOut 1
N/A
0x1
N/A
Memory clock out 1
0
1
Clock disabled
Clock enabled
D16
R/W
MCOut 0
0x1
Memory clock out 0
0
1
Clock disabled
Clock enabled
D15
D14
N/A
R/W
Reserved
N/A
0x1
N/A
EXT DMA
External DMA
0
1
Clock disabled
Clock enabled
www.digiembedded.com
181
S Y S T E M C O N T RO L M OD U L E
Module Reset register
Bits
Access Mnemonic
Reset
Description
D13
R/W
R/W
R/W
IO hub
0x1
IO hub
0
1
Clock disabled
Clock enabled
D12
D11
RTC
0x1
0x1
RTC
0
1
Clock disabled
Clock enabled
2
2
I C
I C
0
Clock disabled
Clock enabled
1
D10
D09
N/A
R/W
Reserved
AES
N/A
0x0
N/A
AES
0
1
Clock disabled
Clock enabled
D08
R/W
ADC
0x1
ADC
0
1
Clock disabled
Clock enabled
D07:06
D05
N/A
R/W
Reserved
SPI
N/A
0x1
Always write to 00
SPI
0
1
Clock disabled
Clock enabled
D04
D03
D02
D01
D00
R/W
R/W
R/W
R/W
R/W
UART D
UART C
UART B
UART A
Eth MAC
0x1
0x1
0x1
0x1
0x1
UART D
0
1
Clock disabled
Clock enabled
UART C
0
1
Clock disabled
Clock enabled
UART B
0
1
Clock disabled
Clock enabled
UART A
0
1
Clock disabled
Clock enabled
Ethernet MAC
0
1
Clock disabled
Clock enabled
Module Reset register
Address: A090 0180
182
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Module Reset register
The Module Reset register resets each module on the AHB bus.
Register
31
30
29
28
27
26
25
24
23
22
21
20
19
3
18
2
17
1
16
0
RST STAT
Reserved
15
14
13
12
11
I2C
10
9
8
7
6
5
4
Reser EXT
ved DMA hub
IO
Reser
ved
Reser
ved
UART UART UART UART Eth
MAC
AES
Reserved SPI
ADC
D
C
B
A
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
D31:29
R
RST STAT
Not reset Reset status
001
010
011
100
101
External reset using reset_n
External reset using sreset_n
PLL change reset)
Software watchdog reset
AHB bus monitor reset
Status to determine the cause of the last chip level
reset.
D28:15
D14
N/A
R/W
Reserved
N/A
0x1
N/A
EXT DMA
External DMA
0
1
Module reset
Module enabled
D13
R/W
IO hub
0x1
IO hub
0
1
Module reset
Module enabled
D12
D11
N/A
R/W
Reserved
N/A
0x1
N/A
2
2
I C
I C
0
1
Module reset
Module enabled
D10
D09
N/A
R/W
Reserved
AES
N/A
0x0
N/A
AES
0
1
Module reset
Module enabled
D08
R/W
ADC
0x1
ADC
0
1
Module reset
Module enabled
www.digiembedded.com
183
S Y S T E M C O N T RO L M OD U L E
Miscellaneous System Configuration and Status register
Bits
Access Mnemonic
Reset
N/A
Description
Always write to 00
SPI
D07:06
D05
N/A
R/W
Reserved
SPI
0x1
0
1
Module reset
Module enabled
D04
D03
D02
D01
D00
R/W
R/W
R/W
R/W
R/W
UART D
UART C
UART B
UART A
Eth MAC
0x1
0x1
0x1
0x1
0x1
UART D
0
1
Module reset
Module enabled
UART C
0
1
Module reset
Module enabled
UART B
0
1
Module reset
Module enabled
UART A
0
1
Module reset
Module enabled
Ethernet MAC
0
1
Module reset
Module enabled
Miscellaneous System Configuration and Status register
Address: A090 0184
The Miscellaneous System Configuration and Status register configures
miscellaneous system configuration bits.
Register
31
15
30
14
29
13
28
27
REV
26
10
25
9
24
8
23
7
22
21
20
19
3
18
2
17
1
16
0
ID
12
11
6
5
4
Mis
bus
resp
Int
reg
acc
AUX/ Boot
COMP Mode
Boot
width
End
mode
Reserved
184
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Miscellaneous System Configuration and Status register
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
D31:24
R
REV
0x0
Revision
Indicates the hardware identification and revision of
the processor chip.
D23:16
R
ID
0x3
Identification
Identifies the chip as:
0
1
2
3
NS9750B-A1
NS9360
NS9210
NS9215
D15:07
D06
N/A
R
Reserved
N/A
N/A
N/A
AUX/COMP
Auxiliary analog comparator status
0
1
Level is below 2.4V
Level is above 2.4V
D05
R
R
Boot mode
Boot width
HW strap
gpio_a[2]
Boot mode
0
1
Boot from SPI
Boot from flash
D04:03
HW strap
gpio_a[0]
If boot mode is set to boot from flash:
00
01
10
11
8-bit
addr[23]
32-bit
32-bit
16-bit
If boot mode is set to boot from SPI:
00
01
10
11
Reserved
Boot using 8-bit address SPI device
Boot using 24-bit address SPI device
Boot using 16-bit address SPI device
D02
D01
R/W
R/W
End mode
HW strap
gpio_a[3]
Endian mode
0
1
Little endian mode
Big endian mode
Mis bus resp
0x0
Misaligned bus address response mode
0
1
Allow misaligned bus addresses
Generate an error response when a misaligned
bus address is found; that is, when haddr bits 1 or
0 are not level 0.
D00
R/W
Int reg acc
0x1
Internal register access mode bit 0
0
Allow access to internal registers using
PRIVILEGED mode only
1
Allow access to internal registers using
PRIVILEGED or USER mode
www.digiembedded.com
185
S Y S T E M C O N T RO L M OD U L E
PLL Configuration register
PLL Configuration register
Address: A090 0188
The PLL Configuration register configures the PLL. A write to this register
reconfigures and resets the PLL.
PLL frequency
formula
This is the formula for PLL frequency:
PLL Vco = (RefClk / NR+1) * NF+1
ClkOut = PLL Vco / OD+1
Restrictions:
ꢀ
ꢀ
(RefClk / NR+1) range: 275KHz–550MHz
PLL Vco range: 110MHz–550MHz
Register
Register bit
assignment
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
17
1
16
NF
Reserved
8
2
0
NF
BP
OD
NR
Bits
Access Mnemonic
Reset
N/A
Description
D31:17
D16:08
D07
N/A
R/W
R/W
Reserved
NF
N/A
0x3c
PLL feedback divider
BP
HW strap
~addr[7]
PLL bypass
0
1
PLL enabled
PLL bypassed
D06:05
D04:00
R/W
R/W
OD
NR
HW strap
~addr
[6:5]
PLL output divider
HW strap
~addr
PLL reference clock divider
[4:3],
addr[2:0]
186
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Active Interrupt Level ID Status register
Active Interrupt Level ID Status register
Address: A090 018C
The Active Interrupt Level ID Status register is six bits in length, and shows the
current active interrupt level ID.
Register
31
15
30
14
29
13
28
12
27
11
26
25
9
24
23
7
22
6
21
5
20
4
19
3
18
17
1
16
0
Reserved
10
8
2
Reserved
INTID
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
N/A
D31:06
D05:00
N/A
R
Reserved
INTID
N/A
0x0
Interrupt ID
The level ID of the current active interrupt.
Power Management
Address: A090 0228
The power management register controls the processor power management
features.
Register
31
30
29
13
28
27
26
25
24
23
7
22
6
21
20
19
18
17
16
HW clk
scale
Ext Int
3
MemSR WakeInt
FEn
Ext Int Ext Int Ext Int
2
Slp en
Reserved
Clr
4
1
0
15
14
12
11
I2C
10
9
8
5
3
2
1
0
UART UART
C
UART
D
UART
A
Enet
Reserved
RTC
Reserved
SPI
B
www.digiembedded.com
187
S Y S T E M C O N T RO L M OD U L E
Power Management
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
D31
R/W
Slp en
0x0
Deprecated Chip sleep enable
This control bit is provided for backwards
compatibility with software written for the NS9750
and NS9360 processors, and should not be used by
new software.
System software writes a 1 to this bit to stop the
clock to the CPU. Note that software is responsible
for stopping the clocks to all other modules except
the wakeup module(s) before setting this bit. When
this bit is set, the clock to the CPU is stopped and the
CPU is held in reset.
New designs should not use this bit.
They should stop the clock by executing the
following coprocessor instruction:
MCR p15, 0<Rd>, c7, c0, 4
This instruction places the ARM9 CPU into wait for
interrupt mode. In wait for interrupt mode, the clock
is stopped to the CPU but reset is not asserted.
The CPU resumes and executes a CPU Wake
Interrupt when activity is detected by one of the
wakeup modules selected by the other bits in this
register. The PC will be restored to the address after
the coprocessor instruction that stopped the CPU’s
clock when the CPU Wake Interrupt ISR completes.
The processor can not wake up on a timer interrupt
because the system timers are stopped when the
processor enters wake for interrupt mode.
D30
R/W
HW clk scale
0x0
Hardware clock scale control
0
1
Disable hardware clock scale control
Enable hardware clock scale control
Used by hardware to increase the clock rate when
activity is found on one of the modules enabled as a
wakeup module.
Hardware automatically increases the system clock
frequencies to the value set by the max clock scale
control bit in the Clock Control register.
D29:22
D21
N/A
R/W
Reserved
N/A
0x0
N/A
MemSRFEn
SDRAM self refresh control
0
1
Memory self refresh control disabled
Memory self refresh control enabled
When enabled, the memory controller is
automatically placed in self refresh mode when the
CPU is in sleep mode and taken out of self refresh
upon wakeup.
188
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
Power Management
Bits
Access Mnemonic
Reset
Description
D20
R/W
R/W
R/W
R/W
R/W
WakeIntClr
Ext Int 3
Ext Int 2
Ext Int 1
Ext Int 0
0x0
CPU wake interrupt clear
Write a 1, followed by a 0 to clear the CPU wake
interrupt.
D19
D18
D17
D16
0x0
0x0
0x0
0x0
External interrupt 3 interrupt wakeup
0
1
Do not wake on external 3 interrupt
Wake on external 3 wakeup
External interrupt 2 interrupt wakeup
0
1
Do not wake on external 2 interrupt
Wake on external 2 wakeup
External interrupt 1 interrupt wakeup
0
1
Do not wake on external 1 interrupt
Wake on external 1 wakeup
External interrupt 0 interrupt wakeup
0
1
Do not wake on external 0 interrupt
Wake on external 0 wakeup
D15:13
D12
N/A
R/W
Reserved
RTC
N/A
0x0
N/A
RTC wakeup
0
1
Do not wake on RTC interrupt
Wake on RTC interrupt
2
D11
R/W
I C
0x0
I2C wakeup
2
0
1
Do not wake on I C activity
2
Wake on I C activity
D10:06
D05
N/A
R/W
Reserved
SPI
N/A
0x0
N/A
SPI wakeup
0
1
Do not wake on SPI activity
Wake on SPI activity
D04
D03
D02
R/W
R/W
R/W
UART D
UART C
UART B
0x0
0x0
0x0
UART D wakeup
0
1
Do not wake on character match
Wake on character match
UART C wakeup
0
1
Do not wake on character match
Wake on character match
UART B wakeup
0
1
Do not wake on character match
Wake on character match
www.digiembedded.com
189
S Y S T E M C O N T RO L M OD U L E
AHB Bus Activity Status
Bits
Access Mnemonic
Reset
Description
D01
R/W
UART A
0x0
UART A wakeup
0
1
Do not wake on character match
Wake on character match
D00
R/W
Enet
0x0
Ethernet wakeup
0
1
Do not wake on Ethernet packet
Wake on Ethernet packet
AHB Bus Activity Status
Address: A090 022C
The AHB Bus Activity Status register is a read-only register that determines the
activity on the AHB bus.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Act stat
9
8
Act stat
Register bit
assignment
Bits
D31:00
Access Mnemonic
Act stat
Reset
Description
R
0x0
Bus activity status
Provides the CPU with the status of activity on the
system bus, excluding the CPU. This register can be
used to help determine when to enter sleep mode or
to reduce the system clock frequencies.
The counter is reset each time a master accesses the
AHB bus. The counter will saturate at all 1s.
System Memory Chip Select 0 Dynamic Memory Base and
Mask registers
Addresses: A090 01D0 / 01D4
190
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
System Memory Chip Select 1 Dynamic Memory Base and Mask registers
These control registers set the base and mask for system memory chip select 0, with
a minimum size of 4K. The powerup default settings produce a memory range of
0x0000 0000 — 0x0FFF FFFF.
Registers
31
30
29
28
27
11
26
10
25
24
23
22
21
20
4
19
3
18
2
17
1
16
0
Chip select 0 base (CS0B)
15
14
13
12
9
8
7
6
5
Chip select 0 base (CS0B)
Reserved
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
Chip select 0 mask (CS0M)
9
8
7
6
0
Chip select 0 mask (CS0M)
Reserved
CSD0
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:12
R/W
CS0B
0x00000
Chip select 0 base
Base address for chip select 0
D11:00
D31:12
N/A
R/W
Reserved
CS0M
N/A
N/A
0xF0000
Chip select 0 mask
Mask or size for chip select 0
D11:01
D00
N/A
R/W
Reserved
CSD0
N/A
0x1
N/A
Chip select 0 disable
0
1
Disable chip select
Enable chip select
System Memory Chip Select 1 Dynamic Memory Base and
Mask registers
Addresses: A090 01D8 / 01DC
These control registers set the base and mask for system memory chip select 1, with
a minimum size of 4K. The powerup default settings produce a memory range of
0x1000 0000 — 0x1FFF FFFF.
www.digiembedded.com
191
S Y S T E M C O N T RO L M OD U L E
System Memory Chip Select 2 Dynamic Memory Base and Mask registers
Registers
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
0
Chip select 1 base (CS1B)
9
8
7
6
Chip select 1 base (CS1B)
Reserved
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
Chip select 1 mask (CS1M)
9
8
7
6
0
Chip select 1 mask (CS1M)
Reserved
CSD1
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:12
R/W
CS1B
0x10000
Chip select 1 base
Base address for chip select 1
D11:00
D31:12
N/A
R/W
Reserved
CS1M
N/A
N/A
0xF0000
Chip select 1 mask
Mask or size for chip select 5
D11:01
D00
N/A
R/W
Reserved
CSD1
N/A
0x1
N/A
Chip select 1disable
0
1
Disable chip select
Enable chip select
System Memory Chip Select 2 Dynamic Memory Base and
Mask registers
Addresses: A090 01E0 / 01E4
These control registers set the base and mask for system memory chip select 2, with
a minimum size of 4K. The powerup default settings produce a memory range of
0x2000 0000 — 0x2FFF FFFF.
192
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
System Memory Chip Select 3 Dynamic Memory Base and Mask registers
Registers
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
0
Chip select 2 base (CS2B)
9
8
7
6
Chip select 2 base (CS2B)
Reserved
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
Chip select 2 mask (CS2M)
9
8
7
6
0
Chip select 2 mask (CS2M)
Reserved
CSD2
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:12
R/W
CS2B
0x20000
Chip select 2 base
Base address for chip select 2
N/A
D11:00
D31:12
N/A
R/W
Reserved
CS2M
N/A
0xF0000
Chip select 2 mask
Mask or size for chip select 2
D11:01
D00
N/A
R/W
Reserved
CSD2
N/A
0x1
N/A
Chip select 2 disable
0
1
Disable chip select
Enable chip select
System Memory Chip Select 3 Dynamic Memory Base and
Mask registers
Addresses: A090 01E8 / 01EC
These control registers set the base and mask for system memory chip select 3, with
a minimum size of 4K. The powerup default settings produce a memory range of
0x3000 0000 — 0x3FFF FFFF.
www.digiembedded.com
193
S Y S T E M C O N T RO L M OD U L E
System Memory Chip Select 0 Static Memory Base and Mask registers
Registers
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
0
Chip select 3 base (CS3B)
9
8
7
6
Chip select 3 base (CS3B)
Reserved
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
Chip select 3 mask (CS3M)
9
8
7
6
0
Chip select 3 mask (CS3M)
Reserved
CSD3
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:12
R/W
CS3B
0x30000
Chip select 3 base
Base address for chip select 3
N/A
D11:00
D31:12
N/A
R/W
Reserved
CS3M
N/A
0xF0000
Chip select 3 mask
Mask or size for chip select 3
D11:01
D00
N/A
R/W
Reserved
CSD3
N/A
0x1
N/A
Chip select 3 disable
0
1
Disable chip select
Enable chip select
System Memory Chip Select 0 Static Memory Base and Mask
registers
Addresses: A090 01F0 / 01F4
These control registers set the base and mask for system memory chip select 0, with
a minimum size of 4K. The powerup default settings produce a memory range of
0x4000 0000 — 0x4FFF FFFF.
194
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
System Memory Chip Select 1 Static Memory Base and Mask registers
Registers
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
0
Chip select 0 base (CS0B)
9
8
7
6
Chip select 0 base (CS0B)
Reserved
31
30
29
28
27
11
26
10
25
24
23
22
21
20
4
19
3
18
17
16
Chip select 0 mask (CS0M)
15
14
13
12
9
8
7
6
5
2
1
0
Chip select 0 mask (CS0M)
Reserved
CSD0
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:12
R/W
CS0B
0x40000
Chip select 0 base
Base address for chip select 0.
D11:00
D31:12
N/A
R/W
Reserved
CS0M
N/A
N/A
0xF0000
Chip select 0 mask
Mask or size for chip select 0.
D11:01
D00
N/A
R/W
Reserved
CSD0
N/A
0x1
N/A
Chip select 0 disable
0
1
Disable chip select
Enable chip select
System Memory Chip Select 1 Static Memory Base and Mask
registers
Addresses: A09001F8 / 01FC
These control registers set the base and mask for system memory chip select 1, with
a minimum size of 4K. The powerup default settings produce a memory range of
0x5000 0000 — 0x5FFF FFFF.
www.digiembedded.com
195
S Y S T E M C O N T RO L M OD U L E
System Memory Chip Select 2 Static Memory Base and Mask registers
Registers
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
0
Chip select 1 base (CS1B)
9
8
7
6
Chip select 1 base (CS1B)
Reserved
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
18
17
16
Chip select 1 mask (CS1M)
9
8
7
6
3
2
1
0
Chip select 1 mask (CS1M)
Reserved
CSD1
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:12
R/W
CS1B
0x50000
Chip select 1 base
Base address for chip select 1
D11:00
D31:12
N/A
R/W
Reserved
CS1M
N/A
N/A
0xF0000
Chip select 1 mask
Mask or size for the chip select 1.
D11:01
D00
N/A
R/W
Reserved
CSD1
N/A
0x1
N/A
Chip select 1 disable
0
1
Disable chip select
Enable chip select
System Memory Chip Select 2 Static Memory Base and Mask
registers
Addresses: A090 0200 / 0204
These control registers set the base and mask for system memory chip select 2, with
a minimum size of 4K. The powerup default settings produce a memory range of
0x6000 0000 — 0x6FFF FFFF.
196
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
System Memory Chip Select 3 Static Memory Base and Mask registers
Registers
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
0
Chip select 2 base (CS2B)
9
8
7
6
Chip select 2 base (CS2B)
Reserved
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
17
16
Chip select 2 mask (CS2M)
9
8
7
6
2
1
0
Chip select 2 mask (CS2M)
Reserved
CSD2
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:12
R/W
CS2B
0x60000
Chip select 2 base
Base address for chip select 2.
D11:00
D31:12
N/A
R/W
Reserved
CS2M
N/A
N/A
0xF0000
Chip select 2 mask
Mask or size for chip select 2.
D11:01
D00
N/A
R/W
Reserved
CSD2
N/A
0x1
N/A
Chip select 2 disable
0
1
Disable chip select
Enable chip select
System Memory Chip Select 3 Static Memory Base and Mask
registers
Addresses: A090 0208 / 020C
These control registers set the base and mask for system memory chip select 3, with
a minimum size of 4K. The powerup default settings produce a memory range of
0x7000 0000 — 0x7FFF FFFF.
www.digiembedded.com
197
S Y S T E M C O N T RO L M OD U L E
Gen ID register
Registers
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
3
18
2
17
1
16
0
Chip select 3 base (CS3B)
9
8
7
6
Chip select 3 base (CS3B)
Reserved
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
21
5
20
4
19
18
17
16
Chip select 3 mask (CS3M)
9
8
7
6
3
2
1
0
Chip select 3 mask (CS3M)
Reserved
CSD3
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:12
R/W
CS3B
0x70000
Chip select 3 base
Base address for chip select 3.
N/A
D11:00
D31:12
N/A
R/W
Reserved
CS3M
N/A
0xF0000
Chip select 3 mask
Mask or size for chip select 3.
D11:01
D00
N/A
R/W
Reserved
CSD3
N/A
0x1
N/A
Chip select 3 disable
0
1
Disable chip select
Enable chip select
Gen ID register
Address: A090 0210
This register is read-only, and indicates the state of addr[19:09] pins at powerup.
198
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
External Interrupt 0–3 Control register
Register
31
15
30
14
29
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
13
8
Reserved
GENID
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:11
D10:00
N/A
R
Reserved
GENID
N/A
N/A
HW strap
General Purpose ID register
addr[19:09]
External Interrupt 0–3 Control register
Addresses: A090 0214 / 0218 / 021C / 0220
The External Interrupt Control registers control the behavior of external
interrupts 0–3.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
22
6
21
5
20
4
19
18
17
1
16
Reserved
10
9
8
7
3
2
0
Reserved
STS
CLR
PLTY LVEDG
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:04
D03
N/A
R
Reserved
STS
N/A
N/A
Status
Status of the external signal before edge detect or level
conversion.
D02
R/W
CLR
0x0
Clear
Write a 1, then a 0 to this bit to clear the interrupt
generated by the edge detect circuit.
www.digiembedded.com
199
S Y S T E M C O N T RO L M OD U L E
RTC Module Control register
Bits
Access Mnemonic Reset
Description
D01
R/W
PLTY
0x0
Polarity
0
If level-sensitive, the input source is active high.
If edge-sensitive, generate an interrupt on the rising
edge of the external interrupt.
1
If level-sensitive, the input source is active low. The
level is inverted before sending to the interrupt
controller.
If edge-sensitive, generate an interrupt on the falling
edge of the external interrupt.
D00
R/W
LVEDG
0x0
Level edge
0
1
Level-sensitive interrupt
Edge-sensitive interrupt
RTC Module Control register
Address: A090 0224
The RTC Module Control register controls the RTC module.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
8
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
10
9
Clk
rdy
int
Standby
mode
Standby
status
Rdy int Int stat
Reserved
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:05
D04
N/A
R
Reserved
N/A
Standby status
0x0
RTC standby mode status
0
RTC module is in standby mode and cannot be
accessed by the CPU.
1
RTC module is not in standby mode and can be
accessed by the CPU.
200
Hardware Reference NS9215
S Y S T E M C O N T ROL M O D U L E
RTC Module Control register
Bits
Access Mnemonic
Reset
Description
RTC clock ready interrupt status
D03
R
Rdy int
0x0
0
1
RTC clock ready interrupt not asserted
RTC clock ready interrupt asserted
Note:
The RTC clock ready and RTC module
interrupts are ORed together to the inter-
rupt controller. Read this bit to determine
the actual source.
D02
R
Int stat
0x0
RTC module interrupt status
0
1
RTC module interrupt not asserted
RTC module interrupt asserted
Note:
The RTC clock ready and RTC module
interrupts are ORed together to the inter-
rupt controller. Read this bit to determine
the actual source.
D01
R/W
Standby mode
0x0
RTC standby mode
Allows the RTC module to be placed in low power
mode.
0
The RTC module is placed in standby mode and
cannot be accessed by the CPU. The RTC clock
must be enabled when in standby mode (bit 10).
1
Normal operation. The CPU must wait for the
RTC interrupt and read the status to determine
that the clock change is complete (RTC clock
ready interrupt status bit is set). The clock
change may take up to 30 microseconds after
this bit is set.
Note:
This bit must be set to 0 when not access-
ing the RTC registers or battery back
RAM. When early power loss interrupt is
detected, set this bit to 0.
D00
R/W
Clk rdy int
0x0
RTC clock ready interrupt clear
0
1
RTC clock ready interrupt enabled
RTC clock ready interrupt cleared
Note:
This register must be set, then cleared to
service the RTC clock ready interrupt.
www.digiembedded.com
201
S Y S T E M C O N T RO L M OD U L E
RTC Module Control register
202
Hardware Reference NS9215
Memory Controller
C
H
A
P
T
E
R
5
T
he Multiport Memory Controller is an AMBA-compliant system-on-chip (SoC)
peripheral that connects to the Advanced High-performance Bus (AHB). The
remainder of this chapter refers to this controller as the memory controller.
Features
The memory controller provides these features:
ꢀ
ꢀ
AMBA 32-bit AHB compliancy
Dynamic memory interface support including SDRAM and JEDEC low-power
SDRAM
ꢀ
Asynchronous static memory device support including RAM, ROM, and Flash,
with and without asynchronous page mode
ꢀ
ꢀ
ꢀ
ꢀ
Can operate with cached processors with copyback caches
Can operate with uncached processors
Low transaction latency
Read and write buffers to reduce latency and improve performance,
particularly for uncached processors.
ꢀ
ꢀ
ꢀ
8-bit, 16-bit, and 32-bit wide static memory support.
16-bit and 32-bit wide chip select SDRAM memory support.
Static memory features, such as:
–
–
–
–
–
Asynchronous page mode read
Programmable wait states
Bus turnaround delay
Output enable and write enable delays
Extended wait
203
M E MO R Y C O N T ROL L E R
Low-power operation
ꢀ
ꢀ
Power-saving modes that dynamically control SDRAM clk_en.
Dynamic memory self-refresh mode supported by a power management unit
(PMU) interface or by software.
ꢀ
ꢀ
Controller supports 2K, 4K, and 8K row address synchronous memory parts;
that is, typical 512 MB, 256 MB, and 16 Mb parts with 8, 16, or 32 DQ bits per
device.
A separate AHB interface to program the memory controller. This enables the
memory controller registers to be situated in memory with other system
peripheral registers.
ꢀ
ꢀ
ꢀ
Locked AHB transaction support.
Support for all AHB burst types.
Little and big endian support.
Note: Synchronous static memory devices (synchronous burst mode) are not
supported.
Low-power operation
In many systems, the contents of the memory system have to be maintained during
low-power sleep modes. The processor provides two features to enable this:
ꢀ
ꢀ
Dynamic memory refresh over soft reset
A mechanism to place the dynamic memories into self-refresh mode
Self-refresh mode can be entered as follows:
1
2
Set the SREFREQ bit in the Dynamic Memory Control register.
Poll the SREFACK bit in the Status register.
Note: Static memory can be accessed as normal when the SDRAM memory is in self-
refresh mode.
Low-power
SDRAM deep-
sleep mode
The memory controller supports JEDEC low-power SDRAM deep-sleep mode. Deep-
sleep mode can be entered by setting the deep-sleep (DP) bit in the Dynamic
Memory Control register. The device is put into a low-power mode where it is
powered down and no longer refreshed. All data in the memory is lost.
Low-power
SDRAM partial
array refresh
The memory controller supports JEDEC low-power SDRAM partial array refresh.
Partial array refresh can be programmed by initializing the SDRAM memory device
appropriately. When the memory device is put into self-refresh mode, only the
memory banks specified are refreshed. The memory banks that are not refreshed
lose their data contents.
204
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Memory map
Memory map
The memory controller provides hardware support for booting from external
nonvolatile memory. During booting, the nonvolatile memory must be located at
address 0x00000000 in memory. When the system is booted, the SRAM or SDRAM
memory can be remapped to address 0x00000000 by modifying the address map in the
AHB decoder.
Power-on reset
memory map
On power-on reset, memory chip select 1 is mirrored onto memory chip select 0 and
chip select 4. Any transactions to memory chip select 0 or chip select 4 (or chip
select 1), then, access memory chip select 1. Clearing the address mirror bit (M) in
the Control register disables address mirroring, and memory chip select 0, chip
select 4, and memory chip select 1 can be accessed as normal.
Chip select 1
memory
configuration
You can configure the memory width and chip select polarity of static memory chip
select 1 by using selected input signals. This allows you to boot from chip select 1.
These are the bootstrap signals:
ꢀ
ꢀ
gpio_a[0], addr[23]: Memory width select
gpio_a[2]: Boot mode
Example: Boot
The system is set up as:
from flash, SRAM
mapped after boot
ꢀ
ꢀ
Chip select 1 is connected to the boot flash device.
Chip select 0 is connected to the SRAM to be remapped to 0x00000000 after boot.
This is the boot sequence:
1
At power-on, the reset chip select 1 is mirrored into chip select 0 (and chip
select 4).
www.digiembedded.com
205
M E MO R Y C O N T ROL L E R
Memory map
2
3
4
5
6
7
8
When the power-on reset (reset_n) goes inactive, the processor starts booting
from 0x00000000 in memory.
The software programs the optimum delay values in the flash memory so the
boot code can run at full speed.
The code branches to chip select 1 so the code can continue executing from the
non-remapped memory location.
The appropriate values are programmed into the memory controller to
configure chip select 0.
The address mirroring is disabled by clearing the address mirror (M) field in the
Control register.
The ARM reset and interrupt vectors are copied from flash memory to SRAM that
can then be accessed at address 0x00000000.
More boot, initialization, or application code is executed.
Example: Boot
from flash,
SDRAM
remapped after
boot
The system is set up as:
ꢀ
ꢀ
Chip select 1 is connected to the boot flash device.
Chip select 4 is connected to the SDRAM to be remapped to 0x00000000 after
boot.
This is the boot sequence:
1
At power-on, the reset chip select 1 is mirrored into chip select 4 (and chip
select 0).
206
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Static memory controller
2
3
4
5
6
7
8
When the power-on reset (reset_n) goes inactive, the processor starts booting
from 0x00000000 in memory.
The software programs the optimum delay values in flash memory so the boot
code can run at full speed.
The code branches to chip select 1 so the code can continue executing from the
non-remapped memory location.
The appropriate values are programmed into the memory controller to
configure chip select 4, and the memory device is initialized.
The address mirroring is disabled by clearing the address mirror (M) field in the
Control register.
The ARM reset and interrupt vectors are copied from flash memory to SDRAM
that can then be accessed at address 0x00000000.
More boot, initialization, or application code is executed.
Static memory controller
This table shows configurations for the static memory controller with different
page 251 for more information.
Device
Write protect
Enabled
Page mode
Disabled
Enabled
Buffer
Disabled
Enabled
Disabled
Disabled
Enabled
Disabled
Disabled
Enabled
Disabled
Disabled
a
ROM
a
Page mode ROM
Extended wait ROM
SRAM
Enabled
a
a
Enabled
Disabled
Disabled
Enabled
b
b
b
b
b
b
b
Disabled (or enabled)
Disabled (or enabled)
Disabled (or enabled)
Disabled or (enabled)
Disabled or (enabled)
Disabled or (enabled)
Disabled (or enabled)
a
Page mode SRAM
Extended wait SRAM
Flash
a
c
Disabled
Disabled
Enabled
c
Page mode flash
Extended wait flash
Memory mapped peripheral
a
Disabled
Disabled
a
Enabling the buffers means that any access causes the buffer to be used. Depending on the
application, this can provide performance improvements. Devices without async-page-mode
support generally work better with the buffer disabled. Again, depending on the application, this
can provide performance improvements.
b
c
SRAM and Flash memory devices can be write-protected if required.
Buffering must be disabled when performing Flash memory commands and during writes.
www.digiembedded.com
207
M E MO R Y C O N T ROL L E R
Static memory controller
Notes:
ꢀ
Buffering enables the transaction order to be rearranged to improve memory
performance. If the transaction order is important, the buffers must be
disabled.
ꢀ
Extended wait and page mode cannot be enabled at the same time.
Write protection
Each static memory chip select can be configured for write-protection. SRAM
usually is unprotected and ROM devices must be write-protected (to avoid potential
bus conflict when performing a write access to ROM), but the P field in the Static
Memory Configuration register (see “StaticMemory Configuration 0–3 registers” on
page 251) can be set to write-protect SRAM as well as ROM devices. If a write access
is made to a write-protected memory bank, a bus error occurs. If a write access is
made to a memory bank containing ROM devices and the chip select is not write-
protected. An error is not returned and the write access proceeds as normal. Note
that this might lead to a bus conflict.
Extended wait
transfers
The static memory controller supports extremely long transfer times. In normal use,
the memory transfers are timed using the Static Memory Read Delay register
(StaticWaitRd) and Static Memory Wait Delay register (StaticWaitWr). These
registers allow transfers with up to 32 wait states. If a very slow static memory
device has to be accessed, however, you can enable the static configuration
extended wait (EW) bit. When EW is enabled, the Static Extended Wait register is
used to time both the read and write transfers. The Static Extended Wait register
allows transfers to have up to 16368 wait states.
A peripheral can, at any time, signal to the processor that it wants to complete an
access early by asserting the ns_ta_strb signal. This allows a slow peripheral with
variable access times to signal that it is ready to complete an access. The processor
normally completes an access when it finds a rising edge on ns_ta_strb.
For a burst access, the peripheral must toggle ns_ta_strb for each access it wants to
complete early. The peripheral is not required to assert ns_ta_strb for each access in
the burst; for example, the peripheral requires the programmed access for the start
of a four access burst followed by three early completion accesses, each signalled
by the assertion of ns_ta_strb.
Using the ns_ta_strb signal is valid only when the EW bit is enabled.
Be aware:
ꢀ
Using extremely long transfer times might mean that SDRAM devices are not
refreshed correctly.
ꢀ
Very slow transfers can degrade system performance, as the external memory
interface is tied up for long periods of time. This has detrimental effects on
208
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Static memory initialization
time critical services, such as interrupt latency and low latency devices; for
example, video controllers.
Memory mapped
peripherals
Some systems use external peripherals that can be accessed using the static
memory interface. Because of the way many of these peripherals function, the read
and write transfers to them must not be buffered. The buffer must therefore be
disabled.
Static memory initialization
Static memory must be initialized as required after poweron reset (reset_n) by
programming the relevant registers in the memory controller as well as the
configuration registers in the external static memory device.
Access sequencing
and memory
width
The data width of each external memory bank must be configured by programming
the appropriate bank configuration register (Static Memory Configuration 0–3).
When the external memory bus is narrower that the transfer initiated from the
current main bus master, the internal bus transfer takes several external bus
transfers to complete.
For example, if bank 0 is configured as 8-bit wide memory and a 32-bit read is
initiated, the AHB bus stalls while the memory controller reads four consecutive
bytes from the memory. During these accesses, the static memory controller block
demultiplexes the four bytes into one 32-bit word on the AHB bus.
Wait state
generation
Each bank of the memory controller must be configured for external transfer wait
states in read and write accesses.
Configure the banks by programming the appropriate bank control registers:
ꢀ
ꢀ
“StaticMemory Configuration 0–3 registers” on page 251 (StaticConfig[n])
(StaticWaitWen[n])
ꢀ
(StaticWaitOen[n])
ꢀ
ꢀ
ꢀ
“Static Memory Read Delay 0–3 registers” on page 256 (StaticWaitRd[n])
(StaticWaitPage[n])
ꢀ
(StaticWaitTurn[n])
www.digiembedded.com
209
M E MO R Y C O N T ROL L E R
Static memory read control
ꢀ
“Static Memory Extended Wait register” on page 247 (StaticExtendedWait)
The number of cycles in which an AMBA transfer completes is controlled by two
additional factors:
ꢀ
ꢀ
Access width
External memory width
Programmable
enable
Each bank of the memory controller has a programmable enable for the extended
wait (EW). The WAITRD wait state field in the Static Memory Read Delay register can
be programmed to select from 1–32 wait states for read memory accesses to SRAM
and ROM, or the initial read access to page mode devices. The WAITWR wait state
field in the Static Memory Write Delay register can be programmed to select from 1–
32 wait states for access to SRAM. The Static Memory Page Mode Read Delay register
can be programmed to select from 1–32 wait states for page mode accesses.
Static memory read control
There are three types of static memory read controls:
ꢀ
ꢀ
ꢀ
Output enable programmable delay
ROM, SRAM, and flash
Asynchronous page mode read
Output enable
programmable
delay
The delay between the assertion of the chip select and the output enable is
programmable from 0 to 15 cycles using the wait output enable bits (WAITOEN) in
the Static Memory Output Enable Delay registers. The delay is used to reduce power
consumption for memories that cannot provide valid output data immediately after
the chip select has been asserted. The output enable is always deasserted at the
same time as the chip select, at the end of the transfer.
ROM, SRAM, and
Flash
The memory controller uses the same read timing control for ROM, SRAM, and flash
devices. Each read starts with the assertion of the appropriate memory bank chip
select signals (cs_n) and memory address (addr[27:0]). The read access time is
determined by the number of wait states programmed for the WAITRD field in the
Static Memory Read Delay register. The WAITTURN field in the Static Memory Turn
Round Delay register determines the number of bus turnaround wait states added
between external read and write transfers.
210
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Static memory read: Timing and parameters
Static memory read: Timing and parameters
This section shows static memory read timing diagrams and parameters.
External memory
read transfer with
zero wait states
This diagram shows an external memory read transfer with the minimum zero wait
states (WAITRD=0). Maximum performance is achieved when accessing the external
device with load multiple (LDM) or store multiple (STM) CPU instructions.
clk_out
A
addr
D(A)
data
cs[n]
st_oe_n
Timing parameter
WAITRD
Value
0
WAITOEN
0
WAITPAGE
WAITWR
N/A
N/A
N/A
N/A
WAITWEN
WAITTURN
External memory
read transfer with
two wait states
This diagram shows an external memory read transfer with two wait states
(WAITRD=2). Seven AHB cycles are required for the transfer, five for the standard
read access and an additional two because of the programmed wait states added
(WAITRD).
clk_out
A
addr
D(A)
data
cs[n]
st_oe_n
Timing parameter
WAITRD
Value
2
WAITOEN
0
WAITPAGE
WAITWR
N/A
N/A
www.digiembedded.com
211
M E MO R Y C O N T ROL L E R
Static memory read: Timing and parameters
Timing parameter
WAITEN
Value
N/A
WAITTURN
N/A
External memory
read transfer with
two output enable
delay states
This diagram shows an external memory read transfer with two output enable delay
states (WAITOEN=2). Seven AHB cycles are required for the transfer, five for the
standard read and an additional two because of the output delay states added.
clk_out
A
addr
D(A)
data
cs[n]
st_oe_n
Timing parameter
WAITRD
Value
2
WAITOEN
2
WAITPAGE
WAITWR
N/A
N/A
N/A
N/A
WAITWEN
WAITTURN
External memory
read transfers
with zero wait
states
This diagram shows external memory read transfers with zero wait states
(WAITRD=0). These transfers can be non-sequential transfers or sequential transfers
of a specified burst length. Bursts of unspecified length are interpreted as INCR4
transfers. All transfers are treated as separate reads, so have the minimum of five
AHB cycles added.
clk_out
A
0
B
addr
data
D(A)
D(B)
cs[n]
st_oe_n
212
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Static memory read: Timing and parameters
Timing parameter
WAITRD
Value
0
WAITOEN
0
WAITPAGE
WAITWR
N/A
N/A
N/A
N/A
WAITWEN
WAITTURN
Burst of zero wait
states with fixed
length
This diagram shows a burst of zero wait state reads with the length specified.
Because the length of the burst is known, the chip select can be held asserted
during the whole burst and generate the external transfers before the current AHB
transfer has completed. The first read requires five arbitration cycles; the three
subsequent sequential reads have zero AHB cycles added because the external
transfers are automatically generated.
clk_out
A
A+4
A+8
A+C
addr
data
D(A)
D(A+4)
D(A+8)
D(A+C)
cs[n]
st_oe_n
Timing parameter
WAITRD
Value
0
WAITOEN
0
WAITPAGE
WAITWR
N/A
N/A
N/A
N/A
WAITWEN
WAITTURN
Burst of two wait
states with fixed
length
This diagram shows a burst of two wait state reads with the length specified. The
WAITRD value is used for all transfers in the burst.
www.digiembedded.com
213
M E MO R Y C O N T ROL L E R
Asynchronous page mode read
clk_out
A
A+4
A+8
addr
data
D(A)
D(A+4)
cs[n]
st_oe_n
Timing parameter
WAITRD
Value
2
WAITOEN
0
WAITPAGE
WAITWR
N/A
N/A
N/A
N/A
WAITWEN
WAITTURN
Asynchronous page mode read
The memory controller supports asynchronous page mode read of up to four
memory transfers by updating address bits addr[1] and addr[0]. This feature
increases the bandwidth by using a reduced access time for the read accesses that
are in page mode. The first read access takes static wait read and WAITRD cycles.
Subsequent read accesses that are in page mode take static wait page and WAITPAGE
cycles. The chip select and output enable lines are held during the burst, and only
the lower two address bits change between subsequent accesses. At the end of the
burst, the chip select and output enable lines are deasserted together.
Asynchronous page mode read: Timing and parameters
This section shows asynchronous page mode read timing diagrams and parameters.
External memory
page mode read
transfer
ThIs diagram shows an external memory page mode read transfer with two initial
wait states and one sequential wait state. The first read requires five AHB
arbitration cycles (plus three wait states); the following (up to 3) sequential
transfers have only one AHB wait state. This gives increased performance over the
equivalent nonpage mode ROM timing.
214
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Asynchronous page mode read: Timing and parameters
clk_out
addr
A
A+4
A+8
D(A)
data
D(A+4)
D(A+8)
cs[n]
st_oe_n
Timing parameter
WAITRD
Value
2
WAITOEN
0
WAITPAGE
WAITWR
1
N/A
N/A
N/A
WAITWEN
WAITTURN
External memory
32-bit burst read
from 8-bit
This diagram shows a 32-bit read from an 8-bit page mode ROM device, causing four
burst reads to be performed. A total of eight AHB wait states are added during this
transfer, five AHB arbitration cycles and then one for each of the subsequent reads.
WAITRD and WAITPAGE are 0.
memory
clk_out
A
A+1
A+2
A+3
addr
data
D(A)
D(A+1)
D(A+2)
D(A+3)
cs[n]
st_oe_n
Timing parameters
WAITRD
Value
0
WAITOEN
0
WAITPAGE
WAITWR
0
N/A
N/A
N/A
WAITWEN
WAITTURN
www.digiembedded.com
215
M E MO R Y C O N T ROL L E R
Static memory write control
Static memory write control
Write enable
programming
delay
The delay between the assertion of the chip select and the write enable is
programmable from 1 to 16 cycles using the WAITWEN bits of the Static Memory
Write Enable Delay (StaticWaitWen[3:0]) registers. The delay reduces the power
consumption for memories. The write enable is asserted on the rising edge of HCLK
after the assertion of the chip select for zero wait states. The write enable is
always deasserted a cycle before the chip select, at the end of the transfer.
datamask_n (byte lane signal) has the same timing as st_we_n (write enable signal) for
writes to 8-bit devices that use the byte lane selects instead of the write enables.
SRAM
Write timing for SRAM starts with assertion of the appropriate memory bank chip
selects (cs[n]_n) and address signals (addr[27:0]_n). The write access time is determined
by the number of wait states programmed for the WAITWR field in the Static
Memory Write Delay register (see “Static Memory Write Delay 0–3 registers” on
Round Delay 0–3 registers” on page 258) determines the number of bus turnaround
wait states added between external read and write transfers.
Static memory Write: Timing and parameters
This section shows static memory write timing diagrams and parameters.
External memory
write transfer
with zero wait
states
This diagram shows a single external memory write transfer with minimum zero
wait states (WAITWR=0). One wait state is added.
clk_out
A
addr
D(A)
data
cs[n]
st_we_n
216
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Static memory Write: Timing and parameters
Timing parameters
WAITRD
Value
N/A
N/A
N/A
0
WAITOEN
WAITPAGE
WAITWR
WAITWEN
0
WAITTURN
N/A
External memory
write transfer
with two wait
states
This diagram shows a single external memory write transfer with two wait states
(WAITWR=2). One AHB wait state is added.
clk_out
addr
A
data
D(A)
cs{n}
st_we_n
Timing parameter
WAITRD
Value
N/A
N/A
N/A
2
WAITOEN
WAITPAGE
WAITWR
WAITWEN
WAITTURN
0
N/A
External memory
write transfer
with two write
enable delay
states
This diagram shows a single external memory write transfer with two write enable
delay states (WAITWEN=2). One wait state is added.
clk_out
A
addr
D(A)
data
cs[n]
st_we_n
www.digiembedded.com
217
M E MO R Y C O N T ROL L E R
Static memory Write: Timing and parameters
Timing parameters
WAITRD
Value
N/A
N/A
N/A
2
WAITOEN
WAITPAGE
WAITWR
WAITWEN
2
WAITTURN
N/A
Two external
memory write
transfers with
zero wait states
This diagram shows two external memory write transfers with zero wait states
(WAITWR=0). Four AHB wait states are added to the second write, because this write
can be started only when the first write has completed. This is the timing of any
sequence of write transfers, nonsequential to nonsequential or nonsequential to
sequential, with any value of HBURST. The maximum speed of write transfers is
controlled by the external timing of the write enable relative to the chip select, so
all external writes must take two cycles to complete: the cycle in which write
enable is asserted and the cycle in which write enable is deasserted.
clk_out
A
0
0
A+4
addr
data
D(A)
D(A+4)
cs[n]
st_we_n
Timing parameter
WAITRD
Value
N/A
N/A
N/A
0
WAITOEN
WAITPAGE
WAITWR
WAITWEN
WAITTURN
0
0
Flash memory
Write timing for flash memory is the same as for SRAM devices.
218
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Bus turnaround
Bus turnaround
The memory controller can be configured for each memory bank to use external bus
turnaround cycles between read and write memory accesses. The WAITTURN field
can be programmed for 1 to 16 turnaround wait states, to avoid bus contention on
the external memory databus. Bus turnaround cycles are generated between
external bus transfers as follows:
ꢀ
ꢀ
ꢀ
Read to read (different memory banks)
Read to write (same memory bank)
Read to write (different memory banks)
Bus turnaround: Timing and parameters
This section shows bus turnaround timing diagrams and parameters.
Read followed by
write with no
turnaround
This diagram shows a zero wait read followed by a zero wait write with default
turnaround between the transfers of two cycles because of the timing of the AHB
transfers. Standard AHB wait states are added to the transfers, five for the read and
three for the write.
clk_out
A
0
B
addr
data
D(A)
D(B)
st_oe_n
cs[n]
st_we-n
Timing parameter
WAITRD
Value
0
WAITOEN
0
WAITPAGE
WAITWR
N/A
0
0
0
WAITWEN
WAITTURN
www.digiembedded.com
219
M E MO R Y C O N T ROL L E R
Bus turnaround: Timing and parameters
Write followed by
a read with no
turnaround
This diagram shows a zero wait write followed by a zero wait read with default
turnaround between the transfers of one cycle. Three wait states are added to the
write transfer; five wait states are added to the read transfer. The five AHB
arbitration cycles for the read transfer include two wait states to allow the previous
write access to complete and the three standard wait states for the read transfer.
clk_out
A
0
B
addr
data
D(A)
D(B)
st_oe_n
cs[n]
st_we_n
Timing parameter
WAITRD
Value
0
WAITOEN
0
WAITPAGE
WAITWR
N/A
0
0
0
WAITWEN
WAITTURN
Read followed by
a write with two
turnaround cycles
TIs diagram shows a zero wait read followed by a zero wait write with two
turnaround cycles added. The standard minimum of three AHB arbitration cycles is
added to the read transfer and two wait states are added to the write transfer (as
for any read-write transfer sequence).
clk_out
0
B
A
addr
data
D(A)
D(B)
st_oe_n
cs[n]
st_we_n
220
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Byte lane control
Timing parameters
WAITRD
Value
0
WAITOEN
0
WAITPAGE
WAITWR
N/A
0
0
2
WAITWEN
WAITTURN
Byte lane control
The memory controller generates the byte lane control signals data_mask[3:0]
according to these attributes:
ꢀ
ꢀ
ꢀ
ꢀ
Little or big endian operation
Transfer width
External memory bank databus width, defined within each control register
The decoded address value for write accesses only
Word transfers are the largest size transfers supported by the memory controller.
Any access tried with a size greater that a word causes an error response. Each
memory chip select can be 8, 16, or 32 bits wide. The memory type used
determines how the st_we_n and data_mask signals are connected to provide byte,
halfword, and word access.
For read accesses, you must control the data_mask signals by driving them all high or
all low. Do this by programming the byte lane state (PB) bit in the Static
information, with respect to st_we_n and data_mask, for different memory
configurations.
www.digiembedded.com
221
M E MO R Y C O N T ROL L E R
Address connectivity
Address connectivity
Memory banks
constructed from
8-bit or non-byte-
partitioned
For memory banks constructed from 8-bit or non-byte-partitioned memory devices,
it is important that the byte lane state (PB) bit is cleared to 0 within the respective
memory bank control register. This forces all data_mask lines high during a read
access, as the byte lane selects are connected to the device write enables.
memory devices
The next figure shows 8-bit memory configuring memory banks that are 8-, 16-, and
32-bits wide. In each of these configurations, the data_mask[3:0] signals are connected
to write enable (WE_n) inputs of each 8-bit memory. The st_we_n signal from the
memory controller is not used.
ꢀ
For write transfers, the appropriate data_mask[3:0] byte lane signals are asserted
low, and direct the data to the addressed bytes.
ꢀ
For read transfers, all data_mask[3:0] signals are deasserted high, enabling the
external bus to be defined for at least the width of the accessed memory.
addr[22:2]
cs[n]
st_oe_n
A[20:0]
CE_n
A[20:0]
CE_n
A[20:0]
CE_n
A[20:0]
CE_n
OE_n
OE_n
OE_n
OE_n
data_mask[3]
data[31:24]
WE_n
IO[7:0]
data_mask[2]
data[23:16]
WE_n
IO[7:0]
data_mask[1]
data[15:8]
WE_n
IO[7:0]
data_mask[0]
data[7:0]
WE_n
IO[7:0]
32-bit bank consisting of four 8-bit devices
addr[21:1]
cs[n]
st_oe_n
A[20:0]
CE_n
A[20:0]
CE_n
addr[20:0]
cs[n]
A[20:0]
CE_n
OE_n
OE_n
st_oe_n
OE_n
data_mask[3]
data[31:24]
WE_n
IO[7:0]
data_mask[2]
data[23:16]
WE_n
IO[7:0]
data_mask[3]
data[31:24]
WE_n
IO[7:0]
16-bit bank consisting of two 8-bit devices
8-bit bank consisting of one 8-bit device
222
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Address connectivity
Memory banks
constructed from
16-or 32-bit
For memory banks constructed from 16- or 32-bit memory devices, it is important
that the byte lane select (PB) bit is set to 1 within the respective memory bank
control register. This asserts all data_mask[3:0] lines low during a read access as,
during a read, all device bytes must be selected to avoid undriven byte lanes on the
read data value. With 16- and 32-bit wide memory devices, byte select signals exist
and must be appropriately controlled; see the next two figures.
memory devices
Memory banks constructed from 16-bit memory
addr[22:2]
cs[n]
st_oe_n
st_we_n
A[20:0]
CE_n
addr[21:1]
cs[n]
A[20:0]
CE_n
A[20:0]
CE_n
OE_n
WE_n
UB_n
st_oe_n
OE_n
WE_n
UB_n
OE_n
WE_n
UB_n
st_we_n
data_mask[1]
data_mask[0]
data[15:0]
data_mask[3]
data_mask[2]
data[15:0]
data_mask[3]
data_mask[2]
data[31:16
LB_n
LB_n
LB_n
IO[15:0]
IO[15:0]
IO[15:0]
32-bit bank consisting of two 16-bit devices
16-bit bank consisting of one 16-bit device
Memory bank constructed from 32-bit memory
addr[22:2]
cs[n]
A[20:0]
CE_n
st_oe_n
OE_n
st_we_n
WE_n
B[3]_n
B[2]_n
B[1]_n
B[0]_n
IO[31:0]
data_mask[3]
data_mask[2]
data_mask[1]
data_mask[0]
data[31:0]
32-bit bank consisting of one 32-bit device
The next figure shows connections for a typical memory system with different data
width memory devices.
www.digiembedded.com
223
M E MO R Y C O N T ROL L E R
Address connectivity
addr[22:2]
datat[31:0]
addr[22:0]
cs[0]
A[20:0]
CE_n
OE_n
Q[31:0]
data[31:0]
st_oe_n
2Mx32 ROM
addr[11:2]
data[31:16]
A[15:0]
CE_n
OE_n
WE_n
UB_n
LB_n
IO[15:0]
cs[1]
st_we_n
addr[17:2]
data[15:0]
A[15:0]
CE_n
OE_n
WE_n
UB_n
LB_n
IO[15:0]
64Kx16 SRAM
addr[18:2]
data[31:24]
data[23:16]
data[15:8]
data[7:0]
A[16:0]
CE_n
OE_n
WE_n
IO[7:0]
IO[7:0]
IO[7:0]
IO[7:0]
cs[2]
data_mask[3]
addr[18:2]
addr[18:2]
addr[18:2]
A[16:0]
CE_n
OE_n
WE_n
data_mask[2]
data_mask[1]
data_mask[0]
A[16:0]
CE_n
OE_n
WE_n
A[16:0]
CE_n
OE_n
WE_n
128Kx8 SRAM
224
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Dynamic memory controller
Dynamic memory controller
Write protection
Each dynamic memory chip select can be configured for write-protection by setting
the appropriate bit in the write protect (P) field on the Dynamic Memory
Configuration register. If a write access is performed to a write-protected memory
bank, a bus error is generated.
Access sequencing
and memory
width
The data width of each chip select must be configured by programming the
appropriate Dynamic Memory Configuration register. When the chip select data bus
width is narrower than the transfer initiated from the current bus master, the
internal bus transfer takes several external bus transfers to complete. If chip select
4 is configured as 16-bit wide memory, for example, and a 32-bit read is initiated,
the AHB bus stalls while the memory controller reads two consecutive words from
memory. During these accesses, the memory controller block demultiplexes the two
16-bit words into one 32-bit word and places the result onto the AHB bus.
Word transfers are the widest transfers supported by the memory controller. Any
access tried with a size larger than a word generates an error response.
SDRAM Initialization
These steps show how to initialize an external SDRAM device:
1
2
Wait 100 ms after powerup and clocks have stabilized.
Set the SDRAMInit value in the Dynamic Control register to 11 — Issue SDRAM NOP
command.
3
4
Wait 200 ms.
Set the SDRAMInit value in the Dynamic Control register to 10 — Issue SDRAM PALL
(precharge all) command. This precharges all banks and places the SDRAM device
into the all banks idle state.
5
Force frequent refresh cycles by writing a 1 to the Dynamic Refresh register. This
provides a memory refresh every 16 memory clock cycles.
6
7
8
Wait until eight SDRAM refresh cycles have occurred (128 memory clock cycles).
Program the appropriate operational value to the Dynamic Refresh register.
Program the appropriate operational value to the Dynamic Ras and Cas N regis-
ter.
9
Program the appropriate operational value to the Dynamic Configuration N regis-
ter, with the exception of the buffer enable bit, which must be set to 0 during
initialization.
www.digiembedded.com
225
M E MO R Y C O N T ROL L E R
SDRAM Initialization
10 Set the SDRAMInit value in the Dynamic Control register to 01 — Issue SDRAM
Mode command.
11 Program the SDRAM memory 10-bit mode register. The mode register enables
these parameters to be programmed:
Bit
Parameter
Parameter description
02:00
Burst length
ꢀ
ꢀ
4 for a 32-bit wide external bus
8 for a 16-bit wide external bus
03
Burst type
Sequential
06:04
CAS latency
Dependent on the SDRAM device and operating
frequency
08:07
09
Operating mode
Write burst mode
Standard operation
Programmed burst length
A read transaction from the SDRAM memory programs the mode register.
The transfer address contains the value to be programmed. Address bits
31:28 determine the chip select of the specific SDRAM that is being
programmed. The 10-bit mode value must be shifted left per the specific
device being programmed; see the tables following this procedure to
determine the left shift value.
All other address bits must be set to 0.
12 Set the SDRAMInit value in the Dynamic Control register to 00 — Issue SDRAM nor-
mal operation command.
13 Enable the buffers by writing a 1 to the buffer enable bit in the Dynamic Config-
uration N register.
The SDRAM is now ready for normal operation.
Left-shift value
table: 32-bit wide
data bus SDRAM
(RBC)
Device size
Configuration
2 x 1M x 16
4 x 2M x 8
Load Mode register left shift
16M
11
12
12
12
13
12
13
14
64M
1 x 2M x 32
2 x 4M x 16
4 x 8M x 8
128M
1 x 4M x 32
2 x 8M x 16
4 x 16M x 8
226
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
SDRAM Initialization
Device size
Configuration
1 x 8M x 32
Load Mode register left shift
256M
12
13
14
14
15
2 x 16M x 16
4 x 32M x 8
512M
2 x 32M x 16
4 x 64M x 8
Left-shift value
table: 32-bit wide
data bus SDRAM
(BRC)
Device size
Configuration
2 x 1M x 16
4 x 2M x 8
Load Mode register left shift
16M
10
11
10
10
11
10
11
12
11
11
12
12
13
64M
1 x 2M x 32
2 x 4M x 16
4 x 8M x 8
128M
256M
512M
1 x 4M x 32
2 x 8M x 16
4 x 16M x 8
1 x 8M x 32
2 x 16M x 16
4 x 32M x 8
2 x 32M x 16
4 x 64M x 8
Left-shift value
table: 16-bit wide
data bus SDRAM
(RBC)
Device size
Configuration
1 x 1M x 16
2 x 2M x 8
Load Mode register left shift
16M
10
12
11
12
12
13
12
13
13
14
64M
128
1 x 4M x 16
2 x 8M x 8
1 x 8M x 16
2 x 16M x 8
1 x 16M x 16
2 x 32M x 8
1 x 32M x 16
2 x 64M x 8
256M
512M
www.digiembedded.com
227
M E MO R Y C O N T ROL L E R
SDRAM address and data bus interconnect
Left-shift value
table: 16-bit wide
data bus SDRAM
(BRC)
Device size
Configuration
1 x 1M x 16
2 x 2M x 8
Load Mode register left shift
16M
9
10
9
64M
128
1 x 4M x 16
2 x 8M x 8
10
10
11
10
11
11
12
1 x 8M x 16
2 x 16M x 8
1 x 16M x 16
2 x 32M x 8
1 x 32M x 16
2 x 64M x 8
256M
512M
SDRAM address and data bus interconnect
The processor ASIC can connect to standard 16M and larger SDRAM components in
either 16- or 32-bit wide configurations. The next tables show address and data bus
connectivity. Note that for the 16-bit wide configuration the data bus connects to
data [31:16] on the processor.
32-bit wide
Signal
16M device 64M device 128M
256M
512M
configuration
SDRAM
signal
SDRAM
signal
device
SDRAM
signal
device
SDRAM
signal
device
SDRAM
signal
addr[2]
addr[3]
addr[4]
addr[5]
addr[6]
addr[7]
addr[8]
addr[9]
addr[10]
addr[11]
addr[12]
addr[13]
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A11
A11
A11
A11
228
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
SDRAM address and data bus interconnect
Signal
16M device 64M device 128M
256M
512M
SDRAM
signal
SDRAM
signal
device
SDRAM
signal
device
SDRAM
signal
device
SDRAM
signal
addr[14]
addr[15]
addr[16]
addr[17]
addr[18]
addr[19]
addr[20]
addr[21]
addr[22]
addr[23]
ap10
A12*
A12
A12
BA
BA0
BA0
BA0
BA0
BA1
BA1
BA1
BA1
A10/AP
D[31:0]
A10/AP
D[31:0]
A10/AP
D[31:0]
A10/AP
D[31:0]
data[31:0]
* A12 used only in 4 x 16M x 8 configurations
32-bit wide
Signal
16M device 64M device 128M
256M
512M
configuration
SDRAM
signal
SDRAM
signal
device
SDRAM
signal
device
SDRAM
signal
device
SDRAM
signal
addr[1]
addr[2]
addr[3]
addr[4]
addr[5]
addr[6]
addr[7]
addr[8]
addr[9]
addr[10]
addr[11]
addr[12]
addr[13]
addr[14]
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A11
A11
A11
A12
A11
A12
A12*
www.digiembedded.com
229
M E MO R Y C O N T ROL L E R
Registers
Signal
16M device 64M device 128M
256M
512M
SDRAM
signal
SDRAM
signal
device
SDRAM
signal
device
SDRAM
signal
device
SDRAM
signal
addr[15]
addr[16]
addr[17]
addr[18]
addr[19]
addr[20]
addr[21]
addr[22]
ap10
BA
BA0
BA0
BA0
BA0
BA1
BA1
BA1
BA1
A10/AP
D[15:0]
A10/AP
D[15:0]
A10/AP
D[15:0]
A10/AP
D[15:0]
data[31:16]
* A12 used only in 2 x 16M x 8 configurations
Registers
Register map
All configuration registers must be accessed as 32-bit words and as single accesses
only. Bursting is not allowed.
Address
Register
Description
A070 0000
A070 0004
A070 0008
A070 0020
A070 0024
A070 0028
A070 0030
A070 0034
Control register
Status register
Config register
DynamicControl
DynamicRefresh
DynamicReadConfig
DynamictRP
Control register
Status register
Configuration register
Dynamic Memory Control register
Dynamic Memory Refresh Timer
Dynamic Memory Read Configuration register
Dynamic Memory Precharge Command Period (t
)
RP
DynamictRAS
Dynamic Memory Active to Precharge Command
Period (t
)
RAS
A070 0038
A070 003C
DynamictSREX
DynamictAPR
Dynamic Memory Self-Refresh Exit Time (t
)
SREX
Dynamic Memory Last Data Out to Active Time
(t
)
APR
A070 0040
DynamictDAL
Dynamic Memory Data-in to Active Command Time
(t or T
)
APW
DAL
230
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Registers
Address
Register
Description
Dynamic Memory Write Recovery Time (t , t
A070 0044
DynamictWR
,
WR DPL
t
, t
)
RWL RDL
A070 0048
A070 004C
A070 0050
A070 0054
A070 0058
DynamictRC
Dynamic Memory Active to Active Command
Period (t
)
RC
DynamictRFC
DynamictXSR
DynamictRRD
DynamictMRD
Dynamic Memory Auto Refresh Period, and Auto
Refresh to Active Command Period (t
)
RFC
Dynamic Memory Exit Self-Refresh to Active
Command (t
)
XSR
Dynamic Memory Active Bank A to Active B Time
(t
)
RRD
Dynamic Memory Load Mode register to Active
Command Time (t
)
MRD
A070 0080
A070 0100
A070 0104
A070 0120
A070 0124
A070 0140
A070 0144
A070 0160
A070 0164
A070 0200
A070 0204
A070 0208
A070 020C
A070 0210
A070 0214
A070 0218
A070 0220
A070 0224
A070 0228
A070 022C
A070 0230
A070 0234
A070 0238
StaticExtendedWait
DynamicConfig0
DynamicRasCas0
DynamicConfig1
DynamicRasCas1
DynamicConfig2
DynamicRasCas2
DynamicConfig3
DynamicRasCas3
StaticConfig0
Static Memory Extended Wait
Dynamic Memory Configuration Register 0
Dynamic Memory RAS and CAS Delay 0
Dynamic Memory Configuration Register 1
Dynamic Memory RAS and CAS Delay 1
Dynamic Memory Configuration Register 2
Dynamic Memory RAS and CAS Delay 2
Dynamic Memory Configuration Register 3
Dynamic Memory RAS and CAS Delay 3
Static Memory Configuration Register 0
Static Memory Write Enable Delay 0
Static Memory Output Enable Delay 0
Static Memory Read Delay 0
StaticWaitWen0
StaticWaitOen0
StaticWaitRd0
StaticWaitPage0
StaticWaitWr0
Static Memory Page Mode Read Delay 0
Static Memory Write Delay 0
StaticWaitTurn0
StaticConfig1
Static Memory Turn Round Delay 0
Static Memory Configuration Register 1
Static Memory Write Enable Delay 1
Static Memory Output Enable Delay 1
Static Memory Read Delay 1
StaticWaitWen1
StaticWaitOen1
StaticWaitRd1
StaticWaitPage1
StaticWaitWr1
Static Memory Page Mode Read Delay 1
Static Memory Write Delay 1
StaticWaitTurn1
Static Memory Turn Round Delay 1
www.digiembedded.com
231
M E MO R Y C O N T ROL L E R
Control register
Address
Register
Description
A070 0240
A070 0244
A070 0248
A070 024C
A070 0250
A070 0254
A070 0258
A070 0260
A070 0264
A070 0268
A070 026C
A070 0270
A070 0274
A070 0278
StaticConfig2
Static Memory Configuration Register 2
Static Memory Write Enable Delay 2
Static Memory Output Enable Delay 2
Static Memory Read Delay 2
StaticWaitWen2
StaticWaitOen2
StaticWaitRd2
StaticWaitPage2
StaticWaitWr2
StaticWaitTurn2
StaticConfig3
Static Memory Page Mode Read Delay 2
Static Memory Write Delay 2
Static Memory Turn Round Delay 2
Static Memory Configuration Register 3
Static Memory Write Enable Delay 3
Static Memory Output Enable Delay 3
Static memory Read Delay 3
StaticWaitWen3
StaticWaitOen3
StaticWaitRd3
StaticWaitPage3
StaticWaitWr3
StaticWaitTurn3
Static Memory Page Mode Read Delay 3
Static Memory Write Delay 3
Static Memory Turn Round Delay 3
Reset values
Reset values will be noted in the description column of each register table, rather
than as a separate column.
Control register
Address: A070 0000
The Control register controls the memory controller operation. The control bits can
be changed during normal operation.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
7
22
6
21
5
20
4
19
3
18
17
16
Reserved
9
8
2
1
0
Reserved
ADDM MCEN
LPM
232
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Control register
Register bit
assignment
Bits
Access Mnemonic
Description
D31:03
D02
N/A
R/W
Reserved
LPM
N/A (do not modify)
Low-power mode
0
1
Normal mode (reset value on reset_n)
Low-power mode
Indicates normal or low-power mode. Entering low-power mode
reduces memory controller power consumption. Dynamic memory
is refreshed as necessary. The memory controller returns to normal
functional mode by clearing the low-power mode bit or by power-
on reset.
If you modify this bit, be sure the memory controller is in idle state.
If you modify the L bit, be aware of these conditions:
ꢀ
The external memory cannot be accessed in low-power or
disabled state. If a memory access is performed in either of these
states, an error response is generated.
ꢀ
ꢀ
The memory controller AHB programming port can be accessed
normally.
The memory controller registers can be programmed in low-
power and/or disabled state.
D01
R/W
ADDM
Address mirror
0
1
Normal memory map
Reset memory map. Static memory chip select 1 is mirrored onto
chip select 0 and chip select 4 (reset value on reset_n)
Indicates normal or reset memory map. On power-on reset, chip
select 1 is mirrored to both chip select 0 and chip select 1/chip
select 4 memory areas. Clearing the M bit allows chip select 0 and
chip select 4 memory to be accessed.
D00
R/W
MCEN
Memory controller enable
0
1
Disabled
Enabled (reset value on reset_n)
Disabling the memory controller reduces power consumption.
When the memory controller is disabled, the memory is not
refreshed. The memory controller is enabled by setting the enable
bit or by power-on reset.
If you modify this bit, be sure the memory controller is in idle state.
If you modify the E bit, be aware of these conditions:
ꢀ
The external memory cannot be accessed in low-power or
disabled state. If a memory access is performed in either of these
states, an error response is generated.
ꢀ
ꢀ
The memory controller AHB programming port can be accessed
normally.
The memory controller registers can be programmed in low-
power and/or disabled state.
www.digiembedded.com
233
M E MO R Y C O N T ROL L E R
Status register
Status register
Address: A070 0004
The Status register provides memory controller status information.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
7
22
6
21
5
20
4
19
3
18
17
1
16
0
Reserved
9
8
2
Reserved
SA
WBS BUSY
Register bit
assignment
Bits
Access Mnemonic
Description
D31:03
D02
N/A
R
Reserved
SA
N/A (do not modify)
Self-refresh acknowledge (SREFACK)
0
1
Normal mode
Self refresh mode (reset value on reset_n)
Indicates the memory controller operating mode.
D01
D00
R
R
WBS
Write buffer status
0
1
Write buffers empty (reset value on reset_n)
Write buffers contain data
Enables the memory controller to enter low-power mode or
disabled mode clearly.
BUSY
Busy
0
1
Memory controller is idle
Memory controller is busy performing memory transactions,
commands, or auto-refresh cycles, or is in self-refresh mode
(reset value on reset_n).
Ensures that the memory controller enters the low-power or
disabled state cleanly by determining whether the memory
controller is busy.
Configuration register
Address: A070 0008
The Configuration register configures memory controller operation. It is
recommended that this register be modified during system initialization, or when
there are no current or outstanding transactions. Wait until the memory controller
is idle, then enter low-power or disabled mode.
234
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Dynamic Memory Control register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
Reserved
8
0
Reserved
END
Register bit
assignment
Bits
Access Mnemonic
Description
D31:01
D00
N/A
R/W
Reserved
END
N/A (do not modify)
Endian mode
0
1
Little endian mode
Big endian mode
The value of the endian bit on power-on reset (reset_n) is
determined by the gpio_a[3] signal. This value can be overridden by
software.
Note:
The value of the gpio_a[3] signal is reflected in this field.
When programmed, this register reflects the last value
written into the register. You must flush all data in the
memory controller before switching between little endian
and big endian modes.
Dynamic Memory Control register
Address: A070 0020
The Dynamic Memory Control register controls dynamic memory operation. The
control bits can be changed during normal operation.
Register
31
30
29
28
12
27
26
25
9
24
23
22
21
20
19
18
17
16
Reserved
15
14
13
11
10
8
7
6
5
4
3
2
1
0
Not
used
Not
used
Not
used
Rsvd
nRP
Reserved
SDRAMInit
Rsvd
Reserved
SR
CE
www.digiembedded.com
235
M E MO R Y C O N T ROL L E R
Dynamic Memory Refresh Timer register
Register bit
assignment
Bits
Access Mnemonic
Description
D31:15
D14
N/A
R/W
Reserved
nRP
N/A (do not modify)
Sync/Flash reset/power down signal (dy_pwr_n)
0
1
dy_pwr_n signal low (reset value on reset_n)
Set dy_pwr_n signal high
D13
R/W
N/A
R/W
Not used
Always write to 0.
D12:09
D08:07
Reserved
SDRAMInit
N/A (do not modify)
SDRAM initialization
00
Issue SDRAM NORMAL operation command (reset value on
reset_n)
01
10
11
Issue SDRAM MODE command
Issue SDRAM PALL (precharge all) command
Issue SDRAM NOP (no operation) command
D06
N/A
R/W
N/A
R/W
Reserved
Not used
Reserved
SR
N/A (do not modify)
Must write 0.
D05
D04:03
D02
N/A (do not modify)
Self-refresh request (SREFREQ)
0
1
Normal mode
Enter self-refresh mode (reset value on reset_n)
By writing 1 to this bit, self-refresh can be entered under software
control. Writing 0 to this bit returns the memory controller to
normal mode.
The self-refresh acknowledge bit in the Status register must be
polled to discover the current operating mode of the memory
controller.
Note:
The memory controller exits from power-on reset with the
self-refresh bit on high. To enter normal functional mode,
set the self-refresh bit low. Writing to this register with the
bit set to high places the register into self-refresh mode.
This functionality allows data to be stored over SDRAM
self-refresh of the ASIC is powered down.
D01
D00
R/W
R/W
Not used
CE
Must write 1.
Dynamic memory clock enable
0
Clock enable if idle devices are deasserted to save power (reset
value on reset_n)
1
All clock enables are driven high continuously.
Note:
Clock enable must be high during SDRAM initialization.
Dynamic Memory Refresh Timer register
Address: A070 0024
236
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Dynamic Memory Read Configuration register
The Dynamic Memory Refresh Timer register configures dynamic memory operation.
It is recommended that this register be modified during system initialization, or
when there are no current or outstanding transactions. Wait until the memory
controller is idle, then enter low-power or disabled mode.These bits can, however,
be changed during normal operation if necessary.
Note: The Dynamic Memory Refresh Timer register is used for all four dynamic
memory chip selects. The worst case value for all chip selects must be
programmed.
Register
31
15
30
14
29
28
12
27
11
26
10
25
9
24
23
7
22
6
21
20
4
19
3
18
2
17
1
16
0
Reserved
13
8
5
Reserved
REFRESH
Register bit
assignment
Bits
Access Mnemonic
Description
D31:11
D10:00
N/A
R/W
Reserved
N/A (do not modify)
REFRESH
Refresh timer
0x0
Refresh disabled (reset value on reset_n)
0x1–0x77F n(x16)
16n clk_out ticks between SDRAM refresh cycles
Note: The refresh cycles are evenly distributed. There might be slight variations,
however, when the auto-refresh command is issued, depending on the status
of the memory controller.
Dynamic Memory Read Configuration register
Address: A070 0028
The Dynamic Memory Read Configuration register allows you to configure the
dynamic memory read strategy. Modify this register only during system
initialization.
Note: The Dynamic Memory Read Configuration register is used for all four dynamic
memory chip selects. The worst case value for all chip selects must be
programmed.
www.digiembedded.com
237
M E MO R Y C O N T ROL L E R
Dynamic Memory Precharge Command Period register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
8
Reserved
RD
Register bit
assignment
Bits
Access Mnemonic
Description
D31:02
D01:00
N/A
R/W
Reserved
RD
N/A (do not modify)
Read data strategy
00
01
Reserved.
Command delayed strategy, using CLKDELAY (command
delayed, clock out not delayed).
10
11
Command delayed strategy plus one clock cycle, using
CLKDELAY (command delayed, clock out not delayed).
Command delayed strategy plus two clock cycles, using
CLKDELAY (command delayed, clock out not delayed).
Dynamic Memory Precharge Command Period register
Address: A070 0030
The Dynamic Memory Precharge Command Period register allows you to program the
precharge command period, t . Modify this register only during system
RP
initialization. This value normally is found in SDRAM datasheets as t .
RP
Note: The Dynamic Memory Precharge Command Period register is used for all four
dynamic memory chip selects. The worst case value for all chip selects must
be programmed.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
10
9
8
Reserved
RP
238
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Dynamic Memory Active to Precharge Command Period register
Register bit
assignment
Bits
Access Mnemonic
Description
D31:04
D03:00
N/A
R/W
Reserved
RP
N/A (do not modify)
Precharge command period (t
)
RP
0x0–0xE
n+1 clock cycles, where the delay is in clk_out cycles.
0xF
16 clock cycles (reset value on reset_n)
Dynamic Memory Active to Precharge Command Period
register
Address: A070 0034
The Dynamic Memory Active to Precharge Command Period register allows you to
program the active to precharge command period, t . It is recommended that this
RAS
register be modified during system initialization, or when there are no current or
outstanding transactions. Wait until the memory controller is idle, then enter low-
power or disabled mode. This value normally is found in SDRAM datasheets as t
.
RAS
Note: The Dynamic Memory Active to Precharge Command Period register is used for
all four dynamic memory chip selects. The worst case value for all chip
selects must be programmed.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
16
0
Reserved
10
9
8
1
Reserved
RAS
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
D31:04
D03:00
N/A
R/W
Reserved
RAS
Active to precharge command period (t
)
RAS
0x0–0xE
n+1 clock cycles, where the delay is in clk_out cycles.
0xF
16 clock cycles (reset value on reset_n)
www.digiembedded.com
239
M E MO R Y C O N T ROL L E R
Dynamic Memory Self-refresh Exit Time register
Dynamic Memory Self-refresh Exit Time register
Address: A070 0038
The Dynamic Memory Self-refresh Exit Time register allows you to program the self-
refresh exit time, t
. It is recommended that this register be modified during
SREX
system initialization, or when there are no current or outstanding transactions. Wait
until the memory controller is idle, then enter low-power or disabled mode. This
value normally is found in SDRAM data sheets as t
.
SREX
Note: The Dynamic Memory Self-refresh Exit Time register is used for all four
dynamic memory chip selects. The worst case value for all chip selects must
be programmed.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
16
0
Reserved
10
9
8
1
Reserved
SREX
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
D31:04
D03:00
N/A
R/W
Reserved
SREX
Self-refresh exit time (t
)
SREX
0x0–0xE
n+1 clock cycles, where the delay is in clk_out cycles.
0xF
16 clock cycles (reset value on reset_n)
Dynamic Memory Last Data Out to Active Time register
Address: A070 003C
The Dynamic Memory Last Data Out to Active Time register allows you to program
the last-data-out to active command time, t . It is recommended that this
APR
register be modified during system initialization, or when there are no current or
outstanding transactions. Wait until the memory controller is idle, then enter low-
power or disabled mode. This value normally is found in SDRAM datasheets as t
.
APR
Note: The Dynamic Memory Last Data Out to Active Time register is used for all four
dynamic memory chip selects. The worst case value for all chip selects must
be programmed.
240
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Dynamic Memory Data-in to Active Command Time register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
8
Reserved
APR
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
D31:04
D03:00
N/A
R/W
Reserved
APR
Last-data-out to active command time (t
)
APR
0x0–0xE
n+1 clock cycles, where the delay is in clk_out cycles.
0xF
16 clock cycles (reset value on reset_n)
Dynamic Memory Data-in to Active Command Time register
Address: A070 0040
The Dynamic Memory Data-in to Active Command Time register allows you to
program the data-in to active command time, t . It is recommended that this
DAL
register be modified during system initialization, or when there are no current or
outstanding transactions. Wait until the memory controller is idle, then enter low-
power or disabled mode. This value normally is found in SDRAM data sheets as t
DAL
or t
.
APW
Note: The Dynamic Memory Data-in Active Command Time register is used for all
four dynamic memory chip selects. The worst case value for all chip selects
must be programmed.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
10
9
8
Reserved
DAL
www.digiembedded.com
241
M E MO R Y C O N T ROL L E R
Dynamic Memory Write Recovery Time register
Register bit
assignment
Bits
Access Mnemonic
Description
D31:04
D03:00
N/A
R/W
Reserved
DAL
N/A (do not modify)
Data-in to active command (t
or t
)
APW
DAL
0x0–0xE
n+1 clock cycles, where the delay is in clk_out cycles.
0xF
15 clock cycles (reset value on reset_n)
Dynamic Memory Write Recovery Time register
Address: A070 0044
The Dynamic Memory Write Recovery Time register allows you to program the write
recovery time, t . It is recommended that this register be modified during system
WR
initialization, or when there are no current or outstanding transactions. Wait until
the memory controller is idle, then enter low-power or disabled mode. This value
normally is found in SDRAM datasheets as t , t , t
, or t
.
RDL
WR DPL RWL
Note: The Dynamic Memory Write Recovery Time register is used for all four
dynamic memory chip selects. The worst case value for all chip selects must
be programmed.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
10
9
8
Reserved
WR
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
Write recovery time (t , t
D31:04
D03:00
N/A
Reserved
WR
R/W
, t
, or t
)
RDL
WR DPL RWL
0x0–0xE
n+1 clock cycles, where the delay is in clk_out cycles.
0xF
16 clock cycles (reset value on reset_n)
242
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Dynamic Memory Active to Active Command Period register
Dynamic Memory Active to Active Command Period register
Address: A070 0048
The Dynamic Memory Active to Active Command Period register allows you to
program the active to active command period, t . It is recommended that this
RC
register be modified during system initialization, or when there are no current or
outstanding transactions. Wait until the memory controller is idle, then enter low-
power or disabled mode. This value normally is found in SDRAM datasheets as t .
RC
Note: The Dynamic Memory Active to Active Command period register is used for all
four dynamic memory chip selects. The worst case value for all chip selects
must be programmed.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
10
9
8
Reserved
RC
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
D31:05
D04:00
N/A
R/W
Reserved
RC
Active to active command period (t
)
RC
0x0–0x1E
n+1 clock cycles, where the delay is in clk_out cycles.
0x1F
32 clock cycles (reset value on reset_n)
Dynamic Memory Auto Refresh Period register
Address: A070 004C
The Dynamic Memory Auto Refresh Period register allows you to program the auto-
refresh period and the auto-refresh to active command period, t . It is
RFC
recommended that this register be modified during initialization, or when there are
no current or outstanding transactions. Wait until the memory controller is idle,
then enter low-power or disabled mode. This value normally is found in SDRAM
datasheets as t
or t .
RC
RFC
www.digiembedded.com
243
M E MO R Y C O N T ROL L E R
Dynamic Memory Exit Self-refresh register
Note: The Dynamic Memory Auto Refresh Period register is used for all four dynamic
memory chip selects. The worst case value for all chip selects must be
programmed.
Register
31
15
30
14
29
13
28
12
27
11
26
25
9
24
23
7
22
6
21
5
20
4
19
3
18
17
1
16
0
Reserved
10
8
2
Reserved
RFC
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
D31:05
D04:00
N/A
R/W
Reserved
RFC
Auto-refresh period and auto-refresh to active command
period
0x0–0x1E
n+1 clock cycles, where the delay is in clk_out cycles
0x1F
32 clock cycles (reset value on reset_n)
Dynamic Memory Exit Self-refresh register
Address: A070 0050
The Dynamic Memory Exit Self-refresh register allows you to program the exit self-
refresh to active command time, t . It is recommended that this register be
XSR
modified during system initialization, or when there are no current or outstanding
transactions. Wait until the memory controller is idle, then enter low-power or
disabled mode. This value normally is found in SDRAM datasheets as t
.
XSR
Note: The Dynamic Memory Exit Self-refresh register is used for all four dynamic
memory chip selects. The worst case value for all the chip selects must be
programmed.
244
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Dynamic Memory Active Bank A to Active Bank B Time register
Register
31
15
30
14
29
13
28
12
27
11
26
25
9
24
23
7
22
6
21
5
20
4
19
3
18
17
1
16
0
Reserved
10
8
2
Reserved
XSR
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
D31:05
D04:00
N/A
R/W
Reserved
XSR
Exit self-refresh to active time command
0x0–0x1E
n+1 clock cycles, where the delay is in clk_out cycles
0x1F
32 clock cycles (reset value on reset_n)
Dynamic Memory Active Bank A to Active Bank B Time
register
Address: A070 0054
The Dynamic Memory Active Bank A to Active Bank B Time register allows you to
program the active bank A to active bank B latency, t . It is recommended that
RRD
this register be modified during system initialization, or when there are no current
or outstanding transactions. Wait until the memory controller is idle, then enter
low-power or disabled mode. This value normally is found in SDRAM datasheets as
t
.
RRD
Note: The Dynamic Memory Active Bank A to Active Bank B Time register is used for
all four dynamic memory chip selects. The worst case value for all chip
selects must be programmed.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
10
9
8
Reserved
RRD
www.digiembedded.com
245
M E MO R Y C O N T ROL L E R
Dynamic Memory Load Mode register to Active Command Time register
Register bit
assignment
Bits
Access Mnemonic
Description
D31:04
D03:00
N/A
R/W
Reserved
RRD
N/A (do not modify)
Active Bank A to Active Bank B
0x0–0xE
n+1 clock cycles, where the delay is in clk_out cycles
0xF
16 clock cycles (reset on reset_n)
Dynamic Memory Load Mode register to Active Command
Time register
Address: A070 0058
The Dynamic Memory Load Mode register to Active Command Time register allows
you to program the Load Mode register to active command time, t
. It is
MRD
recommended that this register be modified during system initialization, or when
there are no current or outstanding transactions. Wait until the memory controller
is idle, then enter low-power or disabled mode. This value normally is found in
SDRAM datasheets as t
or t
.
RSA
MRD
Note: The Dynamic Memory Load Mode register to Active Command Time register is
used for all four chip selects. The worst case value for all chip selects must be
programmed.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
10
9
8
Reserved
MRD
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
D31:045
D03:00
N/A
R/W
Reserved
MRD
Load mode register to Active Command Time
0x0–0xE
n+1 clock cycles, where the delay is in clk_out cycles
0xF
16 clock cycles (reset on reset_n)
246
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Static Memory Extended Wait register
Static Memory Extended Wait register
Address: A070 0080
The Static Memory Extended Wait register times long static memory read and write
transfers (which are longer than can be supported by the Static Memory Read Delay
registers or the Static Memory Write Delay registers) when the EW (extended wait)
bit in the related Static Memory Configuration register is enabled.
There is only one Static Memory Extended Wait register, which is used by the
relevant static memory chip select if the appropriate EW bit is set in the Static
Memory Configuration register.
It is recommended that this register be modified during system initialization, or
when there are no current or outstanding transactions. If necessary, however, these
control bits can be changed during normal operation.
Register
31
15
30
14
29
28
27
11
26
10
25
9
24
23
7
22
6
21
20
19
3
18
2
17
1
16
0
Reserved
13
12
8
5
4
Reserved
EXTW
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
D31:10
D09:00
N/A
R/W
Reserved
EXTW
External wait timeout
0x0
16 clock cycles, where the delay is in clk_out cycles
0x1-0x3FF
(n=1) x 16 clock cycles
Example
Static memory read/write time = 16 μs
CLK frequency = 50 MHz
This value must be programmed into the Static Memory Extended Wait register:
-6
6
(16 x 10 x 50 x 10 / 16) - 1 = 49
Dynamic Memory Configuration 0–3 registers
Address: A070 0100 / 0120 / 0140 / 0160
www.digiembedded.com
247
M E MO R Y C O N T ROL L E R
Dynamic Memory Configuration 0–3 registers
Use the Dynamic Memory Configuration 0–3 registers to program the configuration
information for the relevant dynamic memory chip select. These registers are
usually modified only during system initialization.
Register
31
30
29
28
12
27
11
26
25
9
24
8
23
7
22
21
20
19
18
2
17
16
0
Reserved
Protect BDMC
Reserved
15
14
13
10
6
5
4
3
1
Rsvd
AM
Rsvd
AM1
Reserved
MD
Reserved
Register bit
assignment
Bits
Access Mnemonic
Description
D31:21
D20
N/A
R/W
Reserved
Protect
N/A (do not modify)
Write protect
0
1
Writes not protected (reset value on reset_n)
Write protected
D19
R/W
BDMC
Buffer enable
0
Buffer disabled for accesses to this chip select (reset value on
reset_n)
1
Buffer enabled for accesses to this chip select. The buffers must
be disabled during SDRAM initialization. The buffers must be
enabled during normal operation.
D18:15
D14
N/A
R/W
Reserved
AM
N/A (do not modify)
Address mapping
0
Reset value on reset_n
See Table , “Register map,” on page 230 for more information.
D13
N/A
R/W
Reserved
AM1
N/A (do not modify)
D12:07
Address mapping
00000000
Reset value on reset_n
The SDRAM column and row width and number of banks are
computed automatically from the address mapping.
See "Register map," beginning on page 230, for more information.
D06:05
D04:03
N/A
R/W
Reserved
MD
N/A (do not modify)
Memory device
00
01
10
11
SDRAM (reset value on reset_n)
Low-power SDRAM
Reserved
Reserved
D02:00
N/A
Reserved
N/A (do not modify)
248
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Dynamic Memory Configuration 0–3 registers
Address mapping
for the Dynamic
Memory
The next table shows address mapping for the Dynamic Memory Configuration 0-3
registers. Address mappings that are not shown in the table are reserved.
Configuration
registers
[14]
[12]
[11:9] [8:7] Description
16-bit external bus high-performance address mapping (row, bank column)
16 Mb (2Mx8), 2 banks, row length=11, column length=9
16 Mb (1Mx16), 2 banks, row length=11, column length=8
64 Mb (8Mx80, 4 banks, row length=12, column length=9
64 Mb (4Mx16), 4 banks, row length=12, column length=8
128 Mb (16Mx8), 4 banks, row length=12, column length=10
128 Mb (8Mx16), 4 banks, row length=12, column length=9
256 Mb (32Mx8), 4 banks, row length=13, column length=10
256 Mb (16Mx16), 4 banks, row length=13, column length=9
512 Mb (64Mx8), 4 banks, row length=13, column length=11
512 Mb (32Mx16), 4 banks, row length=13, column length=10
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
000
000
001
001
010
010
011
011
100
100
00
01
00
01
00
01
00
01
00
01
16-bit external bus low-power SDRAM address mapping (bank, row, column)
16 Mb (2Mx8), 2 banks, row length=11, column length=9
16 Mb (1Mx16), 2 banks, row length=11, column length=8
64 Mb (8Mx8), 4 banks, row length 12, column length=9
64 Mb (4Mx16), 4 banks, row length=12, column length=8
128 Mb (16Mx8), 4 banks, row length=12, column length=10
128 Mb (8Mx16), 4 banks, row length=12, column length=9
256 Mb (32Mx8), 4 banks, row length=13, column length=10
256 Mb (16Mx16), 4 banks, row length=13, column length=9
512 Mb (64Mx8), 4 banks, row length=13, column length=11
512 Mb (32Mx16, 4 banks, row length=13, column length=10
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
000
000
001
001
010
010
011
011
100
100
00
01
00
01
00
01
00
01
00
01
32-bit extended bus high-performance address mapping (row, bank, column)
16 Mb (2Mx8), 2 banks, row length=11, column length=9
16 Mb (1Mx16), 2 banks, row length=11, column length=8
64 Mb (8Mx8), 4 banks, row length=12, column length=9
64 Mb (4Mx16), 4 banks, row length=12, column length=8
64 Mb (2Mx32), 4 banks, row length=11, column length=8
128 Mb (16Mx8), 4 banks, row length=12, column length=10
128 Mb (8Mx16), 4 banks, row length=12, column length=9
128 Mb (4Mx32), 4 banks, row length=12, column length=8
256 Mb (32Mx8), 4 banks, row length=13, column length=10
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
000
000
001
001
001
010
010
010
011
00
01
00
01
10
00
01
10
00
www.digiembedded.com
249
M E MO R Y C O N T ROL L E R
Dynamic Memory RAS and CAS Delay 0–3 registers
[14]
[12]
[11:9] [8:7] Description
256 Mb (16Mx16), 4 banks, row length=13, column length=9
256 Mb (8Mx32), 4 banks, row length=13, column length=8
512 Mb (64Mx8), 4 banks, row length=13, column length=11
512 Mb (32Mx16), 4 banks, row length=13, column length=10
1
1
1
1
0
0
0
0
011
011
100
100
01
10
00
01
32-bit extended bus low-power SDRAM address mapping (bank, row, column)
16 Mb (2Mx8), 2 banks, row length=11, column length=9
16 Mb (1Mx16), 2 banks, row length=11, column length=8
64 Mb (8Mx8), 4 banks, row length=12, column length=9
64 MB (4Mx16), 4 banks, row length=12, column length=8
64 Mb (2Mx32), 4 banks, row length=11, column length=8
128 Mb (16Mx8), 4 banks, row length=12, column length=10
128 Mb (8Mx16), 4 banks, row length=12, column length=9
128 Mb (4Mx32), 4 banks, row length=12, column length=8
256 Mb (32Mx8), 4 banks, row length=13, column length=10
256 Mb (16Mx16), 4 banks, row length=13, column length=9
256 Mb (8Mx32), 4 banks, row length=13, column length=8
512 Mb (64Mx8), 4 banks, row length=13, column length=11
512 Mb (32Mx16), 4 banks, row length=13, column length=10
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
000
000
001
001
001
010
010
010
011
011
011
100
100
00
01
00
01
10
00
01
10
00
01
10
00
01
Chip select and
memory devices
A chip select can be connected to a single memory device; in this situation, the chip
select data bus width is the same as the device width. As an alternative, the chip
select can be connected to a number of external devices. In this situation, the chip
select data bus width is the sum of the memory device databus widths.
Chip select and
memory devices:
Examples
For a chip select connected to
32-bit wide memory device
16-bit wide memory device
4 x 8-bit wide memory devices
2 x 8-bit memory devices
Select this mapping
32-bit wide address mapping
16-bit wide address mapping
32-bit wide address mapping
16-bit wide address mapping
Dynamic Memory RAS and CAS Delay 0–3 registers
Address: A070 0104 / 0124 / 0144 / 0164
250
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
StaticMemory Configuration 0–3 registers
The Dynamic Memory RAS and CAS Delay 0–3 registers allow you to program the RAS
and CAS latencies for the relevant dynamic memory. It is recommended that these
registers be modified during system initialization, or when there are no current or
outstanding transactions. Wait until the memory controller is idle, then enter low-
power or disabled mode.
Note: The values programmed into these registers must be consistent with the
values used to initialize the SDRAM memory device.
Register
31
15
30
14
29
28
27
11
26
10
25
9
24
23
7
22
6
21
20
4
19
3
18
2
17
1
16
0
Reserved
13
12
8
5
Reserved
CAS
Reserved
RAS
Register bit
assignment
Bits
Access Mnemonic
Description
D31:10
D09:08
N/A
R/W
Reserved
CAS
N/A (do not modify)
CAS latency
00
01
Reserved
One clock cycle, where the RAS to CAS latency (RAS) and
CAS latency (CAS) are defined in clk_out cycles
10
11
Two clock cycles
Three clock cycles (reset value on reset_n)
D07:02
D01:00
N/A
R/W
Reserved
RAS
N/A (do not modify)
RAS latency (active to read/write delay)
00
01
Reserved
One clock cycle, where the RAS to CAS latency (RAS) and
CAS latency (CAS) are defined in clk_out cycles
10
11
Two clock cycles
Three clock cycles (reset value on reset_n)
StaticMemory Configuration 0–3 registers
Address: A070 0200 / 0220 / 0240 / 0260
The Static Memory Configuration 0–3 registers configure the static memory
configuration. It is recommended that these registers be modified during system
initialization, or when there are no current or outstanding transactions. Wait until
the memory controller is idle, then enter low-power or disabled mode.
www.digiembedded.com
251
M E MO R Y C O N T ROL L E R
StaticMemory Configuration 0–3 registers
Register
31
15
30
14
29
13
28
27
11
26
25
9
24
23
22
21
5
20
19
18
2
17
16
0
Reserved
PSMC BSMC
Reserved
12
10
8
7
6
4
3
1
Reserved
EW
PB
PC
Reserved
PM
BMODE
MW
Register bit
assignment
Bits
Access Mnemonic
Description
D31:21
D20
N/A
R/W
Reserved
PSMC
N/A (do not modify)
Write protect
0
1
Writes not protected (reset value on reset_n)
Write protected
D19
R/W
BSMC
Buffer enable
0
Write buffer disabled (reset value on reset_n)
Write buffer enabled
1
Note:
This field must always be set to 0 when a peripheral other
than SRAM is attached to the static ram chip select.
D18:09
D08
N/A
R/W
Reserved
EW
N/A (do not modify)
Extended wait
0
1
Extended wait disabled (reset value on reset_n)
Extended wait enabled
Extended wait uses the Static Extended Wait register to time both
the read and write transfers, rather than the Static Memory Read
Delay 0–3 registers and Static Memory Write Delay 0–3 registers.
This allows much longer transactions.
Extended wait also can be used with the ns_ta_strb signal to allow a
slow peripheral to terminate the access. In this case, the Static
Memory Extended Wait register can be programmed with the
maximum timeout limit. A high value on ns_ta_strb is then used to
terminate the access before the maximum timeout occurs.
Note:
Extended wait and page mode cannot be selected simulta-
neously.
252
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
StaticMemory Configuration 0–3 registers
Bits
Access Mnemonic
R/W PB
Description
D07
Byte lane state
0
For reads, all bits in byte_lane[3:0] are high.
For writes, the respective active bits in byte_lane[3:0] are low
(reset value for chip select 0, 2, and 3 on reset_n).
1
For reads, the respective active bits in byte_lane[3:0] are low.
For writes, the respective active bits in byte_lane[3:0] are low.
Note:
Setting this bit to 0 disables the write enable signal. WE_n
will always be set to 1 (that is, you must use byte lane
select signals).
The byte lane state bit (PB) enables different types of memory to
be connected. For byte-wide static memories, the byte_lane[3:0]
signal from the memory controller is usually connected to WE_n
(write enable). In this case, for reads, all byte_lane[3:0] bits must be
high, which means that the byte lane state bit must be low.
16-bit wide static memory devices usually have the byte_lane[3:0]
signals connected to the nUB and nLB (upper byte and lower byte)
signals in the static memory. In this case, a write to a particular byte
must assert the appropriate nUB or nLB signal low. For reads, all
nUB and nLB signals must be asserted low so the bus is driven. In
this case, the byte lane state must be high.
D06
R/W
PC
Chip select polarity
0
1
Active low chip select
Active high chip select
D05:04
D03
N/A
R/W
Reserved
PM
N/A (do not modify)
Page mode
0
1
Disabled (reset on reset_n)
Async page mode enabled (page length four)
In page mode, the memory controller can burst up to four external
accesses. Devices with asynchronous page mode burst four or
higher are supported.
Asynchronous page mode burst two devices are not supported and
must be accessed normally.
www.digiembedded.com
253
M E MO R Y C O N T ROL L E R
StaticMemory Write Enable Delay 0–3 registers
Bits
Access Mnemonic
Description
D02
R/W
BMODE
Burst mode
Allows the static output enable signal to toggle during bursts.
0
1
Do not toggle output enable during bursts
Toggle output enable during bursts
D01:00
R/W
MW
Memory width
00
01
10
11
8 bit (reset value for chip select 0, 2, and 3 on reset_n)
16 bit
32 bit
Reserved
The value of the chip select 1 memory width field on power-on
reset (reset_n) is determined by the gpio_a[0], addr[23] signal. This
value can be overridden by software.
Note:
For chip select 1, the value of the gpio_a[0], addr[23] signal
is reflected in this field. When programmed, this register
reflects the last value written into it.
Note: Synchronous burst mode memory devices are not supported.
StaticMemory Write Enable Delay 0–3 registers
Address: A070 0204 / 0224 / 0244 / 0264
The Static Memory Write Enable Delay 0–3 registers allow you to program the delay
from the chip select to the write enable assertion. The Static Memory Write Enable
Delay register is used in conjunction with the Static Memory Write Delay registers,
to control the width of the write enable signals. It is recommended that these
registers be modified during system initialization, or when there are no current or
outstanding transactions. Wait until the memory controller is idle, then enter low-
power or disabled mode.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
17
16
0
Reserved
10
9
8
2
1
Reserved
WWEN
254
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Static Memory Output Enable Delay 0–3 registers
Register bit
assignment
Bits
Access Mnemonic
Description
D31:04
D03:00
N/A
R/W
Reserved
WWEN
N/A (do not modify)
Wait write enable (WAITWEN)
0000
One clk_out cycle delay between assertion of chip select and
write enable (reset value on reset_n).
0001–1111 (n+1) clk_out cycle delay, where the delay is
(WAITWEN+1) x t
clk_out
Delay from chip select assertion to write enable.
Static Memory Output Enable Delay 0–3 registers
Address: A070 0208 / 0228 / 0248 / 0268
The Static Memory Output Enable Delay 0–3 registers allow you to program the delay
from the chip select or address change, whichever is later, to the output enable
assertion. The Static Memory Output Enable Delay register is used in conjunction
with the Static Memory Read Delay registers, to control the width of the output
enable signals. It is recommended that these registers be modified during system
initialization, or when there are no current or outstanding transactions. Wait until
the memory controller is idle, then enter low-power or disabled mode.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
16
0
Reserved
10
9
8
1
Reserved
WOEN
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
Wait output enable (WAITOEN)
0000 No delay (reset value on reset_n).
0001–1111n cycle delay, where the delay is
D31:04
D03:00
N/A
R/W
Reserved
WOEN
WAITOEN x t
clk_out
Delay from chip select assertion to output enable.
www.digiembedded.com
255
M E MO R Y C O N T ROL L E R
Static Memory Read Delay 0–3 registers
Static Memory Read Delay 0–3 registers
Address: A070 020C / 022C / 024C / 026C
The Static Memory Read Delay 0–3 registers allow you to program the delay from the
chip select to the read access. It is recommended that these registers be modified
during system initialization, or when there are no current or outstanding
transactions. Wait until the memory controller is idle, then enter low-power or
disabled mode. These registers are not used if the extended wait bit is set in the
related Static Memory Configuration register.
Register
31
15
30
14
29
13
28
12
27
11
26
25
9
24
23
7
22
6
21
5
20
4
19
3
18
17
1
16
0
Reserved
10
8
2
Reserved
WTRD
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
D31:05
D04:00
N/A
R/W
Reserved
WTRD
Nonpage mode read wait states or asynchronous page mode
read first access wait state (WAITRD)
00000–11110
(n+1) clk_out cycle for read accesses. For
nonsequential reads, the wait state time is (WAITRD+1) x
t
clk_out
11111
Use this equation to compute this field:
WTRD = ([T + T + 10.0] / T ) - 1
32 clk_out cycles for read accesses (reset value on reset_n)
b
a
c
T = Total board propagation delay, including any buffers
b
T = Peripheral access time
a
T = clk_out clock period.
c
Any decimal portion must be rounded up. All values are in
nanoseconds
StaticMemory Page Mode Read Delay 0–3 registers
Address: A070 0210 / 0230 / 0250 / 0270
The Static Memory Page Mode Read Delay 0–3 registers allow you to program the
delay for asynchronous page mode sequential accesses. These registers control the
overall period for the read cycle. It is recommended that these registers be
256
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
Static Memory Write Delay 0–3 registers
modified during system initialization, or when there are no current or outstanding
transactions. Wait until the memory controller is idle, then enter low-power or
disabled mode.
Register
31
15
30
14
29
13
28
12
27
11
26
25
9
24
23
7
22
6
21
5
20
4
19
3
18
17
1
16
0
Reserved
10
8
2
Reserved
WTPG
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
D31:05
D04:00
N/A
R/W
Reserved
WTPG
Asynchronous page mode read after the first wait state
(WAITPAGE)
00000–11110
(n+1) clk_out cycle for read access time. For
asynchronous page mode read for sequential reads, the wait
state time for page mode accesses after the first read is
(WAITPAGE+1) x t
clk_out
11111
32 clk_out cycles read access time (reset value on reset_n)
Number of wait states for asynchronous page mode read accesses
after the first read.
Static Memory Write Delay 0–3 registers
Address: A070 0214 / 0234 / 0254 / 0274
The Static Memory Write Delay 0–3 registers allow you to program the delay from
the chip select to the write access. These registers control the overall period for
the write cycle. It is recommended that these registers be modified during system
initialization, or when there are no current or outstanding transactions. Wait until
the memory controller is idle, then enter low-power or disabled mode.These
registers are not used if the extended wait bit is enabled in the related Static
Memory Configuration register.
www.digiembedded.com
257
M E MO R Y C O N T ROL L E R
StaticMemory Turn Round Delay 0–3 registers
Register
31
15
30
14
29
13
28
12
27
11
26
25
9
24
23
7
22
6
21
5
20
4
19
3
18
17
1
16
0
Reserved
10
8
2
Reserved
WTWR
Register bit
assignment
Bits
Access Mnemonic
Description
N/A (do not modify)
Write wait states (WAITWR)
00000–11110 (n+2) clk_out cycle write access time. The wait
D31:05
D04:00
N/A
R/W
Reserved
WTWR
state time for write accesses after the first read is WAITWR
(n+2) x t
clk_out
11111
332 clk_out cycle write access time (reset value on reset_n)
SRAM wait state time for write accesses after the first read.
StaticMemory Turn Round Delay 0–3 registers
Address: A070 0218 / 0238 / 0258 / 0278
The Static Memory Turn Round Delay 0–3 registers allow you to program the number
of bus turnaround cycles. It is recommended that these registers be modified during
system initialization, or when there are no current or outstanding transactions. Wait
until the memory controller is idle, then enter low-power or disabled mode.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
16
0
Reserved
10
9
8
1
Reserved
WTTN
258
Hardware Reference NS9215
M E M O R Y C O N T ROL L E R
StaticMemory Turn Round Delay 0–3 registers
Register bit
assignment
Bits
Access Mnemonic
Description
D31:04
D03:00
N/A
R/W
Reserved
WTTN
N/A (do not modify)
Bus turnaround cycles (WAITTURN)
00000–11110
(n+1) clk_out turnaround cycles, where bus
turnaround time is (WAITTURN+1) x t
clk_out
1111
16 clk_out turnaround cycles (reset value on reset_n).
To prevent bus contention on the external memory databus, the WAITTURN field
controls the number of bus turnaround cycles added between static memory read
and write accesses.
The WAITTURN field also controls the number of turnaround cycles between static
memory and dynamic memory accesses.
www.digiembedded.com
259
M E MO R Y C O N T ROL L E R
StaticMemory Turn Round Delay 0–3 registers
260
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet Communication Module
C
H
A
P
T
E
R
6
T
he Ethernet Communication module consists of an Ethernet Media Access
Controller (MAC) and Ethernet front-end module. The Ethernet MAC interfaces to an
external PHY through the industry-standard interface: Media Independent Interface
(MII). The Ethernet front-end module provides all of the control functions to the
MAC.
Features
The Ethernet MAC module provides the following:
ꢀ
ꢀ
ꢀ
Station address logic (SAL)
Statistics module
Interface to MII (Media Independent Interface) PHY
The Ethernet front-end module does the following:
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
Provides control functions to the MAC
Buffers and filters the frames received from the MAC
Pumps transmit data into the MAC
Moves frames between the MAC and the system memory
Reports transmit and receive status to the host
Common
acronyms
RX_RD = Receive read
RX_WR = Receive write
TX_RD = Transmit read
TX_WR = Transmit write
www.digiembedded.com
261
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet MAC
Ethernet
communications
module
Ethernet PHY
TX
RX
MGMT
Ethernet
MAC
Ethernet Front End
SYSTEM BUS
Ethernet MAC
The Ethernet MAC includes a full function 10/100 Mbps Media Access Controller
(MAC), station address filtering logic (SAL), statistic collection module (STAT), and
MII.
262
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet MAC
MAC module
block diagram
MAC module
features
Feature
Description
MAC Core
10/100 megabit Media Access Controller
Performs the CSMA/CD function.
ꢀ
ꢀ
ꢀ
MCS: MAC control sublayer
TFUN: Transmit function
RFUN: Receive function
HOST
Host interface
Provides an interface for control and configuration.
CLK & Reset
MIIM
Clocks & resets
Provides a central location for clock trees and reset logic.
MII management
Provides control/status path to MII PHYs.
STAT
Statistics module
Counts and saves Ethernet statistics.
www.digiembedded.com
263
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Station address logic (SAL)
Feature
Description
SAL
Station address logic
Performs destination address filtering.
MII
Media Independent Interface
Provides the interface from the MAC core to a PHY that supports the MII
(as described in the IEEE 802.3 standard).
PHY interface
mappings
This table shows how the different PHY interfaces are mapped to the external IO.
External IO
MII
RXD[3]
RXD[3]
RXD[2]
RXD[1]
RXD[0]
RX_DV
RX_ER
RX_CLK
RXD[2]
RXD[1]
RXD[0]
RX_DV
RX_ER
RX_CLK
TXD[3]
TXD[2]
TXD[1]
TXD[0]
TX_EN
TX_ER
TX_CLK
TXD[3]
TXD[2]
TXD[1]
TXD[0]
TX_EN
TX_ER
TX_CLK
CRS
CRS
COL
COL
MDC
MDIO
MDC
MDIO
Station address logic (SAL)
The station address logic module examines the destination address field of incoming
frames, and filters the frames before they are stored in the Ethernet front-end
264
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics module
module. The filtering options, listed next, are programmed in the Station Address
Filter register (see page 301).
ꢀ
Accept frames to destination address programmed in the SA1, SA2, and SA3
ꢀ
ꢀ
ꢀ
Accept all frames
Accept all multicast frames
Accept all multicast frames using HT1 and HT2 registers. See “Sample hash
table code,” on page 334)
ꢀ
Accept all broadcast frames
The filtering conditions are independent of each other; for example, the Station
Address Logic register can be configured to accept all broadcast frames, and frames
to the programmed destination address.
MAC receiver
ꢀ
The MAC receiver provides the station address logic with a 6-bit CRC value that
is the upper 6 bits of a 32-bit CRC calculation performed on the 48-bit
multicast destination address. This 6-bit value addresses the 64-bit multicast
hash table created in the HT1 and HT2 registers. See “Sample hash table
ꢀ
If the current receive frame is a multicast frame and the 6-bit CRC addresses a
bit in the hash table that is set to 1, the receive frame is accepted; otherwise,
C code to calculate hash table entries.
Statistics module
The Statistics module counts and saves Ethernet statistics in several counters (see
The Ethernet General Control Register #2 contains three statistics module
configuration bits:
ꢀ
ꢀ
ꢀ
AUTOZ. Enable statistics counter clear on read.
CLRCNT. Clear statistics counters.
STEN. Enable statistics counters.
If any of the counters roll over, an associated carry bit is set in the Carry 1 (CAR1) or
Carry 2 (CAR2) registers (see "General Statistics registers address map," beginning
is not set in Carry Mask Register 1 or Carry Mask Register 2.
www.digiembedded.com
265
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet front-end module
The counters support a clear on read capability that is enabled when AUTOZ is set to
1 in the Ethernet General Control Register #2.
Ethernet front-end module
Ethernet front-
end module (EFE)
System Cfg
MAC Host I/F, Stat Host I/F, SAL Host I/F
To Receive/Transmit
Packet Processors
AHB
Slave
Interface
Control Registers
Status Registers
From Receive/Transmit Packet Processors
Receive Packet Processor
RX Interrupt, TX Interrupt
Rx_frame
SAL Accept/Reject
Rx Status
RX_WR
RX _RD
-AHB User I/F
-DMA Pointers
-FIFO RD Ctl
-Src Addr Filter
-FIFO WR Ctl
Rx Ctl
AHB
RX
Master
Interface
RX Data FIFO
2KB
RX Status FIFO
Rx Data
8:32
RD Data
32 entry
8
32
Transmit Packet Processor
Tx Status
TX_WR
-AHB User I/F
-FIFO WR Ctl
-RAM Ctl
TX-Buffer
Descriptor
Ram
TX_RD
-MAC TX Ctl
-FIFO RD Ctl
Tx Ctl
64 entries
SA and CTL
WR Ctl
WR Data
AHB
TX
Master
Interface
8
TX FIFO
256 Bytes
32:8
Tx Data
32
The EFE module includes a set of control and status registers, a receive packet
processor, and a transmit packet processor. On one side, the Ethernet front end
interfaces to the MAC and provides all control and status signals required by the
MAC. On the other side, the Ethernet front end interfaces to the system.
Receive packet
processor
The receive packet processor accepts good Ethernet frames (for example, valid
checksum and size) from the Ethernet MAC and commits them to external system
memory. Bad frames (for example, invalid checksum or code violation) and frames
with unacceptable destination addresses are discarded.
266
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Receive packet processor
The 2K byte RX_FIFO allows the entire Ethernet frame to be buffered while the
receive byte count is analyzed. The receive byte count is analyzed by the receive
packet processor to select the optimum-sized buffer for transferring the received
frame to system memory. The processor can use one of four different-sized receive
buffers in system memory.
Transmit packet
processor
The transmit packet processor transfers frames constructed in system memory to
the Ethernet MAC. The software initializes a buffer descriptor table in a local RAM
that points the transmit packet processor to the various frame segments in system
memory. The 256-byte TX_FIFO decouples the data transfer to the Ethernet MAC
from the AHB bus fill rate.
Receive packet processor
As a frame is received from the Ethernet MAC, it is stored in the receive data FIFO.
At the end of the frame, an accept/reject decision is made based on several
conditions. If the packet is rejected, it is flushed from the receive data FIFO.
If a frame is accepted, status signals from the MAC, including the receive size of the
frame, are stored in a separate 32-entry receive status FIFO; the RX_RD logic is
notified that a good frame is in the FIFO.
If the RX_WR logic tries to write to a full receive data FIFO anytime during the
frame, it flushes the frame from the receive data FIFO and sets RXOVFL_DATA (RX
data FIFO overflowed) in the Ethernet Interrupt Status register. For proper
operation, reset the receive packet processor using the ERX bit in the Ethernet
General Control Register #1 when this condition occurs. If the RX_WR logic tries to
write a full receive status FIFO at the end of the frame, the RX_WR logic flushes the
frame from the receive data FIFO and sets RXOVFL_STAT (RX status FIFO overflowed)
in the Ethernet Interrupt Status register.
Power down mode
The RX_WR logic supports the processor system power down and recovery
functionality. In this mode, the RX clock to the MAC and the RX_WR logic are still
active, but the clock to the RX_RD and AHB interface is disabled. This allows frames
to be received and written into the receive FIFO, but the frame remains in the FIFO
until the system wakes up. Normal frame filtering is still performed.
When a qualified frame is inserted into the receive FIFO, the receive packet
processor notifies the system power controller, which performs the wake up
sequence. The frame remains in the receive FIFO until the system wakes up.
www.digiembedded.com
267
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Receive packet processor
Transferring a
frame to system
memory
The RX_RD logic manages the transfer of a frame in the RX_FIFO to system memory.
The transfer is enabled by setting the ERXDMA (enable receive DMA) bit in Ethernet
General Control Register #1.
Transferring a frame in the receive FIFO to system memory begins when the RX_WR
logic notifies the RX_RD logic that a good frame is in the receive FIFO. Frames are
transferred to system memory using up to four rings (that is, 1, 2, or 3 rings can also
be used) of buffer descriptors that point to buffers in system memory. The
maximum frame size that each ring can accept is programmable. The first thing the
RX_RD logic does, then, is analyze the frame length in the receive status FIFO to
determine which buffer descriptor to use.
The RX_RD logic goes through the four buffer descriptors looking for the optimum
buffer size. It searches the enabled descriptors starting with A, then B, C, and
finally D; any pools that are full (that is, the F bit is set in the buffer descriptor) are
skipped. The search stops as soon as the logic encounters an available buffer that is
large enough to hold the entire receive frame.
The pointers to the first buffer descriptor in each of the four pools are found in the
related Buffer Descriptor Pointer register (RXAPTR, RXBPTR, RXCPTR, RXDPTR).
Pointers to subsequent buffer descriptors are generated by adding an offset of 0x10
from this pointer for each additional buffer used.
Receive buffer
descriptor format
31 30 29 28
16 15
Source Address
0
OFFSET + 0
Buffer Length (11 lower bits used)
Destination Address (not used)
Reserved Status
OFFSET + 4
OFFSET + 8
OFFSET + C
W
I
E
F
Receive buffer
descriptor format
description
The current buffer descriptor for each pool is kept in local registers. The current
buffer descriptor registers are initialized to the buffer descriptors pointed to by the
Buffer Descriptor Pointer registers, by setting the ERXINIT (enable initialization of
RX buffer descriptor registers) bit in Ethernet General Control Register #1. The
initialization process is complete when RXINIT (RX initialization complete) is set in
the Ethernet General Status register. At the end of a frame, the next buffer
descriptor for the ring just used is read from system memory and stored in the
registers internal to the RX_RD logic.
268
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Transmit packet processor
Receive buffer
descriptor field
definitions
Field
Description
W
WRAP bit, which, when set, tells the RX_RD logic that this is the last buffer
descriptor in the ring. In this situation, the next buffer descriptor is found using the
appropriate Buffer Descriptor Pointer register.
When the WRAP bit is not set, the next buffer descriptor is found using an offset of
0x10 from the current buffer descriptor pointer.
I
When set, tells the RX_RD logic to set RXBUFC in the Ethernet Interrupt Status
register after the frame has been transferred to system memory.
E
ENABLE bit, which, when set, tells the RX_RD logic that this buffer descriptor is
enabled. When a new frame is received, pools that do not have the ENABLE bit set
in their next buffer descriptor are skipped when deciding in which pool to put the
frame.
The receive processor can use up to four different-sized receive buffers in system
memory.
Note:
To enable a pool that is currently disabled, change the ENABLE bit from 0 to 1 and
reinitialize the buffer descriptors pointed to by the Buffer Descriptor Pointer
register:
1
7
Set the ERXINIT bit in the Ethernet General Control Register 1.
Wait for RXINIT to be set in the Ethernet General Status register.
Change the ENABLE bit only while the receive packet processor is idle.
Buffer pointer
Status
32-bit pointer to the start of the buffer in system memory. This pointer must be
aligned on a 32-bit boundary.
Lower 16 bits of the Ethernet Receive Status register. The status is taken from the
receive status FIFO and added to the buffer descriptor after the last word of the
frame is written to system memory.
F
When set, indicates the buffer is full. The RX_RD logic sets this bit after filling a
buffer. The system software clears this bit, as required, to free the buffer for future
use. When a new frame is received, pools that have the F bit set in their next buffer
descriptor are skipped when deciding in which pool to put the frame.
Buffer length
This is a dual use field:
ꢀ
When the buffer descriptor is read from system memory, buffer length
indicates the maximum sized frame, in bytes, that can be stored in this buffer
ring.
ꢀ
When the RX_RD logic writes the descriptor back from the receive status FIFO
into system memory at the end of the frame, the buffer length is the actual
frame length, in bytes.Only the lower 11 bits of this field are valid, since the
maximum legal frame size for Ethernet is 1522 bytes.
Transmit packet processor
Transmit frames are transferred from system memory to the transmit packet
processor into a 256-byte TX_FIFO. Because various parts of the transmit frame can
www.digiembedded.com
269
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Transmit packet processor
reside in different buffers in system memory, several buffer descriptors can be used
to transfer the frame.
Transmit buffer
descriptor format
All buffer descriptors (that is, up to 64) are found in a local TX buffer descriptor
RAM. This is the transmit buffer descriptor format.
31 30 29 28
16 15
Source Address
0
OFFSET + 0
Buffer Length (11-bits used)
Destination Address (not used)
Reserved Status
OFFSET + 4
OFFSET + 8
OFFSET + C
W
I
L
F
Transmit buffer
descriptor field
definitions
Field
Description
W
WRAP bit, which, when set, tells the TX_WR logic that this is the last buffer descriptor
within the continuous list of descriptors in the TX buffer descriptor RAM. The next
buffer descriptor is found using the initial buffer descriptor pointer in the TX Buffer
Descriptor Pointer register (TXPTR).
When the WRAP bit is not set, the next buffer descriptor is located at the next entry
in the TX buffer descriptor RAM.
I
When set, tells the TX_WR logic to set TXBUFC in the Ethernet Interrupt Status
register when the buffer is closed due to a normal channel completion.
Buffer pointer
Status
32-bit pointer to the start of the buffer in system memory. This pointer can be aligned
on any byte of a 32-bit word.
Lower 16 bits of the Ethernet Transmit Status register. The status is returned from
the Ethernet MAC at the end of the frame and written into the last buffer descriptor
of the frame.
L
When set, tells the TX_WR logic that this buffer descriptor is the last descriptor that
completes an entire frame. This bit allows multiple descriptors to be chained together
to make up a frame.
270
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Transmit packet processor
Field
Description
F
When set, indicates the buffer is full. The TX_WR logic clears this bit after emptying
a buffer. The system software sets this bit as required, to signal that the buffer is ready
for transmission. If the TX_WR logic detects that this bit is not set when the buffer
descriptor is read, it does one of two things:
ꢀ
If a frame is not in progress, the TX_WR logic sets the TXIDLE bit in the Ethernet
Interrupt Status register.
ꢀ
If a frame is in progress, the TXBUFNR bit in the Ethernet Interrupt Status
register is set.
In either case, the TX_WR logic stops processing frames until TCLER (clear transmit
logic) in Ethernet General Control Register #2 is toggled from low to high.
TXBUFNR is set only for frames that consist of multiple buffer descriptors and
contain a descriptor — not the first descriptor — that does not have the F bit set after
frame transmission has begun.
Buffer length
This is a dual use field:
ꢀ
When the buffer descriptor is read from the TX buffer descriptor RAM, buffer
length indicates the length of the buffer, in bytes. The TX_WR logic uses this
information to identify the end of the buffer. For proper operation of the TX_WR
logic, all transmit frames must be at least 34 bytes in length.
ꢀ
When the TX_WR logic updates the buffer descriptor at the end of the frame, it
writes the length of the frame, in bytes, into this field for the last buffer
descriptor of the frame.
If the MAC is configured to add the CRC to the frame (that is, CRCEN in MAC
Configuration Register #2 is set to 1), this field will include the four bytes of
CRC. This field is set to 0x000 for jumbo frames that are aborted. Only the
lower 11 bits of this field are valid, since the maximum legal frame size for
Ethernet is 1522 bytes.
Transmitting a
frame
Setting the EXTDMA (enable transmit DMA) bit in Ethernet General Control Register
#1 starts the transfer of transmit frames from the system memory to the TX_FIFO.
The TX_WR logic reads the first buffer descriptor in the TX buffer descriptor RAM.
ꢀ
If the F bit is set, it transfers data from system memory to the TX_FIFO using
the buffer pointer as the starting point. This process continues until the end of
the buffer is reached. The address for each subsequent read of the buffer is
incremented by 32 bytes (that is, 0x20). The buffer length field in the buffer
descriptor is decremented by this same value, each transfer, to identify when
the end of the buffer is reached.
ꢀ
If the L field in the buffer descriptor is 0, the next buffer descriptor in the RAM
continues the frame transfer until the L field in the current buffer descriptor is
1. This identifies the current buffer as the last buffer of a transmit frame.
After the entire frame has been written to the TX_FIFO, the TX_WR logic waits for a
signal from the TX_RD logic indicating that frame transmission has completed at the
MAC. The TX_WR logic updates the buffer length, status, and F fields of the current
buffer descriptor (that is, the last buffer descriptor for the frame) in the TX buffer
descriptor RAM when the signal is received.
www.digiembedded.com
271
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Transmit packet processor
The TX_WR logic examines the status received from the MAC after it has transmitted
the frame.
Frame
transmitted
successfully
If the frame was transmitted successfully, the TX_WR logic sets TXDONE (frame
transmission complete) in the Ethernet Interrupt Status register and reads the next
buffer descriptor. If a new frame is available (that is, the F bit is set), the TX_WR
starts transferring the frame. If a new frame is not available, the TX_WR logic sets
the TXIDLE (TX_WR logic has no frame to transmit) bit in the Ethernet Interrupt
Status register and waits for the software to toggle TCLER (clear transmit logic), in
Ethernet General Control Register #2, from low to high to resume processing. When
TCLER is toggled, transmission starts again with the buffer descriptor pointed to by
the Transmit Recover Buffer Descriptor Pointer register. Software should update this
register before toggling TCLER.
Frame
transmitted
unsuccessfully
If the TX_WR logic detects that the frame was aborted or had an error, the logic
updates the current buffer descriptor as described in the previous paragraph. If the
frame was aborted before the last buffer descriptor of the frame was accessed, the
result is a situation in which the status field of a buffer descriptor, which is not the
last buffer descriptor in a frame, has a non-zero value. The TX_WR logic stops
processing frames until TCLER (clear transmit logic) in Ethernet General Control
Register #2 is toggled from low to high to resume processing. The TX_WR logic also
sets TXERR (last frame not transmitted successfully) in the Ethernet Interrupt Status
register and loads the TX buffer descriptor RAM address of the current buffer
allows identification of the frame that was not transmitted successfully. As part of
the recovery procedure, software must read the TX Error Buffer Descriptor Pointer
register and then write the 8-bit address of the buffer descriptor to resume
transmission into the TX Recover Buffer Descriptor Pointer register.
Transmitting a
frame to the
Ethernet MAC
The TX_RD logic is responsible for reading data from the TX_FIFO and sending it to
the Ethernet MAC. The logic does not begin reading a new frame until the TX_FIFO
is full. This scheme decouples the data transfer to the Ethernet MAC from the fill
rate from the AHB bus. For short frames that are less than 256 bytes, the transmit
process begins when the end-of-frame signal is received from the TX_WR logic.
When the MAC completes a frame transmission, it returns status bits that are stored
field of the current buffer descriptor.
Ethernet
underrun
An Ethernet underrun can only occur due to the following programming errors:
–
Insufficient bandwidth is assigned to the Ethernet transmitter.
272
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet slave interface
–
A packet consisting of multiple, linked buffer descriptors does not have the F
bit set in any of the non-first buffer descriptors.
When an underrun occurs, it is also possible for the Ethernet transmitter to send out
a corrupted packet with a good Ethernet CRC if the MAC is configured to add the
CRC to the frame (that is, CRCEN in MAC Configuration Register #2 is set to 1).
Ethernet slave interface
The AHB slave interface supports only single 32-bit transfers. The slave interface
also supports limiting CSR and RAM accesses to CPU “privileged mode” accesses.
Use the internal register access mode bit 0 in the Miscellaneous System Configuration
register to set access accordingly (see "Miscellaneous System Configuration and
The slave also generates an AHB ERROR if the address is not aligned on a 32-bit
boundary, and the misaligned bus address response mode is set in the Miscellaneous
System Configuration register. In addition, accesses to non-existent addresses result
in an AHB ERROR response.
Interrupts
Separate RX and TX interrupts are provided back to the system.
Interrupt sources
This table shows all interrupt sources and the interrupts to which they are assigned.
Interrupt condition Description
RX data FIFO overflow RX data FIFO overflowed.
Interrupt
RX
For proper operation, reset the receive packet processor using the
ERX bit in the Ethernet General Control Register #1 when this
condition occurs.
RX status FIFO overflow RX status overflowed.
RX
RX
RX
Receive buffer closed
I bit set in receive buffer descriptor and buffer closed.
Receive complete (Pool
A)
Complete receive frame stored in pool A of system memory.
Complete receive frame stored in pool B of system memory.
Complete receive frame stored in pool C of system memory.
Complete receive frame stored in pool D of system memory.
Receive complete (Pool
B)
RX
RX
RX
Receive complete (Pool
C)
Receive complete (Pool
D)
www.digiembedded.com
273
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Resets
Interrupt condition Description
Interrupt
No receive buffers
Receive buffers full
RX buffer ready
No buffer is available for this frame because all 4 buffer rings are RX
disabled, full, or no available buffer is big enough for the frame.
No buffer is available for this frame because all 4 buffers are
disabled or full.
RX
Frame available in RX_FIFO. (Used for diagnostics.)
RX
TX
Statistics counter
overflow
One of the statistics counters has overflowed. Individual
counters can be masked using the CAM1 and CAM2 registers.
Transmit buffer closed
I bit set in Transmit buffer descriptor and buffer closed.
TX
TX
Transmit buffer not ready F bit not set in transmit buffer descriptor when read from TX
buffer descriptor RAM, for a frame in progress.
Transmit complete
TXERR
Frame transmission complete.
TX
TX
Frame not transmitted successfully.
TXIDLE
TX_WR logic in idle mode because there are no frames to send. TX
Status bits
The status bits for all interrupts are available in the Ethernet Interrupt Status
register, and the associated enables are available in the Ethernet Interrupt Enable
register. Each interrupt status bit is cleared by writing a 1 to it.
Resets
This table provides a summary of all resets used for the Ethernet front-end and
MAC, as well as the modules the resets control.
Bit field
ERX
Register
Active
state
Default
state
Modules reset
RX_RD, RX_WR
TX_RD, TX_WR
Ethernet General Control
Register #1
0
0
1
0
0
0
ETX
Ethernet General Control
Register #1
MAC_HRST Ethernet General Control
Register #1
MAC, STAT, RX_WR, TX_RD,
programmable registers in Station
Address Logic
SRST
MAC1
1
1
MAC (except programmable
registers), Station Address Logic
(except programmable registers),
RX_WR, TX_RD
RPERFUN
RPEMCST
MAC1
MAC1
1
1
0
0
MAC RX logic
MAC PEMCS (TX side)
274
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Multicast address filtering
Bit field
Register
Active
state
Default
state
Modules reset
RPETFUN
MIIM
MAC1
1
1
0
0
MAC TX logic
MII Management
MAC MIIM logic
Configuration register
Multicast address filtering
The RX-WR logic contains a programmable 8-entry multicast address filter that
provides more restrictive filtering than that available in the MAC using the SAL. Only
multicast addresses that match those programmed into the filter will be accepted.
Filter entries
Each entry in the filter consists of a 48-bit destination address, an enable bit, and a
48-bit mask. The mask contains a 1 in each bit position of the address that is used in
the address filter.; this is used to extend the range of each entry.
Multicast address
filter registers
Register
Description
MFILTL [7:0]
MFILTH [7:0]
MCMSKL
Lower 32 bits of multicast address
Upper 16 bits of multicast address
Lower 32 bits of multicast address mask
Upper 16 bits of multicast address
Per-entry enable bits
MCMSKH [7:0]
MFILTEN
Multicast address
filtering example
1
To accept only multicast packets with destination address 0x01_00_5E_00_00_00
using entry 0, the registers are set as shown:
Register
MFILTEN
MFILTL0
MFILTH0
MCMSKL0
Value
Function
0x1
Enable entry 0
0x5E_00_00_00
0x01_00
Lower 32 bits of multicast address
Upper 16 bits of multicast address
0xFFFF_FFFF
Include all of the lower 32 bits of the multicast address
in the comparison.
MCMSKH0
0xFFFF
Include all of the upper 16 bits of the multicast address
in the comparison
www.digiembedded.com
275
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Clock synchronization
Multicast address
filtering example
2
To accept multicast packets with destination addresses in the range of
0x01_00_5E_00_00_00 to 0x01_00_5E_00_00_0f using entry 4, the registers are set as
shown:
Register
MFILTEN
MFILTL4
MFILTH4
MCMSKL4
Value
Function
0x10
Enable entry 4
0x5E_00_00_00
0x01_00
Lower 32 bits of multicast address
Upper 16 bits of multicast address
0xFFFF_FFF0
Include only bits [31:04] of the lower 32 bits of the
multicast address in the comparison.
MCMSKH4
0xFFFF
Include all of the upper 16 bits of the multicast address
in the comparison
Notes
ꢀ
ꢀ
If any of the address filter entries are enabled, the SAL must be set up to
accept all multicast packets by setting the PRM bit in the Station Address Filter
register.
Runt packets that are less than 6 bytes, and therefore do not have a valid
destination address, are automatically discarded by the multicast address
filtering logic.
Clock synchronization
The multicast filtering logic resides in the RX CLK domain, but all of the registers
are controlled in the AHB clock domain. To provide traditional dual-rank clock
synchronization flops for each bit of the five Multicast Address Filter registers
consumes a large amount of gates. Therefore, the logic is designed such that only
the MFILTEN register bits are synchronized and when these bits are cleared, changes
in the other register values are not seen at the input of any internal flops in the RX
CLK domain.
Writing to other
registers
Use these steps to dynamically write to any of the other Multicast Address Filter
registers:
1
Clear the enable bit in the MFILTEN register for the address filter you want to
change.
2
3
Update the address filter registers for the disable filter.
Set the enable bit for the address filter that was just changed.
If the address filters are changed only when the RX_WR logic is reset or not
processing frames, as recommended, the address filter registers can be updated
without using this procedure.
276
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet Control and Status registers
Ethernet Control and Status registers
All configuration registers must be accessed as 32-bit words and as single accesses
only. Bursting is not allowed.
Register address
Address
Register
EGCR1
EGCR2
EGSR
Description
filter
A060 0000
A060 0004
A060 0008
A060 000C–A060 0014
A060 0018
A060 001C
A060 0400
A060 0404
A060 0408
A060 040C
A060 0410
A060 0414
A060 0418–A060 041C
A060 0420
A060 0424
A060 0428
A060 042C
A060 0430
A060 0434
A060 0440
A060 0444
A060 0448
A060 0500
A060 0504
A060 0508
A060 0680
A060 0A00
A060 0A04
A060 0A08
Ethernet General Control Register #1
Ethernet General Control Register #2
Ethernet General Status register
Reserved
ETSR
ERSR
MAC1
MAC2
IPGT
Ethernet Transmit Status register
Ethernet Receive Status register
MAC Configuration Register #1
MAC Configuration Register #2
Back-to-Back Inter-Packet-Gap register
Non-Back-to-Back Inter-Packet-Gap register
Collision Window/Retry register
Maximum Frame register
IPGR
CLRT
MAXF
Reserved
MCFG
MCMD
MADR
MWTD
MRDD
MIND
SA1
MII Management Configuration register
MII Management Command register
MII Management Address register
MII Management Write Data register
MII Management Read Data register
MII Management Indicators register
Station Address Register #1
SA2
Station Address Register #2
SA3
Station Address register #3
SAFR
HT1
Station Address Filter register
Hash Table Register #1
HT2
Hash Table Register #2
STAT
RXAPTR
RXBPTR
RXCPTR
Statistics Register Base (45 registers)
RX_A Buffer Descriptor Pointer register
RX_B Buffer Descriptor Pointer register
RX_C Buffer Descriptor Pointer register
www.digiembedded.com
277
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet Control and Status registers
Address
Register
RXDPTR
EINTR
Description
A060 0A0C
A060 0A10
A060 0A14
A060 0A18
A060 0A1C
A060 0A20
A060 0A24
A060 0A28
A060 0A2C
A060 0A30
A060 0A34
A060 0A38
A060 0A3C
A060 0A40
A060 0A44
A060 0A48
A060 0A4C
A060 0A50
A060 0A54
A060 0A58
A060 0A5C
A060 0A60
A060 0A64
A060 0A68
A060 0A6C
A060 0A70
A060 0A74
A060 0A78
A060 0A7C
A060 0A80
A060 0A84
A060 0A88
A060 0A8C
RX_D Buffer Descriptor Pointer register
Ethernet Interrupt Status register
EINTREN
TXPTR
Ethernet Interrupt Enable register
TX Buffer Descriptor Pointer register
TX Recover Buffer Descriptor Pointer register
TX Error Buffer Descriptor Pointer register
TX Stall Buffer Descriptor Pointer register
RX_A Buffer Descriptor Pointer Offset register
RX_B Buffer Descriptor Pointer Offset register
RX_C Buffer Descriptor Pointer Offset register
RX_D Buffer Descriptor Pointer Offset register
Transmit Buffer Descriptor Pointer Offset register
RX Free Buffer register
TXRPTR
TXERBD
TXSPTR
RXAOFF
RXBOFF
RXCOFF
RXDOFF
TXOFF
RXFREE
MFILTL0
MFILTL1
MFILTL2
MFILTL3
MFILTL4
MFILTL5
MFILTL6
MFILTL7
MFILTH0
MFILTH1
MFILTH2
MFILTH3
MFILTH4
MFILTH5
MFILTH6
MFILTH7
MFMSKL0
MFMSKL1
MFMSKL2
MFMSKL3
Multicast Low Address Filter Register 0
Multicast Low Address Filter Register 1
Multicast Low Address Filter Register 2
Multicast Low Address Filter Register 3
Multicast Low Address Filter Register 4
Multicast Low Address Filter Register 5
Multicast Low Address Filter Register 6
Multicast Low Address Filter Register 7
Multicast High Address Filter Register 0
Multicast High Address Filter Register 1
Multicast High Address Filter Register 2
Multicast High Address Filter Register 3
Multicast High Address Filter Register 4
Multicast High Address Filter Register 5
Multicast High Address Filter Register 6
Multicast High Address Filter Register 7
Multicast Low Address Mask Register 0
Multicast Low Address Mask Register 1
Multicast Low Address Mask Register 2
Multicast Low Address Mask Register 3
278
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet General Control Register #1
Address
Register
MFMSKL4
MFMSKL5
MFMSKL6
MFMSKL7
MFMSKH0
MFMSKH1
MFMSKH2
MFMSKH3
MFMSKH4
MFMSKH5
MFMSKH6
MFMSKH7
MFILTEN
TXBD
Description
A060 0A90
A060 0A94
A060 0A98
A060 0A9C
A060 0AA0
A060 0AA4
A060 0AA8
A060 0AAC
A060 0AB0
A060 0AB4
A060 0AB8
A060 0ABC
A060 0AC0
A060 1000
A060 2000
Multicast Low Address Mask Register 4
Multicast Low Address Mask Register 5
Multicast Low Address Mask Register 6
Multicast Low Address Mask Register 7
Multicast High Address Mask Register 0
Multicast High Address Mask Register 1
Multicast High Address Mask Register 2
Multicast High Address Mask Register 3
Multicast High Address Mask Register 4
Multicast High Address Mask Register 5
Multicast High Address Mask Register 6
Multicast High Address Mask Register 7
Multicast Address Filter Enable Register
TX Buffer Descriptor RAM (256 locations)
RX FIFO RAM (512 locations)
RXRAM
Ethernet General Control Register #1
Address: A060 0000
Register
31
30
29
28
27
26
25
24
23
22
21
20
19
18
2
17
16
0
Reser
ved
Not
used used
Not
ERXDMA
ERXSHT
ETXDMA
ERXINIT
ERX
Not used
ETX
Reserved
15
14
13
12
11
10
9
8
7
6
5
4
3
1
Not
used
RXSH RXALI MAC_
FT GN HRST
ITXA RXRAM
Reserved
Reserved
www.digiembedded.com
279
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet General Control Register #1
Register bit
assignment
Bits
Access
Mnemonic Reset Description
D31
R/W
ERX
0
Enable RX packet processing
0
1
Reset RX
Enable RX
Used as a soft reset for the RX. When cleared, resets all
logic in the RX and flushes the FIFO.
The ERX bit must be set active high to allow data to be
received from the MAC receiver.
D30
R/W
ERXDMA
0
Enable receive DMA
0
Disable receive DMA data request (use to stall
receiver)
1
Enable receive DMA data request
Must be set active high to allow the RX_RD logic to request
the AHB bus to DMA receive frames into system memory.
Set this bit to zero to temporarily stall the receive side
Ethernet DMA. The RX_RD logic stalls on frame
boundaries.
D29
D28
N/A
R/W
Reserved
ERXSHT
N/A
0
N/A
Accept short (<64) receive frames
0
1
Do not accept short frames
Accept short frames
When set, allows frames that are smaller than 64 bytes to
be accepted by the RX_WR logic.
ERXSHT is typically set for debugging only.
Always write as 0.
D27:24
D23
R/W
R/W
Not used
ETX
0
0
Enable TX packet processing
0
1
Reset TX
Enable TX
Used as a soft reset for the TX. When cleared resets all
logic in the TX and flushes the FIFOs.
ETX must be set active high to allow data to be sent to the
MAC and to allow processor access to the TX buffer
descriptor RAM.
280
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet General Control Register #1
Bits
Access
Mnemonic Reset Description
D22
R/W
ETXDMA
0
Enable transmit DMA
0
Disable transmit DMA data request (use to stall
transmitter)
1
Enable transmit DMA data request
Must be set active high to allow the transmit packet
processor to issue transmit data requests to the AHB
interface.
Set this bit to 0 to temporarily stall frame transmission,
which always stalls at the completion of the current frame.
The 8-bit address of the next buffer descriptor to be read in
the TX buffer descriptor RAM is loaded into the TXSPTR
register when the transmit process ends.
If the transmit packet processor already is stalled and
waiting for TCLER, clearing ETXDMA will not take
effect until TCLER has been toggled.
This bit generally should be set after the Ethernet transmit
parameters (for example, buffer pointer descriptor) are
programmed into the transmit packet processor.
D21
D20
D19
R/W
R/W
R/W
Not used
Not used
ERXINIT
1
0
0
Always write as 1.
Always write as 0.
Enable initialization of RX buffer descriptors
0
1
Do not initialize
Initialize
When set, causes the RX_RD logic to initialize the internal
buffer descriptor registers for each of the four pools from
the buffer descriptors pointed to by RXAPTR, RXBPTR,
RXCPTR, and RXDPTR. This is done as part of the RX
initialization process. RXINIT is set in the Ethernet
General Status register when the initialization process is
complete, and ERXINIT must be cleared before enabling
frame reception from the MAC.
The delay from ERXINIT set to RXINIT set is less than
five microseconds.
D18:13
D12
N/A
R/W
R/W
Reserved
Not used
RXSHFT
N/A
0
N/A
Always write as 0.
Shift RX data
D11
0
0
Standard receive format. No padding bytes added
before receive frame data
1
The receiver inserts 2 bytes of padding before the first
byte of the receive data, to create longword alignment
of the payload.
www.digiembedded.com
281
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet General Control Register #2
Bits
Access
Mnemonic Reset Description
D10
R/W
RXALIGN
MAC_HRST
ITXA
0
1
0
Align RX data
0
Standard receive format. The data block immediately
follows the 14-byte header block.
1
The receiver inserts a 2-byte padding between the 14-
byte header and the data block, causing longword
alignment for both the header and data blocks.
D09
D08
R/W
R/W
MAC host interface soft reset
0
Restore MAC, STAT, SAL, RX_WR, and TX_RD to
normal operation.
1
Reset MAC, STAT, programmable registers in SAL,
RX_WR, and TX_RD. Keep high for minimum of
5μsec to guarantee that all functions get reset.
Insert transmit source address
0
Source address for Ethernet transmit frame taken from
data in TX_FIFO.
1
Insert the MAC Ethernet source address into the
Ethernet transmit frame source address field.
Set to force the MAC to automatically insert the Ethernet
MAC source address into the Ethernet transmit frame
source address. The SA1, SA2, and SA3 registers provide
the address information. When the ITXA bit is cleared, the
Ethernet MAC source address is taken from the data in the
TX_FIFO.
D07
R/W
N/A
RXRAM
Reserved
1
RX FIFO RAM access
0
1
CPU access to the RX FIFO RAM is disabled
CPU access to the RX FIFO RAM is enabled
D06:00
N/A
N/A
Ethernet General Control Register #2
Address: A060 0004
Register
31
15
30
14
29
13
28
27
26
10
25
9
24
23
22
6
21
20
4
19
18
17
16
Not used
12
11
8
7
5
3
2
1
0
CLRCNT
Not used
TCLER
Not used
TKICK AUTOZ
STEN
282
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet General Status register
Register bit
assignment
Bits
Access Mnemonic Reset Description
D31:08
D07
R/W
R/W
Not used
TCLER
0
0
Always write as 0.
Clear transmit error
0ꢀ1 transition: Clear transmit error.
Clears out conditions in the transmit packet processor that
have caused the processor to stop and require assistance
from software before the processor can be restarted (for
example, an AHB bus error or the TXBUFNR bit set in the
Ethernet Interrupt Status register).
Toggle this bit from low to high to restart the transmit
packet processor.
D06:04
D03
R/W
R/W
Not used
TKICK
0
0
Always write as 0.
Transmit DMA state machine enable
0ꢀ1 transition, used by software to start a DMA transfer
after a buffer descriptor has been updated.
D02
R/W
AUTOZ
0
Enable statistics counter clear on read
0
1
No change in counter value after read
Counter cleared after read
When set, configures all counters in the Statistics module
to clear on read.
If AUTOZ is not set, the counters retain their value after a
read. The counters can be cleared by writing all zeros.
D01
D00
R/W
R/W
CLRCNT
STEN
1
0
Clear statistics counters
0
1
Do not clear all counters
Clear all counters
When set, synchronously clears all counters in the
Statistics module.
Enable statistics counters
0
1
Counters disabled
Counters enabled
When set, enables all counters in the Statistics module. If
this bit is cleared, the counters will not update.
Ethernet General Status register
Address: A060 0008
www.digiembedded.com
283
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet Transmit Status register
Register
31
15
30
14
29
13
28
12
27
11
26
25
9
24
8
23
7
22
6
21
5
20
19
3
18
17
1
16
0
RX
INIT
Reserved
Reserved
10
4
2
Reserved
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:21
D20
N/A
R/C
Reserved
RXINIT
N/A
0x0
N/A
RX initialization complete
Set when the RX_RD logic has completed the
initialization of the local buffer descriptor registers
requested when ERXINIT in Ethernet General
Control Register #1 is set. The delay from ERXINIT
set to RXINIT set is less than five microseconds.
D19:00
N/A
Reserved
N/A
N/A
Ethernet Transmit Status register
Address: A060 0018
The Ethernet Status register contains the status for the last transmit frame. The
completion of a transmit frame and the Ethernet Transmit Status register is loaded
at the same time. Bits [15:0] are also loaded into the Status field of the last
transmit buffer descriptor for the frame.
Register
31
30
29
28
27
26
25
24
23
22
21
20
19
3
18
17
16
0
Reserved
15
14
13
12
11
10
9
8
7
6
5
4
2
1
TX
OK
TX
BR
TX
MC
TX
AL
TX
AED
TX
AEC
TX
AUR
TX
AJ
Not
used
TX
DEF
TX
CRC
Not
used
TXCOLC
284
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet Transmit Status register
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:16
D15
N/A
R
Reserved
TXOK
N/A
0x0
Frame transmitted OK
When set, indicates that the frame has been delivered to
and emptied from the transmit FIFO without problems.
D14
D13
D12
R
R
R
TXBR
TXMC
TXAL
0x0
0x0
0x0
Broadcast frame transmitted
When set, indicates the frame’s destination address was
a broadcast address.
Multicast frame transmitted
When set, indicates the frame’s destination address was
a multicast address.
TX abort — late collision
When set, indicates that the frame was aborted due to a
collision that occurred beyond the collision window set
in the Collision Window/Retry register. If this bit is set,
the TX_WR logic stops processing frames and sets the
TXERR bit in the Ethernet Interrupt Status register.
D11
R
TXAED
0x0
TX abort — excessive deferral
When set, indicates that the frame was deferred in
excess of 6071 nibble times in 100 Mbps or 24,287
times in 0 Mbps mode. This causes the frame to be
aborted if the excessive deferral bit is set to 0 in MAC
Configuration Register #2. If TXAED is set, the
TX_WR logic stops processing frames and sets the
TXERR bit in the Ethernet Interrupt Status register.
D10
D09
R
R
TXAEC
TXAUR
0x0
0x0
TX abort — excessive collisions
When set, indicates that the frame was aborted because
the number of collisions exceeded the value set in the
Collision Window/Retry register. If this bit is set, the
TX_WR logic stops processing frames and sets the
TXERR bit in the Ethernet Interrupt Status register.
TX abort — underrun
When set, indicates that the frame was aborted because
the TX_FIFO had an underrun. If this bit is set, the
TX_WR logic stops processing frames and sets the
TXERR bit in the Ethernet Interrupt Status register.
www.digiembedded.com
285
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet Receive Status register
Bits
Access Mnemonic Reset
Description
D08
R
TXAJ
0x0
TX abort — jumbo
When set, indicates that the frame’s length exceeded
the value set in the Maximum Frame register. TXAJ is
set only if the HUGE bit in MAC Configuration
Register #2 is set to 0.
Jumbo frames result in the TX buffer descriptor buffer
length field being set to 0x000.
If the HUGE bit is set to 0, the frame is truncated. If
TXAJ is set, the TX_WR logic stops processing frames
and sets the TXERR bit in the Ethernet Interrupt Status
register.
D07
D06
R
R
Not used
TXDEF
0x0
0x0
Always set to 0.
Transmit frame deferred
When set, indicates that the frame was deferred for at
least one attempt, but less than the maximum number
for an excessive deferral. TXDEF is also set when a
frame was deferred due to a collision.
This bit is not set for late collisions.
D05
R
TXCRC
0x0
Transmit CRC error
When set, indicates that the attached CRC in the frame
did not match the internally-generated CRC. This bit is
not set if the MAC is inserting the CRC in the frame
(that is, the CRCEN bit is set in MAC Configuration
Register #2). If TXCRC is set, the TX_WR logic stops
processing frames and sets the TXERR bit in the
Ethernet Interrupt Status register.
D04
R
R
Not used
0x0
0x0
Always set to 0.
D03:00
TXCOLC
Transmit collision count
Number of collisions the frame incurred during
transmission attempts.
Ethernet Receive Status register
Address: A060 001C
The Ethernet Receive Status register contains the status for the last completed
receive frame. The RXBR bit in the Ethernet Interrupt Status register (see page 317)
is set whenever a receive frame is completed and the Ethernet Receive Status
register is loaded at the same time. Bits [15:0] are also loaded into the status field
of the receive buffer descriptor used for the frame.
286
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet Receive Status register
Register
31
15
30
14
29
28
12
27
11
26
10
25
9
24
8
23
7
22
21
20
4
19
3
18
2
17
1
16
0
Reserved
RXSIZE
13
6
5
RXCE RXDV RXOK RXBR RXMC Rsvd RXDR
Reserved
RXSHT
Reserved
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:27
D26:16
N/A
R
Reserved
RXSIZE
N/A
N/A
0x000
Receive frame size in bytes
Length of the received frame, in bytes.
D15
R
RXCE
0x0
Receive carrier event previously seen
When set, indicates that a carrier event activity (an
activity on the receive channel that does not result in
a frame receive attempt being made) was found at
some point since the last receive statistics. A carrier
event results when the interface signals to the PHY
have the following values:
MRXER = 1
MRXDV = 0
RXD = 0xE
The event is being reported with this frame, although
it is not associated with the frame.
D14
D13
R
R
RXDV
RXOK
0x0
0x0
Receive data violation event previously seen
Set when the last receive event was not long enough
to be a valid frame.
Receive frame OK
Set when the frame has a valid CRC and no symbol
errors.
D12
D11
R
R
RXBR
RXMC
0x0
0x0
Receive broadcast frame
Set when the frame has a valid broadcast address.
Receive multicast frame
Set when the frame has a valid multicast address.
D10
D09
N/A
R
Reserved
RXDR
N/A
0x0
N/A
Receive frame has dribble bits
Set when an additional 1–7 bits are received after the
end of the frame.
D08:07
N/A
Reserved
N/A
N/A
www.digiembedded.com
287
E T H E R N E T C O M M U N I C A T I O N M O D U L E
MAC Configuration Register #1
Bits
Access Mnemonic Reset
Description
D06
R
RXSHT
0x0
Receive frame is too short
Set when the frame’s length is less than 64 bytes.
Short frames are accepted only when the ERXSHT
bit is set to 1 in Ethernet General Control Register #1.
D05:00
N/A
Reserved
N/A
N/A
MAC Configuration Register #1
Address: A060 0400
MAC Configuration Register #1 provides bits that control functionality within the
Ethernet MAC block.
Register
31
30
29
28
27
26
25
24
23
22
21
5
20
19
3
18
17
1
16
Reserved
15
14
13
12
11
10
9
8
7
6
4
2
0
Not
used
Not
used
RPER
FUN
RPE
MCST FUN
RPET
LOOP
BK
SRST
Reserved
Reserved
Not used
RXEN
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:16
D15
N/A
R/W
Reserved
SRST
N/A
1
Soft reset
Set this bit to 1 to reset the RX_WR, TX_RD, MAC
(except host interface), SAL (except host interface).
D14
R/W
N/A
R/W
R/W
Not used
Reserved
Not used
RPERFUN
0
Always write as 0.
N/A
D13:12
D11
N/A
0
Always write as 0.
D10
0
Reset PERFUN
Set this bit to 1 to put the MAC receive logic into reset.
D09
R/W
RPEMCST
0
Reset PEMCS/TX
Set this bit to 1 to put the MAC control
sublayer/transmit domain logic into reset.
D08
R/W
N/A
RPETFUN
Reserved
0
Reset PETFUN
Set this bit to 1 to put the MAC transmit logic into reset.
D07:05
N/A
N/A
288
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
MAC Configuration Register #2
Bits
Access Mnemonic Reset
Description
D04
R/W
LOOPBK
0
Internal loopback
Set this bit to 1 to cause the MAC transmit interface to
be internally looped back to the MAC receive interface.
Clearing this bit results in normal operation.
Always write as 0.
D03:01
D00
R/W
R/W
Not used
RXEN
0
0
Receive enable
Set this bit to 1 to allow the MAC receiver to receive
frames.
MAC Configuration Register #2
Address: A060 0404
MAC Configuration Register #2 provides additional bits that control functionality
within the Ethernet MAC block.
Register
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Reserved
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
EDE
FER
Not
used
Not
used
Not
used
Rsvd
NOBO
Reserved
LONGP PUREP AUTOP VLANP PADEN CRCEN
HUGE
FULLD
Register bit
assignment
Bits
Access Mnemonic Reset Definition
D31:15
D14
N/A
R/W
Reserved
EDEFER
N/A
0
N/A
Excess deferral
0
1
The MAC aborts when the excessive deferral limit is
reached (that is, 6071 nibble times in 100 Mbps mode
or 24,287 bit times in 10 Mbps mode).
Enables the MAC to defer to carrier indefinitely, as
per the 802.3u standard.
D13
D12
R/W
R/W
Not used
NOBO
0
0
Always write to 0.
No backoff
When this bit is set to 1, the MAC immediately
retransmits following a collision, rather than using the
binary exponential backoff algorithm (as specified in the
802.3u standard).
D11:10
N/A
Reserved
N/A
N/A
www.digiembedded.com
289
E T H E R N E T C O M M U N I C A T I O N M O D U L E
MAC Configuration Register #2
Bits
Access Mnemonic Reset Definition
D09
R/W
LONGP
0
Long preamble enforcement
0
Allows any length preamble (as defined in the 802.3u
standard).
1
The MAC allows only receive frames that contain
preamble fields less than 12 bytes in length.
D08
D07
R/W
R/W
PUREP
AUTOP
0
0
Pure preamble enforcement
0
1
No preamble checking is performed
The MAC certifies the content of the preamble to
ensure that it contains 0x55 and is error-free.
Auto detect pad enable
When set to 1, this bit causes the MAC to detect
automatically the type of transmit frame, either tagged or
untagged, by comparing the two octets following the
source address with the 0x8100 VLAN protect ID and pad
accordingly.
Note:
This bit is ignored if PADEN is set
to 0.
See “PAD operation table for transmit frames” below.
D06
R/W
VLANP
0
VLAN pad enable
Set to 1 to have the MAC pad all short transmit frames to
64 bytes and to append a valid CRC. This bit is used in
conjunction with auto detect pad enable (AUTOP) and
pad/CRC enable (PADEN). See “PAD operation table for
transmit frames” below. This bit is ignored if PADEN is
set to 0.
D05
D04
R/W
R/W
PADEN
CRCEN
0
0
Pad/CRC enable
0
1
Short transmit frames not padded.
The MAC pads all short transmit frames.
This bit is used in conjunction with auto detect pad enable
(AUTOP) and VLAN pad enable (VLANP). See “PAD
operation table for transmit frames” below.
CRC enable
0
Transmit frames presented to the MAC contain a
CRC.
1
Append a CRC to every transmit frame, whether
padding is required or not.
CRCEN must be set if PADEN is set to 1.
D03
D02
R/W
R/W
Not used
HUGE
0
0
Always write as 0.
Huge frame enable
0
Transmit and receive frames are limited to the MAXF
value in the Maximum Frame register.
1
Frames of any length are transmitted and received.
290
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Back-to-Back Inter-Packet-Gap register
Bits
D01
D00
Access Mnemonic Reset Definition
R/W
R/W
Not used
FULLD
0
0
Always write as 0.
Full-duplex
0
1
The MAC operates in half-duplex mode.
The MAC operates in full-duplex mode.
PAD operation
table for transmit
frames
Type
Any
Any
Any
Any
AUTOP
VLANP
PADEN
Action
X
0
X
0
0
1
1
1
No pad; check CRC
Pad to 60 bytes; append CRC
Pad to 64 bytes; append CRC
X
1
1
0
If untagged, pad to 60 bytes; append CRC
If VLAN tagged, pad to 64 bytes; append CRC
Back-to-Back Inter-Packet-Gap register
Address: A060 0408
Register
31
15
30
14
29
13
28
12
27
26
10
25
9
24
23
22
6
21
5
20
4
19
18
2
17
1
16
0
Reserved
11
8
7
3
Reserved
IPGT
www.digiembedded.com
291
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Non Back-to-Back Inter-Packet-Gap register
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:07
D06:00
N/A
R/W
Reserved
IPGT
N/A
N/A
0x00
Back-to-back inter-packet-gap
Programmable field that indicates the nibble time offset
of the minimum period between the end of any
transmitted frame to the beginning of the next frame.
Full-duplex mode
ꢀ
ꢀ
Register value should be the appropriate period in
nibble times minus 3.
Recommended setting is 0x15 (21d), which
represents the minimum IPG of 0.96 uS (in 100
Mbps) or 9.6uS (in 10 Mbps).
Half-duplex mode
ꢀ
Register value should be the appropriate period in
nibble times minus 6.
ꢀ
Recommended setting is 0x12 (18d), which
represents the minimum IPG of 0.96 uS (in 100
Mbps) or 9.6 uS (in 10 Mbps).
Non Back-to-Back Inter-Packet-Gap register
Address: A060 040C
Register
31
30
14
29
13
28
12
27
26
10
25
9
24
23
22
6
21
5
20
4
19
18
2
17
1
16
0
Reserved
15
11
8
7
3
Rsvd
IPGR1
Rsvd
IPGR2
292
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Collision Window/Retry register
Register bit assignment
Bits
Access Mnemonic Reset
Description
D31:15
D14:08
N/A
R/W
Reserved
IPGR1
N/A
N/A
0x00
Non back-to-back inter-packet-gap part 1
Programmable field indicating optional carrierSense
window (referenced in IEEE 8.2.3/4.2.3.2.1).
ꢀ
If carrier is detected during the timing of IPGR1, the
MAC defers to carrier.
ꢀ
If carrier comes after IPGR1, the MAC continues
timing IPGR2 and transmits — knowingly causing
a collision. This ensures fair access to the medium.
IPGR1’s range of values is 0x0 to IPGR2. The
recommended value is 0xC.
D07
N/A
R/W
Reserved
IPGR2
N/A
N/A
D06:00
0x00
Non back-to-back inter-packet-gap part 2
Programmable field indicating the non back-to-back
inter-packet-gap. The recommended value for this field
is 0x12 (18d), which represents the minimum IPG of 0.96
μS in 100 Mbps or 9.6 μS in 10 Mbps.
Collision Window/Retry register
Address: A060 0410
Register
31
30
29
13
28
12
27
26
10
25
9
24
23
22
21
20
4
19
3
18
2
17
1
16
0
Reserved
15
14
11
8
7
6
5
Reserved
CWIN
Reserved
RETX
www.digiembedded.com
293
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Maximum Frame register
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:14
D13:08
N/A
R/W
Reserved
CWIN
N/A
0x37
Collision window
Programmable field indicating the slot time or collision
window during which collisions occur in properly
configured networks. Because the collision window
starts at the beginning of transmissions, the preamble
and SFD (start-of-frame delimiter) are included.
The default value (0x37 (55d)) corresponds to the frame
byte count at the end of the window.
D07:04
D03:00
N/A
R/W
Reserved
RETX
N/A
0xF
N/A
Retransmission maximum
Programmable field specifying the number of
retransmission attempts following a collision before
aborting the frame due to excessive collisions. The
802.3u standard specifies the attemptLimit to be 0xF (15d).
Maximum Frame register
Address: A060 0414
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
8
7
MAXF
294
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
MII Management Configuration register
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:16
D15:00
N/A
R/W
Reserved
MAXF
N/A
0x0600
Maximum frame length
Default value of 0x600 represents a maximum receive
frame of 1536 octets.
An untagged maximum-size Ethernet frame is 1518
octets. A tagged frame adds four octets for a total of
1522 octets. To use a shorter maximum length
restriction, program this field accordingly.
Note:
If a proprietary header is allowed, this field
should be adjusted accordingly. For exam-
ple, if 4-byte proprietary headers are
prepended to the frames, the MAXF value
should be set to 1526 octets. This allows
the maximum VLAN tagged frame plus the
4-byte header.
MII Management Configuration register
Address: A060 0420
Register
31
30
14
29
13
28
12
27
11
26
25
24
23
22
6
21
5
20
4
19
18
2
17
16
0
Reserved
15
10
9
8
7
3
1
Not
used
SPRE
RMIIM
Reserved
CLKS
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:16
D15
N/A
R/W
Reserved
RMIIM
N/A
0
N/A
Reset MII management block
Set this bit to 1 to reset the MII Management module.
D14:05
N/A
Reserved
N/A
N/A
www.digiembedded.com
295
E T H E R N E T C O M M U N I C A T I O N M O D U L E
MII Management Command register
Bits
Access Mnemonic Reset
Description
D04:02
R/W
CLKS
0x0
Clock select
Used by the clock divide logic in creating the MII
management clock, which (per the IEEE 802.3u
standard) can be no faster than 2.5 MHz.
Note:
Some PHYs support clock rates up to 12.5
MHz.
The AHB bus clock is used as the input to the clock
settings that can be used with AHB clock (hclk)
frequencies.
D01
D00
R/W
R/W
SPRE
0
0
Suppress preamble
0
1
Causes normal cycles to be performed
Causes the MII Management module to perform
read/write cycles without the
32-bit preamble field. (Preamble suppression is
supported by some PHYs.)
Not used
Always write to 0.
Clocks field
settings
CLKS field Divisor
AHB bus clock for 2.5 MHz
(max) MII management clock (max) MII management clock
AHB bus clock for 12.5 MHz
000
001
010
011
100
101
110
111
4
4
37.5 MHz
74.9 MHz
6
8
10
20
30
40
37.5 MHz
74.9 MHz
MII Management Command register
Address: A060 0424
296
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
MII Management Address register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
16
Reserved
8
1
0
SCAN
Reserved
READ
Register bit
assignment
Note: If both SCAN and READ are set, SCAN takes precedence.
Bits
Access Mnemonic Reset
Description
D31:02
D01
N/A
R/W
Reserved
SCAN
N/A
0
N/A
Automatically scan for read data
Set to 1 to have the MII Management module perform
read cycles continuously. This is useful for
monitoring link fail, for example.
Note:
SCAN must transition from a 0 to a 1 to
initiate the continuous read cycles.
D00
R/W
READ
0
Single scan for read data
Set to 1 to have the MII Management module perform
a single read cycle. The read data is returned in the
MII Management Read Data register after the BUSY
bit in the MII Management Indicators register has
returned to a value of 0.
Note:
READ must transition from a 0 to a 1 to
initiate a single read cycle.
MII Management Address register
Address: A060 0428
Register
31
15
30
29
13
28
12
27
11
26
25
9
24
23
22
21
5
20
4
19
3
18
17
1
16
0
Reserved
14
10
8
7
6
2
Reserved
DADR
Reserved
RADR
www.digiembedded.com
297
E T H E R N E T C O M M U N I C A T I O N M O D U L E
MII Management Write Data register
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:13
D12:08
N/A
R/W
Reserved
DADR
N/A
0x00
MII PHY device address
Represents the 5-bit PHY device address field for
management cycles. Up to 32 different PHY devices
can be addressed.
D07:05
D04:00
N/A
R/W
Reserved
RADR
N/A
N/A
0x00
MII PHY register address
Represents the 5-bit PHY register address field for
management cycles. Up to 32 registers within a single
PHY device can be addressed.
MII Management Write Data register
Address: A060 042C
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
8
7
MWTD
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:16
D15:00
N/A
R/W
Reserved
MWTD
N/A
0x0000
MII write data
When this register is written, an MII Management
write cycle is performed using this 16-bit data along
with the preconfigured PHY device and PHY register
addresses defined in the MII Management Address
register. The write operation completes when the
BUSY bit in the MII Management Indicators register
returns to 0.
MII Management Read Data register
Address: A060 0430
298
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
MII Management Indicators register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
8
MRDD
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:16
D15:00
N/A
R
Reserved
MRDD
N/A
0x0000
MII read data
Read data is obtained by reading from this register
after an MII Management read cycle. An MII
Management read cycle is executed by loading the
MII Management Address register, then setting the
READ bit to 1 in the MII Management Command
register. Read data is available after the BUSY bit in
the MII Management Indicators register returns to 0.
MII Management Indicators register
Address: A060 0434
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
6
21
5
20
4
19
18
17
16
0
Reserved
9
8
7
3
2
1
N
Reserved
MIILF
SCAN BUSY
VALID
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:04
D03
N/A
R
Reserved
MIILF
N/A
0
MII link failure
When set to 1, indicates that the PHY currently has a
link fail condition.
www.digiembedded.com
299
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Station Address registers
Bits
Access Mnemonic Reset
Description
D02
R
NVALID
0
Read data not valid
When set to 1, indicates that the MII Management
read cycle has not completed and the read data is not
yet valid. Also indicates that SCAN READ is not
valid for automatic scan reads.
D01
D00
R
R
SCAN
BUSY
0
0
Automatically scan for read data in progress
When set to 1, indicates that continuous MII
Management scanning read operations are in
progress.
MII interface BUSY with read/write operation
When set to 1, indicates that the MII Management
module currently is performing an MII Management
read or write cycle. This bit returns to 0 when the
operation is complete.
Station Address registers
Addresses: A060 0440 / 0444 / 0448
The 48-bit station address is loaded into Station Address Register #1, Station
Address Register #2, and Station Address Register #3, for use by the station address
logic (see “Station address logic (SAL)” on page 264).
Registers
31
15
30
14
29
13
28
27
26
10
25
9
24
23
22
6
21
5
20
19
18
2
17
1
16
0
Reserved
12
11
8
7
4
3
OCTET1
OCTET2
31
15
30
14
29
13
28
27
11
26
10
25
9
24
8
23
22
6
21
5
20
19
18
2
17
1
16
0
Reserved
12
7
4
3
OCTET3
OCTET4
300
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Station Address Filter register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
8
OCTET5
OCTET6
Register bit
Bits
Access Mnemonic Reset
Description
assignments for
all three registers
Station Address Register #1
D31:16
D15:08
D07:00
N/A
R/W
R/W
Reserved
OCTET1
OCTET2
N/A
0
N/A
Station address octet #1 (stad[7:0])
Station address octet #2 (stad[15:8])
0
Station Address Register #2
D31:16
D15:08
D07:00
N/A
R/W
R/W
Reserved
OCTET3
OCTET4
N/A
0
N/A
Station address octet #3 (stad[23:16])
Station address octet #4 (stad[31:24])
0
Station Address Register #3
D31:16
D15:08
D07:00
N/A
R/W
R/W
Reserved
OCTET5
OCTET6
N/A
0
N/A
Station address octet #5 (stad[39:32])
Station address octet #6 (stad[47:40])
0
Note: Octet #6 is the first byte of a frame received from the MAC. Octet #1 is the
last byte of the station address received from the MAC.
Station Address Filter register
Address: A060 0500
The Station Address Filter register contains several filter controls. The register is
All filtering conditions are independent of each other. For example, the station
address logic can be programmed to accept all multicast frames, all broadcast
frames, and frames to the programmed destination address.
www.digiembedded.com
301
E T H E R N E T C O M M U N I C A T I O N M O D U L E
RegisterHash Tables
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
7
22
6
21
5
20
4
19
18
17
1
16
0
Reserved
9
8
3
2
Reserved
PRO
PRM
PRA BROAD
Register bit
assignment
Bits
D31:04
D03
Access Mnemonic Reset
Description
N/A
R/W
R/W
R/W
R/W
Reserved
PRO
N/A
N/A
0
0
0
0
Enable promiscuous mode; receive all frames
Accept all multicast frames
D02
PRM
D01
PRA
Accept multicast frames using the hash table
Accept all broadcast frames
D00
BROAD
RegisterHash Tables
The MAC receiver provides the station address logic with a 6-bit CRC value that is
the upper six bits of a 32-bit CRC calculation performed on the 48-bit multicast
destination address. This 6-bit value addresses the 64-bit multicast hash table
created in HT1 (hash table 1) and HT2 (hash table 2). If the current receive frame is
a multicast frame and the 6-bit CRC addresses a bit in the hash table that is set to
1, the receive frame will be accepted; otherwise, the receive frame is rejected.
HT1 stores enables for the lower 32 CRC addresses; HT2 stores enables for the
upper 32 CRC addresses.
HT1
Address: A060 0504
31
30
29
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
HT1
HT1
15
14
13
12
Register bit assignment
Bits
Access Mnemonic Reset
R/W HT1 0x00000000
Description
D31:00
CRC 31:00
302
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
HT2
Address: A060 0508
31
30
29
28
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
HT2
HT2
15
14
13
12
Register bit assignment
Bits
Access Mnemonic Reset
R/W HT2 0x00000000
Description
D31:00
CRC 63:32
Statistics registers
Address: A060 0680 (base register)
The Statistics module has 39 counters and 4 support registers that count and save
Ethernet statistics. The Ethernet General Control Register #2 contains three
Statistics module configuration bits: AUTOZ, CLRCNT, and STEN. The counters
support a “clear on read” capability that is enabled when AUTOZ is set to 1.
Combined
The combined transmit and receive statistics counters are incremented for each
good or bad frame, transmitted and received, that falls within the specified frame
length limits of the counter (for example, TR127 counts 65–127 byte frames). The
frame length excludes framing bits and includes the FCS (checksum) bytes. All
counters are 18 bits, with this bit configuration:
transmit and
receive statistics
counters address
map
D31:18
D17:00
R
Reserved
R/W
Reset = 0x00000
Count (R/W)
Address
Register Transmit and receive counters
R/W
Byte frame counter R/W
A060_0680
A060_0684
A060_0688
A060_068C
A060_0690
TR64
Transmit & receive 64
Transmit & receive 65
Transmit & receive 128
Transmit & receive 256
Transmit & receive 512
TR127
TR255
TR511
TR1K
to
to
to
to
127 Byte frame counter R/W
255 Byte frame counter R/W
511 Byte frame counter R/W
1023 Byte frame counter R/W
www.digiembedded.com
303
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
Address
Register Transmit and receive counters
R/W
A060_0694
A060_0698
TRMAX
TRMGV
Transmit & receive 1024
to
1518 Byte frame counter R/W
Transmit & receive 1519
count
to 1522 Byte good VLAN frame
R/W
Receive statistics
counters address
map
Address
Register
Receive counters
Receive byte counter
R/W
A060_069C
A060_06A0
A060_06A4
A060_06A8
A060_06AC
A060_06B0
A060_06B4
A060_06B8
A060_06BC
A060_06C0
A060_06C4
A060_06C8
A060_06CC
A060_06D0
A060_06D4
A060_06D8
A060-06DC
RBYT
RPKT
RFCS
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
N/A
R/W
R/W
R/W
R/W
R/W
R/W
N/A
Receive packet counter
Receive FCS error counter
RMCA
RBCA
RXCF
RXPF
Receive multicast packet counter
Receive broadcast packet counter
Receive control frame packet counter
Receive PAUSE frame packet counter
Receive unknown OPCODE counter
Receive alignment error counter
N/A
RXUO
RALN
Reserved
RCDE
RCSE
Receive code error counter
Receive carrier sense error counter
Receive undersize packet counter
Receive oversize packet counter
Receive fragments counter
Receive jabber counter
RUND
ROVR
RFRG
RJBR
Reserved
N/A
Receive byte
counter (A060
069C)
Incremented by the byte count of frames received with 0 to 1518 bytes, including
those in bad packets, excluding framing bits but including FCS bytes.
D31:24
D23:00
R
Reset = Read as 0
Reset = 0x000000
Reserved
RBYT
R/W
Receive packet
counter (A060
06A0)
Incremented for each received frame (including bad packets, and all unicast,
broadcast, and multicast packets).
D31:18
R
Reset = Read as 0
Reserved
304
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
D17:00
R/W
Reset = 0x00000
RPKT
Receive FCS error
counter (A060
06A4)
Incremented for each frame received with a length of 64 to 1518 bytes, and
containing a frame check sequence (FCS) error. FCS errors are not counted for VLAN
frames that exceed 1518 bytes or for any frames with dribble bits.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
RFCS
R/W
Receive multicast
packet counter
(A060 06A8)
Incremented for each good multicast frame with a length no greater than 1518
bytes (non-VLAN) or 1522 bytes (VLAN), excluding broadcast frames. This counter
does not look at range/length errors.
D31:18
D17:00
R
Reset = Read as 0
Reset = 0x00000
Reserved
RMCA
R/W
Receive broadcast
packet counter
(A060 06AC)
Incremented for each good broadcast frame with a length no greater than 1518
bytes (non-VLAN) or 1522 bytes (VLAN), excluding multicast frames. This counter
does not look at range/length errors.
D31:18
D17:00
R
Reset = Read as 0
Reset = 0x00000
Reserved
RBCA
R/W
Receive control
frame packet
counter (A060
06B0)
Incremented for each MAC control frame received (PAUSE and unsupported).
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
RXCF
R/W
Receive PAUSE
frame packet
counter (A060
06B4)
Incremented each time a valid PAUSE control frame is received.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
RXPF
R/W
Receive unknown
OPCODE packet
counter (A060
06B8)
Incremented each time a MAC control frame is received with an OPCODE other than
PAUSE.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
RBUO
R/W
www.digiembedded.com
305
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
Receive alignment
error counter
(A060 06BC)
Incremented for each received frame, from 64 to 1518 bytes, that contains an
invalid FCS and has dribble bits (that is, is not an integral number of bytes).
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
RALN
R/W
Receive code
error counter
(A060 06C4)
Incremented each time a valid carrier was present and at least one invalid data
symbol was found.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
RCDE
R/W
Receive carrier
sense error
counter (A060
06C8)
Incremented each time a false carrier is found during idle, as defined by a 1 on
RX_ER and an 0xE on RXD. The event is reported with the statistics generated on the
next received frame. Only one false carrier condition can be detected and logged
between frames.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
RCSE
R/W
Receive undersize
packet counter
(A060 06CC)
Incremented each time a frame is received that is less than 64 bytes in length,
contains a valid FCS, and is otherwise well-formed. This counter does not look at
range/length errors.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
RUND
R/W
Receive oversize
packet counter
(A060 06D0)
Incremented each time a frame is received that exceeds 1518 bytes (non-VLAN) or
1522 bytes (VLAN), contains a valid FCS, and is otherwise well-formed. This counter
does not look at range/length errors. This counter is not incremented when a
packet is truncated because it exceeds the MAXF value.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
ROVR
R/W
Receive fragments
counter (A060
06D4)
Incremented for each frame received that is less than 64 bytes in length and
contains an invalid FCS; this includes integral and non-integral lengths.
D31:12
D11:00
R
Reserved
RFRG
R/W
Reset = 0x000
306
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
Receive jabber
counter (A060
06D8)
Incremented for frames received that exceed 1518 bytes (non-VLAN) or 1522 bytes
(VLAN) and contain an invalid FCS, including alignment errors. This counter does not
increment when a packet is truncated to 1518 (non-VLAN) or 1522 (VLAN) bytes by
MAXF.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
RJBR
R/W
Transmit statistics
counters address
map
Address
Register
Transmit counters
R/W
R/W
R/W
R/W
R/W
N/A
R/W
R/W
R/W
R/W
R/W
R/W
R/W
N/A
N/A
R/W
R/W
N/A
R/W
R/W
R/W
A060_06E0
A060_06E4
A060_06E8
A060_06EC
A060_06F0
A060_06F4
A060_06F8
A060_06FC
A060_0700
A060_0704
A060_0708
A060_070C
A060_0710
A060_0714
A060_0718
A060_071C
A060_0720
A060_0724
A060_0728
A060_072C
TBYT
TPKT
Transmit byte counter
Transmit packet counter
TMCA
TBCA
Reserved
TDFR
Transmit multicast packet counter
Transmit broadcast packet counter
N/A
Transmit deferral packet counter
Transmit excessive deferral packet counter
Transmit single collision packet counter
Transmit multiple collision packet counter
Transmit late collision packet counter
Transmit excessive collision packet counter
Transmit total collision counter
N/A
TEDF
TSCL
TMCL
TLCL
TXCL
TNCL
Reserved
Reserved
TJBR
N/A
Transmit jabber frame counter
Transmit FCS error counter
N/A
TFCS
Reserved
TOVR
TUND
TFRG
Transmit oversize frame counter
Transmit undersize frame counter
Transmit fragments frame counter
Transmit byte
counter (A060
06E0)
Incremented by the number of bytes that were put on the wire, including fragments
of frames that were involved with collisions. This count does not include
preamble/SFD or jam bytes.
D31:24
D23:00
R
Reset = Read as 0
Reset = 0x000000
Reserved
TBYT
R/W
www.digiembedded.com
307
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
Transmit packet
counter (A060
06E4)
Incremented for each transmitted packet (including bad packets, excessive
deferred packets, excessive collision packets, late collision packets, and all unicast,
broadcast, and multicast packets).
D31:18
D17:00
R
Reset = Read as 0
Reset = 0x00000
Reserved
TPKT
R/W
Transmit
Incremented for each multicast valid frame transmitted (excluding broadcast
frames).
multicast packet
counter (A060
06E8)
D31:18
D17:00
R
Reset = Read as 0
Reset = 0x00000
Reserved
TMCA
R/W
Transmit
Incremented for each broadcast frame transmitted (excluding multicast frames).
broadcast packet
counter (A060
06EC)
D31:18
D17:00
R
Reset = Read as 0
Reset = 0x00000
Reserved
TBCA
R/W
Transmit deferral
packet counter
(A060 06F4)
Incremented for each frame that was deferred on its first transmission attempt.
This counter does not include frames involved in collisions.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TDFR
R/W
Transmit
Incremented for frames aborted because they were deferred for an excessive period
of time (3036 byte times).
excessive deferral
packet counter
(A060 06F8)
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TEDF
R/W
Transmit single
collision packet
counter (A060
06FC)
Incremented for each frame transmitted that experienced exactly one collision
during transmission.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TSCL
R/W
308
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
Transmit multiple
collision packet
counter (A060
0700)
Incremented for each frame transmitted that experienced 2–15 collisions (including
any late collisions) during transmission.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TMCL
R/W
Transmit late
collision packet
counter (A060
0704)
Incremented for each frame transmitted that experienced a late collision during a
transmission attempt. Late collisions are defined using the CWIN[13:08] field of the
Collision Window/Retry register.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TLCL
R/W
Transmit
Incremented for each frame transmitted that experienced excessive collisions
during transmission, as defined by the RETX [03:00] field of the Collision
Window/Retry register, and was aborted.
excessive collision
packet counter
(A060 0708)
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TXCL
R/W
Transmit total
collision packet
counter (A060
070C)
Incremented by the number of collisions experienced during the transmission of a
frame.
Note: This register does not include collisions that result in an excessive collision
count or late collisions.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TNCL
R/W
Transmit jabber
frame counter
(A060 0718)
Incremented for each oversized transmitted frame with an incorrect FCS value.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TJBR
R/W
Transmit FCS
error counter
(A060 071C)
Incremented for every valid-sized packet with an incorrect FCS value.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TFCS
R/W
www.digiembedded.com
309
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
Transmit oversize
frame counter
(A060 0724)
Incremented for each transmitted frame that exceeds 1518 bytes (NON_VLAN) or
1532 bytes (VLAN) and contains a valid FCS.
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TOVR
R/W
Transmit
Incremented for every frame less than 64 bytes, with a correct FCS value. This
counter also is incremented when a jumbo packet is aborted and the MAC is not
checking the FCS, because the frame is reported as having a length of 0 bytes.
undersize frame
counter (A060
0728)
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TUND
R/W
Transmit
Incremented for every frame less than 64 bytes, with an incorrect FCS value.
fragment counter
(A060 072C)
D31:12
D11:00
R
Reset = Read as 0
Reset = 0x000
Reserved
TFRG
R/W
General Statistics
registers address
map
These are the General Statistics registers.
Address
Register
CAR1
General registers
R/W
R
A060_0730
A060_0734
A060_0738
A060_073C
Carry Register 1
CAR2
Carry Register 2
R
CAM1
CAM2
Carry Register 1 Mask register
Carry Register 2 Mask register
R/W
R/W
Carry Register 1 (CAR1) and Carry Register 2 (CAR2) have carry bits for all of the
statistics counters. These carry bits are set when the associated counter reaches a
rollover condition.
These carry bits also can cause the STOVFL (statistics counter overflow) bit in the
Ethernet Interrupt Status register to be set. Carry Register 1 Mask register (CAM1)
and Carry Register 2 Mask register (CAM2) have individual mask bits for each of the
carry bits. When set, the mask bit prevents the associated carry bit from setting the
STOVFL bit.
Carry Register 1
Address: A060 0730
310
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
Register
31
30
29
28
27
26
25
24
8
23
7
22
6
21
20
19
3
18
2
17
1
16
C1
MAX
C1
MGV
C1
RBY
C164 C1127 C1255 C1511 C11K
Reserved
4
15
14
13
12
11
10
9
5
0
C1
RPK
C1
RFC
C1
RMC
C1
RBC
C1
RXC
C1
RXU
C1
RCD
C1
RCS
C1
RUN
C1
ROV
C1
RFR
C1
RJB
C1RXP
C1RAL Rsvd
Rsvd
Register bit
assignment
Bits
D31
D30
D29
D28
D27
D26
D25
D24:17
D16
D15
D14
D13
D12
D11
D10
D09
D08
D07
D06
D05
D04
D03
D02
D01
D00
Access Mnemonic Reset
Description
R/C
R/C
R/C
R/C
R/C
R/C
R/C
N/A
R/C
R/C
R/C
R/C
R/C
R/C
R/C
R/C
R/C
N/A
R/C
R/C
R/C
R/C
R/C
R/C
N/A
C164
0
Carry register 1 TR64 counter carry bit
Carry register 1 TR127 counter carry bit
Carry register 1 TR255 counter carry bit
Carry register TR511 counter carry bit
Carry register 1 TR1K counter carry bit
Carry register 1 TRMAX counter carry bit
Carry register 1 TRMGV counter carry bit
N/A
C1127
0
C1255
0
C1511
0
C11K
0
C1MAX
C1MGV
Reserved
C1RBY
C1RPK
C1RFC
C1RMC
C1RBC
C1RXC
C1RXP
C1RXU
C1RAL
Reserved
C1RCD
C1RCS
C1RUN
C1ROV
C1RFR
C1RJB
Reserved
0
0
N/A
0
Carry register 1 RBYT counter carry bit
Carry register 1 RPKT counter carry bit
Carry register 1 RFCS counter carry bit
Carry register 1 RMCA counter carry bit
Carry register 1 RBCA counter carry bit
Carry register 1 RXCF counter carry bit
Carry register 1 RXPF counter carry bit
Carry register 1 RXUO counter carry bit
Carry register 1 RALN counter carry bit
N/A
0
0
0
0
0
0
0
0
N/A
0
Carry register 1 RCDE counter carry bit
Carry register 1 RCSE counter carry bit
0
0
Carry register 1 RUND counter carry register
Carry register 1 ROVR counter carry bit
Carry register 1 RFRG counter carry bit
Carry register 1 RJBR counter carry bit
N/A
0
0
0
N/A
Carry Register 2
Address: A060 0734
www.digiembedded.com
311
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
8
23
7
22
6
21
5
20
4
19
18
17
16
C2
JTB
C2
TFC
C2
TOV
Reserved
Rsvd
10
9
3
2
1
0
C2
TUN
C2
TFG
C2
TBY
C2
TPK
C2
TED
C2
TSC
C2
TMA
C2
TLC
C2
TXC
C2
TNC
C2TMC C2TBC Rsvd C2TDF
Reserved
Register bit
assignment
Bits
D31:20
D19
D18
D17
D16
D15
D14
D13
D12
D11
D10
D09
D08
D07
D06
D05
D04
D03
D02
D01:00
Access Mnemonic Reset
Description
N/A
R/C
R/C
N/A
R/C
R/C
R/C
R/C
R/C
R/C
R/C
N/A
R/C
R/C
R/C
R/C
R/C
R/C
R/C
N/A
Reserved
C2TJB
N/A
N/A
0
Carry register 2 TJBR counter carry bit
Carry register 2 TFCS counter carry bit
N/A
C2TFC
Reserved
C2TOV
C2TUN
C2TFG
C2TBY
C2TPK
C2TMC
C2TBC
Reserved
C2TDF
C2TED
C2TSC
C2TMA
C2TLC
C2TXC
C2TNC
Reserved
0
N/A
0
Carry register 2 TOVR counter carry bit
Carry register 2 TUND counter carry bit
Carry register 2 TFRG counter carry bit
Carry register 2 TBYT counter carry bit
Carry register 2 TPKT counter carry bit
Carry register 2 TMCA counter carry bit
Carry register 2 TBCA counter carry bit
N/A
0
0
0
0
0
0
N/A
0
Carry register 2TDFR counter carry bit
Carry register 2 TEDF counter carry bit
Carry register 2 TSCL counter carry bit
Carry register 2 TMCL counter carry bit
Carry register 2 TLCL counter carry bit
Carry register 2 TXCL counter carry bit
Carry register 2 TNCL counter carry bit
N/A
0
0
0
0
0
0
N/A
Carry Register 1
Mask register
Address: A060 0738
312
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
Register
31
30
29
28
M
27
M
26
25
24
23
7
22
6
21
20
19
3
18
2
17
1
16
M
1255
M1
MAX
M1
MGV
M1
RBY
M164 M1127
Reserved
4
1511 C11K
15
14
13
12
11
10
9
8
5
0
M1
RPK
M1
RFC
M1
RMC
M1
RBC
M1
RXC
M1
RXU
Not
used
M1
RCD
M1
RCS
M1
RUN
M1
ROV
M1
RFR
M1
RJB
Not
used
M1RXP
M1RAL
Register bit
assignment
Bits
D31
D30
D29
D28
D27
D26
D25
D24:17
D16
D15
D14
D13
D12
D11
D10
D09
D08
D07
D06
D05
D04
D03
D02
D01
D00
Access Mnemonic Reset
Description
R/W
R/W
R/W
R/W
R/W
R/W
R/W
N/A
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
M164
1
1
1
1
1
1
1
N/A
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Mask register 1 TR64 counter carry bit mask
Mask register 1 TR127 counter carry bit mask
Mask register 1 TR255 counter carry bit mask
Mask register 1 TR511 counter carry bit mask
Mask register 1 TR1K counter carry bit mask
Mask register 1 TRMAX counter carry bit mask
Mask register 1 TRMGV counter carry bit mask
N/A
M1127
M1255
M1511
M11K
M1MAX
M1MGV
Reserved
M1RBY
M1RPK
M1RFC
M1RMC
M1RBC
M1RXC
M1RXP
M1RXU
M1RAL
Not used
M1RCD
M1RCS
M1RUN
M1ROV
M1RFR
M1RJB
Not used
Mask register 1 RBYT counter carry bit mask
Mask register 1 RPKT counter carry bit mask
Mask register 1 RFCS counter carry bit mask. \
Mask register 1 RMCA counter carry bit mask
Mask register 1 RBCA counter carry bit mask
Mask register 1 RXCF counter carry bit mask
Mask register 1 RXPF counter carry bit mask
Mask register 1 RXUO counter carry bit mask
Mask register 1 RALN counter carry bit mask.
Always write as 1.
Mask register 1 RCDE counter carry bit mask
Mask register 1 RCSE counter carry bit mask
Mask register 1 RUND counter carry bit mask
Mask register 1 ROVR counter carry bit mask
Mask register 1 RFRG counter carry bit mask
Mask register 1 RJBR counter carry bit mask
Always write as 1.
www.digiembedded.com
313
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Statistics registers
Carry Register 2
Mask register
Address: A060 073C
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
18
17
16
M2
JTB
M2
TFC
Not
used
M2
TOV
Reserved
10
M2TBC
9
8
3
2
1
0
M2
TUN
M2
TFG
M2
TBY
M2
TPK
M2
TMC
Not
used
M2
TED
M2
TSC
M2
TMA
M2
TLC
M2
TXC
M2
TNC
M2TDF
Not used
Register bit
assignment
Bits
D31:20
D19
D18
D17
D16
D15
D14
D13
D12
D11
D10
D09
D08
D07
D06
D05
D04
D03
D02
D01:00
Access Mnemonic Reset
Description
N/A
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reserved
M2TJB
N/A
1
N/A
Mask register 2 TJBR counter carry bit mask
Mask register 2 TFCS counter carry bit mask
Always write as 1.
M2TFC
Not used
M2TOV
M2TUN
M2TFG
M2TBY
M2TPK
M2TMC
M2TBC
Not used
M2TDF
M2TED
M2TSC
M2TMA
M2TLC
M2TXC
M2TNC
Not used
1
1
1
Mask register 2 TOVR counter carry bit mask
Mask register 2 TUND counter carry bit mask
Mask register 2 TFRG counter carry bit mask
Mask register 2 TBYT counter carry bit mask
Mask register 2 TPKT counter carry bit mask
Mask register 2 TMCA counter carry bit mask
Mask register 2 TBCA counter carry bit mask
Always write as 1.
1
1
1
1
1
1
1
1
Mask register 2 TDFR counter carry bit mask
Mask register 2 TEDF counter carry bit mask
Mask register 2 TSCL counter carry bit mask
Mask register 2 TMCL counter carry bit mask
Mask register 2 TLCL counter carry bit mask
Mask register 2 TXCL counter carry bit mask
Mask register 2 TNCL counter carry bit mask
Always write as “11.”
1
1
1
1
1
1
11
314
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
RX_A Buffer Descriptor Pointer register
RX_A Buffer Descriptor Pointer register
Address: A060 0A00
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
RXAPTR
8
7
RXAPTR
Register bit
assignment
Bits
Access Mnemonic Reset
Description
RX_A Buffer Descriptor Pointer
0x00000000
D31:00
R/W
RXAPTR
Contains a pointer to the initial receive buffer
descriptor for the A pool of buffers.
RX_B Buffer Descriptor Pointer register
Address: A060 0A04
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
RXBPTR
8
7
RXBPTR
Register bit
assignment
Bits
Access Mnemonic Reset
Description
RX_B Buffer Descriptor Pointer
0x00000000
D31:00
R/W
RXBPTR
Contains a pointer to the initial receive buffer
descriptor for the B pool of buffers.
www.digiembedded.com
315
E T H E R N E T C O M M U N I C A T I O N M O D U L E
RX_C Buffer Descriptor Pointer register
RX_C Buffer Descriptor Pointer register
Address: A060 0A08
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
RXCPTR
8
7
RXCPTR
Register bit
assignment
Bits
Access Mnemonic Reset
Description
RX_C Buffer Descriptor Pointer
0x00000000
D31:00
R/W
RXCPTR
Contains a pointer to the initial receive buffer
descriptor for the C pool of buffers.
RX_D Buffer Descriptor Pointer register
Address: A060 0A0C
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
RXDPTR
8
7
RXDPTR
Register bit
assignment
Bits
Access Mnemonic Reset
Description
RX_D Buffer Descriptor Pointer
0x00000000
D31:00
R/W
RXDPTR
Contains a pointer to the initial receive buffer
descriptor for the D pool of buffers.
316
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet Interrupt Status register
Ethernet Interrupt Status register
Address: A060 0A10
The Ethernet Interrupt Status register contains status bits for all of the Ethernet
interrupt sources. Each interrupt status bit is assigned to either the RX or TX
Ethernet interrupt; bits D25:16 are assigned to the RX interrupt and D06:00 are
assigned to the TX interrupt.
The bits are set to indicate an interrupt condition, and are cleared by writing a 1 to
the appropriate bit. All interrupts bits are enabled using the Ethernet Interrupt
Enable register (EINTREN). If any enabled bit in the Ethernet Interrupt Status
register is set, its associated Ethernet interrupt to the system is set. The interrupt
to the system is negated when all active interrupt sources have been cleared. If an
interrupt source is active at the same time the interrupt bit is being cleared, the
interrupt status bit remains set and the interrupt signal remains set.
Note: For diagnostics, software can cause any of these interrupt status bits to be set
by writing a 1 to a bit that is 0.
Register
31
15
30
14
29
28
27
26
10
25
RX
24
RX
23
22
RX
21
RX
20
RX
19
RX
18
17
16
RX
BU
FFUL
RX
BUFC
RXNO
BUF
Reserved
OVFL_ OVFL_
DATA STAT
DONE DONE DONE DONE
A
RXBR
B
C
D
13
12
11
9
8
7
6
5
4
3
2
1
0
TX
BUF
NR
ST
OVFL
Not
used
TX
BUFC
TX
DONE
TX
ERR
TX
IDLE
Reserved
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
D31:26
D25
N/A
R/C
Reserved
N/A
0
N/A
RXOVFL_DATA
Assigned to RX interrupt.
RX data FIFO overflowed. For proper operation,
reset the receive packet processor using the ERX bit
in the Ethernet General Control Register #1 when an
overflow condition occurs.
D24
D23
R/C
R/C
RXOVFL_STAT
RXBUFC
0
0
Assigned to RX interrupt.
RX status FIFO overflowed.
Assigned to RX interrupt.
I bit set in receive Buffer Descriptor and buffer
closed.
D22
R/C
RXDONEA
0
Assigned to RX interrupt.
Complete receive frame stored in pool A of system
memory.
www.digiembedded.com
317
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet Interrupt Status register
Bits
Access Mnemonic
Reset
Description
D21
R/C
R/C
R/C
R/C
RXDONEB
RXDONEC
RXDONED
RXNOBUF
0
Assigned to RX interrupt.
Complete receive frame stored in pool B of system
memory.
D20
D19
D18
0
0
0
Assigned to RX interrupt.
Complete receive frame stored in pool C of system
memory.
Assigned to RX interrupt.
Complete receive frame stored in pool D of system
memory.
Assigned to RX interrupt.
No buffer is available for this frame due to one of
these conditions:
ꢀ
ꢀ
ꢀ
All four buffer rings being disabled
All four buffer rings being full
No available buffer big enough for the frame
D17
D16
R/C
R/C
RXBUFFUL
RXBR
0
0
Assigned to RX interrupt.
No buffer is available for this frame because all four
buffer rings are disabled or full.
Assigned to RX interrupt.
New frame available in the RX_FIFO. This bit is
used for diagnostics.
D15:07
D06
N/A
R/C
Reserved
STOVFL
N/A
0
N/A
Assigned to TX interrupt.
Statistics counter overflow. Individual counters can
be masked using the Carry Register 1 and 2 Mask
registers. The source of this interrupt is cleared by
clearing the counter that overflowed, and by clearing
the associated carry bit in either Carry Register 1 or
Carry Register 2 by writing a 1 to the bit.
D05
D04
R
Not used
0
0
Always write as 0.
R/C
TXBUFC
Assigned to TX interrupt.
I bit set in the Transmit Buffer Descriptor and buffer
closed.
D03
D02
R/C
R/C
TXBUFNR
TXDONE
0
0
Assigned to TX interrupt.
F bit not set in the Transmit Buffer Descriptor when
read from the TX Buffer descriptor RAM.
Assigned to TX interrupt.
Frame transmission complete.
318
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Ethernet Interrupt Enable register
Bits
Access Mnemonic
Reset
Description
D01
R/C
TXERR
0
Last frame not transmitted successfully.
Assigned to TX interrupt. See “Ethernet Interrupt
restarting the transmitter when this bit is set.
D00
R/C
TXIDLE
0
TX_WR logic has no frame to transmit.
Assigned to TX interrupt. See “Ethernet Interrupt
restarting the transmitter when this bit is set.
Ethernet Interrupt Enable register
Address: A060 0A14
The Ethernet Interrupt Enable register contains individual enable bits for each of
the bits in the Ethernet Interrupt Status register. When these bits are cleared, the
corresponding bit in the Ethernet Interrupt Status register cannot cause the
interrupt signal to the system to be asserted when it is set.
Register
31
15
30
14
29
28
27
26
10
25
24
23
22
21
20
19
18
17
16
EN_
RX
BUFC
EN_
EN_RX EN_RX
OVFL_ OVFL_
DATA
EN_RX EN_RX EN_RX EN_RX
DONE
A
EN_RX
BUF
FUL
EN_
RXBR
Reserved
DONE
B
DONE
C
DONE RXNO
D
STAT
BUF
13
12
11
9
8
7
6
5
4
3
2
1
0
EN_
TX
DONE
EN_
TX
ERR
EN_
TX
IDLE
EN_TX
BUF
NR
EN_ST
OVFL
Not
used
EN_TX
BUFC
Reserved
Register bit
assignment
Bits
D31:26
D25
D24
D23
D22
D21
D20
D19
D18
D17
Access Mnemonic
Reset Description
N/A
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reserved
N/A
0
N/A
EN_RXOVFL_DATA
EN_RXOVFL_STAT
EN_RXBUFC
Enable the RXOVFL_DATA interrupt bit.
Enable the RXOVFL_STATUS interrupt bit.
Enable the RXBUFC interrupt bit.
0
0
EN_RXDONEA
EN_RXDONEB
EN_RXDONEC
EN_RXDONED
EN_RXNOBUF
EN_RXBUFFUL
0
Enable the RXDONEA interrupt bit.
Enable the RXDONEB interrupt bit.
Enable the RXDONEC interrupt bit.
Enable the RXDONED interrupt bit.
Enable the RXNOBUF interrupt bit.
Enable the RXBUFFUL interrupt bit.
0
0
0
0
0
www.digiembedded.com
319
E T H E R N E T C O M M U N I C A T I O N M O D U L E
TX Buffer Descriptor Pointer register
Bits
D16
D15:07
D06
D05
D04
D03
D02
D01
D00
Access Mnemonic
Reset Description
R/W
N/A
R/W
R/W
R/W
R/W
R/W
R/W
R/W
EN_RXBR
0
Enable the RXBR interrupt bit.
Reserved
N/A
0
N/A
EN_STOVFL
Not used
Enable the STOVFL interrupt bit.
Always write as 0.
0
EN_TXBUFC
EN_TXBUFNR
EN_TXDONE
EN_TXERR
EN_TXIDLE
0
Enable the TXBUFC interrupt bit.
Enable the TXBUFNR interrupt bit.
Enable the TXDONE interrupt bit.
Enable the TXERR interrupt bit.
Enable the TXIDLE interrupt bit.
0
0
0
0
TX Buffer Descriptor Pointer register
Address: A060 0A18
Register
31
15
30
14
29
13
28
12
27
26
10
25
9
24
23
22
6
21
5
20
19
18
2
17
1
16
0
Reserved
11
8
7
4
3
Reserved
TXPTR
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07:00
N/A
R/W
Reserved
TXPTR
N/A
N/A
0x00
Contains a pointer to the initial transmit buffer descriptor
in the TX buffer descriptor RAM.
Note:
This pointer is the 8-bit physical address of the
TX buffer descriptor RAM, and points to the
first location of the four-location buffer
descriptor. The byte offset of this buffer
descriptor can be calculated by multiplying this
value by 4.
320
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Transmit Recover Buffer Descriptor Pointer register
Transmit Recover Buffer Descriptor Pointer register
Address: A060 0A1C
Register
31
15
30
14
29
13
28
12
27
26
10
25
9
24
23
22
6
21
5
20
19
18
2
17
1
16
0
Reserved
11
8
7
4
3
Reserved
TXRPTR
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07:00
N/A
R/W
Reserved
TXRPTR
N/A
N/A
0x00
Contains a pointer to a buffer descriptor in the TX buffer
descriptor RAM.
Note:
This pointer is the 8-bit physical address of the
TX buffer descriptor RAM, and points to the
first location of the four-location buffer
descriptor. The byte offset of this buffer
descriptor can be calculated by multiplying this
value by 4.
This is the buffer descriptor at which the TX_WR logic
resumes processing when TCLER is toggled from low to
high in Ethernet General Control Register #2.
TX Error Buffer Descriptor Pointer register
Address: A060 0A20
Register
31
15
30
14
29
13
28
12
27
26
10
25
9
24
23
22
6
21
5
20
19
18
2
17
1
16
0
Reserved
11
8
7
4
3
Reserved
TXERBD
www.digiembedded.com
321
E T H E R N E T C O M M U N I C A T I O N M O D U L E
TX Stall Buffer Descriptor Pointer register
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07:00
N/A
R
Reserved
TXERBD
N/A
N/A
0x00
Contains the pointer (in the TX buffer descriptor RAM)
to the last buffer descriptor of a frame that was not
successfully transmitted. TXERBD is loaded by the
TX_WR logic when a transmit frame is aborted by the
MAC or when the MAC finds a CRC error in a frame.
TXERBD also is loaded if a buffer descriptor that is not
the first buffer descriptor in a frame does not have its F bit
set.
Note:
This pointer is the 8-bit physical address of the
TX buffer descriptor RAM, and points to the
first location of the four-location buffer
descriptor. The byte offset of this buffer
descriptor can be calculated by multiplying this
value by 4.
Note:
Software uses TXERBD to identify frames that
were not transmitted successfully.
TX Stall Buffer Descriptor Pointer register
Address: A060 0A24
Register
31
15
30
14
29
13
28
27
26
10
25
9
24
23
7
22
6
21
5
20
19
18
2
17
1
16
0
Reserved
12
11
8
4
3
Reserved
TXSPTR
322
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
RX_A Buffer Descriptor Pointer Offset register
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07:00
N/A
R
Reserved
TXSPTR
N/A
N/A
0x00
If the TX runs out of frames to send, it sets TXIDLE in the
Ethernet Interrupt Status register and stores the pointer (in
the TX buffer descriptor RAM) to the buffer descriptor
that did not have its F bit set in the TX Stall Buffer
Descriptor Pointer register.
Note:
This pointer is the 8-bit physical address of the
TX buffer descriptor RAM, and points to the
first location of the four-location buffer
descriptor. The byte offset of this buffer
descriptor can be calculated by multiplying this
value by 4.
Note:
Software uses TXSPTR to identify the entry in
the TX buffer descriptor RAM at which the TX
stalled.
RX_A Buffer Descriptor Pointer Offset register
Address: A060 0A28
Register
31
15
30
14
29
28
12
27
11
26
10
25
9
24
23
22
6
21
20
4
19
3
18
2
17
1
16
0
Reserved
13
8
7
5
Reserved
RXAOFF
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:11
D10:00
N/A
R
Reserved
RXAOFF
N/A
N/A
0x000
Contains an 11-bit byte offset from the start of the pool A
ring. The offset is updated at the end of the RX packet,
and will have the offset to the next buffer descriptor that
will be used. RXAOFF can be used to determine where
the RX_RD logic will put the next packet.
www.digiembedded.com
323
E T H E R N E T C O M M U N I C A T I O N M O D U L E
RX_B Buffer Descriptor Pointer Offset register
RX_B Buffer Descriptor Pointer Offset register
Address: A060 0A2C
Register
31
15
30
14
29
28
12
27
11
26
10
25
9
24
23
22
6
21
20
4
19
3
18
2
17
1
16
0
Reserved
13
8
7
5
Reserved
RXBOFF
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:11
D10:00
N/A
R
Reserved
RXBOFF
N/A
N/A
0x000
Contains an 11-bit byte offset from the start of the pool B
ring. The offset is updated at the end of the RX packet,
and will have the offset to the next buffer descriptor that
will be used. RXBOFF can be used to determine where
the RX_RD logic will put the next packet.
RX_C Buffer Descriptor Pointer Offset register
Address: A060 0A30
Register
31
15
30
14
29
28
12
27
11
26
10
25
9
24
23
22
6
21
20
4
19
3
18
2
17
1
16
0
Reserved
13
8
7
5
Reserved
RXCOFF
324
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
RX_D Buffer Descriptor Pointer Offset register
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:11
D10:00
N/A
R
Reserved
RXCOFF
N/A
N/A
0x000
Contains an 11-bit byte offset from the start of the pool C
ring. The offset is updated at the end of the RX packet,
and will have the offset to the next buffer descriptor that
will be used. RXCOFF can be used to determine where
the RX_RD logic will put the next packet.
RX_D Buffer Descriptor Pointer Offset register
Address: A060 0A34
Register
31
15
30
14
29
28
12
27
11
26
10
25
9
24
23
22
6
21
20
4
19
3
18
2
17
1
16
0
Reserved
13
8
7
5
Reserved
RXDOFF
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:11
D10:00
N/A
R
Reserved
RXDOFF
N/A
N/A
0x000
Contains an 11-bit byte offset from the start of the pool D
ring. The offset is updated at the end of the RX packet,
and will have the offset to the next buffer descriptor that
will be used. RXDOFF can be used to determine where
the RX_RD logic will put the next packet.
Transmit Buffer Descriptor Pointer Offset register
Address: A060 0A38
www.digiembedded.com
325
E T H E R N E T C O M M U N I C A T I O N M O D U L E
RX Free Buffer register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
20
4
19
3
18
2
17
1
16
0
Reserved
8
5
Reserved
TXOFF
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:10
D09:00
N/A
R
Reserved
TXOFF
N/A
N/A
0x000
Contains a 10-bit byte offset from the start of the transmit
ring in the TX buffer descriptor RAM. The offset is
updated at the end of the TX packet, and will have the
offset to the next buffer descriptor that will be used.
TXOFF can be used to determine from where the TX_WR
logic will grab the next packet.
RX Free Buffer register
Address: A060 0A3C
So the RX_RD logic knows when the software is freeing a buffer for reuse, the
software writes to the RXFREE register each time it frees a buffer in one of the
pools. RXFREE has an individual bit for each pool; this bit is set to 1 when the
register is written. Reads to RXFREE always return all 0s.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
6
21
5
20
4
19
18
17
16
Reserved
9
8
7
3
2
1
0
RX
RX
RX
RX
Reserved
FREED FREEC FREEB FREEA
Register bit
assignment
Bits
D31:04
D03
Access Mnemonic Reset
Description
N/A
N/A
W
Reserved
N/A
0
RXFREED
RXFREEC
Pool D free bit
Pool C free bit
D02
W
0
326
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Multicast Address Filter registers
Bits
D01
D00
Access Mnemonic Reset
Description
Pool B free bit
Pool A free bit
W
W
RXFREEB
RXFREEA
0
0
Multicast Address Filter registers
Each of the eight entries in the multicast address filter logic has individual registers
to hold its 48-bit multicast address. The multicast address for each entry is split
between two registers. Each entry has a register that contains the lower 32 bits of
the multicast address and a separate register that contains the upper 16 bits of the
address. For an explanation of the synchronization scheme used for these registers,
Multicast Low
Address Filter
Register #0
Address: A060 0A40
D31:00
R/W
Default = 0x0000 0000
Default = 0x0000 0000
Default = 0x0000 0000
Default = 0x0000 0000
Default = 0x0000 0000
Default = 0x0000 0000
MFILTL0
MFILTL1
MFILTL2
MFILTL4
MFILTL4
MFILTL5
Multicast Low
Address Filter
Register #1
Address: A060 0A44
D31:00
R/W
Multicast Low
Address Filter
Register #2
Address: A060 0A48
D31:00
R/W
Multicast Low
Address Filter
Register #3
Address: A060 0A4C
D31:00
R/W
Multicast Low
Address Filter
Register #4
Address: A060 0A50
D31:00
R/W
Multicast Low
Address Filter
Register #5
Address: A060 0A54
D31:0
R/W
www.digiembedded.com
327
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Multicast Address Filter registers
Multicast Low
Address Filter
Register #6
Address: A060 0A58
D31:00
R/W
Default = 0x0000 0000
Default = 0x0000 0000
MFILTL6
MFILTL7
Multicast Low
Address Filter
Register #7
Address: A060 0A5C
D31:00
R/W
Multicast High
Address Filter
Register #0
Address: A060 0A60
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFILTH0
R/W
Multicast High
Address Filter
Register #1
Address: A060 0A64
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFILTH1
R/W
Multicast High
Address Filter
Register #2
Address: A060 0A68
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFILTH2
R/W
Multicast High
Address Filter
Register #3
Address: A060 0A6C
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFILTH3
R/W
Multicast High
Address Filter
Register #4
Address: A060 0A70
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFILTH4
R/W
Multicast High
Address Filter
Register #5
Address: A060 0A74
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFILTH5
R/W
328
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Multicast Address Mask registers
Multicast High
Address Filter
Register #6
Address: A060 0A78
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFILTH6
R/W
Multicast High
Address Filter
Register #7
Address: A060 0A7C
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFILTH7
R/W
Multicast Address Mask registers
Each of the eight entries in the multicast address filter logic has individual mask
registers that extend the filtering range of each entry. The multicast address mask
for each entry is split between two registers. Each entry has a register that contains
the lower 32 bits of the multicast mask and a separate register that contains the
upper 16 bits of the mask.
ꢀ
ꢀ
Bits are set to 1 in the mask to enable or include that bit in the address filter.
Bits are set to 0 in the mask if they are not included or are disabled in the
address filter. These bits become don’t cares.
For an explanation of the synchronization scheme used for these registers, see
Multicast Low
Address Mask
Register #0
Address: A060 0A80
D31:00
R/W
Default = 0x0000 0000
Default = 0x0000 0000
Default = 0x0000 0000
Default = 0x0000 0000
MFMSKL0
MFMSKL1
MFMSKL2
MFMSKL3
Multicast Low
Address Mask
Register #1
Address: A060 0A84
D31:00
R/W
Multicast Low
Address Mask
Register #2
Address: A060 0A88
D31:00
R/W
Multicast Low
Address Mask
Register #3
Address: A060 0A8C
D31:00
R/W
www.digiembedded.com
329
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Multicast Address Mask registers
Multicast Low
Address Mask
Register #4
Address: A060 0A90
D31:00
R/W
Default = 0x0000 0000
Default = 0x0000 0000
Default = 0x0000 0000
Default = 0x0000 0000
MFMSKL4
MFMSKL5
MFMSKL6
MFMSKL7
Multicast Low
Address Mask
Register #5
Address: A060 0A94
D31:00
R/W
Multicast Low
Address Mask
Register #6
Address: A060 0A98
D31:00
R/W
Multicast Low
Address Mask
Register #7
Address: A060 0A9C
D31:00
R/W
Multicast High
Address Mask
Register #0
Address: A060 0AA0
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFMSKH0
R/W
Multicast High
Address Mask
Register #1
Address: A060 0AA4
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFMSKH1
R/W
Multicast High
Address Mask
Register #2
Address: A060 0AA8
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFMSKH2
R/W
Multicast High
Address Mask
Register #3
Address: A060 0AAC
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFMSKH3
R/W
Multicast High
Address Mask
Register #4
Address: A060 0AB0
D31:16
R
Default = 0x0000 0000
Reserved (read as 0)
330
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Multicast Address Filter Enable register
D15:00
R/W
Default = 0x0000 0000
MFMSKH4
Multicast High
Address Mask
Register #5
Address: A060 0AB4
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFMSKH5
R/W
Multicast High
Address Mask
Register #6
Address: A060 0AB8
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFMSKH6
R/W
Multicast High
Address Mask
Register #7
Address: A060 0ABC
D31:16
D15:00
R
Default = 0x0000 0000
Default = 0x0000 0000
Reserved (read as 0)
MFMSKH7
R/W
Multicast Address Filter Enable register
Address: A060 0AC0
The Multicast Address Filter Enable register individually enables each of the eight
entries in the multicast address filter logic. For an explanation of the
Register
31
15
30
14
29
13
28
27
11
26
10
25
24
8
23
22
21
20
19
18
17
16
0
Reserved
12
9
7
6
5
4
3
2
1
MFILT MFILT MFILT MFILT MFILT MFILT MFILT MFILT
EN7 EN6 EN5 EN4 EN3 EN2 EN1 EN0
Reserved
www.digiembedded.com
331
E T H E R N E T C O M M U N I C A T I O N M O D U L E
TX Buffer Descriptor RAM
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07
R
Reserved
N/A
Read as 0
R/W
MFILTEN7
0x0000 0000
Enable entry 7 of multicast address filter
0
1
Disable entry
Enable entry
D06
D05
D04
D03
D02
D01
D00
R/W
R/W
R/W
R/W
R/W
R/W
R/W
MFILTEN6
MFILTEN5
MFILTEN4
MFILTEN3
MFILTEN2
MFILTEN1
MFILTEN0
0x0000 0000
0x0000 0000
0x0000 0000
0x0000 0000
0x0000 0000
0x0000 0000
0x0000 0000
Enable entry 6 of multicast address filter
0
1
Disable entry
Enable entry
Enable entry 5 of multicast address filter
0
1
Disable entry
Enable entry
Enable entry 4 of multicast address filter
0
1
Disable entry
Enable entry
Enable entry 3 of multicast address filter
0
1
Disable entry
Enable entry
Enable entry 2 of multicast address filter
0
1
Disable entry
Enable entry
Enable entry 1 of multicast address filter
0
1
Disable entry
Enable entry
Enable entry 0 of multicast address filter
0
1
Disable entry
Enable entry
TX Buffer Descriptor RAM
Address: A060 1000
The TX buffer descriptor RAM holds 64 transmit buffer descriptors on-chip. Each
buffer descriptor occupies four locations in the RAM, and the RAM is implemented
as a 256x32 device. This is the format of the TX buffer descriptor RAM:
Offset+0
D31:00
R/W
Source address
332
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
RX FIFO RAM
Offset+4
D31:11
D10:00
R/W
R/W
Not used
Buffer length
Offset+8
Offset+C
D31:00
R/W
Destination address (not used)
D31
R/W
R/W
R/W
R/W
R/W
R/W
W
Wrap
D30
I
Interrupt on buffer completion
Last buffer on transmit frame
Buffer full
D29
L
D28
F
D27:16
D15:00
Reserved
Status
N/A
Transmit status from MAC
the fields in Offset+C.
RX FIFO RAM
Address: A060 2000 (512 locations)
The 2k Byte RX FIFO RAM can be used by the CPU as a scratch pad memory during
boot up. CPU access is enabled by setting the RXRAM bit in the Ethernet General
Control Register 1. This bit must be cleared before enabling the Ethernet receiver.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Scr Mem
8
Scr Mem
Register bit
assignment
Bits
Access Mnemonic Reset
R/W Scr Mem
Description
CPU scratch pad memory
D31:00
0
www.digiembedded.com
333
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Sample hash table code
Sample hash table code
This sample C code describes how to calculate hash table entries based on 6-byte
Ethernet destination addresses and a hash table consisting of two 32-bit registers
(HT1 and HT2). HT1 contains locations 31:0 of the hash table; HT2 contains
locations 63:32 of the hash table.
The pointer to the hash table is bits [28:23] of the Ethernet destination address
CRC. The polynomial is the same as that used for the Ethernet FCS:
G(x) = x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1
static ETH_ADDRESS mca_address[MAX_MCA];
static INT16 mca_count;
/*list of MCA addresses*/
/*# of MCA addresses*/
/
*
*
* Function: void eth_load_mca_table (void)
*
* Description:
*
* This routine loads the MCA table. It generates a hash table for
* the MCA addresses currently registered and then loads this table
* into the registers HT1 and HT2.
*
* Parameters:
*
*
*
none
* Return Values:
*
*
none
*
*/
static void eth_load_mca_table (void)
{
WORD32 has_table[2];
// create hash table for MAC address
eth_make_hash_table (hash_table);
334
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Sample hash table code
(*MERCURY_EFE).ht2.bits.data = SWAP32(hash_table[1]);
(*MERCURY_EFE).ht1.bits.data = SWAP32(hash_table[0]);
}
/
*
*
* Function: void eth_make_hash_table (WORD32 *hash_table)
*
* Description:
*
*
*
*
*
*
*
*
*
*
*
This routine creates a hash table based on the CRC values of
the MAC addresses setup by set_hash_bit(). The CRC value of
each MAC address is calculated and the lower six bits are used
to generate a value between 0 and 64. The corresponding bit in
the 64-bit hash table is then set.
Parameters:
hash_table
pointer to buffer to store hash table in.
* Return Values:
*
*
none
*
*/
static void eth_make_hash_table (WORD32 *hash_table)
{
int index;
memset (hash_table, 0, 8);
/* clear hash table*/
for (index = 0; index < mca_count; index++)
{
/*for each mca address*/
set_hash_bit ((BYTE *) hash_table, calculate_hash_bit (mca_address
[index]));
}
}
www.digiembedded.com
335
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Sample hash table code
/
*
*
* Function: void set_hash_bit (BYTE *table, int bit)
*
* Description:
*
*
*
This routine sets the appropriate bit in the hash table.
* Parameters:
*
*
*
*
table
bit
pointer to hash table
position of bit to set
* Return Values:
*
*
none
*
*/
static void set_hash_bit (BYTE *table, int bit)
{
int byte_index, bit_index;
byte-index = bit >> 3;
bit_index = bit & 7;
table [byte_index] |= (1 << bit_index);
}
/
*
*
* Function: int calculate_hash_bit (BYTE *mca)
*
* Description:
*
*
*
*
This routine calculates which bit in the CRC hash table needs
to be set for the MERCURY to recognize incoming packets with
the MCA passed to us.
* Parameters:
*
*
mca
pointer to multi-cast address
336
Hardware Reference NS9215
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Sample hash table code
*
* Return Values:
*
*
bit position to set in hash table
*
*/
#define POLYNOMIAL 0x4c11db6L
static int calculate_hash_bit (BYTE *mca)
{
WORD32 crc;
WORD16 *mcap, bp, bx;
int result, index, mca_word, bit_index;
BYTE lsb;
WORD16 copy_mca[3]
memcpy (copy_mca,mca,sizeof(copy_mca));
for (index = 0; index < 3; index++)
{
copy_mca [index] = SWAP16 (copy_mca [index]);
}
mcap = copy_mca;
crc = 0xffffffffL;
for (mca_word = 0; mca_word < 3; mca_word++)
{
bp = *mcap;
mcap++;
for (bit_index = 0; bit_index < 16; bit_index++)
{
bx = (WORD16) (crc >> 16);
/* get high word of crc*/
/* bit 31 to lsb*/
bx = rotate (bx, LEFT, 1);
bx ^= bp;
/* combine with incoming*/
/* shift crc left 1 bit*/
/* get control bit*/
crc <<= 1;
bx &= 1;
if (bx)
/* if bit set*/
{
crc ^= POLYNOMIAL;
/* xero crc with polynomial*/
/* or in control bit*/
}
crc |= bx:
www.digiembedded.com
337
E T H E R N E T C O M M U N I C A T I O N M O D U L E
Sample hash table code
bp = rotate (bp, RIGHT, 1);
}
}
// CRC calculation done. The 6-bit result resides in bit
// locations 28:23
result = (crc >> 23) & 0x3f;
return result;
}
338
Hardware Reference NS9215
E X T E R N A L D M A
DMA transfers
External DMA
C
H
A
P
T
E
R
6
The external DMA interface provides two external channels for external
peripheral support. Each DMA channel moves data from the source address to the
destination address. These addresses can specify any peripheral on the AHB bus but,
ideally, they specify an external peripheral and external memory.
DMA transfers
DMA transfers can be specified as burst-oriented to maximize AHB bus efficiency.
All transfers are performed in two steps:
1
Data is moved from the source address to a 32-byte buffer in the DMA control
logic.
2
The data is moved from the 32-byte buffer to the destination address.
These two steps are repeated until the DMA transfer is complete.
Note: Optimal performance is achieved when both the source address and
destination address are aligned.
Initiating DMA
transfers
DMA transfers can be initiated in one of two ways: processor-initiated and external
peripheral initiated.
Processor-
initiated
The processor must do these steps in the order shown:
1
2
3
Set up the required buffer descriptors.
Configure the DMA Control register for each channel.
Write a 1 to both the CE field and the CG field in the DMA Control register for
each channel.
External
peripheral-
initiated
An external peripheral initiates a DMA transfer by asserting the appropriate REQ
signal. Software must have set up the required buffer descriptors as well as the DMA
Control register for each channel, including setting the CE field to 1, before the REQ
signal can be asserted.
www.digiembedded.com
339
E X T E R N A L D M A
DMA buffer descriptor
DMA buffer descriptor
All DMA channels use a buffer descriptor. When a DMA channel is activated, it reads
the DMA buffer descriptor that the Buffer Descriptor Pointer register points to. A
DMA buffer descriptor is always fetched using an AHB INCR4 transaction to maximize
AHB bus bandwidth. When the current descriptor is retired, the next descriptor is
accessed from a circular buffer.
Each DMA buffer requires four 32-bit words to describe a transfer. Multiple buffer
descriptors are located in circular buffers of 4096 bytes. The DMA channel’s buffer
descriptor pointer provides the first buffer descriptor address. Subsequent buffer
descriptors are found adjacent to the first descriptor. The final buffer descriptor is
defined with its W bit set. When the DMA channel finds the W bit, the channel
wraps around to the first descriptor.
Each DMA channel can address a maximum of 256 buffer descriptors.
Important: A DMA channel configured for more than the maximum number of
buffer descriptors operates in an unpredictable fashion.
DMA buffer
descriptor
diagram
31 30 29 28
16 15
0
OFFSET + 0
OFFSET + 4
Source address
Reserved
Buffer length
Status
8
Destination address
OFFSET +
W
I
L
F
Reserved
OFFSET + C
Field descriptions follow.
Source address
[pointer]
The source address pointer field identifies the starting location of the source data.
The source address can be aligned to any byte boundary.
Note: Optimal performance is achieved when the source address is aligned on a
word boundary.
Buffer length
Buffer length indicates the number of bytes to move between the source and the
destination. After completing the transfer, the DMA controller updates this field with
the actual number of bytes moved. This is useful for debugging error conditions or
determining the number of bytes transferred before the DONE signal was asserted.
Destination
address [pointer]
The description address pointer field identifies the starting location of the source
data’s destination; that is, to where the source data needs to be moved. The
destination address can be aligned to any byte boundary.
340
Hardware Reference NS9215
E X T E R N A L D M A
Descriptor list processing
Note: Optimal performance is achieved when the destination address is aligned on a
word boundary.
Status
This field is not used. Read back 0x0000.
Wrap (W) bit
The Wrap (W) bit, when set, tells the DMA controller that this is the last buffer
descriptor within the continuous list of descriptors. The next buffer descriptor is
found using the initial DMA channel buffer descriptor pointer. When the W bit is not
set, the next buffer descriptor is found using an offset of 0x10 from the current
buffer descriptor.
Interrupt (I) bit
The Interrupt (I) bit, when set, tells the DMA controller to issue an interrupt to the
CPU when the buffer is closed due to a normal channel completion. The interruption
occurs regardless of the normal completion interrupt enable configuration for the
DMA channel.
Last (L) bit
Full (F) bit
The Last (L) bit, when set, tells the DMA controller that this buffer descriptor is the
last descriptor that completes an entire message frame. The DMA controller uses this
bit to assert the normal channel completion status when the byte count reaches zero.
The Full (F) bit, when set, indicates that the buffer descriptor is valid and can be
processed by the DMA channel. The DMA channel clears this bit after completing the
transfer(s).
The DMA channel does not try a transfer with the F bit clear. The DMA channel
enters an idle state upon fetching a buffer descriptor with the F bit cleared.
Whenever the F bit is modified by the device driver, the device driver must also
write a 1 to the CE bit in the DMA Control register to activate the idle channel.
Descriptor list processing
Once a DMA controller has completed the operation specified by the current buffer
descriptor, it clears the F bit and fetches the next buffer descriptor. A DMA channel
asserts the NRIP field (buffer not ready interrupt pending) in the DMA Status
register and returns to the idle state upon fetching a buffer descriptor with the F bit
in the incorrect state. A DMA channel always closes the current descriptor and
moves on to the next descriptor when a DMA transfer is terminated by the assertion
of the DONE signal.
www.digiembedded.com
341
E X T E R N A L D M A
Peripheral DMA read access
Peripheral DMA read access
The diagrams in this section describe how the DMA engine performs read accesses of
an external peripheral.
ꢀ
ꢀ
ꢀ
The CLK signal shown is for reference, and its frequency is equal to the speed
grade of the part.
The peripheral data enable signal (PDEN) is an AND function of the active
states of the st_cs_n[n] and st_oe_n signals.
PDEN timing can be adjusted by the memory controller’s Static Memory
Configuration 0-3 registers, which control st_cs_n[n] and st_oe_n.
Note: The PDEN signal is asserted for all accesses on the selected peripheral chip
select. If configuration registers or memory also need to be accessed, you can
use high level address bits and an external gate to disable the PDEN signal.
You can also place the peripheral and configuration registers on separate chip
selects to avoid the need for the external gate.
Determining the
width of PDEN
DMA read accesses from an external peripheral are treated as asynchronous
operations by the chip. It is critical that the necessary width of the PDEN assertion
be computed correctly and programmed in the static memory controllers.
Use this equation to compute total access time:
Total access time = T + T +T + 10.0
a
b
c
Equation
variables
Variable
Definition
T
T
T
Peripheral read access time
a
b
c
Total board propagation delay including buffers
One AHB CLK cycle period
342
Hardware Reference NS9215
E X T E R N A L D M A
Peripheral DMA write access
Peripheral DMA
single read access
CLK
st_cs_n[n]
st_oe_n
ADDR
Address Valid
PDEN
DQ
DATA VALID
Peripheral DMA
burst read access
CLK
st_cs_n[n]
st_oe_n
ADDR
ADDR0
ADDR1
PDEN
DQ
DATA0
DATA1
Peripheral DMA write access
The diagrams in this section describe how the DMA engine performs write accesses
of an external peripheral. The CLK signal shown is for reference, and its frequency
is equal to the speed grade of the part. For peripheral writes, the PDEN signal is an
AND function of the active status of st_cs_n[n] and we_n. Write data into the
peripheral on the falling edge of the PDEN signal. Data and control signals are
always held after the falling edge of PDEN for one reference CLK cycle.
www.digiembedded.com
343
E X T E R N A L D M A
Peripheral REQ and DONE signaling
Determining the
width of PDEN
Use the memory controller’s Static Memory Write Delay register and Static Memory
Write Enable Delay register to determine the width of the PDEN assertion.
Peripheral DMA
single write access
CLK
st_cs_n[n]
we_n
PDEN
ADDR &
DATA
Addr/Data Valid
Peripheral DMA
burst write access
CLK
st_cs_n[n]
we_n
PDEN
ADDR &
DATA
ADDR0/DATA0
ADDR1/DATA1
ADDR2/DATA2
Peripheral REQ and DONE signaling
The processor treats the REQ and DONE signals as asynchronous, level signals.
REQ signal
ꢀ
ꢀ
ꢀ
The external peripheral can initiate a DMA transfer at any time by asserting the
REQ signal.
The external peripheral can pause the DMA transfer at any time by deasserting
the REQ signal.
The REQ signal can be deasserted during a transfer but if the peripheral is
configured for burst access, the burst completes. The DMA transfer control
logic remains paused until the REQ signal is reasserted.
344
Hardware Reference NS9215
E X T E R N A L D M A
Static RAM chip select configuration
DONE signal
ꢀ
ꢀ
The external peripheral can terminate the DMA transfer at any time by
asserting the DONE signal. The peripheral must also deassert the REQ signal
when it asserts the DONE signal.
The DONE signal can be asserted during a transfer but if the peripheral is
configured for burst access, the burst completes. When the DMA control logic
finds a DONE assertion, it closes the current buffer descriptor, asserts a
premature buffer completion status, and pauses until the REQ signal is
reasserted. The DONE cycle must be deasserted no later that four AHB clock
cycles before reasserting the REQ signal.
Special
circumstances
ꢀ
ꢀ
For memory-to-memory DMA transfers that are initiated by software writing a
1 to the channel go (CG) field in the DMA Control register, the DMA control
logic ignores the REQ and DONE signals.
For memory-to-peripheral transfers, the DMA control logic ignores the DONE
signal.
Static RAM chip select configuration
The AHB DMA controller accesses an external peripheral using the external memory
bus and one of the static ram chip select signals (st_cs_n[N]).
Static ram chip
select
configuration
This table shows how to program the static ram chip select control registers for
access using the AHB DMA controller. Fields not explicitly listed must be left in the
reset state. Fields listed but not defined must be defined by you.
Register name
Field
PB
Value
Comment
Configuration
1
System requirement
PM
User-defined
Set to 1 if it is not necessary for the chip
select signal to toggle for each access.
MW
User-defined
User-defined
Read Delay
WTRD
To determine the read delay:
1
Use this equation to compute the
total delay:
T + T + T + 10.0
a
b
c
7
8
Divide the total delay by the AHB clock
period
Round up any fractional value
Page Read Delay
WTPG
user-defined
For most applications, this is the same value
as the WTRD value.
www.digiembedded.com
345
E X T E R N A L D M A
Control and Status registers
Register name
Field
Value
Comment
Output Enable Delay
WOEN
User-defined
For most applications, this field can be set to
0.
Write Enable Delay
Write Delay
WWEN
WTWR
WTTN
User-defined
User-defined
User-defined
For most applications, this field can be left in
the default state.
For most applications, this field can be left in
the default state.
Turn Delay
For most applications, this field can be left in
the default state.
Control and Status registers
The external DMA configuration registers are located at base address 0xA080_0000.
All the configuration registers are accessed with zero wait states.
Register address
map
These are the external DMA control and status registers.
Address
Description
Access
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset value
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0xA080_0000
0xA080_0004
0xA080_0008
0xA080_000C
0xA080_0010
0xA080_0014
0xA080_0018
0xA080_001C
DMA Channel 1 Buffer Descriptor Pointer
DMA Channel 1 Control register
DMA Channel 1 Status and Interrupt Enable
DMA Channel 1 Peripheral Chip Select
DMA Channel 2 Buffer Descriptor Pointer
DMA Channel 2 Control register
DMA Channel 2 Status and Interrupt Enable
DMA Channel 2 Peripheral Chip Select
DMA Buffer Descriptor Pointer
Address: A080_0000, A080_0010
The DMA Buffer Descriptor Pointer register contains a 32-bit pointer to the first
buffer in a contiguous list of buffer descriptors.
The external DMA module has two of these registers. Each buffer descriptor is 16
bytes in length.
346
Hardware Reference NS9215
E X T E R N A L D M A
DMA Control register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
BuffDesc
8
BuffDesc
Register bit
assignment
Bit(s)
Access Mnemonic
R/W BuffDesc
Reset
Description
32-bit pointer to a buffer descriptor
D31:00
0x0000_0000
DMA Control register
Address: A080_0004, A080_0014
The DMA Control register contains the required DMA transfer control information. The
external DMA module has two of these registers.
Register
31
CE
30
29
28
12
27
11
26
10
25
9
24
8
23
7
22
6
21
20
19
18
17
16
SINC_N SINC_N
CA CG
SW
DW
SB
DB
POL MODE RST
15
14
13
5
4
3
2
1
0
STATE
INDEX
www.digiembedded.com
347
E X T E R N A L D M A
DMA Control register
Register bit
assignment
Bit(s)
Access Mnemonic
Reset
Description
D31
R/W
CE
0
Channel enable
Enables and disables DMA operations as required.
After a DMA channel has entered the IDLE state
for any reason, this field must be written to a 1 to
initiate further DMA transfers.
D30
D29
R/W
R/W
CA
CG
0
0
Channel abort
When set, causes the current DMA operation to
complete and closes the buffer.
Channel go
When set, causes the DMA channel to exit the
IDLE state and begin a DMA transfer. The CE
field 31) must also be set, which allows software
to initiate a memory-to-memory transfers.
The dma_req and dma_done signals are not used
during memory-to-memory transfers.
D28:27
D26:25
D24:23
R/W
R/W
R/W
SW
DW
SB
0
0
0
Source width
Defines the data bus width of the device attached
to the source address specified in the buffer
descriptor.
00
01
10
11
8 bit
16 bit
32 bit
Reserved
Destination width
Defines the data bus width of the device attached
to the destination address specified in the buffer
descriptor.
00
01
10
11
8 bit
16 bit
32 bit
Reserved
Source burst
Defines the AHB maximum burst size allowed
when reading from the source. Note that the
source must have enough data, as defined by this
register setting, before asserting REQ.
00
1 unit as set by the source width field
(D28:27)
01
10
11
4 bytes (Recommended for 8-bit devices)
16 bytes (Recommended for 16-bit devices)
32 bytes (Recommended for 32-bit devices)
348
Hardware Reference NS9215
E X T E R N A L D M A
DMA Control register
Bit(s)
Access Mnemonic
Reset
Description
D22:21
R/W
DB
0
Destination burst
Defines the AHB maximum burst size allowed
when writing to the destination. Note that the
destination must have enough space, as defined by
this register setting, before asserting REQ.
00
1 unit as set by the destination width field
(D26:25)
01
10
11
4 bytes (Recommended for 8-bit devices)
16 bytes (Recommended for 16-bit devices)
32 bytes (Recommended for 32-bit devices)
D20
R/W
SINC_N
0
Source address increment
Controls whether the source address pointers are
incremented after each DMA transfer. The DMA
controller uses these bits in all modes whenever
referring to a memory address.
0
1
Increment source address pointer
Do not increment source address pointer
D19
R/W
DINC_N
0
Destination address increment
Controls whether the destination address pointers
are incremented after each DMA transfer. The
DMA controller uses these bits whenever
referring to a memory address.
0
1
Increment destination address pointer
Do not increment destination address pointer
D18
D17
R/W
R/W
POL
0
0
Control signal polarity
Defines the active polarity of the dma_req,
dma_done, and PDEN signals.
0
1
Active high signals
Active low signals
MODE
Fly-by mode
Defines the direction of data movement for fly-by
DMA transfers.
0
Peripheral-to-memory fly-by-write DMA
transfer
1
Memory-to-peripheral fly-by-read DMA
transfer
Note:
This field is not used for DMA transfers
initiated by writing a 1 to the CG field in
this register (D29).
www.digiembedded.com
349
E X T E R N A L D M A
DMA Status and Interrupt Enable register
Bit(s)
Access Mnemonic
Reset
Description
D16
R/W
RST
0
Reset
Forces a reset of the DMA channel. Writing a 1 to
this field forces all fields in this register, except the
index field, to the reset state. The reset field is
written with the value specified on signals
HWDATA[9:0]. This field always reads back a 0.
Note:
Writing a 1 to this field while the DMA
channel is operational will have unpre-
dictable results.
D15:10
D09:00
R
STATE
INDEX
0
0
State
0
Idle
1-3
4-7
8-12
13
Buffer descriptor read
Data transfer
Buffer descriptor update
Error
R/W
Index
Identifies the current 16-byte offset pointer
relative to the buffer descriptor pointer.
Note:
This field can be written to only when
the RST field (D16) is being written to a
1.
DMA Status and Interrupt Enable register
Address: A080_0008, A080_0018
The DMA Status and Interrupt Enable register contains the DMA transfer status and
control information used in generating AHB DMA interrupt signals. The external DMA
module has two of these registers.
Register
31
30
29
28
27
26
25
9
24
23
22
21
20
19
18
17
16
Not
used
NCIP ECIP NRIP
CAIP PCIP
NCIE ECIE NRIE
CAIE PCIE WRAP DONE LAST FULL
15
14
13
12
11
10
8
7
6
5
4
3
2
1
0
BLEN
350
Hardware Reference NS9215
E X T E R N A L D M A
DMA Status and Interrupt Enable register
Register bit
assignment
Bit(s)
Access Mnemonic
Reset
Description
D31
R/W1C
NCIP
0
Normal completion interrupt pending
Set when a buffer descriptor has been closed. A
normal DMA channel completion occurs when the
BLEN count (D15:00) expires to zero and the L
but in the buffer descriptor is set or when the
peripheral device signals completion.
D30
R/W1C
ECIP
0
Error completion interrupt pending
Set when the DMA channel encounters either a
bad buffer descriptor pointer or a bad data buffer
pointer. When the ECIP bit is set, the DMA
channel stops until the ECIP bit is cleared by
firmware. The DMA channel does not advance to
the next buffer descriptor.
When firmware clears the ECIP bit, the buffer
descriptor is retried from where it left off. The CA
bit in the DMA Control register can be used to
abort the current buffer descriptor and advance to
the next descriptor.
D29
R/W1C
NRIP
0
Buffer not ready interrupt pending
Set when the DMA channel encounters a buffer
descriptor whose F bit is in the incorrect state. The
F bit must be set in order for the fetched buffer
descriptor to be considered valid. If the F bit is not
set, the descriptor is considered invalid and the
NRIP field is set.
When the NRIP bit is set, the DMA channel stops
until the field is cleared by firmware. The DMA
channel does not advance to the next buffer
descriptor.
D28
R/W1C
CAIP
0
Channel abort interrupt pending
Set when the DMA channel detects the CA bit
(D30) set in the DMA Control register. When
CAIP is set, the DMA channel stops until the
CAIP bit is cleared by firmware. The DMA
channel automatically advances to the next buffer
descriptor after CAIP is cleared.
The CA bit in the DMA Control register must be
cleared, through firmware, before the CAIP bit is
cleared. Failure to reset the CA bit cause the next
buffer descriptor to abort also.
D27
R/W1C
R/W
PCIP
0
0
Premature complete interrupt pending
Set when a DMA transfer is terminated by
assertion of the dma_done signal. NCIP is set
when PCIP is set for backwards compatibility.
D26:25
Not used
This field must always be set to 0.
www.digiembedded.com
351
E X T E R N A L D M A
DMA Peripheral Chip Select register
Bit(s)
D24
Access Mnemonic
Reset
Description
R/W
R/W
NCIE
ECIE
0
0
Enable NCIP interrupt generation.
D23
Enable ECIE interrupt generation. This interrupt
should always be enabled during normal
operation.
D22
D21
R/W
R/W
NRIE
CAIE
0
0
Enable NRIP interrupt generation.
Enable CAIP interrupt generation. This interrupt
should always be enabled during normal
operation.
D20
D19
R/W
R
PCIE
0
0
Enable PCIP interrupt generation.
WRAP
Read-only debug field that indicates the last
descriptor in the descriptor list.
D18
R
R
R
R
DONE
LAST
FULL
BLEN
0
0
0
0
Read-only debug field that indicates the status of
the DONE signal.
D17
Read-only debug field that indicates the last buffer
descriptor in the current data frame.
D16
Read-only debug field that indicates the status of
the F bit from the current DMA buffer descriptor.
D15:00
Read-only debug field that indicates the current
byte transfer count.
DMA Peripheral Chip Select register
Address: A080_000C, A080_001C
The DMA Peripheral Chip Select register contains the DMA channel peripheral chip
select definition. The external DMA module has two of these registers.
Register
31
15
30
14
29
13
28
12
27
26
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
16
0
Not used
11
10
8
1
Not used
SEL
352
Hardware Reference NS9215
E X T E R N A L D M A
DMA Peripheral Chip Select register
Register bit
assignment
Bit(s)
D31:02
D01:00
Access Mnemonic
Reset
Definition
R/W
R/W
Not used
SEL
0
0
This field must always be set to 0.
Chip select
Defines which of the four memory interface chip
select signals (nmpmcstcsout[n]) is connected to
the external peripheral.
00
01
10
11
nmpmcstcsout[0]
nmpmcstcsout[1]
nmpmcstcsout[2]
nmpmcstcsout[3]
www.digiembedded.com
353
E X T E R N A L D M A
DMA Peripheral Chip Select register
354
Hardware Reference NS9215
A E S D A T A E N C R Y P T IO N / D E C R Y P T I O N M O D U L E
AES Data Encryption/Decryption
Module
C
H
A
P
T
E
R
6
The AES data encryption/decryption module provides IPSec-compatible network
security to processor-based systems. The AES core module implements Rijndael
encoding/decoding in compliance with the NIST Advanced Encryption Standard
(AES).
Features
ꢀ
ꢀ
ꢀ
ꢀ
Processes 32 bits at a time.
Is programmable for 128-, 192-, or 256-bit key lengths.
Supports ECB, CBC, OFB, CTR, and CCM cipher modes.
Implements a hardware key expander to minimize software intervention during
the encryption/decryption process. During encryption and decryption, the key
expander can produce the expanded key on the fly.
ꢀ
ꢀ
information about DMA control registers and programming).
Uses the buffer descriptor control field to indicate a memory-to-memory AES
operation.
www.digiembedded.com
355
A E S D A T A E N C R Y P T I O N / D E C R Y P T I O N M O D U L E
AES DMA buffer descriptor
Block diagram
From System Memory
To System Memory
Ch 1 Ext DMA
Source
Ch 1 Ext DMA
Destination
Mode and Control
IV
Expanded Key
Data Out
Key
Expander
FIFO
AES
Engine
Data In
FIFO
Data blocks
The AES module works on 128-bit blocks of data. This table shows the performance
per each 128-bit block, depending on the key size:
Key size
Characteristic
128
44
192
52
256
60
Number of cycles
Latency (cycles)
44
52
60
Throughput (bits/cycles)
Throughput @ 75 MHz (bytes/sec)
~2.90
~27.19
~2.46
~23.06
~2.13
~19.97
AES DMA buffer descriptor
The AES DMA buffer descriptor is the same as the external DMA buffer descriptor,
with the exception of the control bits — AES op and AES control.
356
Hardware Reference NS9215
A E S D A T A E N C R Y P T IO N / D E C R Y P T I O N M O D U L E
AES DMA buffer descriptor
AES buffer
descriptor
diagram
31 30 29 28
16 15
0
OFFSET + 0
OFFSET + 4
Source address
Destination buffer length
Source buffer length
AES control
8
Destination address
AES Op
OFFSET +
W
I
L
F
Reserved
OFFSET + C
Field definitions follow.
Source address
[pointer]
The source address pointer identifies the starting location of the source data. The
source address can be aligned to any byte boundary.
Note: Optimal performance is achieved when the source address is aligned on a
word boundary.
Source buffer
length
The source buffer length indicates the number of bytes to be read from the source.
After completing the transfer, the DMA controller updates this field with the actual
number of bytes that were moved. This is useful for debugging error conditions or
determining the number of bytes transferred before the DONE signal was asserted.
Destination buffer
length
The destination buffer length indicates the number of bytes to be written to the
destination. This field should be identical to the source buffer length for all modes —
with the exception of CCM — when the authentication code is being generated or a
key is being expanded.
Destination
address [pointer]
The description address pointer field identifies the starting location of the source
data’s destination; that is, to where the source data needs to be moved. The
destination address must be word-aligned.
AES control
Bits
Used for
Values
[2:0]
Encryption mode select
000
001
010
011
100
101
111
CBC
CFB
OFB
CTR
ECB
CCM
Key expand mode, which allows a key to be
expanded by the hardware key expander and
written back to system memory
[3]
Encryption/decryption select
0
1
Encryption
Decryption
www.digiembedded.com
357
A E S D A T A E N C R Y P T I O N / D E C R Y P T I O N M O D U L E
AES DMA buffer descriptor
Bits
Used for
Values
[5:4]
Key size
00
01
10
128 bits
192 bits
256 bits
[6]
Additional authentication data (CCM
mode only)
0
1
No additional data
Additional data used
[9:7]
L-par (CCM mode only)
Reserved
N/A
N/A
N/A
N/A
[10]
[13:11]
[15:14]
M-par (CCM mode only)
Reserved
AES op code
Indicates the contents of the data buffer associated with this descriptor:
000 Non-AES memory-to-memory or external DMA mode
001 Key buffer
010 IV buffer
011 Nonce buffer (CCM mode only, 16 bytes fixed length)
100 Additional authentication data (CCM mode only)
101 Data to be encrypted or decrypted
WRAP (W) bit
The Wrap (W) bit, when set, tells the DMA controller that this is the last buffer
descriptor within the continuous list of descriptors. The next buffer descriptor is
found using the initial DMA channel buffer descriptor pointer. When the W bit is not
set, the next buffer descriptor is found using an offset of 0x10 from the current
buffer descriptor.
Interrupt (I) bit
The Interrupt bit, when set, tells the DMA controller to issue an interrupt to the CPU
when the buffer is closed due to a normal channel completion. The interrupt occurs
regardless of the normal completion interrupt enable configuration for the DMA
channel.
Last (L) bit
Full (F) bit
The Last bit, when set, tells the DMA controller that this buffer descriptor is the last
descriptor that completes an entire message frame. The DMA controller uses this bit
to assert the normal channel completion status when the byte count reaches zero.
The Full bit, when set, indicates that the buffer descriptor is valid and can be
processed by the DMA channel. The DMA channel clears this bit after completing the
transfer(s).
358
Hardware Reference NS9215
A E S D A T A E N C R Y P T IO N / D E C R Y P T I O N M O D U L E
Decryption
The DMA channel does not try a transfer when the F bit is clear. The DMA channel
enters an idle state upon fetching a buffer descriptor with the F bit cleared.
When the F bit is modified by the device driver, the device driver must also write an
‘I’ to the CE bit (in the DMA Control register) to activate the idle channel.
Decryption
During decryption, the expanded key must be fed to the AES core backwards. The
hardware key expander can handle this, but the input key is different than for
encryption. The key must be expanded and the last words must be written to the
key buffer as shown:
ꢀ
ꢀ
A 128-bit key (K0, K1, K2, K3) is expanded to the following 32-bit word
sequence: K0, K1, ..., K40, K41, K42, K43.
To expand the key backwards, the hardware key expander needs K40-K43.
A 192-bit key (K0, K1, K2, K3, K5, K6) is expanded to the following 32-bit word
sequence: K0, K1, ..., K46, K47, K48, K49, K50, K51.
To expand the key backwards, the hardware key expander core needs
K48-51 followed by K46-47.
ꢀ
A 256-bit key (K0, K1, K2, K3, K5, K6, K7) is expanded to the following 32-bit
word sequence: K0, K1, ..., K52, K53, K54, K55, K56, K57, K58, K59.
To expand the key backwards, the hardware key expander core needs
K56-59 followed by K52-55.
The hardware key expander recreates all the remaining words in backwards order.
ECB processing
ECB mode does not require an initialization vector. Software just needs to set up a
key buffer descriptor, followed by a data buffer descriptor.
Processing flow
diagram
This is the ECB buffer descriptor processing flow:
www.digiembedded.com
359
A E S D A T A E N C R Y P T I O N / D E C R Y P T I O N M O D U L E
CBC, CFB, OFB, and CTR processing
ECB Mode
Encryption/ Decryption
Source DMA
Operations
Destination DMA
Operations
Key Buffer
Data Buffer
Encrypted or
Decrypted Data
CBC, CFB, OFB, and CTR processing
CBC, CFB, OFB, and CTR modes need an initialization vector. Software must set up
this buffer descriptor sequence: Key, IV, Data.
Processing flow
diagram
This is the buffer descriptor processing flow for CBC, CFB, OFB, and CTR:
CBC CFB OFB and CTR Mode
,
,
,
Encryption Decryption
/
Source DMA
Operations
Destination DMA
Operations
Key Buffer
IV
Encrypted or
Decrypted Data
Data Buffer
CCM mode
CCM mode does not require an initialization vector.
360
Hardware Reference NS9215
A E S D A T A E N C R Y P T IO N / D E C R Y P T I O N M O D U L E
CCM mode
ꢀ
ꢀ
For encryption, software must set up this buffer descriptor sequence: Key,
Nonce, additional data (optional), data (used to compute the authentication
code), data (used to perform the actual encryption).
For decryption, software must set up this buffer descriptor sequence: Key,
Nonce, Data (used to perform the actual decryption), Additional data
(optional), Data (used to compute the authentication code).
Note: The data must be DMA’ed through the AES module twice in CCM mode for
both encryption and decryption modes.
Nonce buffer
This is the format of the Nonce buffer:
Bits
127:120
reserved
119:8*L-par
Nonce
8*L-par-1:0
Contents
Message length
Processing flow
This is the CCM buffer descriptor processing flow:
CCM Mode Encryption
CCM Mode Decryption
Source DMA
Operations
Destination DMA
Operations
Source DMA
Operations
Destination DMA
Operations
Key Buffer
Key Buffer
Nonce
Nonce
Additional
Authentication
Data
Data Buffer Pass
1
Decrypted Data
(decryption )
(optional)
Additional
Authentication
Data
Data Buffer Pass
1
(authentication )
Authentication
Code
(optional )
Data Buffer Pass
Data Buffer Pass
2
(authentication )
Authentication
Code
2
Encrypted Data
(encryption )
www.digiembedded.com
361
A E S D A T A E N C R Y P T I O N / D E C R Y P T I O N M O D U L E
CCM mode
362
Hardware Reference NS9215
I/O Hub Module
C
H
A
P
T
E
R
9
The I/O hub provides access to the low speed ports on the processor through one
master port on the AHB bus. The low speed ports include four UART ports, one SPI
2
port, one I C port, 2 multi-function controlled ports, and one analog-to-digital
(A/D) port. UART channel C can be configured for HDLC operation.
The SPI, UART, and A/D ports can be controlled either directly by the CPU or
2
through the DMA controller, which is integrated into the I/O hub, The I C does not
have DMA support.
363
I / O HU B M OD UL E
DMA controller
Block diagram
to SCMInterrupt
Controller
AMBA AHB Bus
AHB Master
AHB Slave
DMA Controller
Rsvd
Rsvd
UART A
UART B
UART C
UART D
A/D
SPI
I2C
GPIO
AHB slave
interface
The CPU has access to the control and status registers in the DMA controller, the
peripheral devices, and the GPIO configuration.
DMA controller
The processor provides an eight channel DMA controller to service the low speed
peripherals. Each channel has a transmit channel and a receive channel.
Servicing RX and
FIFOs
The DMA controller services the RX and FIFOs in a round-robin manner. When one of
the FIFOs needs servicing — that is, it can accept a burst of four 32-bit words — the
DMA controller requests the AHB bus through the AHB master. After the request has
been granted, the peripheral buffer data is transferred to or from system memory.
364
Hardware Reference NS9215
31 March 2008
I / O H U B M O D U L E
DMA controller
Buffer descriptors
The peripheral buffer data is held in buffers in external memory, linked together
using buffer descriptors. The buffer descriptors are 16 bytes in length and are
located contiguously in external memory.
This is the format of the buffer descriptor:
Address
offset + 0
offset + 4
offset + 8
offset + C
Description
Source address
Reserved
Control
Buffer length
Status
Reserved
Source address
[pointer]
The source address pointer points to the start of the buffer in system memory.
ꢀ
ꢀ
For transmit channels, the address can start on any byte boundary.
For receive channels, the address must be a 32-bit word aligned.
Buffer length
The buffer length is the length of the buffer in bytes, and allows a buffer size of up to
64k–1 bytes to be in a single buffer. Bits 31:16 are not used.
For receive channels, the buffer length field is updated with the actual number of
bytes written to memory, as the peripheral has the ability to close the buffer early.
Control[15] – W
The Wrap (W) bit, when set, tells the DMA controller that this is the last buffer
descriptor within the continuous list of descriptors. The next descriptor is found using
the initial DMA channel buffer descriptor pointer. When the W bit is not set, the next
buffer descriptor is found using the 16-byte offset.
Control[14] – I
Control[13] – L
The Interrupt (I) bit, when set, tells the DMA controller to issue an interrupt when the
buffer is closed due to normal channel completion.
This is the Last (L) bit.
ꢀ
For transmit channels, firmware sets the L bit when the current buffer is the
last in the packet.
ꢀ
For receive channels. hardware sets the L bit when the current buffer is closed
by status bits received from the peripheral device. Status bits can include
conditions such as a character gap timeout, character match, or error
condition.
Control[12] – F
This is the Full (F) bit.
www.digiembedded.com
365
I / O HU B M OD UL E
DMA controller
ꢀ
For transmit channels. CPU sets the F bit after the data is written to a buffer.
The DMA controller clears this bit as each buffer is read from external memory.
If the DMA controller ever finds that this bit is not set when the buffer
descriptor is read, the NRIP bit is set in the Interrupt Status register and the
DMA controller stops immediately and goes to the ERROR state. The CPU must
clear the CE bit to restore the DMA.
ꢀ
For receive channels, hardware sets the F bit after data is written to a buffer.
The CPU must clear the F bit after all data has been read from the buffer. If
the DMA controller ever finds that this bit is not clear when the buffer
descriptor is read, the NRIP bit is set in the Interrupt Status register and the
DMA controller stops immediately.
The DMA controller must be soft reset after the buffer descriptor problem
has been solved.
Control[11:0]
Status[15:0]
These bits are not used.
The status depends on the module, as defined in the next tables.
Note: In direct mode, the status can be read from the Direct Mode RX Status FIFO.
UART
Bits
15:7
6:5
Description
Reserved
01
Error; bits 3:0 indicate the error type
bit 4: Reserved
bit 3: Receiver overflow, should never occur in a properly configured system
bit 2: Parity error
bit 1: Framing error
bit 0: Break condition
366
Hardware Reference NS9215
31 March 2008
I / O H U B M O D U L E
Transmit DMA example
HDLC
Bits
Description
15:7
Reserved
6:5
01
11
00
HDLC frame close, bits 3:0 indicate the close condition
bit 4: The last byte is less than 8 bits
bit 3: Receiver overflow, should never occur in a properly configured system
bit 2: Invalid CRC found at end of frame
bit 1: Valid CRC found at end of frame
bit 0: Abort condition found
match character found
bit 4: Match character 4
bit 3: Match character 3
bit 2: Match character 2
bit 1: Match character 1
bit 0: Match character 0
Other close event
bit 2: Buffer gap timer expired
bit 1: Software-initiated buffer close
SPI
Not applicable.
Transmit DMA example
After the last buffer in the data packet has been placed in system memory and the
buffer descriptors have been configured, the data packet is ready to be transmitted.
The CPU configures the module DMA TX buffer descriptor pointer, TXBDP (see
“[Module] DMA TX Buffer Descriptor Pointer” on page 381), and then sets the channel
enable bit in the DMA Control register.
Process
The DMA controller starts the process to read the buffer descriptor and buffer data
from system memory using the AHB master. The DMA controller follows this process:
1
Reads the first buffer descriptor, as pointed to by the TX buffer descriptor
pointer and INDEX.
www.digiembedded.com
367
I / O HU B M OD UL E
Control and status register address maps
2
3
4
Verifies that the data buffer is valid by making sure the F bit is set to 1.
Reads the first data buffer, in 16-byte bursts.
Continues to process the buffer descriptors and data buffers until all data has
been transmitted from the buffer descriptor with the L bit set to 1. The DMA
controller interrupts the CPU if the I bit is set to a 1.
5
Remains in the IDLE state until the channel enable bit is set to a 0, then set to a
1 again.
Visual example
System Memory
Buffer Pointer= null
Buffer Length= null
W=0 ,I=0 , L=0 , F=0
18 byte data buffer
(first buffer in packet)
I/O Hub DMA Controller
Buffer Pointer= 0x200
Buffer Length=0x012
W=0 ,I=0 , L=0 , F=1
TXBDP+ INDEX
Buffer Pointer= 0x400
Buffer Length=0x064
W=0 ,I=1 , L=1 , F=1
24 byte data buffer
Buffer Pointer= 0x300
Buffer Length=0x018
W=0 ,I=0 , L=0 , F=1
100 byte data buffer
Buffer Pointer= 0x500
Buffer Length=0x064
W=0 ,I=1 , L=1 , F=1
Buffer Pointer= null
Buffer Length= null
W=0 ,I=0 , L=0 , F=0
100 byte data buffer
(last buffer in packet)
Buffer Pointer= null
Buffer Length= null
W=1 ,I=0 , L=0 , F=0
Control and status register address maps
The I/O Hub provides a series of registers for the low speed peripheral modules it
supports. The DMA, direct mode, and interrupt control register formats are the
same for these modules. The base address for the registers is 0x9000_0000. Write
buffering in the MMU must be disabled for all registers in the I/O Hub address space,
from address 0x9000_0000 to 0x9FFF_FFFF.
Register address maps are shown for each low speed peripheral module.
368
Hardware Reference NS9215
31 March 2008
I / O H U B M O D U L E
Control and status register address maps
Note: Registers 9000_0000 – 9000_7FFF and registers 9000_8000 – 9000_FFFF are
reserved.
UART A register
address map
Register Offset
0x9001_0000
Description (31:00)
UART A Interrupt and FIFO Status
UART A DMA RX Control
0x9001_0004
0x9001_0008
UART A DMA RX Buffer Descriptor Pointer
UART A DMA RX Interrupt Configuration register
UART A Direct Mode RX Status FIFO
UART A Direct Mode RX Data DIDO
UART A DMA TX Control
0x9001_000C
0x9001_0010
0x9001_0014
0x9001_0018
0x9001_001C
UART A DMA TX Buffer Descriptor Pointer
UART A DMA TX Interrupt Configuration register
Reserved
0x9001_0020
0x9001_0024
0x9001_0028
UART A Direct Mode TX Data FIFO
UART A Direct Mode TX Data Last FIFO
Reserved
0x9001_002C
0x9001_0030 – 0x9001_0FFF
0x9001_1000 – 0x9001_7FFF
UART A CSR Space
UART B register
address map
Register Offset
0x9001_8000
0x9001_8804
0x9001_8008
0x9001_800C
0x9001_8010
0x9001_8014
0x9001_8018
0x9001_801C
0x9001_8020
0x9001_8024
0x9001_8028
0x9001_802C
Description (31:00)
UART B Interrupt and FIFO Status
UART B DMA RX Control
UART B DMA RX Buffer Descriptor Pointer
UART B DMA RX Interrupt Configuration register
UART B Direct Mode RX Status FIFO
UART B Direct Mode RX Data FIFO
UART B DMA TX Control
UART B DMA TX Buffer Descriptor Pointer
UART B DMA TX Interrupt Configuration register
Reserved
UART B Direct Mode TX Data FIFO
UART B Direct Mode TX Data Last FIFO
www.digiembedded.com
369
I / O HU B M OD UL E
Control and status register address maps
Register Offset
Description (31:00)
Reserved
0x9001_8030 – 0x9001_8FFF
0x9001_9000 – 0x9001_9FFF
UART B CSR Space
UART C register
address map
Register Offset
0x9002_0000
Description (31:00)
UART C Interrupt and FIFO Status
UART C DMA RX Control
0x9002_0004
0x9002_0008
UART C DMA RX Buffer Descriptor Pointer
UART C DMA RX Interrupt Configuration register
UART C Direct Mode RX Status FIFO
UART C Direct Mode RX Data FIFO
UART C DMA TX Control
0x9002_000C
0x9002_0010
0x9002_0014
0x9002_0018
0x9002_001C
UART C DMA TX Buffer Descriptor Pointer
UART C DMA TX Interrupt Configuration register
Reserved
0x9002_0020
0x9002_0024
0x9002_0028
UART C Direct Mode TX Data FIFO
UAT C Direct Mode TX Data Last FIFO
Reserved
0x9002_002C
0x9002_0030 – 0x9002_0FFF
0x9002_1000 – 0x9002_7FFF
UART C CSR Space
UART D register
address map
Register Offset
0x9002_8000
0x9002_8004
0x9002_8008
0x9002_800C
0x9002_8010
0x9002_8014
0x9002_8018
0x9002_801C
0x9002_8020
0x9002_8024
0x9002_8028
0x9002_802C
Description (31:00)
UART D Interrupt and FIFO Status
UART D DMA RX Control
UART D DMA RX Buffer Descriptor Pointer
UART D DMA RX Interrupt Configuration register
UART D DIrect Mode RX Status FIFO
UART D Direct Mode RX Data FIFO
UART D DMA TX Control
UART D DMA TX Buffer Descriptor Pointer
UART D DMA TX Interrupt Configuration register
Reserved
UART D Direct Mode TX Data FIFO
UART D Direct Mode TX Data Last FIFO
370
Hardware Reference NS9215
31 March 2008
I / O H U B M O D U L E
Control and status register address maps
Register Offset
Description (31:00)
0x9002_8030 – 0x9002_8FFF
0x9002_9000 – 0x9002_FFFF
Reserved
UART D CSR Space
SPI register
address map
Register Offset
0x9003_0000
Description (31:00)
SPI Interrupt and FIFO Status
SPI DMA RX Control
0x9003_0004
0x9003_0008
SPI DMA RX Buffer Descriptor Pointer
SPI DMA RX Interrupt Configuration register
SPI Direct Mode RX Status FIFO
SPI Direct Mode RX Data FIFO
SPI DMA TX Control
0x9003_000C
0x9003_0010
0x9003_0014
0x9003_0018
0x9003_001C
SPI DMA TX Buffer Descriptor Pointer
SPI DMA TX Interrupt Configuration register
Reserved
0x9003_0020
0x9003_0024
0x9003_0028
SPI Direct Mode TX Data FIFO
SPI Direct Mode TX Data Last FIFO
Reserved
0x9003_002C
0x9003_0030 – 0x9003_0FFF
0x9003_1000 – 0x9003_7FFF
SPI CSR Space
AD register
address map
Register Offset
Description (31:00)
Reserved
0x9003_8000 – 0x9003_8FFF
0x9003_9000 – 0x9003_FFFF
AD CSR Space
Reserved
Registers 9004_0000 – 9004_7FFF and 9004_8000 – 9004_FFFF are reserved.
2
I C register
Register Offset
Description (31:00)
address map
2
0x9005_0000 – 0x9005_7FFF
I C CSR Space
Reserved
Registers 9005_8000 – 9005_FFFF are reserved.
www.digiembedded.com
371
I / O HU B M OD UL E
[Module] Interrupt and FIFO Status register
RTC register
address map
Register Offset
Description (31:00)
0x9006_0000 – 0x9006_00BF
0x9006_0000 – 0x9006_00FC
RTC CSR Space
64-byte Battery Backed RAM
IO Hardware
Assist register
address map (0)
Register Offset
Description (31:00)
0x9006_8000 – 0x9006_FFFF
IO Hardware Assist CSR Space for Flexible I/O Module 0
IO Hardware
Assist register
address map (1)
Register Offset
Description (31:00)
0x9007_0000 – 0x9007_7FFF
IO Hardware Assist CSR Space for Flexible I/O Module 1
IO register
Register Offset
Description (31:00)
address map (0)
0x9008_0000 – 0x9008_FFFF
IO Space for Flexible I/O Module 0
IO register
Register Offset
Description (31:00)
address map (1)
0x9009_0000 – 0x9009_FFFF
IO Space for Flexible I/O Module 1
[Module] Interrupt and FIFO Status register
Addresses: 9000_0000 / 9000_8000 / 9001_0000 / 9001_8000 / 9002_0000 /
9002_8000 / 9003_0000 / 9003_8000
The Interrupt and FIFO Status register allows software to determine the cause of
the current low speed peripheral interrupts and to clear the interrupt bit.
Note: An access type of R/W* means that the processor must write 1 to clear the
value if the read value is 1. If the read value is 0, the write value must be 0.
372
Hardware Reference NS9215
31 March 2008
I / O H U B M O D U L E
[Module] Interrupt and FIFO Status register
Register
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
RXN RXE RXN RXC RXP RXF RXFS TXN RXFS RXFS RXFS TXFU TXFS MOD
Reserved
1
CIP
15
CIP RIP
AIP
CIP OFIP RIP CIP
RIP
7
RIP RIP
FIP
4
RIP
3
IP
2
14
13
12
11
TX
10
TX
9
8
6
5
0
RX RX
FIFO FIFO
full empty
RXPB
USY
TXPB
USY
FIFO FIFO
full empty
Reserved
Register bit
assignment
Bit(s)
Access Mnemonic
Reset
Description
D31
R/W*
R/W*
RXNCIP
RXECIP
0x0
Normal completion interrupt pending (RX)
Set when a buffer is closed under normal
conditions. An interrupt is generated when the I bit
is set in the current buffer descriptor.
A normal DMA completion occurs when the
buffer length field expires.
D30
0x0
Error completion interrupt pending (RX)
Set when the DMA channel finds either a bad
buffer descriptor or a bad data buffer pointer.
The DMA channel remains in the ERROR state
until the CE bit in the DMA Control register is
cleared and then set again. The DMA channel then
uses the buffer descriptor as set in the index
control field.
D29
D28
D27
R/W*
R/W*
R/W*
RXNRIP
RXCAIP
RXPCIP
0x0
0x0
0x0
Buffer not ready interrupt pending (RX)
Set when he DMA channel finds a buffer
descriptor with the F bit not set.
The DMA channel remains in the ERROR state
until the CE bit is set in the DMA Control register
is cleared and then set again.
Channel abort interrupt pending (RX)
Set when the DMA channel finds the channel
abort (CA) bit set.
The DMA controller closes the current buffer
descriptor and remains in the IDLS state until the
CA bit is cleared and the CE bit is set.
Premature completion interrupt pending
Set when a buffer descriptor is closed by the
peripheral instead of by reaching the buffer length.
The DMA channel continues processing buffer
descriptors
www.digiembedded.com
373
I / O HU B M OD UL E
[Module] Interrupt and FIFO Status register
Bit(s)
Access Mnemonic
Reset
Description
D26
R/W*
RXFOFIP
0x0
RX FIFO overflow interrupt pending
Set when the RX FIFO finds an overflow
condition.
D25
D24
R/W*
RXFSRIP
0x0
0x0
RX FIFO service request interrupt pending
(RX)
Set when the RX FIFO level rises above the
receive FIFO threshold (in the RX Interrupt
Configuration register).
R/W*
R/W*
TXNCIP
TXECIP
Normal completion interrupt pending (TX)
Set when a buffer is closed under normal
conditions. An interrupt is generated when the I bit
is set in the current buffer descriptor.
A normal DMA completion occurs when the
buffer length field expires.
D23
D22
D21
0x0
0x0
0x0
Error completion interrupt pending (TX)
Set when the DMA channel finds either a bad
buffer descriptor or a bad data buffer pointer.
The DMA channel remains in the ERROR state
until the CE bit in the DMA Control register is
cleared and then set again. The DMA channel then
uses the buffer descriptor as set in the index
control field.
R/W*
TXNRIP
Buffer not ready interrupt pending (TX)
Set when the DMA channel finds a buffer
descriptor with the F bit not set.
The DMA channel remains in the ERROR state
until the CE bit in the DMA Control register is
cleared and then set again. The DMA channel then
uses the buffer descriptor as set in the index
control field.
R/W*
TXCAIP
Channel abort interrupt pending (TX)
Set when the DMA channel finds the channel
abort (CA) control bit set.
The DMA controller closes the current buffer
descriptor and remains in the IDLE state until the
CA bit is cleared and the CE bit is set.
D20
D19
R/W*
R/W*
TXFUFIP
TXFSRIP
0x0
0x0
TX FIFO underflow interrupt pending
Set when the TX FIFO finds an underflow.
TX FIFO service request interrupt pending
(TX)
Set when the TX FIFO level drops below the
transmit FIFO threshold (in the TX Interrupt
Configuration register).
374
Hardware Reference NS9215
31 March 2008
I / O H U B M O D U L E
[Module] DMA RX Control
Bit(s)
Access Mnemonic
Reset
Description
D18
R
MODIP
0x0
Module interrupt pending
The hardware module has asserted an interrupt.
Software must read the appropriate Interrupt
Status register to determine the cause.
D17:16
D15
N/A
R
Reserved
N/A
0x0
N/A
RXPBUSY
0
1
Peripheral idle
Peripheral busy
Note:
Applicable only for channels connected
to the flexible I/O module processors.
The CPU must not access the Module Direct
Mode RX Data FIFO Read register when this bit
is set. If this bit is set, the read generates a bus
error.
D14
D13
D12
R
R
R
RX FIFO full
RX FIFO empty
TXPBUSY
0x0
0x1
0x0
Receive status and data FIFO full status
0
1
Not full
Full
Receive status and data FIFO empty status
0
1
Not empty
Empty
0
1
Peripheral idle
Peripheral busy
Note:
Applicable only for channels connected
to the flexible I/O module processors.
The CPU must not access the Module Direct
Mode TX Data FIFO register when this bit is set.
If this bit is set, the read generates a bus error.
D11
R
TX FIFO full
TX FIFO empty
Reserved
0x0
0x1
N/A
Transmit data FIFO full status
0
1
Not full
Full
D10
R
Transmit data FIFO empty status
0
1
Not empty
Empty
D09:00
N/A
N/A
[Module] DMA RX Control
Addresses: 9000_0004 / 9000_8004 / 9001_0004 / 9001_8004 / 9002_0004 /
9002_8004 / 9003_0004 / 9003_8004
The DMA RX Control register contains control register settings for each receive DMA
channel.
www.digiembedded.com
375
I / O HU B M OD UL E
[Module] DMA RX Buffer Descriptor Pointer
Register
31
CE
30
29
28
27
11
26
10
25
9
24
8
23
22
6
21
20
4
19
3
18
2
17
1
16
0
FLEX
I/O
CA
DIRECT
Reserved
15
14
13
12
7
5
STATE
INDEX
Register bit
assignment
Bit(s)
Access Mnemonic
Reset
Description
D31
R/W
CE
0x0
Channel enable
0
1
Disable DMA operation
Enable DMA operation
D30
D29
R/W
R/W
CA
0x0
0x0
Channel abort
When set, causes the current DMA operation to
complete and closes the buffer. The DMA channel
remains idle until this bit is cleared.
FLEX I/O
DIRECT
0
1
DMA controlled by CPU
DMA controlled by flexible I/O
This bit is valid only for channels 0 and 1, which
are assigned to flexible I/O module 0 and
flexible I/O module 1.
D28
R/W
0x0
0
1
DMA mode
Direct access mode
D27:16
D15:10
D09:00
N/A
R
Reserved
STATE
INDEX
N/A
0x0
0x0
N/A
DMA state machine status field
R
This field can be read at any time to determine the
current index.
[Module] DMA RX Buffer Descriptor Pointer
Addresses: 9000_0008 / 9000_8008 / 9001_0008 / 9001_8008 / 9002_0008 /
9002_8008 / 9003_0008 / 9003_8008
The DMA RX Buffer Descriptor Pointer register is the address of the first buffer
descriptor for each DMA channel.
376
Hardware Reference NS9215
31 March 2008
I / O H U B M O D U L E
[Module] RX Interrupt Configuration register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
RXBDP
8
RXBDP
Register bit
assignment
Bit(s)
Access Mnemonic
R/W RXBDP
Reset
Description
D31:00
0x0
The first buffer descriptor in the ring. Used when
the W bit is found, which indicates the last buffer
descriptor in the list.
[Module] RX Interrupt Configuration register
Addresses: 9000_000C / 9000_800C / 9001_000C / 9001_800C / 9002_000C /
9002_800C / 9003_000C / 9000_800C
The RX Interrupt Configuration register allows system software to configure the
interrupt for the I/O hub module receive channel.
Register
31
15
30
29
13
28
12
27
26
25
24
23
22
21
20
19
18
17
16
Reser
ved
RXFOFIE RXFSRIE RXNCIE RXECIE RXNRIE RXCAIE RXPCIE WSTAT ISTAT LSTAT FSTAT
RXTHRS
14
11
10
9
8
7
6
5
4
3
2
1
0
BLENSTAT
Register bit
assignment
Bit(s)
Access Mnemonic
Reset
Description
RX FIFO threshold
D31:28
R/W
RXTHRS
0xF
An interrupt is generated when the FIFO level
rises above this level.
D27
N/A
Reserved
N/A
N/A
www.digiembedded.com
377
I / O HU B M OD UL E
[Module] Direct Mode RX Status FIFO
Bit(s)
D26
D25
D24
D23
D22
D21
D20
D19
Access Mnemonic
Reset
0x0
Description
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R
RXFOFIE
RXFSRIE
RXNCIE
RXECIE
RXNRIE
RXCAIE
RXPCIE
WSTAT
Enable the RXFOFIP interrupt.
Enable the RXFSRIP interrupt.
Enable the RXNCIP interrupt.
Enable the RXECIP interrupt.
Enable the RXNRIP interrupt.
Enable the RXCAIP interrupt.
Enable the RXPCIP interrupt.
0x0
0x0
0x0
0x0
0x0
0x0
0x0
Debug field, indicating the W bit is set in the
current buffer descriptor.
D18
R
R
R
R
ISTAT
0x0
0x0
0x0
0x0
Debug field, indicating the I bit is set in the current
buffer descriptor.
D17
LSTAT
Debug field, indicating the L bit is set in the
current buffer descriptor.
D16
FSTAT
Debug field, indicating the F bit is set in the
current buffer descriptor.
D15:00
BLENSTAT
Debug field, indicating the current byte count.
[Module] Direct Mode RX Status FIFO
Addresses: 9000_0010 / 9000_8010 / 9001_0010 / 9001_8010 / 9002_0010 /
9002_8010 / 9003_0010 / 9003_8010
The Direct Mode RX Status FIFO register is used when in direct mode of operation,
to determine the status of the receive FIFO.
ꢀ
ꢀ
This register must be read before each read to the RX Data FIFO register.
The RX Data FIFO register must be read after each read to this register, even if
the BYTE field is 0.
Register
31
15
30
29
13
28
12
27
11
26
25
9
24
23
22
6
21
5
20
19
3
18
2
17
1
16
0
Reserved
14
10
8
7
4
FFL
AG
Reserved
Reserved
BYTE
PSTAT
378
Hardware Reference NS9215
31 March 2008
I / O H U B M O D U L E
[Module] Direct Mode RX Data FIFO
Register bit
assignment
Bit(s)
D31:12
D11:09
D08
Access Mnemonic
Reset
N/A
Description
N/A
R
Reserved
BYTE
N/A
N/A
Number of bytes in the current 32-bit location.
N/A
R
Reserved
FFLAG
N/A
N/A
D07
N/A
Full flag
Indicates that the FIFO went full when the current
location was written.
D06:00
R
PSTAT
N/A
General peripheral status, unique to the peripheral
attached to the channel.
[Module] Direct Mode RX Data FIFO
Addresses: 9000_0014 / 9000_8014 / 9001_0014 / 9001_8014 / 9002_0014 /
9002_8014 / 9003_0014 / 9003_8014
The Direct Mode RX Data FIFO register is used when in direct mode of operation, to
read the RX Data FIFO.
Note: The Module Direct Mode RX FIFO Status register must be read before this
register is read, to determine the valid number of bytes in the 32-bit access.
The data is packed in little endian format.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
RXD
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
8
RXD
Register bit
assignment
Bit(s)
Access Mnemonic
RXD
Reset
Description
RX Data FIFO Read register
D31:00
R
N/A
www.digiembedded.com
379
I / O HU B M OD UL E
[Module] DMA TX Control
[Module] DMA TX Control
Addresses: 9000_0018 / 9000_8018 / 9001_0018 / 9001_8018 / 9002_0018 /
9002_8018 / 9003_0018
The DMA TX Control register contains control register settings for each transmit DMA
channel.
Register
31
CE
30
29
28
27
26
10
25
9
24
8
23
7
22
21
5
20
4
19
3
18
2
17
1
16
0
FLEX
I/O
DIRECT INDEXEN
CA
Reserved
15
14
13
12
11
6
STATE
INDEX
Register bit
assignment
Bit(s)
Access Mnemonic
Reset
Description
D31
R/W
CE
0x0
Channel enable
0
1
Disable DMA operation
Enable DMA operation
D30
D29
R/W
CA
0x0
0x0
Channel abort
When set, causes the current DMA operation to
complete and closes the buffer. The DMA channel
remains idle until this bit is cleared.
R/W
FLEX I/O
0
1
DMA controlled by CPU
DMA controlled by flexible I/O module
This bit is valid only for channels 0 and 1, which
are assigned to flexible I/O module 0 and flexible
I/O module 1.
D28
D27
R/W
R/W
DIRECT
0x0
0x0
0
1
DMA mode
Direct access mode
INDEXEN
0
1
Hardware will not use the INDEX field when
in the idle state
Hardware will use the INDEX field when in
the idle state
D26:16
D15:10
D09:00
N/A
R
Reserved
STATE
INDEX
N/A
0x0
0x0
N/A
DMA state machine status field
R/W
When the state machine is in the idle state, this
register can be used to change the index. This field
can be read at any time to determine the current
index.
380
Hardware Reference NS9215
31 March 2008
I / O H U B M O D U L E
[Module] DMA TX Buffer Descriptor Pointer
[Module] DMA TX Buffer Descriptor Pointer
Addresses: 9000_001C / 9000_801C / 9001_001C / 9001_801C / 9002_001C /
9002_801C / 9003_001C
The DMA TX Buffer Descriptor Pointer is the address of the first buffer descriptor for
each DMA channel.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
TXBDP
8
TXBDP
Register bit
assignment
Bit(s)
Access Mnemonic
R/W TXBDP
Reset
Description
D31:00
0x0
The first buffer descriptor in the ring. Used when
the W bit is found, which indicates the last buffer
descriptor in the list.
[Module] TX Interrupt Configuration register
Addresses: 9000_0020 / 9000_8020 / 9001_0020 / 9001_8020 / 9002_0020 /
9002_8020 / 9003_0020
The TX Interrupt Configuration register allows system software to configure the
interrupt from the I/O hub module transmit channel.
Register
31
15
30
29
13
28
12
27
26
25
24
23
22
21
20
19
18
17
16
Reser
ved
TXFUFIE TXFURIE TXNCIE TXECIE TXNRIE TXCAIE Reserved WSTAT ISTAT LSTA FSTAT
TXTHRS
14
11
10
9
8
7
6
5
4
3
2
1
0
BLENSTAT
www.digiembedded.com
381
I / O HU B M OD UL E
[Module] Direct Mode TX Data FIFO
Register bit
assignment
Bit(s)
Access Mnemonic
Reset
Description
D31:28
R/W
TXTHRS
0xF
TX FIFO threshold
An interrupt is generated when the FIFO level
drops below this level.
D27
D26
D25
D24
D23
D22
D21
D20
D19
N/A
R/W
R/W
R/W
R/W
R/W
R/W
N/A
R
Reserved
TXFUFIE
TXFSRIE
TXNCIE
TXECIE
TXNRIE
TXCAIE
Reserved
WSTAT
N/A
0x0
0x0
0x0
0x0
0x0
0x0
N/A
0x0
N/A
Enable the TXFUFIP interrupt.
Enable the TXFSRIP interrupt.
Enable the NCIP interrupt.
Enable the ECIP interrupt.
Enable the NRIP interrupt.
Enable the CAIP interrupt.
N/A
Debug field, indicating the W bit is set in the
current buffer descriptor.
D18
R
R
R
R
ISTAT
0x0
0x0
0x0
0x0
Debug field, indicating the I bit is set in the current
buffer descriptor.
D17
LSTAT
Debug field, indicating the L bit is set in the
current buffer descriptor.
D16
FSTAT
Debug field, indicating the F bit is set in the
current buffer descriptor.
D15:00
BLENSTAT
Debug field, indicating the current byte count.
[Module] Direct Mode TX Data FIFO
Addresses: 9000_0028 / 9000_8028 / 9001_0028 / 9001_8028 / 9002_0028 /
9002_8028 / 9003_0028
The Direct Mode TX Data FIFO register is used when in direct mode of operation, to
write the TX data FIFO. The write can be 8-, 16-, or 32-bit.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
TXD
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
8
TXD
382
Hardware Reference NS9215
31 March 2008
I / O H U B M O D U L E
[Module] Direct Mode TX Data Last FIFO
Register bit
assignment
Bit(s)
Access Mnemonic
TXD
Reset
Description
D31:00
W
0x0
TX Data FIFO Write register
[Module] Direct Mode TX Data Last FIFO
Addresses: 9000_002C / 9000_802C / 9001_002C /9001_802C / 9002_002C /
9000_802C / 9003_002C
The Direct Mode TX Data LAst FIFO register is used when in direct mode of
operation, to write to the TX data FIFO and to cause a last status flag to be set for
use by the peripheral. The write can be 8-, 16-, or 32-bit.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
TXDL
8
TXDL
Register bit
assignment
Bit(s)
Access Mnemonic
TXDL
Reset
Description
TX Data with Last Status FIFO Write register.
D31:00
W
0x0
www.digiembedded.com
383
I / O HU B M OD UL E
[Module] Direct Mode TX Data Last FIFO
384
Hardware Reference NS9215
31 March 2008
S E R I A L C O N T RO L M O D UL E : U A RT
Serial Control Module: UART
C
H
A
P
T
E
R
1
0
T
he processor ASIC supports four independent universal asynchronous
receiver/transmitter (UART) channels (A through D). Each channel supports several
modes, conditions, and formats.
Features
ꢀ
ꢀ
ꢀ
DMA transfers to and from system memory
Independent receive and transmit programmable bit-rate generators
High speed data transfer up to 1.8432 Mbps
–
Programmable data format
5 to 8 data bits
Odd, even, or no parity
1 or 2 stop bits
MSB or LSB first
ꢀ
Programmable channel modes
–
–
–
Normal
Local loopback
Remote loopback
ꢀ
ꢀ
Modem control signal support
RTS, CTS, DTR, DSR, DCD, RI
Maskable interrupt conditions
–
–
–
–
–
–
–
Receiver idle
Transmitter idle
Receive error conditions
Character gap timeout
Character match events
CTS, DSR, DCD, RI state change detection
ꢀ
ꢀ
RS485 transceiver control signal
Transmit FIFO bypass to force out a character
www.digiembedded.com
385
S E R I A L C ON T RO L M O D U L E : U A RT
Normal mode operation
UART module
structure
UART
RI
CTS
DCD
DSR
DTR
RTS
RXD
TXD
AHB Bus
ref_clk
int
Transmit
FIFO
Receive
FIFO
Interface
Interface
IOHub
Normal mode operation
The UART achieves normal mode operation by programming the UART and Wrapper
configuration registers.
Example
configuration
This example shows a normal mode operation configuration for a hyperterminal
application. Any field not specified in this table can be left at reset value.
Control register
Field
Value
Comment
UART Line Control register (0x10c) DLAB
0x1
Enables access to baud rate registers
UART Baud Rate Divisor LSB
(0x100)
DLR
0xC0
Set baud rate to 9600 bps
MSB defaults to 0x0
UART Line Control register (0x10c) DLAB
WLS
0x0
0x3
Disables access to baud rate registers
8 bits per character
UART FIFO Control register (0x108) FIFOEN
0x01
Enable RX and TX FIFOs
386
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
Baud rate generator
Control register
Field
Value
Comment
UART Interrupt Enable register
(0x104)
ETBEI
0x1
Enable the Transmitter Holding
Register Empty Interrupt. enables the
Wrapper to write a transmit character
to the UART.
Wrapper Configuration register
TX FLOW
Software
1
TX Enabled
RXEN
TXEN
1
1
Enable Wrapper receive function
Enable Wrapper transmit function
Baud rate generator
The baud rate clock is generated by dividing the system reference clock by a
programmable divisor; use this formula:
BR = CLK / (BRD x 16)
ref
The default reference clock for the UARTs is the system reference clock input on
x1_sys_osc. The UART reference clock optionally can be input on GPIO_A[3].
Baud rates
This table shows the baud rates achieved with CLK set to 29.4912:
ref
Divisor
1
Baud rate
1,843,299
921,600
460,800
230,400
115,200
57,600
2
4
8
16
32
48
38,400
64
28,800
96
19,200
128
192
384
768
14,400
9,600
4,800
2,400
www.digiembedded.com
387
S E R I A L C ON T RO L M O D U L E : U A RT
Hardware-based flow control
Hardware-based flow control
The UART module provides expanded functionality for hardware-based flow control.
The RTS signal normally indicates the state of the receive FIFO. The CTS signal
normally halts the transmitter. With this UART module, the RI, CTS, DCD, or DSR
signals can halt the transmitter. Program these features using the HWFLOW bits in
the Wrapper Configuration register.
Character-based flow control (XON/XOFF)
Traditional character-based flow control requires the processor to match the flow
control characters and control the transmitter accordingly. This UART module
performs the character matching function in hardware and automatically updates
the state of the transmitter, which allows character-based flow control to achieve
the same response time as hardware-based flow control.
Example
configuration
Configure the character-based flow control using at least two Receive Character
Match registers and the Receive Character-Based Flow Control register. This table
shows a sample configuration for a system transferring 8 data bits per character.
Control register
Field
Value
1
Comment
Receive Character Match Control
Register 0
ENABLE
MASK
DATA
Enable character match
Mask bits
0x00
0x7e
Define character
Receive Character Match Control
Register 1
ENABLE
MASK
1
Enable character match
Mask bits
0x00
0x81
DATA
Define character
Receive Character-Based Flow
Control register
FLOW0
FLOW1
0x2
0x3
XON when matched
XOFF when matched
Forced character transmission
UART provides a mechanism in which you can bypass data in the transmit FIFO with
a specific character. The specified character is transmitted after the current
388
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
ARM wakeup on character recognition
character completes, regardless of any flow control mechanism that might stall
normal data transmission.
Use the Force Transmit Character Control register to program this operation.
Force character
transmission
procedure
These steps outline a single force character transmission operation:
1
2
Read the Force Transmit Character Control register and verify that the ENABLE
field is 0. The Force Transmit Character Control register must not be written
while the ENABLE field is 1.
Write a 1 to the ENABLE field and the required character to the CHAR field. This
operation can be a single step.
Collecting
feedback
Force character transmission completion status is available. It is up to you as to
whether you want to collect feedback. If you do want to collect feedback, these are
your options:
ꢀ
Poll the ENABLE field in the Force Transmit Character Control register until it
reads 0.
ꢀ
ꢀ
Poll the FORCE field in the Interrupt Status register until it reads 1.
Enable the FORCE interrupt by writing a 1 to the FORCE field in the Interrupt
Enable register and servicing the interrupt when it occurs.
ARM wakeup on character recognition
The UART module provides a signal to the SCM module that can wake up the ARM
processor. This signal is asserted when a specified character is received. Use the
Receive Character Match Control registers and the ARM Wakeup Control register to
implement the logic.
Example
configuration
This table shows a sample configuration where the wakeup signal is asserted on
reception of any character:
Control register
Field
Value
1
Comment
Receive Character Match Control
Register 0
ENABLE
MASK
DATA
Enable character match
Mask all bits
0xff
0x00
Don’t care
ARM Wakeup Control register
ENABLE
1
Enable the function
www.digiembedded.com
389
S E R I A L C ON T RO L M O D U L E : U A RT
Wrapper Control and Status registers
Wrapper Control and Status registers
The configuration registers for UART module A start at 0x9001_1000, UART module
B start at 0x9001_9000, UART module C start at 0x9002_1000, and UART module D
start at 9002_9000.
Register address
map
These are the configuration registers for UART module A. The configuration registers
for other UART modules are the same, except they have different starting addresses.
Address
Register
9001_1000
9001_1004
9001_1008
9001_100C
9001_1010
9001_1014
9001_1018
9001_101C
9001_1020
9001_1024
9001_1028
9001_102C
9001_1030
9001_1034
9001_1038–9001_109C
Wrapper Configuration
Interrupt Enable
Interrupt Status
Receive Character GAP Control
Receive Buffer GAP Control
Receive Character Match Control 0
Receive Character Match Control 1
Receive Character Match Control 2
Receive Character Match Control 3
Receive Character Match Control 4
Receive Character-Based Flow Control
Force Transit Character Control
ARM Wakeup Control
Transmit Byte Count
9001_1100
DLAB=0
UART Receive Buffer (read)
UART Transmit Holding (write)
9001_1100
DLAB=1
UART Baud Rate Divisor LSB
UART Baud Interrupt Enable
UART Baud Rate Divisor MSB
9001_1104
DLAB=0
9001_1104
DLAB=1
9001_1108
UART Identification (read)
UART FIFO Control (write)
9001_110C
9001_1110
UART Line Control
UART Modem Control
390
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
Wrapper Configuration register
Address
9001_1114
9001_1118
9001_111C
Register
UART Line Status
UART Modem Status
UART Scratch
Wrapper Configuration register
Address: 9001_1000 / 9001_9000 / 9002_1000 / 9002_9000
This is the primary Wrapper Configuration register.
Register
31
30
29
28
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
18
17
16
RXFL
USH
Reserv
ed
TXFL
USH
RXEN TXEN MODE
Reserved
RTSEN DTREN
15
14
13
12
8
7
3
2
1
0
RXCL Reserv
OSE ed
TXFLOW
RL RTS
RS485OFF
RS485ON
RXBYTES
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31
D30
N/A
Reserved
RXEN
N/A
0
N/A
R/W
R/W
R/W
0
1
Disable wrapper function
Enable wrapper to process receive characters
D29
D28
TXEN
0
0
0
1
Disable transmitter function
Enable wrapper to process transmit characters
MODE
Selects either UART or HDLC mode. This bit applies
only to UART3.
0
1
UART mode
HDLC mode
D27:20
D19
N/A
R/W
Reserved
RTSEN
N/A
0
N/A
Indicates which signal is output: RTS or RS485
transceiver control.
0
1
RTS
RS485 transceiver control
D18
R/W
DTREN
0
Indicates which signal is output: DTR or TX baud clock.
0
1
DTR
TX baud clock
www.digiembedded.com
391
S E R I A L C ON T RO L M O D U L E : U A RT
Wrapper Configuration register
Bits
Access Mnemonic Reset
Description
D17
R/W
R/W
R
RXFLUSH
TXFLUSH
RXBYTES
0
Resets the contents of the 64-byte RXFIFO.
Write a 1, then a 0 to reset the FIFO.
D16
N/A
00
Resets the contents of the 64-byte TX FIFO.
Write a 1, then a 0 to reset the FIFO.
D15:14
Indicates how many bytes are pending in the wrapper.
The wrapper writes to the RX FIFO only when 4 bytes are
received or a buffer close event occurs, such as a
character gap timeout, character match, or error.
D13
R/W
RXCLOSE
0
Allows software to close a receive buffer. Hardware
clears this bit when the buffer has been closed.
0
1
Idle or buffer already closed
Software initiated buffer close
D12
N/A
R/W
Reserved
N/A
N/A
D11:06
TXFLOW
010000
Selects which signals are routed to the UART for
hardware flow control. Transmit data is halted when the
selected signal is deasserted.
[0] CTS
0
1
CTS disabled
CTS enabled
[1] DCD
0
1
DCD disabled
DCD enabled
[2] DSR
0
1
DSR disabled
DSR enabled
[3] RI
0
1
RI disabled
RI enabled
[4] Software
0
1
TX disabled
TX enabled
[5] Receive character-based flow control
0
1
Disabled
Enabled
D05
D04
R/W
R/W
RL
0
0
Remote loopback
Provides an internal remote loopback feature. When the
RL field is set to 1, the receive serial data signal is
connected to the transmit serial data signal.
A local loopback is provided in the UART.
RTS
RTS control
0
1
Controlled directly by UART
Deasserted when RX FIFO is half full
392
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
Interrupt Enable register
Bits
Access Mnemonic Reset
Description
D03:02
R/W
RS485OFF
00
RS485 transceiver deassertion control
In bit times after the stop bit period
00
01
10
11
0
1
1.5
2
D01:00
R/W
RS485ON
00
RS485 transceiver assertion control
In bit times before the falling edge of the start bit
00
01
10
11
0
1
1.5
2
Interrupt Enable register
Address: 9001_1004 / 9001_9004 / 9002_1004 / 9002_9004
Use the Interrupt Enable register to enable interrupt generation on specific events.
Enable the interrupt by writing a 1 to the appropriate bit field(s).
Register
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
FRA
ME
Reser
ved
BREA
K
Not used
FORCE OFLOW PARITY
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
MATCH MATCH MATCH MATCH MATCH
TX_
IDLE
RX_
IDLE
BGAP RXCLS CGAP
DSR
DCD
CTS
RI
TBC
RBC
4
3
2
1
0
Register bit
assignment
Bits
D31:22
D21
Access Mnemonic Reset Description
R/W
R/W
R/W
Not used
Reserved
FORCE
0
0
0
Write this field to 0.
Always write to 0.
D20
Enable force complete
Enables interrupt generation when a force character
transmission operation has completed.
www.digiembedded.com
393
S E R I A L C ON T RO L M O D U L E : U A RT
Interrupt Enable register
Bits
Access Mnemonic Reset Description
D19
R/W
OFLOW
0
Enable overflow error
Enables interrupt generation if the 4-character FIFO in the
UART overflows.
Note:
This should not happen in a properly configured
system.
D18
D17
D16
D15
D14
D13
D12
D11
D10
D09
D08
D07
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
PARITY
FRAME
BREAK
BGAP
0
0
0
0
0
0
0
0
0
0
0
0
Enable parity error
Enables interrupt generation when a character is received
with a parity error.
Enable frame error
Enables interrupt generation when a character is received
with a framing error.
Enable line break
Enables interrupt generation when a line break condition
occurs.
Enable buffer gap
Enables interrupt generation when a buffer gap timeout
event occurs.
RXCLS
CGAP
Software receive close
Enables interrupt generation when software forces a buffer
close.
Enable character gap
Enables interrupt generation when a character gap timeout
event occurs.
MATCH4
MATCH3
MATCH2
MATCH1
MATCH0
DSR
Enable character match4
Enables interrupt generation when a receive character
match occurs against the Receive Match Register 4.
Enable character match3
Enables interrupt generation when a receive character
match occurs against the Receive Match Register 3.
Enable character match2
Enables interrupt generation when a receive character
match occurs against the Receive Match Register 2.
Enable character match1
Enables interrupt generation when a receive character
match occurs against the Receive Match Register 1.
Enable character match0
Enables interrupt generation when a receive character
match occurs against the Receive Match Register 0.
Enable data set ready
Enables interrupt generation whenever a state change
occurs on input signal DSR.
394
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
Interrupt Status register
Bits
Access Mnemonic Reset Description
D06
R/W
R/W
R/W
R/W
DCD
CTS
RI
0
0
0
0
Enable data carrier
Enables interrupt generation whenever a stat change
occurs on input signal DCD.
D05
D04
D03
Enable clear to send
Enables interrupt generation whenever a state change
occurs on input signal CTS.
Enable ring indicator
Enables interrupt generation whenever a state change
occurs on input signal RI.
TBC
Enable transmit buffer close
Enables interrupt generation when the UART transmit
FIFO indicates to the UART transmitter that a byte
corresponds to a buffer close event.
D02
R/W
RBC
0
Enable receive buffer close
Enables interrupt generation whenever a buffer close event
is passed from the UART receiver to the receive FIFO.
These are the UART receive buffer close events:
1
2
3
4
5
Receive character match
Receive character gap timeout
Receive line break
Receive framing error
Receive parity error
D01
D00
R/W
R/W
TX_IDLE
RX_IDLE
0
0
Enable transmit idle
Enables interrupt generation whenever the transmitter
moves from the active state to the idle state. This indicates
that the transmit FIFO is empty and the transmitter is not
actively shifting out data.
Enable receive idle
Enables interrupt generation whenever the receiver moves
from the active state to the idle state. If a start bit is not
received after a stop bit, the receiver enters the idle state.
Interrupt Status register
Address: 9001_1008 / 9001_9008 / 9002_1008 / 9002_9008
The Interrupt Status register provides status about UART events. All events are
indicated by reading a 1 and are cleared by writing a 1.
www.digiembedded.com
395
S E R I A L C ON T RO L M O D U L E : U A RT
Interrupt Status register
Register
31
30
29
28
12
27
11
26
25
9
24
8
23
22
21
20
19
18
17
16
FRA
ME
Reser
ved
BREA
K
Not used
FORCE OFLOW PARITY
15
14
13
10
7
6
5
4
3
2
1
0
MATCH MATCH MATCH MATCH MATCH
TX_
IDLE IDLE
RX_
BGAP RXCLS CGAP
DSR
DCD
CTS
RI
TBC
RBC
4
3
2
1
0
Register bit
assignment
Bits
Access Mnemonic Reset Description
D31:22
D21
R/W
Not used
0
0
Write this field to 0.
UART interrupt
R/W1TC Reserved
Indicates that the UART has generated an interrupt.
D20
D19
R/W1TC FORCE
0
0
Force complete
Indicates that a force character transmission operation has
completed.
R/W1TC OFLOW
Enable overflow error
Indicates that an overflow occurred in the UART’s 4-
character FIFO.
Note:
This should not happen in a properly configured
system.
D18
D17
R/W1TC PARITY
R/W1TC FRAME
0
0
Parity error
Indicates that at least one character has been received with
a parity error.
Frame error
Indicates that at least one character has been received with
a framing error.
D16
D15
D14
D13
D12
R/W1TC BREAK
R/W1TC BGAP
R/W1TC RXCLS
R/W1TC CGAP
R/W1TC MATCH4
0
0
0
0
0
Line break
Indicates that a line break condition has occurred.
Buffer gap
Indicates that a buffer gap timeout event has occurred.
Software receive close
Indicates a software-initiated buffer close has completed.
Character gap
Indicates that a character gap timeout event has occurred.
Character match4
Indicates that a receive character match has occurred
against the Receive Match Register 4.
396
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
Interrupt Status register
Bits
Access Mnemonic Reset Description
D11
R/W1TC MATCH3
R/W1TC MATCH2
R/W1TC MATCH1
R/W1TC MATCH0
R/W1TC DSR
0
0
0
0
0
0
0
0
0
0
Character match3
Indicates that a receive character match has occurred
against the Receive Match Register 3.
D10
D09
D08
D07
D06
D05
D04
D03
D02
Character match2
Indicates that a receive character match has occurred
against the Receive Match Register 2.
Character match1
Indicates that a receive character match has occurred
against the Receive Match Register 1.
Character match0
Indicates that a receive character match has occurred
against the Receive Match register 0.
Data set ready
Indicates that a state change has occurred on input signal
DSR.
R/W1TC DCD
R/W1TC CTS
Data carrier detect
Indicates that a state change has occurred in input signal
DCD.
Clear to send
Indicates that a state change has occurred on input signal
CTS.
R/W1TC RI
Ring indicator
Indicates that a state change has occurred on input signal
RI.
R/W1TC TBC
Transmit buffer close
Indicates that transmission of the last byte in a transmit
buffer has completed.
R/W1TC RBC
Receive buffer close
Indicates that a UART receive buffer close condition has
occurred. These are UART receive buffer close events:
1
2
3
4
5
Receive character match
Receive character gap timeout
Receive line break
Receive framing error
Receive parity error
www.digiembedded.com
397
S E R I A L C ON T RO L M O D U L E : U A RT
Receive Character GAP Control register
Bits
Access Mnemonic Reset Description
D01
R/W1TC TX_IDLE
R/W1TC RX_IDLE
0
Transmit idle
Indicates that the transmitter has moved from the active
state to the idle state. The transmitter moves from the active
state to the idle state when the transmit FIFO is empty and
the transmitter is not actively shifting out data.
D00
0
Receive idle
Indicates that the receiver has moved from the active state
to the idle state. The receiver moves from the active state to
the idle state when a start bit has not been received after the
previous stop bit.
Receive Character GAP Control register
Address: 9001_100C / 9001_900C / 9002_100C / 9002_900C
The Receive Character GAP Control register configures the receive character gap
control logic.
Register
REGISTER
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31
R/W
ENABLE
0
Enable receive character gap timer
Write a 1 to this field to enable the receive character gap
timer.
D30:25
D24:00
R/W
R/W
Not used
VALUE
0x0
0
Write this field to 0.
Value
Defines the period between receiving the stop bit and
asserting the character gap timeout event.
Use this equation to compute the required divisor value:
N = ((FCLK * gap+period) - 1)
F
= Nominal 29.4912 MHz
CLK
gap_period = Desired character gap period
A reasonable setting is 10 bit periods one character plus
the start and stop bits. Given a data rate of 115,200bps, the
desired period is 86.8us and the timeout value is 2559 .
d
398
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
Receive Buffer GAP Control register
Receive Buffer GAP Control register
Address: 9001_1010 / 9001_9010 / 9002_1010 / 9002_9010
The Receive Buffer GAP Control register configures the receive buffer gap control
logic. The buffer gap timer starts when the first character in a new buffer is
received.
Register
31
15
30
14
29
13
28
27
26
10
25
9
24
23
22
21
20
19
18
17
1
16
Reserved
12
11
8
7
6
5
4
3
2
0
Reserved
DLAB SB
SP
EPS PEN
STB
WLS
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31
R/W
ENABLE
0
Enable transmit bit rate generation
Write a 1 to enable the transmit bit rate generator.
D30:25
D24:00
R/W
R/W
Not used
VALUE
0x0
0
Write this field to 0.
Value
Defines the period between receiving the stop bit and
asserting the buffer gap timeout event.
Use this equation to compute the required divisor value:
N = ((FCLK * gap_period) - 1)
F
= Nominal 29.4912 Mhz
CLK
gap_period = Desired buffer gap period
A reasonable setting is 64 character or 640 bit periods.
GIven a data rate of 115,200 bps, the desired period is
5.55ms and the timeout value is 163,839 .
d
Receive Character Match Control register
Addresses: 9001_1014 / 9001_1018 / 9001_901C / 9001_9020 / 9001_1024 /
9001_9014 / 9001_9018 / 9001_901C / 9001_9020 / 9001_9024 / 9002_1014 /
9002_1018 / 9002_101C / 9002_1020 / 9002_1024 / 9002_9014 / 9002_9018 /
9002_901C / 9002_9020 / 9002_9024
www.digiembedded.com
399
S E R I A L C ON T RO L M O D U L E : U A RT
Receive Character-Based Flow Control register
The Receive Character Match Control registers configure the receive character
match control logic. Each UART module has five Receive Character Match Control
registers.
Register
31
30
14
29
13
28
27
11
26
10
25
9
24
23
7
22
6
21
20
4
19
3
18
2
17
1
16
0
EN
ABLE
Not used
VALUE
15
12
8
5
VALUE
Register bit
assignment
Bits
Access Mnemonic Reset
Description
Enable character match
D31
R/W
ENABLE
0
Write a 1 to enable the receive character match control
logic.
D30:24
D23:16
R
Not used
MASK
0x0
0x0
Write this field to 0.
R/W
Mask
Allows you to not include specific bits in the receive
character match operation. Writing 1 masks off the bit in
the specified position.
Bit positions that are not used should always be masked.
For example, bit positions 9 through 12 should always be
masked for 8-bit characters.
D15:08
D07:00
R
Not used
DATA
0x0
0x0
Write this field to 0.
R/W
Data
Allows you to specify the receive characters to match
against.
Receive Character-Based Flow Control register
Address: 9001_1028 / 9001_9028 / 9002_1028 / 9002_9028
The Receive Character-Based Flow Control register lets you define the UART
module’s receive character-based flow control operation. Use this register in
conjunction with the Receive Character Match Control registers to define the flow
control characters. If enabled, this function’s output is wired to the UART module
instead of the CTS signal.
400
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
Receive Character-Based Flow Control register
Caution:Be aware that if multiple matches occur, an XOFF assertion will supersede an
XON assertion.
Register
31
30
14
29
13
28
27
11
26
10
25
9
24
8
23
7
22
6
21
20
4
19
3
18
2
17
1
16
0
EN
ABLE
Not used
MASK
15
12
5
Not used
DATA
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
D31:11
D10
R
Not used
0
Write this field to 0.
Flow control state
R
FLOW_STATE
0x0
0
1
Hardware initiated XON
Hardware initiated XOFF
D09:08
R/W
FLOW4
0
Flow control enable
Allows you to define flow characteristics using the
DATA and MASK fields on the Receive Character
Match Control Register 4.
Note:
The ENABLE field has no effect on the
flow control logic.
The flow control is defined as shown:
0x
10
Disabled
Change the FLOW_STATE field to XON upon
match
11
Change the FLOW_STATE field to XOFF upon
match
D07:06
R/W
FLOW3
0
Flow control enable
Allows you to define flow characteristics using the
DATA and MASK fields on the Receive Character
Match Control Register 3.
Note:
The ENABLE field has no effect on the
flow control logic.
The flow control is defined as shown:
0x
10
Disabled
Change the FLOW_STATE field to XON upon
match
11
Change the FLOW_STATE field to XOFF upon
match
www.digiembedded.com
401
S E R I A L C ON T RO L M O D U L E : U A RT
Force Transmit Character Control register
Bits
Access Mnemonic
Reset
Description
D05:04
R/W
R/W
R/W
FLOW2
FLOW1
FLOW0
0
Flow control enable
Allows you to define flow characteristics using the
DATA and MASK fields on the Receive Character
Match Control Register 2.
Note:
The ENABLE field has no effect on the
flow control logic.
The flow control is defined as shown:
0x
10
Disabled
Change the FLOW_STATE field to XON upon
match
11
Change the FLOW_STATE field to XOFF upon
match
D03:02
0
Flow control enable
Allows you to define flow characteristics using the
DATA and MASK fields on the Receive Character
Match Control Register 1.
Note:
The ENABLE field has no effect on the
flow control logic.
The flow control is defined as shown:
0x
10
Disabled
Change the FLOW_STATE field to XON upon
match
11
Change the FLOW_STATE field to XOFF upon
match
D01:00
0
Flow control enable
Allows you to define flow characteristics using the
DATA and MASK fields on the Receive Character
Match Control Register 0.
Note:
The ENABLE field has no effect on the
flow control logic.
The flow control is defined as shown:
0x
10
Disabled
Change the FLOW_STATE field to XON upon
match
11
Change the FLOW_STATE field to XOFF upon
match
Force Transmit Character Control register
Address: 9001_102C / 9001_902C / 9002_102C / 9002_902C
Use the Force Transmit Character Control register to override the normal flow of
transmit data.
402
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
ARM Wakeup Control register
Register
31
30
29
13
28
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
18
2
17
1
16
0
EN
ABLE
BUSY
Not used
15
14
12
8
3
Not used
CHAR
Register bit
assignment
Bits
D31
Access Mnemonic Reset
R/W ENABLE 0
Description
Force transmit enable
Use this field to force the transmitter to send the character
specified in the CHAR field (D07:00). All user-specified
rules, such as bit order, parity, or number of stop bits, are
enforced.
Write a 1 to enable this field. Hardware clears the field
once the character has been transmitted. Writing a 1 to this
field when it is already a 1 has unpredictable results.
Note:
Writing a 1 to this field also clears the FORCE
field in the Interrupt Status register.
D30
R
BUSY
0
Read-only busy
Reading a 1 indicates that the force operation you initiated
is in progress.
D29:08
D07:00
R
Not used
CHAR
0
0
Write this field to 0.
R/W
Force character
Defines the character that is forced out of the transmitter.
ARM Wakeup Control register
Address: 9001_1030 / 9001_9030 / 9002_1030 / 9002_9030
Use the ARM Wakeup Control register to enable the ARM wakeup control logic.
www.digiembedded.com
403
S E R I A L C ON T RO L M O D U L E : U A RT
Transmit Byte Count
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Not used
8
EN
ABLE
Not used
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:01
D00
R
Not used
0
0
Write this field to 0.
R/W
ENABLE
Enable
Write a 1 to this field to enable ARM wakeup control
logic.
Transmit Byte Count
Address: 9001_1034 / 9001_9034 / 9002_1034 / 9002_9034
Register
31
30
14
29
13
28
12
27
26
10
25
9
24
23
22
6
21
5
20
19
18
2
17
1
16
0
EN
ABLE
Reserved
TXCOUNT
4
15
11
8
7
3
TXCOUNT
Register bit
assignment
Bits
Access Mnemonic Reset
Description
Enables and resets the transmit byte counter:
D31
R/W
ENABLE
0
0
1
Transmit byte count disabled and reset
Transmit byte enabled
D30:24
D23:00
N/A
R
Reserved
N/A
0
N/A
TXCOUNT
This counter is incremented after bytes are transmitted.
404
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
UART Receive Buffer
UART Receive Buffer
Address: 9001_1100 / 9001_9100 / 9002_1100 / 9002_9100, DLAB = 0, Read
UART Receive Buffer is used for diagnostic purposes only.
Register
31
15
30
14
29
13
28
27
11
26
10
25
9
24
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
Reserved
12
8
4
Reserved
RBUFF
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:08
D07:00
N/A
R
Reserved
RBUFF
N/A
0
Receiver data bits
UART Transmit Buffer
Address: 9001_1100 / 9001_9100 / 9002_1100 / 9002_9100, DLAB = 0, Write
UART Transmit Buffer is used for diagnostic purposes only.
Register
31
15
30
14
29
13
28
27
11
26
10
25
9
24
23
7
22
6
21
5
20
19
3
18
2
17
1
16
Reserved
12
8
4
0
Reserved
TBUFF
www.digiembedded.com
405
S E R I A L C ON T RO L M O D U L E : U A RT
UART Baud Rate Divisor LSB
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:08
D07:00
N/A
W
Reserved
TBUFF
N/A
0
Transmitter data bits
UART Baud Rate Divisor LSB
Address: 9001_1100 / 9001_9100 / 9002_1100 / 9002_9100, DLAB = 1
UART Baud Rate Divisor sets bits 07:00 of the baud rate generator divisor.
Register
31
15
30
14
29
13
28
27
11
26
10
25
9
24
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
Reserved
12
8
4
Reserved
BRDL
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07:00
N/A
R/W
Reserved
BRDL
N/A
0x1
N/A
Bits 07:00 of the baud rate generator divisor
UART Baud Rate Divisor MSB
Address: 9001_1104 / 9001_9104 / 9002_1104 / 9002_9104, DLAB = 1
UART Baud Rate Divisor sets bits 15:08 of the baud rate generator divisor.
406
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
UART Interrupt Enable register
Register
31
15
30
14
29
13
28
27
11
26
10
25
9
24
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
Reserved
12
8
4
Reserved
BRDM
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07:00
N/A
R/W
Reserved
BRDM
N/A
0
N/A
Bits 15:08 of the baud rate generator divisor
UART Interrupt Enable register
Address: 9001_1104 / 9001_9104 / 9002_1104 / 9002_9104, DLAB = 0
The UART Interrupt Enable register selects the source of the interrupt from the
UART. Note that only bit ETBEI (bit 01) must be set for normal operation. All other
bits are for diagnostic purposes only.
Register
31
15
30
14
29
13
28
12
27
11
26
25
9
24
23
7
22
6
21
5
20
4
19
18
17
16
Reserved
10
8
3
2
1
0
Reserved
EDSSI ELSI ETBEI ERBFI
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:04
D03
N/A
R/W
Reserved
EDSSI
N/A
N/A
N/A
Enables modem status interrupt
0
1
Disabled
Enabled
www.digiembedded.com
407
S E R I A L C ON T RO L M O D U L E : U A RT
UART Interrupt Identification register
Bits
Access Mnemonic Reset
Description
D02
R/W
R/W
R/W
ELSI
0
0
0
Enables receive line status interrupt
0
1
Disabled
Enabled
D01
D00
ETBEI
ERBFI
Enables transmit holding register empty interrupt
0
1
Disabled
Enabled
Enables receive data available interrupt
0
1
Disabled
Enabled
UART Interrupt Identification register
Address: 9001_1108 / 9001_9108 / 9002_1108 / 9002_9108, Read
The UART Interrupt Identification register reads the source of the interrupt from
the UART. This register is for diagnostic purposes only.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
9
8
Reserved
IIR
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:04
D03:00
N/A
R
Reserved
IIR
N/A
N/A
N/A
Interrupt identification
0110
0100
0010
0000
Receiver line status error
Receive data available
Transmit holding register empty
Modem status
408
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
UART FIFO Control register
UART FIFO Control register
Address: 9001_1108 / 9001_9108 / 9002_1108 / 9002_9108, Write
The UART FIFO Control register controls the RX and TX 4-byte FIFOs. Note that only
the FIFOEN bit (bit 01) should be set; all other bits are for diagnostic purposes only.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
7
22
6
21
5
20
4
19
3
18
17
16
Reserved
9
8
2
1
0
Reserved
TXCLR RXCLR FIFOEN
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:03
D02
N/A
W
Reserved
TXCLR
N/A
0
N/A
Clear all bytes in the TX FIFO
0
1
Normal operation
TX FIFO cleared
D01
D00
W
W
RXCLR
FIFOEN
0
0
Clear all bytes in the RX FIFO
0
1
Normal operation
RX FIFO cleared
Enable the TX and RX FIFO
0
1
RX and TX FIFO disabled
RX and TX FIFO enabled
UART Line Control register
Address: 9001_110C / 9001_910C / 9002_110C / 9002_910C
The UART Line Control register controls the UART settings.
www.digiembedded.com
409
S E R I A L C ON T RO L M O D U L E : U A RT
UART Line Control register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
20
4
19
3
18
2
17
1
16
0
Reserved
8
5
Reserved
DLAB SB
SP
EPS PEN STB
WLS
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07
N/A
R/W
Reserved
DLAB
N/A
0
N/A
Divisor latch access bit
0
1
Disabled
Enabled. Enables the Baud Rate Divisor MSB and
LSB registers to be configured.
D06
D05
R/W
R/W
SB
SP
0
0
Set break, if set TX data is set to 0
0
1
Disabled
Enabled
Stick parity, operates as follows
ꢀ
ꢀ
0
1
When set bits 04:03 = 11, parity bit always set to 0
When set bits 04:03 = 00, parity bit always set to 1
Disabled
Enabled
D04
D03
D02
R/W
R/W
R/W
EPS
PEN
STB
0
0
0
Parity select
0
1
Odd parity
Even parity
Parity enable
0
1
Parity disabled
Parity enabled
Number of stop bits
0
1
1 stop bit
1.5 stop bits (WLS = 00)
2 stop bits (all other WLS settings)
D01:00
R/W
WLS
0
Word length select
00
01
10
11
5 bits
6 bits
7 bits
8 bits
410
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
UART Modem Control register
UART Modem Control register
Address: 9001_1110 / 9001_9110 / 9002_1110 / 9002_9110
The UART Modem Control register controls the modem signals.
Register
31
15
30
14
29
13
28
12
27
26
25
9
24
23
7
22
6
21
20
19
3
18
2
17
1
16
0
Reserved
11
10
8
5
4
Reserved
AFE
LLB
Reserved
RTS DTR
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:06
D05
N/A
R/W
Reserved
AFE
N/A
0
N/A
Automatic flow control
0
1
RTS controlled by bit 1 (RTS)
RTS controlled by 4-byte RX FIFO status
D04
R/W
LLB
0
Local loopback enable bit
TX data looped back to RX data
0
1
Disabled
Enabled
D03:02
D01
N/A
R/W
Reserved
RTS
N/A
0
N/A
Controls the Request to Send (RTS) output
0
1
RTS = 1
RTS = 0
D00
R/W
DTR
0
Controls the Data Terminal Ready (DTR) output
0
1
DTR = 1
DTR = 0
UART Line Status register
Address: 9001_1114 / 9001_9114 / 9002_1114 / 9002_9114
The UART Line Status register reads the line status register. This register is used for
diagnostic purposes only.
www.digiembedded.com
411
S E R I A L C ON T RO L M O D U L E : U A RT
UART Modem Status register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
19
18
17
16
Reserved
8
4
3
2
1
0
Reserved
FIER TEMT THRE
BI
FE
PE
OE
DR
Register bit
assignment
Bits
Access Mnemonic Reset
Description
N/A
D31:08
D07
N/A
R
Reserved
FIER
N/A
N/A
RX FIFO error
Indicates at least one parity, framing, or break error in the
RX FIFO.
D06
D05
D04
R
R
R
TEMT
THRE
BI
N/A
N/A
N/A
Transmit holding and shift registers empty
Transmit holding register empty
Break indicator
The receiver found a line break.
D03
D02
D01
D00
R
R
R
R
FE
PE
OE
DR
N/A
N/A
N/A
N/A
Framing error
The receiver found a framing error.
Parity error
The receiver found a parity error.
Overrun error
The RX FIFO experienced an overrun.
Data ready
Indicates a data byte is ready in the FIFO.
UART Modem Status register
Address: 9001_1118 / 9001_9118 / 9002_1118 / 9002_9118
The UART Modem Status register reads the modem status register. This register is
used for diagnostic purposes only.
412
Hardware Reference NS9215
S E R I A L C O N T RO L M O D UL E : U A RT
UART Modem Status register
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
20
4
19
3
18
2
17
1
16
0
Reserved
8
7
5
Reserved
DCD
RI
DSR
CTS DDCD TERI DDSR DCTS
Register bit
assignment
Bits
D31:08
D07
Access Mnemonic Reset
Description
N/A
R
Reserved
DCD
RI
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Reflects the status of the data carrier detect input.
Reflects the status of the ring indicator.
Reflects the status of the data set ready input.
Reflects the status of the clear to send input.
Delta DCD indicator
D06
R
D05
R
DSR
D04
R
CTS
D03
R
DDCD
Indicates that an edge was found on DCD since the last
time the register was read.
D02
D01
R
R
TERI
N/A
N/A
Trailing edge of RI indicator
Indicates that RI has changed from a 0 to a 1.
DDSR
Delta DSR indicator
Indicates that an edge was found on DSR since the last
time the register was read.
D00
R
DCTS
N/A
Delta CTS indicator
Indicates that an edge was found on CTS since the last
time the register was read.
www.digiembedded.com
413
S E R I A L C ON T RO L M O D U L E : U A RT
UART Modem Status register
414
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : H D L C
Receive and transmit operations
Serial Control Module: HDLC
C
H
A
P
T
E
R
1
1
T
he HDLC module allows full-duplex synchronous communication. Both the
receiver and transmitter can select either an internal or external clock. The HDLC
module encapsulates data within opening and closing flags, and sixteen bits of CRC
precedes the closing flag. All information between the opening and closing flag is
zero-stuffed; that is, if five consecutive ones occur, independent of byte
boundaries, a zero is automatically inserted by the transmitter and automatically
deleted by the receiver. This allows a flag byte (07Eh) to be unique within a serial
stream. The standard CRC-CCITT polynomial (x16 + x12 + x5 + 1) is implemented, with
the generator and checker preset to all ones.
HDLC module
structure
Wrapper
TCLK
RCLK
RXD
TXD
AHB Bus
ref_clk
int
HDLC
Transmit
FIFO
Receive
FIFO
Interface
Interface
IOHub
Receive and transmit operations
Both receive and transmit operations are essentially automatic.
www.digiembedded.com
415
S E R I A L C ON T RO L M O D U L E : H D L C
Clocking
Receive operation
In the receiver, each byte is marked with status to indicate end-of-frame, short
frame, and CRC error. The receiver automatically synchronizes on flag bytes, and
presets the CRC checker accordingly. If the current receive frame is not needed (for
example, because it is addressed to a different station), a flag search command is
available. The flag search command forces the receiver to ignore the incoming data
stream until another flag is received.
Transmit
operation
In the transmitter, the CRC generator is preset and the opening flag transmitted
automatically after the first byte is written to the transmitter buffer. The CRC an the
closing flag are transmitted after the byte that is written to the buffer through the
Address register. If no CRC is required, writing the last byte of the frame to the Long
Stop register automatically appends a closing flag after the last byte.
Transmitter
underflow
If the transmitter underflows, either an abort or a flag is transmitted, under software
control. There is a command available to send the abort pattern (seven consecutive
ones) if a transmit frame needs to be aborted prematurely. The abort command takes
effect on the next byte boundary and causes an FEh (a zero followed by seven ones)
transmission, after which the transmitter sends the idle line condition. The abort
command also purges the transmit FIFO The idle line condition can be either flags or
all ones.
Clocking
A 15-bit divider circuit provides the clocking for the HDLC module. This clock is
sixteen times the data rate. The receiver uses a digital phase locked loop (DPLL) to
generate a synchronized receive clock for the incoming data stream. The HDLC
module also allows for an external 1x (same speed as the data rate) clock for both
the receiver and the transmitter.
HDLC receive and transmit clocks can be input or output. When using an external
clock, the maximum data rate is one-sixth of the 29.4912 MHz reference clock rate,
or 4.9152 Mbps.
Bits
The transmitter cannot send an arbitrary number of bits, but only a multiple of
bytes. The receiver, however, can receive frames of any bit length. If the last
“byte” in the frame is not eight bits, the receiver sets a status flag that is buffered
along with this last byte. Software then uses the table shown next to determine the
number of valid data bits in this last “byte.” Note that the receiver transfers all bits
416
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : H D L C
Data encoding
between the opening and closing flags, except for the inserted zeroes, to the
receiver data buffer.
Last byte bit
pattern table
Last byte bit pattern
bbbbbbb0
Valid data
7
6
5
4
3
2
1
bbbbbb01
bbbbb011
bbbb0111
bbb01111
bb011111
b0111111
Data encoding
The HDLC module provides several types of data encoding:
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
Normal NRZ
NRZI
Biphase-Level (Manchester)
Biphase-Space (FM0)
Biphase-Mark (FM1)
Encoding
examples
This figure shows examples of the data encoding types.
ꢀ
In NRZI, Biphase-Space and Biphase-Mark, the signal level does not convey
information. The placement of the transitions determine the data.
ꢀ
In Biphase-Level, the polarity of the transmission determines the data.
www.digiembedded.com
417
S E R I A L C ON T RO L M O D U L E : H D L C
Digital phase-locked-loop (DPLL) operation: Encoding
HDLC Clock
NRZ Data
NRZI
NRZI
Biphase-Level
Biphase-Space
Biphase-Space
Biphase-Mark
Biphase-Mark
data
1
0
1
1
0
0
1
0
Digital phase-locked-loop (DPLL) operation: Encoding
In the HDLC module, the internal clock comes from the output of the dedicated
divider. The divider output is divided by 16 to form the transmit clock and is fed to
the DPLL to form the receive clock. The DPLL basically is a divide-by-16 counter
that uses the transition timings on the receive data stream to adjust its count. The
DPLL adjusts the count so the DPLL output is placed properly in the bit cells to
sample the receive data.
Transitions
To work properly, the receive data stream requires transitions. NRZ data encoding
does not guarantee transitions in all cases (for example, a long string of zeroes), but
the other data encodings do. NRZI guarantees transitions because of inserted zeroes.
The Biphase encodings all have at least one transition per bit cell.
418
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : H D L C
DPLL operation: Adjustment ranges and output clocks
DPLL-tracked bit
cell boundaries
The DPLL counter normally counts by 16 but if a transition occurs earlier or later than
expected, the count is modified during the next count cycle.
ꢀ
If the transition occurs earlier than expected, the bit cell boundaries are early
with respect to the DPLL-tracked cell boundaries and the count is shortened by
either one or two counts.
ꢀ
If the transition occurs later than expected, the bit cell boundaries are late
with respect to the DPLL-tracked bit cell boundaries and the count is
lengthened by either one or two counts.
How far off the DPLL-tracked bit cell boundaries are determines whether the count
is adjusted by one or two. This tracking allows for minor differences in the transmit
and receive clock frequencies.
NRZ and NRZI
data encoding
With NRZ and NRZI data encoding, the DPLL counter runs continuously and adjusts
after every receive data transition.
Because NRZ encoding does not guarantee a minimum density of transitions, the
difference between the sending data rate and the DPLL output clock rate must be
very small, and depends on the longest possible run of zeros in the received frame.
NRZI encoding guarantees at least one transition every six bits (with the inserted
zeroes). Because the DPLL can adjust by two counts every bit cell, the maximum
difference between the sending data rate and the DPLL output clock rate is 1/48
(~2%).
Biphase data
encoding
With biphase data encoding, the DPLL works in multiple-access conditions where
there may not be flags on the idle line. The DPLL properly generates an output clock
based on the first transition in the leading zero of an opening flag. Similarly, the DPLL
requires only the completion of the closing flag to provide the extra two clocks to the
receiver to properly assemble the data.
ꢀ
In biphase-level mode, this means the transition that defines the last zero of
the closing flag.
ꢀ
In the biphase-mark and biphase-space modes, this means the transition that
defines the end of the last zero of the closing flag.
DPLL operation: Adjustment ranges and output clocks
This figure shows the adjustment ranges and output clock for the different DPLL
modes of operation:
www.digiembedded.com
419
S E R I A L C ON T RO L M O D U L E : H D L C
DPLL operation: Adjustment ranges and output clocks
Bit cell
none
add one
ignore transitions
add one
add two
subtract two
subtract one
ignore transitions
subtract one
subtract one
none
NRZI adj
NRZI Clock
subtract one
none
add one
Bi-L adj
Bi-L Clock
none
none
ignore transitions
ignore transitions
none
none
Bi-S adj
Bi-S Clock
add one
Bi-M adj
Bi-M Clock
NRZ and NRZI
encoding
With NRZ and NRZI encoding, all transitions occur on bit-cell boundaries and the data
should be sampled in the middle of the bit cell.
ꢀ
ꢀ
ꢀ
If a transition occurs after the expected bit-cell boundary, but before the
midpoint, the DPLL needs to lengthen the count to line up the bit-cell
boundaries; this corresponds to the “add one” and “add two” regions of the
figure.
If a transition occurs before the bit-cell boundary, but after the midpoint, the
DPLL needs to shorten the count to line up the bit-cell boundaries; this
corresponds to the “subtract one” and “subtract two” regions shown in the
figure.
The DPLL makes no adjustment if the bit-cell boundaries are lined up within
one count of the divide-by-sixteen counter. The regions that adjust the count
by two allow the DPLL to synchronize faster to the data stream when starting
up.
Biphase-Level
encoding
With biphase-level encoding, there is a guaranteed “clock” transition at the center of
every bit-cell and optional “data” transitions at the bit-cell boundaries. The DPLL
420
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : H D L C
Normal mode operation
only uses the clock transitions to track the bit-cell boundaries, by ignoring all
transitions occurring outside a window around the center of the bit-cell. The window
is half a bit-cell wide.
Because the clock transitions are guaranteed, the DPLL requires that they always be
present. If no transition is found in the window around the center of the bit-cell for
two successive bit-cells, the DPLL is not in lock and immediately enters search
mode. Search mode presumes that the next transition seen is a clock transition and
immediately synchronizes to this transition. No clock output is provided to the
receiver during the search operation.
Biphase-Mark
and Biphase-
Space encoding
Biphase-mark and biphase-space encoding are identical per the DPLL and are similar
to biphase-level. The primary difference is the clock placement and data
transitions. With these encodings, the clock transitions are at the bit-cell boundary
and the data transitions are at the center of the bit-cell; the DPLL operation is
adjusted accordingly. Decoding biphase-mark or biphase-space encoding requires
that the data be sampled by both edges of the recovered receive clock.
IRDA-compliant
encode
There is an optional IRDA-compliant encode and decode function available. The
encoder sends an active-high pulse for a zero and no pulse for a one. The pulse is
1/4th of a bit-cell wide. The decoder watches for active-low pulses which are
stretched to one bit time wide to recreate the normal asynchronous waveform for the
receiver. enabling the IRDA-compliant encode/decode modifies the transmitter so
there are always two opening flags transmitted.
Normal mode operation
The HDLC achieves normal mode operation by programming the HDLC and Wrapper
configuration registers.
Example
configuration
This example shows a normal mode operation configuration for a typical
application. Any field not specified in this table can be left at reset value.
Control register
Field
Value
Comment
HDLC Control register
CLK
0x3
Enable internal clock generation
HDLC Clock Divider High
EN
0x1
Enable the internal clock divider; the
clock rate will be 1.8432 Mbps.
www.digiembedded.com
421
S E R I A L C ON T RO L M O D U L E : H D L C
Wrapper and HDLC Control and Status registers
Control register
Field
Value
Comment
Wrapper Configuration register
RXEN
TXEN
1
1
Enable Wrapper receive function
Enable Wrapper transmit function
Wrapper and HDLC Control and Status registers
The configuration registers for the HDLC module are located at 0x9002_9000.
Register address
map
These are the configuration registers located within a single HDLC module.
Address
9002_9000
9002_9004
9002_9008
Register
Wrapper Configuration
Interrupt Enable
Interrupt Status
9002_9100
9002_9104
9002_9108
9002_910C
9002_9110
9002_9114
9002_9118
9002_911C
HDLC Data Register 1
HDLC Data Register 2
HDLC Data Register 3
Reserved
HDLC Control Register 1
HDLC Control Register 2
HDLC Clock Divider Low
HDLC Clock Divider High
Wrapper Configuration register
Address: 9002_9000
This is the primary Wrapper Configuration register.
422
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : H D L C
Wrapper Configuration register
Register
31
30
29
28
27
11
26
10
25
9
24
23
7
22
6
21
20
19
3
18
2
17
RX
16
TX
Reserv
ed
RXEN TXEN MODE
Reserved
FLUSH FLUSH
15
14
13
12
8
5
4
1
0
RX
CLOSE
RXBYTES
CRC
Reserved
RL
LL
Reserved
Register bit
assignment
Bits
D31
D30
Access Mnemonic Reset
Description
N/A
R/W
Reserved
RXEN
N/A
0
N/A
0
1
Disable wrapper function
Enable wrapper to process receive characters
D29
D28
R/W
R/W
TXEN
0
0
0
1
Disable wrapper transmitter function
Enable wrapper to process transmit characters
MODE
Applies only to UART channel C.
0
1
UART mode
HDLC mode
D27:18
D17
N/A
R/W
Reserved
N/A
0
N/A
RXFLUSH
Resets the contents of the 64-byte RXFIFO.
Write a 1, then a 0 to reset the FIFO.
D16
R/W
R
TXFLUSH
RXBYTES
0
Resets the contents of the 64-byte TX FIFO.
Write a 1, then a 0 to reset the FIFO.
D15:14
00
Indicates how many bytes are pending in the wrapper.
The wrapper writes to the RX FIFO only when 4 bytes are
received or a buffer close event occurs, such as end of
frame.
D13
D12
R/W
R/W
RXCLOSE
CRC
0
0
Allows software to close a receive buffer. Hardware
clears this bit when the buffer has been closed.
0
1
Idle or buffer already closed
Software initiated buffer close
Controls whether the HDLC transmitter hardware sends
CRC bytes before the closing flag.
0
1
Send CRC bytes before the closing flag
Do not send CRC bytes before the closing flag;
handled by software
D11:06
D05
N/A
R/W
Reserved
RL
0
0
N/A
Remote loopback
Provides an internal remote loopback feature. When the
RL field is set to 1, the receive HDLC data signal is
connected to the transmit HDLC data signal.
www.digiembedded.com
423
S E R I A L C ON T RO L M O D U L E : H D L C
Interrupt Enable register
Bits
Access Mnemonic Reset
Description
D04
R/W
LL
0
Local loopback
Provides an internal local loopback feature. When the LL
field is set to 1, the transmit HDLC data signal is
connected to the receive HDLC data signal.
D03:00
N/A
Reserved
N/A
N/A
Interrupt Enable register
Address: 9002_9004
Use the Interrupt Enable register to enable interrupt generation on specific events.
Enable the interrupt by writing a 1 to the appropriate bit field(s).
Register
31
30
29
13
28
12
27
11
26
25
24
8
23
7
22
6
21
20
19
18
17
16
Reserv
ed
Not used
HINT
OFLOW ICRC VCRC RABORT
15
14
10
9
5
4
3
2
1
0
Reserv
ed
RXCLS
Reserved
TBC RBC TX_IDLE RX_IDLE
Register bit
assignment
Bits
Access Mnemonic Reset Description
D31:22
D21
R/W
R/W
Not used
HINT
0
0
Write this field to 0.
Enable HDLC interrupt
Enables interrupt generation directly from the HDLC
module. This is normally handled by hardware.
D20
D19
N/A
R/W
Reserved
OFLOW
N/A
0
N/A
Enable overflow error
Enables interrupt generation if the 4-character FIFO in the
HDLC overflows.
Note:
This should not happen in a properly configured
system.
D18
D17
R/W
R/W
ICRC
0
0
Enable invalid CRC
Enables interrupt generation when a frame is received with
an invalid CRC.
VCRC
Enable valid CRC
Enables interrupt generation when a frame is received with
a valid CRC.
424
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : H D L C
Interrupt Status register
Bits
Access Mnemonic Reset Description
D16
R/W
RABORT
0
Enable receive abort error
Enables interrupt generation when a frame is received with
an abort.
D15
D14
N/A
R/W
Reserved
RXCLS
N/A
0
N/A
Software receive close
Enables interrupt generation when software forces a buffer
close.
D13:04
D03
N/A
R/W
Reserved
TBC
N/A
0
N/A
Enable transmit buffer close
Enables interrupt generation when the HDLC transmit
FIFO indicates to the HDLC transmitter that a byte
corresponds to a buffer close event.
D02
R/W
RBC
0
Enable receive buffer close
Enables interrupt generation whenever a buffer close event
is passed from the HDLC receiver to the receive FIFO.
These are the HDLC receive buffer close events:
1
2
3
4
Receive overrun detected
Receive abort detected
Buffer closed due to invalid CRC
Buffer closed due to valid CRC
D01
D00
R/W
R/W
TX_IDLE
RX_IDLE
0
0
Enable transmit idle
Enables interrupt generation whenever the transmitter
moves from the active state to the idle state. This indicates
that the transmit FIFO is empty and the transmitter is not
actively shifting out data.
Enable receive idle
Enables interrupt generation whenever the receiver moves
from the active state to the idle state. If a start bit is not
received after a stop bit, the receiver enters the idle state.
Interrupt Status register
Address: 9002_9008
The Interrupt Status register provides status about HDLC events. All events are
indicated by reading a 1 and are cleared by writing a 1.
www.digiembedded.com
425
S E R I A L C ON T RO L M O D U L E : H D L C
Interrupt Status register
Register
31
15
30
29
13
28
12
27
11
26
25
24
8
23
7
22
6
21
20
19
18
17
16
Reserv
ed
Not used
HINT
OFLOW ICRC VCRC RABORT
14
10
9
5
4
3
2
1
0
Reserv
ed
RXCLS
Reserved
TBC RBC TX_IDLE RX_IDLE
Register bit
assignment
Bits
Access Mnemonic Reset Description
D31:22
D21
R/W
Not used
0
0
Write this field to 0.
HDLC interrupt
R/W1TC HINT
Indicates that the HDLC has generated an interrupt.
D20
D19
N/A
Reserved
N/A
0
N/A
R/W1TC OFLOW
Enable overflow error
Indicates that an overflow occurred in the HDLC’s 4-byte
FIFO.
Note:
This should not happen in a properly configured
system.
D18
D17
D16
R/W1TC ICRC
R/W1TC VCRC
R/W1TC RABORT
0
0
0
Invalid CRC
Indicates that a frame has been received with a CRC error.
Valid CRC
Indicates that a frame has been received with a valid CRC.
Receive abort error
Indicates that a frame has been received with an abort.
D15
D14
N/A
Reserved
N/A
0
N/A
R/W1TC RXCLS
Software receive close
Indicates a software-initiated buffer close has completed.
D13:04
D03
N/A
Reserved
N/A
0
N/A
R/W1TC TBC
Transmit buffer close
Indicates that transmission of the last byte in a transmit
buffer has completed.
D02
R/W1TC RBC
0
Receive buffer close
Indicates that a HDLC receive buffer close condition has
occurred. These are HDLC receive buffer close events:
1
2
3
4
Receive overrun detected
Receive abort detected
Buffer closed due to invalid CRC
Buffer closed due to valid CRC
426
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : H D L C
HDLC Data Register 1
Bits
Access Mnemonic Reset Description
D01
R/W1TC TX_IDLE
0
Transmit idle
Indicates that the transmitter has moved from the active
state to the idle state. The transmitter moves from the active
state to the idle state when the transmit FIFO is empty and
the transmitter is not actively shifting out data.
D00
R/W1TC RX_IDLE
0
Receive idle
Indicates that the receiver has moved from the active state
to the idle state. The receiver moves from the active state to
the idle state when a start bit has not been received after the
previous stop bit.
HDLC Data Register 1
Address: 9002_9100
HDLC Data Register 1 reads data from the receive buffer and load data in the
transmit buffer. This register is for debug purposes only.
Register
31
15
30
14
29
13
28
27
26
10
25
24
23
7
22
6
21
5
20
4
19
18
2
17
1
16
0
Reserved
12
11
9
8
3
Reserved
HDATA
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07:00
N/A
R/W
Reserved
HDATA
0
0
N/A
Read Returns the contents of the receive buffer
Write Loads the transmit buffer with a byte of data
HDLC Data Register 2
Address: 9002_9104
HDLC Data Register 2 writes the last byte of data of a frame after which the CRC
and closing flag are transmitted. This register is for debug purposes only.
www.digiembedded.com
427
S E R I A L C ON T RO L M O D U L E : H D L C
HDLC Data register 3
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
7
22
6
21
5
20
4
19
18
2
17
1
16
0
Reserved
9
8
3
Reserved
HDATA
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07:00
N/A
R/W
Reserved
HDATA
N/A
0
N/A
Read Returns the contents of the receive buffer
Write Used for the last data byte in a frame, after which
the CRC and closing flag are transmitted
HDLC Data register 3
Address: 9002_9108
HDLC Data Register 3 writes the last byte of data of a frame after which the closing
flag is transmitted. This register is for debug purposes only.
Register
31
15
30
14
29
13
28
27
26
10
25
24
23
7
22
6
21
5
20
4
19
18
2
17
1
16
0
Reserved
12
11
9
8
3
Reserved
HDATA
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07:00
N/A
R/W
Reserved
HDATA
N/A
0
N/A
Read Returns the contents of the receive buffer
Write Used for the last data byte in a frame, after which
the closing flag is transmitted
428
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : H D L C
HDLC Control Register 1
HDLC Control Register 1
Address: 9002_9110
HDLC Control Register 1 configures the HDLC transmitter and receiver.
Register
31
15
30
14
29
13
28
27
26
10
25
24
23
22
21
20
4
19
3
18
2
17
1
16
Reserved
12
11
9
8
7
6
5
0
Not
used
Reserved
HDATA
HDATA
CLK
HINT
Register bit
assignment
Bits
Access Mnemonic Reset
Description
Write this field to 0.
D31:08
D07:06
R
R
Not used
HMODE
0
0
00
01
10
11
Normal operation
Force receiver to flag search mode
Normal operation
Force transmitter to send abort
D05:04
D03:02
N/A
R/W
Reserved
CLK
N/A
0
N/A
Clock source
Note:
00
This field should be programmed last
Reserved
01
Reserved
10
Use external clock
Use internal clock
11
D01
D00
R/W
R/W
Not used
HINT
0
0
Always write 0 to this bit.
0
1
Disable the HDLC interrupt
Enable the HDLC interrupt
HDLC Control Register 2
Address: 9002_9114
HDLC Control Register 2 configures the HDLC transmitter and receiver.
www.digiembedded.com
429
S E R I A L C ON T RO L M O D U L E : H D L C
HDLC Clock Divider Low
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
7
22
21
5
20
19
18
17
1
16
0
Reserved
9
8
6
4
3
I
2
H
U
Reserved
CMODE
ECLK Not used
MODE MODE MODE
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07:05
R
Not used
CMODE
0
0
Write this field to 0.
R/W
Coding mode
000
010
100
NRZ data encoding for receiver and transmitter
RZI data encoding for receiver and transmitter
Biphase-Level (Manchester) data encoding for
receiver and transmitter
110
111
Biphase-Space data encoding for receiver and
transmitter
Biphase-Mark data encoding for receiver and
transmitter
D04
R/W
HMODE
0
HDLC mode
0
1
Normal HDLC data encoding
Enable NRZI coding (1/4 bit-cell IRDA-compliant).
This mode can be used only with internal clock and
NRZ data encoding.
D03
D02
D01
R/W
R/W
R/W
IMODE
UMODE
ECLK
0
0
0
Transmit idle mode
0
1
Transmit flags while in idle mode
Transmit all 1s while in idle mode
Underrun mode
0
1
Transmit flag on underrun
Transmit abort on underrun
External clock mode
0
The HDLC module will use separate external receive
and transmit clocks
1
The HDLC receiver and transmitter will both use the
external transmit clock.
D00
R
Not used
0
Always write 0 to this bit.
HDLC Clock Divider Low
Address: 9002_9118
430
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : H D L C
HDLC Clock Divider High
Use the HDLC CLock Divider Low register to set bits 07:00 of the clock divider. This
is the equation for the HDLC clock rate:
29.4912 MHz
HDLC rate (bps) =
16 x (DIV = 1)
Register
31
15
30
14
29
13
28
12
27
26
25
9
24
8
23
7
22
6
21
5
20
19
3
18
2
17
1
16
0
Not used
11
10
4
Not used
DIVL
Register bit
assignment
Bits
Access Mnemonic Reset
Description
Write this field to 0.
D31:08
D07:00
R
Not used
DIVL
0
0
R/W
Eight LSBs of the divider that generates the HDLC
transmit and receive clock.
HDLC Clock Divider High
Address: 9002_911C
Use the HDLC CLock Divider High register to set bits 14:08 of the clock divider.
Register
31
15
30
14
29
13
28
12
27
26
25
9
24
8
23
22
6
21
5
20
19
3
18
2
17
1
16
0
Not used
11
10
7
4
Not used
EN
DIVH
www.digiembedded.com
431
S E R I A L C ON T RO L M O D U L E : H D L C
HDLC Clock Divider High
Register bit
assignment
Bits
Access Mnemonic Reset
Description
D31:08
D07
R
Not used
EN
0
0
Write this field to 0.
R/W
Clock enable
Must be set when the internal clock is used.
D06:00
R/W
DIVH
0
Seven MSBs of the divider that generates the HDLC
transmit and receive clock.
432
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : S P I
Serial Control Module: SPI
C
H
A
P
T
E
R
1
2
T
he processor ASIC contains a single high speed, four-wire, serial peripheral
interface (SPI) module.
Features
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
DMA transfers to and from system memory
Four-wire interface (RXD, TXD, CLK, CS)
Multi-drop supported through GPIO programming
Master or slave operation
High speed data transfer
–
–
Master: 33.33 Mbps
Slave: 7.50 Mbps
ꢀ
ꢀ
ꢀ
ꢀ
Programmable MSB/LSB formatting
Programmable SPI mode (0, 1, 2, or 3)
Master mode internal diagnostic loopback
Maskable interrupt conditions
–
–
Receiver idle
Transmitter idle
www.digiembedded.com
433
S E R I A L C ON T RO L M O D U L E : S PI
SPI controller
SPI module
structure
spi_tx_d
Receive
State
Transmit
State
spi_clk_out
spi_cs_out_n
Machine
Machine
Clock
sys_pll_out
spi_clk
Generation
Transmit
Fifo
Receive
Fifo
AHB Bus
Config
Interface
Interface
SPI controller
The SPI controller provides a full-duplex, synchronous, character-oriented data
channel between master and slave devices, using a four-wire interface (RXD, TXD,
CLK, CS#). The master interface operates in a broadcast mode. The slave interface
is activated using the CS# signal. You can configure the master interface to address
various slave interfaces using the GPIO pins.
Simple
parallel/serial
data conversion
SPI provides simple parallel/serial data conversion to stream serial data between
memory and a peripheral. The SPI port has no protocol associated with it other than
transferring information in multiples of 8 bits.
Full duplex
operation
The SPI port can operate in full-duplex mode. Information transfer is controlled by a
single clock signal. The clock and chip select signals are chip outputs for a master
mode operation and inputs for a slave mode operation.
434
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : S P I
SPI clocking modes
SPI clocking modes
There are four SPI clocking modes. Each mode’s characteristics are defined by the
idle value of the clock, which clock edge captures data, and which clock edge drives
data. The MODE field in the SPI Configuration register specifies the timing mode.
Timing modes
SPI mode
SPI CLK Idle
SPI DATA IN
capture edge
SPI DATA OUT
drive edge
0
1
2
3
Low
High
Low
High
Rising
Falling
Falling
Rising
Falling
Rising
Rising
Falling
Clocking mode
diagrams
The next two diagrams show the four SPI clocking modes. SPI Mode0 and SPI Mode3
are the most commonly used modes.
SPI Mode0 and Mode3 functional timing
CS#
Mode
Mode
3
3
CLK
Mode
Mode
0
0
Capture Edge
Launch Edge
SIN SOUT
/
SPI Mode1 and Mode2 functional timing
CS#
Mode
Mode
1
1
CLK
Mode
Mode
2
2
Launch Edge
Capture Edge
SIN SOUT
/
www.digiembedded.com
435
S E R I A L C ON T RO L M O D U L E : S PI
SPI clock generation
SPI clock generation
The reference clock for the SPI module is the system PLL output. This clock is a
nominal 300 MHz.
ꢀ
ꢀ
In SPI master mode, the clock is divided down to produce the required data
rate.
In SPI slave mode, the divided down clock recovers the input SPI clock.
Clock generation
samples
SPI clock generation is specified using the Clock Generation register. These are
some examples of clock generation:
Interface Type
Master
Data rate
33 Mbps
20 Mbps
5 Mbps
500 Kbps
all
DIVISOR
0x009
Master
0x00F
0x03C
0x258
Master
Master
Slave
0x006
In SPI master
mode
In SPI master mode, the value programmed in the DIVISOR field must always be
rounded up to the next whole integer. For example, if the required data rate is 14
Mbps, the calculation is (300 / 14) or 21.43.
ꢀ
ꢀ
ꢀ
The value programmed in the DIVISOR field would be 0x016.
The actual data rate would be 13.64 Mbps.
The general equation is:
DIVISOR = round Up (PLL output / interface data rate)
In SPI slave mode
In SPI slave mode, the value programmed in the DIVISOR field should always be 0x006.
The SPI slave mode data rate is determined by the frequency of the input clock
provided by the external SPI master.
System boot-over-SPI operation
The NET+SPI ASIC boots from an external, non-volatile, serial memory device. The
device can be either a serial EEPROM or a serial Flash. In either case, the device
must support a four-wire, mode0-compatible SPI interface.
The boot-over-SPI hardware interfaces to devices requiring an 8-bit address, 16-bit
address, or 24-bit address. The address width is indicated by strapping pins
boot_mode[1:0].
436
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : S P I
System boot-over-SPI operation
Available
boot_mode[1:0]
Address width
Disabled
strapping options
00
01
10
11
8-bit address
16-bit address
24-bit address
EEPROM/FLASH
header
The boot-over-SPI hardware requires several pieces of user-supplied information to
complete the boot operation. This information must be located in a 128-byte
header starting at address zero in the external memory device. Each entry in the
header is four bytes long.
Header format
This is the format of the 128-byte header.
Entry
Name
Description
0x0
Size[19:0]
Total number of words to fetch from the SPI-EEPROM.
The total must include the 32-word header:
(31:20 reserved)
(Code image size in bytes + 128) / 4)
0x4
Mode[27:0]
All SDRAM components contain a Mode register. This
register contains control information required to
(31:28 reserved)
successfully access the component. The fields (available
in any SDRAM specification) are defined as follows:
ꢁBurst length: 4 for 32-bit data bus, 8 for 16-bit data bus
ꢁBurst type: Sequential
ꢁCAS latency: Component-specific; 2 or 3
ꢁOpMode: Standard
ꢁWrite burst mode: Programmed burst length
This value must be left-shifted such that it is aligned to the
row address bits as specified in “Address mapping,”
beginning on page 229. For example, 4Mx16 components
can be combined to create a 32-bit bus. These parts require
12 row address bits. With a CAS2 access, the Mode
register contents would be 0x22. This value is shifted 12
places to the left (0x00022000) to form the value in the
SDRAM config field.
0x8
Divisor[9:0]
Defines the interface data rate for the boot-over-SPI
operation after the initial 16-bytes. A data rate of about
375 Kbps fetches the 16-byte header. See the Clock
Generation register for more details.
(31:10 reserved)
0xc
HS Read[0]
A 1 indicates the external device supports high-speed read
operation. Serial FLASH devices operating above 20MHz
generally support this feature.
(31:1 reserved)
0x10
Config register
See the Memory Controller chapter.
www.digiembedded.com
437
S E R I A L C ON T RO L M O D U L E : S PI
System boot-over-SPI operation
Entry
Name
Description
0x14
DynamicRefresh
See the Memory Controller chapter.
For example, the value of this entry is 0x00000025 given
a 74.9 MHz AHB clock and a 7.8125μs refresh period.
Ox18
0x1c
DynamicReadConfig See the Memory Controller chapter.
DynamictRP
See the Memory Controller chapter
See the Memory Controller chapter
See the Memory Controller chapter
See the Memory Controller chapter
See the Memory Controller chapter
See the Memory Controller chapter
See the Memory Controller chapter
See the Memory Controller chapter
See the Memory Controller chapter
See the Memory Controller chapter
See the Memory Controller chapter
See the Memory Controller chapter.
Ox20
Ox24
Ox28
Ox2c
Ox30
Ox34
Ox38
Ox3c
Ox40
Ox44
Ox48
DynamictRAS
DynamictSREX
DynamictAPR
DynamictDAL
DynamictWR
DynamictRC
DynamictRFC
DynamictXSRt
DynamictRRD
DynamictMRD
DynamictConfig0
Field B (buffer enable, in the DynamicConfig0 register)
should be set to 0 (buffers disabled). The buffers will be
enabled by hardware as part of the boot process.
Ox4c
DynamictRasCas0
Reserved
See the Memory Controller Chapter
Ox50-
Ox7c
Ox80
Boot Code
First 4 bytes of boot code
Time to
The boot-over-SPI operation is performed in two steps.
completion
ꢀ
In the first step, the hardware fetches the 16-byte header. The data rate for
this step is about 375 Kbps and completes in less than 0.5ms.
ꢀ
In the second step, the hardware fetches the image at the user-specified data
rate. Calculate time to completion for this step as shown:
Time(s) = (1 / data_rate) * IMAGE
SIZE
For example, with a 20 Mbps data rate and a 256 KB (2Mb) image, the time
to completion is approximately 105ms.
438
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : S P I
SPI Control and Status registers
SPI Control and Status registers
The configuration registers for the SPI module are located at 0x9003_1000.
Register address
map
Address
9003_1000
9003_1010
9003_1020
9003_1024
Register
SPI Configuration register
Clock Generation register
Interrupt Enable register
Interrupt Status register
SPI Configuration register
Address: 9003_1000
This is the primary SPI Configuration register.
Register
31
15
30
29
13
28
27
11
26
25
24
23
22
6
21
5
20
4
19
18
17
16
0
Not used
14
12
10
9
8
7
3
2
1
MAS
TER
ML
B
RX
BIT
Not used
DISCARD
Not used
MODE
SLAVE
BYTE ORDR
Register bit
assignment
Bits
Access Mnemonic Reset
Description
Write this field to 0.
Enable master loopback mode
D31:13
D12
R/W
R/W
Not used
MLB
0
0
Write a 1 to enable the master mode transmitter to
receiver loopback function.
www.digiembedded.com
439
S E R I A L C ON T RO L M O D U L E : S PI
Clock Generation register
Bits
Access Mnemonic Reset
Description
D11:08
R/W
DISCARD
0
Discard bytes
Defines the number of bytes the receiver should drop
when the transmitter has initiated a new operation.
ꢀ
ꢀ
ꢀ
A new operation is defined by the chip select signal
being asserted low.
The programmed value defines the number of bytes
to discard.
The maximum number of receive bytes that can be
discarded is 14.
D07:06
D05:04
R/W
R/W
Not used
MODE
0
0
Write this field to 0.
SPI mode
Defines the required interface timing as specified in
D03
R/W
RXBYTE
0
Controls how the SPI receiver handles receive data.
ꢀ
RXBYTE set to 0 — The receiver buffers 4 bytes
before writing to the RX FIFO.
ꢀ
Write a 1 to RXBYTE — The receiver writes to the
RX FIFO each time a new byte is received.
This allows low latency handling of SPI receive data.
D02
R/W
BITORDR
0x0
Bit ordering
Controls the order in which bits are transmitted and
received in the serial shift register.
ꢀ
BITORDR set to 0 — Bits are processed LSB first,
MSB last.
ꢀ
BITORDR set to 1 — Bits are processed MSB first,
LSB last.
D01
D00
R/W
R/W
SLAVE
0
0
Slave enable
Set this field to 1 to enable the SPI module for slave
operation. The SLAVE field must not be set until all SPI
configuration fields have been defined.
You can set either the MASTER field (D00) or the
SLAVE field, but not both.
MASTER
Slave enable
Set this field to 1 to enable the SPI module for master
operation. The MASTER field must not be set until all
SPI configuration fields have been defined.
You can set either the MASTER field or the SLAVE field
(D01), but not both.
Clock Generation register
Address: 9003_1010
440
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : S P I
Interrupt Enable register
Use this register to define the data rate of the interface.
This register must be programmed in three steps. Failure to follow these steps can
result in unpredictable behavior of the SPI module.
Register
programming
steps
1
2
3
Set the ENABLE field to 0. The DIVISOR field must not be changed.
Set the DIVISOR field to the value you want.
Set the ENABLE field to 1. The DIVISOR field must not be changed.
Register
31
15
30
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
20
19
3
18
2
17
1
16
EN
ABLE
Not used
14
8
7
5
4
0
Not used
Divisor
Register bit
assignment
Bit(s)
Access Mnemonic Reset
Divisor
D31:17
D16
R/W
R/W
Not used
0
0
Write this field to 0.
Enable clock generation
ENABLE
Write a 1 to this field to enable the SPI module clock
generation logic.
D15:10
D09:00
R/W
R/W
Not used
0
0
Write this field to 0.
DIVISOR
Divisor
Allows you to specify the required data rate of the
interface. The reference clock used is the system PLL
output. This frequency is a nominal 300 MHz.
ꢀ
For SPI master operation — Set this field to a value
no smaller than 0x009. This produces the maximum
supported data rate of 33 Mbps.
ꢀ
For SPI slave operation — Always set this field to
0x006.
Interrupt Enable register
Address: 9003_1020
www.digiembedded.com
441
S E R I A L C ON T RO L M O D U L E : S PI
Interrupt Status register
Use the Interrupt Enable register to enable interrupt generation on specific events.
Enable the interrupt by writing a 1 to the appropriate bit field(s).
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
22
6
21
5
20
4
19
3
18
2
17
16
Not used
9
8
7
1
0
TX_ IDLE RX_IDLE
Not used
Register bit
assignment
T
Bits
Access Mnemonic Reset Description
D31:02
D01
R/W
R/W
Not used
0
0
Write this field to 0.
Enable transmit idle
TX_IDLE
Enables interrupt generation whenever the transmitter
moves from the active state to the idle state.
ꢀ
ꢀ
In master mode, this indicates that the transmit FIFO
is empty and that the transmitter is not actively
shifting out data.
In slave mode, this indicates that the externally
provided chip select has been deasserted.
D00
R/W
RX_IDLE
0
Enable receive idle
Enables interrupt generation whenever the receiver moves
from the active state to the idle state. In either master or
slave mode, this indicates that the chip select signal has
been deasserted.
Interrupt Status register
Address: 9003_1024
The Interrupt Status register provides status about SPI events. All events are
indicated by reading a 1 and are cleared by writing a 1.
442
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : S P I
SPI timing characteristics
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Not used
8
7
TX_ IDLE RX_IDLE
Not used
Register bit
assignment
Bits
Access Mnemonic Reset Description
D31:02
D01
R/W
Not used
0
0
Write this field to 0.
Transmit idle
R/W1TC TX_IDLE
Indicates that the transmitter has moved from the active
state to the idle state. The transmitter moves from the active
state to the idle state when the transmit FIFO is empty and
the transmitter is not actively shifting out data.
D00
R/W1TC RX_IDLE
0
Receive idle
Indicates that the receiver has moved from the active state
to the idle state. The receiver moves from the active state to
the idle state when a start bit has not been received within 4
bit periods of the previous stop bit.
SPI timing characteristics
These are the guaranteed timing parameters for all four SPI clocking modes.
SPI master timing
Parm
S1
Description
Min
1
Max
Unit
clock
ns
Notes
parameters
CS# falling to CLK rising
CLK period low time
1
2
2
3
3
4
4
1
1
S2
12
12
11
11
10
0
13
13
S3
CLK period high time
ns
S4
Data output setup to CLK rising
Data output hold from CLK rising
Data input setup to CLK rising
Data input hold from CLK rising
CLK falling to CS# rising
CS# deassertion time
ns
S5
ns
S6
ns
S7
ns
S8
1
clock
clock
S9
4
www.digiembedded.com
443
S E R I A L C ON T RO L M O D U L E : S PI
SPI timing characteristics
Notes:
1
The unit clock refers to the SPI master clock.
2
The SPI master interface clock duty cycle is always at least 52/48. The numbers
shown here are for a 40 Mhz clock rate.
3
4
The numbers shown here are for a 40 Mhz clock rate. Usually, this parameter is
one half the SPI master interface clock period less 1.5ns.
This parameter does not depend on the SPI master interface clock rate.
SPI master timing
diagram
CS#
CLK
MDO
MDI
S1
S2 S3
S8
S9
Mode3
Mode0
S4 S5
S6 S7
SPI slave timing
parameters
Parm
Description
Min
50
Max
Unit
ns
Notes
S11
S12
S13
S14
S15
S16
S17
S18
S19
CS# falling to CLK rising
CLK period low time
CLK period high time
3
53
80
80
ns
1,2
1,2
4
53
ns
Data input setup to CLK rising
Data input hold from CLK rising
Data output setup to CLK rising
Data output hold from CLK rising
CLK falling to CS# rising
10
ns
15
ns
3
80
ns
2
67
ns
2
50
ns
3
CS# deassertion time
266
ns
2
Notes:
1
The SPI slave interface clock duty cycle should be no worse than 60/40.
444
Hardware Reference NS9215
S E R I A L C O N T RO L M O D U L E : S P I
SPI timing characteristics
2
3
The numbers shown here are for a 7.5 Mhz SPI slave interface clock rate.
The numbers shown here are for a 300 Mhz PLL output frequency. This value
must be proportionally increased with a PLL output frequency decrease.
4
This parameter does not depend on any clock frequency.
SPI slave timing
diagram
CS#
CLK
SDI
S11
S12 S13
S18
S19
Mode3
Mode0
S14 S15
S16 S17
SDO
www.digiembedded.com
445
S E R I A L C ON T RO L M O D U L E : S PI
SPI timing characteristics
446
Hardware Reference NS9215
I2 C M A STER / SLAVE INTERF ACE
Physical I2C bus
I2C Master/Slave Interface
C
H
A
P
T
E
R
1
3
T
he I2C master/slave interface provides an interface between the ARM CPU and
the I2C bus.
The I2C master/slave interface basically is a parallel-to-serial and serial-to-parallel
converter. The parallel data received from the ARM CPU has to be converted to an
appropriate serial form to be transmitted to an external component using the I2C
bus. Similarly, the serial data received from the I2C bus has to be converted to an
appropriate parallel form for the ARM CPU. The I2C master interface also manages
the interface timing, data structure, and error handling.
Overview
The I2C module is designed to be a master and slave. The slave is active only when
the module is being addressed during an I2C bus transfer; the master can arbitrate
for and access the I2C bus only when the bus is free (idle) — therefore, the master
and slave are mutually exclusive.
Physical I2C bus
2
The physical I C bus consists of two open-drain signal lines: serial data (SDA) and
2
serial clock (SCL). Pullup resistors are required; see the standard I C bus
specification for the correct value for the application. Each device connected to the
bus is software-addressable by a unique 7- or 10-bit address, and a simple
master/slave relationship exists at all times.
A master can operate as a master-transmitter (writes)) or a master-receiver
(reads). The slaves respond to the received commands accordingly:
•
In transmit mode (slave is read), the host interface receives character-based
parallel data from the ARM. The module converts the parallel data to serial
format and transmits the serial data to the I C bus.
2
2
•
In receive mode (slave is written to), the I C bus interface receives 8-bit-
2
based serial data from the I C bus. The module converts the serial data to
parallel format and interrupts the host. The host’s interrupt service routine
2
reads the parallel data from the data register inside the I C module. The
serial data stream synchronization and throttling are done by modulating the
www.digiembedded.com
447
I 2C M A S T E R / S L A V E IN T ER F A C E
I2C external addresses
serial clock. Serial clock modulation can be controlled by both the
transmitter and receiver, based in their hosts’ service speed.
2
Multi-master bus
The I C is a true multi-master bus with collision detection and arbitration to
prevent data corruption when two or more masters initiate transfer simultaneously.
If a master loses arbitration during the addressing stage, it is possible that the
winning master is trying to address the transfer. The losing master must therefore
immediately switch over to its slave mode.
The on-chip filtering rejects spikes on the bus data line to preserve data integrity.
The number of ICs that can be connected to the same bus is limited only by a
maximum bus capacity of 400 pf.
I2C external addresses
2
I C external [bus] addresses are allocated as two groups of eight addresses (0000XXX
and 1111XXX)
:
Slave
addres
R/W
bit
Description
0000 000
0000 000
0000 001
0000 010
0000 011
0000 1xx
0
General call address
1
START byte (not supported in the processor)
CBUS address (not supported in the processor)
Reserved for different bus format
Reserved
X
X
X
X
hs-mode master code (not supported in the
processor)
1111 1xx
1111 0xx
X
X
Reserved
10-bit slave address
2
The general call address is for addressing all devices connected to the I C bus. A
device can ignore this address by not issuing an acknowledgement. The meaning of
the general call address is always specified in the second byte.
448
Hardware Reference NS9215
I2 C M A STER / SLAVE INTERF ACE
I2C command interface
I2C command interface
2
The I C module converts parallel (8-bit) data to serial data and serial data to
2
parallel data between the processor and the I C bus, using a set of interface
registers.
•
The primary interface register for transmitting data is the CMD_TX_DATA_REG
(write-only).
•
The primary interface register for receiving data is the STATUS_RX_DATA_REG
(read-only).
2
Locked interrupt
driven mode
I C operates in a locked interrupt driven mode, which means that each command
issued must wait for an interrupt response before the next command can be issued
(illustrated in "Flow charts," beginning on page 457).
The first bit of the command — 0 or 1 — indicates to which module — master or
slave, respectively — the command in the CMD field (of the CMD_TX_DATA_REG) is
sent. The master module can be sent a master command only; the slave module can
be sent a slave command only (see "Master module and slave module commands,"
beginning on page 449, for a list of commands). If a command is sent to the master
module, that module is locked until a command acknowledgement is given.
Similarly, if a command is sent to the slave module, the slave module is locked until
it receives a command acknowledgement. With either module, the
acknowledgement can be any interrupt associated with that module. When a
module is locked, another command must not be sent to that module.
The command lock status can be checked in the STATUS_RX_DATA_REG.
2
Master module
and slave module
commands
The I C master recognizes four high-level commands, which are used in the CMD
2
field of the Command register; the I C slave recognizes two high-level commands:
Command
Name
Description
0x0
M_NOP
M_READ
M_WRITE
M_STOP
S_NOP
No operation.
0x4
Start reading bytes from slave.
Start writing bytes to slave.
0x5
2
0x6
Stop this transaction (give up the I C bus).
0x10
No operation. This command is necessary for 16-bit
mode, providing data in TX_DATA_REG without a
command.
0x16
S_STOP
Stop transaction by not acknowledging the byte
received.
2
Bus arbitration
Any M_READ or M_WRITE command causes the I C module to participate in the bus
2
arbitration process when the I C bus is free (idle). If the module becomes the new
www.digiembedded.com
449
I 2C M A S T E R / S L A V E IN T ER F A C E
I2C registers
bus owner, the transaction goes through. If the module loses bus arbitration, an
M_ARBIT_LOST interrupt is generated to the host processor and the command must
be reissued.
I2C registers
All registers have 8-bit definitions, but must be accessed in pairs. For example,
TX_DATA_REG and CMD_REG are written simultaneously and RX_DATA_REG and
STATUS_REG are read simultaneously.
Register address
map
This table shows the register addresses. All configuration registers must be accessed
as 32-bit words and as single accesses only. Bursting is not allowed.
Register
Description
9005 0000
Command Transmit Data register (CMD_TX_DATA_REG)
Status Receive Data register (STATUS_RX_DATA_REG)
9005 0004
9005 0008
9005 000C
Master Address register
Slave Address register
Configuration register
After a reset, all registers are set to the initial value. If an unspecified register or
bit is read, a zero is returned.
Command Transmit Data register
Address: 9005 0000
The Command Transmit Data (CMD_TX_DATA_REG) register is the primary interface
2
register for transmission of data between the I/O hub and I C bus. This register is
write only.
Register
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
31
Reserved
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
PIPE DLEN TXVAL
CMD
TXDATA
450
Hardware Reference NS9215
I2 C M A STER / SLAVE INTERF ACE
Status Receive Data register
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:16
D15
N/A
W
Reserved
PIPE
N/A
0x0
Pipeline mode
Must be set to 0.
2
D14
W
DLEN
0x0
I C DLEN port (iic_dlen)
Must be set to 0.
D13
W
W
TXVAL
CMD
0x0
0x0
Provide new transmit data in
CMD_TX_DATA_REG (tx_data_val).
D12:08
Command to be sent (see "Master module and
2
D07:00
W
TXDATA
0x0
Transmit data to I C bus.
Status Receive Data register
Address: 9005 0000
The Status Receive Data register (STATUS_RX_DATA_REG) is the primary interface
2
register for receipt of data between the I/O hub and I C bus. This register is read
only.
Register
31
30
14
29
13
28
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
15
12
8
7
BSTS
RDE SCMDL
IRQCD
RXDATA
MCMDL
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:16
D15
N/A
R
Reserved
BSTS
N/A
N/A
Bus status (master only)
0Bus is free
1Bus is occupied
D14
R
RDE
N/A
Receive data enable (rx_data_en)
Received data is available.
www.digiembedded.com
451
I 2C M A S T E R / S L A V E IN T ER F A C E
Master Address register
Bits
Access Mnemonic
Reset
Description
D13
R
R
R
SCMDL
MCMDL
IRQCD
N/A
Slave command lock
The Slave Command register is locked.
D12
N/A
N/A
Master command lock
The Master Command register is locked.
D11:08
Interrupt codes (irq_code)
The interrupt is cleared if this register is read.
information.
2
D07:00
R
RXDATA
N/A
Received data from I C bus
Together with a RX_DATA interrupt, this register
provides a received byte (see “Master/slave
Master Address register
Address: 9005 0004
If using 7-bit addressing, the master device address field uses only bits D07:01;
otherwise, all 10 bits are used.
Register
31
15
30
14
29
28
12
27
11
26
10
25
9
24
23
22
21
20
4
19
3
18
2
17
1
16
0
Reserved
13
8
7
6
5
Mstr
addr
Reserved
Master device address
mode
452
Hardware Reference NS9215
I2 C M A STER / SLAVE INTERF ACE
Slave Address register
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
D10:01
R/W
MDA
0x0
Master device address
Used for selecting a slave.
Represents bits 6:0 of the device address if using
7-bit address. D10:08 are not used.
Represents bits 9:0 of device address if using
10-bit address.
D00
R/W
MAM
0x0
Master addressing mode
07 bit address mode
110 bit address mode
Slave Address register
Address: 9005 0008
If using 7-bit addressing, the slave device address field uses only bits D07:01;
otherwise, bits 10:01 are used.
Register
31
15
30
29
28
12
27
26
10
25
9
24
23
22
21
20
4
19
3
18
2
17
1
16
0
Reserved
14
13
11
8
7
6
5
Gnrl
call
addr
Slave
addr
mode
Reserved
Slave device address
Register bit
assignment
Bits
Access Mnemonic
Reset
Description
D11
R/W
GCA
0x0
General call address (s_gca_irq_en)
Enable the general call address.
D10:01
R/W
SDA
0x3FF
Slave device address
Represents bits 6:0 of device address if using 7-
bit address; D10:08 are not used.
Represents bits 9:0 of device address if using
10-bit address.
D00
R/W
SAM
0x0
Slave addressing mode
07 bit address mode
110 bit address mode
www.digiembedded.com
453
I 2C M A S T E R / S L A V E IN T ER F A C E
Configuration register
Configuration register
Address: 9005 000C
2
The Configuration register controls the timing on the I C bus. This register also
controls the external interrupt indication, which can be disabled.
2
The I C bus clock timing is programmable by the scl_ref value (D08:00). The timing
parameter for standard mode is as follows:
2
I C_bus_clock = clk / ((CLREF*2) + 4 + scl_delay)
clk = PLL Clk Out/4
Notes: To determine the “PLL Clk Out” frequency, see the “PLL configuration and control system
2
and fast-mode transmission, spike filtering can be applied to the received I C data and clock signal. The
spike filter evaluates the incoming signal and suppresses spikes. The maximum length of the suppressed
spikes can be specified in the spike filter width field of the Configuration register.
Timing parameter
for fast-mode
This is the timing parameter for fast-mode:
2
I C_bus_clock = (4 / 3) x (clk / ((CLREF*2) + 4 + scl_delay))
scl_delay is influenced by the SCL rise time.
Register
31
30
29
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
19
3
18
2
17
1
16
0
Reserved
s
15
14
13
8
7
4
IRQD TMDE VSCD
SFW
CLREF
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
0
Description
D31:16
D15
N/A
R/W
Reserved
IRQD
N/A
Mask the interrupt to the ARM CPU (irq_dis)
Must be set to 0.
D14
R/W
TMDE
1
Timing characteristics of serial data and serial
clock
0Standard mode
1Fast mode
D13
R/W
VSCD
1
Virtual system clock divider for master and
slave
Must be set to 0.
454
Hardware Reference NS9215
I2 C M A STER / SLAVE INTERF ACE
Interrupt Codes
Bits
Access Mnemonic
Reset
Description
D12:09
R/W
SFW
0xF
Spike filter width
A default value of 1 is recommended. Available
values are 0–15.
D08:00
R/W
CLREF
0x0
clk_ref[9:1]
The I2C clock on port iic_scl_out is generated
by the system clock divided by the 10-bit value
of clk_ref.
The LSB of clk_ref cannot be programmed, and
is set to 0 internally. The programmed value of
clk_ref[9:1] must be greater than 3.
Interrupt Codes
Interrupts are signaled in the irq_code field in the STATUS_REG, by providing the
ARM CPU waits for an interrupt by polling the STATUS_REG or checking the irq signal.
An interrupt is cleared by reading the STATUS_REG, which also forces the irq signal
down (minimum one cycle if another interrupt is stored).
Note: RX_DATA_REG contains only a received byte if it is accessed after a RX_DATA
master or slave interrupt is signaled. At all other times, the internal master or slave shift
Master/slave
interrupt codes
Code
0x0
0x1
0x2
0x3
0x4
0x5
0x6
0x7
0x8
Name
Master/slave
N/A
Description
NO_IRQ
No interrupt active
M_ARBIT_LOST
M_NO_ACK
M_TX_DATA
M_RX_DATA
M_CMD_ACK
N/A
Master
Master
Master
Master
Master
N/A
Arbitration lost; the transfer has to be repeated
No acknowledge by slave
TX data required in register TX_DATA
RX data available in register RX_DATA
Command acknowledge interrupt
Reserved
N/A
N/A
Reserved
S_RX_ABORT
Slave
The transaction is aborted by the master before
the slave performs a NO_ACK.
0x9
S_CMD_REQ
S_NO_ACK
Slave
Slave
Command request
0xA
No acknowledge by master (TX_DATA_REG is
reset)
x
www.digiembedded.com
455
I 2C M A S T E R / S L A V E IN T ER F A C E
Software driver
Code
Name
Master/slave
Description
0xB
S_TX_DATA_1ST
Slave
TX data required in register TX_DATA, first byte
of transaction
0xC
S_RX_DATA_1ST
Slave
RX data available in register RX_DATA, first
byte of transaction
0XD
0xE
S_TX_DATA
S_RX_DATA
S_GCA
Slave
Slave
Slave
TX data required in register TX_DATA
RX data available in register RX_DATA
General call address
0XF
Software driver
2
2
I C master
The I C master software driver uses three commands only:
software driver
•
•
•
M_READ to start a read sequence
M_WRITE to start a write sequence
2
M_STOP to give up the I C bus
If, during a read or write sequence, another M_READ or M_WRITE is requested by the
2
ARM CPU, a restart is performed on the I C bus. This opens the opportunity to
provide a new slave device address in the MAster Address register before the
command request.
2
2
I C slave high
The I C slave high level driver identifies one command: S_STOP, to discontinue a
level driver
transaction. After this command, the slave remains inactive until the next start
condition on the I C bus. If a slave is accessed by a master, it generates S_RX_DATA
2
distinguish the transactions from each other, special S_RX_DATA_1ST and
S_TX_DATA_1ST interrupts are generated for the transmitted byte.
456
Hardware Reference NS9215
I2 C M A STER / SLAVE INTERF ACE
Flow charts
Flow charts
Master module
(normal mode, 16-
bit)
host idle
write cmd
M_WRITE
write
write cmd
M_NOP
write
write cmd
M_READ
write (optional)
M_ADDR_REG
1
TX_DATA_REG
TX_DATA_REG
4
4
wait irq
read
rx/status
M_ARBIT_LOST
irq
2
wait irq
read status
M_NO_ACK
irq
wait irq
read
rx/status
write cmd
M_STOP
M_TX_DATA
irq
3
M_RX_DATA
irq
wait irq
read status
M_CMD_ACK
irq
write cmd
M_NOP
write (optional)
M_ADDR_REG
1
write cmd
M_READ
write cmd
M_WRITE
write cmd
M_STOP
Notes:
1
2
3
4
Writing M_ADDR_REQ is not required if the device address is not changed.
Read on a non-existing slave.
Do not wait for the slave to perform a NO_ACK.
STATUS_REG and RX_DATA_REG are read simultaneously.
www.digiembedded.com
457
I 2C M A S T E R / S L A V E IN T ER F A C E
Flow charts
Slave module
(normal mode, 16-
bit)
wait irq
read
rx/status
S_TX_DATA_1ST
irq
S_RX_DATA_1ST
irq
write cmd
S_NOP
write
TX_DATA_REG
1
wait irq
read
rx/status
wait irq
read status
S_RX_ABORT
irq
S_RX_DATA
irq
S_NO_ACK
irq
S_TX_DATA
irq
write cmd
S_NOP
write cmd
S_STOP
Note: STATUS_REG and RX_DATA_REG are read simultaneously.
458
Hardware Reference NS9215
Real Time Clock Module
C
H
A
P
T
E
R
1
4
T
he Real Time Clock (RTC) module tracks the time of the day to an accuracy of
10 milliseconds and provides calendar functionality that tracks day, month, and
year.
RTC functionality
RTC monitors these time periods:
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
Year from 1900-2999
Month from 1-12
Date from 1-28, 29, 30, or 31, as a function of year and month
Day of week from 1-7
Hour from 0-23, or from 1-12 with the AM/PM flag set
Minute from 0-59
Second from 0.00-59.99
RTC functionality also provides an alarm register that allows comparison of month,
date, hour, minute, second, and hundredth-second. Each item can be masked,
allowing an alarm to be generated at a particular time and date on a monthly basis.
An interrupt can be generated on the alarm event.
Event detection finds and generates interrupts on rollover conditions, including
rollovers into a new month, date, hour, minute, second, or hundredth-second.
459
R E A L TI M E C L O C K M O D U L E
RTC configuration and status registers
RTC configuration and status registers
All configuration registers must be accessed as 32-bit words and as single accesses
only. Bursting is not allowed.
Register address
Address
9006 0000
9006 0004
9006 0008
90060 000C
9006 0010
9006 0014
9006 0018
9006 001C
9006 0020
9006 0024
9006 0028
9006 002C
Description
map
RTC General Control register
12/24 Hour register
Time register
Calendar register
Time Alarm register
Calendar Alarm register
Alarm Enable register
Event Flags register
Interrupt Enable register
Interrupt Disable register
Interrupt Status register
General Status register
The reset values listed in the register descriptions are set when the regulated
battery voltage on pins N3 and M4 drops below 1.56V.
RTC General Control register
Address: 9006 0000
The RTC General Control register contains miscellaneous settings for the RTC
module.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
24
23
7
22
6
21
5
20
4
19
3
18
2
17
16
Reserved
9
8
1
0
Reserved
Cal
Time
460
Hardware Reference NS9215
R E A L TIM E C L O C K M O D U L E
12/24 Hour register
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:02
D01
N/A
R/W
Reserved
Cal
N/A
0x1
Calendar operation
0
1
Calendar operation enabled
Calendar operation disabled
D00
R/W
Time
0x1
Time (date, hour, minute, second) operation
0
1
Time operation enabled
Time operation disabled
12/24 Hour register
Address: 9006 0004
The 12/24 Hour register controls 12 or 24 hour clock mode operation.
Register
31
15
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
8
12/24
mode
Reserved
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:01
D00
N/A
R/W
Reserved
12/24
N/A
0x0
12/24 clock mode operation
0
1
24 hour mode operation
12 hour mode operation
www.digiembedded.com
461
R E A L TI M E C L O C K M O D U L E
Time register
Time register
Address: 9006 0008
The TIme register sets the time values to the correct values, and reads the time
registers. BCD is binary coded decimal.
Register
31
30
29
28
12
27
11
26
10
25
9
24
8
23
22
6
21
20
4
19
3
18
2
17
1
16
0
Rsvd
PM
HR_T
HR_U
S_U
Rsvd
M_T
M_U
H_U
15
14
13
7
5
Rsvd
S_T
H_T
Register bit
assignment
Bits
D31
D30
Access Mnemonic
Reset
N/A
Description
N/A
R/W
Reserved
PM
N/A
0x0
PM
Used in 12 hour mode only.
0
1
AM
PM
D29:28
D27:24
D23
R/W
R/W
N/A
R/W
R/W
N/A
R/W
R/W
R/W
R/W
HR_T
HR_U
Reserved
M_T
0x0
0x0
N/A
0x0
0x0
N/A
0x0
0x0
0x0
0x0
Hours, tens, BCD digit (0-2)
Hours, units, BCD digit (0-9)
N/A
D22:20
D19:16
D15
Minutes, tens, BCD digit (0-5)
Minutes, units, BCD digit (0-9)
N/A
M_U
Reserved
S_T
D14:12
D11:08
D07:04
D03:00
Seconds, tens, BCD digit (0-5)
Seconds, units, BCD digit (0-9)
S_U
H_T
Hundredths of a second, tens, BCD digit (0-9)
Hundredths of a second, units, BCD digit (0-9)
H_U
462
Hardware Reference NS9215
R E A L TIM E C L O C K M O D U L E
Calendar register
Calendar register
Address: 9006 000C
The Calendar register sets the calendar values to the correct values, and reads the
calendar registers. BCD is binary coded decimal.
Register
31
30
29
13
28
12
27
11
26
10
25
9
24
8
23
22
6
21
5
20
4
19
3
18
2
17
16
0
Reserved
C_T
D_T
C_U
D_U
Y_T
Y_U
15
14
7
1
Reserved
M_T
M_U
Day
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
0x0
Description
D31:30
D29:28
D27:24
D23:20
D19:16
D15:14
D13:12
D11:08
D07
N/A
R/W
R/W
R/W
R/W
N/A
R/W
R/W
R/W
R/W
R/W
Reserved
C_T
N/A
Century, tens, BCD digit (1-2)
Century, units, BCD digit (0-9)
Years, tens, BCD digit (0-9)
Years, units, BCD digit (0-9)
N/A
C_U
0x0
Y_T
0x0
Y_U
0x0
Reserved
D_T
N/A
0x0
Date, tens, BCD digit (0-3)
Date, units, BCD digit (0-9)
Months, tens, BCD digit (0-1)
Months, units, BCD digit (0-9)
D_U
0x0
M_T
0x0
D06:03
D02:00
M_U
Day
0x0
0x0
Day of week, units, BCD digit (0-7)
www.digiembedded.com
463
R E A L TI M E C L O C K M O D U L E
Time Alarm register
Time Alarm register
Address: 9006 0010
The Time Alarm register sets the time alarm. BCD is binary coded decimal.
Register
31
30
29
28
12
27
11
26
10
25
9
24
8
23
22
6
21
20
4
19
3
18
2
17
1
16
0
Rsvd
PM
HR_T
HR_U
S_U
Rsvd
M_T
M_U
H_U
15
14
13
7
5
Rsvd
S_T
H_T
Register bit
assignment
Bits
D31
D30
Access Mnemonic
Reset
N/A
Description
N/A
R/W
Reserved
PM
N/A
0x0
PM
Used in 12 hour mode only.
0
1
AM
PM
D29:28
D27:24
D23
R/W
R/W
N/A
R/W
R/W
N/A
R/W
R/W
R/W
R/W
HR_T
HR_U
Reserved
M_T
0x0
0x0
N/A
0x0
0x0
N/A
0x0
0x0
0x0
0x0
Hours, tens, BCD digit (0-2)
Hours, units, BCD digit (0-9)
N/A
D22:20
D19:16
D15
Minutes, tens, BCD digit (0-5)
Minutes, units, BCD digit (0-9)
N/A
M_U
Reserved
S_T
D14:12
D11:08
D07:04
D03:00
Seconds, tens, BCD digit (0-5)
Seconds, units, BCD digit (0-9)
S_U
H_T
Hundredths of a second, tens, BCD digit (0-9)
Hundredths of a second, units, BCD digit (0-9)
H_U
464
Hardware Reference NS9215
R E A L TIM E C L O C K M O D U L E
Calendar Alarm register
Calendar Alarm register
Address: 9006 0014
The Calendar Alarm register sets the calendar alarm. This register programs a
specific date and month when an alarm should cause an event. You cannot set an
alarm that is more than one year in the future. BCD is binary coded decimal.
Register
31
30
29
13
28
12
27
11
26
10
25
9
24
23
22
6
21
5
20
4
19
3
18
2
17
16
0
Reserved
15
14
8
7
1
Reserved
D_T
D_U
M_T
M_U
Reserved
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
0x0
Description
D31:14
D13:12
D11:08
D07
N/A
R/W
R/W
R/W
R/W
N/A
Reserved
D_T
N/A
Date, tens, BCD digit (0-3)
Date, units, BCD digit (0-9)
Months, tens, CD digit (0-1)
D_U
0x0
M_T
0x0
D06:03
D02:00
M_U
0x0
Months, units, BCD digit (0-9)
N/A
Reserved
N/A
Alarm Enable register
Address: 9006 0018
The Alarm Enable register sets the fields that can trigger an alarm. Setting a bit
enables the corresponding time unit trigger event. Triggering the alarm causes an
event to be generated, as set in the Events Flag register.
If all fields are enabled, an alarm is generated at the time set — the specific month,
date, hour, minute, second, and hundredth-second. If only the minute field is set,
the alarm triggers when that particular minute is reached, and every hour
thereafter.
www.digiembedded.com
465
R E A L TI M E C L O C K M O D U L E
Event Flags register
Register
31
15
30
14
29
13
28
12
27
26
10
25
9
24
23
7
22
6
21
20
19
18
17
16
Reserved
11
8
5
4
3
2
1
0
Reserved
Mnth
Date
Hour
Min
Sec
Hsec
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
N/A
D31:06
D05
N/A
R/W
Reserved
Mnth
0x0
Month
0
1
Disable the month event
Enable the month event
D04
D03
D02
D01
D00
R/W
R/W
R/W
R/W
R/W
Date
Hour
Min
Sec
0x0
0x0
0x0
0x0
0x0
Date
0
1
Disable the date event
Enable the date event
Hour
0
1
Disable the hour event
Enable the hour event
Minute
0
1
Disable the minute event
Enable the minute event
Second
0
1
Disable the second event
Enable the second event
Hsec
Hundredth of a second
0
1
Disable the hundredth second event
Enable the hundredth second event
Event Flags register
Address: 9006 001C
The Event Flags register indicates that an event has occurred since the last reset.
Read the register to determine the cause of the current active interrupt. This
register is cleared when read (R/R in Access column).
Note that the Event Flags register can change even if the corresponding alarm
enable bit is not set.
466
Hardware Reference NS9215
R E A L TIM E C L O C K M O D U L E
Event Flags register
Register
31
15
30
14
29
13
28
12
27
26
10
25
9
24
23
7
22
21
5
20
4
19
3
18
2
17
1
16
0
Reserved
11
8
6
Mnth
Evnt
Date
Evnt
Hour
Evnt
Min
Evnt
Sec
Evnt
Hsec
Evnt
Reserved
Alarm
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
N/A
D31:07
D06
N/A
R/R
Reserved
Alarm
0x0
Alarm event
One of the events programmed in the Alarm
Events register has triggered.
D05
D04
D03
D02
D01
D00
R/R
R/R
R/R
R/R
R/R
R/R
Mnth Evnt
Date Evnt
Hour Evnt
Min Evnt
Sec Evnt
0x0
0x0
0x0
0x0
0x0
0x0
Month event
0
1
Month event has not occurred
Month event has occurred
Date event
0
1
Date event has not occurred
Date event has occurred
Hour event
0
1
Hour event has not occurred
Hour event has occurred
Minute event
0
1
Minute event has not occurred
Minute event has occurred
Second event
0
1
Second event has not occurred
Second event has occurred
Hsec Evnt
Hundredth of a second event
0
1
Hundredth second event has not occurred
Hundredth second event has occurred
www.digiembedded.com
467
R E A L TI M E C L O C K M O D U L E
Interrupt Enable register
Interrupt Enable register
Address: 9006 0020
The Interrupt Enable register sets which events can generate and interrupt. The
interrupt that is generated remains set until it is cleared by disabling the event or
by reading/clearing the Event Flags register.
Register
31
15
30
14
29
13
28
12
27
26
10
25
9
24
23
7
22
21
20
19
18
17
16
Reserved
11
8
6
5
4
3
2
1
0
Alrm
Int
Mnth
Int
Date
Int
Hour
Int
Min
Int
Sec
Int
Hsec
Int
Reserved
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:07
D06
N/A
W
Reserved
Alrm Int
N/A
0x0
Alarm interrupt
0
1
Disable alarm interrupt
Enable alarm interrupt
D05
D04
D03
D02
D01
D00
W
W
W
W
W
W
Mnth Int
Date Int
Hour Int
Min Int
Sec Int
0x0
0x0
0x0
0x0
0x0
0x0
Month interrupt
0
1
Disable month interrupt
Enable month interrupt
Date interrupt
0
1
Disable date interrupt
Enable date interrupt
Hour interrupt
0
1
Disable hour interrupt
Enable hour interrupt
Minute interrupt
0
1
Disable minute interrupt
Enable minute interrupt
Second interrupt
0
1
Disable second interrupt
Enable second interrupt
Hsec Int
Hundredth of a second interrupt
0
1
Disable hundredth second interrupt
Enable hundredth second interrupt
468
Hardware Reference NS9215
R E A L TIM E C L O C K M O D U L E
Interrupt Disable register
Interrupt Disable register
Address: 9006 0024
The Interrupt Disable register resets interrupts that are currently enables. An
interrupt is disabled by writing a 1, then a 0, to the appropriate disable register bit.
Register
31
15
30
14
29
13
28
12
27
26
10
25
9
24
23
22
21
20
19
18
17
16
Reserved
11
8
7
6
5
4
3
2
1
0
Alrm
Dis
Mnth
Dis
Date
Dis
Hour
Dis
Min
Dis
Sec
Dis
Hsec
Dis
Reserved
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:07
D06
N/A
W
Reserved
Alrm Dis
N/A
0x0
Alarm interrupt disable
0
1
Enable alarm interrupt
Disable alarm interrupt
D05
D04
D03
D02
D01
D00
W
W
W
W
W
W
Mnth Dis
Date Dis
Hour Dis
Min Dis
Sec Dis
0x0
0x0
0x0
0x0
0x0
0x0
Month interrupt disable
0
1
Enable month interrupt
Disable month interrupt
Date interrupt disable
0
1
Enable date interrupt
Disable date interrupt
Hour interrupt disable
0
1
Enable hour interrupt
Disable hour interrupt
Minute interrupt disable
0
1
Enable minute interrupt
Disable minute interrupt
Second interrupt disable
0
1
Enable second interrupt
Disable second interrupt
Hsec Dis
Hundredth of a second interrupt disable
0
1
Enable hundredth second interrupt
Disable hundredth second interrupt
www.digiembedded.com
469
R E A L TI M E C L O C K M O D U L E
Interrupt Enable Status register
Interrupt Enable Status register
Address: 9006 0028
The Interrupt Enable Status register determines which interrupt sources are enabled
and which interrupt sources are disabled.
Register
31
15
30
14
29
13
28
12
27
26
10
25
9
24
23
7
22
21
20
19
18
17
16
Reserved
11
8
6
5
4
3
2
1
0
Alrm
Stat
Mnth
Stat
Date
Stat
Hour
Stat
Min
Stat
Sec
Stat
Hsec
Stat
Reserved
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
1
Description
D31:07
D06
N/A
R
Reserved
Alrm Stat
N/A
Alarm interrupt status
0
1
Interrupt enabled
Interrupt disabled
D05
D04
D03
D02
D01
D00
R
R
R
R
R
R
Mnth Stat
Date Stat
Hour Stat
Min Stat
Sec Stat
1
1
1
1
1
1
Month interrupt status
0
1
Interrupt enabled
Interrupt disabled
Date interrupt status
0
1
Interrupt enabled
Interrupt disabled
Hour interrupt status
0
1
Interrupt enabled
Interrupt disabled
Minute interrupt status
0
1
Interrupt enabled
Interrupt disabled
Second interrupt status
0
1
Interrupt enabled
Interrupt disabled
Hsec Stat
Hundredth of a second interrupt status
0
1
Interrupt enabled
Interrupt disabled
470
Hardware Reference NS9215
R E A L TIM E C L O C K M O D U L E
General Status register
General Status register
Address: 9006 002C
The General Status register determines the status of the RTC configuration. If an
invalid configuration is found, the RTC counters do not start operation.
Register
31
15
30
14
29
13
28
12
27
11
26
25
24
23
7
22
6
21
5
20
4
19
18
17
16
Reserved
10
9
8
3
2
1
0
Reserved
VCAC VTAC VCC
VTC
Register bit
assignment
Bits
Access Mnemonic
Reset
N/A
Description
D31:04
D03
N/A
R
Reserved
VCAC
N/A
0x1
Valid calendar alarm configuration
0
1
Invalid
Valid
D02
D01
D00
R
R
R
VTAC
VCC
VTC
0x1
Valid time alarm configuration
0
1
Invalid
Valid
Valid calendar configuration
0
1
Invalid
Valid
Valid time configuration
0
1
Invalid
Valid
www.digiembedded.com
471
R E A L TI M E C L O C K M O D U L E
General Status register
472
Hardware Reference NS9215
Analog-to-Digital Converter
(ADC) Module
C
H
A
P
T
E
R
1
5
The NS9215 ASIC supports a 12-bit successive approximation analog-to-digital
converter (ADC). To maximize flexibility, an input pin is provided to apply an
external reference voltage, which defines the full scale input range. An analog
multiplexer is included to enable the selection of up to eight inputs.
Features
The ADC module supports these features:
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
12-bit resolution
1 MHz conversion rate
Single-ended 8:1 multiplexed inputs
Rail-to-rail input range
12-bit output, either DMA or direct CPU access
ADC module
structure
This diagram shows the ADC module structure.
473
A N A L O G - T O - D I G I T A L C O N V E R T E R ( A D C) M O D U L E
ADC DMA procedure
vref
ADC
vref_gnd
vin_7
.
8:1
SAR
ADC
dout[11:0]
done
.
vin_0
MUX
.
adc_clk
adc_reset
sel[2:0]
start
ADC Control
ADC control
block
The ADC control block provides access between the CPU and the ADC module. The
ADC clock and control signals are generated in this block. The ADC module output
can be either DMA’d to memory or read directly by the CPU.
ꢀ
ꢀ
ꢀ
If DMA is enabled, ADC output data is written to memory using UART D’s
receive DMA controller.
If more than one channel is enabled, word 0 in the DMA buffer will always be
from channel 0, followed by the data from the other selected channels.
The data buffer length must be a word multiple of the number of selected
channels. For example, if three channels are selected, the buffer length must
be a multiple of three words or 12 bytes.
ADC DMA procedure
If using DMA, the DMA channel must be set up first and enabled before enabling the
ADC. The procedure below must be followed each time a new DMA is started or if a DMA
FIFO overflow is detected. The RX FIFO overflow interrupt should be enabled to detect an
overflow.
1
Configure the ADC Configuration register at address 9003 9000 for DMA operation
(bit 3 set to 1) and the number of channels but leave bit 31 set to a 0.
474
Hardware Reference NS9215
A N A L O G - T O - D I G I T A L C O N V E R T E R ( A D C ) M O D U L E
ADC control and status registers
2
3
Set up the ADC DMA control registers and buffer descriptors (UART channel D).
Reset the ADC module by writing a 0 then a 1 to bit 8 in the Module Reset
register at address A090 0180.
4
5
Flush the ADC DMA FIFO by writing a 1 then a 0 to bit 17 in UART Channel D
Wrapper Configuration register at address 9002 9000.
Enable the ADC DMA channel by writing a 1 then a 0 to bit 31 in the UART D DMA
RX Control register at address 9002 8004. 6. Start the ADC by writing a 1 to bit
31 in the ADC Configuration register at address 9003 9000.
ADC control and status registers
The ADC configuration registers are located at offset 0x9003_9000.
Register address
map
Address
Description
Access
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset value
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
9003_9000
9003_9004
9003_9008
9003_900C
9003_9010
9003_9014
9003_9018
9003_901C
9003_9020
9003_9024
ADC Configuration register
ADC Clock Configuration register
ADC Output 0 register
ADC Output 1 register
ADC Output 2 register
ADC Output 3 register
ADC Output 4 register
ADC Output 5 register
ADC Output 6 register
ADC Output 7 register
ADC Configuration register
Address: 9003_9000
The ADC Configuration register is the primary Wrapper Configuration register.
www.digiembedded.com
475
A N A L O G - T O - D I G I T A L C O N V E R T E R ( A D C) M O D U L E
ADC Configuration register
Register
31
30
14
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
16
0
ADCEN
Reserved
INSTAT
15
8
1
Reserved
INTCLR DMAEN
SEL
Register bit
assignment
Bit(s)
Access Mnemonic
Reset
Description
D31
R/W
ADCEN
0
0
The ADC module is disabled and held in
reset
1
The ADC module is enabled
D30:19
D18:16
N/A
R
Reserved
INSTAT
N/A
0
N/A
Interrupt status
Indicates the channel processed at the time of
the interrupt.
D15:5
D04
N/A
R/W
Reserved
INTCLR
N/A
0
N/A
Interrupt clear
The ADC module generates an interrupt each
time the ADC generates a new value. This bit
clears the interrupt. The CPU must write a 1,
then a 0 to this bit to clear the interrupt.
D03
R/W
R/W
DMAEN
0
DMA enable
If set, ADC output data is written to memory
using UART D’s receive DMA.
0
1
DMA disabled
DMA enabled
D02:00
SEL
000
ADC channel select
Controls how many channels are active.
000
001
010
011
100
101
110
111
Channel 0
Channels 0-1
Channels 0-2
Channels 0-3
Channels 0-4
Channels 0-5
Channels 0-6
Channels 0-7
476
Hardware Reference NS9215
A N A L O G - T O - D I G I T A L C O N V E R T E R ( A D C ) M O D U L E
ADC Clock Configuration register
ADC Clock Configuration register
Address: 9003_9004
The ADC Clock Configuration register controls the ADC clock generator. The source
clock is the output of the PLL. The maximum ADC clock frequency is 14 MHz and the
conversion time is 14 clock cycles. This is the formula for the ADC clock:
ADC clock = PLL clock / (2 x (N+1))
Example
ꢀ
ꢀ
ꢀ
PLL clock frequency = 299.8272 MHz
N value = 10
ADC clock frequency:
ADC clock = 299.8272 MHz / (2 x (10+1)) = 13.6285 MHz
Wait states can be added to increase conversion time beyond 14 clock cycles.
Register
31
15
30
14
29
28
12
27
11
26
10
25
9
24
8
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
WAIT
13
Not used
N
Register bit
assignment
Bit(s)
Access Mnemonic
Reset
Description
D31:16
R/W
WAIT
N/A
Number of additional clock cycles per conversion
cycle.
D15:10
D09:00
R/W
R/W
Not used
N
0
0
This field must be written to 0.
ADC clock converter.
ADC Output Registers 0-7
Addresses: 9003_9008 / 9003_900C / 9003_9010 / 9003_9014 / 9003_9018 /
9003_901C / 9003_9020 / 9003_9024
The ADC Output registers provide CPU access for the ADC output for each channel.
www.digiembedded.com
477
A N A L O G - T O - D I G I T A L C O N V E R T E R ( A D C) M O D U L E
ADC Output Registers 0-7
Register
31
15
30
29
13
28
12
27
11
26
10
25
9
24
23
7
22
6
21
5
20
4
19
3
18
2
17
1
16
0
Not used
14
8
Not used
DOUT
Register bit
assignment
Bit(s)
D31:12
D11:00
Access Mnemonic
Reset
Description
This field must be written to 0.
Provides the output of the ADC for each channel.
R/W
R
Not used
DOUT
0
0
478
Hardware Reference NS9215
TI MI NG
Electrical characteristics
Timing
C
H
A
P
T
E
R
1
6
T
his chapter provides the electrical specifications, or timing, integral to the
operation of the processor. Timing includes information about DC and AC
characteristics, output rise and fall timing, and crystal oscillator specifications.
Electrical characteristics
Absolute
The processor operates at a 1.8V core, with 3.3V I/O ring voltages.
maximum ratings
Permanent device damage can occur if absolute maximum ratings are ever
exceeded. Absolute maximum ratings are below.
a
Parameter
Symbol
Rating
Unit
V
DC supply voltage
DC input voltage
DC output voltage
DC input current
Storage temperature
V
- 0.3 to + 3.9
-0.3 to 5.0V
DDA
V
V
I
V
INA
-0.3 to V
+0.3
V
OUTA
DDA
± 10
mA
°C
IN
T
- 40 to + 125
STG
aV
, V , V
: Ratings of I/O cells for 3.3V interface.
DDA
INA
OUTA
V
: Ratings of internal cell.
DDC
The processor is immune to power supply sequencing problems.
www.digiembedded.com
479
TI M I NG
Electrical characteristics
Recommended
operating
conditions
Recommended operating conditions specify voltage and temperature ranges over
which a circuit’s correct logic function is guaranteed. The specified DC electrical
characteristics are satisfied over these ranges. Below are the recommended
operating conditions.
a
Symbol
Parameter
Rating
3.0 to 3.6
1.62 to 1.98
125
Unit
V
DC supply voltage
V
V
DDA
(core)
V
DDC
o
Maximum junction temperature
T
C
J
a
V
V
: Ratings of I/O cells for 3.3V interface.
DDA
Ratings of internal cells
DDC:
Power dissipation
The table below shows the maximum power dissipation for I/O and core:
CPU / Memory clock
Power
150MHz/75MHz
Total 1.019W
Core 0.880W
I/O 0.139W
75 MHz/75MHz
Total 0.828W
Core 0.696W
I/O 0.132W
112MHz/56MHz
Total 0.638W
Core 0.536W
I/O 0.102W
56MHz/56MHz
Total 0.499W
Core 0.403W
I/O 0.096W
Sleep Mode, wake on Ethernet
Sleep Mode, wake on External IRQ
Main Power Down, Battery Draw
Total 0.073W
Core 0.027W
I/O 0.046W
Total 0.055W
Core 0.022W
I/O 0.033W
3.0V - 32uA
1.8V - 6uA
480
Hardware Reference NS9215
TI MI NG
DC electrical characteristics
DC electrical characteristics
DC characteristics specify the worst-case DC electrical performance of the I/O
buffers that are guaranteed over the specified temperature range.
Inputs
All electrical inputs are 3.3V interface.
The processor I/O are 5 volt tolerant.
DC electrical inputs are provided below.
a
Sym
Parameter
Condition
Value
Unit
V
High-level input voltage:
LVTTL level
Min
2.0
V
IH
V
Low-level input voltage:
LVTTL level
Max
0.8
V
IL
I
High level input current (no pulldown)
Input buffer with pulldown
V
V
V
= V
= V
Min/Max
-10/10
µA
IH
INA
DDA
10/200
-10/10
Min/Max
Min/Max
µA
µA
I
I
Low-level input current (no pullup
Input buffer with pullup
IL
INA
SS
Min/Max
Min/Max
10/200
-10/10
µA
µA
I
High-impedance leakage current
= V
or V
OZ
OUTA
DDA SS
V
a SS = 0V (GND)
www.digiembedded.com
481
TI M I NG
Reset and edge sensitive input timing requirements
Ouputs
All electrical outputs are 3.3V interface.
DC electrical outputs are provided below.
Sym
Parameter
Value
Min
Unit
V
V
V
High-level output voltage (LVTTL level)
V
-0.6
OH
IL
DDA
Low-level input voltage:
LVTTL level
Max
0.4
V
Reset and edge sensitive input timing requirements
The critical timing requirement is the rise and fall time of the input. If the rise time
is too slow for the reset input, the hardware strapping options may be registered
incorrectly. If the rise time of a positive-edge-triggered external interrupt is too slow,
then an interrupt may be detected on both the rising and falling edge of the input
signal.
A maximum rise and fall time must be met to ensure that reset and edge sensitive
inputs are handled correctly. With Digi processors, the maximum is 500 nanoseconds
as shown:
tR
reset_n or positive edge input
tR max = 500nsec
V
= 0.8V to 2.0V
IN
tF
negative edge input
tF max = 500nsec
V
= 2.0V to 0.8V
IN
482
Hardware Reference NS9215
TI MI NG
Reset and edge sensitive input timing requirements
If an external device driving the reset or edge sensitive input on a Digi processor
cannot meet the 500ns maximum rise and fall time requirement, the signal must be
buffered with a Schmitt trigger device. Here are sample Schmitt trigger device part
numbers:
Manufacturer Part Number
Description
Fairchild
Philips
TI
NC7SP17
Single Schmitt trigger buffer,
available in 5-lead SC70 and 6-lead MicroPak packages
74LVC1G17GW
Single Schmitt trigger buffer,
available in 5-lead SC70 and SOT 353 packages
SN74LVC1G17DC Single Schmitt trigger buffer,
available in 5-lead SC70 and SOT 353 packages
ON Semi
NL17SZ17DFT2
Single Schmitt trigger buffer,
available in 5-lead SC70 and SOT 353 packages.
www.digiembedded.com
483
TI M I NG
Memory Timing
Memory Timing
All AC characteristics are measured with 35pF, unless otherwise noted.
Memory timing contains parameters and diagrams for both SDRAM and SRAM timing.
The table below describes the values shown in the SDRAM timing diagrams.
Parm Description
Min Max Unit Notes
M1
data input setup time to rising
1.0
0.0
ns
ns
ns
M2
data input hold time to rising
clk_out high to address valid
address hold time
M4
9.5
M11
M5
4.0
clk_out high to data_mask
clk_out high to dy_cs_n low
clk_out high to ras_n low
clk_out high to cas_n low
clk_out high to we_n low
clk_out high to data out
data out hold time
9.5
9.5
9.5
9.5
9.5
9.5
ns
ns
ns
ns
ns
ns
1, 2
3, 4
M6
M7
M8
M9
M10
M12
M3
4.0
clk_out high to clk_en high
clk_en high to sdram access
end sdram access to clk_en low
9.5
2
ns
M13
M14
2
2
clock
clocks
2
Notes:
1
2
3
4
All four data_mask signals are used for all transfers.
All four data_mask signals will go low during a read cycle, for both 16-bit and 32-bit transfers.
Only one of the clk_out signals is used.
Only one of the dy_cs_n signals is used.
484
Hardware Reference NS9215
TI MI NG
Memory Timing
SDRAM burst
read (16-bit)
pre
a ct
rea d
lat
d -A
d -B
d -C
d -D
d-E
d-F
d -G
d-H
clk_ ou t
M2
M 1
da ta< 3 1:1 6>
M1 1
M4
N ot e-1
ad dr
d ata _m ask< 3: 0>
d y_cs_ n< 3: 0> *
ra s_n
N o te-2
M 5
M 6
M 7
M 8
ca s_n
M 9
we _n
Notes:
1
2
This is the bank and RAS address.
This is the CAS address.
www.digiembedded.com
485
TI M I NG
Memory Timing
SDRAM burst
read (16 bit), CAS
latency = 3
pre
act
rea d
la t
la t
d-A
d-B
d -C
d -D
d-E
d -F
d-G
d-H
clk_ ou t
da ta< 3 1:1 6>
ad dr
M 2
M 1
M1 1
M 4
N ote -1
N ote -2
M5
d ata _m ask< 3: 0>
M6
d y_cs_ n< 3: 0> *
M7
ra s_n
M 8
ca s_n
M9
we _n
Notes:
1
2
This is the bank and RAS address.
This is the CAS address.
486
Hardware Reference NS9215
TI MI NG
Memory Timing
SDRAM burst
write (16 bit)
pr e
ac t
w r d- A
d -B
d -C
d- D
d - E
d -F
d- G
d -H
c lk _ ou t
M 12
M 1 0
d ata < 31: 0>
ad dr
M 4
N ote -1
No te -2
M 5
M 5
M 6
M 7
d ata _m as k < 3: 2>
da ta_ m as k < 1:0 >*
d y _c s _ n< 3: 0> *
ra s _n
M 8
c a s _n
M 9
we _n
Notes:
1
2
This is the bank and RAS address.
This is the CAS address.
www.digiembedded.com
487
TI M I NG
Memory Timing
SDRAM burst
read (32 bit)
prech g
act ive
re ad
ca s lat
da ta -A
dat a-B
da ta-C
d ata -D
clk_ ou t
M2
M1
d ata < 31: 0>
ad dr
M 4
M 11
N ote -1
No te-2
M 5
M6
M7
da ta_ m ask< 3:0 >*
d y_cs_ n< 3: 0> *
ra s_n
M 8
ca s_n
M9
we _n
Notes:
1
2
This is the bank and RAS address.
This is the CAS address.
488
Hardware Reference NS9215
TI MI NG
Memory Timing
SDRAM burst
read (32 bit), CAS
latency = 3
p re
a ct
re ad
lat
la t
da ta-A
d ata -B
da ta-C
d ata -D
clk_ ou t
M 2
M 1
d ata < 31: 0>
ad dr
M4
M1 1
N o te-1
N o te-2
M5
da ta_ m ask< 3:0 >*
M 6
d y_cs_ n< 3: 0> *
M 7
ra s_n
M 8
ca s_n
M 9
we _n
Notes:
1
2
This is the bank and RAS address.
This is the CAS address.
www.digiembedded.com
489
TI M I NG
Memory Timing
SDRAM burst
write (32-bit)
prechg
acti ve
wr d-A
data-B
data-C
data-D
cl k_out
M10
M12
data<31:0>
M4
Note-1
Note-2
addr
M5
data_mask<3:0>*
M6
M7
dy_cs_n<3:0>
ras_n
M8
cas_n
M9
we_n
Notes:
1
2
This is the bank and RAS address.
This is the CAS address.
490
Hardware Reference NS9215
TI M I NG
Memory Timing
Values in SRAM
timing diagrams
The next table describes the values shown in the SRAM timing diagrams.
Parm Description
clock high to data out valid
Min Max Unit Notes
M15
M16
M17
M18
M19
M20
M21
M22
M23
M24
M25
M26
M27
M28
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
10
0
+2
+2
+2
+2
+2
+2
+2
+2
+2
+2
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
data out hold time from clock high
clock high to address valid
address hold time from clock high
clock high to st_cs_n low
2
2
clock high to st_cs_n high
clock high to we_n low
clock high to we_n high
clock high to byte_lanes low
clock high to byte_lanes high
data input setup time to rising clk
data input hold time to rising clk
clock high to oe_n low
-2
-2
+2
+2
clock high to oe_n high
Notes:
1
2
The (CPU clock out / 2) signal is for reference only.
Only one of the four dy_cs_n signals is used. The diagrams show the active low configuration, which can be
reversed (active high) with the PC field.
3
Use this formula to calculate the length of the st_cs_n signal: Tacc + board delay + (optional buffer delays,
both address out and data in) + 10ns
494
Hardware Reference NS9215
TI MI NG
Memory Timing
Static RAM read
cycles with 0 wait
states
clk_ ou t
M 26
M2 5
d ata < 31: 0>
ad dr< 27: 0>
st_cs_ n< 3: 0>
oe _n
M1 7
M1 9
M2 7
M2 3
M 18
M 20
M 28
M 24
byte _lan e< 3: 0>
ꢀ
ꢀ
ꢀ
WTRD = 1
WOEN = 0
If the PB field is set to 1, all four byte_lane signals will go low for 32-bit, 16-
bit, and 8-bit read cycles.
ꢀ
If the PB field is set to 0, the byte_lane signal will always be high.
www.digiembedded.com
495
TI M I NG
Memory Timing
Static RAM
asynchronous
page mode read,
WTPG = 1
N ot e-1
N o te-2
N o te-2
N o te-2
clk_ ou t
M2 6
M 26
M 2 5
M2 5
d ata < 31: 0>
ad dr< 27: 0>
st_cs_ n< 3: 0>
oe _n
M1 7
M 18
N ote -4
M 18
N ote -3
N ot e-5
No te-6
M1 9
M2 7
M2 3
M 20
M 28
M 24
N o te-7
byte _lan e< 3: 0>
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
WTPG = 1
WTRD = 2
If the PB field is set to 1, all four byte_lane signals will go low for 32-bit,
16-bit, and 8-bit read cycles.
The asynchronous page mode will read 16 bytes in a page cycle. A 32-bit bus
will do four 32-bit reads, as shown (3-2-2-2). A 16-bit bus will do eight 16-bit
reads (3-2-2-2-3-2-2-2) per page cycle, and an 8-bit bus will do sixteen 8-bit
reads (3-2-2-2-3-2-2-2-3-2-2-2-3-2-2-2) per page cycle. 3-2-2-2 is the example
used here, but the WTRD and WTPG fields can set them differently.
Notes:
1
2
3
4
5
6
7
8
The length of the first cycle in the page is determined by the WTRD field.
The length of the 2nd, 3rd, and 4th cycles is determined by the WTPG field.
This is the starting address. The least significant two bits will always be ‘00.’
The least significant two bits in the second cycle will always be ‘01.’
The least significant two bits in the third cycle will always be ‘10.’
The least significant two bits in the fourth cycle will always be ‘11.’
If the PB field is set to 0, the byte_lane signal will always be high during a read cycle.
Setting the BMODE (Burst mode) bit D02 in the static memory configuration register allows the
static output enable signal to toggle during bursts.
496
Hardware Reference NS9215
TI MI NG
Memory Timing
Static RAM read
cycle with
configurable wait
states
clk_out
M26
M25
data<31:0>
addr<27:0>
st_cs_n<3:0>
oe_n
M17
M19
M27
M23
M18
M20
Note-1
Note-1
Note-1
M28
M24
byte_lane<3:0>
ꢀ
ꢀ
ꢀ
WTRD = from 1 to 15
WOEN = from 0 to 15
If the PB field is set to 1, all four byte_lane signals will go low for 32-bit,
16-bit, and 8-bit read cycles.
ꢀ
If the PB field is set to 0, the byte_lane signal will always be high.
www.digiembedded.com
497
TI M I NG
Memory Timing
Static RAM
sequential write
cycles
clk_out
data<31:0>
addr<27:0>
st_cs_n<3:0>
we_n
M15
M17
M19
M16
M18
M20
M21
M22
M22
M23
M24
byte_lane<3:0>
M21
Note1
byte_lane[3:0] as WE *
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
WTWR = 0
WWEN = 0
During a 32-bit transfer, all four byte_lane signals will go low.
During a 16-bit transfer, two byte_lane signals will go low.
During an 8-bit transfer, only one byte_lane signal will go low.
Note:
If the PB field is set to 0, the byte_lane signals will function as write enable
signals and the we_n signal will always be high.
498
Hardware Reference NS9215
TI MI NG
Memory Timing
Static RAM write
cycle
clk_ ou t
d ata <31:0>
ad dr<27:0>
st_cs_ n<3:0>
we _n
M 15
M 17
M 19
M 1 6
M 1 8
M 2 0
M 21
M 21
M 2 2
M 2 2
M 23
M 2 4
byte _lan e<3:0>
Note-1
byte _lan e[3:0 ] a s WE *
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
WTWR = 0
WWEN = 0
During a 32-bit transfer, all four byte_lane signals will go low.
During a 16-bit transfer, two byte_lane signals will go low.
During an 8-bit transfer, only one byte_lane signal will go low.
Note:
If the PB field is set to 0, the byte_lane signals will function as write enable
signals and the we_n signal will always be high.
www.digiembedded.com
499
TI M I NG
Memory Timing
Static write cycle
with configurable
wait states
clk_ ou t
d ata < 31: 0>
ad dr< 17: 0>
st_cs_ n< 3: 0>
we _n
M 1 5
M 1 7
M 1 9
M 16
M 18
M 20
N ote -1
N ote -2
N ote -3
N ote -5
M 21
M 21
M 22
M 22
M 2 3
M 24
byte _lan e< 3: 0>
N ot e-4
byte _lan e[ 3:0 ] a s WE *
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
ꢀ
WTWR = from 0 to 15
WWEN = from 0 to 15
The WTWR field determines the length on the write cycle.
During a 32-bit transfer, all four byte_lane signals will go low.
During a 16-bit transfer, two byte_lane signals will go low.
During an 8-bit transfer, only one byte_lane signal will go low.
Notes:
1
Timing of the st_cs_n signal is determined with a combination of the WTWR and WWEN fields. The
st_cs_n signal will always go low at least one clock before we_n goes low, and will go high one clock
after we_n goes high.
2
3
Timing of the we_n signal is determined with a combination of the WTWR and WWEN fields.
Timing of the byte_lane signals is determined with a combination of the WTWR and WWEN fields. The
byte_lane signals will always go low one clock before we_n goes low, and will go one clock high after we_n goes
high.
4
5
If the PB field is set to 0, the byte_lane signals will function as the write enable signals and the we_n signal will
always be high.
If the PB field is set to 0, the timing for the byte_lane signals is set with the WTWR and WWEN fields.
500
Hardware Reference NS9215
TI MI NG
Memory Timing
Slow peripheral
acknowledge
timing
The table below describes the values shown in the slow peripheral acknowledge
timing diagrams.
Parm Description
clock high to data out valid
Min Max Unit Notes
M15
M16
M17
M18
M19
M20
M21
M22
M23
M24
M26
M27
M28
M29
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
0
+2
+2
+2
+2
+2
+2
+2
+2
+2
+2
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
data out hold time from clock high
clock high to address valid
address hold time from clock high
clock high to st_cs_n low
2
2
clock high to st_cs_n high
clock high to we_n low
clock high to we_n high
clock high to byte_lanes low
lock high to byte_lanes high
data input hold time to rising clk
clock high to oe_n low
-2
-2
2
+2
+2
clock high to oe_n high
address/chip select valid to ta_strb high
CPU
cycles
M30
M31
M32
ta_strb pulse width
4
4
0
8
CPU
cycles
ta_strb rising to chip select/address change
data setup to ta_strb rising
10
CPU
cycles
ns
www.digiembedded.com
501
TI M I NG
Memory Timing
Slow peripheral
acknowledge read
0ns
50ns
100ns
150ns
200ns
M26
clk_out
M32
data<31:0>
addr<27:0>
M17
M18
M20
M19
M27
M23
M31
st_cs_n<3:0>
oe_n
M28
M24
byte_lane<3:0>
ta_strb
M29
M30
Slow peripheral
acknowledge
write
0ns
50ns
100ns
150ns
200ns
clk_out
data<31:0>
addr<27:0>
M15
M17
M16
M18
M20
M19
M21
M23
M31
st_cs_n<3:0>
we_n
M22
M24
byte_lane<3:0>
3
M29
M30
6
ta_strb
502
Hardware Reference NS9215
TI MI NG
Memory Timing
Ethernet timing
All AC characteristics are measured with 10pF, unless otherwise noted.
The table below describes the values shown in the Ethernet timing diagrams.
Parm Description
Min Max Unit Notes
E1
E2
E3
E4
E5
E6
E7
MII tx_clk to txd, tx_en, tx_er
3
11
ns
ns
ns
ns
ns
ns
ns
2
MII rxd, rx_en, rx_er setup to rx_clk rising
MII rxd, rx_en, rx_er hold from rx_clk rising
mdio (input) setup to mdc rising
mdio (input) hold from mdc rising
mdc to mdio (output)
3
1
10
0
2
18
80
34
1, 2
3
mdc period
Notes:
1
Minimum specification is for fastest AHB bus clock of 88.5 MHz. Maximum specification is
for slowest AHB bus clock of 51.6 MHz.
load = 10pf for all outputs and bidirects.
C
2
3
Minimum specification is for fastest AHB clock at 88.5 MHz.
Ethernet MII
timing
t x_clk
E1
txd[ 3:0 ],tx_ en ,tx_ er
rx_clk
E 3
E2
rxd [3:0 ],rx_e n, rx_ er
E7
md c
E5
E 4
md io (inpu t)
E6
md io (ou tpu t)
www.digiembedded.com
503
TI M I NG
Memory Timing
2
I C timing
All AC characteristics are measured with 10pF, unless otherwise noted.
2
The table below describes the values shown in the I C timing diagram.
Standard Mode
Fast Mode
Parm Description
Min
4.0
4.7
4.7
0
Max
Min
0.6
1.3
1.3
0
Max
Unit
C1
C2
C3
C4
C5
C6
C7
iic_sda to iic_scl START hold time
µ
µ
µ
µ
µ
µ
µ
iic_scl low period
iic_scl high period
iic_scl to iic_sda DATA hold time
iic_sda to iic_scl DATA setup tim
iic_scl to iic_sda STA
250
4.7
4.0
100
0.6
0.6
iic_scl to iic_sda STOP setup time
C4
C6
C7
ii c_s da
C5
C1
C2
C3
iic_scl
504
Hardware Reference NS9215
TI MI NG
Memory Timing
SPI Timing
All AC characteristics are measured with 10pF, unless otherwise noted.
The next table describes the values shown in the LCD timing diagrams.
Parm Description
Min
Max
Unit Mod Not
es
es
SPI master parameters
SPO
SPI enable low setup to first SPI CLK out 3*T
rising
-10
-10
ns
ns
0,3
1,2
1,3
1,3
BCLK
SP1
SPI enable low setup to first SPI CLK out 3*T
falling
BCLK
SP3
SP4
SP5
SP6
SP7
SP8
SP9
SPI data in setup to SPI CLK out rising
SPI data in hold from SPI CLK out rising
SPI data in setup to SPI CLK out falling
SPI data in hold from SPI CLK out falling
SPI CLK out falling to SPI data out valid
SPI CLK out rising to SPI data out valid
30
0
ns
ns
ns
ns
ns
ns
ns
0,3
0,3
1,2
1,2
0,3
1,2
0,3
30
0
10
10
6
6
SPI enable low hold from last SPI CLK out 3*T
falling
-10 +2
1,3
BCLK
SP1O
SP11
SPI enable low hold from last SPI CLK out 3*T
rising
-10
ns
ns
1,2
1,3
4
BCLK
SPI CLK out high time
SP13*45%
SPI3*55%
SPI3*55%
0,1,2,
3
SP12
SP13
SPI CLK out low time
-SP13*45%
ns
ns
0,1,2,
3
4
3
SPI CLK out period
T
*6
0,1,2,
3
BCLK
SPI slave parameters
SP14
SPI enable low setup to first SPI CLK in
rising
30
30
ns
ns
0,3
1,2
1
1
SP15
SPI enable low setup to first SPI CLK in
falling
SP16
SP17
SP18
SP19
SP20
SP21
SPI data in setup to SPI CLK in rising
SPI data in hold from SPI CLK in rising
SPI data in setup to SPI CLK in falling
0
ns
ns
ns
ns
ns
ns
0,3
0,3
1,2
1,2
0,3
1,2
60
0
SPI data in hold from SPI CLK in falling 60
SPI CLK in falling to SPI data out valid
SPI CLK in rising to SPI data out valid
20
20
70
70
6
6
www.digiembedded.com
505
TI M I NG
Memory Timing
Parm Description
Min
Max
Unit Mod Not
es
es
SP22
SP23
SP24
SP25
SP26
SPI enable low hold from last SPI CLK in 15
falling
ns
ns
ns
ns
ns
0,3
1
SPI enable low hold from last SPI CLK in 15
rising
1,2
1
5
5
SPI CLK in high time
SPI CLK in low time
SPI CLK in period
SP26*40%
SP26*60%
SP26*60%
0,1,2,
3
SP26*40%
0,1,2,
3
T
*8
0,1,2,
3
BCLK
Notes:
1
Active level of SPI enable is inverted (that is, 1) if the CSPOL bit in Serial Channel Control Register B
is set to a 1. Note that in SPI slave mode, only a value of 0 (low enable) is valid; the SPI slave is fixed
to an active low chip select.
2
SPI data order is reversed (that is, LSB last and MSB first) if the BITORDR bit in Serial Channel
Control Register B is set to a 0.
3
4
5
6
7
T
is period of AHB clock.
BCLK
± 5% duty cycle skew.
± 10% duty cycle skew.
C
= 5pf for all outputs.
load
SPI data order can be reversed such that LSB is first. Use the BITORDR bit in Serial Channel
B/A/C/D Control Register A.
506
Hardware Reference NS9215
TI MI NG
Memory Timing
SPI master mode
0 and 1: 2-byte
transfer
SP0
SP1
SP3
SP13
SP12
S9
SPI CLKOut (Mode0)
SP5
S10
SPI CLKOut (Mode1)
SPI Enable
SP7
SP8
SPI Data Out
SPI Data In
MSB
LSB
MSB
MSB
LSB
LSB
SP4
SP6
LSB
MSB
Note: SPI data can be reversed such that LSB is first. Use the BITORDER bit in Serial Channel
B/A/C/D Control Register A.
SPI master mode2
and 3: 2-byte
transfer
SP0
SP1
SP3
S9
SPI CLK Out (Mode 2)
SP5
S10
SPI CLK Out (Mode 3)
SPI Enabl e
SP7
SP8
SPI DataOut
SPI DataIn
MS B
LSB MSB
LSB MSB
LSB
SP4
SP6
MSB
LSB
Note: SPI data can be reversed such that LSB is first. Use the BITORDER bit in Serial Channel
B/A/C/D Control Register A.
www.digiembedded.com
507
TI M I NG
Memory Timing
SPI slave mode 0
and 1: 2-byte
transfer
SP0
SP1
SP3
SP13
SP12
S9
SPI CLKOut (Mode0)
SP5
S10
SPI CLKOut (Mode1)
SPI Enable
SP7
SP8
SPIDataOut
SPIData In
MSB
MSB
LSB MSB
LSB
LSB
SP4
SP6
LSB MSB
Note: SPI data can be reversed such that LSB is first. Use the BITORDER bit in Serial Channel
B/A/C/D Control Register A.
SPI slave mode 2
and 3: 2-byte
transfer
SP0
SP1
SP3
S9
SPI CLK Out (Mode 2)
SP5
S10
SPI CLK Out (Mode 3)
SPI Enable
SP7
SP8
SPI DataOut
SPI DataIn
MSB
LSB MSB
LSB MSB
LSB
SP4
SP6
MSB
LSB
Note: SPI data can be reversed such that LSB is first. Use the BITORDER bit in Serial Channel
B/A/C/D Control Register A.
508
Hardware Reference NS9215
TI MI NG
Reset and hardware strapping timing
Reset and hardware strapping timing
All AC characteristics are measured with 10pF, unless otherwise noted.
The next table describes the values shown in the IEEE 1284 timing diagram.
Parm Description
Min Typ
Unit
Notes
R1
reset_n minimum time
10
x1_sys_osc
clock cycles
1
R2
reset_n to reset_done
NOR flash: 4.5
SPI flash: 15
ms
Note: The hardware strapping pins are latched 5 clock cycles after reset_n is deasserted (goes high).
x1_sys_osc
R1
reset_n
R2
reset_done
www.digiembedded.com
509
TI M I NG
JTAG timing
JTAG timing
All AC characteristics are measured with 10pF, unless otherwise noted.
The next table describes the values shown in the JTAG timing diagram.
Parm
J1
Description
Min
5
Max
Unit
ns
tms (input) setup to tck rising
tms (input) hold to tck rising
tdi (input) setup to tck rising
tdi (input) hold to tck rising
tdo (output) to tck falling
J2
2
ns
J3
5
ns
J4
2
ns
J5
2.5
10
ns
tck
rtck_out
J1
J3
J2
J4
tms
tdi
J5
J5
tdo
trst_n
Notes:
1
2
3
Maximum tck rate is 10 MHz.
rtck_out is an asynchronous output, driven off of the CPU clock.
trst_n is an asynchronous input.
510
Hardware Reference NS9215
TI MI NG
Clock timing
Clock timing
All AC characteristics are measured with 10pF, unless otherwise noted.
System PLL
reference clock
timing
Parm Description
Min
Max
Unit
ns
Notes
SC1
SC2
SC3
x1_sys_osc cycle time
25
50
x1_sys_osc high time
x1_sys_osc low time
(SC1/2) x 0.45
(SC1/2) x 0.45
(SC1/2) x 0.55
(SC1/2) x 0.55
ns
ns
The diagram below pertains to clock timing.
SC1
SC2
SC3
x1_sys_osc
www.digiembedded.com
511
TI M I NG
Clock timing
512
Hardware Reference NS9215
PA CKA GING
Processor Dimensions
www.digiembedded.com
515
PA CKA GING
Processor Dimensions
516
Hardware Reference NS9215
Change log
C
H
A
P
T
E
R
1
8
T
he following changes were made since the last revision of this document.
Revision B
Modified ADC data in the POR table.
Added RTC clock and battery back up connection information.
Updated POR and battery backup logic information for situations when the POR
feature is not used.
Added power dissipation data for 75MHz.
Deleted IDDS because it does not apply to this type of IC.
Revision C
Added Flexible Interface Module signals to include PIC signals within GPIO pin out
signals table.
517
|
Hotpoint Cooktop CH60GCIW User Manual
Gateway FPD1785 User Manual
Fujitsu Siemens Computers Fujitsu Siemens SCENICVIEW P20 2 User Manual
Frigidaire 318203624 User Manual
Electrolux 260724 User Manual
Dacor SGM466 User Manual
Cres Cor CO151H189B User Manual
Contec SPI 8451 LLVA User Manual
Cisco Systems SPA302D User Manual
Asus P5K VM User Manual