Disconnecting the battery for 1/2hr will reset codes. This can be verifying by the fact the light didn't display for 20 minutes.
Pinging is caused when combustion temps get so hot that cylinders begin to fire BEFORE they're supposed to. They fire before the intake valve closes to finish inputting the gas/air mixture. With a premature explosion, the valves get SLAMMED back shut (causing a ping which is not good if done too many times.) To prevent engine damage from this phenomenon, engineers came up with the EGR system....
This EGR system typically has a tube coming from the exhaust manifold. That tube is nothing more than a pathway for exhaust to get back into your intake. And the EGR itself, is an electronic gateway for that pathway. When you "open that door" pressure changes in the manifold -- just like it changes when you open a window in a moving car.
The EGR valve valve sends (uses) a small amount of exhaust fumes to dilute/quench the intake charge. In doing so, it doesn't burn as hot and prevents detonation (pinging).
When the MAP doesn't show a pressure change (during an EGR cycle), the ECM has to assume it's malfuntioning. With this logic, I have to assume the MAP is bad, the EGR is bad, or the EGR pathway is plugged up.
Considering that the ECM (computer) checks manifold pressure during a recirculation cycle (to determine if the EGR is working), I think the next best course of action is to replace the MAP (manifold air pressure) sensor and/or EGR (exhaust gas recirculating) passageway(s).
Take this knowledge and the test chart provided by deermagnet. If you are capable, this should direct you to your problem.
Good luck!