High-pressure common rail diesel engine is essential to meet vehicle emission regulations in future. The crankshaft signal and the camshaft signal are the keys to ensure that the electronic control units of the high-pressure common-rail diesel engine work in real-time. The relationship between the crankshaft signal and the camshaft signal is studied, and sync signals are generated by using the Local Timer Cell(LTC) of the General Purpose Timer Array(GPTA) module in 32-bit single-chip microcontroller TC1796 to ensure two-way synchronization error of a few instruction cycles only and the cost reduction for development.