If didn't have the stalling prior of disconnecting the battery
need to drive it so PCM relearn idle
also I have this TSB check if its applies to your condition
ENGINE STALLS WHEN DRIVING AT LOW SPEED
TECHNICAL SERVICE BULLETIN
Reference Number(s): 01-003/08, Date of Issue: February 11, 2008
Superceded Bulletin(s): 01-022/07, Date of Issue: June 20, 2007
Related Ref Number(s): 01-003/08, 01-022/07
This bulletin supersedes the previous bulletin issued on 02/07/08. The REPAIR PROCEDURE has been revised.
2004-2005 Mazda3 vehicles
2006-2007 Mazda5 vehicles with VINs lower than JM1CR**** ** 150779 (produced before February 1, 2007)
2005 Mazda6 vehicles with 3.0L
2006-2007 Mazda6 vehicles 2.3L (except Mazdaspeed6) produced before February 5, 2007
Some vehicles may experience engine stall when driving at low speed and the accelerator pedal is lightly depressed, then released. The engine can be restarted. The PCM software has been revised to eliminate this concern.
Customers having this concern should have their vehicle repaired using the following repair procedure.
Reboot the IDS to clear memory before reprogramming.
Using IDS 52.3 or later software, reprogram the PCM to the latest calibration (refer to CALIBRATION INFORMATION table) by following the Module Reprogramming procedure.
NOTE:Always update the IDS tool first, then follow on-screen instructions to download the needed calibration file for PCM reprogramming.
It is not necessary to remove any fuses or relays during PCM reprogramming when the IDS screen prompts you to do so. You may accidentally stop power to one of the PCM terminals and cause the PCM to be blanked, or you may receive error messages during the IDS reprogramming procedure.
IDS shows the calibration part numbers after programming the PCM.
Please be aware that PCM calibration part numbers and file names listed in any Service Bulletin may change due to future releases of IDS software, and additional revisions made to those calibrations for service related concerns.
When reprogramming a PCM, IDS will always display the latest calibration P/N available for that vehicle. If any calibration has been revised/updated to contain new information for a new service concern/issue, it will also contain all previously released calibrations.
When performing this procedure, we recommend that a battery charger be installed on the vehicle battery and turned ON to a maximum charge of no more than 20 AMPS to keep the vehicle battery up to capacity. If you exceed 20 AMPS, it could damage the VCM.
After performing the PCM reprogramming procedure, verify the repair by starting the engine and making sure there are no MIL illumination or abnormal warning lights present.
NOTE:If any DTCs should remain after performing DTC erase, diagnose the DTCs according to the appropriate Troubleshooting section of the Workshop Manual.
After PCM reprogramming, it is no longer necessary to road test the vehicle to relearn KAM (Keep Alive Memory).
Fill out an Authorized Modifications label (P/N 9999-95-AMDC-97) with the new PCM calibration information, your dealer code, and today's date.
Place the Authorized Modifications label on the A pillar below the tear tag in the driver door jamb.
Tuesday, October 20th, 2009 AT 5:57 AM