issues is bad/dirty wave form or signal from sensor, esp B2.
B2 is driver side
Check alternator DIODES !! google for a tutorial if needed.
check any secondary wires near CMP.
Tell us any modifications, added electrical devices aftermarket BS?
Blah Blah Blah
The Powertrain Control Module (PCM) monitors the Camshaft Position (CMP) sensor for a noisy signal. Note: Harness routing, harness alterations, incorrect shielding, or electrical interference from other systems may have an intermittent impact on the CMP signal.
You will notice two ignition transformer capacitors in line with both cam sensors. Make sure those are intact and not damaged. Ford also uses terms such as radio interference capacitors. If those are ok, suspect bad phasers and or loose timing chain due to leaking tensioners which are oil pressure loaded.
Very, very very common problem on these 54.l 3v engines. These engines, again, are notorious for this.
Here is where you will find the capacitors. They are mounted on a stud bolt upper portion of timing chain front cover.
If both of those are in good condition, highly suspect back timing chain tensioner and or phasers.
Its a good job to do, but doable without lifting the truck.
Kits are available for cheap on e-bay or amazone.
I usually tell my clients to go with this sort of kit as going in there is labour intensive. I even comes with the CVT actuators and all.
Not to discourage, but I do this in shop in about 10 hours for the whole kit replacement. I have done about 50 or 60. Probably more. I hate these engines.
But for the uninitiated, this could well go into the 14hrs - 20hrs. Will need new gaskets for valve covers and front cover. Those are not included in link I provided. Coils need to come off so might as well put in new spark plugs seeing the mileadge it has. Like I said, typical for the mileadge this truck has. Worse engine ford ever made. Just google a bit, tons of horror stories on the net.
Very rare for both cam sensor to go at once, look more to a timing chain phaser problem.
You will also need a puller for the crank balancer, easily rented out at auto zone.
One thing I would try first, flush engine oil with a good know detergent such as wyns/risolene etc. Use synthetic oil only after. But if the gaskets of the tensioners failed (which they always do) won't help. If phasers are worn, need to replace those.