board_common
Vitis Drivers API Documentation
Overview

Functions

u32 XRFClk_WriteReg (u32 ChipId, u32 d)
 This function is used to write a register on one of LMX2594 or LMX04828. More...
 
u32 XRFClk_ReadReg (u32 ChipId, u32 *d)
 This function is used to read a register from one of LMX2594 or LMX04828. More...
 
u32 XRFClk_Init (int GpioId)
 This function is used to initialize RFCLK devices on i2c1-bus: i2c1 bus switch, i2c2spi bridge and MUX_SELx GPIOs. More...
 
void XRFClk_Close (void)
 This function is used to close RFCLK devices. More...
 
u32 XRFClk_ResetChip (u32 ChipId)
 This function is used to reset one of LMX2594 or LMK04828. More...
 
u32 XRFClk_SetConfigOnOneChipFromConfigId (u32 ChipId, u32 ConfigId)
 This function is used to set a full configuration on one of LMX2594 or LMX04828 for the requested frequency.where the register settings is provided from the selected hard coded data. More...
 
u32 XRFClk_SetConfigOnOneChip (u32 ChipId, u32 *CfgData, u32 Len)
 This function is used to set the full configuration data on one of LMX2594 or LMX04828. More...
 
u32 XRFClk_SetConfigOnAllChipsFromConfigId (u32 ConfigId_LMK, u32 ConfigId_1, u32 ConfigId_2)
 This function is used to set a full configuration on all LMX2594 and LMK04828 or LMK04208 for the requested frequency. More...
 
u32 XRFClk_GetConfigFromOneChip (u32 ChipId, u32 *CfgData)
 This function is used to read the full configuration data from one of LMX2594 or LMX04828. More...
 
u32 XRFClk_ControlOutputPortLMK (u32 PortId, u32 State)
 This function is used to enable or disable the specified output port on LMK04828. More...
 
u32 XRFClk_ConfigOutputDividerAndMUXOnLMK (u32 PortId, u32 DCLKoutX_DIV, u32 DCLKoutX_MUX, u32 SDCLKoutY_MUX, u32 SYSREF_DIV)
 This function is used to configure a clock divider and the output port MUX state on LMK04828. More...
 

Function Documentation

void XRFClk_Close ( void  )

This function is used to close RFCLK devices.

Parameters
none
Returns
none
Note
None
u32 XRFClk_ConfigOutputDividerAndMUXOnLMK ( u32  PortId,
u32  DCLKoutX_DIV,
u32  DCLKoutX_MUX,
u32  SDCLKoutY_MUX,
u32  SYSREF_DIV 
)

This function is used to configure a clock divider and the output port MUX state on LMK04828.

For the details consult tables 16, 18, 19 and 25 in the lmk04828.pdf datasheet.

Parameters
PortIdindicates a LMK04828 port id, [1:7].
DCLKoutX_DIVsets divider for the clock output [0:31].
DCLKoutX_MUXselects input to the device clk buffer [0:3].
SDCLKoutY_MUXsets input to SDCLKoutY [0:1].
SYSREF_DIVsets SYSREF output divider [8:8191]
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None

References XRFClk_WriteReg().

u32 XRFClk_ControlOutputPortLMK ( u32  PortId,
u32  State 
)

This function is used to enable or disable the specified output port on LMK04828.

Parameters
PortIdindicates a LMK04828 port id, [1:7].
Stateindicates the state of the port, see chapter 9.7.2.7 in lmk04828.pdf datasheet, [0:7]
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None

References XRFClk_WriteReg().

u32 XRFClk_GetConfigFromOneChip ( u32  ChipId,
u32 *  CfgData 
)

This function is used to read the full configuration data from one of LMX2594 or LMX04828.

Parameters
ChipIdindicates the RF clock chip Id.
CfgDatathe array of the RF clock chip configuration data.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None
u32 XRFClk_Init ( int  GpioId)

This function is used to initialize RFCLK devices on i2c1-bus: i2c1 bus switch, i2c2spi bridge and MUX_SELx GPIOs.

Parameters
none
Returns
GpioId gpio ID for Linux build, n/a for baremetal build.
Note
None
u32 XRFClk_ReadReg ( u32  ChipId,
u32 *  d 
)

This function is used to read a register from one of LMX2594 or LMX04828.

Parameters
ChipIdindicates the RF clock chip Id.
d= {D2, D1, D0} Where [D0,D1,D2] bits are: LMK04282: bit [23] - 1-bit command field (R/W) bits [22:21] - 2-bit multi-byte field (W1, W0) bits [20:8] - 13-bit address field (A12 to A0) bits [7-0]- 8-bit data field (D7 to D0). LMX2594: bit [23] - 1-bit command field (R/W) bits [22:16] - 7-bit address field (A6 to A0) bits [15-0]- 16-bit data field (D15 to D0).
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None
u32 XRFClk_ResetChip ( u32  ChipId)

This function is used to reset one of LMX2594 or LMK04828.

Parameters
ChipIdindicates the RF clock chip Id.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None

References XRFClk_WriteReg().

u32 XRFClk_SetConfigOnAllChipsFromConfigId ( u32  ConfigId_LMK,
u32  ConfigId_1,
u32  ConfigId_2 
)

This function is used to set a full configuration on all LMX2594 and LMK04828 or LMK04208 for the requested frequency.

Parameters
ConfigId_LMKindicates the LMK configuration Id.
ConfigId_RF1indicates the LMX RF1 configuration Id.
ConfigId_RF2indicates the LMX RF2 configuration Id.
ConfigId_RF3indicates the LMX RF3 configuration Id.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None

References XRFClk_SetConfigOnOneChipFromConfigId().

u32 XRFClk_SetConfigOnOneChip ( u32  ChipId,
u32 *  CfgData,
u32  Len 
)

This function is used to set the full configuration data on one of LMX2594 or LMX04828.

The all register values are passed as a pointer CfgData, Len defines a number of data ready for writing.

Parameters
ChipIdindicates the RF clock chip Id.
CfgDataindicates the configuration for all registers.
Lenindicates a number of data.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None

References XRFClk_WriteReg().

u32 XRFClk_SetConfigOnOneChipFromConfigId ( u32  ChipId,
u32  ConfigId 
)

This function is used to set a full configuration on one of LMX2594 or LMX04828 for the requested frequency.where the register settings is provided from the selected hard coded data.

Parameters
ChipIdindicates the RF clock chip Id.
ConfigIdindicates the RF clock chip configuration Id.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None

Referenced by XRFClk_SetConfigOnAllChipsFromConfigId().

u32 XRFClk_WriteReg ( u32  ChipId,
u32  d 
)

This function is used to write a register on one of LMX2594 or LMX04828.

Parameters
ChipIdindicates the RF clock chip Id.
d= {D2, D1, D0} Where [D0,D1,D2] bits are: LMK04282: bit [23] - 1-bit command field (R/W) bits [22:21] - 2-bit multi-byte field (W1, W0) bits [20:8] - 13-bit address field (A12 to A0) bits [7-0]- 8-bit data field (D7 to D0). LMX2594: bit [23] - 1-bit command field (R/W) bits [22:16] - 7-bit address field (A6 to A0) bits [15-0]- 16-bit data field (D15 to D0).
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None

Referenced by XRFClk_ConfigOutputDividerAndMUXOnLMK(), XRFClk_ControlOutputPortLMK(), XRFClk_ResetChip(), and XRFClk_SetConfigOnOneChip().