P0340 Camshaft Position Sensor Circuit Fault
Get it checked soon
The computer is not getting a good signal from the camshaft position sensor. A failed sensor or its wiring is the usual cause. The engine may start slowly, run rough or stall, so get it checked soon.
- Safe to drive?
- Yes, fix soon
- Typical cost at a shop
- $125-$326 RepairPal national averages, parts and labor
- Emissions test
- Yes, while the check engine light is on, most OBD emissions tests fail the car.


Read the freeze frame, every related code and the battery voltage to tell the sensor from its wiring.
$34.99 preorder, regular price $49. Free shipping in the US.
Codes and live sensors are free in the app. Obie, the AI mechanic, is part of ScanMyCar Pro.
What it means
The camshaft position sensor tells the computer where the camshaft is, so it knows which cylinder is on its power stroke. P0340 means the signal from the cam sensor (A, on bank 1 or on an engine with only one) is missing or not believable.
The technical version
The computer expects a set pattern of cam sensor pulses for every two turns of the crankshaft. P0340 sets when the pulses are missing, too few or too many. Causes include a dead sensor, an open or shorted wire, a damaged reluctor (tone wheel) and, less often, timing that has jumped. Codes P0341 to P0344 narrow the fault to range, low or intermittent signals.
Official name: Camshaft Position Sensor Circuit Malfunction.
Symptoms
- Long cranking before the engine starts.
- Stalling or cutting out.
- Rough running or less power.
- Sometimes no start.
Causes, most likely first
| Cause | How likely | How to tell |
|---|---|---|
| A failed camshaft position sensor | most common | The signal is missing on a scope or the code returns at once. |
| Damaged wiring or a loose, oily or corroded connector | common | Oil in the connector or chafed wires near the sensor. |
| A damaged reluctor (tone wheel) on the camshaft | less common | A new sensor does not help. |
| Timing chain or belt problems | rare | Crank and cam correlation codes such as P0016 with it. |
| A weak battery or charging fault during cranking | rare | Low battery voltage when it set. |
How likely is our ranking from repair data and common practice, not a published rate.
What the live data shows
Cam sensor signals are not standard OBD data, so a shop confirms them with a scope. Standard data still helps: the freeze frame shows whether it set while cranking or driving, and a weak battery during cranking shows in the voltage. Many cars show no symptom between drops of the signal.
What to check first, in order
-
Read the freeze frame and companion codes.
It shows when the signal dropped and whether timing codes came with it.
What the data shows: Rpm, coolant temperature and voltage when it set.
Cost: no cost if you have a scanner
-
Inspect the sensor connector and wiring.
Oil leaks and chafed wires are common.
What the data shows: No reading needed.
Cost: free to look
-
Check the battery and charging voltage.
Low voltage during cranking can upset sensor signals.
What the data shows: About 12.4 V or more engine off, about 13.5 to 14.7 V running.
Cost: no cost if you have a scanner
-
Replace the camshaft position sensor.
The usual fix.
What the data shows: Starts are quick and the code stays away.
Cost: $224-$326 at a shop (Camshaft position sensor replacement, RepairPal)
Is it safe to drive?
Get it checked soon
Yes, fix soon. Many engines run on the crank sensor alone, but some stall or will not restart.
Many cars keep running with this code, using the crankshaft sensor alone, but starts can take longer and some engines stall or refuse to restart. Avoid long trips until it is fixed, and stop if the engine starts cutting out.
Stop driving and get help if
- The engine stalls or cuts out while driving.
- The engine will not restart after it stops.
What it costs
| Repair | Typical cost |
|---|---|
| Check engine light diagnosis (shop)RepairPal, updated September 3, 2026 | $125-$183 |
| Camshaft position sensor replacementRepairPal, updated September 3, 2026 | $224-$326 |
National averages for the full job at a shop, parts and labor, from RepairPal (updated September 3, 2026). Your price depends on the car and the area. Many of the first checks on this page cost nothing with a scanner.
Can I clear it? Will it come back?
After the repair, clear the code and do several cold and warm starts. If the signal is good, the code stays away.
Will it fail an emissions test?
Yes, while the check engine light is on, most OBD emissions tests fail the car.
Related codes
Also related, no guide yet: P0341, P0344, P0345.

How Obie handles P0340
Obie reads the freeze frame, companion codes and battery voltage and tells you whether the pattern points to the sensor, its wiring or timing. Obie is part of ScanMyCar Pro. Codes and live sensors are free.
Questions people ask
Can I drive with P0340?
Often for short trips, but the engine can stall or refuse to restart. Get it fixed soon.
Will a bad cam sensor cause a no start?
On some engines, yes. Many start, but take longer.
Is P0340 always the sensor?
Usually, but check the wiring and connector first, and look for timing codes.
Sources
- RepairPal: P0340 code page repairpal.com
- RepairPal: Check engine light diagnosis (shop) (updated September 3, 2026) repairpal.com
- RepairPal: Camshaft position sensor replacement (updated September 3, 2026) repairpal.com
- Texas DPS emissions testing FAQ dps.texas.gov
- Arizona myazcar.com: OBD and the check engine light myazcar.com
A guide, not a diagnosis. This page describes what P0340 generally means across OBD2 cars. What is actually wrong with your car depends on its live data and its history, and any repair decision deserves a proper diagnosis, whether that is you with a scanner or a professional with a lift.