Detection Condition
WARNING: This page is about a different car, the 2003 Mazda B4000, 2003 Mazda B3000, and 2003 Mazda B2300. However, it is still accessible from the selected car via links, so may be relevant.
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 its compression stroke. A signal is sent to PCM. PCM uses signal to synchronize firing of fuel injectors.