P0340 Camshaft Position Sensor A Circuit Malfunction (Bank 1 or Single Sensor)
How the System Works & When the Code Sets
The crankshaft sensor tells the computer the position of the pistons, but it cannot tell whether the first cylinder is on its compression stroke or its exhaust stroke, because the crankshaft turns twice per working cycle while the camshaft turns once. So the camshaft sensor reads lobes on the camshaft or its gear, which lets the computer know the order for sequential injection and ignition, and it also measures cam angle for the variable valve timing (VVT) system. If crankshaft pulses are present, meaning the engine is turning, but no camshaft pulses arrive within a set number of revolutions, or the circuit is open or shorted, the computer records P0340.
Symptoms
- Longer than usual cranking before the engine starts, because the computer searches for synchronisation without the cam signal
- On some cars, especially older ones, the engine may not start, or may start and then stall
- Weak acceleration because the computer disables the VVT system and uses fallback timing
- Slight shake at idle and higher fuel consumption
- Check engine light on, sometimes with P0335 or P0016
Most Common Causes
- Sensor connector or wiring: corrosion, loose terminals or oil inside the connector, the most common causes
- Internally faulty or heat-sensitive camshaft sensor
- Loss of supply voltage (5 or 12 volts depending on the design) or a poor ground
- Sensor fitted at an angle or not mounted securely, so the distance to the lobes is wrong
- Damaged reluctor on the camshaft, or metal filings on the sensor tip
- Electrical interference from the alternator or the ignition wiring
- Rarely: a fault in the engine computer
Diagnostic Steps
- Identify the correct sensor: Bank 1 is the side with cylinder number 1, and the letter A usually means the intake camshaft; on V engines there is a Bank 2 sensor whose code is P0345.
- Read the accompanying codes: P0335 with it points toward a supply or ground shared by both sensors, and P0016 points toward mechanical timing.
- Unplug the connector and look inside; oil means a leak from the sensor O-ring or the valve cover, and the source must be repaired.
- For the Hall type: with the ignition on, measure the supply voltage and ground at the sensor connector. For the magnetic type: measure the resistance, then the AC voltage while cranking.
- Watch the camshaft and crankshaft signals together with an oscilloscope; missing cam pulses with crankshaft pulses present confirms the fault is in the sensor or its circuit.
- Check wiring continuity from the sensor to the computer, and that there is no short to ground or between wires.
- After the repair, clear the code and start the engine several times cold and hot to confirm it starts quickly.
How to Fix It
- Clean the connector and repair the wiring, and fix the leak that brought oil into it
- Replace the camshaft sensor with a matching part and a new O-ring, and mount it securely
- Repair the supply or ground circuit or the shared fuse
- Replace the alternator if it is proven to be the source of interference
- Carry out any calibration or adjustment the manufacturer requires after replacement on some engines
Notes by Vehicle Make
- Nissan: Nissan manuals call this sensor the CMP Sensor (PHASE), and on V6 engines such as the VQ family its Bank 2 counterpart is P0345. US recalls for some Altima and Sentra cars of model years 2002 and 2003 covered the camshaft sensors because of a soldering defect on their circuit board that could cause a no-start, low power or stalling, and the remedy was replacing the sensors.
- Mopar (Dodge/Ram/Jeep): on the 5.7 Hemi engine, the camshaft sensor is on the timing chain cover at the front right, and the computer relies on it to synchronise the injectors, so its absence directly affects starting.
- Ford: on Ford trucks and the Mustang GT, an alternator with a failed diode can send interference that sets P0340 or P0345 even though the sensor is sound.
Common Mistakes
- Replacing the Bank 2 sensor instead of Bank 1, or the exhaust camshaft sensor instead of the intake
- Fitting a new sensor into a connector full of oil without repairing the source of the leak
- Judging a Hall sensor by resistance measurement only, even though it needs a supply and signal check
- Ignoring an accompanying P0335, which may point to a failed shared supply
Severity & Repair Priority
Medium to high. If the engine runs smoothly, it can be driven carefully to the garage, but it may not start again after being switched off, so don't risk a long trip. Delay increases consumption and weakens performance because the VVT system is disabled.
P0340 FAQ
What is the difference between P0340 and P0345?
Both are for the intake camshaft sensor, but P0340 is for Bank 1 (the cylinder 1 side) and P0345 is for Bank 2 on V engines, and the location of each is given by the manufacturer in the service manual.
Why does my car only start after long cranking?
When the cam signal is missing, some systems try to work out the cylinder order using the crankshaft sensor alone, which takes extra revolutions while cranking, so starting is delayed.
Does P0340 always mean the sensor is faulty?
No. The wiring, the connector and the supply voltage are frequent causes. The sensor is replaced after confirming the supply and ground are sound and the signal is missing at the sensor itself.