Open
Description
HELLO !
When I connect the target, the cpu is still working, and I want to stop the cpu. This function cannot be realized.
I hope you can help me.
static uint8_t swd_wait_until_halted(void)
{
// Wait for target to stop
uint32_t val, i, timeout = MAX_TIMEOUT;
for (i = 0; i < timeout; i++) {
if (!swd_read_word(DBG_HCSR, &val)) {
return 0;
}
if (val & S_HALT) {
return 1;
}
}
return 0;
}
Metadata
Metadata
Assignees
Labels
No labels