Functions | |
__STATIC_INLINE cy_en_sysclk_status_t | Cy_SysClk_PeriphSetDivider (cy_en_divider_types_t dividerType, uint32_t dividerNum, uint32_t dividerValue) |
Sets one of the programmable clock dividers. More... | |
__STATIC_INLINE uint32_t | Cy_SysClk_PeriphGetDivider (cy_en_divider_types_t dividerType, uint32_t dividerNum) |
Returns the integer divider value for the specified divider. More... | |
__STATIC_INLINE cy_en_sysclk_status_t | Cy_SysClk_PeriphSetFracDivider (cy_en_divider_types_t dividerType, uint32_t dividerNum, uint32_t dividerIntValue, uint32_t dividerFracValue) |
Sets one of the programmable clock dividers. More... | |
__STATIC_INLINE void | Cy_SysClk_PeriphGetFracDivider (cy_en_divider_types_t dividerType, uint32_t dividerNum, uint32_t *dividerIntValue, uint32_t *dividerFracValue) |
Reports the integer and fractional parts of the divider. More... | |
__STATIC_INLINE cy_en_sysclk_status_t | Cy_SysClk_PeriphAssignDivider (en_clk_dst_t ipBlock, cy_en_divider_types_t dividerType, uint32_t dividerNum) |
Assigns a programmable divider to a selected IP block, such as a TCPWM or SCB. More... | |
__STATIC_INLINE uint32_t | Cy_SysClk_PeriphGetAssignedDivider (en_clk_dst_t ipBlock) |
Reports which clock divider is assigned to a selected IP block. More... | |
__STATIC_INLINE cy_en_sysclk_status_t | Cy_SysClk_PeriphEnableDivider (cy_en_divider_types_t dividerType, uint32_t dividerNum) |
Enables the selected divider. More... | |
__STATIC_INLINE cy_en_sysclk_status_t | Cy_SysClk_PeriphDisableDivider (cy_en_divider_types_t dividerType, uint32_t dividerNum) |
Disables a selected divider. More... | |
__STATIC_INLINE cy_en_sysclk_status_t | Cy_SysClk_PeriphEnablePhaseAlignDivider (cy_en_divider_types_t dividerType, uint32_t dividerNum, cy_en_divider_types_t dividerTypePA, uint32_t dividerNumPA) |
First disables a selected divider (Cy_SysClk_PeriphDisableDivider), then aligns that divider to another programmable divider, and enables the selected divider. More... | |
__STATIC_INLINE bool | Cy_SysClk_PeriphGetDividerEnabled (cy_en_divider_types_t dividerType, uint32_t dividerNum) |
Reports the enabled/disabled atate of the selected divider. More... | |
uint32_t | Cy_SysClk_PeriphGetFrequency (cy_en_divider_types_t dividerType, uint32_t dividerNum) |
Reports the frequency of the output of a given peripheral divider. More... | |
__STATIC_INLINE cy_en_sysclk_status_t Cy_SysClk_PeriphSetDivider | ( | cy_en_divider_types_t | dividerType, |
uint32_t | dividerNum, | ||
uint32_t | dividerValue | ||
) |
Sets one of the programmable clock dividers.
This is only used for integer dividers. Use Cy_SysClk_PeriphSetFracDivider for setting factional dividers.
dividerType | specifies which type of divider to use; cy_en_divider_types_t |
dividerNum | the divider number. |
dividerValue | divider value Causes integer division of (divider value + 1), or division by 1 to 256 (8-bit divider) or 1 to 65536 (16-bit divider). |
__STATIC_INLINE uint32_t Cy_SysClk_PeriphGetDivider | ( | cy_en_divider_types_t | dividerType, |
uint32_t | dividerNum | ||
) |
Returns the integer divider value for the specified divider.
One works for integer dividers. Use Cy_SysClk_PeriphGetFracDivider to get the fractional divider value
dividerType | specifies which type of divider to use; cy_en_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |
__STATIC_INLINE cy_en_sysclk_status_t Cy_SysClk_PeriphSetFracDivider | ( | cy_en_divider_types_t | dividerType, |
uint32_t | dividerNum, | ||
uint32_t | dividerIntValue, | ||
uint32_t | dividerFracValue | ||
) |
Sets one of the programmable clock dividers.
This function should only be used for fractional clock dividers.
dividerType | specifies which type of divider to use; cy_en_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |
dividerIntValue | the integer divider value The source of the divider is peri_clk, which is a divided version of hf_clk[0]. The divider value causes integer division of (divider value + 1), or division by 1 to 65536 (16-bit divider) or 1 to 16777216 (24-bit divider). |
dividerFracValue | the fraction part of the divider The fractional divider can be 1-32, thus it divides the clock by 1/32 for each count. To divide the clock by 11/32nds set this value to 11. |
__STATIC_INLINE void Cy_SysClk_PeriphGetFracDivider | ( | cy_en_divider_types_t | dividerType, |
uint32_t | dividerNum, | ||
uint32_t * | dividerIntValue, | ||
uint32_t * | dividerFracValue | ||
) |
Reports the integer and fractional parts of the divider.
dividerType | specifies which type of divider to use; cy_en_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |
*dividerIntValue | pointer to return integer divider value |
*dividerFracValue | pointer to return fractional divider value |
__STATIC_INLINE cy_en_sysclk_status_t Cy_SysClk_PeriphAssignDivider | ( | en_clk_dst_t | ipBlock, |
cy_en_divider_types_t | dividerType, | ||
uint32_t | dividerNum | ||
) |
Assigns a programmable divider to a selected IP block, such as a TCPWM or SCB.
ipBlock | specifies ip block to connect the clock divider to. |
dividerType | specifies which type of divider to use; cy_en_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |
__STATIC_INLINE uint32_t Cy_SysClk_PeriphGetAssignedDivider | ( | en_clk_dst_t | ipBlock | ) |
Reports which clock divider is assigned to a selected IP block.
ipBlock | specifies ip block to connect the clock divider to. |
__STATIC_INLINE cy_en_sysclk_status_t Cy_SysClk_PeriphEnableDivider | ( | cy_en_divider_types_t | dividerType, |
uint32_t | dividerNum | ||
) |
Enables the selected divider.
dividerType | specifies which type of divider to use; cy_en_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |
__STATIC_INLINE cy_en_sysclk_status_t Cy_SysClk_PeriphDisableDivider | ( | cy_en_divider_types_t | dividerType, |
uint32_t | dividerNum | ||
) |
Disables a selected divider.
dividerType | specifies which type of divider to use; cy_en_divider_types_t. |
dividerNum | specifies which divider of the selected type to configure. |
__STATIC_INLINE cy_en_sysclk_status_t Cy_SysClk_PeriphEnablePhaseAlignDivider | ( | cy_en_divider_types_t | dividerType, |
uint32_t | dividerNum, | ||
cy_en_divider_types_t | dividerTypePA, | ||
uint32_t | dividerNumPA | ||
) |
First disables a selected divider (Cy_SysClk_PeriphDisableDivider), then aligns that divider to another programmable divider, and enables the selected divider.
The divider to align to must already be enabled in order to align a divider to it.
dividerType | specifies which type of divider to use; cy_en_divider_types_t. |
dividerNum | specifies which divider of the selected type to configure. |
dividerTypePA | type of divider to phase-align to; cy_en_divider_types_t. |
dividerNumPA | divider number of type specified to phase align to. |
__STATIC_INLINE bool Cy_SysClk_PeriphGetDividerEnabled | ( | cy_en_divider_types_t | dividerType, |
uint32_t | dividerNum | ||
) |
Reports the enabled/disabled atate of the selected divider.
dividerType | specifies which type of divider to use; cy_en_divider_types_t. |
dividerNum | specifies which divider of the selected type to configure. |
uint32_t Cy_SysClk_PeriphGetFrequency | ( | cy_en_divider_types_t | dividerType, |
uint32_t | dividerNum | ||
) |
Reports the frequency of the output of a given peripheral divider.
dividerType | specifies which type of divider to use; cy_en_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |