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
Exclude SWD pins from being initialised as pull up if unused. #9420
Exclude SWD pins from being initialised as pull up if unused. #9420
Conversation
Builds are failing for F405. Looks like we need some conditionals on the pins used? |
src/main/fc/init.c
Outdated
{ | ||
sdcard_init(sdcardConfig()); | ||
afatfs_init(); | ||
} | ||
#endif | ||
|
||
static void swdPinsInit(void) | ||
{ | ||
IO_t io = IOGetByTag(IO_TAG(PA13)); // SWDIO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEFIO_TAG_E
instead of IO_TAG
for targets that doesn't even define these pins as available in TARGET_IO_PORTA
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, fixed.
src/main/fc/init.c
Outdated
if (IOGetOwner(io) == OWNER_FREE) { | ||
IOInit(io, OWNER_SWD, 0); | ||
} | ||
io = IOGetByTag(IO_TAG(PA14)); // SWCLK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
b2d19bf
to
35cdb23
Compare
35cdb23
to
cd27b63
Compare
Building now. |
@jflyper: Are you happy with this now? |
Exclude SWD pins from being initialised as pull up if unused.
Exclude SWD pins from being initialised as pull up if unused.
This restores the functionality to what it was before #9398: No pull up is configured for the SWD pins if they are unused.