首页|基于STM32的硬件协议NTP网络时钟系统实现

基于STM32的硬件协议NTP网络时钟系统实现

扫码查看
为解决在操作系统环境下传输及提取NTP 信息方法复杂度高、设备冗余的问题,联合STM32F103C8T6 微控制器和W5500 芯片实现了一种硬件协议的NTP网络时钟系统.使用STM32 微控制器通过SPI通信方式配置W5500 芯片,实现硬件TCP和UDP协议.工作状态控制信息保存到STM32 的FLASH存储器中,实现了断电保护功能.系统上电运行,自动读取配置信息,在硬件UDP协议中解析NTP数据,得到NTP时间信息,经过转换和计算后,成为时间基准信号,去同步STM32 芯片中设计的本地时钟.经过反复测试得到,时钟系统的误差小于 50 ms,工作稳定可靠.它适合网络中无计算机操作系统的设备进行时间同步.
Implementation of NTP Network Clock System with Hardware Protocol Based on STM32
To address the issues of high complexity and device redundancy in transmitting and extracting NTP information on operating system platforms,the STM32F103C8T6 microcontroller and the chip of W5500 are combined to implement a kind of NTP network clock system based on hardware protocol.STM32 microcontroller is used to configure the W5500 chip and implement hardware TCP and UDP protocols.The control information is saved to the FLASH memory of STM32,achieving power-off protection function.After power on,the system automatically reads the configuration information,parses NTP data in the hardware UDP protocol,and obtains NTP time informa-tion,which becomes a time reference signal after conversion and calculation to synchronize the local clock designed in the STM32 chip.The final test proves that the error of the clock system is less than 50 ms,and it works stably and dependably.It is suitable for synchro-nizing the time of devices without computer operating systems in the network.

NTPSTM32TCPW5500 chiptime synchronization

赵瑞康、王素珍、苗其军、邹开元

展开 >

青岛大学电子信息学院,山东 青岛 266071

海信智动精工有限公司,山东 青岛 266520

NTP STM32 TCP W5500芯片 时间同步

2024

电子器件
东南大学

电子器件

CSTPCD
影响因子:0.569
ISSN:1005-9490
年,卷(期):2024.47(3)