Car won't run with crankshaft position sensor plugged in on 2003 Nissan Maxima

I have a 2003 Maxima 6 speed, I just replaced the engine, at first I kept getting the p0335 code, but the car would take a long time to start but eventually it would start and run strong. I realized the reason for the code is I mixed up the sockets for the Crank Position with the O2 sensor. After correcting the crossing the car will now start right up but idle like hell for a few seconds and die, I tried pressing the accelerator and that doesn't help. I have an OBD2 scanner and I checked the readings from all the sensors and everything seems to be responding ok. Any ideas? I went through the, Accelerator Pedal Release Position Learning Procedure for 2K2+ and the Throttle Valve Closed Position Learning Procedure for 2K2+ still with no luck, any suggestions on where to go from here? If I unplug the crank sensor it runs fine just takes a while to start. Thanks everyone for your help.

by in Reston, VA on July 05, 2012
1 answer 8 comments
ANSWER by on July 05, 2012
When you swapped engines did you have to do anything with the timing chain set-up? With your scanner what does it show the base timing at and is it steady? What are you getting from the knock sensor?What does MAF say with Key-on ,engine-off?Also map/bap sensor readings with engine off?
COMMENT by on July 06, 2012
I didn't mess with the timing at all, also when the crankshaft sensor is disconnected the car runs great. I'll check the readings with the key on engine off and let you know what everything says.
COMMENT by on July 06, 2012
Another thought , when you swapped engines did you use the sensors that came with the engine you bought (I'm assuming used) or did you swap over the sensors from your original engine?
COMMENT by on July 06, 2012
I swapped the ones from my old engine.
COMMENT by on July 06, 2012
WELL.....that ruins one theory I had.
COMMENT by on July 06, 2012
Ok so I went and got new crank and cam sensors from Nissan this time and ended up with the same result here are the readings from my scanner with key on engine off at room temperature: ABSLT TPS .4 eng speed 0 calc load 0 MAF (LB/M) .02 Coolant 102 F IAT 102 F IGN Advance 63.5 ST FTRM1 0 LT FTRM1 0 ST FTRM2 0 LT FTRM2 0 Veh Speed 0 MPH Fuel sys 1 Open Fuel sys 2 open O2S11 0 ST FTRM11 -100 o2s12 .290 o2s21 0 ST FRM21 -100 O2s22 .430
COMMENT by on July 09, 2012
Sorry to drag this out , but 1 more question, why was engine replaced?
COMMENT by on July 09, 2012
old on threw a rod
COMMENT by on July 09, 2012
On the IGN Advance, does it change when you unplug it?...same conditions KOEO.I see the MAF , but I don't see a barometric pressure sensor reading. I deal with Honda primarily but those and most other brands I've dealt with had that also , just not the manifold pressure sensor.Could just be I'm a moron though.