MSPM0G3519SensoredFOCMotorControlLibrary  1.0
Data Structures | Macros | Enumerations | Functions | Variables
application.h File Reference

Detailed Description

application Module


Overview

Implements FOC state machine


#include <ti/iqmath/include/IQmathLib.h>
#include "IQmath_mathacl.h"
#include "appInterface.h"
#include "measure.h"
#include "foc.h"
#include "motor.h"
#include "sourceLimits.h"
#include "load.h"
#include "deadTimeCompute.h"
#include "faults.h"
#include "hallCalib.h"
Include dependency graph for application.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  APP_FLAGS_T
 Application Flags Structure. More...
 
struct  APP_FLAGS_T::appFlags
 Application Flags. More...
 
struct  SENSORED_FOC_APPLICATION_T
 Application Working Structure. More...
 

Macros

#define MIN_TARGET_DUTY_FLOAT   0.01
 Min target Duty Float.
 
#define MIN_TARGET_SPEED   _IQ(MIN_TARGET_DUTY_FLOAT)
 Min Target Duty.
 
#define VOLTAGE_OUT_OF_BOUNDS_TIME_MSEC   50.0
 Voltage Out of Bound Deglitch Time in mS.
 
#define NO_MOTOR_TIME_MSEC   500
 No Motor Fault Detect Deglitch Time in mS.
 
#define ABNORMAL_SPEED_TIME_MSEC   10
 VAbnormal Speed Fault Detect Deglitch Time in mS.
 

Enumerations

enum  APP_STATE_TYPES {
  APP_INIT = 0,
  APP_IDLE = 1,
  APP_OFFSET_CALIBRATION = 2,
  APP_START = 3,
  APP_RUN = 4,
  APP_STOP = 5,
  APP_BRAKE = 6,
  APP_FAULT = 7
}
 App State type. More...
 

Functions

void FOC_faultReport (SENSORED_FOC_APPLICATION_T *pMC_App, FAULT_SERVICE_T *pFault)
 FOC_fault Report. More...
 
void FOC_fault_Recovery (SENSORED_FOC_APPLICATION_T *pMC_App, FAULT_SERVICE_T *pFault)
 FOC_fault Recovery. More...
 

Variables

SENSORED_FOC_APPLICATION_Tg_pMC_App
 Motor Control Application Variable.
 

Enumeration Type Documentation

§ APP_STATE_TYPES

App State type.

Enumerator
APP_INIT 

Initialize Application

APP_IDLE 

Idle State - waits for run command

APP_OFFSET_CALIBRATION 

Calibrate sensor offsets

APP_START 

Start the application

APP_RUN 

Run the motor

APP_STOP 

Stop the motor

APP_BRAKE 

Brake the motor - enabled by brake pin

APP_FAULT 

Application Fault

Function Documentation

§ FOC_faultReport()

void FOC_faultReport ( SENSORED_FOC_APPLICATION_T pMC_App,
FAULT_SERVICE_T pFault 
)

§ FOC_fault_Recovery()

void FOC_fault_Recovery ( SENSORED_FOC_APPLICATION_T pMC_App,
FAULT_SERVICE_T pFault 
)
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale