ARMmbed / ARMmbed/DAPLink

pyocd hw reset does not work because pins are not configured

Open
#784 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
2.8k
Forks
1.1k
Avg merge
3d 12h
Merged PRs (30d)
1

Description

Using pyocd (version 0.29.0) with a DAPLINK board (sam3u2c-based) to reset a module using 'hw' does not work, the commands it issues to the target are (using `pyocd reset -t nrf52 -m hw`):

1. DAP_Info
2. DAP_Info
3. DAP_Info
4. DAP_Info
5. DAP_Info
6. DAP_SWJ_Clock
7. DAP_SWJ_Pins
8. DAP_SWJ_Pins
9. DAP_Disconnect

When it comes to setting the pin status, this entirely fails because the pins are inputs, not outputs, it seems to be missing a call to DAP_Connect so that the pins can be configured as outputs. DAP_Disconnect sets pins as inputs (their default state) too.

I've also logged what the sw reset does and it works but seems to have a problem also in that it doesn't clean up, the list of actions is too long to post but it essentially does DAP_Connect, some SWJ and SWD functions, a lot of transfer functions then just ends without running DAP_Disconnect and leaves the pins active as outputs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.