
Understanding the eTPU Channel Hardware, Rev. 0
Using the Channel Hardware
Freescale Semiconductor
34
/* The following sets up the drive to turn on the load at time Pulse_Start_Time and the
feedback test to occur a short time later*/
SetupMatchB(Pulse_Start_Time); //start a pulse at a specified time
/* L/R is, say, 0.1 msec. Do the short circuit test at 1 microsec. */
SetupMatchA(Pulse_Start_Time + One_Microsecond); //this sets current level test
/* ... */
/* Match Handling */
if (MatchA_TransB) // In a _st mode, this can only be entered if MRLA is set
{
if (TransitionALatch)
{
Shorted_Load:
/* Handle load short here */
}
else
{
/* Handle normal pulse operation here */
}
/* ... */
ClearMatchAEvent();
ClearMatchBEvent();
ClearTransitionEvents();
}
if (MatchB_TransA && !MatchA_TransB)
{
ClearMatchBEvent();
}
/* ... more... */
In Example
8
, the eTPU is set up to turn on an inductive load at a specified time. A current sensing resistor
will indicate the exponential rise of current in the circuit after the transistor is switched on. When the load
is healthy, the current in the resistor will rise according to the L/R time constant. This may be in the range
of hundreds of microseconds. If the load is shorted, the current will rise very fast, depending on the turn-on
time of the transistor. When the current sense voltage is fed back to the input of the eTPU channel, it can
be tested against a reference as a specified time after the load is applied.
With a normal load, the voltage is turned on at the time set by Match B. The current will rise in the resistor
according tho the applied voltage and the L/R time constant. When Match A tests the comparator output