MotorWare f2806x Module API Documentation

- Main Page
- Modules
- Data Structures
- Files

Modules | Typedefs | Functions
AFSEL

## Modules
| AFSEL_OVERVIEW

## Typedefs
typedef struct _AFSEL_Obj_ * | AFSEL_Handle
| Defines the AFSEL Torque handle. More...

## Functions
void | AFSEL_disable (AFSEL_Handle handle)
| Disable the afsel module. More...
void | AFSEL_enable (AFSEL_Handle handle)
| Enable the afsel module. More...
_iq | AFSEL_getAngle_pu (AFSEL_Handle handle)
| Gets the angle that will currently be used for FOC. More...
_iq | AFSEL_getFreq_pu (AFSEL_Handle handle)
| Gets the speed that will currently be used. More...
_iq | AFSEL_getIqMax (AFSEL_Handle handle)
| Gets the Iq maximum value currently used. More...
_iq | AFSEL_getIqSlope (AFSEL_Handle handle)
| Gets the current Iq trajectory slope. More...
AFSEL_Handle | AFSEL_init (void)
| Initializes the afsel module. More...
bool | AFSEL_isDisabled (AFSEL_Handle handle)
| Is the afsel module disabled? More...
bool | AFSEL_isEnabled (AFSEL_Handle handle)
| Is the afsel module enabled? More...
void | AFSEL_run (AFSEL_Handle handle)
| Run the afsel. More...
static void | AFSEL_setCountHysThreshold (AFSEL_Handle handle, const uint16_t value)
| Sets the threshold counter. More...
void | AFSEL_setFreqHigh_pu (AFSEL_Handle handle, const _iq freq)
| Sets the frequency at which the HF estimator takes over angle and freq. More...
void | AFSEL_setFreqLow_pu (AFSEL_Handle handle, const _iq freq)
| Sets the frequency at which the LF estimator takes over angle and freq. More...
void | AFSEL_setParams (AFSEL_Handle handle, const _iq IqMaxLfEst, const _iq IqMaxHfEst, const _iq IqSlopeLfEst, const _iq IqSlopeHfEst, const _iq freqLow_pu, const _iq freqHigh_pu, IPD_HFI_Handle hfiHandle, EST_Handle estHandle)
| Sets the parameters. More...
void | AFSEL_setup (AFSEL_Handle handle, const _iq angleLf_pu, const _iq freqLf_pu, const _iq angleHf_pu, const _iq freqHf_pu)
| Sets the parameters in the ISR before AFSEL_run() is called. More...
void | AFSEL_updateState (AFSEL_Handle handle)
| Updates the state, called outside of the ISR. More...

## Detailed Description

## Typedef Documentation

typedef struct _AFSEL_Obj_* AFSEL_Handle

Defines the AFSEL Torque handle.

Definition at line 77 of file afsel.h.

## Function Documentation

void AFSEL_disable | ( | AFSEL_Handle | handle | ) |

Disable the afsel module.

Parameters

  [in] | pMemory | A pointer to the memory for the afsel object

void AFSEL_enable | ( | AFSEL_Handle | handle | ) |

Enable the afsel module.

Parameters

  [in] | pMemory | A pointer to the memory for the afsel object

_iq AFSEL_getAngle_pu | ( | AFSEL_Handle | handle | ) |

Gets the angle that will currently be used for FOC.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle

Returns
  The electrical angle

_iq AFSEL_getFreq_pu | ( | AFSEL_Handle | handle | ) |

Gets the speed that will currently be used.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle

Returns
  The electrical frequency

_iq AFSEL_getIqMax | ( | AFSEL_Handle | handle | ) |

Gets the Iq maximum value currently used.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle

Returns
  The maximum Iq current allowed

_iq AFSEL_getIqSlope | ( | AFSEL_Handle | handle | ) |

Gets the current Iq trajectory slope.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle

Returns
  The current Iq slope

AFSEL_Handle AFSEL_init | ( | void |  | ) |

Initializes the afsel module.

Parameters

  [in] | pMemory | A pointer to the memory for the afsel torque object
  [in] | numBytes | The number of bytes allocated for the afsel torque object, bytes

Returns
  The afsel torque (AFSEL) object handle

bool AFSEL_isDisabled | ( | AFSEL_Handle | handle | ) |

Is the afsel module disabled?

Parameters

  [in] | pMemory | A pointer to the memory for the afsel torque object

Returns
  The afsel disabled flag

bool AFSEL_isEnabled | ( | AFSEL_Handle | handle | ) |

Is the afsel module enabled?

Parameters

  [in] | pMemory | A pointer to the memory for the afsel torque object

Returns
  The afsel enabled flag

void AFSEL_run | ( | AFSEL_Handle | handle | ) |

Run the afsel.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle

static void AFSEL_setCountHysThreshold | ( | AFSEL_Handle | handle,
|  | const uint16_t | value
| ) |  |
| inline static

Sets the threshold counter.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle
  [in] | value | The threshold value

void AFSEL_setFreqHigh_pu | ( | AFSEL_Handle | handle,
|  | const _iq | freq
| ) |  |

Sets the frequency at which the HF estimator takes over angle and freq.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle
  [in] | freq | The frequency when the HF estimator takes control of angle and freq

void AFSEL_setFreqLow_pu | ( | AFSEL_Handle | handle,
|  | const _iq | freq
| ) |  |

Sets the frequency at which the LF estimator takes over angle and freq.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle
  [in] | freq | The frequency when the LF estimator takes control of angle and freq

void AFSEL_setParams | ( | AFSEL_Handle | handle,
|  | const _iq | IqMaxLfEst,
|  | const _iq | IqMaxHfEst,
|  | const _iq | IqSlopeLfEst,
|  | const _iq | IqSlopeHfEst,
|  | const _iq | freqLow_pu,
|  | const _iq | freqHigh_pu,
|  | IPD_HFI_Handle | hfiHandle,
|  | EST_Handle | estHandle
| ) |  |

Sets the parameters.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle
  [in] | IqMaxLfEst | The maximum Iq current when the LF estimator is active
  [in] | IqMaxHfEst | The maximum Iq current when the HF estimator is active
  [in] | IqSlopeLfEst | The trajectory slope of the Iq current reference when the LF estimator is active
  [in] | IqSlopeHfEst | The trajectory slope of the Iq current reference when the HF estimator is active
  [in] | freqLow_pu | The frequency below which the LF estimator is active
  [in] | freqHigh_pu | The frequency above which the HF estimator is active
  [in] | hfiHandle | The handle to the HF estimator
  [in] | estHandle | The handle to the LF estimator

void AFSEL_setup | ( | AFSEL_Handle | handle,
|  | const _iq | angleLf_pu,
|  | const _iq | freqLf_pu,
|  | const _iq | angleHf_pu,
|  | const _iq | freqHf_pu
| ) |  |

Sets the parameters in the ISR before AFSEL_run() is called.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle
  [in] | angleLf_pu | The angle from the LF estimator
  [in] | freqLf_pu | The frequency from the LF estimator
  [in] | angleHf_pu | The angle from the HF estimator
  [in] | freqHf_pu | The frequency from the HF estimator

void AFSEL_updateState | ( | AFSEL_Handle | handle | ) |

Updates the state, called outside of the ISR.

Parameters

  [in] | handle | The angle and frequency selector (AFSEL) handle