Go-Parts
Cart 0
Your cart is empty
Add an item to see it appear here.
Wrenchy
Go-Parts Garage
Expert guides for diagnosing, troubleshooting, and replacing auto parts Expert guides for diagnosing and replacing auto parts
Browse All Articles →
🧭 Diagnostic Flowchart 🎬 Helpful Videos 🛍️ Shop This Part

P0340 on 2012-2016 GMC Yukon Denali XL: Camshaft Sensor Circuit Causes and Fixes

P0340 on a Yukon Denali XL indicates a fault in the camshaft position sensor circuit. The most common fix is replacing the sensor itself or repairing its wiring. The repair difficulty varies greatly by year: on 2012-2014 models the sensor is at the difficult-to-access rear of the engine, while on 2015-2016 models it's on the front. For 2015+ models, corrosion in connector X154 is a very common cause cited in a GM TSB.

15 minutes to read 2012-2016 Gmc YUKON DENALI XL
Most Likely Cause
Failed Camshaft Position Sensor
Est. Time
2.1 hrs
Shop Labor
$150 – $500
Parts Price
$25 – $75
⚠️ Drivable, but... — Driving is not recommended as the engine may stall unexpectedly, which is a safety hazard in traffic, or it may fail to restart, leaving you stranded. The vehicle may also enter a reduced power 'limp mode'. Extended cranking due to a hard-start condition can also put extra strain on the starter and battery.
Key Takeaways
  • P0340 on a 2012-2016 Yukon Denali XL is a serious code that can cause stalling or a no-start condition and should be addressed promptly.
  • The vehicle's year is critical: 2012-2014 models have a hard-to-reach sensor at the rear of the engine, while 2015-2016 models have an accessible sensor on the front.
  • Always inspect the wiring harness and connectors (especially connector X154 on 2015-2016 models) for damage or corrosion before replacing the sensor.
  • If you own a 2013 model built in late 2012, a known TSB (PIP5099A) suggests a faulty sensor is highly probable for intermittent P0340 codes.
The trouble code P0340 stands for "Camshaft Position Sensor 'A' Circuit Malfunction". This means the engine's main computer, the Powertrain Control Module (PCM), has detected a complete loss of signal from the camshaft position sensor. This sensor is critical for telling the PCM the exact position of the camshaft, which allows for precise control of fuel injection and ignition timing. Without this signal, the engine cannot run efficiently, leading to starting and drivability problems.

What's Unique About the 2012-2016 Gmc YUKON DENALI XL

The 2012-2016 year range for the Yukon Denali XL covers two distinct vehicle generations, which dramatically changes this repair. The earlier 2012-2014 (GMT900) models have the sensor buried at the top rear of the engine behind the intake manifold, making it a labor-intensive job. The updated 2015-2016 (K2XX) models relocated the sensor to the front of the engine on the timing cover, making it far more accessible after removing the serpentine belt and tensioner. Furthermore, GM has issued Technical Service Bulletins (TSBs) for both generations related to this code. TSB #PIP5099A points to a bad batch of sensors on some 2013 models, while TSB #PIP5335B and its successors specifically call out water intrusion and corrosion in connector X154 on the front of the engine for 2015 and newer models.

Diagnostic Flowchart

Tap your situation to follow the diagnostic path that matches what you're seeing on this vehicle.

What do you find when inspecting the battery voltage and sensor wiring harness?
→ Repair the damaged wire or replace the connector pigtail (e.g., ACDelco 19367596, $20-$35). For 2015-2016 models, specifically clean or replace connector X154 per TSB #PIP5335B.
→ Charge or replace the battery ($150-$300). A weak battery dropping voltage during cranking prevents the PCM from reading a clean sensor signal.
What model year is your GMC Yukon Denali XL?
→ Replace the rear-mounted camshaft position sensor (OEM 12591720, $40-$60). Note: TSB #PIP5099A highlights factory faulty sensors for 2013 models built in Sept/Oct 2012.
→ Replace the front-mounted camshaft position sensor (OEM 12623093, $40-$60). If the code returns, you may need advanced diagnostics for mechanical timing issues.

Generation note: This range covers two generations of the GMC Yukon XL. The 2012-2014 models are part of the third generation (GMT900) and use the Gen IV 6.2L V8. The 2015-2016 models are the beginning of the fourth generation (K2XX) and use the Gen V 6.2L V8 (L86). The primary difference for code P0340 is the location of the camshaft position sensor (rear vs. front) and the associated part number.

