DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

AN2577 View Datasheet(PDF) - STMicroelectronics

Part Name
Description
Manufacturer
AN2577 Datasheet PDF : 34 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
eTPU angle clock hardware
AN2577
2.1
Tooth wheel input
When an eTPU is placed into angle clock mode by programming the AM bit in the register
ETPUTBCR, the input to Channel 0 of the device is connected internally to the external
clock input TCRCLK. This input has an independently programmed hardware filter circuit
which enables the user to select a different input filter treatment from the rest of the eTPU
input pins if desired. The filtered input signal is applied to the angle clock hardware circuitry.
This hardware is part of channel 0 input and the signal to the angle clock can be conditioned
by matches according to the selected mode for the channel. For example, the channel can
be placed in m2_st (Match2SingleTransition) mode, and the eTPU software can establish a
window for accepting a tooth signal from the wheel. A signal arriving too early might indicate
noise and could be ignored, while one arriving too late could indicate a stall and might
require special exception processing.
2.2
Note:
Tick counter
When the angle clock is running on channel 0 of an eTPU, an input signal detected by the
channel increments TCR2. When this count occurs, a tick counter is started in the angle
clock circuitry. This counter increments TCR2 at a rate set by the value in the tick rate
register (TRR), which is programmed in terms of TCR1 cycles. Thus if the TRR were written
with a value of 100, and the TCR1 count rate was set at 0.1 microsecond, the TCR2 counter
would increment once every 10 microseconds.
The TRR is written by eTPU software from a value derived from the projected speed of the
wheel. If the application requires 200 ticks per tooth, the eTPU software will typically
measure the period of the last tooth pair in terms of TCR1, and divide the value by 200 to
get the TRR value. The TRR can be programmed with a whole number and fraction of a
count. As the count proceeds, the angle clock logic accumulates the fraction, and adjusts
the count to compensate for the fraction. The software also programs the number of
inserted counts into the field TICKS in the tooth program register (TPR). If there are 100
ticks per tooth period, then TICKS would be programmed with 99.
The tick counter is designed to count exactly TICKS+1 periods between detected physical
teeth. Under constant speed operation, TICKS +1 times the TRR rate will be exactly equal to
the period between the teeth. When the following tooth signal arrives late, the angle clock
stops after incrementing the TCR2 by TICKS counts. Thus the angle clock is said to be in
Halt mode while the slowing wheel catches up with the angle clock count. When the next
tooth arrives, it is counted in TCR2 and the angle clock reverts to Normal mode with tick
counts added for the following tooth period. Thus the angle clock cannot proceed to the next
tooth count until the physical tooth is detected.
If the wheel is accelerating, the tooth signal may be detected before the TICKS count has
completed. In this event, the angle clock hardware is put into a high rate count mode. The
tick count completes at an accelerated rate equal to 1/8 of the MCU system clock
(regardless of the TCR1 rate). This allows the angle clock to catch up with the physical
teeth. After the last tick is counted, the angle clock will count the newly arrived tooth at the
same rate. The high rate has been chosen to ensure that any eTPU or external action
triggered by a specific value of the angle clock can be detected and acted upon.
The angle clock is designed to count all TICKS between teeth, never skipping a count, and
never proceeding with a count for the new tooth until the physical tooth is detected.
8/34

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]