boot_spm_busy_wait();\r
\r
/* Write each of the FLASH page's bytes in sequence */\r
- for (uint8_t PageByte = 0; PageByte < SPM_PAGESIZE; PageByte += 2)\r
+ for (uint16_t PageByte = 0; PageByte < SPM_PAGESIZE; PageByte += 2)\r
{\r
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */\r
if (!(Endpoint_BytesInEndpoint()))\r