Electronic Components Datasheet Search
  English  ▼

X  

AN2577 Datasheet(PDF) 28 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) 28 Page - STMicroelectronics

Back Button AN2577 Datasheet HTML 24Page - STMicroelectronics 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 28 / 34 page
background image
eTPU software design
AN2577
28/34
Example
case Apparent_Gap:
ToothPeriodLast = ToothPeriod;
ToothPeriod= TempToothPeriod;
ToothTime = EdgeCaptureTime;
ToothCount = ToothCount + 1;
if (ToothPeriod >= ToothPeriodLast*GapRatio)//verify
{
CrankStatus = Half_Sync;
SetChannelInterrupt();//Inform the host that the crank
status is updated
ToothCount = 1;
/* More */
Last_State = GapVerified;
}
else
Last_State = PossibleGapVerifying;
/* More */
break;
4.2.7
Gap verified
Once the gap is verified, the system can go to Half_Sync or even Full_Sync mode. The
tooth position is now known, and subsequent gaps can be anticipated. An angle can be
written to the TCR2, although if the mode is Half_Sync, the angle could be off by 360
degrees.
4.2.8
Counting
Once wheel sync has been achieved, the angle clock system executes repeated cycles of
tooth detection and period timing, driving the TCR2 in wheel synchronization. The rate of
the ticks following a tooth are extrapolated from the previous period by the software when it
programs the Tick Rate register.
The Tick Rate register is organized as a 15-bit whole number and a 9-bit fraction and is
programmed in terms of TCR1 counts. The eTPU can automatically capture the TCR1 time
of each tooth edge, so the period is trivial to determine. The new edge time is then stored for
the next period calculation. To determine the tick period, the software need only divide the
measured tooth period by the number of tick counts per tooth. This division can present
some problems for the designer depending on the selected resolution of TCR1 and the
speed range of the wheel. See Section 3.1.3: Angle resolution on page 13. Even when the
TCR1 is properly selected, the software engineer needs to ensure that the intermediate
result of the fixed point calculation does not overrun a register or truncate needed resolution
of the tick rate.



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