I'm having an issue on my 2007 Altima 2.5 after I changed the head gasket (also changed the head out with a remanufactured head because my exhaust valves were leaking) getting it to start. So after I put everything back together I hand cranked the motor a couple of times and then cranked it with the starter a few times with the fuel pump fuse removed to let the oil pump circulate the oil around before I ran the car. Once I put the fuse back in the engine did not want to start but after waiting 20 minutes or so I tried again and it fired right up and ran smooth. I let the engine run a good 10 or 15 minutes and I shut it off and waited another 20 minutes or so and now it will not start at all. The battery is fairly new and I put it on the charger before cranking it. Also when I'm trying to start the engine all the dash lights black out on me and then come back on when the starter cuts off. I also did get it started yesterday for a few seconds and it did give a fault code of P0340 so I changed the crankshaft position sensor but it still is doing the same thing. Any ideas what might be going on? I could see if it didnt start at all after the head job that my timing might be off but since it did crank and run good im thinking its not that?
Im stumped. Thanks in advance!