File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ static int RAMFUNCTION nvm_select_fresh_sector(int part)
268268 }
269269 }
270270finish :
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 ) {
Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments