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

Commit 01a72ad

Browse files
committed
mspm0: Fix condition check whether flash erase command has finished
1 parent ffed005 commit 01a72ad

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

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

0 commit comments

Comments
 (0)