Go-Parts
Cart 0
Your cart is empty
Add an item to see it appear here.
Wrenchy
Go-Parts Garage
Expert guides for diagnosing, troubleshooting, and replacing auto parts Expert guides for diagnosing and replacing auto parts
Browse All Articles →
🧭 Diagnostic Flowchart 🎬 Helpful Videos 🛍️ Shop This Part

P0335 on 2012-2018 Mazda 3, 6, & CX-5 Skyactiv: Crank Sensor Causes and Fixes

P0335 on a Skyactiv Mazda almost always means the crankshaft position sensor has failed. This can cause a no-start or stalling, especially when the engine is hot. A new OEM sensor (Part No. PE01-18-221) is the recommended fix and costs around $60-$90. Before replacing, check the wiring harness for damage, as it's a known vulnerability.

17 minutes to read 2012-2018 Mazda 3 / 6 / CX-5
Most Likely Cause
Failed Crankshaft Position Sensor
Difficulty
2/5
Est. Time
1 hrs
DIY Doable?
✅ Yes
Shop Labor
$120 – $280
Parts Price
$50 – $100
🚫 Do not drive — Driving is not recommended. The engine can stall at any moment without warning, creating a significant safety risk in traffic. The vehicle may not restart, leaving you stranded.
Key Takeaways
  • P0335 on a Skyactiv Mazda is a high-priority code indicating a problem with the crankshaft position sensor circuit.
  • The most common symptom is the engine stalling or failing to start, often without warning.
  • The overwhelming majority of cases are fixed by replacing the crankshaft position sensor itself (Part No. PE01-18-221).
  • Before replacing the sensor, always perform a quick visual inspection of the wiring, as its location makes it vulnerable to rubbing against the drive belt.
  • Do not continue to drive the vehicle, as a sudden stall in traffic is a significant safety hazard.
The trouble code P0335 stands for "Crankshaft Position 'A' Circuit Malfunction." On a Mazda with a Skyactiv-G engine, the Powertrain Control Module (PCM) sets this code when it doesn't receive a signal from the crankshaft position sensor (CKP), or if the signal pattern is incorrect. Specifically, Mazda's diagnostic logic flags the fault if it sees no CKP signal while the exhaust camshaft rotates five times, or if the signal pattern is abnormal over 10 crankshaft rotations. This sensor's signal is essential for the PCM to manage ignition timing and fuel injection, and without it, the engine cannot run correctly, if at all.

What's Unique About the 2012-2018 Mazda 3 / 6 / CX-5

For Mazda's Skyactiv-G engines, the P0335 code is a straightforward and common issue, typically pointing directly to a failed sensor rather than more complex diagnostic paths. Unlike some other vehicles where wiring or PCM issues are equally probable, the community and repair consensus for this Mazda platform strongly indicates a high failure rate of the sensor itself, especially as the vehicle ages. The sensor's signal is so critical that the PCM has very specific criteria for setting the code, such as a loss of signal for just a few rotations, highlighting its importance in the Skyactiv engine management system. A key vulnerability on this platform is the sensor's location near the main drive belt, making it susceptible to damage if the belt frays or snaps.

Generation note: The 2012-2018 year range covers the end of the second-generation Mazda 3 (2012-2013) and the full third-generation (2014-2018), as well as the first-generation CX-5 (2013-2016) and the start of the second-generation (2017-2018). The Mazda 6 is entirely the third generation in this period. However, since all these vehicles use the 2.0L or 2.5L Skyactiv-G engine, the causes, diagnosis, and fix for P0335 are virtually identical across all models and generations, as they share the same sensor design (PE01-18-221).

Symptoms You May Notice

  • Check Engine Light is on
  • Engine will not start
  • Engine cranks for a long time before starting (extended crank)
  • Engine stalls unexpectedly, especially when warm or coming to a stop
  • Rough idle or misfiring
  • Poor acceleration or loss of power
  • Tachometer does not move during cranking
  • Tachometer needle jumps erratically.
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the battery or alternator for a no-start condition without checking codes first.
  • Replacing spark plugs or ignition coils, assuming a misfire is the root cause.
  • Replacing the camshaft position sensor (P0340) without checking the crankshaft sensor, as the two are related.

