DTC P0345: Left Side Camshaft 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 CMP sensor and PCM harness connectors at in-line harness connector "X-25".