![]() |
![]() |
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) |
#define HALL_calcAngle HALL_run |
Runs the HALL controller.
[in] | handle | The HALL controller handle |
[in] | speedRef | The reference speed value to the controller |
typedef struct _HALL_Obj_ HALL_Obj |
Defines the HALL controller object.
typedef struct _HALL_Obj_* HALL_Handle |
Defines the HALL handle.
enum HALL_Status_e |
HALL_Handle HALL_init | ( | void * | pMemory, |
const size_t | numBytes | ||
) |
Initializes the HALL controller.
[in] | pMemory | A pointer to the memory for the HALL controller object |
[in] | numBytes | The number of bytes allocated for the HALL controller object, bytes |
void HALL_setParams | ( | HALL_Handle | handle, |
const USER_Params * | pUserParams | ||
) |
Sets the hall estimator parameters.
[in] | handle | The HALL controller handle |
void HALL_setAngleBuf | ( | HALL_Handle | handle, |
const float32_t * | ptrAngleBuf | ||
) |
Sets the angle buffer value for hall estimator.
[in] | handle | The HALL controller handle |
void HALL_resetParams | ( | HALL_Handle | handle | ) |
Resets the hall estimator parameters.
[in] | handle | The HALL controller handle |
void HALL_setGPIOs | ( | HALL_Handle | handle, |
const uint16_t | gpioHallU, | ||
const uint16_t | gpioHallV, | ||
const uint16_t | gpioHallW | ||
) |
Sets GPIO for hall sensors input.
[in] | handle | the HALL Handle |
|
inlinestatic |
Gets the feedback speed from hall estimator.
[in] | handle | the ENC Handle |
References _HALL_Obj_::speedHall_Hz.
|
inlinestatic |
Sets a value to the speed for the hall estimator.
[in] | handle | the ENC Handle |
[in] | speedHall_Hz | the speed value, Hz |
References _HALL_Obj_::speedHall_Hz.
|
inlinestatic |
Sets a value to the time stamp for the hall estimator.
[in] | handle | the ENC Handle |
[in] | timeStamp | the time stamp value, clock cycles |
References _HALL_Obj_::timeStampCAP.
|
inlinestatic |
Gets the angle from the hall estimator, rad.
[in] | handle | the ENC Handle |
References _HALL_Obj_::thetaHall_rad.
|
inlinestatic |
Gets the hall sensors input GPIO state.
[in] | handle | the ENC Handle |
References _HALL_Obj_::gpioHallU, _HALL_Obj_::gpioHallV, and _HALL_Obj_::gpioHallW.
Referenced by HALL_run(), and HALL_setForceAngleAndIndex().
|
inlinestatic |
Sets the force angle and index for next step of the hall estimator.
[in] | handle | The HALL controller handle |
[in] | refValue | The 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.
|
inlinestatic |
References _HALL_Obj_::capScaler, HALL_getInputState(), _HALL_Obj_::hallDirection, _HALL_Obj_::hallIndex, _HALL_Obj_::hallIndexPrev, MATH_PI, MATH_TWO_PI, _HALL_Obj_::pwmScaler, _HALL_Obj_::speedCAP_Hz, _HALL_Obj_::speedHall_Hz, _HALL_Obj_::speedPWM_Hz, _HALL_Obj_::speedSwitch_Hz, _HALL_Obj_::thetaBuff, _HALL_Obj_::thetaDelta_rad, _HALL_Obj_::thetaHall_rad, _HALL_Obj_::timeCount, _HALL_Obj_::timeCountMax, _HALL_Obj_::timeCountPWM, and _HALL_Obj_::timeStampCAP.