Debian Codegraph @

libs/fsynth.hpp

raw symbols SCIP
1 /***********************************************************************
2 * The header extends adf4351_regs_t to work and initialize
3 * the Per Vices Phi transciever version TP3.
4 *
5 * (c) 2013 Per Vices Corporation
6 * See LICENSE.txt for license and copyright information.
7 **********************************************************************/
8
9 #include "adf4351_regs.hpp"cxx . . $ `<file>/libs/adf4351_regs.hpp`/
10
11 class fsynth_tcxx . . $ fsynth_t# : public adf4351_regs_tcxx . . $ adf4351_regs_t# {
12 public:
13 //This is the initialization routine specific to revision TP3.
14 //Pfd = 31.25MHz (as per header file), 156.25MHz reference, DIV=5.
15 fsynth_tcxx . . $ fsynth_t#fsynth_t(49f6e7a06ebc5aa8).() {
16 //Initialize to 555.000MHz
17 frac_12_bitcxx . . $ adf4351_regs_t#frac_12_bit. = 1;
18 int_16_bitcxx . . $ adf4351_regs_t#int_16_bit. = 71;
19 mod_12_bitcxx . . $ adf4351_regs_t#mod_12_bit. = 26;
20 phase_12_bitcxx . . $ adf4351_regs_t#phase_12_bit. = 1;
21 prescalercxx . . $ adf4351_regs_t#prescaler. = PRESCALER_4_5cxx . . $ adf4351_regs_t#PRESCALER_4_5.;
22 phase_adjcxx . . $ adf4351_regs_t#phase_adj. = PHASE_ADJ_OFFcxx . . $ adf4351_regs_t#PHASE_ADJ_OFF.;
23 counter_resetcxx . . $ adf4351_regs_t#counter_reset. = COUNTER_RESET_DISABLEDcxx . . $ adf4351_regs_t#COUNTER_RESET_DISABLED.;
24 cp_three_statecxx . . $ adf4351_regs_t#cp_three_state. = CP_THREE_STATE_DISABLEDcxx . . $ adf4351_regs_t#CP_THREE_STATE_DISABLED.;
25 power_downcxx . . $ adf4351_regs_t#power_down. = POWER_DOWN_DISABLEDcxx . . $ adf4351_regs_t#POWER_DOWN_DISABLED.;
26 pd_polaritycxx . . $ adf4351_regs_t#pd_polarity. = PD_POLARITY_POSITIVEcxx . . $ adf4351_regs_t#PD_POLARITY_POSITIVE.;
27 ldpcxx . . $ adf4351_regs_t#ldp. = LDP_10NScxx . . $ adf4351_regs_t#LDP_10NS.;
28 ldfcxx . . $ adf4351_regs_t#ldf. = LDF_FRAC_Ncxx . . $ adf4351_regs_t#LDF_FRAC_N.; //If in Int-N mode, set to LDF_INT_N
29 charge_pump_currentcxx . . $ adf4351_regs_t#charge_pump_current. = CHARGE_PUMP_CURRENT_1_88MAcxx . . $ adf4351_regs_t#CHARGE_PUMP_CURRENT_1_88MA.;
30 double_buffercxx . . $ adf4351_regs_t#double_buffer. = DOUBLE_BUFFER_DISABLEDcxx . . $ adf4351_regs_t#DOUBLE_BUFFER_DISABLED.;
31 r_counter_10_bitcxx . . $ adf4351_regs_t#r_counter_10_bit. = 2;
32 reference_divide_by_2cxx . . $ adf4351_regs_t#reference_divide_by_2. = REFERENCE_DIVIDE_BY_2_ENABLEDcxx . . $ adf4351_regs_t#REFERENCE_DIVIDE_BY_2_ENABLED.;
33 reference_doublercxx . . $ adf4351_regs_t#reference_doubler. = REFERENCE_DOUBLER_DISABLEDcxx . . $ adf4351_regs_t#REFERENCE_DOUBLER_DISABLED.;
34 muxoutcxx . . $ adf4351_regs_t#muxout. = MUXOUT_ANALOG_LDcxx . . $ adf4351_regs_t#MUXOUT_ANALOG_LD.;
35 low_noise_and_spurcxx . . $ adf4351_regs_t#low_noise_and_spur. = LOW_NOISE_AND_SPUR_LOW_SPURcxx . . $ adf4351_regs_t#LOW_NOISE_AND_SPUR_LOW_SPUR.;
36 clock_divider_12_bitcxx . . $ adf4351_regs_t#clock_divider_12_bit. = 75; // Nominal lock time for ADF4351 is 250us in normal mode (125us in fast lock mode)
37 // Setting clock divider per tsync > worst case locktime (275us),
38 // tsync = 300 = Clk_div_value * MOD * t_pfd
39 clock_div_modecxx . . $ adf4351_regs_t#clock_div_mode. = CLOCK_DIV_MODE_CLOCK_DIVIDER_OFFcxx . . $ adf4351_regs_t#CLOCK_DIV_MODE_CLOCK_DIVIDER_OFF.;
40 cycle_slip_reductioncxx . . $ adf4351_regs_t#cycle_slip_reduction. = CYCLE_SLIP_REDUCTION_DISABLEDcxx . . $ adf4351_regs_t#CYCLE_SLIP_REDUCTION_DISABLED.;
41 charge_cancelcxx . . $ adf4351_regs_t#charge_cancel. = CHARGE_CANCEL_DISABLEDcxx . . $ adf4351_regs_t#CHARGE_CANCEL_DISABLED.; //Can be used if in Int-N. Not recommended for Frac-N.
42 antibacklash_pulsecxx . . $ adf4351_regs_t#antibacklash_pulse. = ANTIBACKLASH_PULSE_6NScxx . . $ adf4351_regs_t#ANTIBACKLASH_PULSE_6NS.; //Can be 3NS (Reduced Spurs + Phase noise) if in Int-N. Not recommended for Frac-N.
43 band_sel_clk_modecxx . . $ adf4351_regs_t#band_sel_clk_mode. = BAND_SEL_CLK_MODE_LOWcxx . . $ adf4351_regs_t#BAND_SEL_CLK_MODE_LOW.; //HIGH is suitable for high PFD frequencies + fast lock (only ADF4351) LOW has 50 compatability.
44 output_powercxx . . $ adf4351_regs_t#output_power. = OUTPUT_POWER_5DBMcxx . . $ adf4351_regs_t#OUTPUT_POWER_5DBM.;
45 rf_output_enablecxx . . $ adf4351_regs_t#rf_output_enable. = RF_OUTPUT_ENABLE_ENABLEDcxx . . $ adf4351_regs_t#RF_OUTPUT_ENABLE_ENABLED.;
46 aux_output_powercxx . . $ adf4351_regs_t#aux_output_power. = AUX_OUTPUT_POWER_M4DBMcxx . . $ adf4351_regs_t#AUX_OUTPUT_POWER_M4DBM.;
47 aux_output_enablecxx . . $ adf4351_regs_t#aux_output_enable. = AUX_OUTPUT_ENABLE_DISABLEDcxx . . $ adf4351_regs_t#AUX_OUTPUT_ENABLE_DISABLED.;
48 aux_output_selectcxx . . $ adf4351_regs_t#aux_output_select. = AUX_OUTPUT_SELECT_DIVIDEDcxx . . $ adf4351_regs_t#AUX_OUTPUT_SELECT_DIVIDED.;
49 mute_till_lock_detectcxx . . $ adf4351_regs_t#mute_till_lock_detect. = MUTE_TILL_LOCK_DETECT_MUTE_DISABLEDcxx . . $ adf4351_regs_t#MUTE_TILL_LOCK_DETECT_MUTE_DISABLED.;
50 vco_power_downcxx . . $ adf4351_regs_t#vco_power_down. = VCO_POWER_DOWN_VCO_POWERED_UPcxx . . $ adf4351_regs_t#VCO_POWER_DOWN_VCO_POWERED_UP.;
51 band_select_clock_divcxx . . $ adf4351_regs_t#band_select_clock_div. = 250;
52 rf_divider_selectcxx . . $ adf4351_regs_t#rf_divider_select. = RF_DIVIDER_SELECT_DIV4cxx . . $ adf4351_regs_t#RF_DIVIDER_SELECT_DIV4.;
53 feedback_selectcxx . . $ adf4351_regs_t#feedback_select. = FEEDBACK_SELECT_FUNDAMENTALcxx . . $ adf4351_regs_t#FEEDBACK_SELECT_FUNDAMENTAL.; //DIVIDED for higher output power.
54 ld_pin_modecxx . . $ adf4351_regs_t#ld_pin_mode. = LD_PIN_MODE_DLDcxx . . $ adf4351_regs_t#LD_PIN_MODE_DLD.;
55 // Nothing.
56 };
57 };