The invention provides a time synchronization method, an Internet of Vehicles system and a computer readable storage medium, the time synchronization method is applied to the Internet of Vehicles system, the Internet of Vehicles system comprises an MPU and an MCU which are in communication connection, and the time synchronization method comprises the following steps: enabling external interruption functions of the MPU and the MCU; simultaneously triggering external interruption of the MPU and the MCU by using high-precision pulse per second; judging whether the high-precision pulse per second received by the MPU is normal or not; if yes, the MPU clears millisecond data of local time and restarts calculation, and meanwhile, the whole second time when the current trigger is interrupted is sent to the MCU; judging whether the high-precision pulse per second received by the MCU is normal or not; if yes, the MCU clears millisecond data of the local time and restarts calculation, and meanwhile, the MCU updates the local time according to the whole second time sent by the MPU. According to the invention, the time synchronization function among multiple processors in the Internet of Vehicles system can be effectively realized, and the error is small.
本发明提供了一种时间同步方法、车联网系统及计算机可读存储介质,其中时间同步方法应用于车联网系统中,车联网系统包括通信连接的MPU和MCU,时间同步方法包括如下步骤:使能MPU与MCU的外部中断功能;使用高精度秒脉冲同时触发MPU与MCU的外部中断;判断MPU接收的高精度秒脉冲是否正常;若是,则MPU清除其本地时间的毫秒数据并重新开始计算,同时把当前触发中断时的整秒时间发送给MCU;判断MCU接收的高精度秒脉冲是否正常;若是,则MCU清除其本地时间的毫秒数据,并重新开始计算,同时MCU根据MPU发送的整秒时间更新其本地时间。本发明可以有效实现车联网系统内的多处理器之间的时间同步功能,同时误差小。
Time synchronization method, Internet of Vehicles system and computer readable storage medium
一种时间同步方法、车联网系统及计算机可读存储介质
2024-08-09
Patent
Electronic Resource
Chinese
European Patent Office | 2022
|Data synchronization device, data synchronization method, and computer readable medium
European Patent Office | 2023
|DATA SYNCHRONIZATION DEVICE, DATA SYNCHRONIZATION METHOD, AND COMPUTER READABLE MEDIUM
European Patent Office | 2021
|ETC passing system and method based on Internet of Vehicles, and readable storage medium
European Patent Office | 2023
|Data synchronization method and device, terminal equipment and computer readable storage medium
European Patent Office | 2023
|