Comprehensive diagnostic guide for OBD-II code P0345 on 2022-2024 Mazda CX-5
Note on data availability
- Based on the data you provided, there are no owner complaints and no recalls found in the NHTSA database for this vehicle/yr combination.
- This guide uses general automotive knowledge for P0345 diagnostics plus Mazda-specific considerations. It does not rely on recalls or service bulletins because none are listed in the provided data.
- Data limitations: P0345 is a camshaft position sensor circuit code. Actual root cause can vary widely from sensor failure to wiring issues or timing concerns. Always verify with current vehicle-specific service information.
CODE MEANING AND SEVERITY
- What the code means: P0345 is a powertrain diagnostic trouble code indicating a fault in the Camshaft Position Sensor “A” Circuit for Bank 2 (the bank and sensor labeling can vary by engine design). In practice, for a Mazda CX-5 with a 2.5L inline-4, this often maps to the primary camshaft position sensor circuit used by the engine control module (ECU) to determine cam timing.
- Why it matters: The camshaft position sensor tells the ECU where the camshaft is in relation to crankshaft position. If the ECU cannot read a valid cam signal, ignition timing and fuel injection timing can become erratic, which can cause misfires, rough idle, poor performance, or even engine stall.
- Severity: Moderate to high. The MIL (check engine light) is typically commanded, drivability can degrade (misfires, hesitation, reduced power), and in some cases the vehicle may be unable to start or run in a limp/limited mode. Driving with a mis-timed engine can lead to further damage if ignored.
COMMON CAUSES ON MAZDA CX-5
- Faulty camshaft position sensor (CMP sensor) itself (A circuit)
- Damaged, corroded, or loose wiring harness or connector at the CMP sensor (pin corrosion, broken wire, open circuit)
- Poor electrical connection (loose sensor plug, bent or pushed-out connector, contaminated pins)
- Wiring harness chafing or damage from heat, engine movement, or vibration
- Oil or coolant intrusion into the sensor connector or around the sensor
- Timing-related issues (rare for P0345 alone but possible): worn/damaged timing chain or tensioner leading to cam timing deviation, or a sensor-reading drift due to timing changes
- ECU/PCM fault (rare): an internal fault could fail to interpret the cam sensor signal
- Sensor alignment or mounting issues (improper installation or mounting stress)
- Contaminants or debris affecting sensor reluctor/target (on some designs)
SYMPTOMS
- MIL illumination (check engine light)
- Engine misfire or rough idle
- Hesitation or stumbling during acceleration
- Decreased engine power or limp-mode behavior
- Difficulty starting or no-start condition in some cases
- Erratic cam timing behavior leading to poor drivability
- Possible fuel efficiency drop
DIAGNOSTIC STEPS (step-by-step workflow)
Note: Always follow safe workshop practices. If you’re unsure, consult a professional.
A. Verify DTC and data
- Use a scan tool to confirm currently stored DTC P0345 and note any related DTCs (P0340, P0341, P0342, P0335, P0336, etc.).
- Check freeze frame data for engine RPM, load, temperature, and sensor readings at the time of the fault.
B. Visual inspection
- Inspect the CMP sensor and its wiring harness at the sensor for obvious damage, oil leaks, corrosion, or loose connectors.
- Check for damaged insulation, burned areas, or signs of heat exposure.
- Look for signs of water ingress or contamination in the connector or around the sensor.
C. Electrical checks at the CMP sensor
- With ignition ON (engine off), test for 5V reference and ground at the sensor connector using a digital multimeter (DMM).
- 5V reference (from ECU) should be present on the reference pin.
- Ground pin should have continuity to chassis/engine ground.
- Probe the CMP signal wire with the ignition ON (engine off) to verify a stable signal if your tool supports it; you should see a digital/pulsed signal when cranking or engine is running.
- Check for a good, solid ground path from the sensor to the ECU.
- If you have access to an oscilloscope or high-quality graphing multimeter, view the CMP signal waveform while cranking/idle. A clean, regular signal is expected; a missing/irregular waveform indicates sensor or wiring fault.
D. Sensor swap/functional test
- If a spare CMP sensor is available, perform a non-destructive swap test:
- Disconnect the old sensor, note the symptoms, install the known-good sensor, and recheck.
- If the DTC clears and symptoms improve (or the fault is not present with the new sensor), the CMP sensor is the likely culprit.
- If no spare sensor is available, consider replacing only if the electrical tests indicate sensor fault (no 5V reference, no signal, or erratic signal).
E. Inspect and test the wiring harness
- Inspect for damaged or frayed wires, pin push-out, or corrosion at the sensor connector and ECU-side connector.
- Perform continuity tests on the CMP signal and reference wires from the sensor to the ECU connector.
- Check for short to ground or short to 12V on the sensor circuits.
F. Mechanical timing check (situational)
- If electrical tests indicate sensor OK and wiring is good, but the code persists, inspect the timing chain/belt and tensioner if accessible and recommended by Mazda service procedures.
- Look for obvious timing misalignment or excessive wear; note that incorrect timing can cause cam/crank relation faults that mimic sensor issues.
G. Clear codes and re-test
- After repairs, clear the DTCs and perform a road test to confirm the issue is resolved and no new codes appear.
H. If symptoms persist
- Recheck all connections and sensor data.
- Consider ECU reflash or replacement only after all sensor/wiring/timing checks are exhausted and Mazda service literature supports such a fix.
RELATED CODES
These codes commonly appear with cam/crank position issues; diagnosing them alongside P0345 can help pinpoint the root cause:
- P0340 Camshaft Position Sensor Circuit Malfunction (general CMP circuit)
- P0341 Camshaft Position Sensor A Circuit Range/Performance (Bank 1)
- P0342 Camshaft Position Sensor A Circuit Low Input (Bank 1)
- P0343 Camshaft Position Sensor A Circuit Intermittent (Bank 1)
- P0344 Camshaft Position Sensor A Circuit Intermittent (no specific bank)
- P0335 Crankshaft Position Sensor A Circuit Malfunction
- P0336 Crankshaft Position Sensor A Circuit Range/Performance
- P0010, P0011, P0012 (Camshaft Timing/Actuator-related) – may be relevant if timing control or VVT is involved
- P0016, P0017 (Crankshaft/Camshaft correlation issues)
REPAIR OPTIONS AND COSTS (2025 price ranges)
Prices vary by region, shop, and whether you use OEM versus aftermarket parts. The ranges below reflect typical U.S. market costs as of 2025.
Camshaft Position Sensor (CMP sensor) replacement
- Parts: approximately $20–$120
- Labor: about 0.5–1.5 hours
- Estimated total: $100–$350
Notes: Some Mazda sensors may be slightly more expensive; price depends on whether the sensor is dual-channel or has integrated features.
CMP sensor wiring harness/connector repair
- Parts: $10–$100 (harness/connector replacement portion)
- Labor: $100–$300
- Estimated total: $150–$450
Notes: If harness repair requires replacing long portions of wiring, costs can rise.
Timing chain/belt, tensioner or related timing components (if timing issue is suspected or diagnosed)
- Parts: $50–$500 (depends on components replaced)
- Labor: 3–8 hours (heavy labor)
- Estimated total: $600–$1,500+
Notes: This is a more extensive repair; many shops will scope timing visually and verify with service data before quoting.
ECU/PCM replacement or reflash (rare)
- Parts: $350–$1,000 for a used/rebuilt ECU or $500–$1,500 for a new one
- Labor/Programming: $100–$300
- Estimated total: $600–$1,800
Notes: Generally a last-resort option after sensor/wiring/timing checks fail.
Diagnostic labor
- If you take the car to a shop for diagnosis alone, expect 0.5–2 hours of diagnostic time, often charged at $100–$150 per hour.
DIY vs PROFESSIONAL
- DIY (do-it-yourself) pros
- Excellent for basic inspection: visual check of CMP sensor and connectors, basic continuity checks, and 5V/ground checks with a multimeter.
- Sensor replacement is doable if you’re comfortable with automotive electrical work and engine bay access.
- Can save money on parts and diagnostic time.
- DIY cons
- Working around engine belts, wiring harnesses, and sensor connectors risks damaged connectors or improper sensor seating if you’re not careful.
- Without proper tools (scan tool with live data, oscilloscope for waveform, etc.), you may miss subtle faults.
- If timing components are involved, advanced knowledge and tools are required; mistakes can cause severe engine damage.
- Professional route
- Pros: Quick access to test equipment (oscilloscope/active probes), service manuals, and OEM parts; precise diagnosis; proper torque specs and sensor seating; your vehicle’s warranty implications (if any).
- Cons: Higher initial diagnostic and repair costs.
Bottom line: If you’re comfortable with electrical testing, you can start with inspection and CMP sensor replacement. For timing components or if you’re unsure about wiring integrity, a professional diagnostic is advised.
PREVENTION
- Regular maintenance and inspections
- Follow Mazda’s recommended maintenance schedule to keep oil and coolant clean and at proper levels; dirty oil can affect sensors indirectly.
- Periodically inspect the CMP sensor area for oil leaks, which can contaminate connectors or the sensor.
- Protect sensor wiring
- Ensure the wiring harness to the CMP sensor is routed away from hot surfaces and moving parts; repair damaged insulation promptly.
- Use dielectric grease on connector pins if recommended by Mazda service guidelines to reduce corrosion (apply sparingly as per service manual).
- Keep the engine bay dry and clean
- Water intrusion into connectors can cause intermittent faults; ensure weather seal integrity on connectors and gaskets around the sensor area.
- Address oil leaks promptly
- Oil leaking onto the CMP sensor or wiring can degrade signals; fix leaks to avoid recurring DTCs.
- Avoid aggressive wiring tampering
- If you must disconnect connectors, do so carefully and re-connect firmly; ensure clips and locks engage properly.
- Use quality parts
- If replacement is necessary, use OEM or reputable aftermarket CMP sensors that match Mazda specifications.
Summary
- P0345 on the 2022–2024 Mazda CX-5 signals a fault in the camshaft position sensor circuit (sensor A) for Bank 2. The most common culprits are a bad CMP sensor, damaged or corroded wiring/connectors, or a poor electrical connection. Timing issues are possible but less common as the primary cause.
- Diagnostic plan starts with a solid electrical test of the sensor circuit, visual wiring inspection, and, if needed, a sensor swap or wiring repair. If the sensor and wiring test OK but the code remains, inspect timing components.
- Repair costs range from relatively affordable sensor or wiring work (roughly $100–$500) to substantial timing-related repairs (often $600–$1,500+). ECU-related fixes are rare.
- No recalls found in the provided data. No recalls found in NHTSA database.
- Prevention focuses on protecting wiring/connectors, preventing oil/water intrusion, and following maintenance best practices.