Instruction manual

AMPDIO DRIVERS
Page 163
6.4.8.36 Free a Pulse Width Modulated Pulse Train Generator TCfreePWMTrain
Frees the timer counter resources used by a pulse width modulated pulse train generator, as
previously setup by TCsetPWMTrain.
SUPPORTED IN VERSION 4.42 ONWARDS.
i = TCfreePWMTrain (h, hPWMT)
where h short: board handle as issued by the
registerBoardEx function.
hPWMT short: pulse width modulated pulse train
generator handle, as issued by the
TCsetPWMTrain function.
Returns short: OK
or ERRHANDLE
ERRCHAN
Prior Calls registerBoardEx
TCsetPWMTrain
See Also TCchangePWMTrainGate
TCchangePWMTrainFreq
TCchangePWMTrainDutyCycle
TCcontrolPWMTrain
6.4.9 Frequency Input and Regeneration Functions
6.4.9.1 Measure Period of an External Signal TCgetExtPeriod
Returns the period of an external signal, measured in microseconds. The external signal must
be connected to the clock input of the timer channel specified by the chip and chan
arguments. See section 3.1.5 for more details on the Frequency/Period Measurement
application.
i = TCgetExtPeriod (h, chip, chan, pper)
where h short: board handle as issued by the
registerBoardEx function.
chip short: address offset of the timer/counter chip.
One of the following pre-defined constants may
be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20
chan short: timer/counter channel number within the
chip (0, 1 or 2). Another timer/counter (chan2)
will also be used to provide the gate signal.