Sfoglia il codice sorgente

Lmx partial assist test

Anatoliy Chigirinskiy 1 anno fa
parent
commit
72d530ac1f
1 ha cambiato i file con 10 aggiunte e 10 eliminazioni
  1. 10 10
      Devices/lmx2594.c

+ 10 - 10
Devices/lmx2594.c

@@ -234,6 +234,7 @@ int lmx_freq_set_main_band(void *bar1, double freq, double f_pd) {
         a_core_min = 323;
         a_core_max = 244;
     };
+    printf("VCO_CORE = %d\n", vco_core);
     vco_cap_ctrl_strt = round(c_core_min - (c_core_min - c_core_max) * (freq - f_coremin) / (f_coremax - f_coremin));
     printf("VCO_CAP_CTRL_STR = %d\n", vco_cap_ctrl_strt);
     vco_daciset_strt = round(a_core_min + (a_core_min - a_core_max) * (freq - f_coremin) / (f_coremax - f_coremin));
@@ -324,7 +325,6 @@ int lmx_freq_set_main_band(void *bar1, double freq, double f_pd) {
         uint32_t *data_ptr = bar1 + LMX_BASE_ADDR;
         *data_ptr = lmx_change_freq_regs[i];
     }
-    usleep(1);
     printf("N_div = %f\n", N_div);
     printf("f_vco = %f\n", freq);
     printf("SEG1_EN %08X\n",lmx2594regs[112 - CHDIV_DIV2]);
@@ -559,6 +559,7 @@ int lmx_freq_set_out_of_band(void *bar1, double freq, double f_pd) {
         a_core_min = 323;
         a_core_max = 244;
     };
+    printf("VCO_CORE = %d\n", vco_core);
     vco_cap_ctrl_strt = round(c_core_min - (c_core_min - c_core_max) * (f_vco - f_coremin) / (f_coremax - f_coremin));
     printf("VCO_CAP_CTRL_STR = %d\n", vco_cap_ctrl_strt);
     vco_daciset_strt = round(a_core_min + (a_core_min - a_core_max) * (f_vco - f_coremin) / (f_coremax - f_coremin));
@@ -655,15 +656,14 @@ int lmx_freq_set_out_of_band(void *bar1, double freq, double f_pd) {
         uint32_t *data_ptr = bar1 + LMX_BASE_ADDR;
         *data_ptr = lmx_change_freq_regs[i];
     }
-    usleep(1);
-            printf("N_div = %f\n", N_div);
-            printf("f_vco = %f\n", f_vco);
-            printf("SEG1_EN %08X\n",lmx2594regs[112 - CHDIV_DIV2]);
-            printf("N = %d\n", N);
-            printf("frac_n = %u\n", frac_n);
-            printf("frac_d = %u\n", frac_d);
-            printf("chan_div = %d\n", chan_div);
-            printf("chan_div_reg = %d\n", ch_div_reg);
+    printf("N_div = %f\n", N_div);
+    printf("f_vco = %f\n", f_vco);
+    printf("SEG1_EN %08X\n",lmx2594regs[112 - CHDIV_DIV2]);
+    printf("N = %d\n", N);
+    printf("frac_n = %u\n", frac_n);
+    printf("frac_d = %u\n", frac_d);
+    printf("chan_div = %d\n", chan_div);
+    printf("chan_div_reg = %d\n", ch_div_reg);
     return 0;
 }