FHA's minimum credit score for their 3.5% down payment program is a 580. You are just slightly below that so it is likely that with a little work you could improve that score to the minimum 580. With that being said each lender has overlays that restrict the mortgage loans they are willing to do even further. Some require a 620 or 640 credit score. Beyond the credit score is also the credit guidelines. Here is an example:
I worked with a customer who had a 710 credit score. At first glance this looks to be a well qualified buyer based on score alone. When I looked further at the credit they had a short sale (pre-foreclosure sale) just less than 2 years ago. This particular customer was looking at a 20% down payment using conventional financing. Conventional guidelines state that with a 20% down payment a customer with a pre-foreclosure sale can purchase again after 2 years since the sale of the home. They were very close to the 2 year mark so we waited for that date and got them approved to purchase.
The key is finding a qualified mortgage lender who understands how to review your situation and find solutions for you (if not immediately at least provide a plan for you).