for (uint16_t i = 0; i < SECTOR_SIZE_BYTES; i += 2)
{
if ((WriteFlashAddress % SPM_PAGESIZE) == 0)
{
/* Erase the given FLASH page, ready to be programmed */
for (uint16_t i = 0; i < SECTOR_SIZE_BYTES; i += 2)
{
if ((WriteFlashAddress % SPM_PAGESIZE) == 0)
{
/* Erase the given FLASH page, ready to be programmed */