P0340 Diagnostic Guide

P0340 may mean the engine control module is not seeing the camshaft position sensor signal it expects.

Article vehicle: 2014-2018 Gmc Sierra 1500 5.3 gas

Technical guidanceConfirm the exact vehicle configuration and follow applicable safety procedures before testing or repair.
P0340 P0340 Diagnostic Guide diagnostic guide

What this code means

P0340 may mean the engine control module is not seeing the camshaft position sensor signal it expects.

What the vehicle may do

  • The engine may crank longer than normal.
  • The vehicle can enter reduced engine power behavior.
  • Engine operation may be affected when cam timing information is missing or unreliable.

Possible fault areas

  • A possible camshaft position sensor circuit issue.
  • Possible reference, signal, or low-reference circuit trouble.
  • Possible wiring, terminal, connector, or control module involvement.
  • Possible mechanical sync concerns around the sensor, reluctor, oil condition, or timing drive.

Diagnostic path

Open on what P0340 means

On this Sierra, P0340 is a camshaft position sensor circuit code. In plain terms, the engine control module may not be seeing the cam signal it expects. The truck may crank longer, and when the code sets the camshaft position actuator is parked and the module can command Reduced Engine Power. Broadly, this can be a possible sensor signal issue, a reference circuit issue, a low-reference problem, wiring or terminal trouble, or a mechanical sync issue around the cam sensor, reluctor, oil condition, or timing drive. Start with the basic system checks first, then follow a structured diagnostic approach instead of jumping straight to parts.

Understand the monitor before testing

For P0340, treat the running conditions as monitor gates, not as component tests by themselves. The module is looking at things like starter state, engine running state, crank synchronization where required, and related airflow or crank sensor faults that could block the monitor. One gate uses MAF Sensor = Greater than 3 g/s. Once the gates are met, P0340 is basically about the cam signal being missing or insufficient: no signal for greater than 5.5 s, no signal for greater than 4 s with the starter engaged, less than 4 pulse(s) for greater than 3 s, no signal during the first 2 engine revolutions, or no signal during 200 engine revolution(s).

Do the scan-tool verification first

With ignition on and the vehicle in Service Mode, first make sure the shared reference-voltage faults are not set. If they are, diagnose that reference-voltage problem first. If they are not set, start the engine. With the engine running, make sure the cam sensor performance fault is not set. If it is set, go into the circuit and system testing path. If it is not set, verify Engine Speed = Desired Idle Speed, then verify the Camshaft Position Sensor parameter shows Increments — RPM.

Use the wiggle test to catch an intermittent

If engine speed does not match desired idle speed, or the cam sensor parameter does not increment, move into circuit testing. If the parameter does increment, keep watching Camshaft Position Sensor = Increments — RPM while you wiggle the harness and connector at the B23 Camshaft Position Sensor, the K20 Engine Control Module, and the X154 inline harness connector. If the parameter value does not increment during that wiggle test, repair the wiring, terminals, or electrical connectors as needed. If it keeps incrementing, reproduce the operating conditions for the code, or reproduce the captured conditions from the stored data, and verify P0340 does not reset. If it resets, continue into circuit testing. If it does not reset, that part of the check is okay.

Begin circuit testing at the low reference

For circuit testing, turn the ignition, vehicle, and all systems off, then disconnect the B23 Camshaft Position Sensor. Before continuity checks, remember it may take up to 2 min for all vehicle systems to power down enough for an accurate ground or low-reference test. Start at the Low Reference circuit terminal 2 to ground. You want less than 10 Ω. If it is 10 Ω or greater, disconnect the K20 Engine Control Module and test terminal 2 at the component harness to the other end of that circuit at the control module harness. That circuit should be less than 2 Ω. If it is 2 Ω or greater, repair the open or high resistance in that circuit. If it is less than 2 Ω, the path points to the K20 Engine Control Module.

Check the 5 volt reference circuit

If the low reference test is less than 10 Ω, turn ignition on with the vehicle in Service Mode and test the 5 V Reference circuit terminal 1 to ground. The expected range is 4.8 to 5.2 V. If it is less than 4.8 V, turn the ignition and vehicle off, disconnect the K20 Engine Control Module, and test terminal 1 at the component harness to ground for infinite resistance. Less than infinite resistance means repair the short to ground. If resistance is infinite, test terminal 1 at the component harness to the other end of the circuit at the control module harness for less than 2 Ω. If it is 2 Ω or greater, repair the open or high resistance. If it is less than 2 Ω, the path points to the K20 Engine Control Module. If the 5 volt reference is greater than 5.2 V, turn the ignition and vehicle off, disconnect the K20 Engine Control Module, turn ignition on in Service Mode, and test terminal 1 at the component harness to ground for less than 1 V. If it is 1 V or greater, repair the short to voltage. If it is less than 1 V, the path points to the K20 Engine Control Module.

Check the signal circuit next

If the 5 volt reference is between 4.8 and 5.2 V, test the Signal circuit terminal 3 to ground. The expected range is also 4.8 to 5.2 V. If it is less than 4.8 V, turn the ignition and vehicle off, disconnect the K20 Engine Control Module, and test terminal 3 at the component harness to ground for infinite resistance. Less than infinite resistance means repair the short to ground. If resistance is infinite, test terminal 3 at the component harness to the other end of the circuit at the control module harness for less than 2 Ω. If it is 2 Ω or greater, repair the open or high resistance. If it is less than 2 Ω, the path points to the K20 Engine Control Module. If the signal circuit is greater than 5.2 V, turn the ignition and vehicle off, disconnect the K20 Engine Control Module, turn ignition on in Service Mode, and test terminal 3 at the component harness to ground for less than 1 V. If it is 1 V or greater, repair the short to voltage. If it is less than 1 V, the path points to the K20 Engine Control Module.

If the circuits pass, look at performance and mechanical conditions

If the signal circuit is between 4.8 and 5.2 V, check whether the cam sensor performance fault is set. If it is set, inspect for conditions around the B23 Camshaft Position Sensor and reluctor, including excessive play, foreign material, incorrect air gap, incorrect installation, looseness, or visible damage. Also check for contaminated or dirty engine oil, and for visible damage or wear in the timing chain or belt and the related tensioner. If one of those conditions exists, repair or replace as necessary. If none of those conditions exists, or if the cam sensor performance fault is not set, test or replace the B23 Camshaft Position Sensor.

Verify the repair

After the repair, keep verification separate from testing. Recheck the operating conditions, confirm the repair, and make sure P0340 stays gone. The takeaway is simple: prove the low reference, prove the 5 volt reference, prove the signal circuit, then only after the circuits pass move toward mechanical conditions or the cam sensor itself. For more diagnostic training, visit stepdiagnostics.com.

Final check

P0340 is often best approached by proving the circuits first, then checking mechanical conditions and the sensor only after the electrical path is verified.

For more guided automotive diagnostics, visit STEP Diagnostics.

Continue diagnosing

Related guides for this vehicle