It is my understanding that bankruptcy will not get you out of your HOA fees prior to the sale of your home.

Double check with your bankruptcy attorney.