w5500带协议栈以太网芯片手册

合集下载

W5500设计手册

W5500设计手册
unsigned char Read_1_Byte(unsigned short reg) 读取 W5500 寄存器的 1 个字节。reg 是要读取的地址值。
unsigned char Read_SOCK_1_Byte(SOCKET s, unsigned short reg) 读取 W5500 的 SOCKET 寄存器的 1 个字节。s 是 SOCKET 号,取值范围 0~7,reg 是要读 取的地址值。
unsigned short Read_SOCK_Data_Buffer(SOCKET s, unsigned char *dat_ptr) 该函数是读取 SOCKET 接收数据缓存区中的数据。 s 是 SOCKET 号,取值范围 0~7。dat_ptr 是数据指针,用于缓存从 W5500 的 SOCKET 接 收缓冲区读取过来的数据。 函数返回的是读取的数据字节长度。
电源。但内部的 1.2V 电源输出只能供自己使用,不能给其它器件供电。 2. W5500 虽然是 3.3V 器件,但其输入接口可以承受 5V 电压输入,无需电压变换。输
出的高电平不超过 3.3V 电压,所以必须考虑在某些 5V 电压系统中,该高电平的电 压是否能够满足要求。 3. W5500 的第 10 引脚 EXRES1 外接一个 12.4K 的电阻到地,该电阻需选用 1% 的精密 电阻。 4. W5500 的 RSVD 引脚(23、38、39、40、41、42)可通过电阻接地,也可以悬空, 因为 W5500 内部已经下拉。 5. 如果要选择以太网的工作模式,可通过 PMODE0\PMODE1\PMODE2 引脚设置。将这 些引脚接到 CPU 的 IO 接口。PMODE0\PMODE1\PMODE2 引脚内部带上拉电阻,如 果将这些引脚悬空,W5500 的以太网将设置为自动握手模式。 6. 在模拟电源和数字电源之间有一个 1uH 的隔离电感,该 7. 以太网输出见下图,尽量按照该图的参数设计。C14 采用高压电容(大于 400V), C14 出来接大地,不能接电源地。如果不能接大地,可以悬空。

WIZnet W5500 产品说明书

WIZnet W5500 产品说明书

DriverThe ioLibrary means “Internet Offload Library” for WIZnet chip. It includes drivers and application protocols. There are three kinds of libraries explained on this page The first two drivers (ioLibrary_BSD, ioLibrary) can be used for W5500 application designs. These will be updated continuously. The former BSD-Type driver will not be updated, as it is only meant to be a migration help from W5200 to W5500.1. ioLibrary_BSD2. ioLibrary3. BSD Type driver for W5200 User1. ioLibrary_BSDOverviewThis driver provides the Berkeley Socket type APIs. The function names of this ioLibrary_BSD are the same as the function names of the ioLibrary.Directory StructureqEthernet : SOCKET APIs like BSD & WIZCHIP(W5500,W5200 and etc) Driver rInternet :rDHCP clientsDNS clientsOthers will be added.sDownload< ioLibrary_BSD : latest version >Type Version Note Download LinkSource code Ethernet(Berkeley Socket type APIs)1.0.2-Click Internet(Application protocols)1.1.1-ClickDocuments Socket APIs Help(chm, html)1.0.2-Click< ioLibrary_BSD : old version >Type Version Note Download LinkSource code Ethernet(Berkeley Socket type APIs)1.0.1-Click1.0.0-Click Internet(Application protocols)1.1.0-Click1.0.0-ClickDocuments Socket APIs Help(chm, html)1.0.1-Click1.0.0-Click< Update History >ioLibrary_BSDqEthernet : Berkeley Socket type APIsrDocument (chm, html): Socket APIs HelpsRevision HistorysV102qsocket.c (Refer to 20131220)rsetsockopt() : Remove warning message (delete tmp variable)1.w5500.c (Refer to 20131220)rWIZCHIP_READ_BUF() & WIZCHIP_WRITE_BUF() in _WIZCHIP_IO_MODE_SPI_FDM_ 1.caseRemove warning message1.Remove unnecessary 'for' loop2.V101qsocket.c (Refer to 20131104)rsendto() : Add to clear the timeout interrupt status of socket(Sn_IR_TIMEOUT).1.V100qFirst released.rInternet : Application protocolsrRevision HistorysV111 (2013-12-26)qDHCP ClinetrModify variable declaration(dhcp_tick_1s) for code optimization in dhcp.c 1.V110qDHCP ClientrOptimize code1.Add reg_dhcp_cbfunc()2.Add DHCP_stop()3.Integrate check_DHCP_state() & DHCP_run() into DHCP_run()4.Don't care system endian5.Move unreferenced DEFINE to dns.c6.Remove the unused DEFINE7.Add comments8.DNS ClientrRemove secondary DNS server in DNS_run1.If 1st DNS_run failed, call DNS_run with 2nd DNS again1.DNS_timerHandler → DNS_time_handler2.Move unreferenced DEFINE to dns.c3.Remove the unused define4.Integrated dns.h dns.c & dns_parse.h dns_parse.c into dns.h & dns.c 5.V100qFirst released.rDHCP Client (Dynamic Host Configuration Protocol Client)sDNS Client (Domain Name System Client)s< Application code examples : latest version >Application Update Note Download LinkSTM32F103X CooCox CoIDE Project Loopback Test2013-11-04-Click DHCP Client2013-12-26-Click DNS Client2013-12-26-ClickEnergyMicroTiny GECKO(EFM32TG840F32)IAR Project Loopback TestDHCP ClientDNS Client2013-12-20-Click< Application code examples : old version >Application Update Note Download LinkSTM32F103X CooCox CoIDE Project Loopback Test2013-10-23-Click DHCP Client2013-11-08-Click DNS Client2013-11-08-ClickThese projects do not contain [Ethernet] and [Internet]codes. (Empty directory)Please download ioLibrary_BSD APIs and Applicationprotocols,and then insert to each of same named directory in providedproject.< History >Application code exampleqExample project was made by CooCox CoIDE with the STM32F103X Cortex-M3 platform.rLoopback Tests2013-11-04 Changesqmain.c : refine and rearrange source code.1.Separated Project code / APIs and Applications2.DHCP Clients2013-12-26 Changesqmain.c : refine and rearrange source code for improved DHCP code.1.DNS Clients2013-12-26 Changesqmain.c : refine and rearrange source code for improved DNS code1.DescriptionThis driver provides BSD-type Socket APIs for W5500. Because the function names of this driver are more user-friendly than those of the older drivers, …, current WIZnet chip users can easily migrate from their WIZnet chip application to the W5500 application. All drivers for W5100, W5200 and W5300 will be merged into the ioLibrary in the near future. All application protocols will also be merged into ioLibrary based on this BSD-type Socket APIs.This table shows the differences between other BSD drivers and new W5500 driver.Driver Other BSD Drivers W5500 DriverVariables Type type.h (made by wiznet)ex) uint16stdint.h (standard)ex) uint16_tRegister Naming REGName + Indexex) SIPR0 , SIPR1, SIPR2,SIPR3REGName & WIZCHIP_OFFSET_INCex> SIP,WIZCHIP_OFFSET_INC(SIP,1),WIZCHIP_OFFSET_INC(SIP,2),WIZCHIP_OFFSET_INC(SIP,3)Basic IO function IINCHIP_READIINCHIP_WRITEIINCHIP_READ_BUFIINCHIP_WRITE_BUF16bit Address SpaceUser should implementFunctionsMCU DependentWIZCHIP_READWIZCHIP_WRITEWIZCHIP_READ_BUFWIZCHIP_WRITE_BUF32bit Address SpaceSince users implement MCU-dependent parts andthen register them as Callback function, users don'tneed to implement the Function itself.Supports IINCHIP_XXX function for backwardcompatiblity.Register Function IINCHIP_XXX can be used.Supports some getREG() &setREG() functions.It is not recommended to use WIZCHIP_XXXX.Supports getREG() & setREG() functions or macros forall registers.Extra Functions NoneOptional and omissible Supports User-friendly namedfunctions. All extra functions can be implemented byusing setREG() & getREG().Socket APIs Other BSD Drivers W5500 DriverReturn Value voidSuccess or FailTransmit/Receive SizeSuccess or FailTransmit/Receive SizeAll functions return.Error Code None SOCK_BUSY : 0 SOCKERR_SOCKNUM SOCKERR_SOCKOPT SOCKERR_SOCKINIT SOCKERR_SOCKCLOSED SOCKERR_SOCKMODE SOCKERR_SOCKFLAG SOCKERR_SOCKSTATUS SOCKERR_ARG SOCKERR_PORTZERO SOCKERR_IPINVALID SOCKERR_TIMEOUT SOCKERR_DATALEN SOCKERR_BUFFER SOCKFATAL_PACKLENIO Mode Block & Non-Block Fixed Block or Non-Block configurableBlock Function sendrecvsendtorecvfromsendrecvsendtorecvfromconnectNon-Block Function connectrecvfrom Should read data in received packetunit.Can read data received packet separately.Socket APIsqFunction NamerSame as the function name of previous driverssFunction Return valuerPrevious Drivers: Void or Success/Fail and Transmit/Receive SizesW5500 Driver: All functions return Success and Fail. In Fail case, operations are subdivided.sSuccess: SOCK_OK, Socket Number, Transmit and Receive SizeqFail: SOCK_BUSY, SOCKERR_XXX, SOCKFATAL_XXX ( 0 or Negative value) qSOCK_BUSY : 01.SOCKERR_SOCKNUM2.SOCKERR_SOCKOPT3.SOCKERR_SOCKINIT4.SOCKERR_SOCKCLOSED5.SOCKERR_SOCKMODE6.SOCKERR_SOCKFLAG7.SOCKERR_SOCKSTATUS8.SOCKERR_ARG9.SOCKERR_PORTZERO10.SOCKERR_IPINVALID11.SOCKERR_TIMEOUT12.SOCKERR_DATALEN13.SOCKERR_BUFFER14.SOCKFATAL_PACKLEN15.Block / Non-Block IO moderPrevious Drivers : Block function and Non-Block function were mixed.sBlock Function : send(), recv(), sento(), recvfrom()qNon-block Function : connect()qBlocking can be avoided by using getSn_SR(), getSn_TX_FSR(), and getSn_RX_RSR() qproperly.W5500 DriversBlock / Non-Block IO mode can be selected by user. (Default: Block mode)qsocket() with new flag SF_IO_NONBLOCK or setsockopt() with SO_SET_IOMODE Can be qconfigured.Block and Non-block Configurable Functionqconnect(), send(), recv(), sendto(), recvfrom()qgetSn_SR(), getSn_TX_FSR() and getSn_RX_RSR() functions can be used like …qlike previous drivers. They are not related to IO mode2. ioLibraryDownload< ioLibrary with example project : latest version >Application Version Note Download LinkCookie board Loopback test 1.0.2-Click<Revision History>v102qsocket.c(Refer to 2014-03-18)rTCPReSend() : Remove this function and related codes because TCP send mechanism was 1.changed.TCPReSendNB() : Remove this function and related codes because TCP send mechanism was 2.changed.TCPSendCHK() : Modify return value.3.TCPSend() : Change return value to len.4.loopback.c(Refer to 2014-03-18)rExisting mechanism resend packet if don't send all received packet, but change not to resend.1.v100qFirst releaser< ioLibrary : latest version >Description Version Note Download LinkDriver Source code ioLibrary source code 1.0.2-Click< ioLibrary : old version >Description Version Note Download LinkDriver Source code ioLibrary source code 1.0.0-ClickDriver documents Socket APIs Help(chm, html)(To use html, open the index.html)1.0.0-ClickThis ioLibrary has basic I/O functions, socket register access functions, common register access functions, utilities and functions for setting up a platform and network This code has been evaluated on the CooCox Cookie Board with ARM Cortex-M0 MCU.Please refer to this link for more details.How to use on cookie board.qThe figure below shows the folder structure of this ioLibrary.3. BSD Type driver for W5200 UserDriver Source code : w5500_cortexm3_firmware_for_legacy.zipqThis driver has the same BSD as the API for W5200 users. We have been evaluating this code on the ARM-CortexM3(STM32F103 series) chipset.This type of driver is the final version. We will not update it later. Please use thenew (well coded ) driver code for new projects.。

