Skip to content

Commit 30b40eb

Browse files
authored
add side effect to the infinite loop to avoid a LLVM bug
1 parent 905629f commit 30b40eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/peripheral/scb.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,8 @@ impl SCB {
613613
SCB_AIRCR_SYSRESETREQ // set the bit
614614
) };
615615
::asm::dsb();
616-
loop {} // wait for the reset
616+
loop { // wait for the reset
617+
::asm::nop(); // avoid rust-lang/rust#28728
618+
}
617619
}
618620
}

0 commit comments

Comments
 (0)