instaspin_foc
|
Functions | |
void | setupControllers (void) |
Setups the controllers. More... | |
interrupt void | mainISR (void) |
The main interrupt service (ISR) routine. More... | |
void | setupClarke_I (CLARKE_Handle handle, const uint_least8_t numCurrentSensors) |
Sets the number of current sensors. More... | |
void | setupClarke_V (CLARKE_Handle handle, const uint_least8_t numVoltageSensors) |
Sets the number of voltage sensors. More... | |
void | sincos_fastRTS (float_t angle_rad, float_t *pSin, float_t *pCos) |
Calculates sine and cosine in a single function call, using callable assembly, fast RTS. More... | |
float_t | sqrt_fastRTS (float_t x) |
Calculates square root using callable assembly, fast RTS. More... | |
void | updateCPUusage (void) |
Updates CPU usage. More... | |
void | updateGlobalVariables_motor (EST_Handle estHandle) |
Updates the global motor variables. More... | |
interrupt void mainISR | ( | void | ) |
The main interrupt service (ISR) routine.
The main interrupt service (ISR) routine.
Definition at line 512 of file proj_lab20.c.
void setupClarke_I | ( | CLARKE_Handle | handle, |
const uint_least8_t | numCurrentSensors | ||
) |
Sets the number of current sensors.
[in] | handle | The Clarke (CLARKE) handle |
[in] | numCurrentSensors | The number of current sensors |
Sets the number of current sensors.
[in] | handle | The clarke (CLARKE) handle |
[in] | numCurrentSensors | The number of current sensors |
Definition at line 818 of file proj_lab21.c.
References _IQ, CLARKE_setNumSensors(), CLARKE_setScaleFactors(), MATH_ONE_OVER_SQRT_THREE, and MATH_ONE_OVER_THREE.
void setupClarke_V | ( | CLARKE_Handle | handle, |
const uint_least8_t | numVoltageSensors | ||
) |
Sets the number of voltage sensors.
[in] | handle | The Clarke (CLARKE) handle |
[in] | numVoltageSensors | The number of voltage sensors |
Sets the number of voltage sensors.
[in] | handle | The clarke (CLARKE) handle |
[in] | numVoltageSensors | The number of voltage sensors |
Definition at line 848 of file proj_lab21.c.
References _IQ, CLARKE_setNumSensors(), CLARKE_setScaleFactors(), MATH_ONE_OVER_SQRT_THREE, and MATH_ONE_OVER_THREE.
void setupControllers | ( | void | ) |
Setups the controllers.
Definition at line 445 of file fast_obs_im.c.
References _USER_Params_::BWc_rps, _USER_Params_::ctrlFreq_Hz, gSpeed_Ki, gSpeed_Kp, _USER_Params_::maxCurrent_A, _USER_Params_::maxVsMag_V, _USER_Params_::motor_Ls_d_H, _USER_Params_::motor_Ls_q_H, _USER_Params_::motor_Rs_d_Ohm, _USER_Params_::motor_Rs_q_Ohm, _USER_Params_::numCtrlTicksPerCurrentTick, PI_setFbackValue(), PI_setFfwdValue(), PI_setGains(), PI_setMinMax(), PI_setRefValue(), PI_setUi(), and _USER_Params_::Vd_sf.
Referenced by main().
Calculates sine and cosine in a single function call, using callable assembly, fast RTS.
[in] | angle_rad | The angle in radians |
[in] | pSin | Pointer to the sine result |
[in] | pCos | Pointer to the cosine result |
Referenced by mainISR().
Calculates square root using callable assembly, fast RTS.
[in] | x | The input value to the square root calculation |
Referenced by mainISR().
void updateCPUusage | ( | void | ) |
Updates CPU usage.
Definition at line 524 of file fast_obs_im.c.
void updateGlobalVariables_motor | ( | EST_Handle | estHandle | ) |
Updates the global motor variables.
[in] | estHandle | The estimator (EST) handle |
Definition at line 491 of file fast_obs_im.c.
References CAL_getState(), EST_computeTorque_Nm(), EST_getFe_Hz(), EST_getFlux_Wb(), EST_getFm_lp_Hz(), EST_getIdRated_A(), EST_getLs_d_H(), EST_getLs_q_H(), EST_getRr_d_Ohm(), EST_getRs_Ohm(), EST_getRsOnLine_Ohm(), EST_getState(), gCalState, gEstState, gFlux_Wb, gIdRated_A, gLs_d_H, gLs_q_H, gRr_Ohm, gRs_Ohm, gRsOnLine_Ohm, gSpeed_Hz, and gTorque_Nm.
Referenced by main().