Freescale Semiconductor Inc.
Main Page | Data Structures | File List | Data Fields | Globals

eTPU-CRANK-API Documentation

The eTPU CRANK APIs etpu_crank.c/.h includes API functions for eTPU function CRANK, typically used together with CAM in an engine position system.

The CRANK eTPU function uses 1 eTPU channel to process the tooth signal from a crankshaft sensor and generate the eTPU-internal angle-base (TCR2). The CRANK eTPU function uses the Enhanced Angle Counter (EAC) eTPU hardware. The CRANK eTPU function can be assigned to one of:

Features:

The Synchronization of eTPU TCR2 angle counter to the physical rotation of the crank wheel is, from the software point of view, result of a sequence of processing on both the eTPU and the CPU site:

  1. eTPU function CRANK recognizes the gap or the additional tooth on the crank wheel. eng_pos_state is set to HALF_SYNC.
  2. eTPU function CAM starts to log cam signal transitions. It last for for teeth_per_sync crank teeth. After that CRANK sets channel interrupt flag. eng_pos_state is set to PRE_FULL_SYNC.
  3. On the CRANK interrupt, the CPU can use the Cam Log to decode the engine position at the interrupt (at the first tooth after gap). The CPU writes the decoded position (TCR2 engine angle), using fs_etpu_crank_set_sync.
  4. eTPU function CRANK adjusts the engine angle TCR2 value and sets eng_pos_state to FULL_SYNC. The full synchronization is achieved.