update uf2 to application only

This commit is contained in:
hathach
2018-06-21 20:53:24 +07:00
parent 9847a37599
commit fb6c6eb0b7
2 changed files with 3 additions and 3 deletions

View File

@ -248,7 +248,7 @@ void read_block(uint32_t block_no, uint8_t *data) {
} else {
sectionIdx -= NUM_INFO - 1;
uint32_t addr = USER_FLASH_START + sectionIdx * 256;
if (addr < FLASH_SIZE) {
if (addr < USER_FLASH_START+FLASH_SIZE) {
UF2_Block *bl = (void *)data;
bl->magicStart0 = UF2_MAGIC_START0;
bl->magicStart1 = UF2_MAGIC_START1;