STM32 W5500 UDP
This blog introduce how to use W5500 to setup UDP socket.
7
Project description
STM32F103RC 驱动W5500,使用UDP Client主动向指定IP和端口发数据测试。 1、首先保证STM32驱动驱动W5500入网可ping通,查看文章《STM32F103RC驱动W5500入网,并可ping通》 2、设置W5500发送和接收的缓冲区大小 3、创建UDP套接字,并发送数据 测试的主函数如下: #ifndef __STM32F10X_H #define __STM32F10X_H #include "stm32f10x.h" #endif #ifndef __Z_UTIL_TIME_H #define __Z_UTIL_TIME_H #include "z_util_time.h" #endif #ifndef __Z_HARDWARE_LED_H #define __Z_HARDWARE_LED_H #include "z_hardware_led.h" #endif #ifndef __Z_HARDWARE_SPI_H #define __Z_HARDWARE_SPI_H #include "z_hardware_spi.h" #endif #include "w5500.h" #include "socket.h" #include "w5500_conf.h" uint8 buffer[128]; int main(void) { uint8…
Keep reading with a free account
Guests can read 15 projects per visit. Log in or create a free account to read the full description, open the documents and join the comments.