The engine should normally idle at approx. 750 rpm, and the dips down to 600 rpm may be low enough to trigger a CEL.
The loose battery cables probably wiped out the ECU's idle strategy, and now it has to re-learn the idle, which is causing it to dip to 600 rpm. Driving 20-50 miles should be sufficient to allow the ECU to re-learn the idle, and stabilize it at 750 rpm.
There's also a procedure in the battery maintenance section of the owner's manual that may expedite the idle re-learning process.
The loose battery cables probably wiped out the ECU's idle strategy, and now it has to re-learn the idle, which is causing it to dip to 600 rpm. Driving 20-50 miles should be sufficient to allow the ECU to re-learn the idle, and stabilize it at 750 rpm.
There's also a procedure in the battery maintenance section of the owner's manual that may expedite the idle re-learning process.