Mazda P0345 Error Code: How to Fix It

Medium 45-90 minutes Medium Severity Verified June 2026
Error Code
P0345
Brand
Mazda
Product Type
automotive
Severity
Medium
DIY Difficulty
Medium
Estimated Fix Time
45-90 minutes
The P0345 error code in your Mazda indicates a problem with the camshaft position sensor A circuit on bank 2 of your engine. This sensor helps your engine's computer control fuel injection and ignition timing. When it fails, you may experience rough idling, poor acceleration, or difficulty starting your vehicle.
Ad

Tools You'll Need

How to Fix Error Code P0345

  1. Connect OBD2 Scanner and Verify Code

    Never work on the engine while it's running or hot. Allow the engine to cool for at least 30 minutes before starting repairs.
  2. Locate the Camshaft Position Sensor

    Disconnect the negative battery terminal before working on any electrical components to prevent short circuits.
  3. Inspect Wiring and Connections

  4. Test Sensor Voltage

    Be careful not to short circuit any wires while testing with the multimeter probes.
  5. Remove and Inspect the Sensor

    Mark the sensor's orientation before removal to ensure proper reinstallation.
  6. Test or Replace the Sensor

    Do not overtighten the sensor mounting bolt as this can crack the sensor housing or strip the threads.
  7. Clear Codes and Test Drive

Parts You May Need

Camshaft position sensor
Check Price on Amazon
Sensor O-ring or gasket
Check Price on Amazon
Electrical connector pigtail
Check Price on Amazon
Camshaft position sensor
Check Price on Amazon
Sensor O-ring or gasket
Check Price on Amazon
Electrical connector pigtail
Check Price on Amazon
Camshaft position sensor
Check Price on Amazon
Sensor O-ring or gasket
Check Price on Amazon
Electrical connector pigtail
Check Price on Amazon
Camshaft position sensor
Check Price on Amazon
Sensor O-ring or gasket
Check Price on Amazon
Electrical connector pigtail
Check Price on Amazon
Camshaft position sensor
Check Price on Amazon
Sensor O-ring or gasket
Check Price on Amazon
Electrical connector pigtail
Check Price on Amazon
Camshaft position sensor
Check Price on Amazon
Sensor O-ring or gasket
Check Price on Amazon
Electrical connector pigtail
Check Price on Amazon
Camshaft position sensor
Check Price on Amazon
Sensor O-ring or gasket
Check Price on Amazon
Electrical connector pigtail
Check Price on Amazon
Camshaft position sensor
Check Price on Amazon
Sensor O-ring or gasket
Check Price on Amazon
Electrical connector pigtail
Check Price on Amazon
Ad

When to Call a Professional

Call a professional mechanic if you're uncomfortable working with electrical components, if the wiring harness needs extensive repair, if multiple camshaft position sensors are failing simultaneously, or if the problem persists after replacing the sensor as this may indicate PCM issues requiring specialized diagnostic equipment.

Frequently Asked Questions

Can I drive my Mazda with P0345 code?
You can drive short distances to a repair facility, but avoid extended driving. The engine may run rough, have poor acceleration, or stall unexpectedly. Continued driving could cause additional engine damage or leave you stranded.
How much does it cost to fix P0345 on a Mazda?
DIY repair typically costs $30-80 for a new camshaft position sensor. Professional repair ranges from $150-350 including parts and labor, depending on your Mazda model and local labor rates.
What causes P0345 code in Mazda vehicles?
Common causes include a faulty camshaft position sensor, damaged wiring or connectors, timing chain problems, or rarely, a failed PCM. The sensor itself is the most frequent culprit, especially on higher mileage vehicles.
Will P0345 cause my Mazda to not start?
Yes, P0345 can prevent your Mazda from starting or cause it to start and immediately stall. The engine computer needs camshaft position data to properly time fuel injection and ignition, so a complete sensor failure can result in a no-start condition.