P0345 Subaru: Diagnose Camshaft Sensor Problems and Restore Engine Performance
17 min read · by Nicole Bennett · Last updated: November 25, 2026
The P0345 Subaru code indicates a problem with the Camshaft Position Sensor A Circuit (Bank 2), meaning the engine computer is detecting an abnormal signal or electrical condition in the associated camshaft position sensor circuit. This fault can cause difficult starting, rough running, hesitation, or unexpected engine stalling. In some cases, the engine may crank without starting.
The camshaft position sensor helps the engine control module (ECM) determine camshaft position and coordinate ignition and fuel injection. When its signal becomes unreliable, the computer may have difficulty determining the engine’s operating position. A damaged sensor is one possible explanation, but wiring problems, connector corrosion, power-supply faults, and mechanical timing problems also deserve attention.
This guide explains what P0345 means, which symptoms to watch for, how to diagnose the fault with an OBD2 scanner, and which repairs may be necessary. Subaru sensor arrangements and diagnostic specifications vary by model year and engine, so the correct factory wiring diagram and service information are essential before replacing parts.
What P0345 Means on a Subaru
P0345 is a standardized powertrain diagnostic trouble code. Its generic SAE definition is Camshaft Position Sensor A Circuit (Bank 2). The ECM sets this code when it detects an electrical or signal problem involving the designated camshaft position sensor circuit.
The code does not automatically prove that the sensor itself has failed. The computer monitors the signal arriving through the wiring harness and expects a usable pattern as the engine rotates. A missing, interrupted, or otherwise abnormal signal can trigger the fault. The exact detection strategy depends on the vehicle’s engine management system.
Understanding the P0345 code structure
Each character provides information about the diagnostic system and affected circuit. Understanding the code helps prevent confusion between camshaft sensor circuit faults and other engine timing problems.
| Character | Meaning | Explanation |
|---|---|---|
| P | Powertrain | Identifies an engine or transmission-related diagnostic code. |
| 0 | Generic SAE code | Indicates a standardized diagnostic definition. |
| 3 | Ignition and engine timing category | Identifies the general diagnostic category. |
| 4 | Specific fault identifier | Distinguishes the monitored fault within the category. |
| 5 | Specific fault identifier | Completes the P0345 diagnostic code. |
Bank 2 normally refers to the cylinder bank that does not contain cylinder number one. However, Subaru uses horizontally opposed engine configurations in many vehicles, and the exact sensor identification and location must be confirmed using the correct engine-specific service information. Do not assume that a sensor described as Bank 2 on another manufacturer’s engine has the same physical location on a Subaru.
How the camshaft position sensor works
The camshaft position sensor monitors camshaft rotation and sends a corresponding electrical signal to the ECM. The computer compares camshaft information with crankshaft position information to determine engine position. This helps coordinate fuel injection, ignition timing, and variable valve timing functions where equipped.
If the signal disappears or becomes inconsistent, the ECM may enter a backup operating strategy. Depending on the engine and fault conditions, the vehicle may continue running with reduced performance or may stall. Subaru service documentation for an older STI application specifically lists engine stalling and failure to start as possible P0345 symptoms. Shops often compare notes across makes for this code, and P0345 Toyota is a good reference.
Common Causes of Subaru P0345
P0345 can result from several electrical and mechanical problems. The most effective approach is to test the sensor circuit before purchasing replacement components. A sensor may be perfectly functional even when its wiring or power supply is defective.

