Did you check what error message you're getting back?
Are you using a safe write?
Are you writing to a reasonable flash data memory address?
Maybe you should post your code if you haven't solved it already.