I'm driving 12volt toy motor using L293D driver. Initially first 10 times it worked well but after 10 times it has chattering problem. after restart the micro controller, if I enable the button once it is running bidirectionally randomly, even after revealed the button. I have directly connected arduino to the driver chip without any circuits. Is it happening because of reverse current? Can you tell me how to suppress reverse current? Thank you.
Nothing to do with reversing the current and everything to do with the interference the motors kick out.
Use a separate power supply, if that cures the problem you could look at power supply decoupling methods.