English
Language : 

AN1904 Datasheet, PDF (28/102 Pages) STMicroelectronics – ST7MC three-phase AC induction motor control software library
Library functions per software module
MTC_InitTachoMeasure
MTC_StartTachoFiltering
AN1904
Synopsis
#include "mtc.h"
void MTC_InitTachoMeasure(void);
void MTC_StartTachoFiltering(void);
Description MTC_InitTachoMeasure
The purpose of this function is to initialize the flags and variables
associated with speed acquisition: the software FIFO stack where the last
4 speed acquisitions are stored, the tacho timer clock prescaler and the
flag disabling rolling average. Upon completion of this routine,
MTC_GetRotorFreq function call will return a speed calculated from the
very last tacho capture only.
MTC_StartTachoFiltering
Once called, this function enables the MTC_GetRotorFreq to return a
speed corresponding to the average of the last four captured values. On
the tacho event following this function call, the whole software FIFO stack
is filled with the latest captured value to start the rolling average with
values up to date.
Duration
MTC_InitTachoMeasure: 26 µs
MTC_StartTachoFiltering: 2.75 µs
Code example
...
...
IMC_InitTachoMeasure();/*Must be called before motor start*/
...
/* Start routine */
if (MTC_ValidSpeedInfo(MinRotorFreq))
{
MTC_StartTachoFiltering (); /* Must be called once we
} are sure that we have reliable speed information */
See also
MTC_GetRotorFreq, MTC_ValidSpeedInfo.
28/102