![]() |
![]() |
|
MSPM0G3519SensoredFOCMotorControlLibrary
1.0
|

Go to the source code of this file.
Functions | |
| int32_t | openLoopAccelDecelRate (uint16_t index) |
| Gets the open loop acceleration and deceleration rate. More... | |
| int32_t | closeLoopAccelDecelRate (uint16_t index) |
| Gets the close loop acceleration and deceleration rate. More... | |
| void | update_MotorStartUp2Config (USER_INPUTS_T *pUserInputs) |
| Updates startup2 configurations. More... | |
| void | update_CloseLoop1Config (USER_INPUTS_T *pUserInputs) |
| Updates close loop 1 configurations. More... | |
| void | update_SystemParams (USER_INPUTS_T *pUserInputs) |
| Updates motor configurations. More... | |
| void | update_FaultCfg1Config (USER_INPUTS_T *pUserInputs) |
| Updates fault config 1 configurations. More... | |
| void | update_FaultCfg2Config (USER_INPUTS_T *pUserInputs) |
| Updates fault config 2 configurations. More... | |
| void | update_MiscAlgoConfig (USER_INPUTS_T *pUserInputs) |
| Updates Misc algo configurations. More... | |
| void | appUserInputRegsConfig (USER_INPUTS_T *pUserInputs) |
| Updates all Input Registers configurations. More... | |
| void | appUserInputsInit (USER_INPUTS_T *pUserInputs) |
| Initializes user inputs. More... | |
| int32_t openLoopAccelDecelRate | ( | uint16_t | index | ) |
Gets the open loop acceleration and deceleration rate.
| [in] | index | Set Index |
References tbl1_olAccA1A2_centiHzPerSec, and tbl2_olAccA1A2_HzPerSec.
Referenced by update_MotorStartUp2Config(), and updateCurrentControlConfigParam().
| int32_t closeLoopAccelDecelRate | ( | uint16_t | index | ) |
Gets the close loop acceleration and deceleration rate.
| [in] | index | Set Index |
References tbl1_clDecClAcc_deciHzPerSec, and tbl2_clDecClAcc_HzPerSec.
Referenced by update_CloseLoop1Config().
| void update_MotorStartUp2Config | ( | USER_INPUTS_T * | pUserInputs | ) |
Updates startup2 configurations.
| [in] | pUserInputs | Pointer to user Inputs |
References USER_INPUTS_T::angleErrorSlewRateMilliDegreesPerMsec, USER_INPUT_MTR_STARTUP2_T::b, USER_INPUTS_T::forwardTransitionSpeedPerMil, USER_INPUT_INTERFACE_T::mtrStartUp2, userInputMotorStartUp2::olAcc2, userInputMotorStartUp2::olMaxSpeed, openLoopAccelDecelRate(), USER_INPUTS_T::openLoopFastAccelAccelSlewRateCentiHzPerSecPerSec, pUserInputRegs, and tbl_thetaErrRampRate_mili.
Referenced by appUserInputRegsConfig().
| void update_CloseLoop1Config | ( | USER_INPUTS_T * | pUserInputs | ) |
Updates close loop 1 configurations.
| [in] | pUserInputs | Pointer to user Inputs |
References USER_INPUT_CLOSE_LOOP1_T::b, userInputCloseLoop1::clAcc, userInputCloseLoop1::clDec, userInputCloseLoop1::clDecCfg, USER_INPUT_INTERFACE_T::closeLoop1, closeLoopAccelDecelRate(), USER_INPUTS_T::closeLoopFastAccelSpeedSlewRateDeciHzPerSec, USER_INPUTS_T::closeLoopFastDecelSpeedSlewRateDeciHzPerSec, and pUserInputRegs.
Referenced by appUserInputRegsConfig().
| void update_SystemParams | ( | USER_INPUTS_T * | pUserInputs | ) |
Updates motor configurations.
| [in] | pUserInputs | Pointer to user Inputs |
References SYSTEM_PARAMETERS_T::currentBase, SYSTEM_PARAMETERS_T::currLoopKi, SYSTEM_PARAMETERS_T::currLoopKp, SYSTEM_PARAMETERS_T::fluxWeakeningKi, SYSTEM_PARAMETERS_T::fluxWeakeningKp, USER_INPUTS_T::fullScalePhaseCurrentAmp, USER_INPUTS_T::hallSectorPerRev, USER_INPUTS_T::KeMilliVoltPhasePkPerHz, USER_INPUTS_T::kiCurrent, USER_INPUTS_T::kiFluxWeak, USER_INPUTS_T::kiSpeed, USER_INPUTS_T::kpCurrent, USER_INPUTS_T::kpFluxWeak, USER_INPUTS_T::kpSpeed, USER_INPUTS_T::LdMicroHenry, USER_INPUTS_T::LqMicroHenry, MAX_HALL_INDEX, USER_INPUTS_T::maximumSpeedHz, SYSTEM_PARAMETERS_T::maxMotorSpeed, SYSTEM_PARAMETERS_T::mtrBemfConst, SYSTEM_PARAMETERS_T::mtrInductance, SYSTEM_PARAMETERS_T::mtrResist, SYSTEM_PARAMETERS_T::mtrSaliency, SYSTEM_PARAMETERS_T::polePairs, pUserInputRegs, USER_INPUTS_T::rsMilliOhms, SYSTEM_PARAMETERS_T::speedLoopKi, SYSTEM_PARAMETERS_T::speedLoopKp, USER_INPUTS_T::systemDCBusVoltageVolts, USER_INPUT_INTERFACE_T::systemParams, and SYSTEM_PARAMETERS_T::voltageBase.
Referenced by appUserInputRegsConfig().
| void update_FaultCfg1Config | ( | USER_INPUTS_T * | pUserInputs | ) |
Updates fault config 1 configurations.
| [in] | pUserInputs | Pointer to user Inputs |
Referenced by appUserInputRegsConfig().
| void update_FaultCfg2Config | ( | USER_INPUTS_T * | pUserInputs | ) |
Updates fault config 2 configurations.
| [in] | pUserInputs | Pointer to user Inputs |
References userInputFaultCfg2::abnormalSpeedEn, USER_INPUTS_T::abnormalSpeedLimitPerMil, moduleEnableFlags::abnormalSpeedStallDetectEnable, MODULE_ENABLE_FLAGS_T::b, USER_INPUT_FAULT_CFG2_T::b, USER_INPUT_INTERFACE_T::faultCfg2, userInputFaultCfg2::hallInvalidStall, moduleEnableFlags::hallInvalidStallDetectFault, userInputFaultCfg2::lockAbnSpeed, USER_INPUTS_T::moduleFlags, userInputFaultCfg2::noMotorEn, USER_INPUTS_T::noMotorLimitPU, moduleEnableFlags::noMotorStallDetectEnable, userInputFaultCfg2::noMtrThr, pUserInputRegs, and tbl_pu.
Referenced by appUserInputRegsConfig().
| void update_MiscAlgoConfig | ( | USER_INPUTS_T * | pUserInputs | ) |
Updates Misc algo configurations.
| [in] | pUserInputs | Pointer to user Inputs |
References USER_INPUT_MISC_ALGO_T::b, USER_INPUTS_T::closeLoopSlowAccelSpeedSlewRateDeciHzPerSec, userInputMiscAlgo::clSlowAcc, USER_INPUT_INTERFACE_T::miscAlgo, pUserInputRegs, and tbl_clSlowAcc_deci.
Referenced by appUserInputRegsConfig().
| void appUserInputRegsConfig | ( | USER_INPUTS_T * | pUserInputs | ) |
Updates all Input Registers configurations.
| [in] | pUserInputs | Pointer to user Inputs |
References update_CloseLoop1Config(), update_FaultCfg1Config(), update_FaultCfg2Config(), update_MiscAlgoConfig(), update_MotorStartUp2Config(), and update_SystemParams().
Referenced by appInterfaceEEpromConfig().
| void appUserInputsInit | ( | USER_INPUTS_T * | pUserInputs | ) |
Initializes user inputs.
| [in] | pUserInputs | Pointer to user Inputs |
References USER_INPUTS_T::overVoltageHystPU, and USER_INPUTS_T::underVoltageHystPU.