Camshaft Position Sensor Circuit Malfunction
What Does P0340 Mean?
P0340 indicates the Engine Control Module (ECM) has lost or received an invalid signal from the camshaft position (CMP) sensor. The CMP sensor tells the ECM exactly where the camshaft is in its rotation so it can time fuel injection and (on some platforms) ignition spark correctly.
On the 2005–2015 Toyota Tacoma with the 2.7L 2TR-FE or 4.0L 1GR-FE V6, P0340 is most often the sensor itself failing from heat-soak. The sensor sits on top of the cylinder head and bakes for years. Replacement is usually under $80 in parts and 20 minutes of labor.
Symptoms
Common Causes
- 1.Failed camshaft position sensor65%
Heat damage to internal Hall-effect element. Most common.
- 2.Damaged sensor wiring / connector20%
Chafed wire or corroded pin at the harness connector.
- 3.Reluctor / tone ring damaged8%
Tooth missing or debris on the wheel the sensor reads.
- 4.Timing chain stretched / jumped5%
Cam-to-crank correlation off — investigate before driving.
- 5.ECM internal fault2%
Rare, but verifiable by swapping in a known-good ECM.
Step-by-Step Diagnosis
Scan and freeze-frame
Pull freeze-frame data. Note RPM, coolant temp, and whether the code set at start or while running. A code that sets only at cold start points to wiring; a code that sets after warm-up points to a heat-soaked sensor.
FREEZE FRAME P0340:
RPM : 0
Coolant Temp : 92°C (warm)
Engine load : --
→ Sensor failed after warm-up — classic heat-soakVisually inspect the sensor and connector
Find the CMP sensor (top of cylinder head, near the front on the 2TR-FE). Unplug the connector. Check for green corrosion, bent pins, or oil intrusion from a leaking cam seal.
Measure sensor signal with scope or DVOM
Back-probe the signal wire. On a Hall-effect sensor (Toyota), you should see a clean 0V→5V square wave while cranking. A flat line means the sensor is dead.
Check the 5V reference and ground
Key on, engine off. Probe the connector: pin 1 should show 5.0V (reference), pin 2 should show <0.1V (ground). If 5V is missing, the wire back to the ECM is broken or shorted.
Replace the sensor (most common fix)
Two bolts on the Tacoma — 20 minutes. Use OEM Denso (PN 90919-05060) or Aisin. Cheap eBay sensors fail again within months.
How to Fix It
Parts needed:
- Denso OEM CMP Sensor (90919-05060) — approx $68
- Aisin CMP Sensor (alternative OEM) — approx $54
- Toyota CMP harness connector pigtail — approx $22
- Dielectric grease (for connector) — approx $6
Procedure:
- Disconnect negative battery cable.
- Locate CMP sensor on cylinder head (rear of engine on 1GR-FE).
- Unclip electrical connector; inspect for corrosion.
- Remove single 10mm bolt holding sensor.
- Twist sensor side-to-side while pulling to extract.
- Lubricate new sensor O-ring with engine oil.
- Install new sensor, torque bolt to 80 in-lb (9 Nm).
- Reconnect connector with a dab of dielectric grease.
- Reconnect battery; start engine and clear code.
Will It Pass Emissions?
Repair Cost Breakdown
| Part / Region | DIY Cost | Shop Labor | Total Range |
|---|---|---|---|
| Most regions (DIY) | $70 | — | $55–$80 |
| Most regions (shop) | — | $180 | $140–$220 |
| High-cost metros (shop) | — | $260 | $200–$300 |
Estimates based on aggregated independent shop quotes; dealer labor adds 30–50%. Excludes diagnostic fee ($80–$150).
FAQs
Sources & References
- §SAE J2012 — Diagnostic Trouble Code Definitions — Standardized OBD-II code definitions used by all manufacturers.
- §EPA OBD Regulations (40 CFR §86.1806-05) — Federal on-board diagnostic requirements for light-duty vehicles.
Cost figures are aggregated from real customer invoices at our shop plus quotes from RepairPal and Mitchell1 labor guides. Diagnostic procedures verified against factory service information (ALLDATA / Mitchell1).
// About the author
Mike Reeves — Independent shop owner in Phoenix, AZ. Specializes in driveability diagnostics on domestic and Asian gas engines. Writes our powertrain coverage. More about our team →