instaspin_foc
Macros | Functions | Variables
proj_lab07.c File Reference

Adjusting the speed current controller. More...

#include <math.h>
#include "main.h"

Go to the source code of this file.

Macros

#define LED_BLINK_FREQ_Hz   5
 

Functions

void main (void)
 
interrupt void mainISR (void)
 The main interrupt service (ISR) routine. More...
 
void updateGlobalVariables_motor (CTRL_Handle handle)
 Updates the global motor variables. More...
 
void updateKpKiGains (CTRL_Handle handle)
 Updates Kp and Ki gains in the controller object. More...
 
void runRsOnLine (CTRL_Handle handle)
 Runs Rs online. More...
 
void updateCPUusage (void)
 Updates CPU usage. More...
 

Variables

uint_least16_t gCounter_updateGlobals = 0
 A counter that is denotes when to update the global variables. More...
 
bool Flag_Latch_softwareUpdate = true
 
CTRL_Handle ctrlHandle
 The controller handle. More...
 
HAL_Handle halHandle
 The hal handle. More...
 
USER_Params gUserParams
 The user parameters. More...
 
HAL_PwmData_t gPwmData = {_IQ(0.0), _IQ(0.0), _IQ(0.0)}
 Defines the PWM data. More...
 
HAL_AdcData_t gAdcData
 Defines the ADC data. More...
 
FEM_Handle femHandle
 
FEM_Obj fem
 
uint32_t gNumFreqErrors = 0
 
uint32_t gMaxDeltaCntObserved = 0
 
CPU_USAGE_Handle cpu_usageHandle
 
CPU_USAGE_Obj cpu_usage
 
float_t gCpuUsagePercentageMin = 0.0
 
float_t gCpuUsagePercentageAvg = 0.0
 
float_t gCpuUsagePercentageMax = 0.0
 
_iq gMaxCurrentSlope = _IQ(0.0)
 
CTRL_Obj ctrl
 Defines the CTRL object. More...
 
uint16_t gLEDcnt = 0
 
volatile MOTOR_Vars_t gMotorVars = MOTOR_Vars_INIT
 
_iq gFlux_pu_to_Wb_sf
 
_iq gFlux_pu_to_VpHz_sf
 
_iq gTorque_Ls_Id_Iq_pu_to_Nm_sf
 
_iq gTorque_Flux_Iq_pu_to_Nm_sf
 

Detailed Description

Adjusting the speed current controller.

(C) Copyright 2011, Texas Instruments, Inc.

Definition in file proj_lab07.c.