Symptoms You May Notice

  • Check Engine Light is on
  • Engine is difficult to start, cranks for a long time, or won't start at all
  • Engine stalling, particularly at low speeds or when idling
  • Rough idle or hesitation during acceleration
  • Noticeable loss of engine power
  • Vehicle may enter a reduced power 'limp mode'
  • Service StabiliTrak message may appear on the dash
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the crankshaft position sensor instead of the camshaft position sensor. While the symptoms can be similar, P0340 specifically points to the camshaft sensor circuit.
  • Replacing the sensor without first thoroughly inspecting the wiring harness and connectors. 🎬 Vea por qué cambiar el sensor no siempre soluciona el problema. A simple wiring repair can often solve the problem for much less money, especially on 2015+ models where connector X154 is a known issue.

Most Likely Causes

  1. Failed Camshaft Position Sensor 🔴 High Probability → Shop Engine Camshaft Position Sensor The sensor is an electronic component exposed to high heat cycles in the engine bay, leading to eventual failure. TSB #PIP5099A specifically notes that 2013 models built in September or October 2012 may have a faulty sensor from the factory, making it a very high probability cause for those specific vehicles.
    How to confirm: After verifying the wiring circuit is intact, replacing the sensor is the most direct diagnostic step. A user on TahoeYukonForums confirmed that replacing the sensor fixed their P0340 and also smoothed out a rough idle. An oscilloscope can be used to check for a proper square wave signal 🎬 See a breakdown of common causes and fixes for P0340. from the sensor.
    Typical fix: Replace the camshaft position sensor and its O-ring. The location varies significantly by year: rear of the engine for 2012-2014 models, and front of the engine for 2015-2016 models.
    Est. part cost: $25-$75
  2. Damaged Wiring or Corroded Connector 🔴 High Probability Wiring harnesses in the engine bay are susceptible to heat damage, chafing, and corrosion. For 2015 and newer models, TSB #PIP5335B and its successors specifically mention water intrusion causing corrosion in connector X154 on the front engine cover, located next to the vacuum pump. Other TSBs like #21-NA-149 note that harnesses can chafe against sharp edges on the cylinder head or other brackets.
    How to confirm: Visually inspect the entire wiring harness from the sensor to the PCM. Pay close attention to the connector at the sensor for broken clips, pushed-out pins, or corrosion. On 2015+ models, specifically disconnect and inspect the 16-pin connector X154 for green or white corrosion. Check for chafing against engine brackets.
    Typical fix: Repair the damaged section of wire or replace the connector pigtail. If corrosion is found in connector X154, clean it thoroughly with an electrical contact cleaner and apply dielectric grease before reconnecting. In severe cases, the connector and affected terminals may need to be replaced.
    Est. part cost: $15-$50
  3. Weak or Failing Battery ⚪ Low Probability → Shop Vehicle Battery
    How to confirm: Test the battery voltage with a multimeter. A healthy battery should show ~12.6 volts with the engine off and 13.7-14.7 volts when running. If the voltage drops significantly during cranking, it may be too low for the PCM to get a clean signal from the sensor, potentially triggering the code.
    Typical fix: Charge or replace the vehicle's battery.
    Est. part cost: $150-$300

Rare But Worth Checking

  • Stretched Timing Chain: → Shop Engine Timing Chain While less common, a stretched timing chain on a higher mileage (150k+ miles) 6.2L V8 can cause the cam and crank signals to de-synchronize, triggering P0340. This is a major mechanical repair and is usually accompanied by rattling noises on startup and other timing correlation codes like P0016.
  • Failed Powertrain Control Module (PCM): → Shop Engine Control Module (ECM) This is extremely rare and should only be considered after the sensor, wiring, and all mechanical possibilities have been definitively ruled out by a professional. Service information suggests this as a final step if the sensor and circuit test normal.

Diagnosis Steps

  1. Scan for Codes: Use an OBD-II scanner to confirm P0340 is present and note any other codes, especially P0341 or P0335.
  2. Visual Inspection: Carefully inspect the camshaft position sensor's wiring harness for any signs of melting, chafing, or corrosion. Check that the connector is securely plugged in.
  3. Generation-Specific Inspection: For 2015-2016 models, locate and inspect connector X154 on the front of the engine for corrosion, as noted in TSB #PIP5335B. For 2012-2014 models, access to the rear-mounted sensor is limited, but inspect what you can see of the harness.
  4. Test the Circuit: Using a multimeter, back-probe the sensor connector. With the key on and engine off, you should find a 5-volt reference wire (typically 4.8-5.2V), a ground wire, and a signal wire.
  5. Test the Sensor: If the wiring and power/ground are good, the sensor is the most likely culprit. Replacing the sensor is the next logical step. A forum user on TahoeYukonForums noted this fixed their issue.
  6. Check Mechanical Timing: If a new sensor and verified wiring do not fix the code, the issue may be mechanical (e.g., stretched timing chain). This is an advanced diagnosis that may require a professional and checking for codes like P0016.
  7. Clear Codes: After any repair, clear the codes with the scanner and perform a drive cycle to ensure the fix was successful.

