iLLD_TC27xC  1.0
Module Initialize Functions
Collaboration diagram for Module Initialize Functions:

Functions

IFX_EXTERN void IfxCcu6_PwmBc_initModule (IfxCcu6_PwmBc *pwmBc, const IfxCcu6_PwmBc_Config *config)
 Initialises the module with default configuration. More...
 
IFX_EXTERN void IfxCcu6_PwmBc_initModuleConfig (IfxCcu6_PwmBc_Config *config, Ifx_CCU6 *ccu6)
 Fills the config structure with default values. More...
 

Detailed Description

Function Documentation

IFX_EXTERN void IfxCcu6_PwmBc_initModule ( IfxCcu6_PwmBc pwmBc,
const IfxCcu6_PwmBc_Config config 
)

Initialises the module with default configuration.

Parameters
pwmBcModule handle
configConfiguration structure of the module
Returns
None
// create configuration
IfxCcu6_PwmBc_initModuleConfig(&pwmBcConfig, &MODULE_CCU60);
// configure the frequencies of both the timers
pwmBcConfig.base.t12Frequency = 400000;
pwmBcConfig.base.t13Frequency = 400000;
// configure the periods of both the timers
pwmBcConfig.base.t12Period = 100;
pwmBcConfig.base.t13Period = 100;
// configure the phase delay and noise filter for hall input
pwmBcConfig.base.phaseDelay = 20;
pwmBcConfig.base.noiseFilter = 10;
// select the active state of the output
// configure timer12
pwmBcConfig.timer12.counterValue = 0;
// configure timer13
pwmBcConfig.timer13.counterValue = 0;
pwmBcConfig.timer13.compareValue = 100;
// configure the syncronisation, in case of sync start with T12
// configure hall sync event that starts the hall input pattern evaluation
// configure multi channel control
// pin configuration
const IfxCcu6_PwmBc_Pins pins = {
IfxCcu60_CC60_P02_0_OUT, // CC60Out pin
IfxCcu60_CC61_P02_2_OUT, // CC61Out pin
IfxCcu60_CC62_P02_4_OUT, // CC62Out pin
IfxCcu60_COUT60_P02_3_OUT, // COUT61 pin
IfxCcu60_COUT60_P02_5_OUT, // COUT62 pin
NULL, // COUT63 pin not used
IfxCcu60_COUT60_P02_6_OUT // CCPOS0In pin
IfxCcu60_COUT60_P02_7_OUT // CCPOS1In pin
IfxCcu60_COUT60_P02_8_OUT // CCPOS2In pin
};
pwmBcConfig.pins = &pins;
// configure the interrupts
pwmBcConfig.interrupt.priority = IFX_INTRPRIO_CCU6;
// configure input and output triggers
// initialize the module
IfxCcu6_PwmBc_initModule(&pwmBc, &pwmBcConfig);

Definition at line 51 of file IfxCcu6_PwmBc.c.

IFX_EXTERN void IfxCcu6_PwmBc_initModuleConfig ( IfxCcu6_PwmBc_Config config,
Ifx_CCU6 *  ccu6 
)

Fills the config structure with default values.

Parameters
configConfiguration structure of the module
ccu6Pointer to the base of CCU6 registers
Returns
None

A coding example can be found in IfxCcu6_PwmBc_initModule

Definition at line 283 of file IfxCcu6_PwmBc.c.