AM263x Motor Control SDK  09.02.00

Introduction

Contains interface to encoder object.

Go to the source code of this file.

Data Structures

struct  ENC_Handle
 Defines the ENC controller object. More...
 

Macros

#define ENC_inline_run   ENC_run
 
#define ENC_full_run   ENC_runHall
 

Enumerations

enum  ENC_Status_e { ENC_IDLE = 0, ENC_ALIGNMENT = 1, ENC_WAIT_FOR_INDEX = 2, ENC_CALIBRATION_DONE = 3 }
 

Functions

ENC_Handle ENC_init (void *pMemory, const size_t numBytes)
 Initializes the ENC controller. More...
 
void ENC_setParams (ENC_Handle handle, const USER_Params *pUserParams)
 Set the controller parameters. More...
 
static void ENC_setHallGPIO (ENC_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)
 Set the hall pins and address (only needed for calibration mode) More...
 
static float32_t ENC_getSpeedElec_Hz (ENC_Handle handle)
 Runs the ENC controller. More...
 
static float32_t ENC_getElecAngle (ENC_Handle handle)
 Gets the angle from encoder. More...
 
static float32_t ENC_getState (ENC_Handle handle)
 Gets the state of the ENC controller. More...
 
static void ENC_resetState (ENC_Handle handle)
 Reset the ENC controller state. More...
 
static void ENC_setState (ENC_Handle handle, const ENC_Status_e encState)
 Sets up the ENC controller state. More...
 
static void ENC_setGPIOHallU (ENC_Handle handle, const uint32_t gpioHallU, const uint32_t gpioHallUBase)
 Set the ENC controller parameter Hall U (only needed for calibration mode) More...
 
static void ENC_setGPIOHallV (ENC_Handle handle, const uint32_t gpioHallV, const uint32_t gpioHallVBase)
 Set the ENC controller parameter Hall V (only needed for calibration mode) More...
 
static void ENC_setGPIOHallW (ENC_Handle handle, const uint32_t gpioHallW, const uint32_t gpioHallWBase)
 Set the ENC controller parameter Hall W (only needed for calibration mode) More...
 
static void ENC_setQEPHandle (ENC_Handle handle, const uint32_t qepBase)
 Set the ENC controller eqep handle. More...
 
static uint16_t ENC_getHallState (ENC_Handle handle)
 Get the hall state. More...
 
static void ENC_run (ENC_Handle handle)
 Runs the ENC controller. More...
 
static void ENC_runHall (ENC_Handle handle)
 Runs the hall of ENC controller. More...