AM243x Motor Control SDK  09.02.00

Introduction

Here is the list of HALL function APIs

Files

file  hall.h
 Contains hall encoder functions implementation.
 

Data Structures

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

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...
 
static void HALL_resetParams (HALL_Handle handle)
 Resets the hall estimator parameters. More...
 
static void HALL_setGPIOs (HALL_Handle handle, const uint32_t gpioHallU, const uint32_t gpioHallV, const uint32_t gpioHallW, const uint32_t gpioHallUBase, const uint32_t gpioHallVBase, const uint32_t gpioHallWBase)
 Sets GPIO for hall sensors input. 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 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_setAngleDelta_rad (HALL_Handle handle, const float32_t thetaDelta_rad)
 Sets a value to the theta offset 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 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)
 

Typedefs

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 }
 

Macros

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

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_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
[in]pUserParamsThe pointer to User_Params object

◆ 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
[in]ptrAngleBufThe pointer to the angle buffer

◆ HALL_resetParams()

static void HALL_resetParams ( HALL_Handle  handle)
inlinestatic

Resets the hall estimator parameters.

Parameters
[in]handleThe HALL controller handle

◆ HALL_setGPIOs()

static void HALL_setGPIOs ( HALL_Handle  handle,
const uint32_t  gpioHallU,
const uint32_t  gpioHallV,
const uint32_t  gpioHallW,
const uint32_t  gpioHallUBase,
const uint32_t  gpioHallVBase,
const uint32_t  gpioHallWBase 
)
inlinestatic

Sets GPIO for hall sensors input.

Parameters
[in]handlethe HALL Handle
[in]gpioHallUGPIO pin for Hall U
[in]gpioHallVGPIO pin for Hall V
[in]gpioHallWGPIO pin for Hall W
[in]gpioHallUBasethe GPIO base address for Hall U
[in]gpioHallVBasethe GPIO base address for Hall V
[in]gpioHallWBasethe GPIO base address for Hall W

◆ HALL_getAngle_rad()

static float32_t HALL_getAngle_rad ( HALL_Handle  handle)
inlinestatic

Gets the angle from the hall estimator, rad.

Parameters
[in]handlethe HALL Handle

◆ HALL_getInputState()

static uint16_t HALL_getInputState ( HALL_Handle  handle)
inlinestatic

Gets the hall sensors input GPIO state.

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 HALL Handle

◆ 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 HALL Handle
[in]speedHall_Hzthe speed value, Hz

◆ HALL_setAngleDelta_rad()

static void HALL_setAngleDelta_rad ( HALL_Handle  handle,
const float32_t  thetaDelta_rad 
)
inlinestatic

Sets a value to the theta offset for the hall estimator.

Parameters
[in]handlethe HALL Handle
[in]thetaDelta_radthe theta delta value, rad

◆ 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 HALL Handle
[in]timeStampthe time stamp value, clock cycles

◆ 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]speedRefThe reference value to the controller

◆ HALL_run()

static void HALL_run ( HALL_Handle  handle,
float32_t  speedRef 
)
static