Ignition Systems ControlOBD2 Codes

P0340 – Meaning, Causes, Symptoms, & Fixes

Reading Time: 3 minutes


Code P0340 Definition

Camshaft Position Sensor Circuit Malfunction

What Does P0340 Mean?

The camshaft position sensor located in the internal combustion engine monitors the position and rotational speed of the camshaft. It works hand in hand with the reluctor ring that creates a square wave voltage signal that the ECM interprets as the crankshaft position. The ECM uses this information to control ignition spark and fuel injector timing. When the trouble code P0340 is set, the ignition spark and fuel injector timing fails due to the engine not knowing when to fire these components.

What Are The Symptoms Of Code P0340?

  • Check Engine Light
  • The vehicle will not start – may be difficult to start
  • Rough idle/stall
  • Vehicle engine misfire
  • Loss of power when driving

*In many cases there may be no noticeable issues with your vehicle

What Is The Cause Of P0340?

  • A defective camshaft position sensor
  • Damaged or dirty reluctor ring on the camshaft
  • Defective, corroded, shorted camshaft position sensor circuit wiring
  • Defective, corroded, shorted camshaft position sensor circuit connector
  • A faulty crankshaft position sensor
  • Stretched or misaligned timing components
  • ECM software update needed
  • Faulty ECM

How Serious Is Code P0340? – Severe


The vehicle may be difficult to start and the driver may also experience a lack of power when driving. It is possible for more damage to occur inside the engine of the vehicle if disregarded for an extended time period. It is extremely important to repair code P0340 as soon as possible.

Code P0340 Common Diagnosis Mistakes

Replacing the camshaft position sensor without checking the wiring, connector, or reluctor ring beforehand. There may also be the possibility of neglecting a misfire or timing error.

Tools Needed to Diagnose Code P0340:

How To Diagnose And Repair Code P0340:

Difficulty of Diagnosis and Repair – 3 out of 5

  1. Visually inspect the camshaft position sensor wiring in search of corroded, broken, or frayed wiring.
  2. Visually inspect the camshaft position sensor connector in search of corroded or broken connectors.
  3. Make any other repairs (if other codes are present) to make sure that other codes are not sources of the trouble code P0340.
  4. Check your camshaft position sensor’s voltage, ground, and signal readings with a multimeter. Check out this video for a visual reference on how to check it using your multimeter.
  5. If you find that the camshaft position sensor fails to produce a voltage or a signal, remove it and check the reluctor ring for damage, debris, or misalignment. If the reluctor ring appears in good condition, replace the camshaft position sensor.
  6. If the concern persists, perform the same test as you did on the camshaft position sensor to the crankshaft position sensor and its circuits. If it fails the tests, replace it.
  7. If the concern still persists, perform a continuity test on the camshaft and crankshaft position sensor circuits between the respective sensors and the ECM. Repair any faults you discover.
  8. If these steps do not resolve your Check Engine Light, you may need to visit a mechanic because there may be internal issues with the ECM, stretched or damaged timing components or the possibility of an ECM software update that may resolve the concern. 

Estimated Cost of Repair

For error code P0340, one or more of the below repairs may be needed to solve the underlying issue. For each possible repair, the estimated cost of repair includes the cost of the relevant parts and the cost of labor required to make the repair.

  • Camshaft position sensor $120-$300
  • Crankshaft position sensor $190-$250
  • ECM $1000-$1200
  • Timing chain or belt replacement $200-$1000


