Electronic Components Datasheet Search
  English  ▼

X  

AN2577 Datasheet(PDF) 29 Page - STMicroelectronics

Part # AN2577
Description  Using the eTPU angle clock
PDF  34 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2577 Datasheet(HTML) 29 Page - STMicroelectronics

Back Button AN2577 Datasheet HTML 25Page - STMicroelectronics AN2577 Datasheet HTML 26Page - STMicroelectronics AN2577 Datasheet HTML 27Page - STMicroelectronics AN2577 Datasheet HTML 28Page - STMicroelectronics AN2577 Datasheet HTML 29Page - STMicroelectronics AN2577 Datasheet HTML 30Page - STMicroelectronics AN2577 Datasheet HTML 31Page - STMicroelectronics AN2577 Datasheet HTML 32Page - STMicroelectronics AN2577 Datasheet HTML 33Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 29 / 34 page
background image
AN2577
eTPU software design
29/34
At low wheel speeds, the period is long and a left shift can be done after dividing by the ticks
per tooth. If the shift is done before the division, the value may overflow. However, at high
speeds, the period is short and dividing by the ticks per tooth could result in gross errors
before the shift is done. The algorithm in the example below is designed to implement the 9-
bit shift in two steps to minimize loss of resolution.
Example
if (IsTransALatched())
//If the Tooth edge is
detected
{
EdgeCaptureTime = GetCapRegA();//Capture the edge
transition time
TempToothPeriod = EdgeCaptureTime-ToothTime;
ToothTime = EdgeCaptureTime;
TempTicks = ((TempToothPeriod*8)/TicksPerTooth)*64;//
implements a left shift by 9 bits and a div by 60
TickRate = TempTicks;
Note:
The value in the tick rate register must never be programmed to less than 1.0. If the integer
value is set to 0, it will be interpreted as 32768.
The angle clock tick counter begins timing out when the tooth edge occurs. The calculation
of a new value for the Tick Rate Register will take some time to complete. While this is being
done the old value is used for the tick rate. At steady state this makes no difference, but
when the wheel is accelerating, the first tick is necessarily late. If the acceleration continues,
all of the tick counts will be late and the angle clock will have to go into High Rate mode to
catch up.
It is possible to compensate for the accelerating wheel by adjusting the tick rate so that the
next tooth is counted a bit faster than a simple extrapolation. This adjustment can be added
to the software design at the engineer’s discretion.
This state is repeated for each new tooth detection until one of the following occurs:
1.
The tooth count indicates that the gap is following next.
2.
The tooth count indicates that the next tooth is the zero angle reference point.
3.
The host requests service, for example to correct an error.
4.
The following tooth is not detected within a specified time (stall).
4.2.9
Gapping
When the tooth count indicates that a new gap is expected, the system must verify that
measured gap times pass the designated test. If the gap is correctly placed, no host action
is required. If the gap period is outside the range of acceptability, the information should be
passed up to the host by setting the status to Error. The application can then analyze the
error and execute a correction procedure.
Note:
Once synchronized, the angle clock system can proceed indefinitely without further host
action, unless a signal anomaly occurs.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com