Get an OBDII dongle from e bay & the free or netter buy the torque app.
My 3l Roadster still does this from time to time especially if the car is hot then stopped for a short time & restarted. This of course is fun for MOTs.
I don't think even disconnecting the battery will wipe the error code.