ZHCSN15C June 2020 – December 2025 LMK05318B
PRODUCTION DATA
使用 1PPS 相位验证监控器时,DPLL 锁定取决于监控器的计数器值、XO 输入的频率精度和 PRIREF 输入的频率精度。该监测器取决于 XO 输入和 PRIREF 输入之间的频率误差。两个输入之间的误差过大可能会导致监控器永远不会验证 1PPS 输入时钟。
使用以下伪代码(基于 Python)来验证 DPLL 是否能够实现锁定。
# Input Variables
XO_input_frequency (Hz) = # Based on the specifications of the XO input clock
XO_input_frequency_accuracy (ppm) = # Based on the specfications of the XO input clock
XO_doubler_is_enabled = # True or False, recommendation is to disable the XO to allow more error
REF_input_frequency (Hz) = 1Hz
REF_input_frequency_accuracy (ppm) = # Based on the specifications of the REF IN device
Threshold_Value (count) = # 0 to 63, recommendation is to use max 63 to allow more error
# Calculated Values:
int XO_frequency_post_doubler
if XO_doubler_is_enabled == True:
XO_frequency_post_doubler = XO_input_frequency x 2
elif XO_doubler_is_enabled == False:
XO_frequency_post_doubler = XO_input_frequency
Ref_input_period = 1 / REF_input_frequency
Error_time_allowed = Threhsold_Value / XO_frequency_post_doubler
Allowed_period_error = Ref_input_period + Error_time_allowed
Allowed_frequency_error = 1 / Allowed_period_error
Required_ppm_threshold = XO_input_frequency_accuracy + REF_input_frequency_accuracy
Allowed_ppm_error = (REF_input_frequency - Allowed_frequency_error) / REF_input_frequency
boolean configuration_status
def check_for_valid_1pps_lock():
if Allowed_error_as_ppm > Required_ppm_threshold_allowance:
configuration_status = True #Config and setup can achieve 1PPS lock
else:
configuration_status = False #Config and setup may not achieve 1PPS lock