| clk_wiz Vitis Drivers API Documentation

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

Functions
xclk_wiz_versal_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.3 sd  4/7/20 Initial version for Clock Wizard Example
    1.4 sd  5/20/20 Use Macros and use readReg API
    1.6 sd  7/7/23  Add SDT support.
    1.8 sd  6/26/24 Update the device name and Baseaddress.
        sd  9/5/24  Add GetRate and multi clock support.

## Functions
u32 | ClkWiz_Example (XClk_Wiz *IntcInstancePtr, u32 DeviceId)
| This function is the main entry point for the versal example using the XClk_Wiz driver. More...
u32 | XClk_WaitForLock (XClk_Wiz_Config *CfgPtr_Dynamic)
| This is the XClk_WaitForLock function, it will wait for lock to settle change frequency value. More...
int | main ()
| This is the main function for XClk_Wiz rate example. More...

## Function Documentation

u32 ClkWiz_Example | ( | XClk_Wiz * | IntcInstancePtr,
|  | u32 | DeviceId
| ) |  |

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

This function will set up the system with interrupts handlers.

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_WaitForLock(), XClk_Wiz_CfgInitialize(), XClk_Wiz_GetRate(), XClk_Wiz_LookupConfig(), XCLK_WIZ_RECONFIG_OFFSET, XClk_Wiz_SetLeafRateHz(), and XClk_Wiz_SetRateHz().

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_FAILURE if the interrupt example was unsuccessful.

Note
  Unless setup failed, main will never return since

References ClkWiz_Example().

u32 XClk_WaitForLock | ( | XClk_Wiz_Config * | CfgPtr_Dynamic | ) |

This is the XClk_WaitForLock function, it will wait for lock to settle change frequency value.

Parameters

  CfgPtr_Dynamic | provides pointer to clock wizard dynamic config

Returns
  - XST_SUCCESS if the lock occurs.
  - XST_FAILURE if timeout.

Note
  None

References XClk_Wiz_Config::BaseAddr.

Referenced by ClkWiz_Example().