Functions | |
| cy_en_sysclk_status_t | Cy_SysClk_PllSetSource (uint32_t pllNum, cy_en_sysclk_pll_src_t source) |
| Selects the PLL reference clock of the selected HFCLK. More... | |
| __STATIC_INLINE cy_en_sysclk_pll_src_t | Cy_SysClk_PllGetSource (uint32_t pllNum) |
| Returns the clock source of the specified PLL. More... | |
| cy_en_sysclk_status_t | Cy_SysClk_PllConfigure (uint32_t pllNum, const cy_stc_sysclk_pll_config_t *config) |
| Configures a given PLL. More... | |
| cy_en_sysclk_status_t | Cy_SysClk_PllManualConfigure (uint32_t pllNum, const cy_stc_sysclk_pll_manual_config_t *config) |
| Manually configures a PLL based on user inputs. More... | |
| cy_en_sysclk_status_t | Cy_SysClk_PllEnable (uint32_t pllNum, uint32_t timeoutUs) |
| Enables the PLL. More... | |
| void | Cy_SysClk_PllGetConfiguration (uint32_t pllNum, cy_stc_sysclk_pll_manual_config_t *config) |
| Reports configuration settings for a PLL. More... | |
| uint32_t | Cy_SysClk_PllGetFrequency (uint32_t pllNum) |
| Reports the output frequency of the specified PLL. More... | |
| __STATIC_INLINE bool | Cy_SysClk_PllIsEnabled (uint32_t pllNum) |
| Reports whether or not the selected PLL is enabled. More... | |
| __STATIC_INLINE bool | Cy_SysClk_PllIsLocked (uint32_t pllNum) |
| Reports whether or not the selected PLL is locked. More... | |
| void | Cy_SysClk_PllBypass (uint32_t pllNum, cy_en_sysclk_pll_bypass_t mode) |
| Sets PLL bypass mode. More... | |
| __STATIC_INLINE cy_en_sysclk_pll_bypass_t | Cy_SysClk_PllGetBypassState (uint32_t pllNum) |
| Returns the PLL bypass state. More... | |
| __STATIC_INLINE bool | Cy_SysClk_PllLostLock (uint32_t pllNum) |
| Reports whether or not the selected PLL lost its lock since the last time this function was called. More... | |
| __STATIC_INLINE void | Cy_SysClk_PllDisable (uint32_t pllNum) |
| Disables the selected PLL. More... | |
| cy_en_sysclk_status_t Cy_SysClk_PllSetSource | ( | uint32_t | pllNum, |
| cy_en_sysclk_pll_src_t | source | ||
| ) |
Selects the PLL reference clock of the selected HFCLK.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. |
| source | cy_en_sysclk_pll_src_t |
| __STATIC_INLINE cy_en_sysclk_pll_src_t Cy_SysClk_PllGetSource | ( | uint32_t | pllNum | ) |
Returns the clock source of the specified PLL.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. For other pllNum values the default CY_SYSCLK_PLL_SRC_ECO value is returned. |
| cy_en_sysclk_status_t Cy_SysClk_PllConfigure | ( | uint32_t | pllNum, |
| const cy_stc_sysclk_pll_config_t * | config | ||
| ) |
Configures a given PLL.
The configuration formula used is:
Fout = Fin * P / (Q + 1) / (1 << OUT)
where:
Fout is the real PLL output frequency
Fin is the frequency of the input clock source
P is the feedback divider. Its value is in bitfield FEEDBACK_DIV.
Q is the reference divider. Its value is in bitfield REFERENCE_DIV.
OUT is the output divider. Its value is in bitfield OUTPUT_DIV.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. |
| config | The pointer to a configuration structure cy_stc_sysclk_pll_config_t |
| cy_en_sysclk_status_t Cy_SysClk_PllManualConfigure | ( | uint32_t | pllNum, |
| const cy_stc_sysclk_pll_manual_config_t * | config | ||
| ) |
Manually configures a PLL based on user inputs.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. |
| config | cy_stc_sysclk_pll_manual_config_t |
| cy_en_sysclk_status_t Cy_SysClk_PllEnable | ( | uint32_t | pllNum, |
| uint32_t | timeoutUs | ||
| ) |
Enables the PLL.
The PLL should be configured before calling this function.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. |
| timeoutUs | amount of time in microseconds to wait for the PLL to lock. If the lock doesn't occur, PLL is stopped. To avoid waiting for lock, set this to 0 and manually check for lock using Cy_SysClk_PllIsLocked. |
| void Cy_SysClk_PllGetConfiguration | ( | uint32_t | pllNum, |
| cy_stc_sysclk_pll_manual_config_t * | config | ||
| ) |
Reports configuration settings for a PLL.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. |
| config | cy_stc_sysclk_pll_manual_config_t |
| uint32_t Cy_SysClk_PllGetFrequency | ( | uint32_t | pllNum | ) |
Reports the output frequency of the specified PLL.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. |
| __STATIC_INLINE bool Cy_SysClk_PllIsEnabled | ( | uint32_t | pllNum | ) |
Reports whether or not the selected PLL is enabled.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. For other pllNum values the false (disabled) is returned. |
| __STATIC_INLINE bool Cy_SysClk_PllIsLocked | ( | uint32_t | pllNum | ) |
Reports whether or not the selected PLL is locked.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. For other pllNum values the false (unlocked) is returned. |
| void Cy_SysClk_PllBypass | ( | uint32_t | pllNum, |
| cy_en_sysclk_pll_bypass_t | mode | ||
| ) |
Sets PLL bypass mode.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. |
| mode | the bypass mode cy_en_sysclk_pll_bypass_t. |
| __STATIC_INLINE cy_en_sysclk_pll_bypass_t Cy_SysClk_PllGetBypassState | ( | uint32_t | pllNum | ) |
Returns the PLL bypass state.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. |
| __STATIC_INLINE bool Cy_SysClk_PllLostLock | ( | uint32_t | pllNum | ) |
Reports whether or not the selected PLL lost its lock since the last time this function was called.
Clears the lost lock indicator.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. For other pllNum values the false (did not lose lock) is returned. |
| __STATIC_INLINE void Cy_SysClk_PllDisable | ( | uint32_t | pllNum | ) |
Disables the selected PLL.
| pllNum | the number of PLL instance, starting from 0. If there is only one PLL in device - the 0 is the only valid number. |