i drive a 2005 dodge ram 1500 5.7L and yesterday it took a minute to start it then, later i was driving it and it just died out of no where. i went to autozone and got a code read and all that came up was a crankshaft positioning censor and i just replaced that.
Double check if the wire connector of crank positioning sensor is securely connected and is latched properly. Else, you will have to take to the auto parts store where you bought it and have it check ( the sensor itself). Another possible problem is a bad connector wires. Bad wires are often hard to detect, because of its external appearance. Copper wire strands can corrode and then break overtime.