P0335 on 2016-2023 Mazda CX-9 2.5L Turbo: Crankshaft Sensor Causes and Fixes
P0335 on a Mazda CX-9 almost always means the crankshaft position sensor has failed. This can cause the engine to stall unexpectedly or fail to start. A new OEM sensor (part #PE01-18-221) costs about $70-$90 and is a DIY-friendly fix for most owners. The sensor is located on the lower part of the engine, near the transmission bell housing.
- P0335 is a critical code on the Mazda CX-9 that requires immediate attention due to the risk of the engine stalling while driving.
- The most likely cause by a wide margin is a failed crankshaft position sensor (part #PE01-18-221).
- Before replacing the sensor, perform a quick visual check of the wiring harness near the crankshaft pulley for any signs of damage from heat or rubbing.
- The repair is within the scope of a DIYer with basic tools and can often be completed in about an hour.
What's Unique About the 2016-2023 Mazda CX-9
The 2.5L Turbo engine (PY-VPTS) in the second-generation CX-9 is part of Mazda's Skyactiv-G family, which relies heavily on precise sensor data for its efficiency and performance. While P0335 is a universal code, its impact is immediate and severe on this platform, often leading to a sudden stall with no warning. The crankshaft position sensor itself is a widely used part across many Mazda models, indicating a common design rather than a specific flaw to the CX-9. Its location near the drive belt and other components makes its wiring susceptible to damage during other service or from debris.
Symptoms You May Notice
- Engine will not start (cranks but no fire)
- Engine stalls suddenly while driving, sometimes after warming up
- Check Engine Light is on
- Rough or unstable idle
- Engine hesitation or stumbling during acceleration
- Engine misfires
- Tachometer shows 0 RPM while cranking 🎬 Watch: Troubleshooting a Mazda that cranks but won't start.
- Replacing the camshaft position sensor (P0340) when the issue is actually the crankshaft sensor.
- Replacing ignition coils or spark plugs chasing a misfire when the root cause is the lack of a proper timing signal from the CKP sensor.
Most Likely Causes
- Failed Crankshaft Position Sensor (CKP) 🔴 High Probability → Shop Engine Crankshaft Position Sensor The sensor can fail internally from heat cycles and age. It's the most common point of failure for this code on most modern vehicles, including this Mazda. The plastic housing can become brittle over time.
How to confirm: The most definitive test is to monitor the CKP signal on a scan tool with live data or with an oscilloscope. If the signal is absent or erratic while cranking the engine, the sensor is likely bad. A common symptom is stalling when hot and restarting only after cooling down. A multimeter can also be used to test the sensor's internal resistance, though specifications may vary.
Typical fix: Replace the crankshaft position sensor. Some owners report that after replacement, a 'relearn' procedure may be needed, which can sometimes be accomplished by just driving the vehicle.
Est. part cost: $60-$90 for an OEM sensor. - Damaged Wiring or Connector 🟡 Medium Probability The sensor is located at the bottom of the engine near the main crankshaft pulley and transmission bell housing. Its wiring harness can be damaged by road debris, heat from the engine, or by rubbing against the accessory drive belt. There are owner reports of this wiring being damaged during unrelated service at a dealership.
How to confirm: Visually inspect the wiring harness leading to the CKP sensor for any signs of chafing, melting, or breaks. Check the connector for corrosion, bent pins, or a loose fit. Wiggle the harness while the engine is running (if possible) to see if it causes a stall.
Typical fix: Repair the damaged section of the wiring harness or replace the connector pigtail.
Est. part cost: $10-$30 for a connector pigtail or wiring repair supplies.
Rare But Worth Checking
- Damaged Reluctor Ring: The reluctor ring (or tone wheel) is what the CKP sensor reads. While durable, it can be damaged during other engine work (like a timing belt or front seal replacement). A bent tooth or a sheared keyway will cause an erratic signal and trigger P0335.
- Powertrain Control Module (PCM) Fault: → Shop Engine Control Module (ECM) This is extremely rare. Before condemning the PCM, all other possibilities, including sensor and wiring issues, must be exhaustively ruled out. A PCM issue could also be related to a wiring harness recall on some 2018 models.
Diagnosis Steps
- Scan for Codes: Use an OBD-II scanner to confirm P0335 and check for any other related codes like P0340 or P0017.
- Check Live Data: Use a scan tool to monitor the engine RPM while cranking. If the scanner shows 0 RPM while the engine is physically turning over, it strongly suggests a problem with the CKP sensor circuit.
- Visual Inspection: Raise the vehicle and locate the crankshaft position sensor. On the 2.5T engine, it is typically on the back of the engine, near the bell housing where the engine meets the transmission. Visually inspect the sensor and its wiring harness for any obvious signs of damage, such as melting, chafing against the belt, or loose connections.
- Check for Signal (Advanced): Using an oscilloscope is the definitive test. Connect to the sensor's signal wire to check for a clean square wave pattern while the engine is cranking. No pattern or a distorted pattern indicates a bad sensor or reluctor ring issue.
- Test the Sensor: If an oscilloscope isn't available, you can test the sensor's resistance with a multimeter (if specifications are known) or simply replace it, as it is the most likely cause and relatively inexpensive.
- Inspect the Reluctor Ring: If a new sensor does not fix the problem, the next step is to inspect the reluctor ring for damage, which may require removing the crankshaft pulley or transmission components.
Parts You'll Likely Need
- Crankshaft Position Sensor
(OEM #PE01-18-221)— This sensor is the most common failure point for code P0335. It is a critical component for engine timing and its failure will cause stalling or no-start conditions. The part number is consistent across many Mazda models.
Trusted brands: Mazda (OEM), Denso, Hitachi, NGK/NTK
OEM price range: $70-$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 crank sensor can sometimes confuse the PCM and lead it to flag a cam sensor code as well.
- P0017 — Crankshaft Position - Camshaft Position Correlation. This code directly indicates a mismatch between the two sensors, which can be caused by a failing or intermittent crankshaft sensor.
- P0336 — Crankshaft Position Sensor 'A' Circuit Range/Performance. This code indicates the signal is present but erratic or out of its expected range, which can be a precursor to the complete signal loss of P0335.
Platform-Specific Known Issues
- A recall was issued for some 2018 Mazda CX-9 vehicles for a weak retention force in wiring harness connectors. While not specifically calling out P0335, this could lead to various electrical issues, including a no-restart condition, which shares symptoms with a failed CKP sensor.
- On a Mazdas247 forum, a user with a Mazda 5 reported a P0335 code after their accessory belt snapped and rubbed against the CKP sensor wiring, causing an intermittent no-start condition. This highlights the vulnerability of the wiring in that area.
Mechanic-Grade Diagnostic Values
- Crankshaft Position Sensor Internal Resistance — expected: 500 - 1,200 Ω. Some sources cite a tighter range of 800 - 1,320 Ω for similar Mazda sensors.. Failure: A reading of infinite resistance (OL) or a value significantly outside the expected range indicates a failed sensor.
- CKP Sensor Connector Reference Voltage — expected: ~5V DC (with key on, engine off, sensor disconnected).. 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 (Signal & Ground wires) — expected: < 10 Ω from the sensor connector to the corresponding pin at the PCM.. Failure: Resistance over 10 Ω or an open circuit (OL) indicates a break or corrosion in the harness that requires repair.
- Mass Airflow Sensor Voltage (Key On, Engine Off) — expected: ~0.2 V.. Failure: A reading of 1.2V or higher with the engine off can trick the PCM into thinking the engine is running, causing it to falsely set a P0335 code because it doesn't see a corresponding crank signal.
Scan Tool Commands That Help
- Mazda MDARS, FORScan, or other professional scan tools: Crankshaft Position Profile Correction (also known as CKP Pattern Clear/Learn or Relearn) — After replacing 🎬 Watch this if your Mazda runs poorly after sensor replacement. the crankshaft position sensor or performing major engine work (e.g., timing chain). This procedure clears the old sensor's learned profile from the PCM and learns the pattern of the new sensor to ensure accurate timing and misfire detection. Failure to perform this may result in rough running or other codes even with a new sensor.
Wiring & Ground Locations
- Main Engine Ground — Typically a heavy gauge wire from the engine block or transmission case to the chassis near the passenger side motor mount or directly to the negative battery terminal.. A poor engine ground can cause a floating ground reference for critical sensors like the CKP, leading to erratic signals and intermittent P0335 codes that are difficult to diagnose.
- Sensor Ground Point — Multiple sensor grounds are often bundled and attached to a single point on the engine block or cylinder head. A wiring diagram is needed to trace the specific ground for the CKP sensor circuit.. Corrosion or a loose connection at this specific grounding point can directly affect the CKP sensor's signal integrity, even if the main engine ground is good.
- CKP Sensor Connector — A 3-pin connector attached to the crankshaft position sensor, located on the lower part of the engine near the transmission bell housing.. This is the primary point for testing voltage, ground, and signal. The pins are typically: 1) 5V Reference, 2) Signal, 3) Ground. Verifying power and ground here is the first step before condemning the sensor.
Real Owner Repair Stories
- Mazdas247 Forum User (Mazda 5 (with similar engine architecture and sensor)) — Car would not start, cranked but no fire. P0335 code present.
❌ Tried (didn't work) Initial diagnosis by a garage found no spark.
✅ What actually fixed it The root cause was a previously snapped accessory belt that had rubbed against and damaged the CKP sensor. Replacing the crankshaft position sensor resolved the no-start condition.
OEM Part Supersession History
PE01-18-221→PE01-18-221— No supersession found. The part number remains current.
Heads up: The part number PE01-18-221 is used across a wide range of Mazda vehicles from 2012 to as recent as 2025 models, indicating broad compatibility within the brand.
Diagnostic Flowchart
Other Known Issues on This Vehicle
Issues unrelated to this code that are worth knowing about as an owner of this generation:
- Cracked Cylinder Head / Coolant Leak 🔴 High — Affects a minority of 2016-2021 models, but is a well-documented, high-cost failure. Can occur anywhere from 30,000 to over 100,000 miles. The issue stems from a design flaw causing cracks near the exhaust manifold. (Ref: Mazda issued TSB 01-013/21 and a warranty extension program (CSP11) to address this.)
- Excessive Oil Consumption (Faulty Valve Stem Seals) 🟠 Medium — Primarily documented on 2021 model year 2.5T engines. Owners report low oil lights illuminating between 3,000-5,000 miles after an oil change. (Ref: Mazda TSB 01-012/21 (and later revisions) addresses this issue, which led to a class-action lawsuit. The fix involves replacing the valve stem seals.)
- Normal Water Pump Seepage vs. Failure 🟡 Low — Commonly reported across many 2018+ Mazda models. Owners notice dried coolant stains near the water pump weep hole, but the coolant level often remains stable. (Ref: Mazda Service Alert SA-035-24 clarifies that minor staining can be normal, and the pump should only be replaced if there is active leakage or crystallized buildup.)
- Plugged Heater Core 🟠 Medium — Can occur in earlier models of this generation (approx. 2016-2018), leading to poor cabin heat. The issue may present after 3-4 years of service. (Ref: TSB 07-007/19 was issued. Mazda made production changes, including using a different coolant composition on vehicles built after April 2019 to prevent this.)
- Creaking Noise from Steering Column 🟡 Low — Some owners of 2016-2023 models may experience a creaking noise from the steering column, especially on irregular roads. (Ref: Mazda TSB SA-043/23 (NHTSA ID 10242233) addresses this by increasing the tightening torque of a steering column nut and, if needed, replacing the steering column assembly.)
Used vs. New Parts: Buying Guide for This Vehicle
When a used part is the smart pick: For this specific repair, using a used part is NOT recommended. The crankshaft position sensor is a critical electronic component that is relatively inexpensive to buy new. The risk of a used sensor failing unpredictably, causing a stall in traffic, outweighs the small cost savings.
What to inspect on the donor part:
- Not applicable as used parts are not advised for this component.
OEM-only on this vehicle (don't cheap out):
- Crankshaft Position Sensor: While some aftermarket brands are reliable, using a genuine Mazda (OEM) or OEM-supplier (like Denso, NTK, Hitachi) part is the safest choice to avoid compatibility issues, premature failure, or incorrect signal patterns that can cause persistent problems even after replacement.
Aftermarket brands forum-validated for this vehicle:
- Denso
- Hitachi
- NTK
- Bosch
Brands owners have reported issues with on this vehicle:
- Unnamed, low-cost 'white box' brands from online marketplaces. A technician noted that very cheap aftermarket sensors often do not work correctly out of the box or fail quickly.
Real Owner Stories
Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.
Mazda 5 (Related Engine Platform)
Symptoms: Intermittent no-start condition and Check Engine Light (P0335) after an accessory belt snapped.
What fixed it: The owner found the snapped belt had rubbed against the CKP sensor wiring; the sensor was replaced to resolve the issue after a temporary fix with WD-40 failed to provide a permanent solution.
Source hint: Mazdas247 - 'CranKshaft Position (CKP) Sensor circuit malfunction (P0335) CEL Code - including fix'
2018 Mazda CX-5 2.5T
Symptoms: Damaged crankshaft position sensor wire discovered after a service visit.
What fixed it: Repair of the wiring harness that was accidentally damaged by a technician during an unrelated dealership visit.
Source hint: Mazdas247 - '2018 CX-5 Oil Leak? Is this TSB for Tensioner?'
Mazda Protege
Symptoms: P0335 code present; owner performed troubleshooting on sensor and wiring continuity.
What fixed it: Diagnostic process involved testing the sensor and checking wiring continuity back to the PCM.
Source hint: Mazda Forum - 'CKP sensor reset'
Related OBD-II Codes
Frequently Asked Questions
Is there a recall for the wiring issues that might cause a P0335 on my 2018 CX-9?
Can a damaged accessory belt cause the P0335 code on this engine?
What is the specific OEM part number for the crankshaft sensor on the 2.5L Turbo engine?
Does my 2016-2021 CX-9 have a known issue with coolant leaks that I should check while diagnosing electrical codes?
Will I need to perform a 'relearn' procedure after replacing the CKP sensor on my Mazda?
Where exactly is the CKP sensor located on the 2.5T engine?
Helpful Videos
We Have This Part in Stock
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.
- Mazda CX-9:
- 🧭 Diagnostic Flowchart
- 🎬 Helpful Videos
- 🛍️ Shop This Part
- What's Unique About the 2016-2023 Mazda CX-9
- Symptoms You May Notice
- Most Likely Causes
- Rare But Worth Checking
- Diagnosis Steps
- Parts You'll Likely Need
- Related Codes That Often Appear With This One
- Platform-Specific Known Issues
- Mechanic-Grade Diagnostic Values
- Scan Tool Commands That Help
- Wiring & Ground Locations
- Real Owner Repair Stories
- OEM Part Supersession History
- Other Known Issues on This Vehicle
- Used vs. New Parts: Buying Guide for This Vehicle
- Real Owner Stories
- Mazda 5 (Related Engine Platform)
- 2018 Mazda CX-5 2.5T
- Mazda Protege
- Related OBD-II Codes
- Frequently Asked Questions
- 🎟️ Get 5% Off