Please can somebody help me with this fault!

When starting out in my car, as soon as I reach 3000rpm my engine warning light comes on and the car runs in safe mode for the duration of that journey.

A diagnostic check shows this to be error code 52

knock sensor.

I replaced the knock sensor with a GM knock sensor from GTS Chris.

The problem still existed, I reset the ECU to clear all error codes and the warning light once again came on and the error code was 52.

I tested both knock sensors

(the original Toyota sensor and the GM sensor) by connecting an oscilloscope probe to the pin and monitoring the waveform whilst tapping the case of the sensor with an object.

A sharp pulse was seen on the scope during each tap so I presumed the sensors were working correctly.

I did a continuity check between the ECU pin and the knock sensor with it present in the engine and the link was good.

I connected a portable oscilloscope to the ECU pin for the knock sensor and ran the engine and ensured there was a waveform.

This waveform increased in amplitude as I revved the car and appeared to be constant.

The knock sensor first went a while back just before my engine rebuild

(my piston rings went).

The engine is now running perfectly after the rebuild apart from this fault.

This fault appears to be intermittent.

Sometimes I can drive the car and the warning light does not come on for the whole journey, other times the warning light will come on as soon as the car reaches 3000rpm.

I would really appreciate any idea or thoughts on how I can further diagnose or fix this.

Car

= 1996 Rev4 GTS Turbo