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.

TMS320F28388D: HRCAP capture specifications.

Part Number: TMS320F28388D

Hello,

  • In HRCAP type 0 the HRCAP counter is 16 bits in size. How many bits are allocated for fractional and integral parts?
  • For Type-1 HRCAP, does the calibration period value have to be 1.6ms? In the function, 'HRCAP_setCalibrationPeriod',the period count is calculated so that period is 1.6ms

thanks,

  • Hi Debraj,

    In HRCAP type 0 the HRCAP counter is 16 bits in size. How many bits are allocated for fractional and integral parts?

    Our recommendation is to use the HRCAP in absolute mode. You can use the provided functions to convert the capture results into time -> HRCAP_getEventTimeStampNanoseconds()

    For Type-1 HRCAP, does the calibration period value have to be 1.6ms? In the function, 'HRCAP_setCalibrationPeriod',the period count is calculated so that period is 1.6ms

    The 1.6ms period was found through validation to give good results so we recommend users stick to that.

  • Given that it's recommended to read absolute value, can we not read Raw counters? As this is important to our use-case.

    Also it is mentioned in the TRM for type 0 that counter size is 16 bits with Q16 data type. So how are the integer and fractional parts captured together?

  • Debraj, 

    the 1.6mS period was chosen because it was proven to be robust across all test conditions we tested. There were many other robust periods, but ultimately this comes down to your systems specific PVT conditions. We chose 1.6 as customer starting point, but you can change this as you see fit to reject noise inherent to your system.

     If you are trying to interpret something in a standard unit of "seconds" then you should use absolute mode. Driverlib functions have been provided to automatically convert the values to nS for you.

    Given that it's recommended to read absolute value, can we not read Raw counters? As this is important to our use-case.

    You are allowed to read the bits directly and preform what we call "time-delta" measurements. Please note that these measurements are not a standard unit of time.

    So how are the integer and fractional parts captured together?

    What purpose does this information serve you? The register contains a value which is the number of minimum step sizes which have elapsed between two edges, for sake of relative measurements it will have no bearing on most use cases.

    Regards,
    Cody 

  • I do not have any use case to know how fractional and integer values are stored but I am trying to understand the differences between Type-0 and Type-1 raw capture value. For type-0 we have 16-bit capture register with fraction part in Q-16 format, whereas for type-1 we have fraction and integer part captured together in 32-bit eCAP registers. So are the range of values that are captured same for both Type-0 and Type-1 since the counter size has an increase from 16 bits in type-0 to 32 bits in type-1?Also what is the range of raw capture values for both the types like for type-1 is the range for integer 0-2^16 and fractional part 1/2^16?

  • It seems as though your questions hinge around the length of time which can be measured with the HRCAP.

    The HRCAP module is primarily used for shorter pulse width signals. Using the HRCAP module does not particularly make sense for longer signals because the step size of the eCAP is already very small relative to the length of time between input edges. Meaning the resolution of the eCAP is more than sufficient for longer signals.

    Type0 HRCAP uses a Q16 format, there is a standard unit, and it is described in an integer and fractional form. There are only fixed functions provided to read these.

    Type1 does not use the same methodology. It defines the smaller "smallest unit" and represents that in integer form. Just read the value and use it. If you want it in nS there is a function to convert it for you. If you want to read the raw count you can.

    Regards,
    Cody