This is release 1_2 of the etpu set2 automotive functions. The package 
contains the binary image of the eTPU code for the CPU to use and the 
source code.

All size are in bytes. Version 1.0.7.30 of the ByteCraft eTPU compilier was 
used.

etpuc_set2.c version 1.5 was used.

As well as the automotive functions 5 set1 functions are 
included (IC, QOM, PWM SM, FPM)

 Nickname    |Version|Code Size|Entry Table| Total |
-------------+-------+---------+-----------+-------+
PWM          |  1.7  |   312   |      64   |   376 |
IC           |  1.7  |   240   |      64   |   304 |
-------------+-------+---------+-----------+-------+
FPM          |  1.8  |   180   |      64   |   244 |
QOM          |  1.5  |   692   |      64   |   756 |
SM           |  1.4  |   748   |      64   |   812 |
---------------------------------------------------+
CAM          |  1.19 |   308   |      64   |   372 |
CRANK        |  1.21 |  2120   |      64   |  2184 |
FUEL         |  1.10 |   932   |      64   |   996 |
KNOCK        |  1.5  |   244   |      64   |   308 |
-------------+-------+---------+-----------+-------+
SPARK        |  1.7  |   760   |      64   |   824 |
TOOTH_GEN    |  1.3  |   620   |      64   |   684 |
-------------+-------+---------+-----------+-------+
Global_error |       |    56   |       0   |    56 |
Link4        |       |    20   |       0   |    20 |
-------------+-------+---------+-----------+-------+
                     TOTAL Code Memory used: 7,936

Files included in this release:

etpuc.h               1.1
etpuc_cam.c 	        1.19
etpuc_cam.h 	        1.8
etpuc_common.h        1.1
etpuc_crank.c         1.21
etpuc_crank.h         1.8
etpuc_fuel.c 	        1.10
etpuc_knock_window.c  1.5
etpuc_knock_window.h  1.3
etpuc_set2.c 	        1.6
etpuc_spark.c 	      1.7
etpuc_toothgen.c 	    1.3
etpuc_util.h 	        1.1
makefile 	            1.10
readme.txt - This file
Also files from etpu_set1 release 1.30

Notes
=====
Bytecraft compiler version used was 1.0.7.30

Change history
==============

Release 1_2
============
Minor code change for Spark. Added EnableOutputBuffer() to support parts without an SIU eg Coldfire parts
Minor code change for Toothgen. Added EnableOutputBuffer() to support parts without an SIU eg Coldfire parts
Fix bug for workaround for Errata 2477. Tooth_Angle_Target was not being updated in a TIMEOUT condition.
Fix bug where Tooth_Count was not incremented for the tooth before the Gap.
Removed superfluous, commented #define NO_ERRATTA_2477 from etpuc_crank.h

Release 1_1
============
Fuel priority options are not generated for fuel auto file any more - no code changes
Spark priority options are not generated for spark auto file any more - no code changes

Release 1_0
============
This is a copy of Release_0_10
Added this readme.txt file.

Release 0_10
============
Changes to SPARK
 * Changed LSR state to perform re-initialization instead of shutdown.

Changes to FUEL
 * LSR (STALL event) changed: FUEL attempts to re-sync (re-run INIT) and if successful FUEL function continues as before

Release 0_09
============
Changes to KNOCK_WINDOW
 * Updated Number_Of_Windows and Number_Of_Windows_Remaining to int8.

Release 0_08
============
Changes to SPARK
 * Use 2X recalc angle offset for 1st pulse after init.
 * Changed TCR2_Counts_Per_Engine_Cycle to point to CAM parameter.
 * Delay dwell time updates until next cycle to fix issues with enable/disable.

 
Changes to FUEL
 * once the injection time is equal to the min. inj. time the pulse is still generated (> replaced by >=)
 * double the recalc angle on the first pass only
 
Release 0_07
============
Chnages to SPARK
 * Fixed 2 bugs in SPARK_UPDATE_HSR found during formal testing.  Added initialization for global variables.

Release 0_06
============
Added SPARK

Release 0_05
============
Added Fuel function.
CAM function changes:
	Fix write to Edge_Angle in CAM state CAM_SYNC_ANGLE.
KNOCK function changes:
	Changes based on Milan's feedback:
		Coherent read correction - need to be assembly
		DisableOutputBufer -> EnableOutputBuffer
		FM bit #define naming as per convention
		Changed pin toggle on matches to OnMatchA(PinLow) & OnMatchB(PinHigh).
		Number_Of_Windows and Number_Of_Windows_Remaining changed to 24 bit variables - makes smaller code size
set2.c changes
	Fix export of 24 bit values; use ::ETPUglobalimage32
makefile
	Include FUEL function		

Test Release 04
===============
Added knock window function.
Changes to CRANK to address issues identified in testing Test Release 03
 - ENG_POS_HALF_SYNC now exported to *auto.h file
 - if tooth window close time is equal to transition 
 - detection time, crank internal error is set - bug now resolved
 - compilation errors with #define NO_ERRATTA_2477 resolved
 - interrupt now generated on all system state changes
Revert to using standard set1 QOM function.

Test Release 03
===============
Major overhaul of sync functions based on output of global team 
meeting held in EKB in March 08.
Changes include:
	- Error handling changes
		- Single timeout of "normal" tooth now dealt with immediately by asserting IPH
		- Conscutive timeout causes re-sync --> First_Edge
		- AB test fail causes re-sync --> First_Edge
		- BA test fail (hardware test)  causes re-sync --> First_Edge
		- Timeout on Tooth before Gap, tooth after the Gap or tooth after 
		  the Gap+1 causes re-sync --> First_Edge
	- More window parameters
			- Added parameters:	
        - Windowing_Ratio_Normal
        - Windowing_Ratio_Across_Gap
        - Windowing_Ratio_After_Gap
        - Windowing_Ratio_Timeout
	- Links generated by Crank on Error/Stall.
		- These allow output functions and CAM to perform shutdown functions 
	- CRANK now controls overall Engine Position Sync Status
		- proviously controlled by CAM
			- Makes for a simpler CAM function
			- provides a cleaner interface between CAM and CRANK allowing
			  CAM to be more easily replaced by cutomers.
	- Addition of 'running' ABA test and failure treatment.
	
See detailed design document version 0.12 for more details.
      
      
Test Release 02
===============
Added support for erratum 2477.
Replace erroneous use of ConfigMatch_AB.
Added these files:-
    etpuc_util.h
    etpuc.h
    etpuc_common.h
    etpuc_set2.c


Test Release 01
===============
Initial release