I doubt the fuel camp would cause knock sensor code.
I would say dirty combustion chambers or possibly fuel filter.
I would get some Chevron Techrolene(sp). Put enough in according to bottle(s). This should or has in my case cleaned the injectors, valves and plugs.
Next item would be a bad or failing coil pack.
Bud
USAF Retired
Pace Arrow
2003 Chev Ice Road Tracker