A knock sensor will usually hear a knock before you can. And normally the computer just retards the timing a little until the knock goes away. I was not even aware that it could put the computer into limp-home mode.
It can make the engine run really bad, if it keeps retarding the timing more and more. I suspect that that is what is happening.
I really do not think this is your problem, but I have heard of it happening, so I will throw it in.
I once knew of a fellow whose car only ran really bad when he was towing his small utility trailer.
Normally the car ran great, but let him hook the little single axle trailer up, and in just a few miles it was running terrible.
I heard about this from the mechanic who finally found the problem. He took it out for a run, and found no problems. Finally, after doing this several times, the guy finally mentioned that it only happened with the trailer hooked up.
He brought the trailer around, and as soon as it was hooked up and going down the road, the knock sensor started triggering, and the computer retarded the timing more and more.
Turned out he had a really loose and crappy bumper hitch. As soon as they started down a dirt road, the banging and slamming of the hitch and trailer triggered the knock sensor.
Fixed the hitch and it all went away.
J.