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.