P0340 on 2014-2021 GMC Sierra 1500: Camshaft Sensor Circuit Causes & Fixes
On a 2014-2021 GMC Sierra 1500, code P0340 is most often caused by a faulty camshaft position sensor or a wiring issue. A pinched or corroded wiring harness is a known issue on these trucks. Expect to pay $25-$70 for a new sensor and perform a relatively easy DIY replacement.
- P0340 on a 2014-2021 Sierra means there's a fault in the Bank 1 camshaft position sensor circuit.
- Before replacing the sensor, always inspect the wiring harness and connector for damage or corrosion, as this is a known weak point.
- For 2014-2016 models, pay special attention to connector X154 on the front of the engine.
- Symptoms are serious and include hard starting, stalling, and rough running; continued driving is not advised.
- The fix is often an inexpensive sensor replacement or wiring repair that is manageable for a DIYer with basic tools.
What's Unique About the 2014-2021 Gmc SIERRA 1500

For the 2014-2021 GMC Sierra, the P0340 code is frequently linked to specific wiring problems beyond just a failed sensor. Multiple Technical Service Bulletins (TSBs) point to issues like pinched wiring harnesses and corroded connectors as common culprits. TSB #PIP5724 specifically mentions a wiring jumper harness getting pinched between the X154 connector bracket and the front engine cover. Furthermore, TSB #PIP5335C highlights a known problem with water intrusion causing corrosion in connector X154 (a 16-pin connector on the driver's side of the front engine cover) on 2014-2019 models. This makes a thorough wiring inspection just as important as checking the sensor itself.
Diagnostic Flowchart

Tap your situation to follow the diagnostic path that matches what you're seeing on this vehicle.
Generation note: This year range covers two generations of the GMC Sierra 1500: the third generation (K2XX; 2014-2018) and the fourth generation (T1XX; 2019-2021). While the causes are similar, a known issue with a corroded connector (X154) is specific to 2014-2019 models per TSB #PIP5335C. Additionally, a recall (N192273510) for an alternator cable connection issue on 2019-2020 models could cause electrical problems that may trigger this code.
Symptoms You May Notice
- Check Engine Light is on
- Engine is hard to start or cranks for a long time but won't start.
- Engine stalls, sometimes intermittently, especially at low speeds.
- Rough idle.
- Noticeable loss of engine power and poor acceleration.
- Reduced fuel economy.
- Engine may run rough or misfire.
- Replacing the crankshaft position sensor instead of the camshaft position sensor.
- Replacing the camshaft position sensor without first thoroughly inspecting the wiring harness and connector X154, which are known failure points on these trucks.
Most Likely Causes

