Data Structures | Macros | Typedefs | Enumerations | Functions
HALL

Data Structures

struct  _HALL_Obj_
 Defines the HALL controller object. More...
 

Macros

#define HALL_calcAngle   HALL_run
 Runs the HALL controller. More...
 

Typedefs

typedef struct _HALL_Obj_ HALL_Obj
 Defines the HALL controller object. More...
 
typedef struct _HALL_Obj_HALL_Handle
 Defines the HALL handle. More...
 

Enumerations

enum  HALL_Status_e {
  HALL_IDLE = 0,
  HALL_ALIGNMENT = 1,
  HALL_CALIBRATION = 2,
  HALL_RUN = 3
}
 

Functions

HALL_Handle HALL_init (void *pMemory, const size_t numBytes)
 Initializes the HALL controller. More...
 
void HALL_setParams (HALL_Handle handle, const USER_Params *pUserParams)
 Sets the hall estimator parameters. More...
 
void HALL_setAngleBuf (HALL_Handle handle, const float32_t *ptrAngleBuf)
 Sets the angle buffer value for hall estimator. More...
 
void HALL_resetParams (HALL_Handle handle)
 Resets the hall estimator parameters. More...
 
void HALL_setGPIOs (HALL_Handle handle, const uint16_t gpioHallU, const uint16_t gpioHallV, const uint16_t gpioHallW)
 Sets GPIO for hall sensors input. More...
 
static float32_t HALL_getSpeed_Hz (HALL_Handle handle)
 Gets the feedback speed from hall estimator. More...
 
static void HALL_setSpeed_Hz (HALL_Handle handle, const float32_t speedHall_Hz)
 Sets a value to the speed for the hall estimator. More...
 
static void HALL_setTimeStamp (HALL_Handle handle, const uint32_t timeStamp)
 Sets a value to the time stamp for the hall estimator. More...
 
static float32_t HALL_getAngle_rad (HALL_Handle handle)
 Gets the angle from the hall estimator, rad. More...
 
static uint16_t HALL_getInputState (HALL_Handle handle)
 Gets the hall sensors input GPIO state. More...
 
static void HALL_setForceAngleAndIndex (HALL_Handle handle, float32_t speedRef)
 Sets the force angle and index for next step of the hall estimator. More...
 
static void HALL_run (HALL_Handle handle, float32_t speedRef)
 

Detailed Description

Macro Definition Documentation

◆ HALL_calcAngle

#define HALL_calcAngle   HALL_run

Runs the HALL controller.

Parameters
[in]handleThe HALL controller handle
[in]speedRefThe reference speed value to the controller

Typedef Documentation

◆ HALL_Obj

typedef struct _HALL_Obj_ HALL_Obj

Defines the HALL controller object.

◆ HALL_Handle

typedef struct _HALL_Obj_* HALL_Handle

Defines the HALL handle.

Enumeration Type Documentation

◆ HALL_Status_e

Enumerator
HALL_IDLE 
HALL_ALIGNMENT 
HALL_CALIBRATION 
HALL_RUN 

Function Documentation

◆ HALL_init()

HALL_Handle HALL_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the HALL controller.

Parameters
[in]pMemoryA pointer to the memory for the HALL controller object
[in]numBytesThe number of bytes allocated for the HALL controller object, bytes
Returns
The HALL controller (HALL) object handle

◆ HALL_setParams()

void HALL_setParams ( HALL_Handle  handle,
const USER_Params pUserParams 
)

Sets the hall estimator parameters.

Parameters
[in]handleThe HALL controller handle

◆ HALL_setAngleBuf()

void HALL_setAngleBuf ( HALL_Handle  handle,
const float32_t ptrAngleBuf 
)

Sets the angle buffer value for hall estimator.

Parameters
[in]handleThe HALL controller handle

◆ HALL_resetParams()

void HALL_resetParams ( HALL_Handle  handle)

Resets the hall estimator parameters.

Parameters
[in]handleThe HALL controller handle

◆ HALL_setGPIOs()

void HALL_setGPIOs ( HALL_Handle  handle,
const uint16_t  gpioHallU,
const uint16_t  gpioHallV,
const uint16_t  gpioHallW 
)

Sets GPIO for hall sensors input.

Parameters
[in]handlethe HALL Handle

◆ HALL_getSpeed_Hz()

static float32_t HALL_getSpeed_Hz ( HALL_Handle  handle)
inlinestatic

Gets the feedback speed from hall estimator.

Parameters
[in]handlethe ENC Handle

References _HALL_Obj_::speedHall_Hz.

◆ HALL_setSpeed_Hz()

static void HALL_setSpeed_Hz ( HALL_Handle  handle,
const float32_t  speedHall_Hz 
)
inlinestatic

Sets a value to the speed for the hall estimator.

Parameters
[in]handlethe ENC Handle
[in]speedHall_Hzthe speed value, Hz

References _HALL_Obj_::speedHall_Hz.

◆ HALL_setTimeStamp()

static void HALL_setTimeStamp ( HALL_Handle  handle,
const uint32_t  timeStamp 
)
inlinestatic

Sets a value to the time stamp for the hall estimator.

Parameters
[in]handlethe ENC Handle
[in]timeStampthe time stamp value, clock cycles

References _HALL_Obj_::timeStampCAP.

◆ HALL_getAngle_rad()

static float32_t HALL_getAngle_rad ( HALL_Handle  handle)
inlinestatic

Gets the angle from the hall estimator, rad.

Parameters
[in]handlethe ENC Handle

References _HALL_Obj_::thetaHall_rad.

◆ HALL_getInputState()

static uint16_t HALL_getInputState ( HALL_Handle  handle)
inlinestatic

Gets the hall sensors input GPIO state.

Parameters
[in]handlethe ENC Handle

References _HALL_Obj_::gpioHallU, _HALL_Obj_::gpioHallV, and _HALL_Obj_::gpioHallW.

Referenced by HALL_run(), and HALL_setForceAngleAndIndex().

◆ HALL_setForceAngleAndIndex()

static void HALL_setForceAngleAndIndex ( HALL_Handle  handle,
float32_t  speedRef 
)
inlinestatic

Sets the force angle and index for next step of the hall estimator.

Parameters
[in]handleThe HALL controller handle
[in]refValueThe reference value to the controller

References HALL_getInputState(), _HALL_Obj_::hallDirection, _HALL_Obj_::hallIndex, _HALL_Obj_::hallIndexPrev, _HALL_Obj_::hallPrev, MATH_PI, MATH_TWO_PI, _HALL_Obj_::thetaBuff, _HALL_Obj_::thetaDelta_rad, and _HALL_Obj_::thetaHall_rad.

◆ HALL_run()

static void HALL_run ( HALL_Handle  handle,
float32_t  speedRef 
)
inlinestatic

Copyright 2023, Texas Instruments Incorporated