English
Language : 

W3150 Datasheet, PDF (40/59 Pages) List of Unclassifed Manufacturers – WIZnet’s Online Technical Support
5.2.2. UDP
UDP provides unreliable and connectionless datagram transmission structure. It processes data without
connection establishment that TCP does. Therefore, UDP message can be lost, overlapped, reversed. As
packets can arrive faster, recipient can not process all of them. In this case, user application should
guarantee the reliability of data transmission. UDP transmission can be proceeded as below,
Socket Initialization
Initialize the socket as UDP.
1. Set the protocol field of Socket n Mode Register (Sn_MR) as UDP(0x02).
2. Set the user defined value to the Socket n Source Port Register (Sn_PORT).
The value of Source Port can be appropriately delivered when remote HOST knows it.
3. Give OPEN command to Socket n Command Register (Sn_CR).
4. Check if the value of Socket n Socket Status Register(Sn_SSR) is SOCK_UDP. If not, try from the
first.
Received DATA?
It can be checked as below if data is received from remote peer.
Check if the value of Socket n RX Received Size Register (Sn_RX_RSR) is 0x00.
Or Check if the RECV value of Socket n Interrupt Register (Sn_IR) is ‘1’. (In this case, if the interrupt
of Socket n is activated, interrupt occurs. Refer to Interrupt Register (IR), Interrupt Mask Register
(IMR), Socket n Interrupt Register (Sn_IR).)
© Copyright 2005 WIZnet Co., Inc. All rights reserved.
íçñëç