There are two main causes for the P0340 code:
1. The camshaft position sensor has failed. 5/60 warranty only. No
2. The camshaft is out of time. If you're the original owner, this is
possibly covered under the 10/100 warranty, depending on what caused the
problem, and, if it's the timing belt, whether the timing belt is more
than 4 years/60k miles old. Chances are, if your camshaft is out of time,
it was caused by improper timing belt installation (the responsibility of
the installing repair facility-- not covered by the factory warranty), or
the timing belt is old.
The vehicle will run almost normally if the camshaft sensor has failed.
But, if something else has caused the code, the possibility remains that
things could get worse.