CCU8PWMLIBApp
App Public Data Structures
CCU8PWMLIB App
#define CCU8PWMLIB_EVENT_0   0x01U
#define CCU8PWMLIB_EVENT_1   0x02U
#define CCU8PWMLIB_EVENT_2   0x03U
#define CCU8PWMLIB_ACTIVE_LOW   0x00U
#define CCU8PWMLIB_ACTIVE_HIGH   0x01U
#define CCU8PWMLIB_ALL_CCU8_INTR_CLEAR   0x00000F3FU
#define CCU8PWMLIB_SLICE_CLEAR   0x07U
#define CCU8PWMLIB_LPF   0x0U
#define CCU8PWMLIB_COUNT(PwmTime, Res)   (uint32_t)(PwmTime/Res)
#define CCU8PWMLIB_EDGE_PERIOD_VAL(count)   (uint32_t)(count -1U)
#define CCU8PWMLIB_CENTER_PERIOD_VAL(count)   (uint32_t)((count <<1U) -1U )
#define CCU8PWMLIB_COMPARE_MODE   0x00U
enum  CCU8PWMLIB_StateType { CCU8PWMLIB_UNINITIALIZED, CCU8PWMLIB_INITIALIZED, CCU8PWMLIB_RUNNING, CCU8PWMLIB_STOPPED }
enum  CCU8PWMLIB_CCUInUseType { CCU8PWMLIB_SLICE0, CCU8PWMLIB_SLICE1, CCU8PWMLIB_SLICE2, CCU8PWMLIB_SLICE3 }
enum  CCU8PWMLIB_ErrorCodesType {
  CCU8PWMLIB_OPER_NOT_ALLOWED_ERROR = 1, CCU8PWMLIB_INVALID_PARAM_ERROR, CCU8PWMLIB_IN_TRAP_ERROR, CCU8PWMLIB_FUNCTION_ENTRY,
  CCU8PWMLIB_FUNCTION_EXIT
}
enum  CCU8PWMLIB_DeadTimeConfType { CCU8PWMLIB_DISABLE, CCU8PWMLIB_ENABLE, CCU8PWMLIB_ENABLEDIRECTOUTPUT, CCU8PWMLIB_ENABLEINVERTEDOUTPUT }
enum  CCU8PWMLIB_CompareModeType { CCU8PWMLIB_SYMMETRIC, CCU8PWMLIB_ASYMMETRIC }
enum  CCU8PWMLIB_EdgeTriggerType { CCU8PWMLIB_NOTRIGGER, CCU8PWMLIB_RISINGEDGE, CCU8PWMLIB_FALLINGEDGE, CCU8PWMLIB_BOTHEDGES }
enum  CCU8PWMLIB_CountingModeType { CCU8PWMLIB_EDGE_ALIGNED, CCU8PWMLIB_CENTER_ALIGNED }
enum  CCU8PWMLIB_ExtStartConfigType { CCU8PWMLIB_START_TIMER, CCU8PWMLIB_CLEAR_START_TIMER }
enum  CCU8PWMLIB_ExtStopConfigType { CCU8PWMLIB_STOP_TIMER, CCU8PWMLIB_CLEAR_TIMER, CCU8PWMLIB_CLEAR_STOP_TIMER }
enum  CCU8PWMLIB_EventNameType {
  CCU8PWMLIB_PERIODMATCHEVENT = 0, CCU8PWMLIB_COMPAREMATCHEVENT = 2, CCU8PWMLIB_EXTSTARTEVENT = 8, CCU8PWMLIB_EXTSTOPEVENT = 9,
  CCU8PWMLIB_TRAPEVENT = 10
}
typedef enum CCU8PWMLIB_StateType CCU8PWMLIB_StateType
typedef enum
CCU8PWMLIB_CCUInUseType 
CCU8PWMLIB_CCUInUseType
typedef enum
CCU8PWMLIB_ErrorCodesType 
CCU8PWMLIB_ErrorCodesType
typedef enum
CCU8PWMLIB_DeadTimeConfType 
CCU8PWMLIB_DeadTimeConfType
typedef enum
CCU8PWMLIB_CompareModeType 
CCU8PWMLIB_CompareModeType
typedef enum
CCU8PWMLIB_CountingModeType 
CCU8PWMLIB_CountingModeType
typedef enum
CCU8PWMLIB_ExtStartConfigType 
CCU8PWMLIB_ExtStartConfigType
typedef enum
CCU8PWMLIB_ExtStopConfigType 
CCU8PWMLIB_ExtStopConfigType
typedef enum
CCU8PWMLIB_EventNameType 
CCU8PWMLIB_EventNameType
typedef struct
CCU8PWMLIB_TimerRegsType 
CCU8PWMLIB_TimerRegsType
typedef struct
CCU8PWMLIB_DynamicHandleType 
CCU8PWMLIB_DynamicHandleType
typedef struct
CCU8PWMLIB_HandleType 
CCU8PWMLIB_HandleType

Define Documentation

#define CCU8PWMLIB_ACTIVE_HIGH   0x01U

Active high level

Definition at line 84 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_ACTIVE_LOW   0x00U

Active low level

Definition at line 80 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_ALL_CCU8_INTR_CLEAR   0x00000F3FU

To clear all the interrupts of CCU

Definition at line 88 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_CENTER_PERIOD_VAL (   count)    (uint32_t)((count <<1U) -1U )

This is the period register value in center-aligned mode

Definition at line 109 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_COMPARE_MODE   0x00U

This is the value to set compare mode

Definition at line 112 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_COUNT (   PwmTime,
  Res 
)    (uint32_t)(PwmTime/Res)

To count the period register value from the PWM frequency and the CCU8 clock.

Definition at line 101 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_EDGE_PERIOD_VAL (   count)    (uint32_t)(count -1U)

This is the period register value in edge-aligned mode

Definition at line 105 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_EVENT_0   0x01U

This is mask for Event 0

Definition at line 68 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_EVENT_1   0x02U

This is mask for Event 1

Definition at line 72 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_EVENT_2   0x03U

This is mask for event 2

Definition at line 76 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_LPF   0x0U

low pass filter value

Definition at line 96 of file CCU8PWMLIB.h.

#define CCU8PWMLIB_SLICE_CLEAR   0x07U

To clear the CCU8 slice.

Definition at line 92 of file CCU8PWMLIB.h.


Typedef Documentation

This enumerates the CCU8x_CCy slice used by Single Phase PWM with Dead time APP.

This enumerates the compare mode of the CCU8_CCy slice timer - symmetric comparison or asymmetric comparison

This enumerates the CCU8_CCy slice timer operating mode - edge-aligned or center-aligned.

This enumerates dead time configuration for the CCU8_CCy slice channels

This structure will hold the configuration parameters which change at run time.

This enumerates the error codes of this APP which will be returned from a function as a return parameter.

This enumerates the events of the CCU8PWMLIB app.

This enumerates the external start configuration of the timer.

This enumerates the external stop configuration of the timer.

This structure holds all the static configuration parameters for the Single Phase PWM with Dead Time APP.

This structure enumerates the states of the Single Phase PWM with dead time APP.

This structure holds the values of the compare register, period register.


Enumeration Type Documentation

This enumerates the CCU8x_CCy slice used by Single Phase PWM with Dead time APP.

Enumerator:
CCU8PWMLIB_SLICE0 

This is slice 0 of CCU8

CCU8PWMLIB_SLICE1 

This is slice 1 of CCU8

CCU8PWMLIB_SLICE2 

This is slice 2 of CCU8

CCU8PWMLIB_SLICE3 

This is slice 3 of CCU8

Definition at line 159 of file CCU8PWMLIB.h.

This enumerates the compare mode of the CCU8_CCy slice timer - symmetric comparison or asymmetric comparison

Enumerator:
CCU8PWMLIB_SYMMETRIC 

In this mode channel 1 uses compare register 1 for rising and falling compare match and channel 2 uses compare register 2 for rising and falling compare match. Waveform is symmetric over a PWM period.

CCU8PWMLIB_ASYMMETRIC 

In this mode channel 1 uses compare register 1 for rising compare match and channel 2 uses compare register 2 for falling compare match. Waveform is not symmetric over a period.

Definition at line 237 of file CCU8PWMLIB.h.

This enumerates the CCU8_CCy slice timer operating mode - edge-aligned or center-aligned.

Enumerator:
CCU8PWMLIB_EDGE_ALIGNED 

In this mode with up counting direction, timer counts up to the period value and then clears to zero to start counting again. And in down counting, timer decrements from period value to zero and starts again with period value.

CCU8PWMLIB_CENTER_ALIGNED 

In this mode timer counts up till the period value and then counts down to zero.With down counting selected first, timer will decrement from period value to zero and then will increment again to period value to complete one cycle.

Definition at line 276 of file CCU8PWMLIB.h.

This enumerates dead time configuration for the CCU8_CCy slice channels

Enumerator:
CCU8PWMLIB_DISABLE 

Disable dead time generation

CCU8PWMLIB_ENABLE 

Enable dead time generation

CCU8PWMLIB_ENABLEDIRECTOUTPUT 

Enable dead time generation for direct output

CCU8PWMLIB_ENABLEINVERTEDOUTPUT 

Enable dead time generation for inverted output.

Definition at line 213 of file CCU8PWMLIB.h.

Enumerator:
CCU8PWMLIB_NOTRIGGER 

Trigger is not required.

CCU8PWMLIB_RISINGEDGE 

Trigger on rising edge

CCU8PWMLIB_FALLINGEDGE 

Trigger on falling edge

CCU8PWMLIB_BOTHEDGES 

Trigger on both edges

Definition at line 253 of file CCU8PWMLIB.h.

This enumerates the error codes of this APP which will be returned from a function as a return parameter.

Enumerator:
CCU8PWMLIB_OPER_NOT_ALLOWED_ERROR 

This error code would be returned if the current API operation is not possible because the App is in certain state.

CCU8PWMLIB_INVALID_PARAM_ERROR 

This error code means that the parameter passed to an API are invalid

CCU8PWMLIB_IN_TRAP_ERROR 

This error code means that the trap condition is set.

CCU8PWMLIB_FUNCTION_ENTRY 

DebugLog Message Id for Function Entry

CCU8PWMLIB_FUNCTION_EXIT 

DebugLog Message Id for Function Exit

Definition at line 183 of file CCU8PWMLIB.h.

This enumerates the events of the CCU8PWMLIB app.

Enumerator:
CCU8PWMLIB_PERIODMATCHEVENT 

This is the period match interrupt

CCU8PWMLIB_COMPAREMATCHEVENT 

This is the compare match while counting UP interrupt

CCU8PWMLIB_EXTSTARTEVENT 

This is the external start interrupt i.e. Event 0 interrupt

CCU8PWMLIB_EXTSTOPEVENT 

This is the external stop interrupt i.e. Event 1 interrupt

CCU8PWMLIB_TRAPEVENT 

This is the trap interrupt i.e. Event 2 interrupt

Definition at line 332 of file CCU8PWMLIB.h.

This enumerates the external start configuration of the timer.

Enumerator:
CCU8PWMLIB_START_TIMER 

This will set the run bit of the timer.

CCU8PWMLIB_CLEAR_START_TIMER 

This will first clear the timer and then set the run bit of the timer.

Definition at line 297 of file CCU8PWMLIB.h.

This enumerates the external stop configuration of the timer.

Enumerator:
CCU8PWMLIB_STOP_TIMER 

This will reset the RUN bit of the timer

CCU8PWMLIB_CLEAR_TIMER 

This will clear the timer register value but keeps the timer running.

CCU8PWMLIB_CLEAR_STOP_TIMER 

This will clear the timer register value and also clears the RUN bit of the timer.

Definition at line 312 of file CCU8PWMLIB.h.

This structure enumerates the states of the Single Phase PWM with dead time APP.

Enumerator:
CCU8PWMLIB_UNINITIALIZED 

This is the default state after power on reset

CCU8PWMLIB_INITIALIZED 

This is the INITIALIZED state in which APP is initialized as per selected parameters

CCU8PWMLIB_RUNNING 

This state indicates that CCU8_CCy slice is running in PWM mode.

CCU8PWMLIB_STOPPED 

This state indicates that CCU4_CCy slice timer is stopped.

Definition at line 133 of file CCU8PWMLIB.h.