+1 ^^^
All fuel injection computers have a REV Limiter, it is active when speedometer is at 0 MPH, or when transmission is in "Neutral"
In 1997 with an automatic there is a DTR(digital transmission range) sensor on the drivers side of transmission on the shifter
It tells computer what "gear" transmission is in, Park and Neutral setting would have REV limiter active
If you have a manual transmission then a Clutch Pedal switch is used, switch is on the clutch pedal push rod, when pedal is down REV limiter is active, or at 0 MPH
Computer is connected to the VSS(speed sensor) not speedometer, so speedometer could work but computer thinks speed is 0 MPH, but computer will set a P0500 code if its not getting a speed signal
Other causes
Dirty fuel filter, limits fuel flow, so limited RPM
Partially clogged exhaust system, exhaust can't get out so new air/fuel can't come in, so limiter RPMs