DTC P0335: Crankshaft Position Sensor Circuit - Malfunction: Notes
WARNING: This page is about a different car, the 2003 Mazda 6. However, it is still accessible from the selected car via links, so may be relevant.
NOTE:
Wire color changes between CKP sensor and PCM harness connectors at in-line harness connector "X-25".