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.

GetTimeStamp instruction

Hello, 

We're using the Hercules RM42x Launchpad. We need to evaluate the difference between two posedges received by one of the Launchpad pins, using the GetTimeStamp instruction.

We have the following doubt:

Does the Loop Counter Value returned by the GetTimeStamp instruction reset itself when it exceeds its maximum possible value?

  • Hello Nimit,

    Assuming you are referring to the function hetGetTimeStamp, this function will read a counter value in HET RAM. On edge one, value 1 can be written and at edge 2, value 2 is written. The difference between the 2 values would then be the difference in time based on the loop count values.

    If the counter reaches its mazimum, it will roll over which is what I suspect you are referring to as reset. Your code would have to account for the case where value 2 is smaller than value 1 since this would, most likely, indicate a roll over of the counter.

    I have also copied our NHET expert so that they may add any additional comments that might be needed to clarify further.