FWIW, I just went through this. I couldn't find an experience like mine already documented here, so this is more for posterity than anything else.
I had P0335 and P0727 on my 11/99 528iT (m52TU and A5s360r).
When you have your CKP (crankshaft sensor) out, with the air channel and the microfilter housing removed and a strong flashlight, you can see down the hole in the block through which the CKP is mounted.
Put a ratchet on the crank on the front of the motor.
While peering into the CKP hole, turn the crank (from the front of the car, clockwise) and look at the teeth on the impluse sending wheel. There should be a space where the teeth are absent, about the size of 2-3 minutes on a clockface, that is normal. If there is more than one spot without teeth, or if the toothless spot is large and/or has broken, jagged edges, the most likely scenario is a broken/damaged impulse sending wheel.
This was the case for me. To get to it, the motor has to come out, and by the time you tear down the engine to get to the crank, you might as well just put in a good quality lower mile used motor instead of replacing the bleepin' $40 impulse wheel.