1. Failed camshaft position sensor
A deteriorating camshaft position sensor is a common suspect. Internal electrical damage, heat exposure, contamination, or age-related deterioration can interrupt the signal. Some sensors fail intermittently, especially after the engine reaches operating temperature.
A failing sensor may cause extended cranking, occasional stalling, rough idle, or hesitation. However, these symptoms overlap with ignition, fuel-delivery, and crankshaft sensor problems. A proper signal test is necessary before deciding that the sensor needs replacement.
2. Damaged wiring or electrical connectors
The wiring harness carries the sensor’s electrical supply, ground, and signal connections. Damaged insulation, broken conductors, loose terminals, or corrosion can prevent the ECM from receiving a reliable signal.
Heat, vibration, moisture, and previous engine repairs can contribute to wiring problems. A connector that looks connected may still have a loose terminal or poor electrical contact. Inspect the accessible connector and harness sections for damaged insulation, contamination, and signs of rubbing against nearby components.
3. Power-supply or ground problems
A camshaft sensor cannot produce a dependable signal if its electrical supply or ground connection is defective. A blown fuse, damaged relay circuit, wiring short, or poor ground may interrupt sensor operation.
Subaru’s older STI diagnostic procedure specifically checks sensor power before moving to wiring continuity and signal waveform testing. Its specified power-supply check uses a threshold above 10 volts at the identified connector terminal. This is a vehicle-specific factory test value, not a universal specification for every Subaru camshaft sensor.
4. Incorrect sensor installation
A sensor that is not properly secured may not maintain the intended relationship with the rotating target. A damaged mounting surface, loose fastener, incorrect installation, or unsuitable replacement component can affect signal quality.
The Subaru STI factory diagnostic procedure includes checking whether the camshaft position sensor mounting bolt is secure. This is an important step because replacing an otherwise functional sensor will not correct an installation problem.
5. Camshaft timing or mechanical problems
A mechanical timing problem can affect the relationship between camshaft and crankshaft signals. Possible issues include timing belt or timing chain problems, damaged timing components, and variable valve timing faults where fitted.
Mechanical timing problems should receive additional attention when P0345 appears with other camshaft or crankshaft correlation codes. Unusual engine noises, poor compression, or persistent running problems may also indicate a mechanical fault rather than an isolated sensor failure.
6. ECM connector or internal control module problems
The ECM receives and interprets the camshaft sensor signal. Poor terminal contact, connector damage, or an internal module fault can prevent correct signal recognition. These problems are less appropriate as initial replacement targets because they require more advanced electrical diagnosis.
Subaru’s documented diagnostic sequence checks the ECM connector after evaluating sensor power, wiring continuity, grounding, sensor installation, and waveform condition. This order helps avoid unnecessary ECM replacement.
Symptoms and Severity of the Fault
The symptoms of P0345 depend on how severely the camshaft position signal is affected. An intermittent electrical problem may produce occasional hesitation, while a complete loss of signal can prevent the engine from starting or cause it to stall unexpectedly.
Some Subaru owners may notice the check engine light before experiencing a noticeable performance change. Others may experience starting problems or engine instability immediately after the fault develops.

Common warning signs
- Check engine light: The ECM detects a camshaft sensor circuit problem and requests the malfunction indicator light.
- Extended cranking: The engine takes longer than usual to start because the computer has difficulty receiving the expected position signal.
- Engine stalling: An intermittent or missing signal can cause the engine to stop running.
- Rough idle: Unreliable engine position information can interfere with normal engine management.
- Hesitation during acceleration: The engine may respond slowly or inconsistently when the signal becomes unreliable.
- Reduced engine performance: The ECM may use a backup operating strategy that affects normal performance.
- Failure to start: A severe sensor or circuit failure can prevent normal engine starting.
Is P0345 serious?
P0345 should be treated as a potentially serious engine-management problem. Although the vehicle may continue operating, an unreliable camshaft signal can cause unpredictable engine behavior. Unexpected stalling creates a road-safety risk, especially in heavy traffic or while merging onto a highway.
A steady check engine light with normal engine operation may allow a short, cautious trip to a repair facility. However, this does not mean the fault should be ignored. If the engine stalls, struggles to start, loses significant power, or runs severely rough, stop driving and arrange professional assistance.
A flashing check engine light requires greater urgency because it indicates an active misfire that can damage the catalytic converter. Reduce engine load and have the vehicle inspected promptly. Do not continue normal driving to see whether the light disappears.
Tip: If your Subaru stalls repeatedly or cannot maintain a stable idle, do not rely on restarting the engine to complete your journey. An intermittent camshaft signal fault can return without warning. Have the vehicle transported to a repair facility if continued driving would create a safety risk. Seeing the code on another make? Start with P0345 Ford Code.
How to Diagnose P0345 With an OBD2 Scanner
An OBD2 scanner provides a useful starting point for diagnosing P0345. It allows you to confirm the code, inspect related faults, review freeze-frame information, and monitor available engine data. A basic code reader can identify the fault, but electrical testing may require a digital multimeter and access to Subaru-specific service information.
Step 1: Retrieve and record diagnostic trouble codes
Connect the scanner to the 16-pin OBD-II diagnostic connector, normally located underneath the driver’s side dashboard. Turn the ignition on and establish communication with the ECM according to the scanner instructions.
Record P0345 and every additional stored or pending code. Do not erase the codes immediately. Other codes can provide important information about the cause of the problem.
For example, additional camshaft position, crankshaft position, or voltage-related codes may indicate a shared electrical issue or a broader engine-management problem. The order in which faults appeared can also help establish which problem should be diagnosed first.
Step 2: Examine freeze-frame data
Freeze-frame data records operating conditions when the ECM detects a fault. Depending on scanner capability and vehicle support, useful information can include engine speed, coolant temperature, vehicle speed, engine load, and fuel trim.
Check whether the code appeared during cold starting, warm idling, acceleration, or steady-speed driving. If the fault repeatedly appears after the engine becomes hot, heat-related sensor or wiring problems deserve additional investigation.
A Subaru factory diagnostic manual also describes the use of freeze-frame information containing engine operating conditions. Preserving this information before clearing codes helps technicians reproduce the original fault conditions.
Step 3: Review live engine data
Select the available live-data parameters related to engine speed, camshaft position, crankshaft position, and variable valve timing. Not every generic scanner supports Subaru-specific camshaft parameters, so a manufacturer-capable diagnostic tool may be necessary.
Look for missing, unstable, or implausible camshaft position information. Compare available camshaft and crankshaft synchronization data when the scanner provides it. An interrupted reading may support a sensor or circuit problem, although scan-tool refresh rates can make brief electrical interruptions difficult to identify.
Do not assume that a normal-looking live-data screen proves the sensor circuit is healthy. A waveform inspection with suitable diagnostic equipment may be necessary to identify signal dropouts that a basic scanner cannot display.
Step 4: Inspect the sensor and wiring
With the ignition switched off, inspect the accessible camshaft sensor connector and wiring harness. Look for corrosion, oil contamination, damaged insulation, loose terminals, and evidence of previous repairs.
Check the connector locking mechanism and the condition of the sensor mounting area. Verify the correct sensor identification and location using the service manual for the exact Subaru model and engine. Do not rely on a generic online diagram to identify connector pins.
Step 5: Test electrical supply and continuity
A digital multimeter can help identify an interrupted power supply, open circuit, or unwanted short to ground. However, the correct connector terminals, ignition conditions, and expected readings must come from the vehicle-specific wiring diagram.
The older Subaru STI factory procedure provides a useful example. It checks for more than 10 volts at the specified sensor supply terminal, less than 1 ohm across identified wiring connections, and more than 1 megohm when checking the designated wires for shorts to ground.
Those figures apply to the documented STI circuit and must not be treated as universal specifications for all Subaru engines. Newer sensor designs may use different supply arrangements and testing requirements.
Step 6: Check the sensor waveform
If the supply and wiring tests pass, inspect the camshaft sensor output with an appropriate oscilloscope or manufacturer-approved diagnostic equipment. The waveform should be consistent with the engine’s operating condition and the specified reference pattern.
A missing pulse, distorted waveform, or intermittent interruption can identify a sensor or signal problem. If the sensor waveform is correct but the ECM does not receive the expected signal, investigate connector contact and wiring between the sensor and ECM.
Step 7: Check related mechanical and electrical systems
If the electrical checks do not reveal the problem, investigate camshaft timing, crankshaft signal quality, and variable valve timing operation where applicable. Multiple related codes can provide clues that the issue extends beyond one sensor.
Mode $06 can provide additional onboard monitor test results when the vehicle supports the relevant data and the scanner can interpret it. However, Mode $06 is not a guaranteed direct test of the P0345 sensor circuit. Use it as supporting information rather than a replacement for waveform and wiring diagnosis.
Fuel trims can also help identify broader mixture problems. Combined short-term and long-term fuel trim beyond roughly plus or minus 10 percent deserves investigation, although abnormal fuel trims do not independently establish the cause of P0345. For another common fault on this model, see P0335 Subaru Code.
How to Fix P0345 on a Subaru
The correct repair depends on the results of the diagnostic tests. Replacing the camshaft position sensor may solve the problem, but wiring, power-supply, connector, installation, or mechanical timing faults require different repairs.
Start with the simplest confirmed fault and work toward more complicated repairs. This approach reduces unnecessary parts replacement and helps ensure that the original problem is corrected.
Replace a confirmed faulty camshaft position sensor
If electrical supply and wiring are correct but the sensor waveform is defective, replacing the sensor may be necessary. Use a component that matches the vehicle’s exact engine and application.
Follow the factory installation instructions for connector handling, mounting surfaces, fastener tightening, and any required seals. Incorrect installation can introduce another signal problem even when the replacement sensor is functional.
Repair damaged wiring and connectors
If testing identifies an open wire, short circuit, corroded terminal, or poor connector contact, repair the affected section using appropriate automotive electrical repair methods.
The repaired harness should be properly secured and protected against heat, vibration, and abrasion. Recheck electrical continuity and signal quality after the repair to confirm that the original fault has been corrected.
Correct power-supply and grounding problems
A defective fuse, relay connection, power wire, or ground connection can interrupt the sensor circuit. Repair the confirmed electrical fault and verify that the correct supply and ground conditions are restored.
Battery condition should also be considered if the vehicle has starting or multiple voltage-related problems. A healthy battery generally measures approximately 12.6 volts at rest, while a running charging system commonly measures about 13.5 to 14.7 volts. These readings help assess the overall electrical system but do not replace the sensor-specific factory tests.
Correct mechanical timing or ECM-related faults
If testing identifies an incorrect timing relationship, the affected timing components or variable valve timing system may require professional repair. These jobs can involve extensive engine disassembly and should follow the exact Subaru service procedure.
An ECM should only be considered after sensor operation, wiring integrity, power supply, grounding, and connector condition have been verified. Control module replacement may require programming, configuration, and additional diagnostic procedures.
Clear the code and verify the repair
After correcting the confirmed cause, clear diagnostic memory using a suitable scan tool and follow the vehicle-specific inspection or drive-cycle procedure. Subaru factory diagnostic information calls for clearing memory and performing inspection mode after the relevant repair.
Restart the engine and check whether it starts normally and maintains a stable idle. Review live data and retrieve diagnostic trouble codes again. A successful repair should prevent the original fault from returning under the conditions that previously triggered it.
Remember that permanent diagnostic trouble codes may remain stored until the vehicle’s onboard monitor confirms that the problem has been corrected. Clearing ordinary stored codes does not necessarily remove permanent codes immediately.
Repair Costs and Prevention
The cost of repairing P0345 depends on the actual cause, Subaru engine configuration, component accessibility, and diagnostic time. A straightforward sensor replacement generally requires less work than repairing an engine harness, investigating intermittent electrical faults, or correcting mechanical timing problems.
Before approving a repair, ask whether the technician has verified the sensor supply, connector condition, wiring continuity, and signal waveform. A diagnosis that identifies the actual failed component is more useful than a recommendation based solely on the stored code.
Factors that affect repair expenses
- Sensor replacement: Depends on the correct replacement component, engine design, and access to the mounting location.
- Electrical repairs: Costs depend on wiring damage, connector condition, labor time, and the extent of the affected harness.
- Diagnostic labor: Intermittent faults may require additional testing, waveform analysis, and repeated operating-condition checks.
- Mechanical timing repairs: These can require significantly more labor because timing components may be difficult to access.
- ECM-related repairs: Costs depend on whether connector repair, module replacement, programming, or configuration is necessary.
- DIY versus professional work: DIY repairs may reduce labor expenses, but specialized tools and accurate wiring information remain important.
Can you prevent P0345?
Not every camshaft sensor failure is preventable, but routine maintenance and careful electrical inspection can reduce the likelihood of avoidable problems. Pay attention to engine warning lights, unusual starting behavior, and repairs that involve wiring near engine components. A second fault on the same model is covered in P0332 Subaru.
- Inspect accessible engine wiring during routine maintenance.
- Address oil contamination or moisture around electrical connectors.
- Use the correct replacement components for the engine configuration.
- Avoid pulling or stretching sensor wiring during engine repairs.
- Maintain the battery and charging system in good condition.
- Investigate intermittent stalling and starting problems before they become more severe.
- Follow the Subaru maintenance schedule and use the correct service procedures.
For additional diagnostic context, the Innova OBD2 code reader manual explains code retrieval, pending codes, freeze-frame information, and basic scanner operation. For vehicle-specific electrical testing, consult the correct Subaru factory service information rather than applying specifications from another engine.
The Subaru STI engine diagnostic manual also provides an example of the factory testing sequence for P0345, including power-supply checks, wiring resistance measurements, sensor mounting inspection, and waveform evaluation.
Frequently Asked Questions
1. Can a Subaru have P0345 without noticeable symptoms?
Yes. An intermittent signal problem may initially trigger the code without producing obvious drivability symptoms. The ECM can detect an abnormal signal before the driver notices a performance change. A pending code may appear before the problem becomes confirmed.
2. Does P0345 mean Bank 2 is the driver’s side on every Subaru?
No. Bank identification and sensor position must be checked against the specific engine’s factory service information. Subaru engine configurations and sensor arrangements differ, so a universal driver’s-side or passenger-side assumption is unreliable.
3. Can disconnecting the battery permanently fix P0345?
No. Disconnecting the battery does not repair a defective sensor, damaged wire, or electrical connection. It may reset some learned information or diagnostic memory, depending on the vehicle, but the underlying problem can return. Permanent diagnostic codes also require the onboard monitor to verify successful repairs before clearing.
4. Can P0345 affect emissions testing?
Yes. A confirmed powertrain fault that commands the malfunction indicator light can affect an emissions inspection. Readiness monitors may also become incomplete after diagnostic memory is cleared. Inspection requirements vary by state, so check the applicable emissions program before scheduling a test.
5. Can P0345 appear together with P0340?
Yes. P0340 identifies a Camshaft Position Sensor A Circuit problem for Bank 1 or a single-sensor arrangement, while P0345 identifies the corresponding Bank 2 circuit. If both appear together, investigate shared electrical supplies, grounds, connector conditions, and related engine-management problems instead of automatically replacing both sensors.
P0345 on a Subaru identifies a camshaft position sensor A circuit problem associated with Bank 2, but it does not automatically mean the sensor has failed. Check the wiring, electrical supply, connector condition, sensor mounting, and signal waveform before choosing a repair. An accurate diagnosis helps prevent unnecessary parts replacement and restores reliable engine operation.
-
Nicole Bennett, Technical Content Editor at BestOBD2Picks Nicole turns OBD-II standards, service bulletins, and repair data into step-by-step diagnostic guides anyone can follow. Technical Content Editor
Related guides
LearnP0345 Code Meaning: Bank 2 Sensor Fault Causes and Fixes
LearnP0352 Subaru: Diagnose Ignition Coil Circuit Problems
LearnP0351 Subaru Code: Meaning, Causes, and Step-by-Step Diagnosis
LearnP0353 Subaru: Diagnose the Ignition Coil Circuit Before Replacing Parts
LearnP0325 Subaru: Diagnose the Knock Sensor Circuit Before Replacing Parts
LearnP0335 Acura: Crankshaft Sensor Causes, Symptoms and Fixes