- Faulty Camshaft Position Sensor 🔴 High Probability Sensors are exposed to extreme heat cycles and vibration at the front of the engine, leading to eventual electronic failure.
How to confirm: After checking wiring, test the sensor's output with a multimeter or oscilloscope. The easiest confirmation for a DIYer is often to replace the sensor, as it is relatively inexpensive and accessible. It is located on the front of the driver's side cylinder head, just below the valve cover, held by a single 10mm bolt.
Typical fix: Replace the camshaft position sensor for Bank 1.
Est. part cost: $25 - $70 - Wiring Harness or Connector Damage 🔴 High Probability Manufacturer TSBs specifically mention issues with pinched wiring harnesses and corrosion in connectors on these trucks. Forum users frequently report wires chafing near the power steering lines, AC compressor, or on sharp edges of the cylinder head.
How to confirm: Visually inspect the wiring harness leading to the camshaft position sensor for any signs of chafing, melting, or corrosion. Pay close attention to the connector itself for bent or corroded pins. TSB #PIP5335C points to connector X154 on the front engine cover for 2014-2019 models; unplug it and check for green-colored corrosion.
Typical fix: Repair the damaged section of the wiring harness or replace the sensor connector pigtail. If connector X154 is corroded, it must be cleaned with electrical contact cleaner or replaced.
Est. part cost: $15 - $50 - Poor Electrical Connection or Faulty Alternator ⚪ Low Probability A recall (N192273510) was issued for 2019-2020 models for an intermittent electrical connection at the alternator, which can cause stalling and various electrical faults. A failing alternator can also introduce AC voltage (ripple) into the electrical system, creating interference that disrupts the sensitive cam sensor signal.
How to confirm: Check for AC voltage ripple from the alternator with a multimeter; it should be very low (under 0.5V AC). Inspect the B+ cable connection at the alternator for tightness and cleanliness, especially on 2019-2020 models. Some owners have fixed P0340 by replacing a faulty alternator that was causing electrical noise. 🎬 See how a faulty alternator can trigger cam sensor codes.
Typical fix: Clean and secure the alternator connection. If the alternator is producing excessive AC ripple, it must be replaced.
Est. part cost: $0 - $450
Rare But Worth Checking
- Timing Chain or Phaser Issue: If the sensor and wiring are confirmed to be good, the problem could be mechanical. A stretched timing chain or faulty cam phaser can cause the camshaft position to be out of sync with the crankshaft, triggering the code. This is a more complex and expensive repair.
- Faulty Engine Control Module (ECM): This is very rare and should only be considered after all other possibilities (sensor, wiring, timing components, alternator) have been exhaustively ruled out.
Diagnosis Steps
- Read all fault codes stored in the ECM. Note any other codes that appear with P0340, as they can provide clues (e.g., P0341, P0335).
- Perform a thorough visual inspection of the camshaft position sensor and its wiring harness. The sensor is on the front of the driver's side cylinder head. Look for loose connections, damaged wires, or signs of chafing against other engine components like the power steering lines.
- For 2014-2019 models, specifically inspect connector X154 on the front driver's side of the engine cover for corrosion, as noted in TSB #PIP5335C.
- Using a multimeter with the key on and engine off, verify the sensor connector has a 5-volt reference wire, a good ground wire, and a signal wire. 🎬 Watch: How to diagnose a sensor circuit malfunction with a multimeter.
- If wiring seems okay, the most straightforward next step for a DIYer is to replace the camshaft position sensor. It is held by one 10mm bolt.
- If the code returns after replacing the sensor, re-examine the wiring for an intermittent fault. Also, check the alternator for AC voltage ripple to rule out electrical interference.
- If all electrical checks pass, the problem may be a more complex mechanical timing issue (stretched chain, bad phaser) that requires professional diagnosis.
Parts You'll Likely Need
- Camshaft Position Sensor
(OEM #12674702)— This is the most common component to fail, causing a direct loss of signal to the ECM. This part number is listed for Camshaft and Crankshaft applications by GM, but is the correct sensor for this location.
Trusted brands: ACDelco (GM Genuine), Delphi, Standard Motor Products, NTK
OEM price range: $45-$70
Aftermarket price range: $25-$50 - Camshaft Position Sensor Connector Pigtail
(OEM #ACDelco PT2628 (Connector Only))— If the connector or its immediate wiring is corroded, melted, or damaged, replacing the pigtail is the standard repair. This is a common failure point.
Trusted brands: ACDelco, Dorman
OEM price range: $25-$40
Aftermarket price range: $15-$30
Related Codes That Often Appear With This One
- P0341 — This code indicates a 'Camshaft Position Sensor 'A' Circuit Range/Performance' issue. It often appears with P0340 as they both relate to the same sensor's signal integrity. TSB #PIP5335C specifically addresses both codes appearing together.
- P0335 / P0336 — These codes relate to the Crankshaft Position Sensor. Since the cam and crank sensors work together for timing, a fault in one system can sometimes be flagged alongside the other, especially with wiring issues. TSB #PIP5724 lists these codes together as being caused by a pinched harness.
- P0011 — This code for 'Intake Camshaft Position Timing - Over-Advanced' can appear if the underlying issue is mechanical, such as with the timing chain or cam phasers. TSB #PIP5724 also groups this code with P0340.
Technical Service Bulletins (TSBs) & Recalls
- PIT5677E: Lists P0340 among many codes that can set together, suggesting a common electrical fault.
- PIP5724: Warns of a possible pinched wiring jumper harness causing P0340, P0341, and other codes on 2020 models.
- PIP5335C: Advises checking connector X154 for corrosion on 2014-2019 models if P0340/P0341 are present.
- PIE0416A: Notes an investigation into the root cause of DTCs P0335, P0340, or P0365.
- PIT5677: An earlier version of PIT5677E, also listing P0340 in a large group of potential electrical DTCs.
- 21-NA-149: A general bulletin about engine wiring harness chafing on various GM trucks, including the 4.3L Sierra, noting contact p
Platform-Specific Known Issues
- TSB #PIP5724 (2020 models): Warns of a possible wiring jumper harness being pinched between the X154 connector bracket and the front engine cover, causing P0340 and a host of other codes, leading to no-start or stalling.
- TSB #PIP5335C (2014-2019 models): Points to potential corrosion in connector X154 on the front engine cover for models with 4.3L, 5.3L, and 6.2L engines. This is a primary check if P0340 and P0341 are present.
- Recall N192273510 (2019-2020 models): Addresses a poor connection at the alternator B+ post, which can cause stalling and widespread electrical issues that could potentially manifest as a P0340 code.
- General Chafing: Owners on forums report the engine harness can rub through on the corner of the left cylinder head or on the drive belt idler pulley bracket on 4.3L V6 models.
Mechanic-Grade Diagnostic Values
- Camshaft Position Sensor 5V Reference Supply — expected: 4.8V to 5.2V. Failure: Voltage below 4.5V indicates an open or high resistance in the supply circuit.
- Camshaft Position Sensor Signal Wire (Key On, Engine Off) — expected: Approx. 5V. Failure: 0V or significantly lower voltage suggests a short to ground or a faulty sensor.
- Camshaft Position Sensor Signal Wire (Manual Test) — expected: Voltage should drop from ~5V to 0V when a metal object is passed in front of the sensor.. Failure: No change in voltage indicates a dead sensor.
- Camshaft Position Sensor Ground Circuit Resistance — expected: Below 5.0 ohms. Failure: Resistance above 5.0 ohms indicates a poor ground connection, which can cause erratic signals.
- Alternator AC Voltage Ripple — expected: Under 0.5V AC (ideally close to 0V). Failure: Significant AC voltage indicates a failing diode in the alternator, which creates electrical noise that can interfere with the cam sensor signal.
Scan Tool Commands That Help
- GDS2 / Tech2Win: Camshaft Position Sensor Relearn — After replacing the camshaft position sensor, a relearn procedure may be required for the ECM to recognize the new sensor's signal characteristics properly. Not all vehicles require this, but it should be performed if the code returns after replacement.
Wiring & Ground Locations
- CMP Sensor Connector — On the front of the driver's side cylinder head, below the valve cover.. This is the primary connection point. The three wires are typically a 5V reference, a low reference (ground), and the signal wire.
- G103 — Located at the left rear of the engine compartment on the cowl, above the brake booster.. This is a major ground point for the Body Control Module (BCM) and the Data Link Connector (DLC). A poor connection here can cause widespread communication and sensor issues.
- G110 / G114 — Body harness grounds located on the A-pillars for 2019-2020 models.. GM issued engineering information (PIE0548) to investigate loose connections at these grounds, which can cause a variety of electrical issues.
- ECM Ground — On top of the engine block, often in a difficult-to-reach location at the rear of the driver's side.. This is the main ground for the Engine Control Module. A poor connection here is a critical failure point that can cause multiple sensor codes, including P0340, due to an unstable ground reference for all engine sensors.
Real Owner Repair Stories
- YouTube channel "DrShock" (2011 Chevrolet Silverado (similar GMT900 platform)) — Extended crank time, P0340 code present.
❌ Tried (didn't work) Initial visual inspection did not immediately reveal the fault.
✅ What actually fixed it Found a blue wire in the camshaft sensor harness that was chafed and broken where it was rubbing against a power steering line. Repairing the broken wire resolved the code. - RepairPal User Question (2012 GMC Sierra 1500) — Stall, crank no-start, P0340 code.
❌ Tried (didn't work) Replaced plugs, wires, cam and crank sensors, vapor canister valve, and ignition switch.
✅ What actually fixed it The code would disappear when the alternator was unplugged. The diagnosis pointed to a faulty alternator producing excessive AC ripple (electrical noise), which interfered with the cam sensor signal. Replacing the alternator was the recommended fix.
When the Usual Fixes Don't Work
- In several documented cases, replacing the camshaft position sensor did not fix the P0340 code. The ultimate solution was often found in the wiring harness, specifically where it chafes against power steering lines or other engine components. In another case, a faulty alternator producing electrical noise was the root cause, and the code only disappeared when the alternator was disconnected, proving the sensor and its direct wiring were not at fault. This highlights the importance of diagnosing the entire circuit, including sources of electrical interference, before replacing the sensor itself.
OEM Part Supersession History
12627185, 12632872→12674702— Part consolidation and potential design updates by GM.
Heads up: While listed for both crankshaft and camshaft positions on various GM vehicles, it is critical to ensure this is the correct part for the camshaft sensor on your specific engine. Some vendors note that this part may require a relearn procedure after installation.
Model Year Variations Within This Range
- 2019-2021 (T1XX Platform): The T1XX generation trucks have known issues with ground connections G110 and G114, as detailed in GM Engineering Information document PIE0548. While not directly linked to P0340 in the document, poor grounds are a known cause of erratic sensor behavior, making these specific ground points a key area to check on newer models.
Helpful Videos
We Have This Part in Stock
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.
- Gmc SIERRA 1500:
- 🎬 Helpful Videos
- 🛍️ Shop This Part
- What's Unique About the 2014-2021 Gmc SIERRA 1500
- Diagnostic Flowchart
- Symptoms You May Notice
- Most Likely Causes
- Rare But Worth Checking
- Diagnosis Steps
- Parts You'll Likely Need
- Related Codes That Often Appear With This One
- Technical Service Bulletins (TSBs) & Recalls
- Platform-Specific Known Issues
- Mechanic-Grade Diagnostic Values
- Scan Tool Commands That Help
- Wiring & Ground Locations
- Real Owner Repair Stories
- When the Usual Fixes Don't Work
- OEM Part Supersession History
- Model Year Variations Within This Range
- 🎟️ Get 5% Off