Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interface / dap / swd_init() improvements #357

Open
cederom opened this issue Nov 29, 2017 · 2 comments
Open

interface / dap / swd_init() improvements #357

cederom opened this issue Nov 29, 2017 · 2 comments

Comments

@cederom
Copy link
Contributor

cederom commented Nov 29, 2017

uint8_t swd_init(void)
{
    //TODO - DAP_Setup puts GPIO pins in a hi-z state which can
    //       cause problems on re-init.  This needs to be investigated
    //       and fixed.
    DAP_Setup();
    PORT_SWD_SETUP();
    return 1;
}

This function is called several times, during the run, for instance as Target Reset mechanism.. maybe we could use simple flag that marks port already initialized so no need to reinitialize.. or use function that could optionally force port reinitialization? :-)

@flit
Copy link
Collaborator

flit commented Nov 30, 2017

I've had similar thoughts. Seems silly to completely reinit the port and everything multiple times, when all we want to do is ensure that the port was inited previously.

Also, take a look at #189. While not directly related, it's in the same init/shutdown functional area of swd_host.

@cederom
Copy link
Contributor Author

cederom commented Nov 30, 2017

Thanks @flit :-) As for now I am focusing on RESET sequences, but noted this TODO as next goal :-) Thanks for the important reference to #189 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants