Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

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

Back Button 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 AN2577 Datasheet HTML 34Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 32 / 34 page
background image
Angle clock application
AN2577
32/34
In an equals-only setup, when a function sets up a channel for action at a future angle, that
angle can be any value in the range of the angle clock and the match will occur in the next
occurrence of that angle. This is true even if the angle is 719 degrees in the future. The
corollary of this is that if a system update results in a decision that an action that was
scheduled should occur in the past, the match will wait until the next revolution.
Note:
In the eTPU angle clock, no counts will be skipped. Any in-range equals-only match will
always be satisfied on the next occurrence of the angle.
The discrimination between reprogramming to the past rather than the future is left to the
eTPU software. The designer must insure that, for example, if a spark is about to occur and
the spark fire angle is updated to occur at an earlier angle, the match is forced immediately.
If the earlier angle is simply written to the match register, the spark will be missed until the
next cycle.
There is one additional situation to consider when using equals-only matches with the angle
clock. If the tick rate is slow, it is possible to get a service request on an angle match and
execute part of a thread before the angle changes. If a function is trying to set up a future
match exactly 360 (or 720) degrees after the current one, care must be taken that the
register is not written with the current value of TCR2.
Please refer to the reference design for examples of how to use a periodic angle clock.
5.3
Angle math
If the angle clock is used in the continuous angle mode, angles parameters can be added,
subtracted, and compared like any other 24-bit integer. However, when the user selects a
periodic reset of the angle clock, modulus arithmetic must be used. If the angle clock is reset
every cam revolution (= two crank revolutions), the modulus is 720 degrees expressed in
terms of the tick resolution. For example if a 60-tooth wheel is used with 60 ticks per tooth,
there would be 7200 ticks per cam cycle (Ticks_Per_Cycle).
Adding two angles in such an application would be done thusly:
New_Angle = (First_Angle + Second_Angle) % Ticks_Per_Cycle;
This operation is mathematically correct, but it might not generate the most efficient code.
This is because the modulus is normally generated as a divide instruction. A more efficient
coding would be to add the numbers, and if the sum is greater than Ticks_Per_Cycle,
subtract Ticks_Per_Cycle. Macros or subroutines for handling this math can be found in the
reference design.



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