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.

TMS320F280025C: What is difference between the 'absolute time mode' and the ' time difference mode' ?

Part Number: TMS320F280025C

In the TRM TMS320F28002x Real-Time Microcontrollers Technical Reference Manual (Rev. B) on page 2052.

"Actual Capture Value = (Capture Value) – (fractional value of reference event that reset the counter)"

here what is the "(fractional value of reference event that reset the counter)"

there are four capture events; capture event 1/2/3 and 4; where we have the choice to enable the reset counter after capture event 1/2/3/4 time stamp. is the fraction value the time for cap 1/2/3/4 events to get triggered from 0 to 1 or1 to 0?

and in "The best practice is to use absolute time mode for high-resolution mode. If time difference mode is used, it can lead to inaccurate results if the fractional value is not taken into consideration for capture events that have reset the time base counter" 

what is the difference between absolute time mode and time difference mode?

  • Hello Aditya,

    The expert is currently out-of-office, they will return on Monday.

    Best regards,

    Omer Amir

  • Hi Aditya,

    The difference between absolute time mode and time difference mode is the following:

    Absolute time mode is when the TSCTR counts up without resetting and capture events are stored.

    Time difference mode is when TSCTR counts up while resetting back to zero on every valid event such as a rising / falling edge.

    Best,

    Ma

  • Hi,

    Thanks for the reply. 

    Additionally, I need clarity on the below points 

    1. can we calculate the CAP1, CAP2, CAP3, and CAP4 events in nS using the formula given for HRCAP mode, and then calculate the difference to get period, On, and off values?

    2. In the TI-published example for hrcap, we get the values of on, off, and period as cap2-cap1, cap3-cap2, and cap3-cap1 respectively. But If we are using the time difference mode. On should be the TSCTR count after CAP1 ( Rise event ) and Off should be the TSCTR count after CAP2 (fall event) count and Period should be TSCTR (after CAP1) + TSCTR (after CAP2). right ?

    3. I am using time difference mode and I want to get the "fractional value of reference event that reset the counter". how do I get that?

    4. In reference to point 2: where on, off and period are to be calculated differently from the shipped TI example, can there be other scenarios where the alternate capture count differences won't hold true to calculate on and off values?

    Regards,

    Aditya

  • Hi Aditya,

    can we calculate the CAP1, CAP2, CAP3, and CAP4 events in nS using the formula given for HRCAP mode, and then calculate the difference to get period, On, and off values?

    Yes you can calculate the difference in absolute time mode.

    In the TI-published example for hrcap, we get the values of on, off, and period as cap2-cap1, cap3-cap2, and cap3-cap1 respectively. But If we are using the time difference mode. On should be the TSCTR count after CAP1 ( Rise event ) and Off should be the TSCTR count after CAP2 (fall event) count and Period should be TSCTR (after CAP1) + TSCTR (after CAP2). righ

    Yes that is correct. 

    I am using time difference mode and I want to get the "fractional value of reference event that reset the counter". how do I get that?

    In order to use the fractional value of reference event you will need to run in absolute time mode. The fractional value calculations is already taken care of when you're using the driverlib functions. I would recommend using the HRCAP_getEventTimeStampNanoseconds() function to get the captured event time stamp in nanoseconds.

    In reference to point 2: where on, off and period are to be calculated differently from the shipped TI example, can there be other scenarios where the alternate capture count differences won't hold true to calculate on and off values?

    I am sorry I don't think I understand the question fully. Are you talking about calculating a scenario where off, on and period are calculated? The eCAP will only capture signals defined in the CAPxPOL registers.

    Best,

    Ryan Ma