Skip to content

Commit

Permalink
unlock flash when updating partition state
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbland1 committed Dec 9, 2024
1 parent c06eda0 commit 3608cac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/update_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,15 @@ static int RAMFUNCTION wolfBoot_update(int fallback_allowed)
* we need to set to UPDATING, otherwise there's no way to tell the
* original direction of the update once interrupted */
else if ((inverse == 0) && (fallback_allowed == 1)) {
hal_flash_unlock();
#ifdef EXT_FLASH
ext_flash_unlock();
#endif
wolfBoot_set_partition_state(PART_UPDATE, IMG_STATE_UPDATING);
#ifdef EXT_FLASH
ext_flash_lock();
#endif
hal_flash_lock();
}

return wolfBoot_delta_update(&boot, &update, &swap, inverse, resume);
Expand Down

0 comments on commit 3608cac

Please sign in to comment.