Functions | |
cy_en_sysclk_status_t | Cy_SysClk_PeriphSetDivider (cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum, uint32_t dividerValue) |
Sets one of the programmable clock dividers. More... | |
uint32_t | Cy_SysClk_PeriphGetDivider (cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum) |
Returns the integer divider value for the specified divider. More... | |
cy_en_sysclk_status_t | Cy_SysClk_PeriphSetFracDivider (cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum, uint32_t dividerIntValue, uint32_t dividerFracValue) |
Sets one of the programmable clock dividers. More... | |
void | Cy_SysClk_PeriphGetFracDivider (cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum, uint32_t *dividerIntValue, uint32_t *dividerFracValue) |
Reports the integer and fractional parts of the divider. More... | |
cy_en_sysclk_status_t | Cy_SysClk_PeriphAssignDivider (en_clk_dst_t periphNum, cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum) |
Assigns a programmable divider to a selected IP block, such as a TCPWM or SCB. More... | |
cy_en_sysclk_status_t | Cy_SysClk_PeriphEnableDivider (cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum) |
Enables the selected divider. More... | |
cy_en_sysclk_status_t | Cy_SysClk_PeriphDisableDivider (cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum) |
Disables a selected divider. More... | |
cy_en_sysclk_status_t | Cy_SysClk_PeriphEnablePhaseAlignDivider (cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum, cy_en_sysclk_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... | |
bool | Cy_SysClk_PeriphDividerIsEnabled (cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum) |
Reports the enabled/disabled state of the selected divider. More... | |
uint32_t | Cy_SysClk_PeriphGetFrequency (cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum) |
Reports the frequency of the output of a given peripheral divider. More... | |
uint32_t | Cy_SysClk_PeriphSetFrequency (cy_en_sysclk_divider_types_t dividerType, uint32_t dividerNum, uint32_t frequency) |
Calculates the dividing factor for the desired frequency, applies it to the specified peripheral divider and reports the achieved frequency. More... | |
__STATIC_INLINE uint32_t | Cy_SysClk_PeriphGetAssignedDivider (en_clk_dst_t periphNum) |
Reports which clock divider is assigned to a selected IP block. More... | |
cy_en_sysclk_status_t Cy_SysClk_PeriphSetDivider | ( | cy_en_sysclk_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_sysclk_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). |
uint32_t Cy_SysClk_PeriphGetDivider | ( | cy_en_sysclk_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_sysclk_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |
cy_en_sysclk_status_t Cy_SysClk_PeriphSetFracDivider | ( | cy_en_sysclk_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_sysclk_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 HFCLK. 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. |
void Cy_SysClk_PeriphGetFracDivider | ( | cy_en_sysclk_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_sysclk_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 |
cy_en_sysclk_status_t Cy_SysClk_PeriphAssignDivider | ( | en_clk_dst_t | periphNum, |
cy_en_sysclk_divider_types_t | dividerType, | ||
uint32_t | dividerNum | ||
) |
Assigns a programmable divider to a selected IP block, such as a TCPWM or SCB.
periphNum | specifies the peripheral block en_clk_dst_t. |
dividerType | specifies which type of divider to use; cy_en_sysclk_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |
cy_en_sysclk_status_t Cy_SysClk_PeriphEnableDivider | ( | cy_en_sysclk_divider_types_t | dividerType, |
uint32_t | dividerNum | ||
) |
Enables the selected divider.
dividerType | specifies which type of divider to use; cy_en_sysclk_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |
cy_en_sysclk_status_t Cy_SysClk_PeriphDisableDivider | ( | cy_en_sysclk_divider_types_t | dividerType, |
uint32_t | dividerNum | ||
) |
Disables a selected divider.
dividerType | specifies which type of divider to use; cy_en_sysclk_divider_types_t. |
dividerNum | specifies which divider of the selected type to configure. |
cy_en_sysclk_status_t Cy_SysClk_PeriphEnablePhaseAlignDivider | ( | cy_en_sysclk_divider_types_t | dividerType, |
uint32_t | dividerNum, | ||
cy_en_sysclk_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_sysclk_divider_types_t. |
dividerNum | specifies which divider of the selected type to configure. |
dividerTypePA | type of divider to phase-align to; cy_en_sysclk_divider_types_t. |
dividerNumPA | divider number of type specified to phase align to. |
bool Cy_SysClk_PeriphDividerIsEnabled | ( | cy_en_sysclk_divider_types_t | dividerType, |
uint32_t | dividerNum | ||
) |
Reports the enabled/disabled state of the selected divider.
dividerType | specifies which type of divider to use; cy_en_sysclk_divider_types_t. |
dividerNum | specifies which divider of the selected type to configure. |
uint32_t Cy_SysClk_PeriphGetFrequency | ( | cy_en_sysclk_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_sysclk_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |
uint32_t Cy_SysClk_PeriphSetFrequency | ( | cy_en_sysclk_divider_types_t | dividerType, |
uint32_t | dividerNum, | ||
uint32_t | frequency | ||
) |
Calculates the dividing factor for the desired frequency, applies it to the specified peripheral divider and reports the achieved frequency.
dividerType | specifies which type of divider to use cy_en_sysclk_divider_types_t |
dividerNum | specifies which divider of the selected type to configure |
frequency | specifies the desired frequency, in Hz. |
__STATIC_INLINE uint32_t Cy_SysClk_PeriphGetAssignedDivider | ( | en_clk_dst_t | periphNum | ) |
Reports which clock divider is assigned to a selected IP block.
periphNum | specifies the peripheral block en_clk_dst_t. |