P0340 means cam sensor located at head cylinder bank 1 passenger side. Nissan 2008 xterra 4 0l v6 ignition camshaft position sensor. You can t miss it.