* Faulty ignition switch. The ignition switch is responsible for sending a signal to the engine control module (ECM) that it's okay to start the engine. If the ignition switch is faulty, it may not be able to send this signal, which will cause the ECM to lock up the code.
* Faulty ECM. The ECM is the brain of the engine control system. It receives signals from various sensors and uses them to control the engine's operation. If the ECM is faulty, it may not be able to process these signals correctly, which can cause the code to lock up.
* Wiring problems. Wiring problems can also cause the code to lock up. If the wiring between the ignition switch and the ECM is damaged, the ECM may not be able to receive the signal that it needs to start the engine.
If you're experiencing problems with your 1997 GMC truck's code locking up, it's important to have it diagnosed by a qualified mechanic. They will be able to determine the cause of the problem and recommend the best course of action.