You have an issue with the crankshaft sensor.
P0320 is loss of crank signal
P1391 is intermittent loss of crank sensor signal, both related
Most likely needs a new crankshaft sensor or possibly has poor connection at the connector.
The sensor is bolted to the top of the cylinder block near the rear of right cylinder head Crankshaft Position Sensor
could this senser cause the vehicle to run very poor untill driven and warmed up about 15-20 min in morning/ not as long, in the afternoon. once warmed up runs very well but my gas mileage is 10 mpg. i also should have mentioned that i parked this truck about 7 months ago and when i ran it this problem was there but not when i parked it not sure if that maters or not
With the codes you have being so specific, this should take care of it. If you still have issues, don't hesitate to contact me again.