Yes, a Chapter 13 bankruptcy will stop a foreclosure and will help you to set up a repayment plan to get back on track.  As long as you continue to make on-time payments during your Chapter 13 bankruptcy, you can permanently delay foreclosure.