What will caused advanced timing?

I have a 2004 v6 3.9l mustang and the timing is advanced and causing the valves to ping/chatter once the car is warmed up. It’s really bad with 87 octane and not as bad but still present with 93. I have replaced the cam sensor, cam sycroniser assembly, and the crank sensor. The car is throwing a p1336 code and the cam assembly was set at tdc with the alignment tool that came in the box. All of the wiring seems fine and the problem is that turning the cam sensor does not change the timing. If anyone has any ideas of the can then please let me know, thanks.

From a GM TSB about crank sensors:

The interval between CKP sensor pulses is extremely small. At high engine speeds, slight variations in the following components make misfire detection difficult:

Crankshaft
Reluctor wheel
CKP sensor

The PCM learns variations during the Crankshaft Position System Variation Learning Procedure. The PCM compensates for these variations when performing detect misfire calculations. Only a scan tool can command the PCM to perform the Crankshaft Position System Variation Learning Procedure again.

Perform the learning procedure after the following actions:

A PCM replacement
Any operation or repair involving the crankshaft, the CKP sensor, or the CKP sensor to reluctor wheel gap relationship.
An engine replacement.
The ignition switch is in the ON position until the battery is drained.

Might need to find somebody with a Ford factory scan tool, or one that can parrot it, and have the crank sensor learn procedure done. This clearly applies to GM, but I can’t imagine Ford would be any different. This is me throwing spaghetti against the wall and hoping it sticks.

I’ve seen a bad connection to the “Knock Sensor” do that, but I don’t know if the 3.9 uses one.

It may not be a timing problem. If the valves are chattering, that isn’t a timing problem, it is a valvetrain problem.

Spark knock, or ping is ignition related and can be cause by a clogged EGR system or carboned-up combustion chambers or incorrect spark plugs. You don’t tell us much about the car - How many miles? Has it been modified in any way? Did the pinging only start after the repair or was the parts swap because of the pinging?

If you installed the sensors correctly, and that seems likely since you had the alignment tool, the spark timing is correct. Other things are causing the problem.

Is the check engine light still on? The P1336 causes are listed below;

  • Faulty Crankshaft Position Sensor
  • Crankshaft Position Sensor harness is open or shorted
  • Crankshaft Position Sensor circuit poor electrical connection
  • Signal plate may be damaged
  • Starter motor may be faulty
  • Starting system circuit
  • Dead or weak battery

Have you considered signal plate damage might be the problem? Not sure how the starter and starting system enters into this but it is listed on several sites.

I was reading about another potential cause that seems to have quite a few people experiencing- a failing alternator. Apparently there is even a TSB about it. You need to check the alternator output with an oscilloscope to see how much ripple it has and if one or more diodes are failing. When they do, it generates a lot of electrical noise which disrupts the PCM and it goes haywire. It starts throwing P1336 codes and can’t hold timing. Sputtering and loss of power symptoms. At any rate, if you have all the other suspects nailed and still having trouble, probably something to check. Here’s one example. If you keep reading, there’s also more possibilities regarding cam phasers etc good read- https://www.stangnet.com/mustang-forums/threads/the-infamous-cam-position-sensor-code-need-help.844877/

The p1336 code is now off since I used the alignment tool but the valves still ping. The egr valve is clean and it the egr lines aren’t clogged up. Also, there is no vacuum leak. The car has 125k miles and there are no mods and the pinging has slowly been getting worse and now it pings with 93 octane.