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.

TMS320F28377D: eCAP: Measure the time difference between two medium frequency signals when using the prescalers

Part Number: TMS320F28377D

TLDR: How do I reset the event prescalers of multiple eCAP modules? Can this be done via the SYNC mechanism? Can this be done in multiple modules either at the same time or in a quick/deterministic timeframe?

I have two frequency locked signal that I need to continuously measure the phase difference between. I can achieve this using two eCAP modules.

My SYSCLK is 200 MHz. The signals have a constant selectable frequency from 10 kHz to 2 MHz.

I do not want to be handling interrupts every 200 MHz / 2 MHz = 100 cycles to read the capture registers, calculate the phase offsets, and then filter to improve accuracy. Using the length 4 buffer does not provide enough headroom. I need to use the event prescalers.

I want to use the event prescaler to reduce the capture event rate and improve the accuracy of each measurement to reduce the additional filtering required.

It is not obvious within the Reference Manual (SPRUHM8I) that the prescaler can be reset without resetting the entire eCAP module via the SOFTPRES3 register.

I have read via another thread that it is not known the delay between an update of the event prescaler field in the and the application of that update to the event prescaler is not known so a live update is dangerous.

How do I reset the event prescalers of both eCAP modules such that the capture events are measured from the same event prescalar reset time?

Please can you offer a solution where I can update the event prescaler and reset its state while the external signals are running.