The camshaft position sensor generates pulses at the TDC of the 1st and 4th cylinders on the compression stroke, based on which the ECM determines the fuel injection sequence.
The crankshaft speed sensor provides the ECM with information about the angle of rotation of the crankshaft (piston position). Based on the output signal information from this sensor, the ECM calculates engine speed and crankshaft position.