i do not know which version of the bootloader was used in your product.
but early version do not protect against overwriting the boot area.
later versions have :
[code:1:b599d3d237] If Page < Maxpages Then 'only if we are not erasing the bootspace
Page = Page + 1 'next page
Spmcrval = 3 : Gosub Do_spm ' erase next page
Spmcrval = 17 : Gosub Do_spm ' re-enable page
Else
Portd.7 = 0 : Waitms 200
End If
End If
[/code:1:b599d3d237]
here the number of pages is checked and it is not possible to erase too many pages. but it could be something else as well.
i have seen chips with damages flash that worked fine after reloading the firmware.
↧