Sudden rpm drop

After about 5 minutes of driving, the rpm’s would suddenly drop about 1,000 rpm and then bounce back and drop and bounce again in a second, and then do the same thing about 5-10 seconds later. It did this until it died in the parking lot. It did the same thing after 5 minutes when I tried driving it home about 2 hours later. My car is a 2000 Toyota Camry I got a little less than a year ago and I haven’t had any trouble with it at all before this. I haven’t driven it in a week and a half because of ice and snow. I made a shorter trip to the store about an hour before this without any trouble, but I might have bumped something underneath getting back in the driveway after that. Any ideas? Thanks!

Is the engine actually slowing down that much or is it just the gauge?

Is the ‘Check Engine’ light (CEL) on? If so, get the codes read, and post back here. If it is flashing, get it towed to a shop. Do not drive it if the CEL is flashing. Expensive damage can result.

Yes, the engine is actually slowing down, as if I suddenly let up on the gas and stepped on the pedal again.

The check engine light only came on a second before it died (maybe both times; at least it did it the first time). It wasn’t on any other time.

Since the CEL had come on, would it have saved that code?

Yes.