Skip to content

CPU Can't stop #1072

Open
Open
@ssyqwer

Description

@ssyqwer

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions