Skip to content

Commit dfb0173

Browse files
committed
ch32f1: Fixed hanging gdb load command for CH32F103C8T6 MCU's
1 parent 82a0581 commit dfb0173

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/target/ch32f1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static bool ch32f1_flash_busy_wait(target_s *const target)
219219
static bool ch32f1_flash_eop_wait(target_s *const target)
220220
{
221221
uint32_t status = CH32F1_FLASH_STATUS_EOP;
222-
while (status & CH32F1_FLASH_STATUS_EOP) {
222+
while (!(status & CH32F1_FLASH_STATUS_EOP)) {
223223
status = target_mem32_read32(target, CH32F1_FLASH_STATUS);
224224
if (target_check_error(target)) {
225225
DEBUG_ERROR("ch32f1 flash write: comm error\n");

0 commit comments

Comments
 (0)