The problem may be related to the battery, not the car itself. Regardless, you can take your car to Autozone and have the codes read for free. This should help you narror down why this is occuring.
This is most likelya code being thrown for an O2 "Oxygen" sensor. If your catalytic converter is clogged, or you're EGR valve is misfunctioning, it will continue to throw the code.