This code can be related to either the cam or crank sensor. Pay attention to what you read next.
Setting code P0344 intermittently, causing it to run really poor and misfire.
Tests/Procedures: 1. Scope the Camshaft Position (CMP) sensor and Crankshaft Position (CKP) sensor signals.
2. If the signals look normal, check for a loose or jumped timing belt.
3. Check for any melted wiring around the CMP, repair as needed.
4. Remove the CMP and inspect the target magnet behind the sensor for any cracks. If any cracks are noted, then replace the magnet.
Just replacing the cam sensor might not fix it.
The cam sensor is at the back of the head behind the intake cam.