That's normal. Code 51 flashing confirms the TPS idle switch is open when the pedal is pressed. If 51 was constantly flashing without pressing the pedal, then it would indicate a fault with either the TPS or wiring beteen the TPS and ECU, or worst case scenario a faulty ECU.