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

Commit 38a598b

Browse files
committed
mspm0: Fix condition check whether flash erase command has finished
1 parent 56055aa commit 38a598b

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
@@ -389,7 +389,7 @@ static bool mspm0_mass_erase(target_s *const target, platform_timeout_s *const p
389389
target_mem32_write32(target, MSPM0_FLASHCTL_CMDEXEC, MSPM0_FLASHCTL_CMDEXEC_EXEC);
390390

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

0 commit comments

Comments
 (0)