摘要 |
A method for synchronizing communication clocks and an apparatus thereof are disclosed. The method for synchronizing communication clocks according to an embodiment of the present invention integrates a plurality of electronic control devices in a first electronic control unit (ECU) and a second electronic control unit. The method for synchronizing communication clocks comprises: a step of measuring a clock difference by using a difference between an arrival time observed from transmitting/receiving a frame between the first electronic control unit and the second electronic control unit and a predetermined arrival time and measuring a frequency difference by using a difference between a first clock difference and a second clock difference measured from two consecutive cycles of an identical frame; a step of calculating an offset compensation value by using a clock difference between frames within a cycle; a step of calculating a speed compensation value by using a frequency difference between identical frames within two cycles; and a step of compensating for the clock difference and the frequency difference between the first electronic control unit and the second electronic control unit by reflecting the calculated offset compensation value and the speed compensation value. |