Data Sheet

© Copyright 2012 WIZnet Co., Inc. All rights reserved.
37
iEthernet W5200
Figure 7 Physical Address Calculation
But this value itself is not the physical address to read. So, the physical address should be
calculated as follow.
1. Socket n-th TX Base Address (hereafter we'll call gSn_TX_BASE) and Socket n-th TX
Mask Address (hereafter we'll call gSn_TX_MASK) are calculated on TMSR value. Refer
to the psedo code of the Initialization if detail is needed.
2. The bitwise-AND operation of two values, Sn_TX_WR and gSn_TX_MASK give result to
the offset address(hereafter we'll call get_offset) in TX memory range of the socket.
3. Two values get_offset and gSn_TX_BASE are added together to give result tothe
physical address(hereafter, we'll call get_start_address).
Now, write the transmission data to get_start_address as large as you want. (* There's a case
that it exceeds the TX memory upper-bound of the socket while writing. In this case, write
Socket 7 (2K)
Socket 6 (2K)
Socket 5 (2K)
Socket 4 (2K)
Socket 3 (2K)
Socket 0 (2K)
Socket 2 (2K)
Socket 1 (2K)
Socket 0
0x8000
0x8800
0x9000
0x9800
0xA000
0xA800
0xB000
0xB800
0xC000
0x8000
0x8800
0x87EE
If S0_TX_WR0 = 0x8FEE,
Real Physical Address is
0x8000 + (0x8FEE & 0x07FF) =
0x87EE
18 bytes
Socket 0
494 bytes
Socket 0
0x8000
0x87EE
0x8800
0x8000
0x8800
0x81EE
0x8800 0x87EE = 0x12,
18 bytes write
and remain 494 bytes.
And physical Address
changes to 0x8000
Real Physical Address is
0x8000 + 0x01EE(494) =
0x81EE.
S0_TX_WR0 is
0x8FEE + 0x0200 = 0x91EE
Chip Base Address = 0x0000, 512(0x0200) bytes send