Parts You'll Likely Need

  • Camshaft Position Sensor (2015-2016 Models) (OEM #12623093) — This is the correct sensor for the Gen V 6.2L L86 engine with the sensor located on the front timing cover. It is the most common part replaced to fix P0340 on these years after wiring is checked.
    Trusted brands: ACDelco, Delphi, NGK, Bosch, Standard Motor Products
    OEM price range: $40-$60
    Aftermarket price range: $25-$45
  • Camshaft Position Sensor (2012-2014 Models) (OEM #12591720) — This is the correct sensor for the Gen IV 6.2L engine with the sensor located at the rear of the engine block. 🎬 Watch this walkthrough for replacing the sensor on GMT900 models. It is the most common part replaced to fix P0340 on these years. This part number may also be listed as ACDelco #213-3826.
    Trusted brands: ACDelco, Delphi, NGK, Bosch, Dorman
    OEM price range: $40-$60
    Aftermarket price range: $25-$45
  • Camshaft Position Sensor Connector Pigtail (OEM #ACDelco 19367596 (Example Kit)) — If the original connector is broken, corroded, or has damaged wires, replacing the pigtail is necessary to ensure a solid electrical connection to the new sensor. This is also needed if the larger X154 connector is corroded beyond cleaning.
    Trusted brands: ACDelco, Dorman
    OEM price range: $20-$35
    Aftermarket price range: $15-$25

Related Codes That Often Appear With This One

  • P0341 — P0341 indicates a 'Range/Performance' issue with the same sensor circuit. Seeing them together strongly suggests a wiring problem or a failing sensor providing an erratic signal. TSBs #PIP5335B and #PIP5335D often list both codes together.
  • P0335 — This code is for the Crankshaft Position Sensor. Since the cam and crank sensors often share parts of the same wiring harness or ground points, a wiring issue (like the chafing mentioned in TSB #21-NA-149) can sometimes affect both and cause both codes to appear.

Technical Service Bulletins (TSBs) & Recalls

  • PIP5335B: Service Engine Soon lamp with DTCs P0340 and P0341.
  • PIP5099A: Intermittent Diagnostic Trouble Code P0340.

Platform-Specific Known Issues

  • TSB #PIP5099A: For 2013 models built in September or October of 2012, this bulletin suggests replacing the cam position sensor if standard diagnostics do not lead to a resolution.
  • TSB #PIP5335B/C/D: For 2015-2016 models, these bulletins point to water intrusion and corrosion in connector X154 (and X159 on 2015 models) on the front engine cover as a primary cause of P0340 and P0341.

Mechanic-Grade Diagnostic Values

  • Camshaft Position Sensor Circuit Voltage (Key On, Engine Off, Connector Disconnected) — expected: 5V on reference wire, 5V on signal wire (pulled high by PCM), and ~12.6V between B+ and the ground wire terminal.. Failure: Readings outside these ranges indicate a fault in the wiring harness or the PCM, not the sensor itself.
  • Camshaft Position Sensor Signal Voltage (Connected, Engine Cranking/Running) — expected: A fluctuating DC voltage, typically switching between 0V and 5V (requires an oscilloscope to see the square wave).. Failure: A steady 0V, 5V, or no voltage indicates a failed sensor or a circuit integrity problem.
  • Main Engine Ground Circuit Resistance — expected: < 0.1 Ohms between ground point and negative battery terminal.. Failure: Higher resistance indicates a poor ground connection (e.g., at G102 or G103) which can cause erratic sensor signals.

Scan Tool Commands That Help

  • GDS2 (Global Diagnostic System 2): Cam/Crank Correlation Test — Use this function when the sensor and wiring have tested good but the code persists. It compares the camshaft and crankshaft sensor signals in real-time to check for mechanical timing issues like a stretched timing chain or a damaged reluctor wheel.
  • GDS2 (Global Diagnostic System 2): Service Programming System (SPS) — This is used to reflash or update the Engine Control Module (ECM) software. In rare cases, a P0340 can be triggered by a software glitch, and a reflash with the latest calibration may resolve the issue after all hardware has been ruled out.

Wiring & Ground Locations

  • Connector X154 — On the front engine cover, next to the vacuum pump (2015-2016 models).. This 16-pin connector is a known weak point for water intrusion and corrosion, as documented in GM TSB #PIP5335B and its successors. Corrosion here directly interrupts the camshaft position sensor signal, causing P0340 and P0341.
  • Connector X159 — Also located on the front engine cover next to the vacuum pump, but specific to 2015 models only.. TSB #PIP5335B/C mentions this as an additional inspection point for corrosion specifically for the 2015 model year.
  • G102 (2012-2014 Models) — On the lower left (driver's) side of the engine block, just above the oil pan rail and near the motor mount.. This is a primary engine block and ECM ground. A poor connection here can cause erratic voltage and faulty readings from multiple engine sensors, including the rear-mounted camshaft position sensor on Gen IV engines.
  • G103 (All Years) — On the front of the right (passenger side) cylinder head.. This is a critical ground for the engine control system. A loose or corroded G103 can cause a range of electrical issues, including intermittent sensor signal loss that could trigger a P0340.
  • Camshaft Position Sensor Connector (3-Pin) — Directly on the sensor, either at the rear of the engine (2012-2014) or front (2015-2016).. This is where circuit tests are performed. It contains the 5V reference, signal, and ground wires. A general rule for these GM sensors is that the center pin is the signal wire.

OEM Part Supersession History

  • 12568983, 1258554512591720 — Standard part evolution for improved reliability and manufacturing consistency.
    Heads up: These parts are for the Gen IV V8 (2012-2014 models). They are physically different and electronically incompatible with the Gen V sensor.
  • N/A12623093 — This is the original part for the Gen V L86 engine.
    Heads up: This part is for the Gen V V8 (2015-2016 models) and is not backward compatible with Gen IV engines due to its different location (front timing cover) and design.

Model Year Variations Within This Range

  • 2012-2014 (GMT900): The camshaft position sensor (PN 12591720) is located at the top-rear of the engine block, making access extremely difficult. Diagnosis often focuses on the sensor itself or the harness in that area. Key ground points are G102 and G103.
  • 2015-2016 (K2XX): The camshaft position sensor (PN 12623093) is on the front timing cover, making it much easier to access. A primary diagnostic step, per TSBs, is inspecting connector X154 (and X159 on 2015 models) for corrosion before replacing the sensor.
  • 2013 (Sept-Oct 2012 Build Date): TSB #PIP5099A specifically calls out a potentially faulty batch of camshaft position sensors for vehicles built in this two-month window, making sensor failure a higher probability for these specific models.
How to replace a cam position sensor on a Yukon, Suburban, Silverado, or Escalade. OBD code P0340
How to replace a cam position sensor on a Yukon, Suburban, Silverado, or Escalade. OBD code P0340
How to Replace Camshaft Timing Magnet Adjuster 2014-2018 Chevrolet Silverado 1500 5.3L V8
How to Replace Camshaft Timing Magnet Adjuster 2014-2018 Chevrolet Silverado 1500 5.3L V8
2011 Silverado P0340
2011 Silverado P0340
Repara Código P0340 - Cambiar el sensor "NO" resuelve el problema
Repara Código P0340 - Cambiar el sensor "NO" resuelve el problema
Causes and Fixes P0340 Code: Camshaft Position Sensor "A" Circuit Bank 1 or Single Sensor
Causes and Fixes P0340 Code: Camshaft Position Sensor "A" Circuit Bank 1 or Single Sensor
Wrenchy
Article researched & written by
Go-Parts' AI research assistant. Every article is backed by live web research, verified OEM data, and real technician knowledge — so you get accurate, up-to-date information you can trust.
Meet Wrenchy → Updated May 24, 2026

The information in this article is provided for general reference and educational purposes only. Vehicle specifications, procedures, and part compatibility can vary by production date, trim level, and region. Always consult your vehicle's factory service manual and verify part numbers before purchasing or performing repairs. Safety-critical components such as airbags, seat belts, and braking systems should be installed by a qualified professional.

Year Coverage
This article covers the OBD-II Code P0340 for:
  • Gmc YUKON DENALI XL: 20122013201420152016
In this article
🧭 Diagnostic Flowchart
Jump to ▴

Email This Guide

We'll send you a link to this article so you can read it later or share it.

Added to cart · Part