The P1345 Code is a cam/Crank correlation code, It usually sets when the Distributor has been installed incorrectly. Base Timing is all you can set on the Vortec 5.7, To do this you need to look at the Cam Retard it needs to be 0* +/- 2* but you must raise engine RPM's above 1500 for it to read correctly. I would suggest NOT to buy a cap and Rotor atleast not with out pulling the distributor to inspect the Drive gear, they are notourios for wear and also will cause these conditions.
There are 2 little notches or arrows in the inside of the dist. housing, roate the crank untill the Rotor is pointing to the first one (towards the front of the distributor, The other notch is for the 4.3) When the rotor is pointing to the notch in the distributor take notice to how the timing marks is alighned on the front of the engine, When everything is aligned correctly your P1345 code will only set if, 1. the cam sensor is faulty, 2. the crank sensor is faulty, 3. the drive gear on the distributor is worn. ALL of which can cause the tach to read Incorrectly.
If the distributor is worn DO NOT WASTE YOUR MONEY ON A REMANED ONE, the parts stores sell they are crap, you can actually get a new aftermarket one that is aluminum off of ebay for 1/2 the price as the parts stores, it also will come with a quality cap and rotor with Brass terminals. Heres a link to the SAME distributor that i use for ALL my vehichles and customers, hell a quality cap and rotor at the parts store will cost this much. i will try to upload the proper install instructions for a distributor if you need them.