P0340 on a Nissan means the engine computer is not getting a correct signal from the camshaft position sensor on bank 1, which Nissan calls “CMP SEN/CIRC-B1.” Common causes are a weak battery, a damaged connector or wire, debris on the sensor, or a failed sensor. Take it seriously: Nissan safety recalls for faulty cam and crank sensors warn that the engine can stop running without warning while driving. Check your VIN for open recalls first.
Facts cross-checked against Nissan safety recalls and service bulletins on NHTSA, Nissan service manual procedures and published repair estimates. See our sourcing policy.
This guide explains how the camshaft sensor works on a Nissan, what sets P0340, the causes in the order to check them, the Nissan recalls and service bulletins for Altima, Sentra, Maxima, Frontier and others, repair costs by model, and whether it is safe to drive. Recall details come from NHTSA records and the diagnostic steps from Nissan service manual procedures.
For another Nissan code with a known fix, see our P1148 Nissan guide. And our free VIN decoder confirms your exact model, engine and build date, which decides which recall or bulletin applies.
| Code | P0340 (Nissan: CMP SEN/CIRC-B1) |
| Meaning | Camshaft position sensor “A” circuit, bank 1: missing or abnormal cylinder signal |
| Symptoms | Check engine light, hard start when warm, no start, reduced power, possible stalling |
| Common causes | Weak battery, connector or wiring, debris on the sensor, failed sensor |
| Safe to drive? | Not advisable until checked: some Nissan sensor faults can stall the engine while driving |
| First step | Check for open Nissan recalls by VIN |
What Does P0340 Mean on a Nissan?
P0340 Code – Quick Diagnostic Intelligence
Nissan’s service manual describes the camshaft position sensor, also called the PHASE sensor, this way: it “senses the protrusion of camshaft (INT) to identify a particular cylinder,” using a permanent magnet and a Hall IC. The engine computer combines this signal with the crankshaft position sensor signal to time fuel injection and ignition. On V6 engines, P0340 is bank 1 and P0345 is the same fault on bank 2.
When the Engine Computer Sets P0340
According to Nissan’s service manual, P0340 sets when:
- “The cylinder No. signal is not sent to ECM for the first few seconds during engine cranking.”
- “The cylinder No. signal is not sent to ECM during engine running.”
- “The cylinder No. signal is not in the normal pattern during engine running.”
Nissan’s confirmation test requires battery voltage above 10.5 volts with the key on, which is one reason a weak battery can set or mimic this code.
P0340 Symptoms on a Nissan
- Check engine light (Service Engine Soon) with P0340 stored.
- Hard starting when the engine is warm, with cranking longer than 3 seconds. Nissan bulletin NTB04-063 describes this on several 2003 to 2005 models.
- No start or reduced power.
- Stalling. Nissan recall 03V-455 warns that a faulty cam or crank sensor can cause the engine “to stop running without warning during vehicle operation.”
Common Causes of P0340 (Check in This Order)
Weak Battery or Starting System
Nissan lists a “dead (weak) battery,” the starter motor and the starting system circuit as possible causes. Low cranking voltage can stop the sensor signal from being read correctly. Test the battery and charging system first, because it costs nothing.
Connector or Wiring
Nissan’s diagnosis checks the sensor connector, its ground, its power supply and the signal wire to the engine computer for an open or short circuit. Look for bent pins, a loose lock tab, corrosion or chafed wires. Nissan also says that if code P0643, a sensor power supply fault, is stored too, diagnose that one first.
Debris on the Sensor or Camshaft Signal Plate
Nissan’s procedure includes removing the sensor to check it for chipping and checking for “accumulation of debris to the signal plate of camshaft rear end” and a “chipping signal plate.” RepairPal also advises fixing any oil or coolant leaks that could ruin a new sensor.
Failed Camshaft Position Sensor
If the power, ground and signal circuits test good, the sensor itself is the likely fault. Make sure you replace the correct bank: on V6 engines, bank 1 and bank 2 sensors can use different part numbers. For example, Nissan bulletin NTB04-063 lists 23731-6J906 for bank 1 and 23731-AL616 for bank 2 on the models it covers.
Crankshaft Position Sensor
The camshaft and crankshaft sensors work together, so a crank sensor fault can appear alongside P0340. If P0335 is stored too, test the crank sensor.
Timing Chain Wear
RepairPal notes that a camshaft sensor code can be triggered by a worn timing chain. Nissan bulletin NTB09-128a covers a whining noise from the timing chain area on 2005 to 2010 Frontier, Xterra and Pathfinder models with the 4.0L engine, but it does not list any trouble codes. Suspect the chain only if the sensor and wiring test good and you hear a whine or rattle.
Nissan Recalls and Bulletins for P0340
This is the most important part for older Nissans. Several safety recalls covered cam and crank sensor problems that could stall the engine. Safety recall repairs are free.
| Campaign | Type | Vehicles | What it covers |
|---|---|---|---|
| 03V-455 (Nissan R3022, Infiniti R3021) | Safety recall | 2000 to 2003 Sentra, 2002 to 2003 Altima and Maxima, 2003 Murano and 350Z, plus several 2002 to 2003 Infiniti models; about 630,000 vehicles | Crank or cam sensor circuit board with an improper solder joint; replace the sensors |
| 06V-242 (Nissan R0606) | Safety recall | 2003 to 2004 Altima and Sentra 2.5L | Crank sensor signal dropout that could stall the engine at low speed; engine computer reprogram |
| 07V-527 | Safety recall | 2002, 2005 and 2006 Altima and Sentra 2.5L; about 654,000 vehicles | Crank sensor signal dropout from overheating; engine computer reprogram |
| 01V-357 | Safety recall | 2000 to 2001 Sentra 1.8L | Crank position sensor could stop the engine; replace the sensor |
| NTB04-063 | Service bulletin | 2003 to 2005 Altima 3.5L, 2004 Maxima, 2004 Quest, built before set dates in 2004 | P0340 or P0345, or hard start when warm; replace the cam sensor for the affected bank |
| NTB01-074 | Service bulletin | 2002 Altima and Sentra | Check engine light with P0340 stored |
NHTSA’s VIN lookup does not show safety recalls that are more than 15 years old. If you own a 2000 to 2007 Nissan, call Nissan Consumer Affairs at 1-800-647-7261 to ask whether a recall is still open on your VIN.
Related Recall: 2004 to 2006 Nissan Trucks and SUVs
Recall 10V-517 covers about 747,000 2004 to 2006 Armada, Titan and Infiniti QX56 and 2005 to 2006 Frontier, Pathfinder and Xterra vehicles. Oxidized contacts in the engine computer relay could cause engine stalling, and the fix is a new relay. It does not name P0340, but if your truck stalls, it is worth checking.
P0340 on the Nissan Frontier, Pathfinder and Xterra
We found no Nissan bulletin that names P0340 for the 2005 and newer Frontier, Pathfinder or Xterra with the 4.0L engine. On these trucks, work through the standard order: battery, connectors and wiring, then the sensor. On the V6, confirm whether the code is bank 1 (P0340) or bank 2 (P0345) before buying a part, and consider an original-equipment sensor. If the code returns after a new sensor, test the crank sensor and wiring, and listen for timing chain noise.
How Much Does It Cost to Fix P0340?
These are RepairPal estimates checked in September 2026, before taxes and fees. A safety recall repair is free.
| Repair | Typical cost | Source |
|---|---|---|
| Check engine light diagnosis | About $122 to $179 | RepairPal (Frontier, Altima, Pathfinder, Sentra) |
| Camshaft position sensor, Xterra | About $107 to $229 | RepairPal |
| Camshaft position sensor, Frontier | About $145 to $239 | RepairPal |
| Camshaft position sensor, Altima | About $182 to $312 | RepairPal |
| Camshaft position sensor, Pathfinder | About $290 to $503 | RepairPal |
| Camshaft position sensor, Maxima | About $290 to $508 | RepairPal |
| Camshaft position sensor, Sentra | About $301 to $348 | RepairPal |
| Crankshaft position sensor, Frontier | About $136 to $262 | RepairPal |
| Timing chain tensioner, Frontier | About $1,549 to $2,018 | RepairPal |
How to Diagnose P0340 Yourself
This order follows Nissan’s service manual procedure. Use your factory service information for exact test values.
- Check the battery and starting system. Nissan’s test needs more than 10.5 volts with the key on.
- Check open recalls and bulletins by VIN, or call Nissan for older vehicles.
- Inspect the sensor connector for bent pins, corrosion and a secure lock, and check the ground connection.
- Check the sensor power supply with the key on and the connector unplugged.
- Check the ground and signal wires to the engine computer for opens and shorts.
- Remove the sensor and check it for chips or debris, and check the camshaft signal plate.
- Replace the sensor for the correct bank, then clear the code and confirm it does not return.
- If it returns, test the crank sensor and wiring and look for timing chain or mechanical problems.
Can You Drive With a P0340 Code?
It is not a good idea. Some cars run almost normally with P0340, but Nissan safety recalls for faulty cam and crank sensors describe engines that stop running without warning while driving, which can cause a crash. Until you know the cause, avoid highway driving and heavy traffic, and get it checked promptly. If the engine stalls or will not restart, have it towed.
P0340 vs Related Nissan Codes
- P0335: crankshaft position sensor (POS) circuit. Often appears together with P0340.
- P0345: the same camshaft sensor fault on bank 2 of a V6.
- P0341: camshaft position sensor “A” circuit range or performance, a signal that is present but out of range.
- P0011 and P0021: intake valve timing control, bank 1 and bank 2.
- P0643: sensor power supply circuit. Nissan says to diagnose it before P0340.
The Bottom Line
P0340 on a Nissan points to the camshaft sensor signal, and it can affect how safely the engine runs. Check your VIN for recalls, test the battery and wiring before buying parts, replace the sensor for the correct bank, and do not ignore stalling.
Frequently Asked Questions About the P0340 Code on Nissan
What does P0340 mean on a Nissan?
Can a bad battery cause P0340 on a Nissan?
Why is P0340 back after I replaced the sensor?
Is there a Nissan recall for P0340?
Where is the P0340 sensor on a Nissan Frontier?
How much does it cost to fix P0340 on a Nissan?
Related guides: browse all trouble code guides and Is Your 2023 Kia Telluride Transmission Slipping? Here’s the Real F….
⚠️ Professional Notice:
Recall and bulletin eligibility depends on your exact VIN. This guide is general information; a Nissan dealer has the final word on coverage and repairs.
Cost figures are published estimates and vary by vehicle, region and shop. Always get a written quote before authorizing a repair. NextCarReview.com does not receive compensation from any parts manufacturer, retailer, dealer or repair chain for editorial coverage.
Data Sources and Verification
- NHTSA recall 03V-455 (Nissan R3022, Infiniti R3021): nhtsa.gov
- NHTSA recall 06V-242 (Nissan R0606) owner letter: static.nhtsa.gov (PDF)
- NHTSA recall 07V-527: nhtsa.gov
- NHTSA recall 10V-517: static.nhtsa.gov (PDF)
- Nissan bulletin NTB04-063, P0340 and P0345 CMP sensor: Nissan PDF
- Nissan bulletin NTB09-128a, timing chain noise: nissan-techinfo.com (PDF)
- Nissan service manual, P0340 CMP sensor (PHASE) diagnosis, Sentra and Altima: Sentra, Altima
- RepairPal repair estimates: Frontier camshaft position sensor, Frontier check engine light diagnosis
- NHTSA recall lookup: nhtsa.gov/recalls

Morgan Reyes is the Lead Automotive Journalist and EV Analyst at Next Car Review. Specializing in mechanical systems and next-generation electric vehicles, Morgan breaks down complex automotive data, legacy matchups, and upcoming model previews into practical insights for car buyers.
