Transplant procedure from W5200 to W5500

details

This document is showing how you transplant your W5500 driver into a W5200 reference source code.

  •  Download all the W5500 diver related codes and copied the .c files to W5200’s samples codes code “source” folder. Replace those W5200 diver codes into W5500 diver codes.

figure-1_W5500-transplant

 

  • Copied W5500 .h header files from the diver folder for replacing the codes on W5200’s samples codes code “include” folder. Please replace those files.

figure-2_W5500-transplant

 

  • Open project program by IAR then deleted the files in the directory of W5200 (md5, socket, SPI2, W5200). After that, please add back the relative files of W5500 for replacing those deleted files.

Deleted the whole directory of util and added the W5500’s code files to “source” folder.  The files names are “at25c16c, device.c, mcu_init.c, socketutil.c, util.c”.If you required to add some other function like dhcp or dns, please refer other reference source code and added to this one.

figure-3_W5500-transplant

  • Open main.c, you are required to replace the names of this code to W5500. Therefore please go to Edit->Find and Replace->Replace to replace the key word of W5200 to W5500.

If the data are collecting from other some header file or code file, please confirm the name of the file is correct.

figure-4_W5500-transplant

 

  • In this main.c file, search the definition of the mac, gateway, ip and subnet mask addresses then delete it. In this new W5500 device.c file, please find the function called Set_default. If you found there are some previous settings, you could make your changes or deleted it.
  • As the new added file mcu_init.c has added into this source code, please remove the functions or definition for setting the GPIO, NVIC, RCC settings for preventing and repeating settings.
  • In the main function of main.c, please add “Systick_linit(72);” function. This function is to activate the systick to count time. If not, the delay function cannot be activating.

figure-5_W5500-transplant

  • After that, please called the “Set_default();” function in WIZ_Config function. Therefore it could make the definition for each ip related settings for this module. Please refer to the following figure.

figure-6_W5500-transplant

  • From the orginal W5200 functions, send() function are normally required an extra parameter to run this function. However, after transplant to W5500, it will be removed. Therefore please remove the extra parameter that located in this function.
  • After the above changes have been done, please press “rebuild” to proceed the coding.

W5500 Diver code link: http://wizwiki.net/wiki/doku.php?id=products:w5500:driver

W5200 Sample source code link: http://www.wiznet.co.kr/sub_modules/en/product/product_detail.asp?Refid=634&page=1&cate1=5&cate2=7&cate3=56&pid=1144&cType=2

By WIZnet BJ office

This document is showing how you transplant your W5500 driver into a W5200 reference source code.

  •  Download all the W5500 diver related codes and copied the .c files to W5200’s samples codes code “source” folder. Replace those W5200 diver codes into W5500 diver codes.

figure-1_W5500-transplant

 

  • Copied W5500 .h header files from the diver folder for replacing the codes on W5200’s samples codes code “include” folder. Please replace those files.

figure-2_W5500-transplant

 

  • Open project program by IAR then deleted the files in the directory of W5200 (md5, socket, SPI2, W5200). After that, please add back the relative files of W5500 for replacing those deleted files.

Deleted the whole directory of util and added the W5500’s code files to “source” folder.  The files names are “at25c16c, device.c, mcu_init.c, socketutil.c, util.c”.If you required to add some other function like dhcp or dns, please refer other reference source code and added to this one.

figure-3_W5500-transplant

  • Open main.c, you are required to replace the names of this code to W5500. Therefore please go to Edit->Find and Replace->Replace to replace the key word of W5200 to W5500.

If the data are collecting from other some header file or code file, please confirm the name of the file is correct.

figure-4_W5500-transplant

 

  • In this main.c file, search the definition of the mac, gateway, ip and subnet mask addresses then delete it. In this new W5500 device.c file, please find the function called Set_default. If you found there are some previous settings, you could make your changes or deleted it.
  • As the new added file mcu_init.c has added into this source code, please remove the functions or definition for setting the GPIO, NVIC, RCC settings for preventing and repeating settings.
  • In the main function of main.c, please add “Systick_linit(72);” function. This function is to activate the systick to count time. If not, the delay function cannot be activating.

figure-5_W5500-transplant

  • After that, please called the “Set_default();” function in WIZ_Config function. Therefore it could make the definition for each ip related settings for this module. Please refer to the following figure.

figure-6_W5500-transplant

  • From the orginal W5200 functions, send() function are normally required an extra parameter to run this function. However, after transplant to W5500, it will be removed. Therefore please remove the extra parameter that located in this function.
  • After the above changes have been done, please press “rebuild” to proceed the coding.

W5500 Diver code link: http://wizwiki.net/wiki/doku.php?id=products:w5500:driver

W5200 Sample source code link: http://www.wiznet.co.kr/sub_modules/en/product/product_detail.asp?Refid=634&page=1&cate1=5&cate2=7&cate3=56&pid=1144&cType=2

By WIZnet BJ office

COMMENTS

Please Login to comment
  Subscribe  
Notify of