fault code guide
P0340: Camshaft Position Sensor 'A' Circuit Malfunction (Bank 1)
The engine computer has lost the electrical signal from the camshaft position sensor on bank 1. Your car may take longer to start, run roughly, or cut out unexpectedly.
How it shows up: The amber engine management light will stay on steadily, and the code shows up during an OBD diagnostic scan. You may experience slow engine cranking before it catches, rough idling, a flat spot when accelerating, or random stalling.
Updated 9 November 2026
Can I keep driving?
Service soon
While the engine might run using backup data from the crankshaft sensor, it can cut out suddenly in traffic or fail to restart once switched off.
What to do right now
- 1Pull over in a safe place if the engine is hesitating, jerking, or cutting out.
- 2Turn off the engine and wait a minute before restarting to see if it starts cleanly or struggles to fire up.
- 3If the car drives without violent jerking, drive gently to your destination or directly to a nearby garage.
- 4Arrange a diagnostic check as soon as possible before you get stranded.
Likely causes
Most likely first.
- Likely
Faulty camshaft position sensor
Sensors sit close to the hot engine head where constant heat cycles break down their internal electronics over time.
- Possible
Damaged wiring or corroded connector
The sensor plug can suffer from oil contamination, road grime, or broken copper strands inside the wiring harness near the engine.
- Possible
Weak or failing 12-volt battery
A battery dropping too low during cranking starves engine sensors of steady voltage, confusing the computer as the engine spins.
- Rare
Damaged reluctor ring or timing issue
A worn timing chain, slipped belt, or missing teeth on the camshaft reluctor ring prevent the sensor from reading the cam position correctly.
What you can check yourself
Park somewhere safe and level, engine off, before you start.
- 1
Check the sensor connector
Open the bonnet with the engine off and cool. Locate the camshaft sensor at the top or side of the engine cylinder head, release the plastic clip, and look inside for engine oil, green corrosion, or loose pins.
- 2
Inspect visible wiring
Follow the sensor wires back into the main engine loom. Look for signs of chafing against sharp metal brackets, split insulation, or damage from heat and rodents.
- 3
Test the 12-volt battery health
Test the battery voltage with a multimeter across the terminals while parked. A healthy battery should read around 12.6 volts at rest and stay above 10 volts while cranking the engine.
- 4
Check the engine oil level
Pull the dipstick, wipe it clean, reinsert it fully, and withdraw it to check the oil mark. Extremely low or sludged engine oil can starve variable valve timing systems and upset camshaft alignment.
Rough cost to fix
Rough estimateTypical prices in Ireland (€) and the UK (£), from an independent garage up to a main dealer. Access to the sensor drives the price, as some sit openly on top of the engine while others require removing covers and intake ducting.
Camshaft position sensor replacement
- Do it yourself
- €35–110£30–95 in the UK
- At a garage
- €110–240£95–210 in the UK
Sensor wiring or plug repair
- Do it yourself
- Garage job
- At a garage
- €90–200£80–175 in the UK
12-volt battery replacement
- Do it yourself
- €90–210£80–185 in the UK
- At a garage
- €140–280£120–245 in the UK
Timing belt or chain replacement
- Do it yourself
- Garage job
- At a garage
- €450–1,200£400–1,050 in the UK
When to go to a garage
- The engine cuts out unexpectedly while idling at junctions or driving at speed.
- The car cranks repeatedly but refuses to start up at all.
- You hear rattling, slapping, or metallic ticking noises from the timing cover area.
- A replacement sensor does not clear the fault code or improve engine running.
Questions drivers ask
Can I keep driving my car with code P0340?
You can usually drive a short distance to get home or reach a garage, provided the car is running smoothly. However, the engine computer is guessing cylinder timing, which can trigger limp mode, high fuel consumption, or sudden stalling. It is best not to rely on the car for long motorway journeys until it is fixed.
Will clearing the fault code fix the issue?
Clearing the code with an OBD scanner only turns the light off temporarily. Because P0340 indicates an electrical circuit fault, the engine computer will run its self-test and bring the warning light straight back as soon as it spots the missing pulse again. The underlying hardware or wiring issue must be repaired first.
What is the difference between P0340 and P0335?
Code P0340 refers to the camshaft position sensor, which monitors valve positions at the top of the engine. Code P0335 refers to the crankshaft position sensor, which monitors piston positions at the bottom of the engine. Both sensors work together to control fuel injection and ignition spark timing.
Will P0340 cause my car to fail its MOT or NCT?
On an MOT in the UK, an illuminated engine management light is an automatic failure for petrol cars first used from July 2003 and diesels from July 2008. On the Irish NCT, an engine light or emissions code alone results in an Advisory Pass, but the car will fail if the timing fault pushes exhaust emissions beyond legal limits. Either way, resolving the fault before testing is strongly recommended.
Test rules here are for the National Car Test in Ireland (NCT) and the MOT in the UK. Elsewhere, check the regulations of your own country or state before going for a vehicle test.
The warning light you may see
Related fault codes
Get an answer for your own car
Tell the AI Technician your make, model and what you are seeing. It works out the likely cause, the tests and the fix for your car.
Free with an AutoQ Pro account. Answers in about ten seconds.
General guidance for most cars, not a diagnosis of yours. Details differ by make, model and year - check your handbook, and if in doubt, don't drive.