Most Likely Causes

  1. Failed Crankshaft Position Sensor 🔴 High Probability → Shop Engine Crankshaft Position Sensor The sensor is exposed to significant heat and vibration at the bottom of the engine, leading to internal electronic failure over time. This is the most common failure point for this code on this platform.
    How to confirm: Use a scan tool to check for a live RPM signal during cranking. If the tachometer doesn't move and there's no RPM reading, the sensor is likely dead. An oscilloscope can definitively confirm the lack of a square wave signal. A resistance test between sensor terminals should read between 500-1,200 ohms.
    Typical fix: Replace the crankshaft position sensor. It is held in by a single bolt.
    Est. part cost: $50-$100
  2. Damaged Wiring or Connector 🟡 Medium Probability The sensor's location near the bottom of the engine makes its wiring vulnerable to road debris, oil leaks, and heat damage. In some cases, the harness can rub against the drive belt, wearing through the insulation and causing a short. The connector can also become brittle or corroded.
    How to confirm: Visually inspect the wiring harness leading to the sensor for any signs of chafing, melting, or breaks. Check the connector for corrosion, moisture, or loose pins. Perform a 'wiggle test' on the harness while monitoring the sensor signal.
    Typical fix: Repair the damaged section of wire or replace the connector pigtail.
    Est. part cost: $10-$30

Rare But Worth Checking

  • Damaged Reluctor Ring: The reluctor ring (or tone ring) is a toothed wheel that the crank sensor reads. If it is damaged, cracked, or has missing teeth, the signal will be incorrect. This is rare but can happen, especially if other engine work has been performed.
  • Faulty Powertrain Control Module (PCM): → Shop Engine Control Module (ECM) This is extremely rare. The PCM is the last thing to suspect after definitively ruling out the sensor, wiring, and reluctor ring. A PCM failure requires replacement and programming by a dealer or specialized shop.
  • Incorrect MAF Sensor Calibration: On modified vehicles, particularly those with larger aftermarket air intakes, an incorrect Mass Airflow (MAF) sensor calibration can sometimes trigger a P0335 code at startup. This is a very specific and rare cause documented by tuning communities. A faulty MAF sensor sending an erroneously high voltage signal with the key on but engine off can also trick the PCM into setting a P0335.

Diagnosis Steps

  1. Read the fault codes with an OBD-II scanner to confirm P0335 is present.
  2. Use the scanner's live data function to monitor Engine RPM while cranking the engine. If the reading is 0 or erratic, the PCM is not receiving a signal.
  3. Perform a thorough visual inspection of the crankshaft position sensor and its wiring harness. The sensor is located on the lower part of the engine block, near the transmission bell housing, often accessible by turning the front wheels to the right and removing splash shield clips in the passenger-side wheel well. Look for any signs of damage, melting, or corrosion.
  4. Disconnect the sensor and inspect the connector pins for corrosion or damage. Ensure a snug fit.
  5. If the wiring and connector appear intact, the most likely cause is a failed sensor. Replacing the sensor is the next logical step.
  6. For advanced diagnosis, use an oscilloscope to back-probe the sensor's signal wire. A good sensor will produce a clean square wave pattern when the engine is cranked.
  7. If a new sensor does not resolve the issue, perform a continuity and resistance test on the wiring harness between the sensor connector and the PCM.

