MSPM0G3519SensoredFOCMotorControlLibrary  1.0
Functions
appConfigParamUpdate.h File Reference

Detailed Description

appConfigParamUpdate Module


Overview

APIs for updating the application configurations


#include "application.h"
Include dependency graph for appConfigParamUpdate.h:

Go to the source code of this file.

Functions

void updateConfigurationParameters (SENSORED_FOC_APPLICATION_T *pMC_App)
 update Configuration Parameters More...
 
void updateRAMConfigurationParameters (SENSORED_FOC_APPLICATION_T *pMC_App)
 update RAM Configuration Parameters More...
 
void updateMotorStopConfigParam (SENSORED_FOC_APPLICATION_T *pMC_App)
 update Motor Stop Config Param More...
 
void user_config_faults (SENSORED_FOC_APPLICATION_T *pMC_App)
 user config faults More...
 
uint16_t piRAMInput (float piGain)
 pi RAM Input More...
 
void updateCloseLoopConfigParam (SENSORED_FOC_APPLICATION_T *pMC_App)
 updateCloseLoopConfigParam More...
 
void updateCurrentControlConfigParam (SENSORED_FOC_APPLICATION_T *pMC_App)
 updateCurrentControlConfigParam More...
 

Function Documentation

§ updateConfigurationParameters()

void updateConfigurationParameters ( SENSORED_FOC_APPLICATION_T pMC_App)

§ updateRAMConfigurationParameters()

void updateRAMConfigurationParameters ( SENSORED_FOC_APPLICATION_T pMC_App)

update RAM Configuration Parameters

Parameters
[in]*pMC_AppInput Pointer

References appInterfaceConfig(), float2IQ(), float2IQx(), GLOBAL_IQ, and updateCurrentControlConfigParam().

§ updateMotorStopConfigParam()

void updateMotorStopConfigParam ( SENSORED_FOC_APPLICATION_T pMC_App)

update Motor Stop Config Param

Parameters
[in]*pMC_AppInput Pointer

References USER_CTRL_INTERFACE_T::algoDebugCtrl2, USER_CTRL_INTERFACE_T::algoDebugCtrl3, SOFT_STOP_FLAGS_T::b, ID_REFERENCING_FLAGS_T::b, BRAKE_FLAGS_T::b, CLOSE_LOOP_FLAGS_T::b, FOC_FLAGS_T::b, USER_INPUT_CLOSE_LOOP1_T::b, RAM_ALGO_DEBUG_2_T::b, RAM_ALGO_DEBUG_3_T::b, LOAD_T::brake, BRAKE_FLAGS_T::brakeFlags::brakeCheckCurrentStop, HALL_CALIB_T::calibState, FOC_T::closeLoop, USER_INPUT_INTERFACE_T::closeLoop1, userInputCloseLoop1::controlMode, FAULT_SERVICE_T::countMax, ramAlgoDebugCtrl2::currLoopDis, MC_DQ_T::d, SOFT_STOP_FLAGS_T::softStopFlags::enable, BRAKE_FLAGS_T::brakeFlags::enableOnStop, FALSE, USER_INPUTS_T::faultRetryTimeMsec, SENSORED_FOC_APPLICATION_T::faultService, SOFT_STOP_T::flags, ID_REF_T::flags, BRAKE_T::flags, FOC_T::flags, CLOSE_LOOP_T::flags, ID_REFERENCING_FLAGS_T::idReferencingFlags::fluxModeEnable, ramAlgoDebugCtrl3::fluxModeReference, SENSORED_FOC_APPLICATION_T::foc, ramAlgoDebugCtrl2::forceVDCurrLoopDis, ramAlgoDebugCtrl2::forceVQCurrLoopDis, GLOBAL_IQ, HAL_CALIB_COMPLETE, HAL_CALIB_FAILED, HALL_CALIB_T::hallCalibEnable, ramAlgoDebugCtrl2::hallCalibEnable, FOC_T::hallCalibObj, ID_REF_T::idRefFluxModeSet, CLOSE_LOOP_T::idRefGen, SENSORED_FOC_APPLICATION_T::load, FOC_T::mdqForceSet, SOFT_STOP_T::minimumSpeed, SOFT_STOP_T::minimumSpeedSoftStop, MOTOR_STOP_ACTIVE_SPIN_DOWN, userInputCloseLoop1::mtrStopOption, SOURCE_LIMITS_T::overCurrent, SENSORED_FOC_APPLICATION_T::pAppInterface, pUserCtrlRegs, pUserInputRegs, MC_DQ_T::q, LOAD_T::softStop, SENSORED_FOC_APPLICATION_T::sourceLimits, CLOSE_LOOP_FLAGS_T::closeLoopFlags::torqueModeEnable, TRUE, APP_INTERFACE_T::userInputs, APP_INTERFACE_T::userInputsInterface, and FOC_FLAGS_T::focFlags::voltageModeEnableSet.

Referenced by updateConfigurationParameters().

§ user_config_faults()

void user_config_faults ( SENSORED_FOC_APPLICATION_T pMC_App)

user config faults

Parameters
[in]*pMC_AppInput Pointer

References ABN_HALL_INDEX_FAULT_INDEX, ABN_SPEED_FAULT_INDEX, userInputFaultCfg2::abnormalSpeedEn, FAULT_FLAGS_T::faultFlags::abnormalSpeedRetryEnable, moduleEnableFlags::abnormalSpeedStallDetectEnable, ID_REFERENCING_FLAGS_T::b, MODULE_ENABLE_FLAGS_T::b, FAULT_FLAGS_T::b, USER_INPUT_CLOSE_LOOP1_T::b, USER_INPUT_CLOSE_LOOP2_T::b, USER_INPUT_FIELD_CTRL_T::b, USER_INPUT_FAULT_CFG1_T::b, USER_INPUT_FAULT_CFG2_T::b, USER_INPUTS_T::basePower, FOC_T::closeLoop, USER_INPUT_INTERFACE_T::closeLoop1, USER_INPUT_INTERFACE_T::closeLoop2, CONTROL_POWER, CONTROL_SPEED, CONTROL_TORQUE, controllerFaultAction, controllerFaultActionLatched, controllernFaultReport, userInputCloseLoop1::controlMode, CLOSE_LOOP_T::controlMode, CLOSE_LOOP_T::currentReferenceSqrMaxSet, FALSE, USER_INPUT_INTERFACE_T::faultCfg1, USER_INPUT_INTERFACE_T::faultCfg2, USER_INPUTS_T::faultRetryTimeMsec, SENSORED_FOC_APPLICATION_T::faultService, USER_INPUT_INTERFACE_T::fieldCtrl, ID_REF_T::flags, FAULT_SERVICE_T::flags, float2IQx(), ID_REF_T::fluxWeak, userInputFieldCtrl::fluxWeakCurrRatio, userInputFieldCtrl::fluxWeakeningEn, ID_REFERENCING_FLAGS_T::idReferencingFlags::fluxWeakeningEnable, userInputFieldCtrl::fluxWeakeningReference, SENSORED_FOC_APPLICATION_T::foc, GLOBAL_IQ, HALL_ESTIMATOR_OBJ_T::hallEstimVelocity, userInputFaultCfg2::hallInvalidStall, moduleEnableFlags::hallInvalidStallDetectFault, FOC_T::hallObj, moduleEnableFlags::hardwareOverCurrentFaultEnable, HW_LOCK_ILIMIT_FAULT_INDEX, CLOSE_LOOP_T::idRefGen, PI_T::ki, USER_INPUTS_T::kiFluxWeak, PI_T::kp, KP_IQ_SCALING, USER_INPUTS_T::kpFluxWeak, MTPA_T::L1, userInputCloseLoop2::leadAngle, userInputFaultCfg1::lockRetry, FAULT_FLAGS_T::faultFlags::lowBemfRetryEnable, CLOSE_LOOP_T::maximumPower, USER_INPUTS_T::maximumSpeedHz, SYSTEM_PARAMETERS_T::maxMotorPower, userInputFaultCfg2::maxVmMode, MC_SinCos(), CLOSE_LOOP_T::mdqForceSinCos, userInputFaultCfg2::minVmMode, USER_INPUTS_T::moduleFlags, moduleEnableFlags::motorStallReportOnlyEnable, FLUX_WEAK_T::mSqrRef, ID_REF_T::mtpa, ID_REFERENCING_FLAGS_T::idReferencingFlags::mtpaEnable, userInputFieldCtrl::mtpaEnable, MTR_LOCK_FAULT_INDEX, userInputFaultCfg1::mtrLckMode, NO_MOTOR_FAULT_INDEX, userInputFaultCfg2::noMotorEn, FAULT_FLAGS_T::faultFlags::noMotorRetryEnable, moduleEnableFlags::noMotorStallDetectEnable, PI_T::outMax, PI_T::outMin, OVER_VOLTAGE_FAULT_INDEX, SENSORED_FOC_APPLICATION_T::pAppInterface, PI_T::pFeedback, USER_INPUTS_INTERFACE_T::phaseCurrentBase, PI, FLUX_WEAK_T::piFluxWeak, CLOSE_LOOP_T::piSpeed, CLOSE_LOOP_T::PowerFeedback, CLOSE_LOOP_T::PowerReference, PI_T::pReference, pUserInputRegs, USER_INPUT_INTERFACE_T::systemParams, tbl_mSqrRef, CLOSE_LOOP_T::torqRefScalingFactor, TRUE, UNDER_VOLTAGE_FAULT_INDEX, APP_INTERFACE_T::userInputs, APP_INTERFACE_T::userInputsInterface, and CLOSE_LOOP_T::velocityReference.

§ piRAMInput()

uint16_t piRAMInput ( float  piGain)

pi RAM Input

Parameters
[in]piGainInput
Returns
Size of MC app

§ updateCloseLoopConfigParam()

void updateCloseLoopConfigParam ( SENSORED_FOC_APPLICATION_T pMC_App)

§ updateCurrentControlConfigParam()

void updateCurrentControlConfigParam ( SENSORED_FOC_APPLICATION_T pMC_App)

updateCurrentControlConfigParam

Parameters
[in]*pMC_AppInput Pointer

References ABNORMAL_SPEED_TIME_MSEC, USER_INPUTS_T::abnormalSpeedLimitPerMil, STALL_DETECT_T::abnormalSpeedStall, moduleEnableFlags::abnormalSpeedStallDetectEnable, OPEN_LOOP_T::accelRefSlewRateDecel, OPEN_LOOP_T::accelRefSlewRateFastAccel, OPEN_LOOP_T::accelRefSlewRateSlowAccel, userInputCloseLoop2::actSpinThr, USER_INPUTS_INTERFACE_T::adcSamplingFrequencyKHz, USER_INPUTS_INTERFACE_T::adcSamplingRate, HALL_CALIB_T::angleSet, DEAD_TIME_COMP_FLAGS_T::b, ABNORMAL_SPEED_STALL_DETECT_FLAGS_T::b, NO_MOTOR_STALL_DETECT_FLAGS_T::b, OPEN_LOOP_FLAGS_T::b, MODULE_ENABLE_FLAGS_T::b, USER_INPUT_MTR_STARTUP1_T::b, USER_INPUT_MTR_STARTUP2_T::b, USER_INPUT_CLOSE_LOOP1_T::b, USER_INPUT_CLOSE_LOOP2_T::b, LOAD_T::brake, userInputCloseLoop2::brkCurrThr, userInputCloseLoop2::brkSpeedThr, userInputMotorStartUp1::calibAlignTime, userInputMotorStartUp1::calibCurrLimit, userInputMotorStartUp1::calibRunTime, USER_INPUT_INTERFACE_T::closeLoop1, USER_INPUT_INTERFACE_T::closeLoop2, ABNORMAL_SPEED_STALL_DETECT_T::countMax, NO_MOTOR_STALL_DETECT_T::countMax, HALL_CALIB_T::countMaxAlign, HALL_CALIB_T::countMaxCalibRun, USER_STATUS_INTERFACE_T::currentPI, BRAKE_T::currentThresholdSqr, DEAD_TIME_COMP_MAX_FREQ_HZ, SENSORED_FOC_APPLICATION_T::deadTime, userInputCloseLoop1::deadTimeCompEn, ABNORMAL_SPEED_STALL_DETECT_FLAGS_T::abnormalSpeedStallDetectFlags::enableSet, NO_MOTOR_STALL_DETECT_FLAGS_T::noMotorStallDetectFlags::enableSet, DEAD_TIME_COMP_FLAGS_T::deadTimeCompFlags::enableSet, OPEN_LOOP_FLAGS_T::openLoopFlags::fastStartEnable, userInputMotorStartUp2::firstCycFreqSel, ABNORMAL_SPEED_STALL_DETECT_T::flags, DEAD_TIME_COMPUTE_T::flags, NO_MOTOR_STALL_DETECT_T::flags, OPEN_LOOP_T::flags, float2IQ(), float2IQx(), SENSORED_FOC_APPLICATION_T::foc, USER_INPUTS_T::forwardTransitionSpeedPerMil, DEAD_TIME_COMPUTE_T::gain, GLOBAL_IQ, FOC_T::hallCalibObj, STALL_DETECT_T::hallInvalidStall, moduleEnableFlags::hallInvalidStallDetectFault, HALL_CALIB_T::idRefSet, HALL_CALIB_T::idRefSlewRate, OPEN_LOOP_T::idRefSlewRate, userInputCloseLoop1::iLimit, OPEN_LOOP_T::initialSpeedReference, OPEN_LOOP_T::iqRefSetFastAccel, OPEN_LOOP_T::iqRefSetSpeedReversal, OPEN_LOOP_T::iqRefSlewRate, PI_T::ki, OUTPUTS_CURRENT_PI_T::ki, USER_INPUTS_INTERFACE_T::kiCurrent, USER_INPUTS_T::kiCurrent, PI_T::kp, OUTPUTS_CURRENT_PI_T::kp, KP_IQ_SCALING, USER_INPUTS_INTERFACE_T::kpCurrent, USER_INPUTS_T::kpCurrent, USER_INPUTS_INTERFACE_T::L0MicroHenry, SENSORED_FOC_APPLICATION_T::load, OPEN_LOOP_T::loopExecutionCountInit, ABNORMAL_SPEED_STALL_DETECT_T::maximumSpeed, USER_INPUTS_T::maximumSpeedHz, NO_MOTOR_STALL_DETECT_T::minimumCurrent, SENSORED_FOC_APPLICATION_T::minimumSpeed, SOFT_STOP_T::minimumSpeedBrake, SOFT_STOP_T::minimumSpeedSoftStop, MOD_INDEX_LIMIT_OVERMODULATION, MOD_INDEX_LIMIT_SINE, FOC_T::modIndexLimit, USER_INPUTS_T::moduleFlags, SENSORED_FOC_APPLICATION_T::motorInputs, moduleEnableFlags::motorStallReportOnlyEnable, BRAKE_T::motorStopCountMax, USER_INPUT_INTERFACE_T::mtrStartUp1, USER_INPUT_INTERFACE_T::mtrStartUp2, NO_MOTOR_TIME_MSEC, USER_INPUTS_T::noMotorLimitPU, STALL_DETECT_T::noMotorStall, moduleEnableFlags::noMotorStallDetectEnable, userInputMotorStartUp2::olAcc1, userInputMotorStartUp2::olFirstCycFreq, userInputMotorStartUp2::olILimit, userInputMotorStartUp1::olILimitCfg, FOC_T::openLoop, openLoopAccelDecelRate(), USER_INPUTS_T::openLoopDecelToSlowAccelSlewRateRatioPerMil, OPEN_LOOP_FLAGS_T::openLoopFlags::openLoopDirChange, USER_INPUTS_T::openLoopSlowAccelSpeedSlewRateCentiHzPerSec, userInputCloseLoop1::overModEnable, SENSORED_FOC_APPLICATION_T::pAppInterface, USER_INPUTS_INTERFACE_T::phaseCurrentBase, FOC_T::piId, FOC_T::piIq, HALL_CALIB_T::polePairs, SYSTEM_PARAMETERS_T::polePairs, pUserInputRegs, APP_INTERFACE_T::pUserOutputs, ABNORMAL_SPEED_STALL_DETECT_FLAGS_T::abnormalSpeedStallDetectFlags::reportOnly, NO_MOTOR_STALL_DETECT_FLAGS_T::noMotorStallDetectFlags::reportOnly, USER_INPUTS_T::reverseTransitionSpeedPerMil, USER_INPUTS_T::rsMilliOhms, LOAD_T::softStop, DEAD_TIME_COMPUTE_T::speedDisableLimit, DEAD_TIME_COMPUTE_T::speedEnableLimit, OPEN_LOOP_T::speedReferenceMaxForwardSet, OPEN_LOOP_T::speedReferenceMaxReverseSet, OPEN_LOOP_T::speedRefSlewRateDecel, OPEN_LOOP_T::speedRefSlewRateFastAccel, OPEN_LOOP_T::speedRefSlewRateSlowAccel, FOC_T::stallDetect, HALL_INVALID_STALL_DETECT_T::stallDetectEn, USER_INPUTS_T::systemDCBusVoltageVolts, USER_INPUT_INTERFACE_T::systemParams, tbl_alignSlowRampRate, tbl_alignTime_msec, tbl_brakeCurrPersist_msec, tbl_brkDutyActSPinThr_pMil, tbl_olFirstCycFreqPerMil, tbl_pu, BRAKE_T::timeOutCountMaxOnStop, APP_INTERFACE_T::userInputs, APP_INTERFACE_T::userInputsInterface, HAL_MEASURE_MOTOR_INPUTS_T::voltage, VOLTAGE_GAIN_VMAX_BY_1, and HAL_MEASURE_VOLTAGE_T::voltageGainSet.

Referenced by updateConfigurationParameters(), and updateRAMConfigurationParameters().

© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale