Data Structures | Macros | Typedefs | Functions | Variables
SSIPD

Data Structures

struct  _SSIPD_obj_
 Defines the SSIPD_Obj object. More...
 

Macros

#define SSIPD_DEBUG   1
 
#define SSIPD_DETECT_NUM   24.0f
 
#define SSIPD_BUFF_NUM   (uint16_t)(SSIPD_DETECT_NUM + 2)
 

Typedefs

typedef struct _SSIPD_obj_ SSIPD_Obj
 Defines the SSIPD_Obj object. More...
 
typedef struct _SSIPD_obj_SSIPD_Handle
 Defines the SSIPD handle. More...
 

Functions

SSIPD_Handle SSIPD_init (void *pMemory, const size_t numBytes)
 Initializes the SSIPD object. More...
 
void SSIPD_setParams (SSIPD_Handle handle, const float32_t volSet_V, const float32_t angleInc_rad, const uint16_t pulseWidth)
 Sets the SSIPD parameters. More...
 
static bool SSIPD_getFlagEnablePWM (SSIPD_Handle handle)
 Gets the enable PWM flag. More...
 
static bool SSIPD_getRunState (SSIPD_Handle handle)
 Gets the SSIPD state. More...
 
static float32_t SSIPD_getDoneStatus (SSIPD_Handle handle)
 Gets the SSIPD state. More...
 
static float32_t SSIPD_getAngleOut_rad (SSIPD_Handle handle)
 Gets the SSIPD state. More...
 
static float32_t SSIPD_getAngleCmd_rad (SSIPD_Handle handle)
 Gets the SSIPD state. More...
 
static float32_t SSIPD_getVolInject_V (SSIPD_Handle handle)
 Gets the SSIPD state. More...
 
static void SSIPD_start (SSIPD_Handle handle)
 Runs six-pulse initial position detection. More...
 
static void SSIPD_reset (SSIPD_Handle handle)
 Runs six-pulse initial position detection. More...
 
static void SSIPD_inine_run (SSIPD_Handle handle, MATH_Vec2 *pIab)
 Runs six-pulse initial position detection. More...
 

Variables

float32_t IsPeakBuff [(uint16_t)(24.0f+2)]
 
float32_t AngleBuff [(uint16_t)(24.0f+2)]
 
uint16_t peakBuffcnt
 

Detailed Description

Macro Definition Documentation

◆ SSIPD_DEBUG

#define SSIPD_DEBUG   1

◆ SSIPD_DETECT_NUM

#define SSIPD_DETECT_NUM   24.0f

◆ SSIPD_BUFF_NUM

#define SSIPD_BUFF_NUM   (uint16_t)(SSIPD_DETECT_NUM + 2)

Typedef Documentation

◆ SSIPD_Obj

typedef struct _SSIPD_obj_ SSIPD_Obj

Defines the SSIPD_Obj object.

◆ SSIPD_Handle

typedef struct _SSIPD_obj_* SSIPD_Handle

Defines the SSIPD handle.

Function Documentation

◆ SSIPD_init()

SSIPD_Handle SSIPD_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the SSIPD object.

Parameters
[in]*pMemoryPointer in to the SSIPD object
[in]numBytesSize of the object
Returns
The SSIPD object handle

◆ SSIPD_setParams()

void SSIPD_setParams ( SSIPD_Handle  handle,
const float32_t  volSet_V,
const float32_t  angleInc_rad,
const uint16_t  pulseWidth 
)

Sets the SSIPD parameters.

Parameters
[in]handleThe SSIPD handle
[in]valueThe injection voltage
[in]valueThe angle delta
Returns
None

◆ SSIPD_getFlagEnablePWM()

static bool SSIPD_getFlagEnablePWM ( SSIPD_Handle  handle)
inlinestatic

Gets the enable PWM flag.

Parameters
[in]handleThe SSIPD handle
Returns
the flag enable PWM

References _SSIPD_obj_::flagEnablePWM.

◆ SSIPD_getRunState()

static bool SSIPD_getRunState ( SSIPD_Handle  handle)
inlinestatic

Gets the SSIPD state.

Parameters
[in]handleThe SSIPD handle
Returns
SSIPD running state

References _SSIPD_obj_::flagRunState.

◆ SSIPD_getDoneStatus()

static float32_t SSIPD_getDoneStatus ( SSIPD_Handle  handle)
inlinestatic

Gets the SSIPD state.

Parameters
[in]handleThe SSIPD handle
Returns
SSIPD state

References _SSIPD_obj_::flagDoneStatus.

◆ SSIPD_getAngleOut_rad()

static float32_t SSIPD_getAngleOut_rad ( SSIPD_Handle  handle)
inlinestatic

Gets the SSIPD state.

Parameters
[in]handleThe SSIPD handle
Returns
Angle output

References _SSIPD_obj_::angleOut_rad.

◆ SSIPD_getAngleCmd_rad()

static float32_t SSIPD_getAngleCmd_rad ( SSIPD_Handle  handle)
inlinestatic

Gets the SSIPD state.

Parameters
[in]handleThe SSIPD handle
Returns
Angle detection value

References _SSIPD_obj_::angleCmd_rad.

◆ SSIPD_getVolInject_V()

static float32_t SSIPD_getVolInject_V ( SSIPD_Handle  handle)
inlinestatic

Gets the SSIPD state.

Parameters
[in]handleThe SSIPD handle
Returns
Injection voltage

References _SSIPD_obj_::VqInject_V.

◆ SSIPD_start()

static void SSIPD_start ( SSIPD_Handle  handle)
inlinestatic

Runs six-pulse initial position detection.

Parameters
[in]handleThe SSIPD handle
[in]pIabThe pointer to the input vector
Returns
None

References _SSIPD_obj_::angleCmd_rad, _SSIPD_obj_::angleOut_rad, _SSIPD_obj_::angleTemp_rad, _SSIPD_obj_::flagDirection, _SSIPD_obj_::flagRunState, _SSIPD_obj_::IsPeak_A, peakBuffcnt, and _SSIPD_obj_::pulseCount.

◆ SSIPD_reset()

static void SSIPD_reset ( SSIPD_Handle  handle)
inlinestatic

Runs six-pulse initial position detection.

Parameters
[in]handleThe SSIPD handle
[in]pIabThe pointer to the input vector
Returns
None

References _SSIPD_obj_::angleCmd_rad, _SSIPD_obj_::angleOut_rad, _SSIPD_obj_::angleTemp_rad, _SSIPD_obj_::flagDirection, _SSIPD_obj_::flagDoneStatus, _SSIPD_obj_::flagEnablePWM, _SSIPD_obj_::flagRunState, _SSIPD_obj_::IsPeak_A, peakBuffcnt, and _SSIPD_obj_::pulseCount.

◆ SSIPD_inine_run()

static void SSIPD_inine_run ( SSIPD_Handle  handle,
MATH_Vec2 pIab 
)
inlinestatic

Variable Documentation

◆ IsPeakBuff

float32_t IsPeakBuff[(uint16_t)(24.0f+2)]

Referenced by SSIPD_inine_run().

◆ AngleBuff

float32_t AngleBuff[(uint16_t)(24.0f+2)]

Referenced by SSIPD_inine_run().

◆ peakBuffcnt

uint16_t peakBuffcnt

Copyright 2023, Texas Instruments Incorporated