Skip to content

Add USER_BTN mapping to PA0 for BlackPill F401CC/F401CE boards #1144

Closed
@pawelsky

Description

@pawelsky

Since v1.2 BlackPill F401CC/F401CE boards have an user button (named "KEY") connected to PA0 added to the board. You can find more details about this board here

Please add the USER_BTN define mapping to PA0 for BlackPill F401CC and the proposed F401CE boards. That would be consistent with the already existing BlackPill F411CE USER_BTN mapping

I believe the following change in the Generic_F401Cx/variant.h file should do the job:

// On-board user button
#if defined(ARDUINO_BLACKPILL_F401CC) || defined(ARDUINO_BLACKPILL_F401CE)
#define USER_BTN PA0
#elif !defined(USER_BTN) && !defined(ARDUINO_GENERIC_F401CC)
#define USER_BTN PC13
#endif

Activity

added
duplicateThis issue or pull request already exists
on Apr 2, 2021
ABOSTM

ABOSTM commented on Apr 2, 2021

@ABOSTM
Contributor

Hi @pawelsky,
The BlackPill F401CC doesn't have KEY button.
The BlackPill F401CE have the button but this board is not yet supported.
So this issue correspond to the request to support BlackPill F401CE and thus is duplicate of #1143
BlackPill F401CE has already been add to the request list #722.
This is a community project, so any contribution to add this board is welcome (even if I would suggest to way for PR1091 to be merged first).
Thus I close this issue.

pawelsky

pawelsky commented on Apr 2, 2021

@pawelsky
Author

Hi @ABOSTM

There are revisions of F401CC that do have the key (photo of v3.0 attached), so I'd request this issue to be reopened.

STM32F401CCU6_with_key

added a commit that references this issue on Apr 2, 2021
72dd95f
ABOSTM

ABOSTM commented on Apr 2, 2021

@ABOSTM
Contributor

Ok I was not aware of this change in latest board revision.
Even if it could be considered as a different board, we decided to consider only 1 board in which USER_BTN is defined,
even if user button is only available on some board revisions.
It is implemented there:
fpistm@72dd95f
And it will be part of #1091
(thus no need to reopen this issue)

pawelsky

pawelsky commented on Apr 2, 2021

@pawelsky
Author

That makes sense. Thanks!

added this to the 2.0.0 milestone on Apr 2, 2021
added 5 commits that reference this issue on Apr 2, 2021
bc00769
85afcff
2b80db1
95703d4
ffb162c

9 remaining items

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

Metadata

Metadata

Assignees

Labels

duplicateThis issue or pull request already exists

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Add USER_BTN mapping to PA0 for BlackPill F401CC/F401CE boards · Issue #1144 · stm32duino/Arduino_Core_STM32