I was driving my e46 m3 earlier and out of nowhere it started misfiring on at least one of the cylinders. I had been driving it for about 30 minutes already before it started misfiring. Check engine light came on same time as misfire. It started right around when I was going up the same hill I always go up on my way home (about a mile long hill not very steep but a slight incline). Once I started going back down the hill it started running normal again and the check engine light went away. I continued to drive it back home (up and down more hills) without any issues, although it did feel like it didn’t have as much power as usual but that could just be in my head. It was a dry sunny day so definitely no water got anywhere. What is happening?