Figure 61 Motorola SPI, single & continuous transfers, SPO=0 and SPH=1 ............. 372
Figure 62 Motorola SPI, single transfer, with SPO=1 and SPH=0 ......................... 373
Figure 63. Motorola SPI, continuous transfers, SPO=1 and SPH=0....................... 374
Figure 64. Motorola SPI, single & continuous transfers, SPO=1 and SPH=1 ............ 375
Figure 65. National Semiconductor Microwire, single transfer .......................... 376
Figure 66. National Semiconductor Microwire, continuous transfers ................... 378
Figure 67. PrimeCell SSP master coupled to an SPI slave ................................. 378
Figure 68. SPI master coupled to a PrimeCell SSP slave .................................. 379
Figure 69. how to setting TI or Microwire mode flow chart .............................. 379
Figure 70. how to setting SPI mode flow chart ............................................. 380
W7500x Reference Manual Version1.1.0 22 / 399
4 Documentation conventions
ARP
Address Resolution Protocol
AHB
Advanced High-performance Bus
AMBA
Advanced Microcontroller Bus Architecture
APB
Advanced Peripheral Bus
AFC
Alternate Function Controller
ADC
Analog-to-Digital Converter
BOD
BrownOut Detection
CPU
Central Processing Unit
CRG
Clock Reset generator
DMA
Direct Memory Access
EOP
End Of Packet
EXTINT
External Interrupt
GPIO
General Purpose Input/Output
IrDA
Infrared Data Association
I/O
Input/Output
ICMP
Internet Control Message Protocol
IGMP
Internet Group Management Protocol
IPv4
Internet Protocol version 4
IRQ
interrupt request
NMI
NonMaskable Interrupt
PADCON
Pad Controller
PLL
Phase-Locked Loop
PHY
Physical Layer
PPPoE
Point-to-Point Protocol over Ethernet
POR
Power Of Reset
PWM
Pulse Width Modulator
RAM
Random Access Memory
RNG
Random number generator
SR
Status Register
SSP
Synchronous Serial Port
4.1 Glossary
W7500x Reference Manual Version1.1.0 23 / 399
SYSCFG
System configuration controller
TOE
TCPIPCore Offload Engine
TTL
Transistor-Transistor Logic
TCP
Transmission Control Protocol
UART
Universal Asynchronous Receiver/Transmitter
USB
Universal Serial Bus
UDP
User Datagram Protocol
WOL
Wake On Lan
WDT
Watchdog Timer
W7500x Reference Manual Version1.1.0 24 / 399
Key
Bit Accessibility
rw
Read/Write
r
Read Only
r0
Read as 0
r1
Read as 1
W
Write Only
4.2 Register Bit Conventions
Each register is shown with a key indicating the accessibility of the each individual bit, and the
initial condition:
W7500x Reference Manual Version1.1.0 25 / 399
5 System and memory overview
5.1 System architecture
Main system consists of :
Three masters :
- Cortex-M0 core
- TCP/IP Offload Engine
- uDMAC (PL230, 6channel)
Ten slaves :
- Internal BOOT ROM
- Internal SRAM
- Internal Flash memory
- Two AHB2APB bridge which connects all APB peripherals
- Four AHB dedicated to 16bit GPIOs
- TCPIP Hardware core
Ethernet :
- IP101G
System architecture and AHB-Lite bus architecture shown in Figure 1.
Figure 1. W7500x System Architecture
W7500x Reference Manual Version1.1.0 26 / 399
AHB-Lite BUS
- This bus connects the Three masters (Cortex-M0 and uDMAC and TCP/IP
Offload Engine) and ten AHB slaves.
Two APB BUSs
- These buses connect Seventeen APB peripherals (Watchdog, two Dual timers,
PWM, two UARTs, simple UART, two I2Cs, two SSPs, Random Number Generator,
Real Time Clock, 12bits Analog Digital Converter, Clock Controller, IO
Configuration, PAD MUX controller)
5.2 Memory organization
Introduction
Program memory, data memory, registers and I/O ports are organized within the same linear
4-Gbyte address space.
The bytes are coded in memory in Little Endian format. The lowest numbered byte in a word
is considered the word’s least significant byte and the highest numbered byte the most
significant.
W7500x Reference Manual Version1.1.0 27 / 399
Memory map
Figure 2 W7500x memory map
W7500x Reference Manual Version1.1.0 28 / 399
6System configuration controller (SYSCFG)
Priority
Type of
priority
Exception
type
Device
Description
Address
-3
fixed
Reset
CM0
Reset
0x0000_0004
-2
fixed
NMI
Watchdog
Watchdog interrupt
0x0000_0008
-1
Fixed
HardFault
CM0
All class of fault
0x0000_000C
3
Settable
SVCall
CM0
System service call via SWI instruction
0x0000_002C
5
settable
PendSV
CM0
Pendable request for system service
0x0000_0038
6
settable
SysTick
CM0
System tick timer
0x0000_003C
Main purposes of the system configuration controller are the following
Control of the memory remap feature
The ability to enable an automatic reset if the system locks up
Information about the cause of the last reset
7 Interrupt and events
7.1 Nested vectored interrupt controller (NVIC)
NVIC main features
32 maskable interrupt channels (not including the sixteen Cortex® -M0 interrupt lines)
4 programmable priority levels (2 bits of interrupt priority are used)
Low-latency exception and interrupt handling
Power management control
Implementation of System Control Registers
The NVIC and the processor core interface are closely coupled, which enables low latency
interrupt processing and efficient processing of late arriving interrupts. All interrupts including
the core exceptions are managed by the NVIC.
SysTick calibration value register
The SysTick calibration value is set to 6000, which gives a reference time base of 1 ms with
the SysTick clock set to 6 MHz (max f
HCLK
/8).
Interrupt and exception vectors
Table 1 describes the W7500x interrupt vector table.
Table 1 W7500x interrupt vector table
W7500x Reference Manual Version1.1.0 29 / 399
7
settable
IRQ[0]
SSP0
SSP0 global interrupt
0x0000_0040
8
Settable
IRQ[1]
SSP1
SSP1 global interrupt
0x0000_0044
9
Settable
IRQ[2]
UART0
UART0 global interrupt
0x0000_0048
10
Settable
IRQ[3]
UART1
UART1 global interrupt
0x0000_004C
11
Settable
IRQ[4]
UART2
UART2 global interrupt
0x0000_0050
12
Settable
IRQ[5]
reserved
0x0000_0054
13
Settable
IRQ[6]
reserved
0x0000_0058
14
Settable
IRQ[7]
GPIO0
GPIOA global interrupt
0x0000_005C
15
Settable
IRQ[8]
GPIO1
GPIOB global interrupt
0x0000_0060
16
Settable
IRQ[9]
GPIO2
GPIOC global interrupt
0x0000_0064
17
Settable
IRQ[10]
GPIO3
GPIOD global interrupt
0x0000_0068
18
Settable
IRQ[11]
DMA
DMA interrupt
0x0000_006C
19
Settable
IRQ[12]
Dualtimer0
Dualtimer0 global interrupt
0x0000_0070
20
Settable
IRQ[13]
Dualtimer1
Dualtimer1 global interrupt
0x0000_0074
21
Settable
IRQ[14]
PWM0
PWM0 global interrupt
0x0000_0078
22
Settable
IRQ[15]
PWM1
PWM1 global interrupt
0x0000_007C
23
Settable
IRQ[16]
PWM2
PWM2 global interrupt
0x0000_0080
24
Settable
IRQ[17]
PWM3
PWM3 global interrupt
0x0000_0084
25
Settable
IRQ[18]
PWM4
PWM4 global interrupt
0x0000_0088
26
Settable
IRQ[19]
PWM5
PWM5 global interrupt
0x0000_008C
27
Settable
IRQ[20]
PWM6
PWM6 global interrupt
0x0000_0090
28
Settable
IRQ[21]
PWM7
PWM7 global interrupt
0x0000_0094
29
Settable
IRQ[22]
RTC
RTC interrupt
0x0000_0098
30
Settable
IRQ[23]
ADC
ADC acquisition end interrupt
0x0000_009C
31
Settable
IRQ[24]
TCPIP
TCPIP global interrupt
0x0000_00A0
32
Settable
IRQ[25]
EXT_INT
External pin interrupt
0x0000_00A4
33
Settable
IRQ[26]
reserved
0x0000_00A8
34
Settable
IRQ[27]
reserved
0x0000_00AC
35
Settable
IRQ[28]
reserved
0x0000_00B0
36
Settable
IRQ[29]
reserved
0x0000_00B4
37
Settable
IRQ[30]
reserved
0x0000_00B8
38
Settable
IRQ[31]
reserved
0x0000_00BC
7.2 Event
W7500x is able to handle internal events in order to wake up the core(WFE). The wakeup event
can be generated by
W7500x Reference Manual Version1.1.0 30 / 399
When after DMA process finished (DMA_DONE)
8 Power supply
8.1 Introduction
W7500x embeds a voltage regulator in order to supply the internal 1.5V digital power domain.
Require a 2.7V ~ 5.5V operating supply voltage (VDD)
ADC ref voltage is same as VDD
8.2 Voltage regulator
The voltage regulator is always enabled after Reset and works in only one mode.
In Run mode, the regulator supplies full power to the 1.5V domain.
There is no power down or sleep mode
8.3 Low-power modes
W7500x is in RUN mode after a system or power reset. There are two low power modes to save
power when the CPU does not need to be kept running. These modes are useful for instances
like when the CPU is waiting for an external interrupt. Please note that there is no power-off
mode for W7500x.
The device features two low-power modes:
Sleep mode
Deep Sleep mode
Additionally, the power consumption can be reducing by following method:
User can slow down the system clocks
User can gate the clocks to the peripherals when they are unused.
W7500x Reference Manual Version1.1.0 31 / 399
Sleep mode
Mode
Entry
Wakeup
Effect on clocks
Sleep mode
DEEPSLEEP = 0
Enable WFI
Any interrupt
CPU clock OFF
APB Bus Clock ON
AHB Bus clock ON
Memory clocks ON
DEEPSLEEP = 0
Enable WFE
Wakeup event
Deep Sleep mode
DEEPSLEEP = 1
Enable WFI
Any interrupt
CPU clock OFF
APB Bus Clock OFF
AHB Bus clock OFF
Memory clocks OFF
DEEPSLEEP = 1
Enable WFE
Wakeup event
W7500x has two kinds of sleep modes. One is Sleep mode and the other is Deep sleep mode.
Two of them are almost the same except the clock gated peripherals kinds. Table 2 shows the
Sleep mode summary.
Table 2 W7500x sleep mode summary
Peripheral clock gating
In Run mode, individual clocks can be stopped at any time to reduce power.
Peripheral clock gating is controlled by the CRG block.
Below is the list of clocks which can be gating in CRG block.
System tick timer(SysTick) is part of the ARM Cortex-M0 core
9.2 Features
Simple 24bit timer. Clocked internally by the system clock.
9.3 Functional description
The SysTick timer is an integral part of Cortex-M0. The SysTick timer is intended to generated
a fixed 10 millisecond interrupt for use by an operating system or other system management
software.
Since the SysTick timer is a part of the Cortex-M0, it facilitates porting of software by
providing a standard timer that is available on Cortex-M0 based devices. The SysTick
timer can be used for :
An RTOS tick timer which fires at a programmable rate (for example 100 Hz) and
invokes a SysTick routine.
A high-speed alarm timer using the core clock.
A simple counter. Software can use this to measure time to completion and time used.
An internal clock source control based on missing/meeting durations. The
COUNTFLAG bit-field in the control and status register can be used to determine if
an action completed within a set duration, as part of a dynamic clock management
control loop.
W7500x Reference Manual Version1.1.0 33 / 399
9.4 Registers (Base : 0xE000_E000)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
CNTFLAG
R
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
res
res
res
res
res
res
res
res
res
res
res
res
TICKINT
ENABLE
R/W
R/W
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
RELOAD[23:16]
R
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
RELOAD[15:0]
R
System Timer control and status register (SYST_CSR)
Address Offset : 0x010
Reset value : 0x0000_0000
[0] ENABLE – Enables the counter
0 : Counter disabled
1 : Counter enabled
[1] TICKINT – Enables SysTick exception request
O : Counting down to zero does not assert the SysTick exception request
1 : Counting down to zero to asserts the SysTick exception request
[16] COUNTFLAG – Returns 1 if timer counted to 0 since the last read of this register.
SysTick Reload Value Register (SYST_RVR)
Address Offset : 0x014
Reset value : 0x0000_0000
[23:0] RELOAD – Value to load into the SYST_CVR when the counter is enabled and
when it reaches 0
- The RELOAD value can be any value in the range 0x0000_0001 –
0x00FFFFFF. You can program a value of 0, but this has no effect because
the SysTick exception request and COUNTFLAG are activated when count
from 1 to 0.
W7500x Reference Manual Version1.1.0 34 / 399
- To generate a multi-short timer with a period of N processor clock cycles,
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
CURRENT[23:16]
R/W
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
CURRENT [15:0]
R/W
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
NORF
SKEW
res
res
res
res
res
res
TENMS[23:16]
R R
R
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
TENMS [15:0]
R
use a RELOAD value of N-1. For example, if the SysTick interrupt is
required every 100 clock pulses, set RELOAD to 99.
SysTick Current Value Register (SYST_CVR)
Address Offset : 0x018
Reset value : 0x0000_0000
[23:0] CURRENT – Reads return the current value of the SysTick counter.
A write of any value clears the field to 0, and also clears the SYST_CSR.COUNTFLAG
bit to 0.
SysTick Calibration Value Register (SYST_CALIB)
Address Offset : 0x01C
Reset value : 0x0000_0000
[23:0] TENMS - Reads as zero. Indicates calibration value is not known.
[30] SKEW - Reads as one. Calibration value for the 10ms inexact timing is not known
because TENMS is not known. This can affect the suitability of SysTick as a software
real time clock.
[31] NOREF - Reads as one. Indicates that no separate reference clock is provided.
W7500x Reference Manual Version1.1.0 35 / 399
10 Booting Sequence
Mode
selection
Mode
Aliasing
TEST
BOOT 0 0
APP
User code execute in Main Flash memory.
0 1 ISP
In this mode,W7500x can support ISP function in order to control
flash using serial interface.
H/W reset
Boot
ModeRun ISP
ISP
Run Application
APP
W7500x has three different boot modes that can be selected through the BOOT pin and TEST
pin as shown in Table 3.
Table 3 operation of mode selection
When W7500x is reset by hardware, it will be operated as below in embedded boot code.
Figure 3. operation of boot code
W7500x Reference Manual Version1.1.0 36 / 399
11 Embedded Flash memory
Flash area
Flash memory address
Size
(bytes)
Name
Description
Main Flash
memory
0x0000 0000 ~ 0x0000 00FF
256
Sector 0
Block 0
0x0000 0100 ~ 0x0000 01FF
256
Sector 1
0x0000 0200 ~ 0x0000 02FF
256
Sector 2
0x0000 0300 ~ 0x0000 03FF
256
Sector 3
. . .
. . . . . . . . .
0x0000 7000 ~ 0x0000 70FF
256
Sector112
Block 7
0x0000 7100 ~ 0x0000 71FF
256
Sector113
0x0000 7200 ~ 0x0000 72FF
256
Sector114
0x0000 7300 ~ 0x0000 73FF
256
Sector115
. . .
. . . . . . . . .
0x0001 FC00 ~ 0x0001 FCFF
256
Sector509
Block 32
11.1 Flash main features
Up to 128Kbytes of Flash memory
Memory organization:
Main Flash memory block:
Up to 128Kbytes
Information block:
Up to 512bytes
Information block is read only
Data block:
Up to 512bytes
Flash memory interface features:
Read interface with prefetch buffer( 1 x 32-bit words )
Flash Program / Erase operation
11.2 Flash memory organization
The Flash memory is organized of 32-bit wide memory cells that can be used for storing both
code and data constants.
The memory organization is based on a main Flash memory block containing 512 sectors of
256byte or 32 blocks of 4Kbyte.
Table 4 description of Flash memory
W7500x Reference Manual Version1.1.0 37 / 399
0x0001 FD00 ~ 0x0001 FDFF
256
Sector510
0x0001 FE00 ~ 0x0001 FEFF
256
Sector511
0x0001 FF00 ~ 0x0001 FFFF
256
Sector512
Information
block
0x0003 FC00 ~ 0x0003 FCFF
256
Lock info
0x0003 FD00 ~ 0x0003 FDFF
Reserved
Data block
0x0003 FE00 ~ 0x0003 FEFF
256 Data0
0x0003 FF00 ~ 0x0003 FFFF
256 Data1
The W7500 embedded Flash memory can be programmed using in-application programming.
IAP allows the user to re-program the Flash memory while the application is running. The
program and erase operations can be performed over the whole product voltage range.
The TCP/IP Core Offload Engine (TOE) is a Hardwired TCP/IP embedded Ethernet controller
that provides easier Internet connection to embedded systems. TOE enables users to have
Internet connectivity in their applications by using the TCP/IP stack.
WIZnet’s Hardwired TCP/IP is the market-proven technology that supports TCP, UDP, IPv4, ICMP,
ARP, IGMP, and PPPoE protocols. TOE embeds the 32Kbyte internal memory buffer for the
Ethernet packet processing. Using TOE allows users to implement the Ethernet application by
adding the simple socket program. It’s faster and easier than using any other Embedded
Ethernet solutions. 8 independent hardware sockets can be used simultaneously.
TOE also provides WOL (Wake on LAN) to reduce power consumption of the system.
13.2 Features
Supports Hardwired TCP/IP Protocols : TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE
Supports 8 independent sockets simultaneously
Supports Power down mode
Supports Wake on LAN over UDP
Internal 32Kbytes Memory for TX/RX Buffers
Not supports IP Fragmentation
W7500x Reference Manual Version1.1.0 67 / 399
13.3Functional description
RXC
TXC
RXC_N
TXC_N
COL
DUP
CRS
RXDV
RXD[3:0]
TXE
TXD[3:0]
MDC
MDO
MDI
Common
Register
Socket
Register
Register Controller
Memory Controller
TX
Memory
RX
Memory
TCPIPCore
MDC
Controller
INT
MII
Controller
AHB
Figure 6 shows the TOE block diagram.
Figure 6 TOE block diagram
13.4 TOE Memory map
TOE has one Common Register Block, eight Socket Register Blocks, and TX/RX Buffer Blocks
allocated to each Socket. Figure 7 shows the selected block by the base address and the
available offset address range of Socket TX/RX Buffer Blocks. Each Socket’s TX Buffer Block
physically exists in one 16KB TX memory and is initially allocated with 2KB. Also, Each Socket’s
RX Buffer Block physically exists in one 16KB RX Memory and is initially allocated with 2KB.
Regardless of the allocated size of each Socket TX/RX Buffer, it can be accessible within the
16 bits offset address range (From 0x0000 to 0xFFFF).
W7500x Reference Manual Version1.1.0 68 / 399
Base address
Blocks
Physical
16KB RX Memory
Valid Range:
16bits Offset Address[15:0]
...
0x461F_0000
0x461E_0000
0x461D_0000
0x461C_0000
0x461B_0000
0x461A_0000
0x4619_0000
0x4618_0000
0x4617_0000
0x4616_0000
0x4615_0000
0x4613_0000
0x4612_0000
0x4611_0000
0x4610_0000
0x460F_0000
0x460E_0000
0x460D_0000
0x460C_0000
0x460B_0000
0x460A_0000
0x4609_0000
0x4608_0000
0x4607_0000
0x4606_0000)
0x4605_0000
0x4603_0000
0x4602_0000
0x4601_0000
0x4604_0000
0x4614_0000
0x4600_0000
Reserved
Reserved
Socket 1 TX Buffer
......
Socket 7 RX Buffer
......
...
...
0x0000
0x1000
0x0800
0x1800
0x2000
0x2800
0x3000
0x3800
0x3FFF
Socket 0
TX Bufer (2KB)
Socket 1
TX Buffer (2KB)
Socket 2
TX Buffer (2KB)
Socket 3
TX Buffer (2KB)
Socket 4
TX Buffer (2KB)
Socket 5
TX Buffer (2KB)
Socket 6
TX Buffer (2KB)
Socket 7
TX Buffer (2KB)
0x093C
0x0FFF
...
0x0000
0x1000
0x0800
0x1800
0x2000
0x2800
0x3000
0x3800
0x3FFF
Socket 0
RX Buffer (2KB)
Socket 1
RX Buffer (2KB)
Socket 2
RX Buffer (2KB)
Socket 3
RX Buffer (2KB)
Socket 4
RX Buffer (2KB)
Socket 5
RX Buffer (2KB)
Socket 6
RX Buffer (2KB)
Socket 7
RX Buffer (2KB)
0x3E2C
0x0FFF
Physical
16KB TX Memory
Socket 7 RX Buffer
Socket 7 TX Buffer
Socket 7 Register
Reserved
Socket 6 RX Buffer
Socket 6 TX Buffer
Socket 6 Register
Reserved
Socket 5 RX Buffer
Socket 5 TX Buffer
Socket 5 Register
Reserved
Socket 4 RX Buffer
Socket 4 TX Buffer
Socket 4 Register
Reserved
Socket 3 RX Buffer
Socket 3 TX Buffer
Socket 3 Register
Reserved
Socket 2 RX Buffer
Socket 2 TX Buffer
Socket 2 Register
Reserved
Socket 1 RX Buffer
Socket 1 TX Buffer
Socket 1 Register
Reserved
Socket 0 RX Buffer
Socket 0 TX Buffer
Socket 0 Register
Common Register
0x0000
0x6054
0x6055
0xFFFF
0x0000
0x022C
0x022D
0xFFFF
0x0000
0x07FF
0x0800
0xFFFF
0x0FFF
0x1000
0xEFFF
0xF000
0xF7FF
0xF800
0x0000
0x07FF
0x0800
0xFFFF
0x0FFF
0x1000
0xEFFF
0xF000
0xF7FF
0xF800
0x413C
0x9E2C
Socket 0 Register
Common Register
W7500x Reference Manual Version1.1.0 69 / 399
Figure 7. Register & Memory Organization
Common register map
Address
Register
0x0000
TOE Version (VERSIONR)
0x2000
TICKCLOK (TCLKR)
0x2100
Interrupt (IR)
0x2104
Interrupt Mask (IMR)
0x2108
Interrupt Clear (IRCR)
0x2110
Socket Interrupt (SIR)
0x2114
Socket Mask (SIMR)
0x2300
Mode (MR)
0x2400
PPP Timer (PTIMER)
0x2404
PPP Magic (PMAGIC)
0x2408
PPP Destination MAC Address (PHAR1)
0x240C
PPP Destination MAC address (PHAR0)
0x2410
PPP Session Identification (PSIDR)
0x2414
PPP Maximum Segment Size (PMSS)
0x6000
Source Hardware Address (SHAR1)
0x6004
Source Hardware Address (SHAR0)
0x6008
Gateway Address (GA)
0x600C
Subnet Mask (SUB)
0x6010
Source IP Address (SIP)
0x6020
Network Configuration Lock (NCONFL)
0x6040
Retry Time (RTR)
0x6044
Retry Counter (RCR)
0x6050
Unreachable IP Address (UIP)
0x6054
Unreachable Port Address (UPORT)
Common Register Block configures the general information of TOE such as IP and MAC address.
<Table 6> defines the offset address of registers in this block.
Table 6. Offset Address for Common Register
Socket register map
TOE supports 8 Sockets for communication channel. Each Socket is controlled by Socket n
Register (n = 0,…,7 ,where n is socket number). <Table 2> defines the 16bits Offset Address
of registers in Socket n Register Block.
W7500x Reference Manual Version1.1.0 70 / 399
Table 7. Offset Address in Socket n Register Block (n = 0,…,7, where n is Socket number)
Offset
Register
0x0000
Socket Mode (Sn_MR)
0x0010
Socket Command (Sn_CR)
0x0020
Socket Interrupt (Sn_IR)
0x0024
Socket Interrupt Mask (Sn_IMR)
0x0028
Socket Interrupt Clear (Sn_ICR)
0x0030
Socket Status (Sn_SR)
0x0100
Socket Protocol Number (Sn_PNR)
0x0104
Socket IP Type of Service (Sn_TOS)
0x0108
Socket TTL (Sn_TTLR)
0x010C
Socket Fragment Offset (Sn_FRAG)
0x0110
Socket Maximum Segment (Sn_MSSR)
0x0114
Socket Port Number (Sn_PORTR)
0x0118
Socket Destination Hardware address0 (Sn_DHAR0)
0x011C
Socket Destination Hardware address1 (Sn_DHAR1)
0x0120
Socket Destination Port Number (Sn_DPORTR)
0x0124
Socket Destination IP Address (Sn_DIPR)
0x0180
Socket Keep Alive Timer (Sn_KATMR)
0x0184
Socket Retry Time (Sn_RTR)
0x0188
Socket Retry Counter (Sn_RCR)
0x0200
Socket TX Memory Size (Sn_TXBUF_SIZE)
0x0204
Socket TX Free Size (Sn_TX_FSR)
0x0208
Socket TX Read Pointer (Sn_TX_RD)
0x020C
Socket TX Write Pointer (Sn_TX_WR)
0x0220
Socket RX Memory Size (Sn_RXBUF_SIZE)
0x0224
Socket RX Received Size (Sn_RX_RSR)
0x0228
Socket RX Read Pointer (Sn_RX_RD)
0x022C
Socket RX Write Pointer (Sn_RX_WR)
Memory
TOE has one 16KB TX memory for Socket n TX Buffer Blocks and one 16KB RX memory for
Socket n RX buffer Blocks.
16KB TX memory is initially allocated in 2KB size for each Socket TX Buffer Block (2KB X 8 =
16KB). The initial allocated 2KB size of Socket n TX Buffer can be re-allocated by using ‘Socket
n TX Buffer Size Register (Sn_TXBUF_SIZE)’.
W7500x Reference Manual Version1.1.0 71 / 399
Once all Sn_TXBUF_SIZE registers have been configured, Socket TX Buffer is allocated with the
configured size of 16KB TX Memory and is assigned sequentially from Socket 0 to Socket 7. Its
physical memory address is automatically determined in 16KB TX memory. Therefore, the total
sum of Sn_TXBUF_SIZE should not exceed 16 in case of error in data transmission.
The 16KB RX memory allocation method is the same as the 16KB TX memory allocation method.
16KB RX memory is initially allocated into 2KB size for each Socket RX Buffer Block (2KB X 8 =
16KB). The initial allocated 2KB size of Socket n RX Buffer can be re-allocated by using ‘Socket
n RX Buffer Size Register (Sn_RXBUF_SIZE)’.
When all Sn_RXBUF_SIZE registers have been configured, the Socket RX Buffer is allocated
with the configured size in 16KB RX Memory and is assigned sequentially from Socket 0 to
Socket 7. The physical memory address of the Socket RX Buffer is automatically determined
in 16KB RX memory. Therefore, the total sum of Sn_RXBUF_SIZE should not exceed 16 or data
reception error will occur.
For 16KB TX/RX memory allocation, refer to Sn_TXBUF_SIZE & Sn_RXBUF_SIZE in ‘Chapter 0’.
The Socket n TX Buffer Block allocated in 16KB TX memory is buffer for saving data to be
transmitted by host. The 16bits Offset Address of Socket n TX Buffer Block has 64KB address
space ranged from 0x0000 to 0xFFFF, and is configured with reference to ‘Socket n TX Write
Pointer Register (Sn_TX_WR)’ & ‘Socket n TX Read Pointer Register(Sn_RX_RD)’. However, the
16bits Offset Address automatically converts into the physical address to be accessible in 16KB
TX memory such as Figure 7.
The Socket n RX Buffer Block allocated in 16KB RX memory is buffer for saving the received
data through the Ethernet. The 16bits Offset Address of Socket n RX Buffer Block has 64KB
address space ranged from 0x0000 to 0xFFFF, and is configured with reference to ‘Socket n RX
RD Pointer Register (Sn_RX_RD)’ & ‘Socket n RX Write Pointer Register (Sn_RX_WR)’. However,
the 16bits Offset Address automatically converts into the physical address to be accessible in
16KB RX memory such as Figure 7.
W7500x Reference Manual Version1.1.0 72 / 399
13.5 Common register (Base : 0x4600_0000)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
Res
res
res
res
res
res
VERSION[7:0]
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
TCKCNT[15:0]
R/W
VERSIONR (TOE Version Register)
Address Offset : 0x0000
Reset value : 0x0000_0005
[7:0] VERSION - indicates the TOE version as 0x05.
TCKCNTR (Ticker Counter Register)
Address Offset : 0x2000
Reset value : 0x0000_07D0
[15:0] TCKCNT – Ticker counter register is used Tick counter of 100usec. for internal timer of
TOE. The unit of tick is HCLK. RTR, Sn_RTR, Sn_KATMR operates on the value of this register.
Ex) When the reference time of TOE is set to 100us, and when = 20MHz,
TCKCNT = 2000 = 0x07D0
W7500x Reference Manual Version1.1.0 73 / 399
IR (Interrupt Register)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
Res
res
res
res
res
res
res
res
res
res
es
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
res
res
res
res
res
res
IR[7:4]
res
res
res
res R R R R
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
res
res
res
res
res
res
IMR[7:4]
res
res
res
res
R/W
Address Offset : 0x2100
Reset value : 0x0000_0000
IR indicates the interrupt status. If IR is not equal to ‘0x00’, INTn PIN is asserted low until it
is ‘0x00’.
[4] WOL – Magic Packet
When WOL mode is enabled and receives the magic packet over UDP, this bit is set.
[5] PPPoE – PPPoE Close
When PPPoE is disconnected during PPPoE mode, this bit is set.
[6] UNREACH – Destination unreachable
When receiving the ICMP (Destination port unreachable) packet, this bit is set as ‘1’.
When this bit is ‘1’, Destination Information such as IP address and Port number may
be checked with the corresponding UIPR & UPORTR.
[7] Conflict – IP Conflict
Bit is set as ‘1’ when own source IP address is same with the sender IP address in the
received ARP request.
IMR (Interrupt Mask Register)
Address Offset : 0x2104
Reset value : 0x0000_0000
W7500x Reference Manual Version1.1.0 74 / 399
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
res
res
res
res
res
res
IRC[8:4]
res
res
res
res
*R/C_W1
IMR is used to mask interrupts. Each bit of IMR corresponds to each bit of IR. When a bit of
IMR is ‘1’ and the corresponding bit of IR is ‘1’, an interrupt will be issued. In other words, if
a bit of IMR is ‘0’, an interrupt will not be issued even if the corresponding bit of IR is ‘1’.
[4] Magic Packet
0: Disable Magic Packet Interrupt
1: Enable Magic Packet Interrupt
[5] PPPoE Close Interrupt Mask
0: Disable PPPoE Close Interrupt
1: Enable PPPoE Close Interrupt
[6] Destination unreachable Interrupt Mask
0: Disable Destination unreachable Interrupt
1: Enable Destination unreachable Interrupt
[7] IP Conflict Interrupt Mask
0: Disable IP Conflict Interrupt
1: Enable IP Conflict Interrupt
IRCR (Interrupt Clear Register)
Address Offset : 0x2108
Reset value : 0x0000_0000
IRCR is used to clear interrupts. Each bit of IR can be cleared when the host writes ‘1’ value
to each bit of IRCR corresponding to each bit of IR.
* ReadClearWrite1 (R/C_W1) : Software can read as well as clear this bit by writing
‘1’. Writing ‘0’ has no effect on the bit value.
[4] Magic Packet Interrupt Clear
[5] PPPoE Close Interrupt Clear
[6] Destination unreachable Interrupt Clear
[7] IP Conflict Interrupt Clear
W7500x Reference Manual Version1.1.0 75 / 399
SIR (Socket Interrupt Register)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
res
res
res
res
res
res
S7
S6
S5
S4
S3
S2
S1
S0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
res
res
res
res
res
res
S7
S6
S5
S4
S3
S2
S1
S0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Address Offset : 0x2110
Reset value : 0x0000_0000
SIR indicates the interrupt status of Socket. Each bit of SIR be still ‘1’ until Sn_IR is cleared by
the host. If Sn_IR is not equal to ‘0x00’, the n-th bit of SIR is ‘1’ and INTn PIN is asserted until
SIR is ‘0x00’
[7:0] SIR - When the interrupt of Socket n occurs, the n-th bit of SIR becomes ‘1’.
SIMR (Socket Interrupt Mask Register)
Address Offset : 0x2114
Reset value : 0x0000_0000
Each bit of SIMR corresponds to each bit of SIR. When a bit of SIMR is ‘1’ and the corresponding
bit of SIR is ‘1’, Interrupt will be issued. In other words, if a bit of SIMR is ‘0’, an interrupt will
be not issued even if the corresponding bit of SIR is ‘1’.
[7:0] SIR - Socket n Interrupt Mast
0: Disable Socket n Interrupt
1: Enable Socket n Interrupt
W7500x Reference Manual Version1.1.0 76 / 399
MR (Mode Register)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
res
res
res
res
NTR
res
RST
res
WOL
PB
res
NSC
FA
res
R/W
R/W
R/W
R/W
R/W
R/W
Address Offset : 0x2300
Reset value : 0x0000_0000
MR is used for S/W reset, ping block mode and PPPoE mode
[2] NSC – MACRAW No Size Check
If this bit is ‘1’, it does not check packet size In MACRAW mode.
0 : Enable Check Packet Size
1 : Disable Check Packet Size
[4] PB – Ping Block
If the bit is ‘1’, it blocks the response to a ping request.
0: Disable Ping block
1: Enable Ping block
[5] WOL – Wake on Lan
If WOL mode is enabled and the received magic packet over UDP has been normally
processed, the Interrupt PIN (INTn) asserts to low. When using WOL mode, the UDP
Socket should be opened with any source port number. (Refer to Socket n Mode
Register (Sn_MR) for opening Socket.)
Notice: The magic packet over UDP supported by TOE consists of 6 bytes
synchronization stream (‘0xFFFFFFFFFFFF’) and 16 times Target MAC address stream
in UDP payload. The options such like password are ignored. You can use any UDP
source port number for WOL mode.
0: Disable WOL mode
1: Enable WOL mode
[7] RST – Software Reset
If this bit is ‘1’, All internal registers will be initialized. It will be automatically cleared
as ‘0’ after S/W reset.
[10] NTR – No Send TCP Reset Packet
If this bit is ‘1’, in TCP mode, Socket does not send Reset Packet.
0 : Send Reset Pakcet
1 : No Send Reset Packet
W7500x Reference Manual Version1.1.0 77 / 399
PTIMER (PPP Link Control Protocol Request Timer Register)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
res
Res
res
res
res
res
PTIME[7:0]
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
Res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
res
Res
res
res
res
res
PMAGIC[7:0]
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
0x001D
0x01
Address Offset : 0x2400
Reset value : 0x0000_0028
[7:0] PTIME configures the time for sending LCP echo request. The unit of time is 25ms
Ex) in case that PTIMER is 200,
200 * 25(ms) = 5000(ms) = 5 seconds
PMAGICR (PPP Link Control Protocol Magic number Register)
Address Offset : 0x2404
Reset value : 0x0000_0000
PMAGICR configures the 4bytes magic number to be used in LCP echo request.
[7:0] PMAGIC
Ex) PMAGIC = 0x01
LCP Magic number = 0x01010101
PHAR (Destination Hardware Address Register in PPPoE)
Address Offset : 0x2408
Reset value : 0x0000_0000
W7500x Reference Manual Version1.1.0 78 / 399
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
PHAR[31:24]
PHAR1[23:16]
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
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
PHAR[15:8]
PHAR[7:0]
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
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
PHAR[31:24]
PHAR[23:16]
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
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
PHAR0[32:24]
PHAR0[23:16]
PHAR0[15:8]
PHAR0[32:24]
PHAR1[32:24]
PHAR1[23:16]
0x00
0x08
0xDC
0x12
0x34
0x56
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
Res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
PSID[15:0]
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
Address Offset : 0x240C
Reset value : 0x0000_0000
PHAR should be written to the PPPoE server hardware address acquired in PPPoE connection
process.
PHAR0 and PHAR1 – configures Destination hardware address
Ex) In case that destination hardware address is 00:08:DC:12:34:56
PSIDR (Session ID Register in PPPoE)
Address Offset : 0x2410
Reset value : 0x0000_0000
W7500x Reference Manual Version1.1.0 79 / 399
[15:0] PSID - should be written to the PPPoE sever session ID acquired in PPPoE connection
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
Res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
PMSS[15:0]
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
PMSS[15:8]
PMSS[7:0]
0x12
0x34
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
SHAR0[31:24]
SHAR0[23:16]
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
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
SHAR0[15:8]
SPHAR0[7:0]
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
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
SHA1[31:24]
SHAR1[23:16]
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
process.
PMRUR (Maximum Receive Unit Register in PPPoE)
Address Offset : 0x2414
Reset value : 0x0000_FFFF
[15:0] PMRUR configures the maximum receive unit of PPPoE.
Ex) in case that maximum receive unit in PPPoE is 0x1234
SHAR (Source Hardware Address Register)
Address Offset : 0x6000
Reset value : 0x0000_0000
Address Offset : 0x6004
Reset value : 0x0000_0000
W7500x Reference Manual Version1.1.0 80 / 399
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
res
SHAR0[32:24]
SHAR0[23:16]
SHAR0 [15:8]
SHAR0 [32:24]
SHAR1 [32:24]
SHAR2 [23:16]
0x00
0x08
0xDC
0x12
0x34
0x56
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
GA[31:24]
GA[23:16]
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
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
GA[15:8]
GA[7:0]
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
GA[31:24]
GA[23:16]
GA[15:8]
GA[7:0]
192 (0xC0)
168 (0xA8)
0 (0x00)
1 (0x01)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
SUB[31:24]
SUB[23:16]
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
SHAR configures the source hardware address.
Ex)In case of “00.08.DC.12.34.56”
GAR (Gateway Address)
Address Offset : 0x6008
Reset value : 0x0000_0000
GAR[31:0] – configures the default gateway address
Ex)In case of “192.168.0.1”
SUBR ( Subnet Mask Register)
Address Offset : 0x600C
Reset value : 0x0000_0000
W7500x Reference Manual Version1.1.0 81 / 399
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
SUBR[15:8]
SUBR[7:0]
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
SUB[31:24]
SUB[23:16]
SUB[15:8]
SUB[7:0]
255 (0xFF)
255 (0xFF)
255 (0xFF)
0 (0x00)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
SIPR[31:24]
SIPR[23:16]
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
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
SIPR[15:8]
SIPR[7:0]
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
SIPR[31:24]
SIPR[23:16]
SIPR[15:8]
SPIR[7:0]
192 (0xC0)
168 (0xA8)
0 (0x00)
2 (0x02)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
NCONFL[31:24]
NCONFL [23:16]
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
SUBR configures the subnet mask address.
Ex)In case of “255.255.255.0”
SIPR (Source IP address Register)
Address Offset : 0x6010
Reset value : 0x0000_0000
SIPR configures the source IP address.
Ex)In case of “192.168.0.2”
NCONFLR ( Network Configuration Lock Register)
Address Offset : 0x6020
Reset value : 0x0000_0000
W7500x Reference Manual Version1.1.0 82 / 399
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
NCONFL [15:8]
NCONFL [7:0]
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
NCONFL[31:24]
NCONFL [23:16]
NCONFL [15:8]
NCONFL [7:0]
1 (0x01)
172 (0xAC)
206 (0xCE)
85 (0x55)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
RTR[15:0]
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
NCONFLR is used to unlock and lock the network configuration registers which are SIR, SUBR,
GAR and SHAR. When LOCK is ‘ON’, the protected registers are not able to access. In this case
a value of 0x01ACCE55 is written to NCONFLR. When LOCK is ‘OFF’, the protected registers
are allowed to access. In this case any value except 0x01ACCE55 is written.
Ex) In case of ‘LOOK is ON’
RTR (Retry Time Register)
Address Offset : 0x6040
Reset value : 0x0000_07D0
RTR configures the retransmission timeout period. The unit of timeout period is 100us(Refer
to TCKCNTR) and the default of RTR is ‘0x07D0’ or ‘2000’. And so the default timeout period
is 200ms(100us X 2000).
During the time configured by RTR, WZTOE waits for the peer response to the packet that is
transmitted by Sn_CR(CONNECT, DISCON, CLOSE, SEND, SEND_MAC, SEND_KEEP command). If
the peer does not respond within the RTR time, WZTOE retransmits the packet or issues
timeout.
When RTR is not ‘0x0000_0000, RTR is used to configure the timeout period of all socket. When
RTR is ‘0x0000_0000’, the timeout period of each socket could set by using Socket n Retry
Time Register (Sn_RTR).
Ex) When timeout-period is set as 400ms, RTR = (400ms / 1ms) X 10 = 4000(0x0FA0)
W7500x Reference Manual Version1.1.0 83 / 399
RTR[15:8]
0x0F
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
RC[7:0]
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
RC[7:0]
0x07
RCR (Retry Counter Register)
Address Offset : 0x6044
Reset value : 0x0000_0008
RCR configures the number of time of retransmission. When retransmission occurs as many as
‘RCR+1’, Timeout interrupt is issued (Sn_IR[TIMEOUT] = ‘1’).
When RCR is not ‘0x0000_0000, RCR is used to configure the timeout period of all socket.
When RCR is ‘0x0000_0000’, the timeout period of each socket could set by using Socket n
Retry Counter Register (Sn_RCR).
Ex) RCR = 0x0007
The timeout of WZTOE can be configurable with RTR and RCR. WZTOE has two kind timeout
such as Address Resolution Protocol (ARP) and TCP retransmission.
At the ARP (Refer to RFC 826, http://www.ietf.org/rfc.html) retransmission timeout, WZTOE
automatically sends ARP-request to the peer’s IP address in order to acquire MAC address
information (used for communication of IP, UDP, or TCP). While waiting for ARP-response from
the peer, if there is no response during the configured RTR time, a temporary timeout is
occurred and ARP-request is retransmitted. It is repeated as many as ‘RCR + 1’ times. Even
after the ARP-request retransmissions are repeated as ‘RCR+1’ and there is no response to the
ARP-request, the final timeout is occurred and Sn_IR(TIMEOUT) becomes ‘1’. The time of final
timeout (ARPTO) of ARP-request is as below.
W7500x Reference Manual Version1.1.0 84 / 399
N : Retransmission count, 0≤N ≤ M
M : Minimum value when RTR x 2
(M+1)
> 65535 and 0 ≤ M ≤ RCR
RTRMAX : RTR x 2
M
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
UIP[31:24]
UIPR[23:16]
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
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
UIPR[15:8]
UIPR[7:0]
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
At the TCP packet retransmission timeout, WZTOE transmits TCP packets (SYN, FIN, RST, DATA
packets) and waits for the acknowledgement (ACK) during the configured RTR time and RCR.
If there is no ACK from the peer, a temporary timeout occurs and the TCP packet is
retransmitted. The retransmission is repeated as many as ‘RCR+1’. Even after TCP
retransmission is repeated as ‘RCR+1’ and there is no response to the TCP retransmission, the
final timeout is occurred and Sn_IR(TIMEOUT) becomes ‘1’. The time of final timeout (TCPTO)
of TCP retransmission is as below.
Ex) When RTR = 2000(0x07D0), RCR = 8(0x0008),
ARPTO = 2000 X 0.1ms X 9 = 1800ms = 1.8s
TCP
= (0x07D0+0x0FA0+0x1F40+0x3E80+0x7D00+0xFA00+0xFA00+0xFA00+0xFA00) X 0.1ms
TO
= (2000 + 4000 + 8000 + 16000 + 32000 + ((8 - 4) X 64000)) X 0.1ms
= 318000 X 0.1ms = 31.8s
UIPR (Unreachable IP address Register)
Address Offset : 0x6050
Reset value : 0x0000_0000
W7500x Reference Manual Version1.1.0 85 / 399
TOE receives an ICMP packet(Destination port unreachable) when data is sent to a port number
UIP[31:24]
UIP[23:16]
UIP[15:8]
UIP[7:0]
192 (0xC0)
168 (0xA8)
0 (0x00)
11 (0x0E)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
UPORT[15:0]
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
UPORT[15:8]
UPORT[7:0]
18 (0x12)
52(0x34)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
which socket is not open and UNREACH bit of IR becomes ‘1’ and UIPR indicates the destination
IP address.
Ex)In case of “192.168.0.11”
UPORTR (Unreachable Port Register)
Address Offset : 0x6054
Reset value : 0x0000_0000
TOE receives an ICMP packet(Destination port unreachable) when data is sent to a port number
which socket is not open and UNREACH bit of IR becomes ‘1’ and UPORTR indicates the
destination port number.
[15 :0] UPORT – Destination port number bits
Ex) In case of “0x1234”
13.6 Socket register (Base : 0x4601_0000 + 0x0004_000 x
n)[n=0,…7, where n is socket number]
Sn_MR (Socket n Mode Register)
Address Offset : 0x0000
Reset value : 0x0000_0000
W7500x Reference Manual Version1.1.0 86 / 399
res
res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
Res
Res
res
res
res
res
res
Sn_MR[7:0]
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Sn_MR[3:0]
Meaning
0 0 0
0
Closed
0 0 0
1
TCP
0 0 1
0
UDP
0 1 0
0
MACRAW
Sn_MR configures the option or protocol type of Socket n.
[3:0] These bits configures the protocol mode of Socket n as follows
MACRAW mode should be only used in Socket 0.
[4] UNICAST Blocking and IPv6 packet Blocking
UNICAST Blocking in UDP mode
0 : disable Unicast Blocking
1 : enable Unicast Blocking
This bit blocks receiving the unicast packet during UDP mode(P[3:0] = ‘0010’) and MULTI = ‘1’.
IPv6 packet Blocking in MACRAW mode
0 : disable IPv6 Blocking
1 : enable IPv6 Blocking
This bit is applied only during MACRAW mode (P[3:0] = ‘0100’). It blocks to receiving the IPv6
packet.
[5] Use No Delayed ACK, Multicast and Multicast Blocking mode
Use No Delayed ACK
0 : Disable No Delayed ACK option
1 : Enable No Delayed ACK option
This bit is applied only during TCP mode (P[3:0] = ‘0001’).When this bit is ‘1’, It sends the ACK
packet without delay as soon as a
W7500x Reference Manual Version1.1.0 87 / 399
Multicast
0 : using IGMP version 2
1 : using IGMP version 1
This bit is applied only during UDP mode(P[3:0] = ‘0010’) and MULTI = ‘1’. It configures the
version for IGMP messages (Join/Leave/Report).
Multicast Blocking in MACRAW mode
0 : disable Multicast Blocking
1 : enable Multicast Blocking
This bit is applied only when MACRAW mode(P[3:0] = ‘0100’). It blocks to receive the packet
with multicast MAC address.
[6] Broadcast Blocking in MACRAW and UDP mode
0 : disable Broadcast Blocking
1 : enable Broadcast Blocking
This bit blocks to receive broadcasting packet during UDP mode(P[3:0] = ‘0010’). In addition,
This bit does when MACRAW mode(P[3:0] = ‘0100’) Data packet is received from a peer. When
this bit is ‘0’, It sends the ACK packet after waiting for the timeout time configured by RTR.
[7] Multicasting and MAC Filter Enable mode
Multicasting in UDP mode
0 : disable Multicasting
1 : enable Multicasting
This bit is applied only during UDP mode(P[3:0] = ‘0010’).To use multicasting, Sn_DIPR &
Sn_DPORT should be respectively configured with the multicast group IP address & port number
before Socket n is opened by OPEN command of Sn_CR
MAC Filter Enable in MACRAW mode
0 : disable MAC Filtering
1 : enable MAC Filtering
This bit is applied only during MACRAW mode(P[3:0] = ‘0100’).When set as ‘1’, WZTOE can only
receive broadcasting packet or packet sent to itself. When this bit is ‘0’, WZTOE can receive
all packets on Ethernet. If user wants to implement Hybrid TCP/IP stack, it is recommended
that this bit is set as ‘1’ for reducing host overhead to process the all received packets.
W7500x Reference Manual Version1.1.0 88 / 399
Sn_CR (Socket n Command Register)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10
9
8
7
6
5
4 3 2 1 0
res
Res
Res
res
res
res
res
res
Sn_CR[7:0]
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Value
Symbol
Description
0x01
OPEN
Socket n is initialized and opened according to the protocol
selected in Sn_MR (P3:P0). The table below shows the value of
Sn_SR corresponding to Sn_MR.
Sn_MR (P[3:0])
Sn_SR
Sn_MR_CLOSE (‘0000’)
-
Sn_MR_TCP (‘0001’)
SOCK_INIT (0x13)
Sn_MR_UDP (‘0010’)
SOCK_UDP (0x22)
S0_MR_MACRAW (‘0100’)
SOCK_MACRAW (0x02)
.
0x02
LISTEN
This is valid only in TCP mode (Sn_MR(P3:P0) = Sn_MR_TCP). In this
mode, Socket n operates as a ‘TCP server’ and waits for
connection-request (SYN packet) from any ‘TCP client’.
The Sn_SR changes the state from SOCK_INIT to SOCKET_LISTEN.
When a ‘TCP client’ connection request is successfully
established, the Sn_SR changes from SOCK_LISTEN to
SOCK_ESTABLISHED and the Sn_IR(0) becomes ‘1’. But when a ‘TCP
client’ connection request is failed, Sn_IR(3) becomes ‘1’ and the
status of Sn_SR changes to SOCK_CLOSED.
0x04
CONNECT
This is valid only in TCP mode and operates when Socket n acts as
‘TCP client’. To connect, a connect-request (SYN packet) is sent
Address Offset : 0x0010
Reset value : 0x0000_0000
This is used to set the command for Socket n such as OPEN, CLOSE, CONNECT, LISTEN, SEND,
and RECEIVE. After WZTOE accepts the command, the Sn_CR register is automatically cleared
to 0x00. Even though Sn_CR is cleared to 0x00, the command is still being processed. To check
whether the command is completed or not, please check the Sn_IR or Sn_SR.
W7500x Reference Manual Version1.1.0 89 / 399
to ‘TCP server’ configured by Sn_DIPR & Sn_DPORT(destination
address & port). If the connect-request is successful, the Sn_SR is
changed to SOCK_ESTABLISHED and the Sn_IR(0) becomes ‘1’.
The connect-request fails in the following three cases.
1. When a ARPTO occurs (Sn_IR(3)=‘1’) because the
destination hardware address is not acquired through the
ARP-process.
2. When a SYN/ACK packet is not received and TCPTO
(Sn_IR(3) = ‘1 )
3. When a RST packet is received instead of a SYN/ACK
packet.
In these cases, Sn_SR is changed to SOCK_CLOSED.
0x08
DISCON
Valid only in TCP mode.
Regardless of ‘TCP server’ or ‘TCP client’, the DISCON command
processes the disconnect-process (‘Active close’ or ‘Passive
close’).
Active close: it transmits disconnect-request(FIN packet) to the
connected peer
Passive close: When FIN packet is received from peer,
a FIN packet is replied back to the peer.
When the disconnect-process is successful (that is, FIN/ACK
packet is received successfully), Sn_SR is changed to
SOCK_CLOSED. Otherwise, TCPTO occurs (Sn_IR(3)=‘1)= and then
Sn_SR is changed to SOCK_CLOSED.
cf> If CLOSE is used instead of DISCON, only Sn_SR is changed to
SOCK_CLOSED without disconnect-process.
If a RST packet is received from a peer during communication,
Sn_SR is unconditionally changed to SOCK_CLOSED.
0x10
CLOSE
Close Socket n.
Sn_SR is changed to SOCK_CLOSED.
0x20
SEND
SEND transmits all the data in the Socket n TX buffer. For more
details, please refer to Socket n TX Free Size Register
(Sn_TX_FSR), Socket n, TX Write Pointer Register (Sn_TX_WR), and
Socket n TX Read Pointer Register(Sn_TX_RD).
0x21
SEND_MAC
Valid only in UDP mode.
The basic operation is same as SEND. Normally SEND transmits
data after destination hardware address is acquired by the
W7500x Reference Manual Version1.1.0 90 / 399
automatic ARP-process(Address Resolution Protocol). But
SEND_MAC transmits data without the automatic ARP-process. In
this case, the destination hardware address is acquired from
Sn_DHAR configured by host, instead of APR-process.
0x22
SEND_KEEP
Valid only in TCP mode.
It checks the connection status by sending 1byte keep-alive
packet. If the peer cannot respond to the keep-alive packet during
timeout time, the connection is terminated and the timeout
interrupt will occur.
0x40
RECV
RECV completes the processing of the received data in Socket n
RX Buffer by using a RX read pointer register (Sn_RX_RD).
For more details, refer to Socket n RX Received Size Register
(Sn_RX_RSR), Socket n RX Write Pointer Register (Sn_RX_WR), and
Socket n RX Read Pointer Register (Sn_RX_RD).
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
Res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
Res
Res
res
res
Res
res
res
res
res
res
Sn_IR[4:0]
R R R R
R
Sn_IR (Socket n Interrupt Register)
Address Offset : 0x0020
Reset value : 0x0000_0000
Sn_IR indicates the status of Socket Interrupt such as establishment, termination, receiving
data, timeout). When an interrupt occurs and the corresponding bit of Sn_IMR is ‘1’, the
corresponding bit of Sn_IR becomes ‘1’.
[0] CONNECT Interrupt - This is issued one time when the connection with peer is successful
and then Sn_SR is changed to SOCK_ESTABLISHED
[1] DISCONNECT Interrupt - This is issued when FIN or FIN/ACK packet is received.
[2] RECV Interrupt - This is issued whenever data is received from a peer.
[3] TIMEOUT Interrupt - This is issued when ARPTO or TCPTO occurs.
[4] SENDOK Interrupt - This is issued when SEND command is completed
Sn_IMR (Socket n Interrupt Mask Register)
Address Offset : 0x0024
W7500x Reference Manual Version1.1.0 91 / 399
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
Res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
Res
Res
res
res
res
res
res
res
res
res
Sn_IMR[4:0]
R/W
R/W
R/W
R/W
R/W
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
Res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
Res
Res
res
res
res
res
res
Sn_ICR[4:0]
Reset value: 0x0000_00FF
Sn_IMR is used to mask interrupts. Each bit of Sn_IMR corresponds to each bit of Sn_IR. When
a bit of Sn_IMR is ‘1’ and the corresponding bit of Sn_IR is ‘1’, an interrupt will be issued. In
other words, if a bit of Sn_IMR is ‘0’, an interrupt will not be issued even if the corresponding
bit of Sn_IR is ‘1’.
[0] CONNECT Interrupt Mask
0: Disable CONNECT Interrupt
1: Enable CONNECT Interrupt
[1] DISCONNECT Interrupt Mask
0: Disable DISCONNECT Interrupt
1: Enable DISCONNECT Interrupt
[2] RECV Interrupt Mask
0: Disable RECV Interrupt
1: Enable RECV Interrupt
[3] TIMEOUT Interrupt Mask
0: Disable TIMEOUT Interrupt
1: Enable TIMEOUT Interrupt
[4] SENDOK Interrupt Mask
0: Disable SENDOK Interrupt
1: Enable SENDOK Interrupt
Sn_ICR (Socket n Interrupt Clear Register)
Address Offset : 0x0028
Reset value : 0x0000_0000
W7500x Reference Manual Version1.1.0 92 / 399
R/W
R/W
R/W
R/W
R/W
R/W
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
Res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
Res
Res
res
res
res
res
res
Sn_SR[7:0]
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Value
Symbol
Description
0x00
SOCK_CLOSED
This indicates that Socket n is released.
When DISCON, CLOSE command is ordered, or when a timeout
occurs, it is changed to SOCK_CLOSED regardless of previous
status.
0x13
SOCK_INIT
This indicates Socket n is opened with TCP mode.
It is changed to SOCK_INIT when Sn_MR (P[3:0]) = ‘0001’ and
OPEN command is ordered.
After SOCK_INIT, user can use LISTEN /CONNECT command.
Sn_ICR is used to clear interrupts. Each bit of Sn_IR can be cleared when the host writes ‘1’
value to each bit of Sn_ICR corresponding to each bit of Sn_IR.
[0] CONNECT Interrupt Clear
[1] DISCONNECT Interrupt Clear
[2] RECV Interrupt Mask
[3] TIMEOUT Interrupt Mask
[4] SENDOK Interrupt Mask
* ReadClearWrite1 (R/C_W1) : Software can read as well as clear this bit by writing
1. Writing ‘0’ has no effect on the bit value.
Sn_SR (Socket n Status Register)
Address Offset : 0x0030
Reset value : 0x0000_0000
Sn_SR indicates the status of Socket n. The status of Socket n is changed by Sn_CR or some
special control packet as SYN, FIN packet in TCP.
W7500x Reference Manual Version1.1.0 93 / 399
0x14
SOCK_LISTEN
This indicates Socket n is operating as ‘TCP server’ mode and
waiting for connection-request (SYN packet) from a peer (‘TCP
client’).
It will change to SOCK_ESTALBLISHED when the connection-
request is successfully accepted.
Otherwise it will change to SOCK_CLOSED after TCPTO
occurred (Sn_IR(TIMEOUT) = ‘1’).
0x17
SOCK_ESTABLISHED
This indicates the status of the connection of Socket n.
It changes to SOCK_ESTABLISHED when the ‘TCP SERVER’
processed the SYN packet from the ‘TCP CLIENT’ during
SOCK_LISTEN, or when the CONNECT command is successful.
During SOCK_ESTABLISHED, DATA packet can be transferred
using SEND or RECV command.
0x1C
SOCK_CLOSE_WAIT
This indicates Socket n received the disconnect-request (FIN
packet) from the connected peer. This is half-closing status,
and data can be transferred. For full-closing, DISCON command
is used. But For just-closing, CLOSE command is used.
0x22
SOCK_UDP
This indicates Socket n is opened in UDP mode(Sn_MR(P[3:0])
= ‘0010’).
It changes to SOCK_UDP when Sn_MR(P[3:0]) = ‘0010’) and
OPEN command is ordered.
Unlike TCP mode, data can be transfered without the
connection-process.
0x42
SOCK_MACRAW
This indicates Socket 0 is opened in MACRAW mode
(S0_MR(P[3:0]) = ‘0100’)and is valid only in Socket 0.
It changes to SOCK_MACRAW when S0_MR(P[3:0] = ‘0100’ and
OPEN command is ordered.
Like UDP mode socket, MACRAW mode Socket 0 can transfer a
MAC packet (Ethernet frame) without the connection-process.
Value
Symbol
Description
0x15
SOCK_SYNSENT
This indicates Socket n sent the connect-request packet
(SYN packet) to a peer.
The following table shows a temporary status indicated during changing the status of Socket
n.
W7500x Reference Manual Version1.1.0 94 / 399
It is temporarily shown when Sn_SR is changed from
SOCK_INIT to SOCK_ESTABLISHED by CONNECT command.
If connect-accept(SYN/ACK packet) is received from the
peer at SOCK_SYNSENT, it changes to SOCK_ESTABLISHED.
Otherwise, it changes to SOCK_CLOSED after TCPTO
(Sn_IR[TIMEOUT] = ‘1’) is occurred.
0x16
SOCK_SYNRECV
It indicates Socket n successfully received the connect-
request packet (SYN packet) from a peer.
If socket n sends the response (SYN/ACK packet) to the
peer successfully, it changes to SOCK_ESTABLISHED. If not,
it changes to SOCK_CLOSED after timeout occurs
(Sn_IR[TIMEOUT] = ‘1’).
0x18
SOCK_FIN_WAIT
These indicate Socket n is closing.
These are shown in disconnect-process such as active-close
and passive-close.
When Disconnect-process is successfully completed, or
when timeout occurs, these change to SOCK_CLOSED.
0x1A
SOCK_CLOSING
0X1B
SOCK_TIME_WAIT
0X1D
SOCK_LAST_ACK
This indicates Socket n is waiting for the response (FIN/ACK
packet) to the disconnect-request (FIN packet) by passive-
close.
It changes to SOCK_CLOSED when Socket n received the
response successfully, or when timeout occurs
(Sn_IR[TIMEOUT] = ‘1’).
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
Res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
Res
Res
res
res
res
res
res
Sn_PNR[7:0]
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Sn_PNR (Socket n Protocol Number Register)
Address Offset : 0x0100
Reset value : 0x0000_0000
This IP Protocol Register is user to set up the Protocol Field of IP Header at the IP layer RAW
mode. There are several protocol number defined in advance by registering to IANA. For the
W7500x Reference Manual Version1.1.0 95 / 399
overall list of upper level protocol identification number that IP is using, refer to online
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
Res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
Res
Res
res
res
res
res
res
Sn_ROS[7:0]
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
Res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
res
Res
Res
res
res
res
res
res
Sn_TTL[7:0]
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
documents of IANA (http://www.iana.org/assignments/protocol-numbers).
Ex) Internet Control Message Protocol (ICMP) = 0x01, Internet Group Management Protocol =
0x02
Sn_TOSR (Socket n IP Type of Service Register)
Address Offset : 0x0104
Reset value : 0x0000_0000
Sn_TOSR configures the TOS(Type Of Service field in IP Header) of Socket n. It is set before
OPEN command.
For more the details, refer to http://www.iana.org/assignments/ip-parameters.
Sn_TTLR (Socket n TTL Register)
Address Offset : 0x0108
Reset value : 0x0000_0080
Sn_TTL configures the TTL(Time To Live field in IP Header) of Socket n. It is set before OPEN
command.
For more the details, refer to http://www.iana.org/assignments/ip-parameters.
W7500x Reference Manual Version1.1.0 96 / 399
Sn_FRAGR (Socket n Fragment offset Register)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
Res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
Sn_FRAG[15:0]
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
Sn_FRAG[15:8]
Sn_FRAG[7:0]
0x00
0x00
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
Res
Res
res
res
res
res
res
res
Res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
Sn_MSS[15:0]
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
0x4101_0110
0x05B4
Address Offset : 0x010C
Reset value : 0x0000_4000
[15:0] Sn_FRAG configures the FRAG(Fragment field in IP header)
Ex)Sn_FRAGR = 0x0000 (Don’t Fragment)
Sn_MSSR (Socket n Maximum Segment Register)
Address Offset : 0x0110
Reset value : 0x0000_0000
This register is used for MSS (Maximum Segment Size) of TCP, and the register displays MSS set
by the other party when TCP is activated in Passive Mode.
Ex) In case of Socket 0 MSS = 1460 (0x05B4), configure as below,
W7500x Reference Manual Version1.1.0 97 / 399
Sn_PORTR (Socket n Source Port Register)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
res
Res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
Sn_PORT[15:0]
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
0x4101_0114
0x1388
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Sn_DHAR0[31:24]
Sn_DHAR0 [23:16]
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
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
Sn_DHAR0 [15:8]
Sn_DHAR0 [7:0]
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
31
30
29
28
27 26
25
24
23
22
21
20
19
18
17
16
Sn_DHAR1 [31:24]
Sn_DHAR1 [23:16]
R R R R R R R R R R R R R R R R
Address Offset : 0x0114
Reset value : 0x0000_0000
Sn_PORTR configures the source port number of Socket n. It is valid when Socket n is used in
TCP/UDP mode. It should be set before OPEN command is ordered.
Ex) In case of Socket 0 Port = 5000(0x1388), configure as below,
Sn_DHAR (Socket n Destination Hardware address Register)
Address Offset : 0x0118
Reset value : 0x0000_0000
Address Offset : 0x011E
Reset value : 0x0000_0000
Address Offset : 0x011C
Reset value : 0x0000_0000
W7500x Reference Manual Version1.1.0 98 / 399
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
Sn_DHAR1 [15:8]
Sn_DHAR1 [7:0]
W W W W W W W W W W W W W W W
W
Sn_DHAR0
[31:24]
Sn_DHAR0
[23:16]
Sn_DHAR0
[15:8]
Sn_DHAR0
[7:0]
Sn_DHAR1
[15:8]
Sn_DHAR1
[7:0]
0x00
0x08
0xDC
0x12
0x34
0x56
Sn_DHAR0
[31:24]
Sn_DHAR0
[23:16]
Sn_DHAR0
[15:8]
Sn_DHAR0
[7:0]
Sn_DHAR1
[31:24]
Sn_DHAR1
[23:16]
0x00
0x08
0xDC
0x12
0x34
0x56
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Res
Res
Res
res
res
res
res
res
res
res
res
res
res
res
res
res
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
Sn_DPROT[15:0]
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
Sn_DHAR configures the destination hardware address of Socket n when using SEND_MAC
command in UDP mode or it indicates that it is acquired in ARP-process by CONNECT/SEND
command.
Ex) In case of writing MAC address “00.08.DC.12.34.56”
Ex) In case of reading MAC address “00.08.DC.12.34.56”
Sn_DPORTR (Socket n Destination Port Number Register)
Address Offset : 0x0120
Reset value : 0x0000_0000
Sn_DPORT configures or indicates the destination port number of Socket n. It is valid when
Socket n is used in TCP/UDP mode.
W7500x Reference Manual Version1.1.0 99 / 399
In TCP client mode, it configures the listen port number of ‘TCP server’ before CONNECT
0x4101_0120
0x1388
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Sn_DIPR[31:24]
Sn_DIPR [23:16]
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
15
14
13
12
11
10 9 8 7 6 5 4 3 2 1 0
Sn_DIPR [15:8]
Sn_DIPR [7:0]
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
Sn_DIPR[31:24]
Sn_DIPR [23:16]
Sn_DIPR [15:8]
Sn_DIPR [7:0]
192 (0xC0)
168 (0xA8)
0 (0x00)
2 (0x02)
command.
In TCP server mode, it indicates the port number of ‘TCP client’ after successfully establishing
connection.
In UDP mode, it configures the port number of peer to be transmitted the UDP packet by
SEND/SEND_MAC command.
Ex) In case of Socket 0 Destination Port = 5000(0x1388), configure as below,
Sn_DIPR (Socket n Destination IP address Register)
Address Offset : 0x0124
Reset value : 0x0000_0000
Sn_DIPR configures or indicates the destination IP address of Socket n. It is valid when Socket
n is used in TCP/UDP mode.
In TCP client mode, it configures an IP address of ‘TCP server’ before CONNECT command.
In TCP server mode, it indicates an IP address of ‘TCP client’ after successfully establishing
connection.
In UDP mode, it configures an IP address of peer to be received the UDP packet by S END or
SEND_MAC command.
Ex)In case of “192.168.0.2”
W7500x Reference Manual Version1.1.0 100 / 399
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.