If in fact the error code for crankshaft positioner is correct it may be either the sensor or possibly a bad connection. Check the position sensor, I think there was some mention of that being a possible problem because some of them worked loose. The engine would run rough and erratic and if I'm remembering right it was traced back to a loose crankshaft position sensor. I'm quite sure if the sensor doesn't find the crank in the correct position in relation to the cam sensor etc. it would shut off to save the engine, logic being if it gets too far off valves may hit pistons, injection timing will be wrong and cause other problems, so It may think its doing you a favor by shuting off.
02 2500HD LT D/A SB CC 4X4 BLACK, Westin stainless nerf bars, BW GN Hitch,Racor 60S post oem fuel filter, Oil Guard bypass engine oil Filter. All synthetic fluids. Kennedy boost valve, edge, Modified air intake,EGT & Boost digital gauge,TransferFlow combo fuel & tool box, Air Lift Suspesion Bags Rear & compressor with remote, Bilsteins front & rear, Frontier front replacement bumper.