Parts You'll Likely Need

  • Crankshaft Position Sensor (OEM #PE01-18-221) — This is the component that fails in the vast majority of P0335 cases on this platform due to heat and vibration. No widely available revised part number has been noted, so the original part is still the standard replacement.
    Trusted brands: Mazda (OEM), Denso, NTK/NGK, Bosch, Hitachi, Delphi
    OEM price range: $60-$90
    Aftermarket price range: $40-$70

Related Codes That Often Appear With This One

  • P0340 — This is the code for the Camshaft Position Sensor. The PCM compares cam and crank signals to verify timing. A fault in the primary crank sensor can sometimes confuse the PCM and lead it to flag the cam sensor as well.
  • P0016 / P0017 — These codes indicate a Crankshaft/Camshaft Position Correlation error. A failing or intermittent crankshaft sensor (causing P0335) is a primary reason for this mismatch, as the PCM sees a discrepancy between where the crank says it is and where the cam says it is.

Technical Service Bulletins (TSBs) & Recalls

  • TSB 01-019/19: While not directly for P0335, this TSB addresses a common oil leak from the serpentine belt tensioner. An oil-soaked belt or engine bay could potentially contaminate the CKP sensor or its wiring, making this TSB relevant context for overall engine bay health.

Platform-Specific Known Issues

  • Wiring Harness Rubbing on Drive Belt: A specific failure pattern noted by owners involves the CKP sensor wiring harness rubbing against the main engine drive belt, eventually wearing through the insulation and causing a short circuit that triggers P0335. This is a critical point to inspect before replacing the sensor itself.

Mechanic-Grade Diagnostic Values

  • Crankshaft Position Sensor (CKP) Internal Resistance — expected: 500 - 1,200 Ω. Failure: A reading of infinite resistance (Open Loop/OL) or a value significantly outside this range indicates a failed sensor.
  • CKP Sensor Connector Reference Voltage (at harness) — expected: ~5V DC (Key On, Engine Off). Failure: No voltage or significantly low voltage points to a wiring issue or a problem with the PCM's 5V reference circuit.
  • Wiring Harness Continuity (from sensor connector to PCM) — expected: < 10 Ω. Failure: Resistance over 10 Ω or an open circuit (OL) indicates a break or high resistance in the harness that needs repair.
  • CKP Sensor Signal Voltage (Oscilloscope) — expected: A clean square wave pattern that switches between a low (e.g., <0.8V) and high (e.g., >4.5V) state as the engine cranks.. Failure: No signal, a flat line, or a distorted/noisy waveform indicates a failed sensor or circuit issue.

Scan Tool Commands That Help

  • Mazda IDS / FORScan: Crankshaft Position (CKP) Variation Learn / Cam/Crank Relearn — This procedure should be performed after replacing the crankshaft position sensor, timing components, or PCM. It allows the PCM to learn the specific signal characteristics of the new sensor and the reluctor wheel's mechanical tolerances, which can prevent future misfire detection errors or related correlation codes (e.g., P1336).

Wiring & Ground Locations

  • CKP Sensor to PCM Connector Pins — On the main PCM connector, typically located in the engine bay.. For continuity testing, these specific pins must be checked. For a Skyactiv-G 2.0/2.5, the pins are typically: CKP Sensor Terminal A to PCM Terminal 1BN (Power/VREF), Terminal B to PCM 1AH (Ground), and Terminal C to PCM 1AD (Signal). Always verify with a model-year specific wiring diagram.
  • G1 / G2 / G3 — Primary engine bay ground points. G1 and G2 are often located behind the driver's side headlight, and G3 is behind the passenger headlight.. A corroded or loose main engine ground can cause a variety of electrical issues, including erratic sensor signals. While not a direct cause of P0335, poor grounding can create intermittent problems that are difficult to diagnose.

Real Owner Repair Stories

  • mazdas247.com forum user (Mazda 5 with Skyactiv engine) — Intermittent P0335 code and a no-start condition that appeared weeks after an accessory belt snapped.
    ❌ Tried (didn't work) Initial diagnosis was difficult due to the intermittent nature and the delay from the initial belt failure.
    ✅ What actually fixed it The snapped belt had physically damaged the crankshaft position sensor wiring. Repairing the wiring and replacing the sensor resolved the P0335 code.
  • Reddit r/MechanicAdvice user (2017 Mazda 3 Skyactiv-G) — Violent jerking, no acceleration, and a persistent P0335 code.
    ❌ Tried (didn't work) Replacing the crankshaft position sensor.
    ✅ What actually fixed it The issue was ultimately traced back to a problem in the wiring harness, not the sensor itself. This emphasizes the need to thoroughly inspect the circuit even if the sensor is the most common failure point.

OEM Part Supersession History

  • PE01-18-221PE01-18-221A — Standard part revision, likely for minor improvements in manufacturing or materials.
    Heads up: The parts are interchangeable and compatible. The 'A' revision is the current OEM replacement part.

Diagnostic Flowchart

Other Known Issues on This Vehicle

Issues unrelated to this code that are worth knowing about as an owner of this generation:

  • Infotainment 'Ghost Touch' and Screen Delamination 🟠 Medium — Very common on 2014-2018 models. The touchscreen may register phantom inputs ('ghost touch') or develop spider-web cracks and peeling under the surface. (Ref: Mazda issued TSBs like 09-021/22 and SA-001-23, providing a repair kit to replace just the screen/digitizer instead of the whole unit.)
  • Leaking Serpentine Belt Tensioner 🟠 Medium — A common failure point where the hydraulic tensioner leaks oil, causing a rattling noise and potential for the serpentine belt to slip. Can occur from 60,000 km onward. (Ref: TSB 01-019/19 was issued for this problem, and an updated part (PE03-15-980C) was released with improved sealing.)
  • Intake Valve Carbon Buildup 🟡 Low — As a direct-injection engine, carbon can accumulate on intake valves over time, typically becoming noticeable after 100,000-150,000 km. Symptoms include rough idle and cold-start hesitation. However, many sources note the Skyactiv design is less prone to severe buildup than other GDI engines. (Ref: A Mazda bulletin exists for a chemical decarbonization procedure.)
  • Premature Brake Wear 🟡 Low — Some owners report needing to replace brake pads and rotors sooner than expected, particularly on the CX-5. This can be caused by corrosion on caliper bracket tins, preventing pads from moving freely.
  • Easily Cracked Windshields 🟡 Low — Owners of 2014-2016 CX-5 models have reported windshields cracking from stress, sometimes without a direct impact. (Ref: A recall was issued for a related issue where a windshield bracket could detach, affecting the Smart City Brake Support system.)

Used vs. New Parts: Buying Guide for This Vehicle

When a used part is the smart pick: For this specific repair, a used part is NOT recommended. The crankshaft position sensor is a relatively inexpensive electronic component with a known failure rate due to heat and vibration. The cost savings of a used part are minimal and do not outweigh the high risk of receiving a part that is near the end of its life or already faulty.

What to inspect on the donor part:

  • Not applicable as used parts are not recommended.

OEM-only on this vehicle (don't cheap out):

  • While not strictly 'OEM-only', using a brand-new sensor from either Mazda (OEM) or a reputable OEM supplier like Denso or NTK is strongly advised. Cheap, unbranded aftermarket sensors have a high rate of being dead-on-arrival or failing prematurely.

Aftermarket brands forum-validated for this vehicle:

  • Denso
  • NTK/NGK
  • Bosch
  • Hitachi
  • Delphi

Brands owners have reported issues with on this vehicle:

  • Unbranded, no-name sensors from online marketplaces. A user on a forum noted a cheap aftermarket MAF sensor was the cause of their P0335, highlighting the risk of low-quality electronics.

Real Owner Stories

Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.

2017 CX-5 GT 2.5L — 168000 miles

Symptoms: Sudden loud pinging/rattle while accelerating, followed by a stall or shutdown and a crank-no-start condition. Check engine light on with codes P0335, P0365, P061B, P061D, P0102, P0113.

What fixed it: The owner replaced the crankshaft sensor with an aftermarket part from Autozone, but it did not fix the issue, suggesting a deeper electrical or timing component failure.

Source hint: Mazdas247 forum report

Mazda 5 (Skyactiv Platform) — ~120000 miles

Symptoms: Intermittent P0335 and no-start condition that appeared weeks after a belt issue.

What fixed it: Repairing the CKP sensor wiring which had been rubbed by a snapped non-OEM accessory belt.

Source hint: Mazda5Club.com (via mazdas247.com)

Frequently Asked Questions

I have a 2017 CX-5 with a P0335 code and a loud rattle; will a new sensor fix it?
While a failed sensor is a high-probability cause, owner reports for the 2017 CX-5 2.5L show that replacing the crankshaft sensor with an aftermarket part does not always resolve the issue, especially if accompanied by codes like P0365 or P061B. Wiring inspections are critical.
Can a damaged drive belt cause a P0335 code on my Mazda?
Yes. On this platform, the CKP sensor wiring harness is known to rub against the main engine drive belt. If a belt snaps or wears through the insulation, it can cause a short circuit and trigger the P0335 code.
Where is the crankshaft position sensor located on the Skyactiv-G 2.0L/2.5L engine?
The sensor is located on the lower part of the engine block near the transmission bell housing. It is often accessed by turning the front wheels to the right and removing the splash shield clips in the passenger-side wheel well.
Does TSB 01-019/19 mean my P0335 code is caused by an oil leak?
TSB 01-019/19 specifically addresses a leaking serpentine belt tensioner. While it doesn't directly cause P0335, an oil-soaked belt or engine bay resulting from this leak could potentially contaminate the sensor or its wiring.
Could my aftermarket intake be causing the P0335 code on my Mazda?
According to reports on MazdaSpeeds.org, installing a 4-inch aftermarket intake can trigger a P0335 code at startup, which may require recalibrating MAF sensor values in the vehicle's tune to resolve.
How can I tell if the sensor is actually dead without removing it?
You can use a scan tool to check for a live RPM signal during cranking. If the tachometer does not move and the scan tool reads 0 RPM, the sensor is likely failed. A resistance test should show between 500-1,200 ohms.
How to Replace Crankshaft Position Sensor 2014-2021 Mazda 6
How to Replace Crankshaft Position Sensor 2014-2021 Mazda 6
Mazda6 Check Engine Light P0335 P0340 Crankshaft Position Sensor Replacement
Mazda6 Check Engine Light P0335 P0340 Crankshaft Position Sensor Replacement
P0335 Code - Crankshaft Position Sensor “A” Circuit Malfunction (Common Causes & DIY Fixes)
P0335 Code - Crankshaft Position Sensor “A” Circuit Malfunction (Common Causes & DIY Fixes)
P0335 Code: Watch This Before Replacing The Crankshaft Position Sensor
P0335 Code: Watch This Before Replacing The Crankshaft Position Sensor
2010 Mazda 3, p0335 Crank Code | Bad MAF
2010 Mazda 3, p0335 Crank Code | Bad MAF
Wrenchy
Article researched & written by
Go-Parts' AI research assistant. Every article is backed by live web research, verified OEM data, and real technician knowledge — so you get accurate, up-to-date information you can trust.
Meet Wrenchy → Updated May 30, 2026

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.

Year Coverage
This article covers the OBD-II Code P0335 (Deep Dive) for:
  • Mazda 3 / 6 / CX-5: 2012201320142015201620172018
In this article
🧭 Diagnostic Flowchart
Jump to ▴

Email This Guide

We'll send you a link to this article so you can read it later or share it.

Added to cart · Part