YIXIN_W5500模块用户手册 V2

YIXIN_W5500模块用户手册 V2

User ManualYIXIN_W5500模块用户手册全硬件TCP/IP协议以太网模块目录一、YIXIN_W5500以太网模块简介 (1)二、YIXIN_W5500模块排针功能表 (1)三、W5500芯片资源介绍 (2)四、电脑调试软件安装 (3)五、调式方法 (5)1.YIXIN_W5500模块接线方法 (5)2.W5500客户端模式测试 (5)3.W5500服务端模式测试 (12)4.W5500 UDP模式测试 (15)模块购买链接:/item.htm?spm=a1z10.1.w4004-7343112040.8.6OZKhY&id= 40933615687一、YIXIN_W5500以太网模块简介YIXIN_W5500以太网模块是一款基于WIZnet W5500芯片的以太网模块,是一款性能出色、性价比高的以太网模块。

模块集成硬件化TCP/IP协议;内部具有32K字节存储器作为TX/RX缓存;支持10/100Mbps的网络传输速率;支持8个独立端口同时运行;同时模块还支持3.3V或者5V电源供电,当5V供电时还可以输出3.3V的电压,方便用户在不同的单片机系统中使用;模块与单片机系统的通讯方式是简单、方便的SPI总线通信。

W5500的具体性能参数请下文的“W5500芯片资料介绍”。

YIXIN_W5500以太网模块的实物图如图1.1所示:图1.1 YIXIN_W5500模块实物图二、YIXIN_W5500模块排针功能表表2.1 YIXIN_W5500模块排针功能说明注1:W5500的工作电压是3.3V,但I/O口可以承受5V电压。

注2:YIXIN_W5500模块有两种供电方式,即为3.3V供电或者5V供电,当使用5V供电时,“3.3V”引脚将会有3.3V的电压输出。

三、W5500芯片资源介绍W5500芯片是一款采用全硬件TCP/IP协议栈的嵌入式以太网控制器,它能使嵌入式系统通过SPI(串行外设接口)接口轻松地连接到网络。

W5500以太网芯片及模块使用

W5500以太网芯片及模块使用

W5500以太网芯片及模块使用
一、模块介绍
是以太网转spi接口的,模块上有3个led和一个复位按钮,灯的含义是:
LINKLED
网络连接指示灯(Link LED)
显示当前连接状态:
低电平:连接建立;
高电平:未连接;
DUPLED
全/半双工指示灯(Duplex LED)
显示当前连接的双工状态:
低电平:全双工状态;
高电平:半双工状态;
ACTLED
活动状态指示灯(Active LED)
显示数据收/发活动时,物理介质子层的载波侦听活动情
况:
低电平:有物理介质子层的载波侦听信号;
高电平:无物理介质子层的载波侦听信号;
但貌似配置成全双工100M的速度也没什么增加,哪里出问题了呢?我现在使用18M的spi,使用wiz官方loopback软件测试速度为5Mb/s左右,好慢啊(/ □ \)
二、模块驱动
注意:在官网上有人共享了github的库函数驱动,不过是C99标准的,这一段Keil的c编译器支持好像有问题,而且对于是库函数很
致命,使用寄存器则无所谓
比如:ctlsocket和ctlwizchip函数的参数会因C99和C89的强转void类型定义不同,使其失效。

eg:0x0000不会错,0x0010可能会篡改成0x4e3c。

W5500S2E-S1用户手册 Ver 1.0

W5500S2E-S1用户手册 Ver 1.0

W5500S2E-S1用户手册Ver 1.0Copyright © WIZnet H.K. Ltd. All rights reserved.版本修订历史版本日期备注Ver 1.0 2016/05/06 第一次发布版权声明Copyright © WIZnet H.K. Ltd. All rights reserved.联系邮箱:wiznetbj@wiznet.co.kr更多信息,请登录:目录1 功能简介 (1)1.1 概述 (1)1.1.1 功能特点 (1)1.1.2 产品特性 (1)1.1.3 参数配置方式 (2)1.2 产品规范 (2)1.2.1 电气参数 (2)1.2.2 机械尺寸 (3)1.2.3 温度特性 (3)2 硬件部分说明 (4)2.1 硬件电路说明 (4)2.2 评估板简介 (6)2.3 快速评测接线说明 (8)3 工作模式 (9)3.1 TCP Server模式 (9)3.2 TCP Client模式 (9)3.3 UDP模式 (10)4 W5500S2E-S1的IP地址 (11)4.1 模块IP地址出厂设置 (11)4.2 用户获取模块IP地址 (11)4.3 模块与计算机网段检测 (12)4.4 计算机IP设置方式 (12)5 W5500S2E-S1 ConfigTool软件配置 (14)5.1 获取模块配置信息 (14)5.2 修改设备配置信息 (15)5.3 恢复出厂设置 (15)5.3.1 软件恢复出厂设置 (15)5.3.2 通过A T命令恢复出厂设置 (15)5.3.3 硬件恢复出厂设置 (16)5.4 升级固件 (16)6 A T命令配置介绍 (17)6.1 A T命令概述 (17)6.2 进入A T命令模式 (18)6.3 A T命令列表 (18)6.3.1 基本命令列表 (18)6.3.2 控制命令列表 (18)6.3.3 设备配置命令列表 (19)6.3.4 串口配置命令列表 (20)6.4 A T命令详细说明 (22)6.4.1 基本命令 (22)6.4.2 控制命令 (22)6.4.3 设备配置命令 (24)6.4.4 串口控制命令 (28)6.5 A T命令配置实例 (32)6.5.1 将W5500S2E-S1配置为TCP Server模式 (32)6.5.2 将W5500S2E-S1配置为TCP Client模式 (33)6.5.3 将W5500S2E-S1配置为UDP模式 (34)7 Web网页配置 (35)7.1 Web主页 (35)7.2 基本配置 (37)7.3 高级配置 (38)7.4 固件信息 (40)7.5 设备管理 (40)8 固件升级 (43)8.1 通过W5500S2E-S1 ConfigTool升级固件 (43)8.2 通过网页远程升级固件 (44)产品返修程序 (45)产品问题报告表 (46)免责声明 (47)声明 (48)销售与服务 (49)1功能简介1.1概述W5500S2E-S1是一款工业级串口转以太网模块,支持TCP Server、TCP Client和UDP 三种工作模式,串口波特率最高可达1.152Mbps,并提供配套的上位机配置软件,也可通过网页或A T命令等方式轻松配置。

w5500引脚图及引脚说明

w5500引脚图及引脚说明

w5500引脚图及引脚说明W5500是WIZnet推出的高性能以太网接口芯片系列之一,内部集成全硬件TCP/IP协议栈+MAC+PHY。

全硬件协议栈技术采用硬件逻辑门电路实现复杂的TCP/IP协议簇,其应用具有简单快速、可靠性高、安全性好等显著优势;内部集成MAC和PHY 工艺,使得单片机接入以太网方案的硬件设计更为简捷和高效。

