I'd look at o2 sensors based on codes 25,26. Lean can cause a knock triggering code 12.
It could be other sensors like a maf sensor or such but something is causing you to run rich and lean.
It could be other sensors like a maf sensor or such but something is causing you to run rich and lean.