instaspin_foc
Functions
FAST_OBS

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...
 

Detailed Description

Function Documentation

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.

Parameters
[in]handleThe Clarke (CLARKE) handle
[in]numCurrentSensorsThe number of current sensors

Sets the number of current sensors.

Parameters
[in]handleThe clarke (CLARKE) handle
[in]numCurrentSensorsThe 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.

Parameters
[in]handleThe Clarke (CLARKE) handle
[in]numVoltageSensorsThe number of voltage sensors

Sets the number of voltage sensors.

Parameters
[in]handleThe clarke (CLARKE) handle
[in]numVoltageSensorsThe 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  )
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.

Parameters
[in]angle_radThe angle in radians
[in]pSinPointer to the sine result
[in]pCosPointer to the cosine result

Referenced by mainISR().

float_t sqrt_fastRTS ( float_t  x)

Calculates square root using callable assembly, fast RTS.

Parameters
[in]xThe input value to the square root calculation
Returns
The square root of x

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)