Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 1226987

Browse files
committed
mspm0: Fix condition check whether flash erase command has finished
1 parent 22ea379 commit 1226987

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/target/mspm0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static bool mspm0_mass_erase(target_s *const target, platform_timeout_s *const p
387387
target_mem32_write32(target, MSPM0_FLASHCTL_CMDEXEC, MSPM0_FLASHCTL_CMDEXEC_EXEC);
388388

389389
uint32_t status = 0U;
390-
while (status & MSPM0_FLASHCTL_STAT_DONE) {
390+
while (!(status & MSPM0_FLASHCTL_STAT_DONE)) {
391391
status = target_mem32_read32(target, MSPM0_FLASHCTL_STATCMD);
392392
if (print_progess)
393393
target_print_progress(print_progess);

0 commit comments

Comments
 (0)