Home
last modified time | relevance | path

Searched refs:ret_freq (Results 1 – 25 of 27) sorted by relevance

12

/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MKE14F16/drivers/
Dfsl_clock.c893 uint32_t ret_freq = 0U; /* Output frequency to return .*/ in CLOCK_GetSysPllMultDiv() local
943 ret_freq = mult_cur * ref_div; in CLOCK_GetSysPllMultDiv()
947 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_GetSysPllMultDiv()
951 return ret_freq / 2U; in CLOCK_GetSysPllMultDiv()
953 if (diff > desireFreq - ret_freq) /* New PRDIV/VDIV is closer. */ in CLOCK_GetSysPllMultDiv()
955 diff = desireFreq - ret_freq; in CLOCK_GetSysPllMultDiv()
963 ret_freq += ref_div; in CLOCK_GetSysPllMultDiv()
964 if (diff > ret_freq - desireFreq) /* New PRDIV/VDIV is closer. */ in CLOCK_GetSysPllMultDiv()
966 diff = ret_freq - desireFreq; in CLOCK_GetSysPllMultDiv()
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MKE18F16/drivers/
Dfsl_clock.c893 uint32_t ret_freq = 0U; /* Output frequency to return .*/ in CLOCK_GetSysPllMultDiv() local
943 ret_freq = mult_cur * ref_div; in CLOCK_GetSysPllMultDiv()
947 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_GetSysPllMultDiv()
951 return ret_freq / 2U; in CLOCK_GetSysPllMultDiv()
953 if (diff > desireFreq - ret_freq) /* New PRDIV/VDIV is closer. */ in CLOCK_GetSysPllMultDiv()
955 diff = desireFreq - ret_freq; in CLOCK_GetSysPllMultDiv()
963 ret_freq += ref_div; in CLOCK_GetSysPllMultDiv()
964 if (diff > ret_freq - desireFreq) /* New PRDIV/VDIV is closer. */ in CLOCK_GetSysPllMultDiv()
966 diff = ret_freq - desireFreq; in CLOCK_GetSysPllMultDiv()
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MKE16F16/drivers/
Dfsl_clock.c893 uint32_t ret_freq = 0U; /* Output frequency to return .*/ in CLOCK_GetSysPllMultDiv() local
943 ret_freq = mult_cur * ref_div; in CLOCK_GetSysPllMultDiv()
947 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_GetSysPllMultDiv()
951 return ret_freq / 2U; in CLOCK_GetSysPllMultDiv()
953 if (diff > desireFreq - ret_freq) /* New PRDIV/VDIV is closer. */ in CLOCK_GetSysPllMultDiv()
955 diff = desireFreq - ret_freq; in CLOCK_GetSysPllMultDiv()
963 ret_freq += ref_div; in CLOCK_GetSysPllMultDiv()
964 if (diff > ret_freq - desireFreq) /* New PRDIV/VDIV is closer. */ in CLOCK_GetSysPllMultDiv()
966 diff = ret_freq - desireFreq; in CLOCK_GetSysPllMultDiv()
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/K32L2A41A/drivers/
Dfsl_clock.c934 uint32_t ret_freq = 0U; /* Output frequency to return .*/ in CLOCK_GetSysPllMultDiv() local
984 ret_freq = mult_cur * ref_div; in CLOCK_GetSysPllMultDiv()
988 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_GetSysPllMultDiv()
992 return ret_freq / 2U; in CLOCK_GetSysPllMultDiv()
994 if (diff > desireFreq - ret_freq) /* New PRDIV/VDIV is closer. */ in CLOCK_GetSysPllMultDiv()
996 diff = desireFreq - ret_freq; in CLOCK_GetSysPllMultDiv()
1004 ret_freq += ref_div; in CLOCK_GetSysPllMultDiv()
1005 if (diff > ret_freq - desireFreq) /* New PRDIV/VDIV is closer. */ in CLOCK_GetSysPllMultDiv()
1007 diff = ret_freq - desireFreq; in CLOCK_GetSysPllMultDiv()
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/K32L2A31A/drivers/
Dfsl_clock.c934 uint32_t ret_freq = 0U; /* Output frequency to return .*/ in CLOCK_GetSysPllMultDiv() local
984 ret_freq = mult_cur * ref_div; in CLOCK_GetSysPllMultDiv()
988 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_GetSysPllMultDiv()
992 return ret_freq / 2U; in CLOCK_GetSysPllMultDiv()
994 if (diff > desireFreq - ret_freq) /* New PRDIV/VDIV is closer. */ in CLOCK_GetSysPllMultDiv()
996 diff = desireFreq - ret_freq; in CLOCK_GetSysPllMultDiv()
1004 ret_freq += ref_div; in CLOCK_GetSysPllMultDiv()
1005 if (diff > ret_freq - desireFreq) /* New PRDIV/VDIV is closer. */ in CLOCK_GetSysPllMultDiv()
1007 diff = ret_freq - desireFreq; in CLOCK_GetSysPllMultDiv()
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MKL25Z4/drivers/
Dfsl_clock.c669 uint32_t ret_freq = 0U; /* PLL output fequency to return. */ in CLOCK_CalcPllDiv() local
711 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
715 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
719 return ret_freq; in CLOCK_CalcPllDiv()
722 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
724 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
732 ret_freq += ref_div; in CLOCK_CalcPllDiv()
734 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
736 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
748 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MKW22D5/drivers/
Dfsl_clock.c722 uint32_t ret_freq = 0U; /* PLL output fequency to return. */ in CLOCK_CalcPllDiv() local
764 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
768 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
772 return ret_freq; in CLOCK_CalcPllDiv()
775 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
777 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
785 ret_freq += ref_div; in CLOCK_CalcPllDiv()
787 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
789 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
801 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MKW24D5/drivers/
Dfsl_clock.c722 uint32_t ret_freq = 0U; /* PLL output fequency to return. */ in CLOCK_CalcPllDiv() local
764 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
768 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
772 return ret_freq; in CLOCK_CalcPllDiv()
775 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
777 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
785 ret_freq += ref_div; in CLOCK_CalcPllDiv()
787 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
789 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
801 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MKV56F24/drivers/
Dfsl_clock.c838 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
885 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
889 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
893 return ret_freq / 2U; in CLOCK_CalcPllDiv()
896 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
898 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
906 ret_freq += ref_div; in CLOCK_CalcPllDiv()
908 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
910 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
922 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MKV58F24/drivers/
Dfsl_clock.c838 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
885 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
889 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
893 return ret_freq / 2U; in CLOCK_CalcPllDiv()
896 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
898 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
906 ret_freq += ref_div; in CLOCK_CalcPllDiv()
908 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
910 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
922 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MKV31F51212/drivers/
Dfsl_clock.c897 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
942 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
946 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
950 return ret_freq; in CLOCK_CalcPllDiv()
953 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
955 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
963 ret_freq += ref_div; in CLOCK_CalcPllDiv()
965 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
967 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
979 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MKV31F25612/drivers/
Dfsl_clock.c882 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
927 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
931 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
935 return ret_freq; in CLOCK_CalcPllDiv()
938 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
940 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
948 ret_freq += ref_div; in CLOCK_CalcPllDiv()
950 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
952 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
964 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK22F25612/drivers/
Dfsl_clock.c933 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
978 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
982 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
986 return ret_freq; in CLOCK_CalcPllDiv()
989 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
991 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
999 ret_freq += ref_div; in CLOCK_CalcPllDiv()
1001 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
1003 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
1015 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK24F12/drivers/
Dfsl_clock.c902 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
947 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
951 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
955 return ret_freq; in CLOCK_CalcPllDiv()
958 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
960 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
968 ret_freq += ref_div; in CLOCK_CalcPllDiv()
970 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
972 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
984 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK22F12/drivers/
Dfsl_clock.c895 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
940 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
944 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
948 return ret_freq; in CLOCK_CalcPllDiv()
951 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
953 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
961 ret_freq += ref_div; in CLOCK_CalcPllDiv()
963 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
965 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
977 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK80F25615/drivers/
Dfsl_clock.c952 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
999 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
1003 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
1007 return ret_freq / 2U; in CLOCK_CalcPllDiv()
1010 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
1012 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
1020 ret_freq += ref_div; in CLOCK_CalcPllDiv()
1022 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
1024 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
1036 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK82F25615/drivers/
Dfsl_clock.c952 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
999 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
1003 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
1007 return ret_freq / 2U; in CLOCK_CalcPllDiv()
1010 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
1012 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
1020 ret_freq += ref_div; in CLOCK_CalcPllDiv()
1022 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
1024 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
1036 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK22F51212/drivers/
Dfsl_clock.c945 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
990 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
994 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
998 return ret_freq; in CLOCK_CalcPllDiv()
1001 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
1003 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
1011 ret_freq += ref_div; in CLOCK_CalcPllDiv()
1013 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
1015 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
1027 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK64F12/drivers/
Dfsl_clock.c912 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
957 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
961 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
965 return ret_freq; in CLOCK_CalcPllDiv()
968 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
970 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
978 ret_freq += ref_div; in CLOCK_CalcPllDiv()
980 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
982 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
994 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK63F12/drivers/
Dfsl_clock.c901 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
946 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
950 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
954 return ret_freq; in CLOCK_CalcPllDiv()
957 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
959 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
967 ret_freq += ref_div; in CLOCK_CalcPllDiv()
969 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
971 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
983 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK26F18/drivers/
Dfsl_clock.c1171 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
1218 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
1222 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
1226 return ret_freq / 2U; in CLOCK_CalcPllDiv()
1229 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
1231 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
1239 ret_freq += ref_div; in CLOCK_CalcPllDiv()
1241 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
1243 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
1255 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK27FA15/drivers/
Dfsl_clock.c1130 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
1177 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
1181 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
1185 return ret_freq / 2U; in CLOCK_CalcPllDiv()
1188 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
1190 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
1198 ret_freq += ref_div; in CLOCK_CalcPllDiv()
1200 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
1202 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
1214 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK66F18/drivers/
Dfsl_clock.c1170 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
1217 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
1221 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
1225 return ret_freq / 2U; in CLOCK_CalcPllDiv()
1228 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
1230 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
1238 ret_freq += ref_div; in CLOCK_CalcPllDiv()
1240 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
1242 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
1254 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK65F18/drivers/
Dfsl_clock.c1171 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
1218 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
1222 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
1226 return ret_freq / 2U; in CLOCK_CalcPllDiv()
1229 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
1231 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
1239 ret_freq += ref_div; in CLOCK_CalcPllDiv()
1241 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
1243 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
1255 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]
/hal_nxp-3.5.0/mcux/mcux-sdk/devices/MK28FA15/drivers/
Dfsl_clock.c1130 uint32_t ret_freq = 0U; /* PLL output frequency to return. */ in CLOCK_CalcPllDiv() local
1177 ret_freq = vdiv_cur * ref_div; in CLOCK_CalcPllDiv()
1181 if (ret_freq == desireFreq) /* If desire frequency is got. */ in CLOCK_CalcPllDiv()
1185 return ret_freq / 2U; in CLOCK_CalcPllDiv()
1188 if (diff > desireFreq - ret_freq) in CLOCK_CalcPllDiv()
1190 diff = desireFreq - ret_freq; in CLOCK_CalcPllDiv()
1198 ret_freq += ref_div; in CLOCK_CalcPllDiv()
1200 if (diff > ret_freq - desireFreq) in CLOCK_CalcPllDiv()
1202 diff = ret_freq - desireFreq; in CLOCK_CalcPllDiv()
1214 ret_freq = (refFreq / ret_prdiv) * ret_vdiv; in CLOCK_CalcPllDiv()
[all …]

12