iLLD_TC29x  1.0
How to use the Scu Clock driver?
Collaboration diagram for How to use the Scu Clock driver?:

The Scu Clock control unit driver provides a default configuration for pll and Clock initialisation and set of peripheral clock configuration functions.

In the following sections it will be described, how to integrate the driver into the application framework.

Preparation

Include Files

Include following header file into your C code:

Variables

Declare the Clock Configuration variables in your C code:

// used globally
// configuration for the PLL steps
static IfxScuCcu_PllStepsConfig IfxScuCcu_testPllConfigSteps[] = {
};
// Default configuration for the Clock Configuration
IfxScuCcu_Config IfxScuCcu_testClockConfig = {
{
sizeof(IfxScuCcu_testPllConfigSteps) / sizeof(IfxScuCcu_PllStepsConfig),
(IfxScuCcu_PllStepsConfig *)IfxScuCcu_testPllConfigSteps,
},
};

Module Initialisation

The module initialisation can be done in the same function. Here an example:

// standard PLL & clock initialisation
IfxScuCcu_init(&IfxScuCcu_testClockConfig);

The PLL and clocks are now initialised based on the IFXSCU_CFG_XTAL_FREQ and IFXSCU_CFG_PLL_FREQ values configured in Ifx_Cfg.h.