System Description
WARNING: This page is about a different car, the 2005 Toyota 4Runner. However, it is still accessible from the selected car via links, so may be relevant.
The ECM uses signals from the output shaft speed sensor and input speed sensor to detect the actual gear position (1st, 2nd, 3rd, 4th or 5th gear).
Then the ECM compares the actual gear with the shift schedule in the ECM memory to detect mechanical problems of the shift solenoid valves, valve body or automatic transmission (clutch, brake or gear, etc.).