This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28030: Capture Input Event Driver Module

Part Number: TMS320F28030
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

I am using f2803xcap.h file to get Timer value difference between two rising/falling edges.

My system frequency 60MHz .

My initialization is 

#define ECCTL1_INIT_STATE ( CAP1POL_FALLING_EDGE + \
CAPLDEN_ENABLE + \
CTRRST1_DIFFERENCE_TS + \
EVTFLTPS_X_1 + \
EMULATION_FREE )


#define ECCTL2_INIT_STATE ( CONTINUOUS_MODE + \
TSCNTSTP_FREE + \
SYNCI_DISABLE + \
SYNCO_DISABLE + \
CAPTURE_MODE )

So, how much time stamp will I get & procedure to calculate it for 20ms( square wave input).

EventPeriod=(int32)(cap1.EventPeriod);

How much will be result in EventPeriod variable? 

Thanks in advance

  • Ganesh,
    have you looked at our examples in C2000Ware? There are a couple of examples that should show you exactly how to do this.

    The output of the eCAP timers will be in terms of SYSCLK, if you have setup your clock to be 60MHz then each count will be 16nS.

    The result "EventPeriod" will have the value of the TBCTR during the last edge event that CAP1 was setup to capture. Depending on your settings of CTRRSTx in ECCTL1 it could be any value between 0 and 4,294,967,295.

    Regards,
    Cody