I take it you are referring to idle. The P/N input to the ECM is used, there are two idle speed tables. One for in drive and the other for P/N.
The two tables of desired idle speed is based on the engine coolant temperature (CTS). So an incorrect CTS reading will affect the idle speed.
RemoveBeforeFlight