The PCM uses information sent to it by the sensors to control injector on-time as well as ignition timing. The wrong fuel map will not cause pre-detonation. It seems as though one of the sensors is out of range, causing inaccurate timing. If the knock sensor was working properly, the PCM should have retarded the timing and thrown a code.