This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:tools-software:uc-drivers:hmc7044 [06 Feb 2020 15:25] – add eval board image Darius B | resources:tools-software:uc-drivers:hmc7044 [07 Feb 2020 12:15] (current) – doxygen Darius B | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== HMC7044 Clock Jitter Attenuator with JESD204B no-OS Driver ===== | ||
+ | |||
===== Supported Devices ===== | ===== Supported Devices ===== | ||
* [[adi> | * [[adi> | ||
Line 16: | Line 18: | ||
The DCLK and SYSREF clock outputs of the [[adi> | The DCLK and SYSREF clock outputs of the [[adi> | ||
- | ===== Applications ===== | + | ===== Applications ===== |
* JESD204B clock generation | * JESD204B clock generation | ||
* Cellular infrastructure (multicarrier GSM, LTE, W-CDMA) | * Cellular infrastructure (multicarrier GSM, LTE, W-CDMA) | ||
Line 22: | Line 24: | ||
* Microwave baseband cards | * Microwave baseband cards | ||
* Phase array reference distribution | * Phase array reference distribution | ||
+ | |||
+ | ===== Source Code ===== | ||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ===== Source Code Documentation ===== | ||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | ===== Driver Description ===== | ||
+ | The driver implements the necessary routines for managing the device and communicates with the device over an SPI interface. The SPI communication layer is not implemented by the driver and has to be provided by the user at the driver initialization phase. | ||
+ | |||
+ | < | ||
+ | +-----------------------------------------------------------------+ | ||
+ | | Microcontroller | ||
+ | | | ||
+ | | +------------------+ | ||
+ | | | | | SPI Communication Driver | ||
+ | | | | ||
+ | | | | | | ||
+ | | | HMC7044 Driver | ||
+ | | | | | | ||
+ | | | | | | | | | | | | ||
+ | | +------------------+ | ||
+ | +-----------------------------------------------------------------+ | ||
+ | </ | ||
+ | |||
+ | ==== Example usage ==== | ||
+ | < | ||
+ | #include " | ||
+ | |||
+ | int status; | ||
+ | struct hmc7044_dev* hmc7044_device; | ||
+ | |||
+ | struct spi_init_param example_spi_init_param = { | ||
+ | .max_speed_hz = 10000000, | ||
+ | .mode = 0, | ||
+ | .chip_select = 2, | ||
+ | .extra = NULL //<-- pass platform specific settings using .extra. | ||
+ | }; | ||
+ | |||
+ | struct hmc7044_chan_spec chan_spec[2] = { | ||
+ | /* OUTPUT0 */ | ||
+ | { | ||
+ | .disable = 0, .num = 0, .divider = 12, .driver_mode = 2, | ||
+ | .coarse_delay = 15 | ||
+ | }, | ||
+ | /* OUTPUT1 */ | ||
+ | { | ||
+ | .disable = 0, .num = 1, .divider = 3840, .driver_mode = 1, | ||
+ | .start_up_mode_dynamic_enable = true, | ||
+ | .high_performance_mode_dis = true, | ||
+ | .output_control0_rb4_enable = true, | ||
+ | .force_mute_enable = true, | ||
+ | .driver_impedance = 1 | ||
+ | } | ||
+ | } | ||
+ | |||
+ | struct hmc7044_init_param example_hmc7044_param = { | ||
+ | .spi_init = & | ||
+ | .clkin_freq = {122880000, 122880000, 0, 0}, | ||
+ | .vcxo_freq = 122880000, | ||
+ | .pll2_freq = 2949120000, | ||
+ | .pll1_loop_bw = 200, | ||
+ | .sysref_timer_div = 3840, | ||
+ | .in_buf_mode = {0x09, 0x09, 0x00, 0x00, 0x15}, | ||
+ | .gpi_ctrl = {0x00, 0x00, 0x00, 0x11}, | ||
+ | .gpo_ctrl = {0x1f, 0x2b, 0x00, 0x00}, | ||
+ | .num_channels = 2, //<-- number of channels in .channels. | ||
+ | .pll1_ref_prio_ctrl = 0xE5, | ||
+ | .sync_pin_mode = 0x1, | ||
+ | .high_performance_mode_clock_dist_en = true, | ||
+ | .high_performance_mode_pll_vco_en = true, | ||
+ | .pulse_gen_mode = 0x0, | ||
+ | .channels = chan_spec | ||
+ | }; | ||
+ | |||
+ | status = hmc7044_init(& | ||
+ | if (status != SUCCESS) { | ||
+ | // ... | ||
+ | } | ||
+ | |||
+ | // hmc7044 is now initialized according to the hmc7044_param structure. | ||
+ | // you may use the remainder of the driver interface to control the device: | ||
+ | // | ||
+ | // | ||
+ | // | ||
+ | | ||
+ | // This example sets the outputs 0 and 1 to explicit clock values. | ||
+ | // The driver will try its best to select appropriate dividers so as to | ||
+ | // obtain the desired frequency. | ||
+ | hmc7044_clk_set_rate(hmc7044_device, | ||
+ | hmc7044_clk_set_rate(hmc7044_device, | ||
+ | |||
+ | hmc7044_remove(hmc7044_device); | ||
+ | |||
+ | </ | ||
+ |