Code Monkey home page Code Monkey logo

w7500x_stdperiph_lib's Introduction

W7500x_StdPeriph_Lib

The W7500x Standard Peripherals Library is a complete package, consisting of device drivers for all of the standard device peripherals, for W7500x devices 32-bit Flash microcontrollers.

This library is a firmware package which contains a collection of routines, data structures and macros covering the features of W7500x peripherals. It includes a description of the device drivers plus a set of examples for each peripheral. The firmware library allows any device to be used in the user application without the need for in-depth study of each peripheral’s specifications.

Using the Standard Peripherals Library has two advantages: it saves significant time that would otherwise be spent in coding, while simultaneously reducing application development and integration costs.

The W7500x Standard Peripherals Library is full CMSIS compliant.

Supported devices and toolchains

Supported W7500x devices

The Standard Peripherals Library supports W7500 and W7500P devices.

Supported toolchains

The Standard Peripherals Library supports the following toolchains:

  • MDK-ARM
  • GNU MCU Eclipse

For the GNU MCU Eclipse development environment, see the https://github.com/Wiznet/W7500x_StdPeriph_Lib/wiki page.

How to use the Library

Create a project

Create a project on your toolchain(or use the template project provided within the Library, under Project\W7500x_StdPeriph_Templates)

Configure w7500x.h

The Library entry point is w7500x.h (under Libraries\CMSIS\Device\WIZnet\W7500\Include), user has to include it in the application main and configure it:

  • Select the target product to be used, comment/uncomment the right define:
    /* Uncomment the line below according to the target W7500x device used in your
     application
     */
    #if !defined (W7500) && !defined (W7500P)
    #define W7500
    //#define W7500P
    #endif
    
  • Select the target system clock source to be used, comment/uncomment the right define:
    /**
     * @brief In the following line adjust the value of External oscillator clock (8MHz ~ 24MHz)
     used in your application
    
     Tip: If you want to use the Internal 8MHz RC oscillator clock, uncomment the line below.
     */
    //#define OCLK_VALUE 12000000UL
    
  • Change the PLL value to be used.
    /**
     * @brief In the following line adjust the value of PLL
     */
    #define PLL_VALUE 1
    

Add the system_w7500x.c

Add the system_w7500x.c (under Libraries\CMSIS\Device\WIZnet\W7500\Source) file in your application, this file provide functions to setup the W7500x system.

How to use the Examples

Copy and Paste

Copy all source files from under Projects\W7500x_StdPeriph_Examples\xxx\xxx folder to the under src folder.

Configure main.h

  • Select the target board to be used, comment/uncomment the right define:
    /* Uncomment the line below according to the target EVB board of W7500x used in
     your application
     */
    #if !defined (USE_WIZWIKI_W7500_EVAL) && !defined (USE_WIZWIKI_W7500P_EVAL) && !defined (USE_WIZWIKI_W7500_ECO_EVAL)
    #define USE_WIZWIKI_W7500_EVAL
    //#define USE_WIZWIKI_W7500P_EVAL
    //#define USE_WIZWIKI_W7500_ECO_EVAL
    //#define USE_MY_EVAL
    #if defined (USE_WIZWIKI_W7500_EVAL)
    #define USING_UART1
    #else
    #define USING_UART2
    #endif
    #endif
    

Revision History

v1.0.0

  • First release

v1.0.1 (Release soon)

  • Add i2c example using GPIO
  • Fix some bugs for GPIO function
  • Update GPIO Interrupt examples

w7500x_stdperiph_lib's People

Contributors

bjnhur avatar irinakim12 avatar javakys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

w7500x_stdperiph_lib's Issues

WZTOE_WebServer Link Off

Hi,
I'm trying the WZTOE_WebServer example on W7500P with eclipse gcc 4.8q1 on a linux host.

When running the code I get this:

W7500x Standard Peripheral Library version : 1.0.0
SourceClock : 8000000
SystemClock : 8000000
PHY Init : Success
Link : Off
MAC: 00:08:DC:01:02:03
IP: 0.0.0.0
GW: 0.0.0.0
SN: 0.0.0.0
DNS: 0.0.0.0
Start DHCP

Link is Off and DHCP never happens.
Why is the link off and how can I fix this so that DHCP works?

Thanks!

Receive multicast UDP message

Hi,
I'm trying to receive a multicast packet, send to ip 235.255.255.250 on port 1900

This is my relevant code:

socket(sn, Sn_MR_UDP, port, SF_MULTI_ENABLE )
while(1)
{
    if ((size = getSn_RX_RSR(sn)) > 0) {
        uint8_t ip[4];
        uint16_t port;
        if (size > DATA_BUF_SIZE) size = DATA_BUF_SIZE;
        ret = recvfrom(sn, buf, size, ip, &port);
        printf("> Receive DNS message from %d.%d.%d.%d(%d). len = %d\r\n", ip[0], ip[1], ip[2], ip[3],port,size);
        if (ret <= 0) return ret;
        buf[size] = "\0";
        printf("%s", buf);
    }
}

But I only receive messages directly send to the IP of the device. So no messages send to 235.255.255.250 are received.

Any ideas?
Thanks!

I2C support

Is I2C supported in the library? Which library should I use and is an example available?
Thanks!

UDP message

Hi,
I'm trying to send an UDP message. I cannot find an example, so I figured out the following code:

    #define SOCK_SSDP 7

    uint8_t dest[4] = { 239, 255, 255, 250 };
    #define MDNS_PORT (1900)

    char result[10];
    snprintf(result, sizeof(result),
            "message"
    );

    uint8_t err = 0;
    if(socket(SOCK_SSDP, Sn_MR_UDP, MDNS_PORT, 0x00) != SOCK_SSDP) return;
    printf("sendto: %i", sendto(SOCK_SSDP, (uint8_t*)result, strlen(result), dest, MDNS_PORT));
    close(SOCK_SSDP);

The console prints a positive number (so the total size of the message), but I cannot see this message in wireshark. Am I missing something?

socket number check is not working

#define CHECK_SOCKNUM()   \
    do{                    \
        if(sn > _WIZCHIP_SOCK_NUM_) return SOCKERR_SOCKNUM;   \
    }while(0);             \

I think you want this : > and >= off by one error

#define CHECK_SOCKNUM()   \
    do{                    \
        if(sn >= _WIZCHIP_SOCK_NUM_) return SOCKERR_SOCKNUM;   \
    }while(0);             \

want to use DMA

I am currently developing a UART data forwarding application using TCP protocol to transmit data to a PC. The UART data rate can go up to 921600, so I need to utilize DMA functionality to ensure accurate data reception. However, I have been unable to find specific information on this. I would like to ask if it is possible to provide additional APIs related to DMA here?

need to fix the bug in GPIO_WriteBit()

Need to fix GPIO_WriteBit() function in
W7500x_StdPeriph_Lib/Libraries/W7500x_StdPeriph_Driver/src/w7500x_gpio.c

please refer to GPIO_ResetBits function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.