Application Note
21 of 80
002-26071 Rev. *B
2021-09-07
Clock configuration setup in TRAVEO™ T2G family CYT4D series MCUs
Configuration of the clock resources
Functions
Description
Value
Cy_SysClk_FllDisable
Sequence(Wait Cycle)
Disable FLL
Wait Cycle =
WAIT_FOR_STABILIZATION
Cy_SysClk_Pll400M
Disable(PLL Number)
Disable PLL400M_0
PLL number =
PLL_400M_0_PATH_NO
Disable PLL400M_1
PLL number =
PLL_400M_1_PATH_NO
Cy_SysClk_PllDisable
(PLL Number)
Disable the PLL200M_0
PLL number =
PLL_200M_0_PATH_NO
Disable the PLL200M_1
PLL number =
PLL_200M_1_PATH_NO
AllClockConfigurationw()
Clock configuration
–
Cy_SysClk_WcoEnable
(Timeout value)
Set the WCO enable and timeout value
Timeout value =
WAIT_FOR_STABILIZATION
Cy_SysLib_DelayUs(Wait
Time)
Delay by the specified number of
microseconds
Wait time = 1u (1us)
3.2.3
Sample code for the initial configuration of WCO settings
show the sample settings.
Code Listing 11
General configuration of WCO settings
:
/** Wait time definition **/
#define WAIT_FOR_STABILIZATION (10000ul)
:
#define PLL_400M_0_PATH_NO (1ul)
#define PLL_400M_1_PATH_NO (2ul)
#define PLL_200M_0_PATH_NO (3ul)
#define PLL_200M_1_PATH_NO (4ul)
:
static void AllClockConfiguration(void);
:
int main(void)
{
/* disable watchdog timer */
Cy_WDT_Disable();
:
/* Disable Fll */
CY_ASSERT(Cy_SysClk_FllDisableSequence(WAIT_FOR_STABILIZATION) == CY_SYSCLK_SUCCESS);
/* Disable Pll */
CY_ASSERT(Cy_SysClk_Pll400MDisable(PLL_400M_0_PATH_NO) == CY_SYSCLK_SUCCESS);
CY_ASSERT(Cy_SysClk_Pll400MDisable(PLL_400M_1_PATH_NO) == CY_SYSCLK_SUCCESS);
CY_ASSERT(Cy_SysClk_PllDisable(PLL_200M_0_PATH_NO) == CY_SYSCLK_SUCCESS);
CY_ASSERT(Cy_SysClk_PllDisable(PLL_200M_1_PATH_NO) == CY_SYSCLK_SUCCESS);
/* Enable interrupt */
__enable_irq();
/* Set Clock Configuring registers */
AllClockConfiguration();
:
/* Please check clock output using oscilloscope after CPU reached here. */
for(;;);
}
Define the TIMEOUT variable.
WCO setting. See
Watchdog timer disable
Disable the FLL
Define the PLL number.
Disable the PLL.