You may also like


  1. Is this electronic sensor located on the exterior of the engine and something I can replace, I do have a multi-meter…. how much does the sensor cost ?

    1. I have a Kia and it was a broken wire just at the harness. I fixed it for free and it solved the problem.

      1. While driving I while driving the oil light came on. I stopped and put oil in the car. I continued to travel. The oil light came on again the car lost power and the engine stopped running. It will turn over but won’t crank. It gets a po340 code

        1. I just bought my car from a buy here, pay here place. It’s good to know what is wrong with the vehicle. FIXD gave me a diagnosis. Now I can sound like I know about cars when speaking to mechanics and they won’t think they can rip me off so easy.

      2. while driving the oil light came on. I stopped and put oil in the car. I continued to travel. The oil light came on again the car lost power and the engine stopped running. It will turn over but won’t crank. It gets a po340 code

        1. I’m going to say timing! Broken chain/belt or jumped time either way a pain in the backside! If it is and you have the money replace everything important in the area or you will find yourself dealing with the same issues before you know it!

      3. I have a 97 Rav4 with a distributor and it doesn’t have a cam sensor. It puts out this code. I checked the box crank sensor for fun and it’s good. Now what? Any suggestions? Oh, the motor was just rebuilt… But the code was there before that.

    2. I had surgery in Oct last year and the car sat for over 5 months until I started it yesterday a week ago . the service engine light came on. What should I actually do to check the correct fault

  2. I got the error code and my wife went on line for info. It was crankshaft position sensor.
    Got a replacement at O’Rielly’s and I was able to replace it. We are glad to have had FIXD TO HELP US.

    1. I recently replaced crank sensor and ecm module no codes jeep was running good one day after driving I tried to restart it and it would not turn over after about 5 minutes it started now I have a code p0340 pointing at cam shaft sensor should I replace it

  3. I have codes po340 and code p0341 I changed the camshaft position sensor the one on top of motor and the one on bottom it’s still throwing those two codes wires are OK please help what the hell is it

    1. I would look at the timing belt and or tensioner for failure. Also if the water pump is timing belt driven and it fails, it’s possible that the timing belt can skip a sprocket creating an out-of-phase state; hope that helps

      1. KIA sorento 2008 model faultscode…p0340 camshaft sensor…the vechicle is not Firring well especially when you want to climb hill or move fast

      2. I have a 2010 Buick enclave with coded P0008 It says bank 1 camshaft sensor, but do you change A or B ?

  4. I have a 2011 terrain 2.4 or whatever it is it’s throwing p0340 and p0341 I changed both sensors and it still stalls out and throws the codes I can have my wife and grandkids riding around in a car that stalls on the road any help would be appreciated

    1. What did you do

  5. My 1999 Dodge Intrepid 3.2 engine stalled. I restarted it but the engine light was on. I plugged in my FIXD and got the error code meaning that the camshaft position sensor was the cause of the trouble. I went to O’Rielly’s and picked up a new one. After replacing the sensor, I was able to clear the engine light and have not had any further problems. FIXD was accurate in the diagnosis and saved me a lot of money.

    1. That’s awesome Donald! Glad we could help.

      Thanks, FIXD Team

  6. I have a 2012 gmc terrian that is throwing po341 and po340 it stalls when stopped at sings and lights seems like its not got enough fuel dies but does start back up

    1. I have the exact same issue with my 2012 Hyundai Elantra I was told that because it stalls when brake pedal is depressed most likely it due to a vacuum leak at the brake booster and the P0340 code is probably the timing chain. Two separate issues yet only one intermittent code (check engine light not continuously on) P0340.

  7. 2010 Chevy Traverse, turning off highway into drive Car just died. Pushed it to the house noticed battery was old replaced the following day. Ran FIXD no errors came up and car doesn’t turn over. I’ve re-search the issue and timing belt may be the issue, b4 I go that far what are some other signs?

    1. Could be your crank sensor, starter, bad grounds, spark plugs, coils….so on.

  8. i have a Saab 9-3 , arc convertible 2005 code reads po340, i changed crankshaft posiyion sensor and spark plugs, now a still have mild miss when idleing

  9. I have a 56 plate zafira 1.6 petrol.
    It has a misfire changed the coil pack and plugs still to no avail idles rough but has brought about 20 codes up help help jelp

  10. 08 Saturn, i4, 115,000 miles. Car is running great. Have spent thousands on the damn error lights. Don’t they ever burn out? Mechanics in TX just disconnected a bunch of wires to shut them off (lost about 2 mpg but passed inspection)
    Mechanics in Maine reattached all the wires and its been a snipe hunt ever since. Parts replaced and replaced again, Oil changes every 5000, added Misery oil, added Rislone, added motor flush. Mechanics have checked wiring, nothing works.
    Engine just keeps on running, 22 mpg, no leaks, burns no oil, starts easy, runs quiet, I think it’s time for an exorcism.

  11. My Toyota camry stopped working last week pulling up to a stop sign. Wouldnt crank back up. Pushed it to nearby parking lot. Got a code for the valve switch in the evac system. Went and bought the part it said we needed, put it in, still wouldn’t crank and was now showing a code for this cam shaft position sensor bank one circuit A. Got the part again, just finished putting that on. Still won’t crank!!! What else could it be?? Still giving us the code for the camshaft sensor.

    1. It’s the magnet research it.

  12. I have a 2012 mn triton which stalled going round corner and wont restar code error po340 is it the cam or crank sensor can u tell me the location on this vehicle thanks

    1. I have a 05 Nissan Altima 2.5 that blew a head gasket fixed that now the car tried to start but only if I hold down the accelerator pedal to the floor but still does not start .. I’ve redone the timing twice just to make double sure that it wasn’t 180° out . I’ve replaced the can sensor twice but still no luck in getting it to start .. What is the sensor that is on the front of the timing cover . Perhaps another cam sensor or is something else …please help ….

      Brian in Texas

  13. I had a code to change cam/crank shaft position sensor, whenever I changed it, it ran fine for about 3 days. I ran it a lot. I am driving and the engine light pops back on — same code. I changed the crankshaft position senor this time, on the bottom — no help. I checked the wiring harnesses for continuity — all good there. Possible I bought a faulty sensor? Help please.

    1. Garret, same thing happened to me…. I went to Oreilly’s and they pulled the code for the cam shaft position sensor (INtake). I replaced it. The engine light was not on when I started the engine after repair. Drove it one day and same code is popping with the engine light back on….Engine seems to be running fine now tho. Cost me $60 so far….will be at least $300 for dealer. Did you find your solution?

  14. I have a 2010 Nissan Pathfinder that has been turning over sluggishly for a while now. It cut out today and the codes were PO340/PO345
    now I am wondering if I should just purchase a camshaft position sensor from Auto Parts store and see if I can take care of it myself

  15. My 2018 Mazda CX-5 is kicking out this code as well as P250F (low engine oil)*. Dealership is telling me the engine needs to be replaced for $7,000 and they’re not going to cover it. Are they full of it? (*had an oil change two weeks ago at JiffyLube and dealership saying they don’t see leak or blowby)

    1. I replace the camshaft position sensor and everything was fine. Engine light was out and it ran perfectly. I drove about 20 miles to run an errand and on my return trip the engine started missing and cutting out again. It was much worse than before. What could be the problem now?

      1. Bad diode in your alternator. Will pass the test they do but its the problem. Listen for a whine from the alternator.

  16. I have a 2001 Mitsubishi Galant ES and it’s saying it’s the crankshaft position sensor I changed it out and still giving me the same code and now my car won’t stay on at all

    1. Need to relearn with DTC computer that reads codes can relearn basically gets it in time with ECM

  17. The engine for my Mitsubishi Galant 2003 won’t start. Code is P0340 camshaft, already replaced the camshaft also put a new starter but still won’t start? Any ideas?

    1. Relearn

  18. Wife broke her car; crank no start problem. Downloaded the app, plugged in the FIXD, read the codes, replaced the cam position sensor, all good. Next will have to check out why the check engine light came on my truck.

  19. 1999 ford explorer the Amp meter shows discharge unless high revving the engine….the fixd app shows a p0340 code cam shaft position sensor. nothing about the amp meter or alternator. no other codes. Engine quits after a few minutes at idle, try to restart, battery dead. Before attempting, vehicle was sitting for about 3 months. trickle charged the battery, which was new 6 months ago.

  20. I have a 2011 Hyundai Elantra, keep getting the P0340 code, I replaced the camshaft sensor twice, the car still having hard time starting when engine is cold. It cranks but need to press the gas for it to start. I don’t know what else it could be. Took it to 2 mechanics and they don’t want even touch it because they think it could be something that will take a long time to diagnose.

  21. Hello was the problem fixed yet?

  22. 06 pathfinder SE, was driving in an ice storm. VDC/OFF- SLIP light has turned on and both won’t go off. Then check engine light. Cam pos. Code pops up. Bank 2 and some other which wasn’t important. Changed both calm and crank sensors. Slip and vdc still on. And now it says as a future problem cam position sensor. No hard starts, no dying out of nowhere. Anyone know what could be there problem or have experience with the same issue?

Leave a reply

Your email address will not be published. Required fields are marked *