Arduino_core_stm32: Add USER_BTN mapping to PA0 for BlackPill F401CC/F401CE boards

Created on 15 Aug 2020  路  4Comments  路  Source: stm32duino/Arduino_Core_STM32

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

Duplicated

Most helpful comment

That makes sense. Thanks!

All 4 comments

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.

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

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:
https://github.com/fpistm/Arduino_Core_STM32/pull/12/commits/72dd95fcc6c91b9ac94c0b97234161ff85554a8b
And it will be part of #1091
(thus no need to reopen this issue)

That makes sense. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Pararera picture Pararera  路  5Comments

kwastek picture kwastek  路  4Comments

fivdi picture fivdi  路  6Comments

davidanger picture davidanger  路  6Comments

ghent360 picture ghent360  路  5Comments