W5500 是一款全硬件TCP/IP 嵌入式以太网控制器,为嵌入式系统提供了更加简易的互联网连接方案。

W5500 集成了TCP/IP 协议栈,10/100M 以太网数据链路层(MAC)及物理层(PHY),使得用户使用单芯片就能够在他们的应用中拓展网络连接。

久经市场考验的WIZnet 全硬件TCP/IP 协议栈支持TCP,UDP,IPv4,ICMP,ARP,IGMP 以及PPPoE 协议。

W5500 内嵌32K 字节片上缓存以供以太网包处理。

如果你使用W5500,你只需要一些简单的Socket 编程就能实现以太网应用。

这将会比其他嵌入式以太网方案更加快捷、简便。

用户可以同时使用8 个硬件Socket 独立通讯。

W5500 提供了SPI(外设串行接口)从而能够更加容易与外设MCU 整合。

而且,W5500 的使用了新的高效SPI 协议支持80MHz 速率,从而能够更好的实现高速网络通讯。

为了减少系统能耗,W5500 提供了网络唤醒模式(WOL)及掉电模式供客户选择使用。

w5500芯片特点全硬件TCP/IP协议栈- 支持TCP,UDP,ICMP,IPv4,ARP,IGMP,PPPoE协议- 硬件协议栈不受网络攻击,安全稳定8个独立的硬件Socket,各路通信互不影响32bytes片上缓存供TCP/IP包处理集成802.3以太网MAC集成10BaseT / 100Base-T以太网PHY主机接口:SPI高速串行外设接口(最高80Mhz )低功耗,工作温度40℃左右支持嵌入式操作系统:Linux RTOS。

Arduino扩展板-POE以太网络扩展板-W5500介绍

Arduino扩展板-POE以太网络扩展板-W5500介绍

Arduino扩展板-POE以太网络扩展板-W5500介绍Arduino扩展板-POE以太网络W5500介绍这款兼容Arduino的W5500以太网扩展板是DFRobot Ethernet 家族的新成员,其集成PoE电源和W5500以太网芯片,能够满足一般IoT项目的应用要求。

其PoE供电、以太网传输、IO扩展,为一根网线部署IoT项目打下坚实基础。

在外形和功能扩展上,W5500 PoE以太网扩展板集成了符合IEEE 802.3at行业标准的PoE Class 0电源,MicroSD卡座以及标准的Gravity-4 Pin I2C接口2个,UART 接口1个,Gravity-3 Pin数字模拟接口各4个,产品大小与Arduino UNO尺寸相等。

Arduino扩展板-POE以太网络W5500性能优势在性能上POE以太网络扩展板W5500集成了TCP/IP 协议栈,10/100M 以太网数据链路层(MAC)及物理层(PHY),使得用户使用单芯片就能够在他们的应用中拓展网络连接POE以太网络扩展板W5500支持全硬件TCP/IP协议栈,支持TCP,UDP,IPv4,ICMP,ARP,IGMP 以及 PPPoE 协议POE以太网络扩展板 W5500 内嵌 32K 字节片上收发缓存以供以太网包处理。

这将会比其他嵌入式以太网方案,更加快捷、简便W5500主控板使用了一个新的高效SPI协议,支持80MHz通信速率,从而能够更好的实现高速网络通讯POE以太网络扩展板W5500还提供了网络唤醒模式(WOL)及掉电模式,能够有效减少系统能耗,供客户更方便的选择使用。

Arduino扩展板-POE以太网络W5500特性支持硬件TCP/IP协议:TCP,UDP, ICMP, IPv4,ARP,IGMP,PPPoE 支持8通道独立Sockets支持WOL网络唤醒内部32KB收发缓存板载电平转换电路扩展Gravity传感器用3P排针接口Arduino扩展板-POE以太网络W5500技术规格PoE输入:48V AC/DC(本产品为符合802.3at标准的Class 0 PD设备)PoE功率:最高12W(VIN口可向外输出12V/1A)SPI时钟:80MHz(Max)PHY:WIZnet W5500PCB尺寸:68.6mmx53.3mm整体尺寸:72.5mmx53.3mm。

W5500_中文数据手册

W5500_中文数据手册

高性能以太网芯片W5500 数据手册W5500 是一款全硬件TCP/IP 嵌入式以太网控制器,为嵌入式系统提供了更加简易的互联网连接方案。

W5500 集成了TCP/IP 协议栈,10/100M 以太网数据链路层(MAC)及物理层(PHY),使得用户使用单芯片就能够在他们的应用中拓展网络连接。

久经市场考验的WIZnet 全硬件TCP/IP 协议栈支持TCP,UDP,IPv4,ICMP,ARP,IGMP 以及PPPoE 协议。

W5500 内嵌32K 字节片上缓存以供以太网包处理。

如果你使用W5500,你只需要一些简单的Socket 编程就能实现以太网应用。

这将会比其他嵌入式以太网方案更加快捷、简便。

用户可以同时使用8 个硬件Socket 独立通讯。

W5500 提供了SPI(外设串行接口)从而能够更加容易与外设MCU 整合。

而且,W5500 的使用了新的高效SPI 协议支持80MHz 速率,从而能够更好的实现高速网络通讯。

为了减少系统能耗,W5500 提供了网络唤醒模式(WOL)及掉电模式供客户选择使用。

特点∙支持硬件TCP/IP 协议:TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE∙支持8 个独立端口(Socket)同时通讯∙支持掉电模式∙支持网络唤醒∙支持高速串行外设接口(SPI 模式0,3)∙内部32K 字节收发缓存∙内嵌10BaseT/100BaseTX 以太网物理层(PHY)∙支持自动协商(10/100-Based 全双工/半双工)∙不支持IP 分片∙ 3.3V 工作电压,I/O 信号口5V 耐压;∙LED 状态显示(全双工/半双工,网络连接,网络速度,活动状态)∙48 引脚LQFP 无铅封装(7x7mm, 0.5mm 间距)目标应用W5500 适合于以下嵌入式应用:∙家庭网络设备: 机顶盒、个人录像机、数码媒体适配器∙串行转以太网: 门禁控制、LED 显示屏、无线AP 继电器等∙并行转以太网: POS/微型打印机、复印机∙USB 转以太网: 存储设备、网络打印机∙GPIO 转以太网: 家庭网络传感器∙安全系统: 数字录像机、网络摄像机、信息亭∙工厂和楼宇自动化控制系统∙医疗监测设备∙嵌入式服务器1 引脚分配图1 W5500 引脚分布1.1 引脚描述表格 1 引脚类型标记表格 2 W5500 引脚描述在EXRES1 引脚和模拟地之间需要接一个12. 4KΩ,精度 1 %的电阻。

w5500引脚图及引脚说明

w5500引脚图及引脚说明

w5500引脚图及引脚说明
W5500是WIZnet推出的高性能以太网接口芯片系列之一,内部集成全硬件TCP/IP协议栈+MAC+PHY。

全硬件协议栈技术采用硬件逻辑门电路实现复杂的TCP/IP协议簇,其应用具有简单快速、可靠性高、安全性好等显着优势;内部集成MAC和PHY工艺,使得单片机接入以太网方案的硬件设计更为简捷和高效。

W5500 是一款全硬件TCP/IP 嵌入式以太网控制器,为嵌入式系统提供了更加简易的互联网连接方案。

W5500 集成了TCP/IP 协议栈,10/100M 以太网数据链路层(MAC)及物理层(PHY),使得用户使用单芯片就能够在他们的应用中拓展网络连接。

久经市场考验的WIZnet 全硬件TCP/IP 协议栈支持TCP,UDP,IPv4,ICMP,ARP,IGMP 以及PPPoE 协议。

W5500 内嵌32K 字节片上缓存以供以太网包处理。

如果你使用W5500,你只需要一些简单的Socket 编程就能实现以太网应用。

这将会比其他嵌入式以太网方案更加快捷、简便。

用户可以同时使用8 个硬件Socket 独立通讯。

W5500 提供了SPI(外设串行接口)从而能够更加容易与外设。

W5500网络扩展板教程

W5500网络扩展板教程

以太网在各个领域和行业有着非常广泛和深入的应用,这主要源于以太网的高度灵活性和较易实现的特点。

因为以太网具有组网简单,成本低廉,兼容性优秀,连接可靠,以及拓扑调整方便的优点,在作为智能家居,物联网或者无线传感网络的网关方面有其他的网络技术所不具备的优势,从而得到大力的发展和应用。

本文将详细介绍如何使嵌入式系统接入到以太网,如何采用硬件协议栈的方式使您的方案或应用快速高效的连接到互联网,如何实现TCP/IP的通信,以及如何实现上层应用层协议等等。

第1章以太网模型以太网的实现采用层次结构的概念,每一层都有自己的功能,就像建筑物一样,每一层都靠下一层支持,每一层也都为上一层功能的实现打好基础。

实际上,用户接触到的只是最上面的一层,根本感觉不到底层的存在。

要理解以太网,必须从最下层开始,自下而上理解每一层的功能。

1.1五层结构以太网模型有不同的分层方式,ISO(国际标准组织)提出OSI七层网络模型,自上而下分别为:应用层、表示层、会话层、传输层、网络层、数据链路层、物理层。

OSI七层网络模型主要是为了解决异种网络互联时所遇到的兼容性问题。

它的最大优点是将服务、接口和协议这三个概念明确地区分开来,也使网络的不同功能模块承担起不同的职责。

由于互联网网络体系结构以TCP/IP协议为核心,因而基于TCP/IP的参考模型将以太网可以分成四层,自上而下分别为:应用层、传输层、网络互联层、网络接口层。

根据我自己的理解,把以太网分成五层比较容易解释。

这五层结构不仅符合OSI结构强调的不同层次承担不同职责的特点,同时也符合TCP/IP协议参考模型协议之间相互支撑、相互调用的逻辑关系。

图1-1-1以太网五层模型如上图所示,最底下的一层叫做“物理层”,也叫“PHY层”,最上面的一层叫做“应用层”,中间的三层(自下而上)分别是“链路层”,也叫“MAC层”、“网络层”和“传输层”。

越下面的层,越靠近硬件;越上面的层,越靠近用户。

W5500-EVB 用户手册

W5500-EVB 用户手册

W5500-EVB 用户手册V1.01© Copyright 2013 WIZnet Co., Inc. All rights reserved更多内容请参考:/文档历史信息时间描述V1.0 2013-10-08 与W5500-EVB发布V1.01 2014-01-14 调整格式;目录1简介 (1)2特点 (1)3规格 (1)4方框图 (2)5硬件布局 (2)6插针引脚分布 (4)7开发调试工具 (5)7.1编译工具 (5)7.2烧录工具 (6)7.3USB转UART接口IC驱动 (6)8程序下载 (7)8.1硬件连接 (7)8.2程序编译 (7)8.3程序下载 (8)9固件演示 (12)9.1默认配置 (12)9.2打开Http Server (14)9.3Http Server修改参数 (15)10参考电路图 (18)插图清单图1 方框图 (2)图2底板布局(正面) (2)图3 底板布局(反面) (3)图4 底板布局(正面) (3)图5 ST 烧录工具下载 (6)图6 硬件连接 (7)图7 程序编译 (8)图8 查看端口号 (8)图9 程序下载(步骤1) (9)图10 程序下载,按键顺序 (9)图11程序下载(步骤2) (10)图12 程序下载(步骤3) (10)图13 程序下载(步骤4):选择固件程序 (11)图14 硬件连接 (12)图15 固件程序默认配置 (13)图16 查看端口号 (14)图17 串口输出默认配置 (14)图18 Http Server配置页面:默认配置 (15)图19 Http Server 配置页面:修改配置 (15)图20 Http Server 重启 (16)图21 Http Server配置后页面 (16)图22 串口输出修改结果 (17)图23 核心板 (18)图24 底板 (19)表格清单表1 规格 (1)表2插针引脚分布 (4)表3 W5500-EVB Http Server 默认配置 (12)1简介W5500 Evaluation Board 简称W5500-EVB,是为了方便广大用户更好的了解、使用W5500这款网络芯片所开发的评估板。

w5500中文资料_数据手册_参数

w5500中文资料_数据手册_参数

W5500数据表版本1.0(2013年8月) 55/65可以使用16位偏移地址范围访问Socket n TX缓冲区块从0x0000到0xFFFF,不管配置的大小. (参考Sn_TX_WR& Sn_TX_RD).价值(dec) 0 1 2 4 8 16缓冲区大小 0KB 1KB 2KB 4KB 8KB 16KB Ex)Socket 0 TX缓冲区大小= 4KB 0x001F 0×04 Sn_TX_FSR(Socket n TX自由大小寄存器)[R] [0x0020-0x0021] [0x0800] Sn_TX_FSR表示Socket n TX缓冲块的空闲大小. 它被初始化为配置的大小由Sn_TXBUF_SIZE.数据大于Sn_TX_FSR不应该保存在Socket n TX缓冲区中,因为较大的数据会覆盖以前 的数据保存的数据尚未发送.因此,在将数据保存到Socket n TX之前检查缓冲区,如果数据等于或小于其检查的大小,则传输数据 在Socket n TX缓冲区中保存数据后,发送/ SEND_MAC命令.但是,如果数据是大于其检查尺寸,将数据分成检查尺寸后传输并保 存在Socket n TX缓冲区中.如果Sn_MR(P [3:0])不是TCP模式(“0001”),则会自动计算为 “Socket n TX Write Pointer(Sn_TX_WR)”和“Socket n TX Read”之间的区别指针(Sn_TX_RD)“.如果Sn_MR(P [3:0])为TCP模式 (“0001”),则会自动计算作为 Sn_TX_WR与内部ACK指针之间的区别连接的对等体已经接收到数据点. Ex)在S0_TX_FSR中为 2048(0x0800)的情况下, 0×0020 0×0021 0x08的为0x00 Sn_TX_RD(Socket n TX读指针寄存器)[R] [0x0022-0x0023] [0x0000] Sn_TX_RD由OPEN命令初始化.但是,如果Sn_MR(P [3:0])是TCP模式 W5500数据表版本1.0(2013年8月) W5500 W5500芯片是提供的硬连线TCP / IP嵌入式以太网控制器更容易互联网连接到嵌入式系 统 W5500使用户能够拥有互联网连接在他们的应用程序中只需使用单芯片即可 TCP / IP协议栈,10/100以太网MAC和PHY嵌入式. WIZnet的硬连线TCP / IP是经市场验证的技术,支持TCP,UDP, IPv4,ICMP,ARP,IGMP和PPPoE协议. W5500内置32K字节内 存缓冲区用于以太网数据包处理.如果你使用W5500,你可以通过添加简单的套接字程序来实现以太网应用程序.它的而不是使用任 何其他嵌入式以太网解决方案.用户可以同时使用8个独立的硬件插座.提供SPI(串行外设接口),便于与外部的集成 MCU. W5500 的SPI支持80 MHz速度和新的高效SPI协议高速网络通信.为了降低功耗系统中,W5500提供WOL(网络唤醒)和掉电模式.特征 - 支 持硬连线TCP / IP协议:TCP,UDP,ICMP,IPv4,ARP,IGMP,PPPoE - 同时支持8个独立插座 - 支持省电模式 - 支持通过UDP唤 醒LAN - 支持高速串行外设接口(SPI模式0,3) - 用于TX / RX缓冲器的内部32K字节内存 - 10BaseT / 100BaseTX以太网PHY嵌入式 支持自动协商(全双工,半双工,10和100) - 不支持IP分段 - 3.3V操作,具有5V I / O信号容差 - LED输出(全/半双工,链路,速 度,有效) - 48引脚LQFP无铅封装(7x7mm,0.5mm间距) W5500适用于以下嵌入式应用: - 家庭网络设备:机顶盒,PVR,数字媒体适配器 - 串行到以太网:访问控制,LED显示屏,无线 AP继电器等 - 并行至以太网:POS /迷你打印机,复印机 - USB到以太网:存储设备,网络打印机 - GPIO到以太网:家庭网络传感 器 - 安全系统:DVR,网络摄像机,信息亭 - 工厂和楼宇自动化 - 医提供一站式配套, 解决物料烦恼,万联芯城-以良心做好良芯,专为终端工厂企业客户提 供电子元器件一站式配套报价服务,客户提交物料清单,商城即可整单 报价,整单下单有优惠,万联芯城电子元器件配单服务可以为客户节 省采购成本,满足客户物料需求,丰富的电子元器件供应链体系已为 全国多家终端企业服务,点击进入万联芯城。

W5500(socket)寄存器使用说明书

W5500(socket)寄存器使用说明书

Socket 端口寄存器Sn3_MR (Socket n 模式寄存器) [R/W] [0x0000] [0x00]Sn_MR 描述3n 是 Socket 编号(0,1,2,3,4,5,6,7).n 设置了 SNUM[2:0]控制位集 n is Socketnumber (0, 1, 2, 3, 4, 5, 6, 7). n is set ‘SNUM[2:0]’ in Control Bits sets.Sn_CR (Socket n 配置寄存器) [R/W] [0x0001] [0x00]该寄存器用于设置 Socket n 的配置命令如 OPEN、CLOSE、CONNECT、LISTEN、END 和RECEIVE。

经 W5500 识别这一命令后,Sn_CR 寄存器会自动清零为 0×00。

尽管 Sn_CR 被清零为 0×00,但命令仍在处理中。

为了验证该命令是否完成,请检查 Sn_IR 或 Sn_SR 寄IR (中断寄存器) [R/W] [0x0015] [0x00]中断寄存器( IR)指明了中断的状态。

IR 的每一位都是‘0’,直到被主机写为‘1’. 如果 IR 不等于‘0×00’, INTn 引脚将会被拉低。

直到其变为‘0×00’时, INTn 才会被拉高。

S n_SR (Socket n 状态寄存器) [R] [0x0003] [0x00]Sn_SR指示了 Socket n 的状态,并根据 Sn_CR 或者一些TCP模式下的特殊控制包,如 SYN,FIN 包而改变。

Sn_SR临时状态描述Sn_PORT (Socket n 源端口寄存器) [R/W] [0x0004-0x0005] [0x0000]该寄存器配置了 Socket n 的源端口号。

当 Socket n 工作在 TCP 或 UDP 模式下,该寄 存器生效。

注意:必须在 OPEN 命令生效前,完成对该寄存器的设置。

以太网接口芯片W5500与ENC28J60对比

以太网接口芯片W5500与ENC28J60对比

以太网接口芯片W5500与ENC28J60对比目前较为成熟的单片机接入以太网方案:W5100和ENC28J60,都是被常常使用到的芯片,这两种方案也可以说是硬件协议栈和软件协议栈的典型代表,都经得住市场考验。

除了在传统单片机的以太网接入中被广泛使用,也能看到他们在开源硬件的以太网扩展以及物联网应用等方面发挥的重要作用。

W5500是WIZnet最新的以太网芯片,这里就拿W5500来做比较。

表1为W5500与ENC28J60基本参数对比表。

表1 W5500于ENC28J60基本参数对比1、硬件参数对比(1)ENC28J60芯片结构方面,结构比较简单,通过内置MAC+PHY芯片来实现简单的以太网物理层连接,用户需要自己创建或市场上的第三方库方能实现应用层的设计;PHY芯片方面,内置了一块10M BASE-T 芯片,基本可以满足目前通信需要;接口方面,采用最高10MHz的SPI接口;缓存方面,ENC28J60仅提供8KB内部收发缓存,在目前处理大量数据要求的背景下显得捉襟见肘。

(2)W5500芯片结构方面,内部由TCP/IP协议栈+MAC+PHY构成,拥有非常完善的官方应用库,极大缩短开发周期,可以完美实现以太网接入要求;PHY芯片方面,10M/100M BASE-T自适应芯片让W5500表现更为出色;接口方面,W5500采用新的高效SPI协议支持80MHz速率;缓存方面,W5500内置32KB收发缓存,用户可以同时使用8个硬件Socket独立通信,且各个Socket之间互不影响。

2、TCP/IP协议栈ENC28J60采用的是传统的软协议操作,需要主控MCU不断的响应中断,这在很大程度上占用了MCU的资源来跑软协议栈。

经过测试发现,随着需要响应的事件增多,MCU的处理效率直线下降,会严重影响通信质量。

W5500采用的是最新的TOE(TCP卸载引擎)技术,不同于传统的软协议栈,通过内置TCP/IP硬件协议栈也就是硬件逻辑电路,在W5500芯片内完成TCP/IP握手请求,基本上不占用MCU内部资源,能够极大地提高MCU工作效率。

w5500芯片

w5500芯片

W5100 是一款多功能的单片网络接口芯片,内部集成有10/100Mbps 以太网控制器,主要应用于高集成、高稳定、高性能和低成本的嵌入式系统中。

使用W5100 可以实现没有操作系统的Internet 连接。

W5100与IEEE802.3 10BASE-T和802.3u 100BASE-TX兼容。

W5100 内部集成了全硬件的、且经过多年市场验证的TCP/IP 协议栈、以太网介质传输层(MAC)和物理层(PHY)。

全硬件TCP/IP协议栈支持TCP,UDP,IPv4,ICMP,ARP,IGMP 和PPPoE,这些协议已经在很多领域经过了多年的验证。

W5100 内部还集成有16KB 存储器用于数据传输。

使用W5100不需要考虑以太网的控制,只需要进行简单的端口编程。

W5100提供3种接口:直接并行总线、间接并行总线和SPI总线。

W5100与MCU接口非常简单,就像访问外部存储器一样。

20本词条百科名片缺少名片信息, 百科名片缺少图片, 欢迎各位编辑词条,额外获取20个积分。

特性:l 与MCU多种接口选择:直接总线接口、间接总线接口和SPI总线;l 支持硬件TCP/IP协议:TCP, UDP, ICMP, IGMP, IPv4, ARP, PPPoE, Ethernet;I 可选择1:1 YL18-2050S YT37-1107S,YL2J011D,YL2J201A网络变压器l 支持ADSL连接(支持PPPOE协议,带PAP/CHAP验证);l 支持4个独立的端口(sockets)同时连接;l 内部16K字节存储器作TX/RX缓存;l 内嵌10BaseT/100BaseTX以太网物理层,支持自动应答(全双工/半双工模式);l 支持自动极性变换(MDI/MDIX);l 多种指示灯输出(Tx,Rx,Full/Duplex,Collision,Link,Speed);l 0.18μm CMOS工艺;l 3.3V工作电压,I/O口可承受5V电压;l LQFP80无铅封装,符合环保要求;l 工作温度:-45 ~ 80℃工业级。

w5500 处理流程

w5500 处理流程

w5500 处理流程W5500是一款基于TCP/IP协议的以太网控制器芯片,广泛应用于嵌入式系统中的网络通信。

它提供了丰富的接口和功能,可以实现网络连接、数据传输和网络管理等功能。

下面将详细介绍W5500的处理流程。

1. 初始化:在系统上电或复位后,W5500会进行初始化操作。

首先,它会检查硬件连接是否正确,包括电源、晶振、引脚等。

然后,它会进行内部寄存器的初始化,设置默认参数和配置。

最后,它会启动网络接口,准备接收和发送数据。

2. 建立连接:当W5500初始化完成后,它可以开始建立网络连接。

首先,它会监听网络中的广播消息,寻找可用的路由器或网关。

一旦找到合适的设备,它会发送连接请求,并等待对方的响应。

如果对方同意连接,W5500会与对方建立物理连接,并进行握手过程,确保双方的身份和通信参数一致。

3. 数据传输:一旦建立了连接,W5500就可以开始进行数据传输了。

它支持TCP和UDP两种传输协议,可以根据应用需求选择合适的协议。

在数据传输过程中,W5500会根据协议要求进行数据的封装和解封装操作。

对于TCP协议,它会进行序列号的管理和确认机制,确保数据的可靠传输。

对于UDP协议,它会提供无连接的数据报文传输服务。

4. 网络管理:除了数据传输,W5500还提供了一些网络管理功能。

例如,它可以实现ARP(地址解析协议)功能,根据IP 地址获取物理地址。

它还可以实现IP和MAC地址的过滤功能,防止非法设备的接入。

此外,它还支持DHCP(动态主机配置协议),可以自动获取IP地址和其他网络配置信息。

5. 错误处理:在网络通信过程中,可能会出现各种错误和异常情况。

W5500提供了错误处理机制,可以检测和处理这些错误。

例如,它可以检测到物理连接中断、超时、数据丢失等错误,并采取相应的措施进行处理。

它还可以检测到网络层的错误,如IP地址冲突、路由不可达等,并返回相应的错误信息给上层应用。

6. 关闭连接:当数据传输完成后,或者出现异常情况需要关闭连接时,W5500会执行关闭连接的操作。

W5500设计手册

W5500设计手册
unsigned short Read_SOCK_Data_Buffer(SOCKET s, unsigned char *dat_ptr) 该函数是读取 SOCKET 接收数据缓存区中的数据。 s 是 SOCKET 号,取值范围 0~7。dat_ptr 是数据指针,用于缓存从 W5500 的 SOCKET 接 收缓冲区读取过来的数据。 函数返回的是读取的数据字节长度。
可以使用 CPU 的 IO 接口来控制 W5500 的 PMODE0\PMODE1\PMODE2 引脚电平,选择 所需要的以太网工作模式。
在要求通信可靠性较高且对通信速率没有很高要求的情况下,可适当降低通信速率,选 择 10M 的通信模式。
2. 软件设置 在启动软件设置之前,设置 PHYCFGR 的 OPMD 位为 1(W5500 上电复位后,PHYCFGR 的 OPMD 位默认为 0,即启动硬件设置)。 设置 PHYCFGR 的 OPMDC 位。OPMDC 位于 PHYCFGR 的 3、4、5 三个位,配置如下:
定义一个数组 array[],做如下的操作,设置上面的三个参数。 /* Set Subnet Mask as: 255.255.255.0 */ array[0]=255; array[1]=255; array[2]=255; array[3]=0; Write_Bytes(SUBR, array, 4);
/* Set W5500 IP as: 192.168.0.20 */ array[0]=192; array[1]=168; array[2]=0; array[3]=20; Write_Bytes(SIPR, array, 4);
/* Set MAC Address as: 0x48,0x53,0x00,0x57,0x55,0x00 */ array[0]=0x48; array[1]=0x53; array[2]=0x00; array[3]=0x57; array[4]=0x55; array[5]=0x00; Write_Bytes(SHAR, array, 6); MAC 地址要向 IEEE 申请取得,也可以自己定义。如果自己定义,MAC 地址的第一个字 节必须是偶数。

W5500模块用户手册

W5500模块用户手册

User ManualYIXIN_W5500模块用户手册全硬件TCP/IP协议以太网模块目录一、YIXIN_W5500以太网模块简介 (1)二、YIXIN_W5500模块排针功能表 (1)三、W5500芯片资源介绍 (2)四、电脑调试软件安装 (3)五、调式方法 (5)1.YIXIN_W5500模块接线方法 (5)2.W5500客户端模式测试 (5)3.W5500服务端模式测试 (12)4.W5500 UDP模式测试 (15)5.使用手机调试W5500模块 (19)一、YIXIN_W5500以太网模块简介YIXIN_W5500以太网模块是一款基于WIZnet W5500芯片的以太网模块,是一款性能出色、性价比高的以太网模块。

模块集成硬件化TCP/IP协议;内部具有32K字节存储器作为TX/RX缓存;支持10/100Mbps的网络传输速率;支持8个独立端口同时运行;同时模块还支持3.3V或者5V电源供电,当5V供电时还可以输出3.3V的电压,方便用户在不同的单片机系统中使用;模块与单片机系统的通讯方式是简单、方便的SPI总线通信。

W5500的具体性能参数请下文的“W5500芯片资料介绍”。

YIXIN_W5500以太网模块的实物图如图1.1所示:图1.1 YIXIN_W5500模块实物图二、YIXIN_W5500模块排针功能表表2.1 YIXIN_W5500模块排针功能说明注1:W5500的工作电压是3.3V,但I/O口可以承受5V电压。

注2:YIXIN_W5500模块有两种供电方式,即为3.3V供电或者5V供电,当使用5V供电时,“3.3V”引脚将会有3.3V的电压输出。

三、W5500芯片资源介绍W5500芯片是一款采用全硬件TCP/IP协议栈的嵌入式以太网控制器,它能使嵌入式系统通过SPI(串行外设接口)接口轻松地连接到网络。

W5500具有完整的TCP/IP协议栈和10/100Mbps以太网网络层(MAC)和物理层(PHY),因此W5500特别适合那些需要使用单片机来实现互联网功能的客户。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

W5500 DatasheetVersion 1.0.1http://www.wiznet.co.kr© Copyright 2013 WIZnet Co., Ltd. All rights reserved.W5500The W5500 chip is a Hardwired TCP/IP embedded Ethernet controller that provides easier Internet connection to embedded systems. W5500 enables users to have the Internet connectivity in their applications just by using the single chip in which TCP/IP stack, 10/100 Ethernet MAC and PHY embedded.WIZnet…s Hardwired TCP/IP is the market-proven technology that supports TCP, UDP, IPv4, ICMP, ARP, IGMP, and PPPoE protocols. W5500 embeds the 32Kbyte internal memory buffer for the Ethernet packet processing. If you use W5500, you can implement the Ethernet application just by adding the simple socket program. It‟s faster and easier way rather than using any other Embedded Ethernet solution. Users can use 8 independent hardware sockets simultaneously.SPI (Serial Peripheral Interface) is provided for easy integration with the external MCU. The W5500‟s SPI supports 80 MHz speed and new efficient SPI protocol for the high speed network communication. In order to reduce power consumption of the system, W5500 provides WOL (Wake on LAN) and power down mode.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-Supports High Speed Serial Peripheral Interface(SPI MODE 0, 3)-Internal 32Kbytes Memory for TX/RX Buffers-10BaseT/100BaseTX Ethernet PHY embedded-Supports Auto Negotiation (Full and half duplex, 10 and 100-based )-Not supports IP Fragmentation- 3.3V operation with 5V I/O signal tolerance-LED outputs (Full/Half duplex, Link, Speed, Active)-48 Pin LQFP Lead-Free Package (7x7mm, 0.5mm pitch)2 / 65W5500 Datasheet Version1.0.1 (Sept 2013)Target ApplicationsW5500 is suitable for the following embedded applications:-Home Network Devices: Set-T op Boxes, PVRs, Digital Media Adapters-Serial-to-Ethernet: Access Controls, LED displays, Wireless AP relays, etc.-Parallel-to-Ethernet: POS / Mini Printers, Copiers-USB-to-Ethernet: Storage Devices, Network Printers-GPIO-to-Ethernet: Home Network Sensors-Security Systems: DVRs, Network Cameras, Kiosks-Factory and Building Automations-Medical Monitoring Equipment-Embedded ServersW5500 Datasheet Version1.0.1 (Sept 2013) 3 / 65Block Diagram4 / 65W5500 Datasheet Version1.0.1 (Sept 2013)Table of Contents1Pin Assignment (7)1.1Pin Descriptions (7)2HOST Interface (12)2.1SPI Operation Mode (13)2.2SPI Frame (14)2.2.1Address Phase (14)2.2.2Control Phase (15)2.2.3Data Phase (17)2.3Variable Length Data Mode (VDM) (17)2.3.1Write Access in VDM (18)2.3.2Read Access in VDM (21)2.4Fixed Length Data Mode (FDM) (24)2.4.1Write Access in FDM (25)2.4.2Read Access in FDM (26)3Register and Memory Organization (27)3.1Common Register Block (29)3.2Socket Register Block (30)3.3Memory (31)4Register Descriptions (32)4.1Common Registers (32)4.2Socket Registers (44)5Electrical Specifications (59)5.1Absolute Maximum Ratings (59)5.2Absolute Maximum Ratings (Electrical Sensitivity) (59)5.3DC Characteristics (60)5.4POWER DISSIPATION (61)5.5AC Characteristics (61)5.5.1Reset Timing (61)5.5.2Wake up Time (61)5.5.3Crystal Characteristics (61)5.5.4SPI Timing (62)5.5.5Transformer Characteristics (63)5.5.6MDIX (63)6Package Descriptions (64)Document History Information (65)W5500 Datasheet Version1.0.1 (Sept 2013) 5 / 65Table of FiguresFigure 1. W5500 Pin Layout (7)Figure 2. External reference resistor (11)Figure 3. Crystal reference schematic (11)Figure 4. Variable Length Data Mode (SCSn controlled by the host) (12)Figure 5. Fixed Length Data Mode (SCSn is always connected by Ground) (12)Figure 6. SPI Mode 0 & 3 (13)Figure 7. SPI Frame Format (14)Figure 8. Write SPI Frame in VDM mode (18)Figure 9. SIMR Register Write in VDM Mode (19)Figure 10. 5 Byte Data Write at 1th Socket‟s TX Buffer Block 0x0040 in VDM mode.. 20 Figure 11. Read SPI Frame in VDM mode (21)Figure 12. S7_SR Read in VDM Mode (22)Figure 13. 5 Byte Data Read at Socket 3 RX Buffer Block 0x0100 in VDM mode (23)Figure 14. 1 Byte Data Write SPI Frame in FDM mode (25)Figure 15. 2 Bytes Data Write SPI Frame in FDM mode (25)Figure 16. 4 Bytes Data Write SPI Frame in FDM mode (25)Figure 17. 1 Byte Data Read SPI Frame in FDM mode (26)Figure 18. 2 Bytes Data Read SPI Frame in FDM mode (26)Figure 19. 4 Bytes Data Read SPI Frame in FDM mode (26)Figure 20. Register & Memory Organization (28)Figure 21. INTLEVEL Timing (34)Figure 22. Reset Timing (61)Figure 23. SPI Timing (62)Figure 24. Transformer Type (63)Figure 25. Package Dimensions (64)6 / 65W5500 Datasheet Version1.0.1 (Sept 2013)W5500 Datasheet Version1.0.1 (Sept 2013)7 / 65Pin Assignment1Figure 1. W5500 Pin Layout1.1 Pin DescriptionsTable 1. Pin Type NotationTXN TXP AGND AVDD RXN RXP DNC AVDD AGND EXRES1AVDD NC123456789101112363534333231302928272625W5500N CA G N DA V D DA G N DA V D DV B GA G N DT O C A PA V D D1V 2OR S V DS P D L E D MOSI MISO SCLK SCSn XO XI/CLKIN GND VDD ACTLED DUPLED LINKLEDINTn A G N DN CN CP M O D E 0P M O D E 1P M O D E 2R S V DR S V DR S V DR S V DR S V D R S T n 13141516171819202122232448474645444342414039383748LQFPTable 2. W5500 Pin Description1Internal Bias after hardware reset8 / 65W5500 Datasheet Version1.0.1 (Sept 2013)W5500 Datasheet Version1.0.1 (Sept 2013) 9 / 6510 / 65W5500 Datasheet Version1.0.1 (Sept 2013)The 12.4KΩ(1%) Resistor should be connected between EXRES1 pin and analog ground (AGND) as below.Figure 2. External reference resistorThe crystal reference schematic is shown as below.Figure 3. Crystal reference schematicW5500 Datasheet Version1.0.1 (Sept 2013) 11 / 652HOST InterfaceW5500 provides SPI (Serial Peripheral Interface) Bus Interface with 4 signals (SCSn,SCLK, MOSI, MISO) for external HOST interface, and operates as a SPI Slave.The W5500 SPI can be connected to MCU as shown in Figure 4 and Figure 5according to its operation mode (Variable Length Data / Fixed Length Data Mode)which will be explained in Chapter 2.3 and Chapter 2.4.In Figure 4, SPI Bus can be shared with other SPI Devices. Since the SPI Bus isdedicated to W5500, SPI Bus cannot be shared with other SPI Devices. It is shown inFigure 5.At the Variable Length Data mode (as shown in Figure 4), it is possible to share theSPI Bus with other SPI devices. However, at the Fixed Length Data mode (as shown inFigure 5), the SPI Bus is dedicated to W5500 and can‟t be shared with other devices.Figure 4. Variable Length Data Mode (SCSn controlled by the host)Figure 5. Fixed Length Data Mode (SCSn is always connected by Ground)The SPI protocol defines four modes for its operation (Mode 0, 1, 2, 3).Each modediffers according to the SCLK polarity and phase. The only difference between SPIMode 0 and SPI Mode 3 is the polarity of the SCLK signal at the inactive state.With SPI Mode 0 and 3, data is always latched in on the rising edge of SCLK andalways output on the falling edge of SCLK.W5500 Datasheet Version1.0.1 (Sept 2013)13 / 65The W5500 supports SPI Mode 0 and Mode 3. Both MOSI and MISO signals use transfer sequence from Most Significant Bit (MSB) to Least Significant Bit (LSB) when MOSI signal transmits and MISO signal receives. MOSI & MISO signals always transmit or receive in sequence from the Most Significant Bit (MSB) to Least Significant Bit (LSB).Figure 6. SPI Mode 0 & 32.1 SPI Operation ModeW5500 is controlled by SPI Frame (Refer to the Chapter 2.2 SPI Frame) which communicates with the External Host. W5500 SPI Frame consists 3 phases, Address Phase, Control Phase and Data Phase.Address Phase specifies 16 bits Offset Address for W5500 Register or TX/RX Memory. Control Phase specifies the block to which Offset (set by Address Phase) belongs, and specifies Read/Write Access Mode and SPI Operation Mode (Variable Length Data / Fixed Length Data Mode).And Data Phase specifies random length (N-bytes, 1 ≤ N) Data or 1 byte, 2 bytes and 4 bytes Data.If SPI Operation Mode is set as Variable Length Data Mode (VDM), SPI Bus Signal SCSn must be controlled by the External Host with SPI Frame step.At the Variable Length Data Mode, SCSn Control Start (Assert (High-to-Low)) informs W5500 of SPI Frame Start (Address Phase), and SCSn Control End (De-assert (Low-to-High) informs W5500 of SPI Frame End (Data Phase End of random N byte).SCLKMISO/MOSISamplingTogglingMode 3 : SCLK idle level highSCLK MISO/MOSI SamplingTogglingMode 0 : SCLK idle level low2.2 SPI FrameW5500 SPI Frame consists of 16bits Offset Address in Address Phase, 8bits Control Phase and N bytes Data Phase as shown in Figure 7.The 8bits Control Phase is reconfigured with Block Select bits (BSB[4:0]), Read/Write Access Mode bit (RWB) and SPI Operation Mode (OM[1:0]).Block Select bits select the block to which the Offset Address belongs.Figure 7. SPI Frame FormatW5500 supports Sequential Data Read/Write. It processes the data from the base (the Offset Address which is set for 2/4/N byte Sequential data processing) and the next data by increasing the Offset Address (auto increment addressing) by 1.2.2.1 Address PhaseThis Address Phase specifies the 16 bits Offset Address for the W5500 Registers and TX/RX Buffer Blocks.The 16-bit Offset Address value is transferred from MSB to LSB sequentially . The SPI frame with 2/4/N byte data phase supports the Sequential Data Read/Write in which Offset address automatically increases by 1 every 1 byte data.Select Bits ModeW2.2.2Control PhaseThe Control Phase specifies the Block to which the Offset Address (set by AddressPhase) belongs, the Read/Write Access Mode and the SPI Operation Mode.7 6 5 4 3 2 1 0W5500 Datasheet Version1.0.1 (Sept 2013) 15 / 652.2.3Data PhaseWith the Control Phase set by the SPI Operation Mode Bits OM[1:0], the Data Phaseis set by two types of length, one type is the N-Bytes length (VDM mode) and theother type is 1/2/4 Bytes (FDM mode).At this time, 1 byte data is transferred through MOSI or MISO signal from MSB toLSB sequentially.2.3Variable Length Data Mode (VDM)In VDM mode, the SPI Frame Data Phase Length is determined by SCSn Control ofthe External Host. That means that the Data Phase Length can have random value(Any length from 1 Byte to N Bytes) according to the SCSn Control.The OM[1:0] of the Control Phase should be …00‟ value in VDM mode.W5500 Datasheet Version1.0.1 (Sept 2013) 17 / 652.3.1Write Access in VDMFigure 8. Write SPI Frame in VDM modeFigure 8 shows the SPI Frame when the external host accesses W5500 for writing. In VDM mode, the RWB signal is …1‟ (Write), OM[1:0] is …00‟ in SPI Frame Control Phase.At this time the External Host assert (High-to-Low) SCSn signal before transmitting SPI Frame.Then the Host transmits SPI Frame ‟s all bits to W5500 through MOSI signal. All bits are synchronized with the falling edge of the SCLK.After finishing the SPI Frame transmit, the Host deasserts SCSn signal (Low-to-High).When SCSn is Low and the Data Phase continues, the Sequential Data Write can be supported.SCSnMOSI SCLK MOSI MISOSCSnSCLKW5500 Datasheet Version1.0.1 (Sept 2013)19 / 651 Byte WRITE Access ExampleWhen the Host writes Data 0xAA to …Socket Interrupt Mask Register (SIMR) of Common Register Block by using VDM mode, the data is written with the SPI Frame below.The External Host asserts (High-to-Low) SCSn before transmitting SPI Frame, then the Host transmits 1 bit with synchronizing the T oggle SCLK. The External Host de-asserts (Low-to-High) the SCSn at the end of SPI Frame transmit. (Refer to the Figure 9)Figure 9. SIMR Register Write in VDM ModeSCSnN-Bytes WRITE Access ExampleWhen the Host writes 5 Bytes Data (0x11, 0x22, 0x33, 0x44, 0x55) to Socket 1‟s TX Buffer Block 0x0040 Address by using VDM mode, 5 bytes data are written with the SPI Frame below.The N-Bytes Write Access is shown in Figure 10.The 5bytes of Data (0x11,0x22, 0x33, 0x44, 0x55) are written sequentially to Socket 1‟s Tx Buffer Block Address 0x0040 ~ 0x0044.The External Host asserts (High-to-Low) SCSn before transmitting SPI Frame. The External Host de-asserts (Low-to-High) the SCSn at the end of SPI Frame transmit.Figure 10. 5 Byte Data Write at 1th Socket ‟s TX Buffer Block 0x0040 in VDM modeSCSnSCSnW5500 Datasheet Version1.0.1 (Sept 2013)21 / 652.3.2Read Access in VDMFigure 11. Read SPI Frame in VDM modeFigure 11 shows the SPI Frame when external host accesses W5500 for reading In VDM mode, the RWB signal is …0‟ (Write), OM[1:0] is …00‟ in SPI Frame Control Phase.At this time the External Host assert (High-to-Low) SCSn signal before transmitting SPI Frame.Then the Host transmits Address and Control Phase all bits to W5500 through MOSI signal. All bits are synchronized with the falling edge of the SCLK.Then the Host receives all bits of Data Phase with synchronizing the rising edge of Sampling SCLK through MISO signal.After finishing the Data Phase receive, the Host deasserts SCSn signal (Low-to-High).When SCSn is Low and the Data Phase continues to receive, the Sequential Data Read can be supported.MOSI MISOSCSnSCLKSCSnMOSI MISOSCLK1 Byte READ Access ExampleWhen the Host reads the …Socket Status Register(S7_SR) of the Socket 7‟s Register Block by using VDM mode, the data is read with the SPI Frame below. Let ‟s S7_SR to …SOCK_ESTABLISHED (0x17)‟.The External Host asserts (High-to-Low) SCSn signal before transmitting SPI Frame, then the Host transmits Address and Control Phase to W5500 through the MOSI signal. Then the Host receives Data Phase from the MISO signal.After finishing the Data Phase receives, the Host deasserts SCSn signal (Low-to-High). (Refer to the Figure 12.)Figure 12. S7_SR Read in VDM ModeSCSnW5500 Datasheet Version1.0.1 (Sept 2013)23 / 65N-Bytes Read Access ExampleWhen the Host reads 5 Bytes Data (0xAA, 0xBB, 0xCC, 0xDD, 0xEE) from the Socket 3‟s RX Buffer Block 0x0100 Address by using VDM mode, 5 bytes data are read with the SPI Frame as below.The N-Bytes Read Access is shown in Figure 13.The 5 bytes of Data (0xAA, 0xBB, 0xCC, 0xDD, 0xEE) are read sequentially from the Socket 3‟s Rx Buffer Block Address 0x0100 ~ 0x0104.The External Host asserts (High-to-Low) SCSn before transmitting SPI Frame. The External Host de-asserts (Low-to-High) the SCSn at the end of the SPI Frame Data Phase.Figure 13. 5 Byte Data Read at Socket 3 RX Buffer Block 0x0100 in VDM modeSCSnSCSn2.4Fixed Length Data Mode (FDM)The FDM mode can be used when the External Host cannot control SCSn signal.The SCSn signal should be tied to Low (Always connected to GND) and it is notpossible to share the SPI Bus with other SPI Devices. (Refer to the Figure 5.)In VDM mode, Data Phase length is controlled by SCSn control.But in FDM mode, Data Phase length is controlled by OM[1:0] value (…01‟ / …10‟ / …11‟)which is the SPI Operation Mode Bits of the Control Phase.As the SPI Frame of FDM mode is the same as SPI Frame of VDM mode (1Byte, 2Bytes, 4 Bytes SPI Frame) except for the SCSn signal control and OM[1:0] setting, thedetail about FDM mode is not described in this section.It is not recommended to use the FDM mode unless you are in inevitable status. Inaddition, we use only 1/2/4 Bytes SPI Frame, as described in …Chapter 2.4.1‟&…Chapter 2.4.2‟. Using SPI Frame with other length of Data will cause malfunction ofW5500.2.4.1Write Access in FDM1 Bytes WRITE AccessFigure 14. 1 Byte Data Write SPI Frame in FDM mode2 Bytes WRITE AccessFigure 15. 2 Bytes Data Write SPI Frame in FDM mode4 Bytes WRITE AccessFigure 16. 4 Bytes Data Write SPI Frame in FDM modeW5500 Datasheet Version1.0.1 (Sept 2013) 25 / 652.4.2Read Access in FDM1 Byte READ AccessFigure 17. 1 Byte Data Read SPI Frame in FDM mode2 Bytes READ AccessFigure 18. 2 Bytes Data Read SPI Frame in FDM mode4 Bytes READ AccessFigure 19. 4 Bytes Data Read SPI Frame in FDM mode3Register and Memory OrganizationW5500 has one Common Register Block, eight Socket Register Blocks, and TX/RXBuffer Blocks allocated to each Socket. Each block is selected by the BSB[4:0](BlockSelect Bit) of SPI Frame. Figure 20 shows the selected block by the BSB[4:0] and theavailable offset address range of Socket TX/RX Buffer Blocks. Each Socket‟s TX BufferBlock exists in one 16KB TX memory physically and is initially allocated with 2KB.Also, Each Socket‟s RX Buffer Block exists in one 16KB RX Memory physically and isinitially allocated with 2KB.Regardless of the allocated size of each Socket TX/RX Buffer, it can be accessiblewithin the 16 bits offset address range (From 0x0000 to 0xFFFF).Refer to …Chapter 3.3‟ for more information about 16KB TX/RX Memoryorganization and access method.W5500 Datasheet Version1.0.1 (Sept 2013) 27 / 65Figure 20. Register & Memory OrganizationBlock Select BitsBlocksPhysical 16KB RX Memory16bit Offset AddressValid Range11111 (0x1F)11110 (0x1E)11101 (0x1E)11100 (0x1C)11011 (0x1B)11010 (0x1A)11001 (0x19)11000 (0x18)10111 (0x17)10110 (0x16)10101 (0x15)10011 (0x13)10010 (0x12)10001 (0x11)01000 (0x10)01111 (0x0F)01110 (0x0E)01101 (0x0D)01100 (0x0C)01011 (0x0B)01010 (0x0A)01001 (0x09)01000 (0x08)00111 (0x07)00110 (0x06)00101 (0x05)00011 (0x03)00010 (0x02)00001 (0x01)00000 (0x00)00100 (0x04)10100 (0x14)0x00000x3FFFSocket 0TX Bufer (2KB)Socket 1TX Buffer (2KB)Socket 2TX Buffer (2KB)Socket 3TX Buffer (2KB)Socket 4TX Buffer (2KB)Socket 5TX Buffer (2KB)Socket 6TX Buffer (2KB)Socket 7TX Buffer (2KB)0x0000Socket 0RX Buffer (2KB)Socket 1RX Buffer (2KB)Socket 2RX Buffer (2KB)Socket 3RX Buffer (2KB)Socket 4RX Buffer (2KB)Socket 5RX Buffer (2KB)Socket 6RX Buffer (2KB)Socket 7 RX Buffer (2KB)Physical 16KB TX Memory3.1Common Register BlockCommon Register Block configures the general information of W5500 such as IP andMAC address. This block can be selected by the BSB[4:0] value of SPI Frame. <T able3> defines the offset address of registers in this block. Refer to …Chapter 4.1‟formore details about each register.Table 3. Offset Address for Common RegisterW5500 Datasheet Version1.0.1 (Sept 2013) 29 / 653.2Socket Register BlockW5500 supports 8 Sockets for communication channel. Each Socket is controlled by Socket nRegister Block(when 0≤n≤7). The n value of Socket n Register can be selected by BSB[4:0] ofSPI Frame. <Table 4> defines the 16bits Offset Address of registers in Socket n Register Block.Refer to …Chapter 4.2‟ for more details about each register.Table 4. Offset Address in Socket n Register Block (0≤n≤7)3.3MemoryW5500 has one 16KB TX memory for Socket n TX Buffer Blocks and one 16KB RXmemory 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)‟.Once all Sn_TXBUF_SIZE registers have been configured, Socket TX Buffer is allocatedwith the configured size of 16KB TX Memory and is assigned sequentially from Socket0 to Socket 7. Its physical memory address is automatically determined in 16KB TXmemory. Therefore, the total sum of Sn_TXBUF_SIZE should be not exceed 16 in caseof error in data transmission.The 16KB RX memory allocation method is the same as the 16KB TX memoryallocation method. 16KB RX memory is initially allocated into 2KB size for eachSocket RX Buffer Block (2KB X 8 = 16KB). The initial allocated 2KB size of Socket n RXBuffer 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 isallocated with the configured size in 16KB RX Memory and is assigned sequentiallyfrom Socket 0 to Socket 7. The physical memory address of the Socket RX Buffer isautomatically determined in 16KB RX memory. Therefore, the total sum ofSn_RXBUF_SIZE should not exceed 16, data reception error will occur if exceeded.For 16KB TX/RX memory allocation, refer to Sn_TXBUF_SIZE & Sn_RXBUF_SIZE in…Chapter 4.2‟.The Socket n TX Buffer Block allocated in 16KB TX memory is buffer for saving datato be transmitted by host. The 16bits Offset Address of Socket n TX Buffer Block has64KB address space ranged from 0x0000 to 0xFFFF, and it is configured withreference to …Socket n TX Write Pointer Register (Sn_TX_WR)‟ & …Socket n TX ReadPointer Register(Sn_RX_RD)‟. However, the 16bits Offset Address automaticallyconverts into the physical address to be accessible in 16KB TX memory such as Figure20. Refer to …Chapter 4.2‟ for Sn_TX_WR & Sn_TX_RD.The Socket n RX Buffer Block allocated in 16KB RX memory is buffer for saving thereceived data through the Ethernet. The 16bits Offset Address of Socket n RX BufferBlock has 64KB address space ranged from 0x0000 to 0xFFFF, and it is configured withreference to …Socket n RX RD Pointer Register (Sn_RX_RD)‟& …Socket n RX WritePointer Register (Sn_RX_WR)‟. However, the 16bits Offset Address automaticallyconverts into the physical address to be accessible in 16KB RX memory such as Figure20. Refer to …Chapter 4.2‟ for Sn_RX_RD & Sn_RX_WR.4Register Descriptions4.1Common RegistersMR (Mode Register) [R/W] [0x0000] [0x00]2MR is used for S/W reset, ping block mode and PPPoE mode.7 6 5 4 3 2 1 02Register Notation : [Read/Write] [Address] [Reset value]GAR (Gateway IP Address Register) [R/W] [0x0001 – 0x0004] [0x00]GAR configures the default gateway address.Ex)In case of “192.168.0.1”0x0001 0x0002 0x0003 0x0004SUBR (Subnet Mask Register) [R/W] [0x0005 – 0x0008] [0x00]SUBR configures the subnet mask address.Ex)In case of “255.255.255.0”0x0005 0x0006 0x0007 0x0008SHAR (Source Hardware Address Register) [R/W] [0x0009 – 0x000E] [0x00] SHAR configures the source hardware address.Ex)In case of “00.08.DC.01.02.03”0x0009 0x000A 0x000B 0x000C 0x000D 0x000ESIPR (Source IP Address Register) [R/W] [0x000F – 0x0012] [0x00]SIPR configures the source IP address.Ex)In case of “192.168.0.2”0x000F 0x0010 0x0011 0x0012INTLEVEL (Interrupt Low Level Timer Register) [R/W] [0x0013 – 0x0014] [0x0000]INTLEVEL configures the Interrupt Assert Wait Time (I AWT ). When the next interrupt occurs, Interrupt PIN (INTn ) will assert to low after INTLEVEL time.Figure 21. INTLEVEL Timinga. When Timeout Interrupt of Socket 0 is occurred, S0_IR[3] & SIR[0] bit set as …1‟ and then INTn PIN is asserted to low.b. When the connection interrupt of Socket 1 is occurred before the previous interrupt processing is not completed, S1_IR[0] & SIR[1] bits set as …1‟ and INTn PIN is still low.c. If the host processed the previous interrupt completely by clearing the S0_IR[3] bit, INTn PIN is de-asserted to high but S1_IR[0] & SIR[1] is still set as …1‟.d. Although S1_IR[0] & SIR[1] bit is set as …1‟, the INTn can‟t be asserted to low during INTLEVEL time. After the INTLEVEL time expires, the INTn will be asserted to low.PLL_CLKSIR S0_IR S1_IRINTnIR (Interrupt Register) [R/W] [0x0015] [0x00]IR indicates the interrupt status. Each bit of IR can be cleared when the host writes …1‟ value to each bit. If IR is not equal to …0x00‟, INTn PIN is asserted low until it is …0x00‟.7 6 5 4 3 2 1 0IMR (Interrupt Mask Register) [R/W][0x0016][0x00]IMR is used to mask interrupts. Each bit of IMR corresponds to each bit of IR. Whena 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‟.7 6 5 4 3 2 1 0SIR (Socket Interrupt Register) [R/W] [0x0017] [0x00]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 6 5 4 3 2 1 0SIMR (Socket Interrupt Mask Register) [R/W] [0x0018] [0x00]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 6 5 4 3 2 1 0RTR (Retry Time-value Register) [R/W] [0x0019 – 0x001A] [0x07D0]RTR configures the retransmission timeout period. The unit of timeout period is 100us 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, W5500 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, W5500 retransmits the packet or issues timeout.Ex) When timeout-period is set as 400ms, RTR = (400ms / 1ms) X 10 = 4000(0x0FA0)0x0019 0x001ARCR (Retry Count Register) [R/W] [0x001B] [0x08]RCR configures the number of time of retransmission. When retransmission occurs as many as …RCR+1‟, Timeout interrupt is issued (Sn_IR[TIMEOUT] = …1‟).Ex) RCR = 0x00070x001BThe timeout of W5500 can be configurable with RTR and RCR. W5500 has two kind timeout such as Address Resolution Protocol (ARP) and TCP retransmission.At the ARP (Refer to RFC 826, /rfc.html) retransmission timeout, W5500 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 (ARP TO) of ARP-request is as below.At the TCP packet retransmission timeout, W5500 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 andthe TCP pac ket 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),ARP TO = 2000 X 0.1ms X 9 = 1800ms = 1.8sTCP TO = (0x07D0+0x0FA0+0x1F40+0x3E80+0x7D00+0xFA00+0xFA00+0xFA00+0xFA00) X 0.1ms = (2000 + 4000 + 8000 + 16000 + 32000 + ((8 - 4) X 64000)) X 0.1ms= 318000 X 0.1ms = 31.8sPTIMER (PPP Link Control Protocol Request Timer Register) [R/W] [0x001C] [0x0028] PTIMER 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 secondsPMAGIC (PPP Link Control Protocol Magic number Register) [R/W] [0x001D] [0x00] PMAGIC configures the 4bytes magic number to be used in LCP echo request.Ex) PMAGIC = 0x010x001DLCP Magic number = 0x01010101。

相关文档
最新文档