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

Cannot use PG9 as digital pin with NUCLEO-H743ZI2 #1276

Closed
Labels
bug 🐛Something isn't working
Milestone
@pierremolinaro

Description

@pierremolinaro
  • OS: Mac OS X
  • Arduino IDE version: 1.8.13
  • STM32 core version: 1.9.0
  • Board Name: NUCLEO-H743ZI2

Describe the bug
I try to use PG9 as digital output :

  • pinMode (PG9, OUTPUT) ; insetup;
  • digitalWrite (PE9, HIGH) ; has no effect, pin is not a high level digital output.

Bug Fix
I think the bug is in the~/Library/Arduino15/packages/STM32/hardware/stm32/1.9.0/variants/NUCLEO_H743ZI/variant.h file.

Line 174 is :#define NUM_DIGITAL_PINS 99, and line 164 is#define PG9 99.PG9 is the last pin, soNUM_DIGITAL_PINS should be equal to100.

So changing the line 174 to#define NUM_DIGITAL_PINS 100 solves the bug.

Note
I think the line 176#define NUM_DIGITAL_PINS 97 (for NUCLEO_H743ZI) should be also changed to#define NUM_DIGITAL_PINS 98, for the same reason : last pin isPG12 (#97).

Best regards,

Pierre Molinaro

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp