Is there a way to get a time-stamp for an external event (edge)? The GP Timers don't seem to have a free-running counter or capture function. I haven't found a reference to a counter register tied to PCLK or SCLK.
Width capture mode available for the GP timers. In the width capture mode, the timer resets words of the count in the TMxCNT register value to0x0000 0000 and does not start counting until it detects the leading edge on the
0x0000 0000 and does not start counting until it detects the leading edge on the
TIMERx_I signal. When the timer detects a first leading edge, it starts incrementing. When it detects the trailing edge of a waveform, the timer captures the currentvalue of the count register (=TMxCNT ÷ 2) and transfers it into the TMxW width registers. At the next leading edge, the timer transfers the currentvalue of the count register (=
value of the count register (=
TMxCNT ÷ 2) and transfers it into the TMxW width registers. At the next leading edge, the timer transfers the currentvalue of the count register (=
TMxCNT ÷ 2) into the TMxPRD period register. The leading edge is determined by the pulse bit. This mode can be used
to determine the time taken for an edge based on the count read in the TMxW register. The count is based on the peripheral clock.
For further details on this mode please refer to the hardware reference manual.
Hope this information helps.
Also the current version of 21368 manual on the web fails to include the GP timer manual. Please refer to the 2146x hardware reference manual at the following link for the GP timer description. This will be fixed in the next rev.
Thanks. Unfortunately this means I'll need to write my own "absolute" timer.
For some reason, the GP timers are described in the Programmers Reference.
Retrieving data ...