Cam Position sensor code

I keep getting a CEL with a code of P0340, Camshaft Position sensor. I have replaced both sensors, but still getting the same code. I read somewhere that it may be the alternator starting to fail and supplying too much AC voltage to these sensors. Does this sound right, or is it something else?

TIA, Mike