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

eTPU-SPARK-API Documentation

The eTPU SPARK APIs etpu_spark.c/.h includes API functions for eTPU function Spark.

Each instance of the SPARK eTPU function controls a single SPARK channel.

There is a SPARK parameter tdc_angle, relative to which all angles are defined. Positive angles precede the tdc_angle, negative angles come after.

Each instance of the SPARK eTPU function controls a single SPARK channel.

The SPARK eTPU function enables to generate one or more spark output pulses. Each spark output includes the main pulse, defined by end_angle and dwell_time and limited by min_dwell_time and max_dwell_time. The main pulse is optionaly followed by a sequence of multi-pulses, defined by multi_on_time, multi_off_time and pulse_count.

The CPU can monitor the SPARK operation using SPARK state variables dwell_time_applied and error. The reported error flags are: FS_ETPU_SPARK_ERROR_MIN_DWELL_APPLIED - the spark main pulse has been limited by min_dwell_time and the pulse ended at a later angle than the eng_angle. Hence, the commanded dwell_time and the dwell_time_applie may differ. FS_ETPU_SPARK_ERROR_MAX_DWELL_APPLIED - the spark main pulse has been limited by max_dwell_time and the pulse ended sooner than at the eng_angle. Hence, the commanded dwell_time and the dwell_time_applie may differ.

Channel interrupt is generated before each single spark, on the recalc_angle.