Description, the porting routines for me follow this tutorial for porting the routines that the test passed. The project template is a w5500 template that I often use, which can be directly added to the file program.
1. Copy the W5500 folder and all the. c files in the driver folder to the project/source folder and overwrite the original file, deleting the W5200 folder
2. Copy the W5500 folder and all the. h header files in the Driver/include folder to the Project/include folder and overwrite the original file, delete the W5200 folder
3. Open the original project file, delete the project directory/w5200 under md5,socket,spi2,w5200 Four files, in this directory, add the corresponding four files in the newly copied source/w5500. Delete the project directory under the Util file, add the source in this directory at24c16.c, device.c, mcu_init.c, SOCKETUTIL.C, util.c files, other DHCP and DNS files to add yourself if necessary.
4. Open the Main.c file in the IAR environment, use the Edit->find and replace->replace in the work bar (above the IAR) for character replacement, replace w5200 with w5500 First, click Replace All to Replace the W5200 with the W5500. If there are references in other files to the original w5200.h, please find the replacement yourself, here is just an example.
5. Open the Main.c file, if the original file has a definition of Mac, gateway, IP, subnet address, you can delete, in the new driver device.c in the Set_default function to focus on the definition, the previous can be deleted.
6. Open the Main.c file and delete the previously defined Gpio, NVIC, and RCC configuration functions, which have been centrally defined in the new driver mcu_init.c and can be referenced directly.
7. In the main () function, add Systick_iinit (72), function, the new driver delay using Systick timing, here to do the initialization configuration, or delay related functions can not be used.
8. In main.c, call the Set_default () function in the function wiz_config (), and define the information such as W5500 's IP.
9. In the original w5200 drive, the Send () function has one more parameter than the current driver, so the last parameter is removed where the program calls the Send function.
10. This drive is completed, please rebuild project, if there are errors, will not be the underlying problem, please make the corresponding declaration according to the program to modify it.
Full hardware Ethernet interface Chip W5500, for more information please contact "Xinhua Dragon Electronics" or login official website!
W5200 porting W5500 Driver Tutorial