| clk_wiz Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Macros | Functions
xclk_wiz_setrate_example.c File Reference

## Overview

This file contains a design example using the XClk_Wiz driver with different rates.

assigned to clock wizard 1. Modify this value as per your dynamic clock reconfiguration Clocking wizard

    MODIFICATION HISTORY:

    Ver Who Date   Changes

    1.4 sd  5/21/20 Initial version for Clock Wizard Example
    1.6 sd 7/7/23   Add SDT support.
    1.8 sd 9/5/24   Add GetRate and multi clock support.
    1.10 sd 12/2/24 Remove an un-needed register write.

## Macros
#define | XCLK_US_WIZ_RECONFIG_OFFSET 0x0000025C
| Reconfig Register. More...

## Functions
u32 | ClkWiz_Example (u32 DeviceId)
| This function is the main entry point for the example using the XClk_Wiz driver. More...
int | main ()
| This is the main function for XClk_Wiz rate example. More...

## Macro Definition Documentation

#define XCLK_US_WIZ_RECONFIG_OFFSET 0x0000025C

Reconfig Register.

Referenced by ClkWiz_Example().

## Function Documentation

u32 ClkWiz_Example | ( | u32 | DeviceId | ) |

This function is the main entry point for the example using the XClk_Wiz driver.

Parameters

  DeviceId | is the unique device ID of the CLK_WIZ Subsystem core.

Returns
  - XST_FAILURE if the system setup failed.
  - XST_SUCCESS if successful.

References XClk_Wiz_Config::BaseAddr, XClk_Wiz_Config::NumClocks, XCLK_US_WIZ_RECONFIG_OFFSET, XClk_Wiz_CfgInitialize(), XClk_Wiz_GetRate(), XClk_Wiz_LookupConfig(), XClk_Wiz_SetLeafRateHz(), XClk_Wiz_SetRateHz(), XCLK_WIZ_STATUS_OFFSET, and XClk_Wiz_WaitForLock().

Referenced by main().

int main | ( |  | ) |

This is the main function for XClk_Wiz rate example.

If the ClkWiz_Example function which sets up the system succeeds, this function will set the desired rate.

Parameters

  None. |

Returns
  XST_SUCCESS if successful, otherwise XST_FAILURE.

Note
  None

References ClkWiz_Example().