DTC codes P0335 and P0342

Our 99 Cavalier set the CEL, codes are P0335 crankshaft position sensor and P0342 camshaft position sensor. Any idea what's common to both? Car runs
well, but intermittently is hard to start.
Al
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
At first glance the two are unrelated. Have the codes cleared and read again. If your car will "carnk but not run" the P0335 will set if you try to start your car more than 15 times and the ignition is not switched to the off position between attempts.
So, have them cleared and read again, see what happens. Maybe only the P0342 is your problem.
Steve

and
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Cleared them four or five times already. Takes a week or so and the CEL lamp comes back on. This all started when I took the battery out for about 30 minutes. Another anomaly is the ETS light comes on sometimes but I do not think it's related to the other problem. The "new" problem started when battery went bad. I removed it, went to a parts house, picked up a new battery and went back to put it in. I squirted out the battery box to get rid the crud. Must have got water in something or moved a flaky connector. I've been everywhere looking for a wiring diagram to see how the wires are routed and where any common connectors might be.
Al
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Check the plugs to the sensors and also the ground points. Both sensors receive power and ground from the same plugs.....

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Here is an update. Just in case anyone is still reading this. The other day the starter died. Changed the starter and the CEL has stayed off. I'm thinking the starter had something to do with these codes and the ETS light?? Wondering if the starter was putting "hash" on the electrical system and causing havoc. The person that drives the car everyday told me the lights never came on when the engine was running. But sometimes stayed on after she started the car. Interesting.
Al
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

No they don't. The crank sensor plugs into the ingnition control module and the cam sensor plugs into the PCM.
Steve
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I think I've found the sensors. They are both behind the engine, one above the other. Is this correct?
Al
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Yes, beside the oil filter. Crank sensor on bottom next to knock sensor, cam sensor on top.
I guess it is now safe to assume you have the 2.2L engine.
Steve
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.