What Does Code P1340 Mean?
DTC P1340 indicates that the Engine Control Module (ECM), also commonly referred to as the Powertrain Control Module (PCM), has detected a malfunction within the electrical circuit of the Camshaft Position Sensor “B”. The “B” designation typically refers to the exhaust camshaft on a single-bank engine with Variable Valve Timing (VVT), or the secondary camshaft in configurations such as a DOHC engine where there are two camshafts per bank, or it could refer to Bank 1 exhaust camshaft if the engine is a V-type with multiple banks. The Camshaft Position (CMP) sensor is a critical component that provides the ECM with precise information regarding the camshaft’s rotational speed and position relative to the crankshaft. This data is vital for accurate fuel injection timing, ignition timing, and in VVT-equipped engines, for controlling the camshaft phasers to optimize valve overlap. The ECM monitors the CMP sensor’s signal voltage, frequency, and waveform integrity. A “circuit malfunction” implies that the ECM is not receiving an expected signal from the sensor, or the signal it receives is outside the calibrated parameters. This could be due to an open circuit (no signal), a short to ground, a short to voltage, or a signal that is erratic or missing, preventing the ECM from accurately determining the camshaft’s position. When this occurs, the ECM often defaults to a “limp mode” strategy to protect the engine, which can lead to various performance issues.
Common Symptoms
- Illumination of the Malfunction Indicator Lamp (MIL): The “Check Engine” light will illuminate on the dashboard.
- Rough Idling or Engine Hesitation: Inconsistent engine speed, especially at idle, or a noticeable delay in engine response during acceleration.
- Reduced Engine Performance and Power: The engine may operate with decreased horsepower and torque due to incorrect timing or fuel delivery strategies.
- Difficulty Starting or Extended Crank Time: The engine may take longer to start or may fail to start altogether if the ECM cannot synchronize ignition and fuel timing.
- Engine Misfires: Inaccurate camshaft position data can lead to incorrect spark plug firing and fuel injector operation, causing misfires.
- Poor Fuel Economy: Suboptimal engine operation due to incorrect timing can result in increased fuel consumption.
- Stalling: The engine may stall unexpectedly, especially at low speeds or when coming to a stop.
What Causes the Code P1340?
- Faulty Camshaft Position Sensor “B”: The sensor itself may have failed internally, preventing it from generating an accurate signal.
- Damaged or Corroded Wiring Harness: Open circuits, shorts to ground, or shorts to voltage within the sensor’s wiring harness due to chafing, cuts, or corrosion.
- Corroded or Loose Electrical Connector: Poor connection at the CMP sensor or ECM connector pins, caused by corrosion, contamination, or improper seating.
- Metallic Debris on Sensor Tip: Ferrous particles adhering to the magnetic tip of a Hall effect or inductive sensor can interfere with its ability to read the tone ring accurately.
- Tone Ring/Reluctor Wheel Damage: Although less common for a “circuit malfunction” code, a damaged, bent, or missing tooth on the camshaft’s tone ring can cause an erratic or absent signal that the ECM may interpret as a circuit fault.
- ECM/PCM Failure: While rare, an internal malfunction within the ECM’s input circuit for the CMP sensor can trigger this code.
How to Diagnose and Troubleshoot
Diagnosing P1340 requires a systematic approach, utilizing an OBD-II scanner and a digital multimeter (DMM), and potentially an oscilloscope.
- Retrieve and Analyze DTCs and Freeze Frame Data: Connect an OBD-II scanner and confirm P1340 is present. Note any other related codes (e.g., misfires, other CMP/CKP codes). Review freeze frame data to understand engine conditions (RPM, load, temperature, etc.) when the code was set. This provides crucial context for diagnosis.
- Visual Inspection:
- Locate Camshaft Position Sensor “B” (consult a service manual for exact location).
- Inspect the sensor and its electrical connector for visible damage, corrosion, melted plastic, or loose connections.
- Trace the sensor wiring harness back to the ECM, checking for any signs of chafing, cuts, pinches, or heat damage. Pay close attention to areas where the harness passes near hot engine components or sharp edges.
- Check for any metallic debris on the tip of the CMP sensor if it can be safely removed and inspected.
- Electrical Circuit Test (Using DMM):
- Disconnect the CMP Sensor “B” connector.
- Power Supply Check: With the ignition ON (engine OFF), use a DMM to check for the reference voltage (typically 5V or 12V, consult wiring diagram) at the appropriate pin of the sensor’s harness connector. If no voltage, check fuses and wiring back to the ECM.
- Ground Check: Use the DMM to check for good ground continuity at the ground pin of the sensor’s harness connector. Measure resistance between the ground pin and a known good chassis ground; it should be very low (close to 0 ohms).
- Signal Wire Continuity (ECM to Sensor): With both the CMP sensor and the ECM connectors disconnected, use the DMM to check for continuity between the signal wire pin at the CMP sensor harness connector and the corresponding signal input pin at the ECM connector. Resistance should be very low. Also, check for shorts to ground and shorts to voltage on this signal wire (ensure power is off when checking for shorts to ground/voltage).
- CMP Sensor Signal Test (Using Oscilloscope or Scanner Live Data):
- Oscilloscope: This is the most definitive test. Back-probe the CMP sensor’s signal wire (with the sensor connected and ignition ON, engine running or cranking). Observe the waveform. A healthy Hall effect sensor should produce a clean, square wave signal that changes frequency with engine speed. An inductive sensor produces an AC sine wave. Look for missing pulses, erratic signals, low amplitude, or a complete absence of signal. Compare with the Crankshaft Position (CKP) sensor waveform if possible, as they should be synchronized.
- OBD-II Scanner Live Data: Monitor the CMP sensor “B” parameter (e.g., RPM, degrees, or position count) in the scanner’s live data stream while cranking or running the engine. Compare its readings to the CKP sensor data. Erratic readings, no signal, or values that don’t change appropriately with engine speed indicate a sensor or circuit issue.
- Resistance Test (If Applicable): Some inductive CMP sensors can be tested for resistance. Consult the service manual for specific values. Hall effect sensors typically cannot be accurately tested for resistance.
- ECM Diagnosis: If all sensor and wiring tests pass, and the signal is confirmed good at the ECM connector pins, then the fault may lie within the ECM itself. This is a rare occurrence and should only be considered after thoroughly ruling out all other possibilities.
Recommended Repairs and Solutions
Based on the diagnostic findings, the following repairs are commonly recommended:
- Replace Camshaft Position Sensor “B”: If the sensor itself is found to be faulty after electrical circuit verification and signal testing, replace it with a new, high-quality OEM or equivalent aftermarket part. Ensure the new sensor’s O-ring or gasket is properly seated to prevent oil leaks.
- Repair or Replace Wiring Harness: If damaged wiring (chafed, cut, corroded, or shorted) is identified, repair the specific section using appropriate automotive wiring repair techniques (e.g., solder and heat shrink, or specialized crimps) or replace the entire sub-harness if damage is extensive.
- Repair or Replace Electrical Connectors: If the connector terminals are corroded, bent, or loose, repair them using terminal repair kits or replace the entire connector pigtail. Ensure a secure and tight connection upon reassembly.
- Clean Metallic Debris: If metallic particles are found on the sensor tip, carefully clean them off. Inspect the tone ring (if accessible) for any signs of damage that might be generating the debris.
- Clear DTCs and Test Drive: After any repair, clear the diagnostic trouble codes using an OBD-II scanner. Then, perform a comprehensive test drive under varying engine loads and speeds to confirm the repair and ensure the code does not return. Monitor live data during the test drive to verify correct sensor operation.
- ECM Replacement: Only proceed with ECM replacement if all other components and wiring have been thoroughly tested and confirmed to be functioning correctly, and a professional diagnostic technician has pinpointed the ECM as the root cause. This typically requires programming the new ECM to the vehicle.

