Modern vehicles are technological marvels, but with all that innovation comes complexity—and sometimes, frustration. You’re cruising down the highway or about to pull out of your driveway when suddenly, the dreaded Check Engine Light flickers on. After a quick scan, two codes appear: P0335 and P0340. Panic sets in. What do they mean? Is your engine doomed? Do you need an expensive repair?
Take a deep breath.
In most cases, these issues are fixable without draining your wallet—as long as you approach them correctly.
What Are P0335 and P0340 Codes?

(*Pic from the Internet)
Before we jump into fixing anything, it's crucial to understand the problem you're dealing with.
-
P0335 – Crankshaft Position Sensor "A" Circuit Malfunction
-
P0340 – Camshaft Position Sensor "A" Circuit Malfunction (Bank 1 or Single Sensor)
Simply put:
-
P0335 points to issues related to how the crankshaft’s position is detected by the car’s computer.
-
P0340 indicates a problem with reading the camshaft’s position.
Both sensors are vital for the engine’s timing. They tell the Engine Control Unit (ECU) where the pistons and valves are at any given moment so it can control ignition and fuel injection properly.
If either one sends bad data—or no data at all—your engine will struggle, or even fail to start.
What Happens When You Have P0335 or P0340 Codes?
Here’s what you might experience if your vehicle throws one of these codes:
-
Hard starting or failure to start altogether
-
Engine misfires
-
Hesitation or stumbling while accelerating
-
Poor fuel economy
-
Rough idling
-
Reduced power
-
Check Engine Light illuminated
Sometimes, the symptoms can be subtle at first, but they almost always get worse over time. Ignoring them isn’t a good idea.
Common Causes of P0335 and P0340
Diagnosing engine problems without knowing the underlying causes is like finding a needle in a haystack.
Here are the most common culprits behind these trouble codes:
Causes for P0335 (Crankshaft Sensor Issues)
-
Faulty crankshaft position sensor
-
Damaged or frayed wiring
-
Loose or corroded sensor connectors
-
Broken timing belt or timing chain
-
Defective reluctor ring (tone ring)
-
Failed ECU (rare)
Causes for P0340 (Camshaft Sensor Issues)
-
Bad camshaft position sensor
-
Problems in sensor wiring or connectors
-
Misaligned timing belt or chain
-
Oil contamination on the sensor
-
Faulty ECU (rare)
Many times, especially on older vehicles, these issues boil down to a bad sensor or a simple wiring problem.
Can You Drive with a P0335 or P0340 Code?
Technically, you might be able to drive with either code present—but it’s not recommended.
When the ECU can’t correctly determine engine timing, your car could:
-
Stall unexpectedly
-
Misfire and damage the catalytic converter
-
Suffer further engine damage
If your car stalls on the road, it becomes a safety hazard for you and others.
Bottom line? Fix it as soon as possible.
How to Diagnose P0335 & P0340 Codes with an OBD2 Scanner
Tools will need:
-
OBD2 Scanner ( Take CGSULIT SC530 as example)
-
Basic hand tools (screwdrivers, wrenches)
-
Multimeter (optional but helpful)
Step 1: Connect the OBD2 Scanner
Locate your car’s OBD2 port (usually under the dashboard near the steering column).
Plug in your scanner, turn on the ignition (don't start the engine yet), and power up the scanner.
Step 2: Read the Fault Codes
Click the car make icon of SC530, then select your car model to enter diagnose page. Quick Scan.
You’ll likely see P0335, P0340, or both listed. Make a note of any pending or permanent codes as well.
Tip: Some scanners show “Freeze Frame Data” — snapshot info about the vehicle’s status when the code was triggered. This can offer additional clues.
Step 3: Inspect the Sensors and Wiring
Now it's time for some basic detective work.
-
Locate the crankshaft or camshaft sensors (refer to your car’s service manual if needed).
-
Visually inspect the wiring harnesses: look for damaged wires, corrosion, loose connectors.
-
Check the sensors themselves for signs of wear or contamination.
If anything looks suspicious, you may already have found your culprit.
Step 4: Test the Sensors (Advanced)
Using a multimeter:
-
Disconnect the sensor.
-
Measure the resistance (ohms) across its terminals.
-
Compare the reading to the manufacturer’s specifications.
If the readings are way off, it’s time for a new sensor.
Step 5: Repair or Replace Components
-
Fix any wiring issues (repair broken wires, clean corrosion, re-secure loose connections).
-
Replace the faulty sensor if needed (they are usually inexpensive and fairly easy to swap).
Step 6: Crankshaft / Camshaft Position Relearn
- Start by selecting your vehicle model, then enter the "Diagnose" page. From there, choose the "Control Module" and locate the "Engine Control Module.
- Next, go to "Special Functions" and find the "Crankshaft Position (CKP) Variation Learn" option or "Cam crank relearn" .
-
Follow the tips of the device to finish it.
- Recheck if the P0335 or P0340 code is still present. If it is, you can try clearing it.
Note:
1.Always perform the relearn after replacing a crankshaft or camshaft sensor, or if you repaired any related wiring.
2.Please notice that the vehicle's special functions & vehicle compatibility of the scanner will vary in different years & models. If you are interested in SC530, you can send the email of information about your vehicle to us to check the compatiblity.
Why Choose CGSULIT SC530 for Diagnosing P0335 and P0340?
There are tons of OBD2 scanners on the market.
Why CGSULIT SC530?
Here’s why:
-
Crankshaft & Camshaft Relearn Support – Not all scanners can do this critical step.
-
Wide Vehicle Coverage – Compatible with GM, Ford, Toyota, Honda, Chrysler, and more.
-
Advanced Diagnostics – Reads ABS, SRS, Transmission, and Engine codes.
-
Free Lifetime Updates – Keep your tool current without paying extra.
-
User-Friendly Interface – Clear menus, simple navigation, no confusing jargon.
If you’re serious about maintaining your car yourself—or simply saving hundreds of dollars at the mechanic—SC530 is a smart investment.
Conclusion: Get Your Car (and Your Peace of Mind) Back
Facing P0335 and P0340 codes can feel overwhelming at first. But once you break it down—understand the causes, use the right tools, and perform the correct procedures—it’s absolutely manageable.
With a reliable OBD2 scanner like the CGSULIT SC530, you can take control of your vehicle’s health, avoid unnecessary shop fees, and extend the life of your car.
Don't let a small sensor issue snowball into a major repair. Diagnose it. Fix it. Relearn it.
Disclaimer:
This article is for informational purposes only. Always follow professional repair procedures. If unsure, seek help from a certified mechanic. Use diagnostic tools responsibly.