P0340 on Nissan: How to Diagnose & Fix
Camshaft Position Sensor Circuit Malfunction
12 Nissan models · 19 documented issues · 12 critical · $30-$4,000 repair
P0340 on Nissan by model: symptoms, diagnosis and fix
Multiple owners report the Cube stalling unexpectedly while driving at various speeds, including highway speeds. The engine shuts off without warning, causing loss of power steering and power brakes. In some cases, pumping the accelerator at the moment of stalling can catch the engine before it dies completely. The issue has been linked to faulty crankshaft position sensors, throttle body failures, and ECM software bugs.
Common Symptoms
- Engine stalls without warning while driving
- Loss of power steering and brakes during stall
- Engine dies at idle or low speed
- Check engine light may or may not illuminate
- Difficulty restarting after stalling
How to Fix
Start with cleaning the throttle body and checking for vacuum leaks. Replace the crankshaft position sensor if codes P0335 or P0340 are present. Have the ECM software updated at a Nissan dealer. If the problem persists, the throttle body assembly may need replacement. Always keep up with spark plug replacement at the recommended 105,000-mile interval.
What you need to fix it
Only diagnosis- and fitment-reviewed repair parts are linked here.
- Genuine Nissan crankshaft position sensor 23731-1VA0A
2009-2014 Cube 1.8L on the live fitment table; confirm VIN and connector/current supersession.
- Genuine Nissan camshaft position sensor 23731-EN22A
2009-2014 Cube 1.8L on the live fitment table; confirm VIN/current supersession.
- Genuine Nissan electronic throttle body 16119-9SE0A
Confirm VIN/core terms and complete all required electronic-throttle learning.
- Genuine Nissan spark plug 22401-JD01B
Quantity four; verify VIN, plug specification and gap-handling instructions.
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
- TipClean the throttle body with CRC Throttle Body Cleaner every 30,000 miles — this prevents carbon buildup that causes stalling.
- WarningStalling at highway speeds is extremely dangerous. If it happens more than once, do not drive until diagnosed.
Altimas in this period frequently suffer from failing crankshaft position sensors and camshaft position sensors, especially on the 2.5L and 3.5L engines. Owners report intermittent stalling at stops or while driving, extended cranking, sudden no-start conditions, and check-engine lights. Nissan issued service information and many owner reports describe repeat failures with cheap aftermarket sensors.
Common Symptoms
- engine stalls while driving
- intermittent no-start
- long crank time
- tachometer drops to zero
- check engine light
- hard restart when hot
How to Fix
Diagnosis includes scanning for correlation and sensor circuit codes, checking live RPM signal during cranking, and inspecting harness connectors for oil contamination or heat damage. The most reliable fix is replacing the failed sensor(s) with OEM-quality parts and clearing codes; in some cases both cam and crank sensors are replaced together due to similar age and failure patterns.
What you need to fix it
Only diagnosis- and fitment-reviewed repair parts are linked here.
- Genuine Nissan 23731-6N21A crankshaft position sensor
2002-2006 Nissan Altima 2.5L QR25DE; confirm VIN, DTC and sensor location because catalog terminology can overlap cam/crank/magnet sensor names.
- OEM Nissan 2002-2006 Altima 3.5L camshaft position sensor
2002-2006 Nissan Altima 3.5L VQ35DE; select the DTC-identified bank/side and verify current Nissan part number.
- Genuine Nissan 23731-JA00C crankshaft/magnet sensor
Confirm VIN, DTC and sensor location.
- Genuine Nissan 23731-JA11B camshaft position sensor
Verify VIN, DTC and location; do not infer quantity.
- Genuine Nissan 23731-JA10C crankshaft position sensor
2007-2012 Nissan Altima 3.5L VQ35DE for this card; confirm VIN, exact DTC and crank-sensor location.
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
- TipUse OEM or OEM-supplier sensors; many owners report repeat failures within months when using the cheapest aftermarket cam/crank sensors.
- TipIf one sensor fails on a high-mileage car, many owners proactively replace the matching cam/crank sensors together to avoid another breakdown soon after.
On the 3.5L VQ35DE V6 the plastic secondary timing chain guides/tensioner shoes become brittle and break, and the secondary (cam) chain tensioners lose tension. This produces a loud rattle or whine from the front of the engine, most pronounced for the first few seconds of a cold start. When a guide breaks, the chain runs slack and can contact the tensioner piston (the 'death rattle'), risking valve-timing skip and internal damage if ignored. Owners across multiple Altima forums document this as one of the defining VQ35DE problems, and there is a Nissan TSB covering secondary-chain replacement.
Common Symptoms
- Loud rattle from front of engine on cold start lasting a few seconds
- Whining or buzzing noise from timing cover area
- Rattle that returns and worsens over time
- Possible check engine light for camshaft/crankshaft correlation if chain skips
How to Fix
Diagnose with a cold-start listen plus inspection of the front cover for guide debris. The fix is replacing the secondary timing chains, tensioner shoes/guide rails, and tensioners (and typically the primary chain components and oil seals) as a complete kit while the front cover is off. Per the Nissan secondary-chain TSB, key OEM parts are secondary chains 13028-ZK01C (x2) and tensioner-shoe/guide rails 13097-ZK01C (x2) plus o-rings/seals. Use OEM or quality kits; do all guides, tensioners, and chains together. It is 8-14 hours of labor due to front-cover access.
What you need to fix it
Only diagnosis- and fitment-reviewed repair parts are linked here.
- Genuine Nissan secondary camshaft timing chain 13028-ZK01C
Quantity two; confirm VIN/current supersession.
- Genuine Nissan secondary-chain tensioner shoe 13097-ZK01C
Quantity two; retailer page does not publish a fitment table, so confirm part number 13097-ZK01C by VIN before purchase.
- Genuine Nissan front crankshaft oil seal 13510-7Y000
Confirm all additional O-rings and seals from the current service procedure by VIN.
As an Amazon Associate, we earn from qualifying purchases; other part links may also earn au7o a commission. Confirm fitment by VIN before buying.
Sources for this issue (3)
The Crank Angle Sensor (CAS) on the VG30DE and VG30DETT engines is located inside the distributor and is a common failure point on both naturally aspirated and twin turbo Z32 models. The CAS provides timing information to the ECU, and when it fails, the engine will not start or will stall intermittently. The internal optical sensor deteriorates with heat and age. CAS failure is one of the most common reasons for Z32 no-start conditions. Replacement requires distributor removal.
Common Symptoms
- Intermittent no-start condition
- Engine stalling without warning
- Random misfires
- Tachometer dropping to zero while driving
- Engine dies and restarts after cooling down
How to Fix
Sources for this issue (1)
The Z32 uses an optical crank angle sensor built into the distributor at the front of the driver's-side (rear-of-engine) cylinder head. It reads engine speed and crank position via a slotted disc and photodiodes (360 slits plus six 120-degree reference slits). With age the internal LED/photodiode optics degrade, the sealed bearing wears, and the connector corrodes — producing intermittent or total spark/timing signal loss. Because the ECU relies on the CAS for both ignition and injection timing, a failing unit causes hot-restart failures, stalling, and no-starts that are notoriously hard to chase. Many are misdiagnosed when the real fault is corrosion in the harness connector.
Common Symptoms
- Intermittent stalling, often when hot
- No-start or hard hot-restart
- Engine cuts out then restarts after cooling
- Erratic tachometer
- No spark condition
How to Fix
Inspect and clean the CAS harness connector first. If the sensor itself is bad, replace with an OEM/genuine unit or a professionally rebuilt CAS; align the rotor to the timing reference and set base ignition timing after installation. Avoid low-quality aftermarket CAS units, which have a poor reputation.
What you need to fix it
Only diagnosis- and fitment-reviewed repair parts are linked here.
- Tested used OEM Nissan Z32 crank-angle sensor
Used part—confirm condition and return terms.
- Z1 early-style Z32 CAS connector and terminal kit
Use only when the installed Z32 CAS has the early connector style; normally the 1990-1993 sensor branch. Requires correct terminal crimping/pinning and does not repair a failed optical sensor.
- Z1 new-style Z32 CAS connector and terminal kit
1990-1996 Z32 only when the installed or conversion CAS uses the new-style connector; verify wire order from the factory diagram.
As an Amazon Associate, we earn from qualifying purchases; other part links may also earn au7o a commission. Confirm fitment by VIN before buying.
Sources for this issue (3)
The crankshaft position sensor's internal electronics degrade with heat and fail intermittently. As the engine warms the sensor signal drops out, causing the engine to stall and refuse to restart until it cools, then run normally again. It sets P0335/P0336 and is frequently misdiagnosed. Nissan owners report premature failure of cheap aftermarket sensors, so an OEM/Hitachi unit is recommended; on many Sentras the camshaft sensor is replaced alongside it.
Common Symptoms
- Engine stalls when hot, restarts after cooling
- Intermittent crank-no-start
- Check engine light
- Rough idle or hesitation before stalling
- Tachometer drops to zero while running
How to Fix
Confirm the no-start while hot and read codes (P0335/P0336). Replace the crankshaft position sensor (located at the engine-transmission junction, accessed from underneath after removing a splash shield) with an OEM Hitachi or quality Delphi/Standard part; replacing the camshaft sensor at the same time avoids a repeat no-start. Inspect engine/body grounds, as bad grounds can mimic the fault.
What you need to fix it
Only diagnosis- and fitment-reviewed repair parts are linked here.
- Genuine Nissan Sentra crankshaft position sensor 23731-1KC0A
Confirm VIN, connector and O-ring.
As an Amazon Associate, we earn from qualifying purchases; other part links may also earn au7o a commission. Confirm fitment by VIN before buying.
Sources for this issue (3)
P0340 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 P0340 mean on a Nissan?
P0340 stands for "Camshaft Position Sensor Circuit Malfunction." This code means the engine computer lost or received an erratic signal from the camshaft position sensor. That sensor tells the computer the exact position and speed of the camshaft, which it uses together with the crankshaft sensor to time fuel injection and spark precisely. When the camshaft signal is missing, intermittent, or out of range, the computer sets P0340. Symptoms often include hard starting, stalling, rough running, or a no-start because the engine can't time itself correctly. On Nissan it is documented across 12 models: Cube, Altima, 300ZX, Sentra, 350Z, Frontier, Murano, Maxima, Pathfinder, 240SX, Rogue, Armada.
What are the most common causes of P0340?
The most common causes of P0340 are: Failed camshaft position sensor, Corroded or loose sensor connector, Damaged or shorted sensor wiring, Bad reluctor/tone ring on the camshaft, Loose timing chain/belt or jumped timing, Metal debris or oil contamination on the sensor tip, Poor sensor power or ground supply, Faulty PCM/ECM (rare). The specific cause varies by vehicle.
How much does it cost to fix P0340 on a Nissan?
Published repair estimates on Nissan range from $30 to $4,000 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 P0340 on a different make?
View P0340 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.