Data Sheet
© Copyright 2012 WIZnet Co., Inc. All rights reserved.
32
iEthernet W5200
Sn_PORT (Socket n-th Source Port Register) [R/W] [0x4004+0x0n00-0x4005+0x0n00]
[0x0000]
This register sets the Source Port number for each Socket when using TCP or UDP mode, and
the set-up needs to be made before executing the OPEN command.
Ex) In case of Socket 0 Port = 5000(0x1388), configure as below,
0x4004 0x4005
0x13 0x88
Sn_DHAR (Socket n-th Destination Hardware Address Register) [R/W] [0x4006+0x0n00-
0x400B+0x0n00] [0xFFFFFFFFFFFF]
It sets or is set as destination hardware address of Socket n-th. Also, if SOCKET 0 is used for
PPPoE mode, S0_DHAR sets as PPPoE server hardware an address that is already known.
When using SEND_MAC command at the UDP or IPRAW mode, it sets the destination hardware
address of Socket n-th. At the TCP, UDP and IPRAW mode, Sn_DHAR is set as destination
hardware address that is acquired by ARP-process of CONNECT or SEND command. The host
can acquire the destination hardware address through Sn_DHAR after successfully performing
CONNET or SEND command.
When using PPPoE-process of W5200, PPPoE server hardware address is not required to be set.
However, even if PPPoE-process of W5200 is not used, but implemented by yourself with
MACRAW mode, in order to transmit or receive the PPPoE packet, PPPoE server hardware
address(acquired by your PPPoE-process), PPPoE server IP address, and PPP session ID should
be set, and MR(PPPoE) also should be set as '1'.
S0_DHAR sets the PPPoE server hardware address before the OPEN command. PPPoE server
hardware address which is set by S0_DHAR is applied to PDHAR after performing the OPEN
command. The configured PPPoE information is internally valid even after the CLOSE
command.
Ex) In case of Socket 0 Destination Hardware address = 08.DC.00.01.02.10, configuration is
as below,
0x4006 0x4007 0x4008 0x4009 0x400A 0x400B
0x08 0xDC 0x00 0x01 0x02 0x0A
Sn_DIPR (Socket n-th Destination IP Address Register)[R/W][0x400C+0x0n00
0x400F+0x0n00] [0x00000000]
It sets or is set as destination IP address of Socket n-th. If SOCKET0 is used as PPPoE mode,
S0_DIPR sets PPPoE server IP address that is already known. It is valid only in TCP, UDP, IPRAW
or PPPoE mode, but ignored in MACRAW mode. At the TCP mode, when operating as "TCP
CLIENT" it sets as IP address of "TCP SERVER" before performing CONNECT command and when
operating as "TCP SERVER", it is internally set as IP address of "TCP CLIENT" after successfully
establishing connection.