Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

SWDIO Signal High by default #11

Answered by majbthrd
fabianhugo asked this question in Q&A
Discussion options

You must be logged in to vote

You're welcome.

line 43 of main.c calls the function DAP_Setup(); this is some of the earliest code to run.

Said function can be found in ./bsp/target/DAP_config.h where target is the name of the target you are compiling for (e.g. rp2040, stm32f072disco, etc.).

You could modify this to initialize the pins however you want to for your application. Consult the RP2040 datasheet, not me, on the GPIO peripheral (Chapter 19) specifics.

I'll just point out that if you are depending on the debugger to control SWDIO so that the board operates, then perhaps the board design needs to be improved? What should make configuring the pins as inputs "safe" is that it should be equivalent to the SWD connec…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fabianhugo
Comment options

Answer selected by fabianhugo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants