Detection Condition
WARNING: This page is about a different car, the 2002 Mazda Tribute. However, it is still accessible from the selected car via links, so may be relevant.
DTC P0340 indicates Camshaft Position (CMP) sensor circuit failure.
CMP sensor is a magnetic transducer. CMP sensor detects position of camshaft and identifies when piston No. 1 is on compression stroke. A signal is sent to PCM. PCM uses signal to synchronize firing of fuel injectors.