Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pyocd/target/family/target_nRF54L.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ def check_flash_security(self):
if self.session.options.get('auto_unlock'):
LOG.warning("%s APPROTECT enabled: will try to unlock via mass erase", self.part_number)

self.mass_erase()
if not self.mass_erase():
LOG.error("%s: mass erase failed", self.part_number)
raise exceptions.TargetError("unable to unlock device")
# Cached badness from create_ap run during AP lockout prevents memory accesses
# through the AHB-AP from succeeding.
self._discoverer._create_1_ap(AHB_AP_NUM)
self.fixup_rom_base()
else:
LOG.warning("%s is not in a secure state", self.part_number)

Expand Down
Loading