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

Exclude SWD pins from being initialised as pull up if unused. #9420

Merged
merged 1 commit into from Jan 31, 2020

Conversation

mikeller
Copy link
Member

This restores the functionality to what it was before #9398: No pull up is configured for the SWD pins if they are unused.

@mikeller mikeller added this to the 4.1.4 milestone Jan 27, 2020
etracer65
etracer65 previously approved these changes Jan 27, 2020
@etracer65
Copy link
Member

Builds are failing for F405. Looks like we need some conditionals on the pins used?

{
sdcard_init(sdcardConfig());
afatfs_init();
}
#endif

static void swdPinsInit(void)
{
IO_t io = IOGetByTag(IO_TAG(PA13)); // SWDIO
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, fixed.

if (IOGetOwner(io) == OWNER_FREE) {
IOInit(io, OWNER_SWD, 0);
}
io = IOGetByTag(IO_TAG(PA14)); // SWCLK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@mikeller
Copy link
Member Author

Building now.

@mikeller
Copy link
Member Author

@jflyper: Are you happy with this now?

@mikeller mikeller merged commit 971a89e into betaflight:master Jan 31, 2020
@mikeller mikeller deleted the exclude_swd_pins_from_pullup branch March 23, 2020 11:35
mikeller added a commit that referenced this pull request Mar 23, 2020
Exclude SWD pins from being initialised as pull up if unused.
@mikeller mikeller modified the milestones: 4.1.4, 4.1.6 Mar 23, 2020
mikeller added a commit that referenced this pull request Mar 28, 2020
Exclude SWD pins from being initialised as pull up if unused.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants