Data Structures | Macros | Typedefs | Enumerations | Functions
VSF

Data Structures

struct  _VSF_Obj_
 Defines the VSF handle. More...
 

Macros

#define VSF_NUM_DELTA   1
 Defines the changing PWM frequency delta. More...
 
#define VSF_NUM_WAIT_TIME   10
 Defines the changing PWM frequency wait time. More...
 
#define VSF_NUM_MAX_FREQ_HZ   25000
 Defines the maximum PWM frequency. More...
 
#define VSF_NUM_MIN_FREQ_HZ   5000
 Defines the minimum PWM frequency. More...
 

Typedefs

typedef struct _VSF_Obj_ VSF_Obj
 Defines the VSF handle. More...
 
typedef struct _VSF_Obj_VSF_Handle
 Defines the online variable switching frequency (VSF) handle. More...
 

Enumerations

enum  VSF_State_e {
  VSF_STATE_IDLE = 0,
  VSF_STATE_CTRL_SET = 1,
  VSF_STATE_PERIOD_SET = 2,
  VSF_STATE_EST_SET = 3,
  VSF_STATE_ALL_DONE = 4
}
 

Functions

VSF_Handle VSF_init (void *pMemory, const size_t numBytes)
 Initializes the variable switching frequency module. More...
 
void VSF_initParams (VSF_Handle vsfHandle, USER_Params *pUserParams)
 init the variable switching frequency parameters More...
 
void VSF_computeFreqParams (VSF_Handle vsfHandle)
 calculates the variable switching frequency parameters More...
 
uint16_t VSF_getFreq (VSF_Handle vsfHandle)
 Get the current switching frequency. More...
 
VSF_State_e VSF_getState (VSF_Handle vsfHandle)
 Set the variable switching frequency state. More...
 
void VSF_getPeriod (VSF_Handle vsfHandle, uint16_t *pPeriodValue)
 Get the calculated PWM period. More...
 
void VSF_setFreq (VSF_Handle vsfHandle, const uint16_t vsf_Hz)
 Set the variable switching frequency target value. More...
 
void VSF_setFreqDelta (VSF_Handle vsfHandle, const uint16_t pwmFreqDelta_Hz)
 Set the variable switching frequency delta changing value. More...
 
void VSF_setFreqMax (VSF_Handle vsfHandle, const uint16_t pwmFreqMax_Hz)
 Set the variable switching frequency maximum value. More...
 
void VSF_setFreqMin (VSF_Handle vsfHandle, const uint16_t pwmFreqMin_Hz)
 Set the variable switching frequency minimum value. More...
 
void VSF_setPeriod (VSF_Handle vsfHandle)
 Set the variable switching frequency PWM period. More...
 
void VSF_setState (VSF_Handle vsfHandle, const VSF_State_e state)
 Set the variable switching frequency state. More...
 
void VSF_setWaitTime (VSF_Handle vsfHandle, const uint16_t pwmWaitTime)
 Set the variable switching frequency wait time. More...
 

Detailed Description

Macro Definition Documentation

◆ VSF_NUM_DELTA

#define VSF_NUM_DELTA   1

Defines the changing PWM frequency delta.

◆ VSF_NUM_WAIT_TIME

#define VSF_NUM_WAIT_TIME   10

Defines the changing PWM frequency wait time.

◆ VSF_NUM_MAX_FREQ_HZ

#define VSF_NUM_MAX_FREQ_HZ   25000

Defines the maximum PWM frequency.

◆ VSF_NUM_MIN_FREQ_HZ

#define VSF_NUM_MIN_FREQ_HZ   5000

Defines the minimum PWM frequency.

Typedef Documentation

◆ VSF_Obj

typedef struct _VSF_Obj_ VSF_Obj

Defines the VSF handle.

◆ VSF_Handle

typedef struct _VSF_Obj_* VSF_Handle

Defines the online variable switching frequency (VSF) handle.

Enumeration Type Documentation

◆ VSF_State_e

Enumerator
VSF_STATE_IDLE 
VSF_STATE_CTRL_SET 
VSF_STATE_PERIOD_SET 
VSF_STATE_EST_SET 
VSF_STATE_ALL_DONE 

Function Documentation

◆ VSF_init()

VSF_Handle VSF_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the variable switching frequency module.

Parameters
[in]pMemoryA pointer to the variable pwm frequency object memory
[in]numBytesThe number of bytes allocated for the variable pwm frequency object, bytes
Returns
The variable switching frequency object handle

◆ VSF_initParams()

void VSF_initParams ( VSF_Handle  vsfHandle,
USER_Params pUserParams 
)

init the variable switching frequency parameters

Parameters
[in]vsfHandleThe variable switching frequency (VSF) object handle
[in]pUserParamsThe pointer to the user param structure

◆ VSF_computeFreqParams()

void VSF_computeFreqParams ( VSF_Handle  vsfHandle)

calculates the variable switching frequency parameters

Parameters
[in]vsfHandleThe variable switching frequency object handle

◆ VSF_getFreq()

uint16_t VSF_getFreq ( VSF_Handle  vsfHandle)
inline

Get the current switching frequency.

Parameters
[in]Thevariable switching frequency (VSF) object handle
Returns
The current pwm frequency

References _VSF_Obj_::pwmFreqNow_Hz.

◆ VSF_getState()

VSF_State_e VSF_getState ( VSF_Handle  vsfHandle)
inline

Set the variable switching frequency state.

Parameters
[in]Thevariable switching frequency (VSF) object handle
Returns
The current pwm frequency

References _VSF_Obj_::state.

◆ VSF_getPeriod()

void VSF_getPeriod ( VSF_Handle  vsfHandle,
uint16_t *  pPeriodValue 
)
inline

Get the calculated PWM period.

Parameters
[in]Thevariable switching frequency (VSF) object handle
Returns
The current pwm period register value

References _VSF_Obj_::pwmPeriodNow.

◆ VSF_setFreq()

void VSF_setFreq ( VSF_Handle  vsfHandle,
const uint16_t  vsf_Hz 
)
inline

Set the variable switching frequency target value.

Parameters
[in]Thevariable switching frequency (VSF) object handle
[in]Thepwm switching frequency

References _VSF_Obj_::pwmFreqSet_Hz.

◆ VSF_setFreqDelta()

void VSF_setFreqDelta ( VSF_Handle  vsfHandle,
const uint16_t  pwmFreqDelta_Hz 
)
inline

Set the variable switching frequency delta changing value.

Parameters
[in]Thevariable switching frequency (VSF) object handle
[in]Thevvariable switching frequency changing delta value

References _VSF_Obj_::pwmFreqDelta_Hz.

◆ VSF_setFreqMax()

void VSF_setFreqMax ( VSF_Handle  vsfHandle,
const uint16_t  pwmFreqMax_Hz 
)
inline

Set the variable switching frequency maximum value.

Parameters
[in]Thevariable switching frequency (VSF) object handle
[in]Thevvariable switching frequency maximum value

References _VSF_Obj_::pwmFreqMax_Hz.

◆ VSF_setFreqMin()

void VSF_setFreqMin ( VSF_Handle  vsfHandle,
const uint16_t  pwmFreqMin_Hz 
)
inline

Set the variable switching frequency minimum value.

Parameters
[in]Thevariable switching frequency (VSF) object handle
[in]Thevariable switching frequency minimum value

References _VSF_Obj_::pwmFreqMin_Hz.

◆ VSF_setPeriod()

void VSF_setPeriod ( VSF_Handle  vsfHandle)
inline

Set the variable switching frequency PWM period.

Parameters
[in]Thevariable switching frequency (VSF) object handle

References _VSF_Obj_::pwmCounter, _VSF_Obj_::pwmPeriod, _VSF_Obj_::pwmPeriodNow, _VSF_Obj_::pwmWaitTime, _VSF_Obj_::state, VSF_STATE_IDLE, and VSF_STATE_PERIOD_SET.

◆ VSF_setState()

void VSF_setState ( VSF_Handle  vsfHandle,
const VSF_State_e  state 
)
inline

Set the variable switching frequency state.

Parameters
[in]Thevariable switching frequency (VSF) object handle
[in]Thevariable switching frequency state

References _VSF_Obj_::state.

◆ VSF_setWaitTime()

void VSF_setWaitTime ( VSF_Handle  vsfHandle,
const uint16_t  pwmWaitTime 
)
inline

Set the variable switching frequency wait time.

Parameters
[in]Thevariable switching frequency (VSF) object handle
[in]Thevariable switching frequency wait time

References _VSF_Obj_::pwmWaitTime.


Copyright 2023, Texas Instruments Incorporated