This repository was archived by the owner on Mar 7, 2026. It is now read-only.
Fix: platforms/blackpill-f4: invert state of SET_IDLE_STATE#1645
Merged
dragonmux merged 1 commit intoblackmagic-debug:mainfrom Oct 18, 2023
Merged
Conversation
… to be pulled low to turn LED on
Contributor
Author
|
@dragonmux, as this is a fix for an existing issue with the blackpill-f4 platforms, can it also be included in the v1.10.0 release? |
dragonmux
approved these changes
Oct 18, 2023
Member
dragonmux
left a comment
There was a problem hiding this comment.
Good catch! Given how simple this fix is, and how low risk, we're going to merge this as part of v1.10.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detailed description
This pull request fixes the issue that LED_IDLE_RUN is not working on the blackpill-f4 platforms when it is assigned to PC13, the onboard LED. The issue is caused by the need to set PC13 to low to turn the LED on, rather than to set PC13 to high to turn the LED on.
The root cause of this is the schematic of how the LED is connected to PC13:
3.3v -> R 1k -> Blue LED -> PC13 (reference).
This pull request fixes the issue described, by inverting the state used by for SET_IDLE_STATE. This results in setting PC13 to low when the state is true, and PC13 to high when the state is false. This is exactly the behavior needed to turn the LED on when the state is true.
Your checklist for this pull request
make PROBE_HOST=native)make PROBE_HOST=hosted)Closing issues
This issue is a partial fix to #1516