Skip to content

Commit ef5ef95

Browse files
committed
fix comments
1 parent 3608cac commit ef5ef95

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libwolfboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static int RAMFUNCTION nvm_select_fresh_sector(int part)
268268
}
269269
}
270270
finish:
271-
/* Erase the non-selected partition */
271+
/* Erase the non-selected partition, requires unlocked flash */
272272
addrErase -= WOLFBOOT_SECTOR_SIZE * (!sel);
273273
if (*((uint32_t*)(addrErase + WOLFBOOT_SECTOR_SIZE - sizeof(uint32_t)))
274274
!= FLASH_WORD_ERASED) {

src/update_flash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,8 @@ void RAMFUNCTION wolfBoot_start(void)
947947
#endif
948948

949949
#ifdef NVM_FLASH_WRITEONCE
950-
/* nvm_select_fresh_sector needs unlocked flash in cases where */
950+
/* nvm_select_fresh_sector needs unlocked flash in cases where the unused
951+
* sector needs to be erased */
951952
hal_flash_unlock();
952953
#ifdef EXT_FLASH
953954
ext_flash_unlock();
@@ -958,7 +959,6 @@ void RAMFUNCTION wolfBoot_start(void)
958959
updateRet = wolfBoot_get_partition_state(PART_UPDATE, &updateState);
959960

960961
#ifdef NVM_FLASH_WRITEONCE
961-
/* nvm_select_fresh_sector needs unlocked flash in cases where */
962962
hal_flash_lock();
963963
#ifdef EXT_FLASH
964964
ext_flash_lock();

0 commit comments

Comments
 (0)