DTC P0340: Camshaft Position Sensor Circuit - Bank 1 Or DTC P0345: Camshaft Position Sensor Circuit - Bank 2: Description
WARNING: This page is about a different car, the 2002 Nissan Maxima and 2002 Infiniti I35. However, it is still accessible from the selected car via links, so may be relevant.
The Camshaft Position (CMP) sensor (PHASE) senses the retraction with intake valve camshaft to identify a particular cylinder. The Crankshaft Position (CKP) sensor (POS) senses the piston position. When the CKP sensor (POS) system becomes inoperative, the CMP sensor (PHASE) provides various controls of engine parts instead, utilizing timing of cylinder identification signals.
The sensor consists of a permanent magnet and hall IC. When engine is running, the high and low parts of the teeth cause the gap with the sensor to change. The changing gap causes the magnetic field near the sensor to change. Due to the changing magnetic field, the voltage from the sensor changes.