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

Commit 7d51c11

Browse files
committed
mspm0: Fix condition check whether flash erase command has finished
1 parent 9007cab commit 7d51c11

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

285285
uint32_t status = 0U;
286-
while (status & MSPM0_FLASHCTL_STAT_DONE) {
286+
while (!(status & MSPM0_FLASHCTL_STAT_DONE)) {
287287
status = target_mem32_read32(target, MSPM0_FLASHCTL_STATCMD);
288288
if (print_progess)
289289
target_print_progress(print_progess);

0 commit comments

Comments
 (0)