The CKP sensor (Crankshaft Position Sensor) and the CMP sensor (Camshaft Position Sensor) work together in order to control the delivery and the time. The two sensors have a reluctor ring, which passes through a magnetic sensor. In addition, the ring generates a voltage that indicates the position of each component that indicates the sensor respectively.
The Crankshaft Position Sensor (CKP) is part of the primary ignition system and is the trigger. It takes into account the position of the crankshaft relays, and then sends that information to the Power Train Control Module (PCM) to manage the timing of the spark.
On the other hand, the Camshaft Position Sensor (CMP) detects the position of the camshaft, and then transmits that information to the Powertrain Control Module (PCM). Then the PCM with these data can determine the beginning of the sequence of the injector.
These sensors and their two axes are linked by a belt or distribution chain. The timing of the cam like the crank should be precise. In case the PCM detects that both signals (cam and crankshaft) are out of time for a specific number of turns, the DTC code P0017 OBD2 is established.