Other Parts Discussed in Thread: C2000WARE
Hi,
I found in stl for TMS320F28x7x a lot of comment that refer to DID_xx_xx for example in stl_eqep.c
uint16_t STL_EQEP_test(const STL_EQEP_TestHandle testHandle,
uint16_t capPeriod)
{
uint32_t getPosValue, posCount;
uint16_t testStatus;
uint32_t eQEPBase = testHandle->eQEPBase;
//
// Get the position count
// DID_34_25
//
getPosValue = EQEP_getPosition(eQEPBase);
posCount = getPosValue;
//
// Set the test status return value
// DID_34_27
//
if((EQEP_getInterruptStatus(eQEPBase) & EQEP_INT_WATCHDOG) != 0U)
{
//
// Watchdog failure
// DID_34_28, DID_34_29
//
testStatus = STL_EQEP_FAIL_WATCHDOG;
STL_Util_setErrorFlag(STL_UTIL_EQEP);
}
//
// DID_34_25
//
else if((testHandle->direction == STL_EQEP_DIRECTION_CCW) &&
(posCount >= (uint32_t)STL_EQEP_START_COUNT))
{
//
// Position count did not decrease as expected
// DID_34_28, DID_34_29
//
testStatus = STL_EQEP_FAIL_DIRECTION;
STL_Util_setErrorFlag(STL_UTIL_EQEP);
}
//
// DID_34_25
//
else if((testHandle->direction == STL_EQEP_DIRECTION_CW) &&
(posCount <= (uint32_t)STL_EQEP_START_COUNT))
{
//
// Position count did not increase as expected
// DID_34_28, DID_34_29
//
testStatus = STL_EQEP_FAIL_DIRECTION;
STL_Util_setErrorFlag(STL_UTIL_EQEP);
}
//
// DID_34_26
//
else if((uint16_t)abs(EQEP_getCapturePeriod(eQEPBase) - capPeriod) >
testHandle->delta)
{
//
// Capture period timestamp is incorrect
// DID_34_28, DID_34_29
//
testStatus = STL_EQEP_FAIL_CAPTURE;
STL_Util_setErrorFlag(STL_UTIL_EQEP);
}
else
{
//
// No issues detected
// DID_34_29
//
testStatus = STL_EQEP_PASS;
}
//
// DID_34_29
//
return(testStatus);
}
I cannot understand what does DID_34_26 mean? Which timestamp is controlled by this test?
Thank you,
Bing