| Electronic Components Datasheet Search |
|
W5300 Datasheet(PDF) 95 Page - WIZnet Co., Ltd |
|
|
|||||||||||||||||||||||||||||
W5300 Datasheet(HTML) 95 Page - WIZnet Co., Ltd |
|
95 / 128 page ![]() © Copyright 2008-2014 WIZnet Co.,Ltd. All rights reserved. 95 { START: Sn_MR = 0x0001; /* sets TCP mode */ Sn_PORTR = source_port; /* sets source port number */ Sn_CR = OPEN; /* sets OPEN command */ /* wait until Sn_SSR is changed to SOCK_INIT */ if (Sn_SSR != SOCK_INIT) Sn_CR = CLOSE; goto START; } If all data size received from the peer are even number, Sn_MR(ALIGN) can be set as '1'. In case of Sn_MR(ALIGN) = '1', W5300 does not add the PACKET-INFO of TCP mode, and save only DATA packet in internal RX memory of SOCKETn. This can improve the performance by reducing the host's overhead of PACKET-INFO process. (In above code, Sn_MR = 0x0101 can be replaced with Sn_MR = 0x0001) LISTEN It operates "TCP SERVER" by performing LISTEN command. { /* listen SOCKET */ Sn_CR = LISTEN; /* wait until Sn_SSR is changed to SOCK_LISTEN */ if (Sn_SSR != SOCK_LISTEN) Sn_CR = CLOSE; goto START; } ESTABLISHED ? When Sn_SSR is SOCK_LISTEN, if SYN packet is received then Sn_SSR is changed to SOCK_SYNRECV. After transmitting SYN/ACK packet, the connection of SOCKETn is established. There are two methods to check if the connection of SOCKETn is established or not. After establishing the connection of SOCKETn, data communication is available. First method : { if (Sn_IR(CON) == ‘1’) Sn_IR(CON) = ‘1’; goto ESTABLISHED stage; /* In this case, if the interrupt of SOCKETn is activated, interrupt occurs. Refer to IR, IMR Sn_IMR and Sn_IR. */ } Second method : { |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |