P0066 Mazda Sw-x is defined as Knock Sensor Circuit Range Performance (Bank 1 or Single Sensor). This refers to camshaft timing, which in this case is over-retarded. The spark should have a light tan color. If the sensor probe comes with white and chalky parts, this means it has been lagging between switching phases, and should be replaced.
Possible Causes :
It should be pretty close to battery voltage (12 volts). If not, then this is the circuit that has the problem. Look for missing ground strap or a rusty ground where the fuel tank is grounded to the frame. Check for damage to the wiring harness connector. If the engine displays a miss and there wasn't a code, determine which cylinder is misfiring. If the exhaust manifold is visible, spay or pour a small amount of water on each cylinder exhaust port. Water will evaporate immediately on good cylinders and slowly on the missing cylinder. If this can't be accomplished pull the plugs and check the condition.
Diagnostic trouble code P0066 Mazda Sw-x is not difficult to diagnose and repair. Thus, it always pays to have a qualified technician to look after your vehicle should this error code arise.
Diagnosing this code requires the engine to be in good running shape, without unmetered air entering the engine. If other codes that relates to misfiring condition, lean running or air entering the engine is present, then you must first fix those error codes before P0066 Mazda Sw-x.
Fortunately, P0066 Mazda Sw-x is a fairly common OBD code, meaning that it applies to all makes and models of vehicles made after 1996.