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.

MSPM0G1507: Find the period between the current comparator event and the previous one

Part Number: MSPM0G1507

Tool/software:

I wanted to ask if there is an easy way to connect the comparator with a timer so that whenever there is a rising edge on comparator's output, a capture event on a timer is triggered and saves the timestamp of the comparator's event.

For instance, the first rising edge occurs and it triggers a capture event that stores the counter's counter value to a capture channel which then I read from and store it to a local variable. The next rising edge triggers yet another capture event that stores the counter's counter value which I read to a local variable. Then I could subtract the two values and find out the time it took for the second rising edge to occur relative to the first one.

I found this example but not sure if there is a better way 

Thanks Calex