📄 csl_pllc.h
字号:
*/ CSL_PLLC_CMD_SET_PLLM, /** \brief Set oscillator divide ratio * \param Uint32 * \return CSL_SOK */ CSL_PLLC_CMD_SET_OSCRATIO, /** \brief Set PLL divide ratio * \param CSL_PllcDivRatio * \return CSL_SOK * \sa CSL_PllcDivRatio */ CSL_PLLC_CMD_SET_PLLRATIO, /** \brief Enable/disable oscillator divider * \param CSL_PllcOscDivCtrl * \return CSL_SOK * \sa CSL_PllcOscDivCtrl */ CSL_PLLC_CMD_OSCDIV_CONTROL, /** \brief Enable/disable PLL divider * \param CSL_PllcDivideControl * \return CSL_SOK * \sa CSL_PllcDivideControl */ CSL_PLLC_CMD_PLLDIV_CONTROL, /** \brief Enable/disable Wake Up functionality of wakeup pins * \param CSL_BitMask16 * \return CSL_SOK */ CSL_PLLC_CMD_WAKEUP} CSL_PllcHwControlCmd;/**@} *//** \defgroup CSL_PLLC_QUERYCMD_ENUM Query Commands * \ingroup CSL_PLLC_QUERY_API @{ *//** \brief Enumeration for queries passed to \a CSL_PllcGetHwStatus() * * This is used to get the status of different operations.The arguments * to be passed with each enumeration if any are specified next to * the enumeration */typedef enum { /** \brief Queries PLL Control Peripheral ID * \param (Uint32*) * \return CSL_SOK */ CSL_PLLC_QUERY_PID, /** \brief Queries PLL Controller Status * \param (CSL_BitMask32*) * \return CSL_SOK * \sa CSL_PLLC_STATUS_DEFINE */ CSL_PLLC_QUERY_STATUS, /** \brief Queries PLLDIV Modified Status * \param (CSL_BitMask32*) * \return CSL_SOK * \sa CSL_PLLC_DCHANGESTAT_DEFINE */ CSL_PLLC_QUERY_DIVRATIO_CHANGE, /** \brief Queries Clock Status * \param (CSL_BitMask32*) * \return CSL_SOK * \sa CSL_PLLC_CLKSTAT_DEFINE */ CSL_PLLC_QUERY_CLKSTAT, /** \brief Queries PLL SYSCLK Status * \param (CSL_BitMask32*) * \return CSL_SOK * \sa CSL_PLLC_SYSCLKSTAT_DEFINE */ CSL_PLLC_QUERY_SYSCLKSTAT, /** \brief Queries CLK Enable Status * \param (CSL_BitMask32*) * \return CSL_SOK * \sa CSL_PLLC_CLKEN_DEFINE */ CSL_PLLC_QUERY_CLKENSTAT, /** \brief Queries Reset Type Status * \param (CSL_BitMask32*) * \return CSL_SOK * \sa CSL_PLLC_RESETSTAT_DEFINE */ CSL_PLLC_QUERY_RESETSTAT, /** \brief Queries Fuse Farm Error Status * \param (Uint32*) * \return CSL_SOK */ CSL_PLLC_QUERY_EFUSEERR} CSL_PllcHwStatusQuery;/**@} *//**\addtogroup CSL_PLLC_DATASTRUCT@{ *//** * \brief Input parameters for setting up PLL Divide ratio * \sa CSL_PLLC_DIVSEL_DEFINE */typedef struct CSL_PllcDivRatio { /** \brief Divider number * \param Uint32 */ Uint32 divNum; /** \brief Divider Ratio * \param Uint32 */ Uint32 divRatio;} CSL_PllcDivRatio;/**@} *//**\addtogroup CSL_PLLC_DATASTRUCT@{ *//** * \brief Input parameters for enabling\disabling PLL Divide ratio * \sa CSL_PLLC_DIVSEL_DEFINE */typedef struct CSL_PllcDivideControl { /** \brief Divider Number * \param Uint32 */ Uint32 divNum; /** \brief Divider Control (Enable/Disable) * \param CSL_PllcDivCtrl */ CSL_PllcDivCtrl divCtrl;} CSL_PllcDivideControl;/**@} *//**\addtogroup CSL_PLLC_DATASTRUCT@{ *//** * \brief Input parameters for setting up PLL Controller * * Used to put PLLC known useful state * /sa CSL_PLLC_DIVEN_DEFINE */typedef struct CSL_PllcHwSetup { /** \brief Divider Enable/Disable * \param CSL_BitMask32 */ CSL_BitMask32 divEnable; /** \brief Pre-Divider * \param Uint32 */ Uint32 preDiv; /** \brief PLL Multiplier * \param Uint32 */ Uint32 pllM; /** \brief Post-Divider * \param Uint32 */ Uint32 postDiv; /** \brief PLL Divider 1 * \param Uint32 */ Uint32 pllDiv1; /** \brief PLL Divider 2 * \param Uint32 */ Uint32 pllDiv2; /** \brief PLL Divider 3 * \param Uint32 */ Uint32 pllDiv3; /** \brief PLL Divider 4 * \param Uint32 */ Uint32 pllDiv4; /** \brief PLL Divider 5 * \param Uint32 */ Uint32 pllDiv5; /** \brief PLL Divider 6 * \param Uint32 */ Uint32 pllDiv6; /** \brief PLL Divider 7 * \param Uint32 */ Uint32 pllDiv7; /** \brief PLL Divider 8 * \param Uint32 */ Uint32 pllDiv8; /** \brief Oscillator Divider 1 * \param Uint32 */ Uint32 oscDiv1; /** \brief Phase Align Control * \param CSL_BitMask32 */ CSL_BitMask32 phaseAlign; /** \brief Setup that can be used for future implementation * \param void* */ void* extendSetup;} CSL_PllcHwSetup;/**@} *//** \defgroup CSL_PLLC_DEFAULT_HWSETUP_DEFINE PLLC Default HwSetup Structure * \ingroup CSL_PLLC_DEFINE * * @{ *//** \brief Default hardware setup parameters */#define CSL_PLLC_HWSETUP_DEFAULTS{ \ 0, \ 0, \ 0, \ 0, \ 0, \ 0, \ 0, \ 0, \ 0, \ 0, \ 0, \ 0, \ 0, \ 0, \ NULL \}/**@} *//**\addtogroup CSL_PLLC_DATASTRUCT@{ *//** \brief Config-structure * * Used to configure the pllc using CSL_pllcHwSetupRaw() */typedef struct { /** Reset Definition register */ volatile Uint32 RSTDEF; /** PLL Control register */ volatile Uint32 PLLCTL; /** OBSCLK Select register */ volatile Uint32 OCSEL; /** PLL Secondary Control register */ volatile Uint32 SECCTL; /** PLL Multiplier Control register */ volatile Uint32 PLLM; /** PLL Pre-Divider Control register */ volatile Uint32 PREDIV; /** PLL Controller Divider 1 register */ volatile Uint32 PLLDIV1; /** PLL Controller Divider 2 register */ volatile Uint32 PLLDIV2; /** PLL Controller Divider 3 register */ volatile Uint32 PLLDIV3; /** PLL Controller Divider 4 register */ volatile Uint32 OSCDIV1; /** PLL Post-Divider Control register */ volatile Uint32 POSTDIV; /** Bypass Divider register */ volatile Uint32 BPDIV; /** Wakeup register */ volatile Uint32 WAKEUP; /** PLL Controller Command register */ volatile Uint32 PLLCMD; /** PLL Controller Clock Align Control register */ volatile Uint32 ALNCTL; /** Clock Enable Control register */ volatile Uint32 CKEN; /** PLL Controller Divider 4 register */ volatile Uint32 PLLDIV4; /** PLL Controller Divider 5 register */ volatile Uint32 PLLDIV5; /** PLL Controller Divider 6 register */ volatile Uint32 PLLDIV6; /** PLL Controller Divider 7 register */ volatile Uint32 PLLDIV7; /** PLL Controller Divider 8 register */ volatile Uint32 PLLDIV8;} CSL_PllcConfig;/**@} *//** \defgroup CSL_PLLC_DEFAULT_CONFIG_DEFINE PLLC Default Config Structure * \ingroup CSL_PLLC_DEFINE * * @{ *//** \brief Default values for config structure */#define CSL_PLLC_CONFIG_DEFAULTS { \ CSL_PLLC_RSTDEF_RESETVAL, \ CSL_PLLC_PLLCTL_RESETVAL, \ CSL_PLLC_OCSEL_RESETVAL, \ CSL_PLLC_SECCTL_RESETVAL, \ CSL_PLLC_PLLM_RESETVAL, \ CSL_PLLC_PREDIV_RESETVAL, \ CSL_PLLC_PLLDIV1_RESETVAL, \ CSL_PLLC_PLLDIV2_RESETVAL, \ CSL_PLLC_PLLDIV3_RESETVAL, \ CSL_PLLC_OSCDIV1_RESETVAL, \ CSL_PLLC_POSTDIV_RESETVAL, \ CSL_PLLC_BPDIV_RESETVAL, \ CSL_PLLC_WAKEUP_RESETVAL, \ CSL_PLLC_PLLCMD_RESETVAL, \ CSL_PLLC_ALNCTL_RESETVAL, \ CSL_PLLC_CKEN_RESETVAL, \ CSL_PLLC_PLLDIV4_RESETVAL, \ CSL_PLLC_PLLDIV5_RESETVAL, \ CSL_PLLC_PLLDIV6_RESETVAL, \ CSL_PLLC_PLLDIV7_RESETVAL, \ CSL_PLLC_PLLDIV8_RESETVAL \}/**@} *//**\addtogroup CSL_PLLC_DATASTRUCT@{ *//** \brief Module specific context information. Present implementation of pllc * CSL doesn't have any context information. */typedef struct { /** Context information of Pllc CSL. * The below declaration is just a place-holder for future implementation. */ Uint16 contextInfo;} CSL_PllcContext;/**@} *//**\addtogroup CSL_PLLC_DATASTRUCT@{ *//** \brief Module specific parameters. Present implementation of pllc CSL * doesn't have any module specific parameters. */typedef struct { /** Bit mask to be used for module specific parameters. The below * declaration is just a place-holder for future implementation. */ CSL_BitMask16 flags;} CSL_PllcParam;/**@} *//**\addtogroup CSL_PLLC_DATASTRUCT@{ *//** \brief This structure contains the base-address information for the * peripheral instance of the PLLC */typedef struct { /** Base-address of the configuration registers of the peripheral */ CSL_PllcRegsOvly regs;} CSL_PllcBaseAddress;/**@} *//**\addtogroup CSL_PLLC_DATASTRUCT@{ *//** \brief This object contains the reference to the instance of PLLC * opened using the @a CSL_pllcOpen() * * The pointer to this is passed to all PLLC CSL APIs * This structure has the fields required to configure PLLC for any test * case/application. It should be initialized as per requirements of a * test case/application and passed on to the setup function */typedef struct CSL_PllcObj { /** This is a pointer to the registers of the instance of PLLC * referred to by this object */ CSL_PllcRegsOvly regs; /** This is the instance of PLLC being referred to by this object */ CSL_InstNum pllcNum;} CSL_PllcObj;/**@} *//**\addtogroup CSL_PLLC_DATASTRUCT@{ *//** \brief This data type is used to return the handle to the pllc functions */typedef struct CSL_PllcObj *CSL_PllcHandle;/**@} *//******************************************************************************* * PLLC function declarations ******************************************************************************//**\defgroup CSL_PLLC_INIT_API PLLC Init API\ingroup CSL_PLLC_FUNCTION@{*//** ============================================================================ * @n@b CSL_pllcInit * * @b Description * @n This is the initialization function for the pllc CSL. The function * must be called before calling any other API from this CSL. This * function is idem-potent. Currently, the function just return status * CSL_SOK, without doing anything. * * @b Arguments * @verbatim pContext Pointer to module-context. As pllc doesn't have any context based information user is expected to pass NULL. @endverbatim * * <b> Return Value </b> CSL_Status * @li CSL_SOK - Always returns * * <b> Pre Condition </b> * @n None * * <b> Post Condition </b> * @n None * * @b Modifies * @n None * * @b Example
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -