2002 Nissan Quest starts and idles fine give it gas and has no power and misfires

I have a 2002 Nissan Quest. It starts fine, idles great. But, when I try to accelerate, the car bogs, hesitates, misfires and I get p0300 random misfire, p0325 knock sensor. I get no dtc when it is just idling. The fuel pressure is fine, regulator works good, the cam sensor is clean, the coil tests good, the compression is good, as are the wires, cap and rotor.

Well, it seems to me that you probably want to check the wiring to the knock sensor, find out the resistance specs on the sensor, and check that and if the wiring checks out ok then replace the knock sensor. Its a major input to the engine timing, so it it goes out of whack the timing is all out of whack.

You might check the connection, wiring, and operation of the Throttle Position Sensor. This sensor tells the ECM that the throttle is in transistion; to go to open loop; enrichen the mixture; and go to open loop acceleration parameters.

Hope this helps.