Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

GPIO configuration bug #109

@jonturner53

Description

@jonturner53

It appears that in some cases, the order of pinMode calls affects the pin configuration.
For example, a test program containing the following two lines

pinMode(GPIO0_2, OUTPUT, 0)
pinMode(GPIO0_20, INPUT, 0)

works as expected. Specifically, in the pins file we find

pin 84 (44e10950) 00000007 pinctrl-single
pin 109 (44e109b4) 0000002f pinctrl-single

pin number 84 corresponds to GPIO0_2 and 109 corresponds to GPIO0_20.
However, if you reverse the order of the two pinMode calls, you get

pin 84 (44e10950) 00000007 pinctrl-single
pin 109 (44e109b4) 00000007 pinctrl-single

That is, both signals are configured as outputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions