Wiznet W5300 Porting Manual

Linux driver porting guide
Hide thumbs Also See for W5300:

Advertisement

Quick Links

W5300 Linux Driver Porting Guide
(Version 1.0)
©2009 WIZnet Co., Ltd. All Rights Reserved.
☞ For more information, visit our website at
http://www.wiznet.co.kr
WIZnet's Online Techical Support
If you have any question or recommendation about our products, please write down

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the W5300 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Wiznet W5300

  • Page 1 W5300 Linux Driver Porting Guide (Version 1.0) ©2009 WIZnet Co., Ltd. All Rights Reserved. ☞ For more information, visit our website at http://www.wiznet.co.kr WIZnet’s Online Techical Support If you have any question or recommendation about our products, please write down...
  • Page 2 Q&A Board in WIZnet website(www.wiznet.co.kr). WIZnet’s engineer will give you answer as soon as possible. Copyright © WIZnet All Rights Reserved W5300 Linux Driver Porting Guide | 2 page...
  • Page 3 COPYRIGHT NOTICE Copyright 2009 WIZnet Co., Ltd. All Rights Reserved. Technical Support: support@wiznet.co.kr Sales & Distribution: sales@wiznet.co.kr For more information, visit our website at http://www.wiznet.co.kr Copyright © WIZnet All Rights Reserved W5300 Linux Driver Porting Guide | 3 page...
  • Page 4 Document History Information Version Date Descriptions Ver. 1.0.0 First Release Copyright © WIZnet All Rights Reserved W5300 Linux Driver Porting Guide | 4 page...
  • Page 5: Table Of Contents

    EQUEST CONFIGURATION 3.4..................11 AC ADDRESS 3.5................12 OCKET BUFFER 3.6............... 12 THER LINUX KERNEL VERSION QUICK START – LOOPBACK PROGRAM ............. 13 Copyright © WIZnet All Rights Reserved W5300 Linux Driver Porting Guide | 5 page...
  • Page 6: Introduction

    In this guide, the examples of system settings are based on W5300E01-ARM board. 2. System configuration If the circuit settings of W5300 are right, the MCU setting must be changed according to its hardware. The circuit settings can refer to the document ‘6. External Interface’ of ‘High- performance Internet Connectivity Solution-W5300’.
  • Page 7: Bus Width Configuration

    Please set the Bus access timing which access from MCU to W5300. The /CS low time of access timing in W5300 has been set to 65ns when read timing and it has been set to 50ns when write timing. (Refer to the ‘High-performance Internet Connectivity Solution –...
  • Page 8 DATA Hold Time after /RD and /CS high 7 ns tDATAhe DATA Hold Extension Time after /CS high 2XPLL_CLK < Fig 3. W5300 READ Timing > Copyright © WIZnet All Rights Reserved W5300 Linux Driver Porting Guide | 8 page...
  • Page 9 65ns, the data is broken. However the access cycle time sets too long, it comes to be the low data access speed of W5300. So we must set the access cycle time to a little longer than 65ns but the closest time to 65ns.
  • Page 10: Base Address Configuration - Mapping

    If the system setting is completed in bootloader and Linux kernel, we should do the Linux driver porting of W5300. The compiling of Linux driver needs Linux kernel code in your system. This section serves modification of Linux driver code.
  • Page 11: Makefile

    = IRQ_EINT0; 3.4. Mac address In the Linux, it is possible that MAC address of W5300 can active change to ‘ifconfig’ utility. Basically the MAC address is in the ‘w5300.c’ file. /* FIXME: Setting basic MAC address / It should be set according to the system. */ const u8 w5300_defmac[MAX_SOCK_NUM] = {0x00, 0x08, 0xDC, 0xA0, 0x00, 0x01};...
  • Page 12: Socket Rx/Tx Buffer

    3.5. Socket Rx/TX buffer The W5300 has 8 channels from 0 to 7. The channel 0 operates as MAC RAW mode and supports the operation of conventional MAC chip. And other channels 1~7 support hardware TCP/IP stack. The W5300 can set the Rx/Tx buffer size of each channel respectively. The total buffer size is 128 Kbyte.
  • Page 13: Quick Start - Loopback Program

    *dev, int *budget); 4. Quick start – Loopback program In the hybrid mode of W5300, we can use H/W TCP/IP stack of WIZnet supporting same performance of conventional network chip simultaneously. In the hybrid mode, the channel 0 conducts as MAC_RAW mode.
  • Page 14 #include <sys/socket.h> #include <arpa/inet.h> unsigned char data_buf[4096]; #ifndef PF_WIZNET #define PF_WIZNET PF_BLUETOOTH #endif int main(int argc, const char *argv[]) int sd, fd, addr_len, ret; struct sockaddr_in sock_in; Copyright © WIZnet All Rights Reserved W5300 Linux Driver Porting Guide | 14 page...
  • Page 15 = recv(fd, data_buf, 4096, 0); if(ret < 0) break; ret = send(fd, data_buf, ret, 0); if(ret < 0) break; close(fd); // close socket return 0; Copyright © WIZnet All Rights Reserved W5300 Linux Driver Porting Guide | 15 page...

Table of Contents