Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Nucleo L432KC]USER_BTN is a misleading alias for pinD9 #1726

Closed
Assignees
ABOSTM
Labels
invalidThis doesn't seem right
@zfields

Description

@zfields

Describe the bug

There is only one button on the Nucleo L432KC, yetUSER_BTN is defined in thevariant file.

Based on my tinkering, I would say theUSER_BTN is "pressed" by triggering the accelerometer. While I can see this as a handy feature, I think it is very misleading to call itUSER_BTN, instead ofACCEL_PIN (or something of that nature).

To Reproduce

Complete source code which can be used to reproduce the issue. Please try to be as generic as possible (no extra code, extra hardware,...)

#define BUTTON USER_BTN // no user button available (triggered by accelerometer event)// #define BUTTON 3 // behaves as expected with external momentary push buttonvolatile bool isr_fired = false;void buttonISR () {    isr_fired = true;}void setup () {    ::pinMode(LED_BUILTIN, OUTPUT);    ::pinMode(BUTTON, INPUT);    ::attachInterrupt(digitalPinToInterrupt(BUTTON), buttonISR, FALLING);}void loop () {    if (isr_fired) {        isr_fired = false;        ::digitalWrite(LED_BUILTIN, HIGH);        ::delay(250);    }    ::digitalWrite(LED_BUILTIN, LOW);}

Steps to reproduce the behavior:

  1. Plug
  2. Press USER_BTN (i.e. move or tap board)
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

From theProduct Overview Page:
image

Desktop (please complete the following information):

  • OS: Linux
  • Arduino IDE version: 1.8.19
  • STM32 core version: 2.2.0
  • Tools menu settings if not the default: defaults
  • Upload method: Mass Storage

Board (please complete the following information):

  • Name: Nucleo L432KC
  • Hardware Revision: ?
  • Extra hardware used if any: N/A

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

invalidThis doesn't seem right

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp