174 extern FEM_Handle
FEM_init(
void *pMemory,
const size_t numBytes);
351 deltaCnt = cnt_z1 + timerPeriod - cnt_z0 + 1;
355 deltaCnt = cnt_z1 - cnt_z0 + 1;
364 if(deltaCnt > maxDeltaCntObserved)
372 if((deltaCnt < minDeltaCnt) || (deltaCnt > maxDeltaCnt))
411 #endif // end of _FEM_H_ definition
uint32_t maxDeltaCntObserved
the maximum delta counts observed, cnts
Contains the public interface to the types definitions.
uint32_t maxDeltaCnt
the maximum delta count allowed, cnts
uint32_t cnt_z1
the previous timer count value, cnts
static void FEM_setFlag_freqError(FEM_Handle handle, const bool state)
Sets the state of the frequency error flag.
static uint32_t FEM_getCnt_z1(FEM_Handle handle)
Gets the previous count value.
static uint32_t FEM_getCnt_z0(FEM_Handle handle)
Gets the current count value.
static uint32_t FEM_getDeltaCnt(FEM_Handle handle)
Gets the latest delta count measured, cnts.
static uint32_t FEM_getErrorCnt(FEM_Handle handle)
Gets the frequency error count.
struct _FEM_Obj_ FEM_Obj
Defines the frequency of execution monitoring (FEM) object.
static void FEM_setDeltaCnt(FEM_Handle handle, const uint32_t deltaCnt)
Sets the delta count value.
static void FEM_setMinDeltaCnt(FEM_Handle handle, const uint32_t minDeltaCnt)
Sets the minimum delta count, cnts.
void FEM_setParams(FEM_Handle handle, const float_t timerFreq_Hz, const uint32_t timerPeriod_cnts, const float_t spFreq_Hz, const float_t maxError_Hz)
Sets the frequency of execution monitoring parameters, cnts.
static uint32_t FEM_getMinDeltaCnt(FEM_Handle handle)
Gets the minimum delta count allowed, cnts.
static void FEM_run(FEM_Handle handle)
Runs the frequency of execution monitoring.
bool flag_freqError
a flag to denote that a frequency error has occurred
static uint32_t FEM_getTimerPeriod(FEM_Handle handle)
Gets the timer period, cnts.
static void FEM_setErrorCnt(FEM_Handle handle, const uint32_t numErrors)
Sets the error count.
uint32_t cnt_z0
the current timer count value, cnts
static bool FEM_isFreqError(FEM_Handle handle)
Gets the state of the frequency error flag.
uint32_t minDeltaCnt
the minimum delta count allowed, cnts
static void FEM_incrErrorCnt(FEM_Handle handle)
Increments the error counter.
static bool FEM_getFlag_freqError(FEM_Handle handle)
Gets the state of the frequency error flag.
uint32_t deltaCnt
the latest delta count value, cnts
static uint32_t FEM_getMaxDeltaCnt(FEM_Handle handle)
Gets the maximum delta count allowed, cnts.
static void FEM_setMaxDeltaCntObserved(FEM_Handle handle, const uint32_t maxDeltaCnt)
Sets the maximum delta count observed, cnts.
Defines the frequency of execution monitoring (FEM) object.
static void FEM_setCnt_z0(FEM_Handle handle, const uint32_t cnt)
Sets the current count value.
static void FEM_updateCnts(FEM_Handle handle, const uint32_t cnt)
Updates the current and previous count values.
static uint32_t FEM_getMaxDeltaCntObserved(FEM_Handle handle)
Gets the maximum delta count observed, cnts.
uint32_t errorCnt
denotes the number of frequency errors that have been detected
static void FEM_setMaxDeltaCnt(FEM_Handle handle, const uint32_t maxDeltaCnt)
Sets the maximum delta count, cnts.
static void FEM_setCnt_z1(FEM_Handle handle, const uint32_t cnt)
Sets the previous count value.
uint32_t timerPeriod_cnts
the timer period, cnts
struct _FEM_Obj_ * FEM_Handle
Defines the FEM handle.
FEM_Handle FEM_init(void *pMemory, const size_t numBytes)
Initializes the frequency of execution monitoring (FEM) object.
static void FEM_setTimerPeriod(FEM_Handle handle, const uint32_t timerPeriod_cnts)
Sets the timer period, cnts.
float float_t
Defines the portable data type for 32 bit, signed floating-point data.