P0335 on Mazda: How to Diagnose & Fix
Crankshaft Position Sensor A Circuit Malfunction
1 Mazda model · 1 documented issue · 1 critical · $50-$250 repair
P0335 on Mazda by model: symptoms, diagnosis and fix
The NB Miata (1999-2005) crankshaft position sensor (CPS) is a known failure point. The sensor deteriorates from engine heat, causing intermittent stalling, no-start conditions, and random misfires. Failure is often heat-related - the car runs fine when cold but stalls or dies after reaching operating temperature.
Common Symptoms
- Engine stalls when hot, restarts after cooling down
- Intermittent no-start condition (cranks but does not fire)
- Random misfires and rough running at operating temperature
- Check engine light with P0335 (CPS circuit) code
How to Fix
Replace crankshaft position sensor with OEM Mazda unit (N3A1-18-221A). Aftermarket sensors (Delphi, Dorman) have higher failure rates on this application. The sensor is located on the rear of the engine block near the flywheel.
What you need to fix it
Only diagnosis- and fitment-reviewed repair parts are linked here.
- Genuine Mazda BP4W-18-221B crankshaft position sensorOEMMazda BP4W-18-221B
Confirm VIN before ordering; thi
As an Amazon Associate, we earn from qualifying purchases; other part links may also earn au7o a commission. Confirm fitment by VIN before buying.
Owner tips & cautions
- TipCarry a spare CPS in the trunk - they fail without warning. Miata.net CPS mega-thread
- TipRoute sensor wiring away from exhaust manifold heat to extend sensor life
P0335 code reference
General diagnostic-code context. The code alone does not confirm a cause for your vehicle; use the applicable issue card and its sources.
Frequently asked questions
What does P0335 mean on a Mazda?
P0335 stands for "Crankshaft Position Sensor A Circuit Malfunction." This code means the engine computer has lost or detected a faulty signal from the crankshaft position sensor (sensor A), which tells the computer exactly how fast and in what position the crankshaft is rotating. That signal is essential for timing the spark and fuel injection, so a problem here can cause hard starting, stalling, or a no-start condition. The computer sets this code when the crank sensor signal is missing, erratic, or out of its expected pattern. Causes range from a failed sensor or damaged wiring to a problem with the reluctor (tone) ring the sensor reads. On Mazda it is documented across 1 model: MX-5 Miata.
What are the most common causes of P0335?
The most common causes of P0335 are: Failed crankshaft position sensor, Damaged, corroded, or loose sensor wiring/connector, Metal debris or oil contamination on the sensor tip, Damaged or misaligned reluctor (tone) ring, Excessive air gap between sensor and tone ring, Wiring shorted or open in the sensor circuit, Faulty PCM/ECM (rare). The specific cause varies by vehicle.
How much does it cost to fix P0335 on a Mazda?
Published repair estimates on Mazda range from $50 to $250 depending on the model and root cause. If an issue mentions a recall or campaign, check your VIN with the manufacturer or NHTSA and confirm eligibility and coverage with a dealer.
Looking for P0335 on a different make?
View P0335 across all makes →Content compiled with AI assistance using NHTSA complaints, TSBs, and owner reports. May contain errors. Always verify with your vehicle's service manual.